Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
63b5d3b
Issue #SB-0000 fix:Angular upgrade v12 changes
abhishekpnt Nov 28, 2022
9cda4ab
Issue #SB-0000 fix:Angular upgrade v12 changes
abhishekpnt Nov 28, 2022
16fad1c
Merge branch 'Sunbird-Ed:release-5.1.0_v12' into release-5.1.0_v12
abhishekpnt Nov 28, 2022
cbd609b
Issue #SB-0000 merge: Merge pull request #185 from abhishekpnt/releas…
swayangjit Nov 28, 2022
047683c
Issue #SB-0000 fix:Angular upgrade v12 changes-upgraded the version
abhishekpnt Nov 28, 2022
6ad67db
Merge branch 'release-5.1.0_v12' of github.com:abhishekpnt/SunbirdEd-…
abhishekpnt Nov 28, 2022
69cc3b4
Issue #SB-0000 merge: Merge pull request #186 from abhishekpnt/releas…
swayangjit Nov 28, 2022
351c6ae
Angular CLI update for packages - @angular/core@13, @angular/cli@13
abhishekpnt Mar 9, 2023
25e2c85
@angular/cli migration - drop-ie-polyfills
abhishekpnt Mar 9, 2023
0e384b9
@angular/cli migration - update-angular-config-v13
abhishekpnt Mar 9, 2023
4de9d4b
@angular/cli migration - update-gitignore
abhishekpnt Mar 9, 2023
4c7c1de
@angular/cli migration - update-libraries-v13
abhishekpnt Mar 9, 2023
84014da
@angular/core migration - migration-v13-testbed-teardown
abhishekpnt Mar 9, 2023
02f40f7
@angular/core migration - migration-v13.1-entry-components
abhishekpnt Mar 9, 2023
b9ede49
Angular CLI update for packages - @angular/material@13
abhishekpnt Mar 9, 2023
18cd4ce
Issue #ED-1406: Updated sunbird-forms to Angular-13
abhishekpnt Mar 9, 2023
85cd090
Issue #ED-1406: Updated package version
abhishekpnt Mar 9, 2023
50c77cc
Issue #ED-1406: Updated readme
abhishekpnt Mar 9, 2023
62743b4
Merge pull request #192 from abhishekpnt/release-6.0.0_v13
rajeevsathish Mar 9, 2023
f130071
Issue #ED-1406: Updated node version
abhishekpnt Mar 9, 2023
dcb2dd3
Merge branch 'Sunbird-Ed:release-6.0.0_v13' into release-6.0.0_v13
abhishekpnt Mar 9, 2023
c2b9256
Merge pull request #193 from abhishekpnt/release-6.0.0_v13
rajeevsathish Mar 9, 2023
d8f89ea
yarn added
princegupta1131 Apr 3, 2023
545c223
Angular CLI update for packages - @angular/core@14, @angular/cli@14
princegupta1131 Apr 3, 2023
a9d313f
@angular/cli migration - remove-default-project-option
princegupta1131 Apr 3, 2023
56ef27e
@angular/cli migration - update-angular-packages-version-prefix
princegupta1131 Apr 3, 2023
6ac6701
@angular/cli migration - update-tsconfig-target
princegupta1131 Apr 3, 2023
ddaa9cc
@angular/core migration - migration-v14-typed-forms
princegupta1131 Apr 3, 2023
f9489b7
Issue ED-1491 feat: updated library from Angular V13 to V14
princegupta1131 Apr 5, 2023
3b7fa66
Issue ED-1491 feat: updated library from Angular V13 to V14
princegupta1131 Apr 5, 2023
bab90a9
Issue ED-1491 feat: updated library from Angular V13 to V14
princegupta1131 Apr 5, 2023
52d2761
Issue ED-1491 feat: updated library from Angular V13 to V14
princegupta1131 Apr 5, 2023
2ab4a34
Issue ED-1491 merge: Merge pull request #194 from princegupta1131/re…
swayangjit Apr 5, 2023
61af760
Issue #IQ-442 fix: moment is not a function error fix
rajnishdargan Jun 1, 2023
abf4a14
Issue #IQ-442 fix: moment is not a function error fix
rajnishdargan Jun 5, 2023
edf75eb
Merge pull request #197 from rajnishdargan/release-6.0.0_v14
rajeevsathish Jun 6, 2023
945e241
Issue #IQ-337 fix: User is not able to send for review when reset the…
vaibhavbhuva Jun 9, 2023
7e1821b
Merge pull request #199 from vaibhavbhuva/release-6.0.0_v14
rajeevsathish Jun 9, 2023
086c0c1
#SB-0000 feat: updated the readme file
princegupta1131 Aug 8, 2023
18eeb72
#SB-0000 merge: Merge pull request #201 from princegupta1131/release-…
vinukumar-vs Aug 9, 2023
3ab34ab
Issue #ED-3623: updated ts for ng 15 upgrade
abhishekpnt Mar 7, 2024
b67481f
Angular CLI update for packages - @angular/core@15, @angular/cli@15
abhishekpnt Mar 7, 2024
19ddea4
@angular/cli migration - update-karma-main-file
abhishekpnt Mar 7, 2024
408c523
@angular/cli migration - update-typescript-target
abhishekpnt Mar 7, 2024
dacdb21
Angular CLI update for packages - @angular/material@15
abhishekpnt Mar 7, 2024
4fddd9a
@angular/material migration - migration-v15
abhishekpnt Mar 7, 2024
8aa8289
Issue #ED-3623: angular 15 upgrade with material
abhishekpnt Mar 7, 2024
c92525f
Issue #ED-3623: updated readme
abhishekpnt Mar 7, 2024
b53cf32
Issue #ED-3623: angular 15 upgrade with material
abhishekpnt Mar 7, 2024
3608d87
Issue #ED-3623: changed circleci image
abhishekpnt Mar 7, 2024
e09aa45
Merge pull request #211 from abhishekpnt/release-8.0.0_v15
swayangjit Mar 7, 2024
d0aa36e
Issue #ED-3737: Updated Sunbird-Ed forms to Angular 16
abhishekpnt Mar 14, 2024
0402831
Issue #ED-3737: Updated Sunbird-Ed forms to Angular 16
abhishekpnt Mar 14, 2024
fe79e6c
Issue #ED-3737: Updated Sunbird-Ed forms to Angular 16
abhishekpnt Mar 14, 2024
00e9560
Issue #ED-3737: Updated circleci image
abhishekpnt Mar 14, 2024
26e21de
Issue #ED-3737: Updated circleci image
abhishekpnt Mar 14, 2024
eddc9d8
Issue #ED-3737: Updated circleci image
abhishekpnt Mar 14, 2024
c69592f
Issue #ED-3737: Updated circleci image
abhishekpnt Mar 14, 2024
62903bb
Issue #ED-3737: Updated version
abhishekpnt Mar 14, 2024
6e31cbb
Merge pull request #212 from abhishekpnt/release-8.0.0_v16
swayangjit Mar 14, 2024
287d74d
Issue #ED-3708 feat: Updated client services version
sujithsojan Mar 22, 2024
48b4540
Issue #ED-3508 feat: version added
sujithsojan Mar 22, 2024
07370ec
Issue #ED-3708 merge: Merge pull request #214 from sujithsojan/8.0.0…
swayangjit Mar 22, 2024
d50b76e
Issue #ED-3708 feat: Updated the peer dependencies for client services
sujithsojan Mar 22, 2024
528b534
Merge pull request #215 from sujithsojan/8.0.0_v16
swayangjit Mar 22, 2024
a794df6
Issue #ED-3708 feat: Updated common form elements lodash-es version
sujithsojan Mar 26, 2024
e2ffff9
Merge pull request #216 from sujithsojan/8.0.0_v16
swayangjit Mar 26, 2024
8bdde13
matrix Question form element Added
Mar 28, 2024
31d2bd8
Update common-form-elements.module.ts
ramkumar-pacewisdom Apr 1, 2024
9fd2537
Update common-form-elements.module.ts
ramkumar-pacewisdom Apr 1, 2024
d869ec9
Update package.json
ramkumar-pacewisdom Apr 5, 2024
f8fdbdf
package version change
Apr 8, 2024
4bbe184
Merge branch '8.0.0_v16' into ramkumar-8.0.0_v15
ramkumar-pacewisdom Apr 8, 2024
731243a
Merge pull request #219 from ramkumar-pacewisdom/ramkumar-8.0.0_v15
rajeevsathish Apr 12, 2024
88ad63f
Fix SunbirdEd-forms setup issues and add ngx-chips as a peer dependency
rajnishdargan Dec 27, 2024
7e52f3b
Fix SunbirdEd-forms setup issues and add ngx-chips as a peer dependency
rajnishdargan Dec 30, 2024
d9fbd08
Merge pull request #227 from rajnishdargan/8.0.0_v16
HarishGangula Jan 2, 2025
de542fb
Fix: Field not getting disabled in dynamic textbox
rajnishdargan Mar 13, 2025
f9fcd72
Fix: Field not getting disabled in dynamic textbox
rajnishdargan Mar 13, 2025
097a030
Merge pull request #228 from rajnishdargan/8.0.0_v16
HarishGangula Mar 17, 2025
f7dd1a1
SBCOSS-445: Added github actions for publishing to npm package
Deeksha1502 May 14, 2025
5868bd7
Merge pull request #231 from Deeksha1502/8.0.0_v16
HarishGangula May 14, 2025
94f2a04
SBCOSS-446: configured eslint
Rakshitha-D May 16, 2025
662082f
SBCOSS-446: created workflow for code quality checking
Rakshitha-D May 16, 2025
cff0a4d
SBCOSS-446: modified karma config file
Rakshitha-D May 16, 2025
ce740d5
SBCOSS-446: modified workflow condition
Rakshitha-D May 16, 2025
2718a55
SBCOSS-446: updated linting rules
Rakshitha-D May 16, 2025
e5534cf
SBCOSS-446: added core-js package
Rakshitha-D May 16, 2025
4d440c0
SBCOSS-446: removed core-js package
Rakshitha-D May 16, 2025
37c48eb
SBCOSS-446: updated workflow condition
Rakshitha-D May 20, 2025
1aa3ec9
Merge pull request #232 from Rakshitha-D/cq_workflow
HarishGangula May 20, 2025
3129536
SBCOSS-445: Increased package version
Deeksha1502 May 20, 2025
da4cf3c
SBCOSS-445: Upgraded package version
Deeksha1502 May 20, 2025
584b8bb
SBCOSS-446: updated readme file
Rakshitha-D May 20, 2025
ee5925e
SBCOSS-446: removed tslint package and files
Rakshitha-D May 20, 2025
1e37d4f
Merge pull request #233 from Deeksha1502/upgrade-npm-version-forms
HarishGangula May 21, 2025
6c7f855
SBCOSS-446: updated workflow
Rakshitha-D May 21, 2025
d7e3de8
Update README.md
Rakshitha-D May 21, 2025
17ee426
SBCOSS-446: updated readme file
Rakshitha-D May 21, 2025
48963dd
Merge pull request #234 from Rakshitha-D/cq_workflow
HarishGangula May 21, 2025
9e2ff29
SBCOSS-446: updated build file to read version dynamically
Rakshitha-D May 21, 2025
2ca2bb9
Merge remote-tracking branch 'upstream/release-8.0.0' into cq_workflow
Rakshitha-D May 21, 2025
6c36464
Merge pull request #235 from Rakshitha-D/cq_workflow
HarishGangula May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/publish-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Create Tag on Push

on:
push:
tags:
- '*'

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.15.0'
cache: 'npm'

- name: Check installed versions
run: |
node -v

- name: Clean npm cache
run: npm cache clean --force

- name: Install dependencies
run: |
if [ ! -d "node_modules" ]; then
npm ci
fi

- name: Build and Pack
run: |
npm run build-mobile
npm pack ./dist/common-form-elements

- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
npm publish project-sunbird-common-form-elements-*
46 changes: 46 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Code Quality Checks

on:
pull_request:
branches:
- '**'

jobs:
code-quality:
name: Run Code Quality Checks
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.15.0'

- name: Restore node_modules cache
id: cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-

- name: Install dependencies
run: npm ci

- name: Save node_modules cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}

- name: Run lint
run: npm run lint

- name: Run test
run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ speed-measure-plugin.json
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
86 changes: 81 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,42 @@
# SunbirdEdForms
# Sunbird-ED Forms

Contains Form component powered by angular. This component expects a configuration and renders form according to the view.

# Getting Started
<p>
<img alt="angular" src="https://img.shields.io/badge/-Angular-DD0031?style=flat-square&logo=angular&logoColor=white" height=25 />
<img alt="TypeScript" src="https://img.shields.io/badge/-TypeScript-007ACC?style=flat-square&logo=typescript&logoColor=white" height=25 />
</p>

---
## Getting started
How to use @project-sunbird/common-form-elements in your projects

## Table of Contents

- [Using library locally](#using-library-locally)
- [Step 1: Install the package](#step-1-install-the-package)
- [Step 2: Include the library selector in view( Eg .HTML file)](#step-2-include-the-library-selector-in-view-eg-html-file)
- [Step 3: Form component emits values on every input , To get value include event callbacks](#step-3-form-component-emits-values-on-every-input--to-get-value-include-event-callbacks)
- [Steps to Integrate the form](#steps-to-integrate-the-form)
- [Versions](#versions)
---

## Using library locally

1. Build library
```console
npm run build-lib
```
2. link library
-> cd dist/common-form-elements
```console
npm link
```
3. Link the library to your project
```console
npm link @project-sunbird/common-form-elements
```
---

## Step 1: Install the package

Expand All @@ -12,7 +46,7 @@ Contains Form component powered by angular. This component expects a configurat

<sb-form [config]='config'></sb-form>

## step3: Form component emits values on every input , To get value include event callbacks
## Step 3: Form component emits values on every input , To get value include event callbacks

<sb-form (valueChanges)="function($event)" (statusChanges)="function($event)" ></sb-form>

Expand Down Expand Up @@ -84,8 +118,50 @@ functionName(config: FieldConfig<any>, initial = false): FieldConfigOptionsBuild


## Versions
| release branch | npm package version | Angular Version |
| Release branch | npm package version | Angular Version |
|:-----------------:|:-------------------:|:---------------:|
| release-5.0.1 | 5.0.1 | Ng V9 |
| release-5.1.0_v10 | 5.1.0 | Ng V10 |
| release-5.1.0_v11 | 5.1.1 | Ng V11 |
| release-5.1.0_v11 | 5.1.1 | Ng V11 |
| release-5.1.0_v12 | 5.1.2 | Ng V12 |
| release-6.0.0_v13 | 6.0.0 | Ng V13 |
| release-6.0.0_v14 | 6.0.1/6.0.2/6.0.3 | Ng V14 |
| 8.0.0_v15 | 8.0.0 | Ng V15 |
| 8.0.0_v16 | 8.0.1 | Ng V16 |


## Code Quality

The project maintains code quality through automated checks that run on every pull request:

1. **Linting**
- ESLint for code style and quality
- Command: `npm run lint`

2. **Dependencies**
- Uses `npm ci` for deterministic installations
- GitHub Actions cache for faster builds (e.g., `node_modules`). See [GitHub Actions workflow](.github/workflows/pull_request.yml) for caching configuration details.

3. **Code Formatting**
- Ensures consistent code formatting
- Can be automatically fixed using `npm run lint:fix`

4. **Testing**
- Unit tests using Karma
- Command: `npm run test`

These checks ensure consistent code style, secure dependency management, and reliable testing.

## Package Publishing

Workflow automatically builds and publishes NPM packages whenever a new tag is pushed to the repository.

### Publish Workflow

The workflow is triggered on:
- Triggered on push events for any Git tag

Key features of the workflow:
1. Automatically builds the project
2. Creates NPM package
3. Publishes to NPM registry using NPM authentication token (must be provided as GitHub secret `NPM_TOKEN`)
50 changes: 32 additions & 18 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
, "configurations": {
"production": {
"tsConfig": "projects/common-form-elements/tsconfig.lib.prod.json"
}
}
},
"development": {}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
Expand All @@ -30,23 +32,21 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"projects/common-form-elements/tsconfig.lib.json",
"projects/common-form-elements/tsconfig.spec.json"
"lintFilePatterns": [
"projects/common-form-elements/**/*.ts",
"projects/common-form-elements/**/*.html"
],
"exclude": [
"**/node_modules/**"
]
"eslintConfig": "projects/common-form-elements/eslint.config.js"
}
}
}
},
"sunbird-forms": {
"projectType": "application",
"schematics": {},
"root": "src/sunbird-forms",
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
Expand All @@ -58,7 +58,6 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -75,7 +74,13 @@
"src/assets/libs/transition.min.js",
"src/assets/libs/modal.min.js",
"src/assets/libs/semantic-ui-tree-picker.js"
]
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -88,7 +93,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand All @@ -105,19 +109,24 @@
"maximumError": "10kb"
}
]
}
}
},
"development": {}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "sunbird-forms:build"
},
"configurations": {
"production": {
"browserTarget": "sunbird-forms:build:production"
},
"development": {
"browserTarget": "sunbird-forms:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -128,5 +137,10 @@
}
}
},
"defaultProject": "common-form-elements"
"cli": {
"analytics": false,
"schematicCollections": [
"angular-eslint"
]
}
}
13 changes: 10 additions & 3 deletions build-mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ const inquirer = require('inquirer');
const chalk = require('chalk');
const { spawn } = require("child_process");
const packageFilepath = "projects/common-form-elements/package.json";

const getVersion = () => {
const packageJson = fs.readFileSync(packageFilepath);
const { version } = JSON.parse(packageJson);
return version;
};

const filesToRemoveLines = [
{
filepath: "projects/common-form-elements/src/lib/dynamic-field/dynamic-field.directive.ts",
Expand All @@ -20,14 +27,14 @@ const run = async () => {
const answers = {
environment: 'mobile',
name: '@project-sunbird/common-form-elements',
version: '5.1.1'
}
version: getVersion()
};
const { environment } = answers;
console.log(answers);
updateFiles(environment);
updatePackageFile(packageFilepath, answers);
console.log(chalk.bgBlue(' =========== Building Angular Package ==========='));
const child = spawn('ng', ['build', 'common-form-elements', '--prod']);
const child = spawn('ng', ['build', 'common-form-elements']);
child.stdout.on('data', (data) => {
console.log(chalk.green(`${data}`));
});
Expand Down
Loading
Loading