Skip to content

Commit

Permalink
upgrade angular version and added new feature for qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
asoftwareworld committed Mar 18, 2023
1 parent 22ad77f commit 64944d4
Show file tree
Hide file tree
Showing 11 changed files with 397 additions and 206 deletions.
110 changes: 55 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
{
"name": "@asoftwareworld/form-builder",
"version": "5.0.8",
"author": "Anish Sharma",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"gulp": "gulp build-assets",
"build-lib": "ng build form-builder && gulp build-assets"
},
"private": true,
"dependencies": {
"@angular/animations": "^15.0.4",
"@angular/cdk": "~15.0.4",
"@angular/common": "^15.0.4",
"@angular/compiler": "^15.0.4",
"@angular/core": "^15.0.4",
"@angular/forms": "^15.0.4",
"@angular/material": "~15.0.4",
"@angular/platform-browser": "^15.0.4",
"@angular/platform-browser-dynamic": "^15.0.4",
"@angular/router": "^15.0.4",
"@angular/google-maps": "^15.0.4",
"@asoftwareworld/qrcode": "^1.2.0",
"@types/fabric": "^4.2.5",
"fabric": "^4.4.0",
"bootstrap": "^5.1.3",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
"gulp-dart-sass": "^1.0.2",
"gulp-rename": "^2.0.0",
"gulp-uglifycss": "^1.1.0",
"ng-packagr": "^15.0.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.5",
"@angular/cli": "~15.0.5",
"@angular/compiler-cli": "^15.0.4",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.8.2"
}
}
"name": "@asoftwareworld/form-builder",
"version": "5.1.0",
"author": "Anish Sharma",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"gulp": "gulp build-assets",
"build-lib": "ng build form-builder && gulp build-assets"
},
"private": true,
"dependencies": {
"@angular/animations": "^15.2.3",
"@angular/cdk": "~15.2.3",
"@angular/common": "^15.2.3",
"@angular/compiler": "^15.2.3",
"@angular/core": "^15.2.3",
"@angular/forms": "^15.2.3",
"@angular/google-maps": "^15.0.4",
"@angular/material": "~15.2.3",
"@angular/platform-browser": "^15.2.3",
"@angular/platform-browser-dynamic": "^15.2.3",
"@angular/router": "^15.2.3",
"@asoftwareworld/qrcode": "^2.0.0",
"@types/fabric": "^4.2.5",
"bootstrap": "^5.1.3",
"fabric": "^4.4.0",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
"gulp-dart-sass": "^1.0.2",
"gulp-rename": "^2.0.0",
"gulp-uglifycss": "^1.1.0",
"ng-packagr": "^15.0.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.2.4",
"@angular/cli": "~15.2.4",
"@angular/compiler-cli": "^15.2.3",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.8.2"
}
}
36 changes: 19 additions & 17 deletions src/components/form-builder/default-controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,25 +274,27 @@ export const DIGITAL_CONTROLS = [
];

export const OTHERS_CONTROLS = [
// {
// id: '1',
// icon: 'cloud_upload',
// displayName: 'File Upload',
// controlType: 'fileupload',
// label: 'File Upload',
// column: 'col-md-12',
// value: [],
// isRequired: false
// },
{
icon: 'qr_code_2',
id: '',
guid: '',
icon: 'qrCode',
displayName: 'QR Code',
controlType: 'qr-code',
centerImageSize: '30',
centerImage: 'https://raw.githubusercontent.com/asoftwareworld/ASW-Form-Builder/master/asw.png',
qrCodeSize: 240,
errorCorrectionLevel: 'M',
density: {
errorCorrectionLevel: 'Q',
mode: 'Byte',
typeNumber: 0
},
logoStyle: {
hideBackgroundCircle: true,
logoSize: 0.3,
logoMargin: 0
},
logo: '',
width: 200,
height: 200,
outerMargin: 0,
value: '',
column: 'col-md-12',
value: 'https://asoftwareworld.github.io/form-builder'
},
}
];
10 changes: 0 additions & 10 deletions src/components/form-control/core/constant/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* found in the LICENSE file
*/

import { AswQrcodeErrorCorrectionLevel } from '@asoftwareworld/qrcode';

function getConstatnts(): any {

const defaultImage = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAAAAQAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH//2Q==';
Expand Down Expand Up @@ -135,13 +133,6 @@ function getConstatnts(): any {
}
];

const errorCorrectionLevels: AswQrcodeErrorCorrectionLevel[] = [
AswQrcodeErrorCorrectionLevel.LOW,
AswQrcodeErrorCorrectionLevel.MEDIUM,
AswQrcodeErrorCorrectionLevel.HIGH,
AswQrcodeErrorCorrectionLevel.QUARTILE
];

const operations = [
{
value: '+',
Expand Down Expand Up @@ -204,7 +195,6 @@ function getConstatnts(): any {
notificationMessage,
messages,
columns,
errorCorrectionLevels,
operations,
defaultImage
};
Expand Down
15 changes: 10 additions & 5 deletions src/components/form-control/qrcode/qrcode-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
* found in the LICENSE file
*/

import { AswQrcodeErrorCorrectionLevel } from '@asoftwareworld/qrcode';
import { Density, LogoStyle } from '@asoftwareworld/qrcode';

export interface QrCodeControl {
centerImageSize?: string | number;
centerImage?: string;
qrCodeSize?: number;
errorCorrectionLevel: AswQrcodeErrorCorrectionLevel;
id?: string;
guid?: string;
column: string;
value: string;
controlType?: string;
displayName: string;
height?: number;
width?: number;
logo?: string;
outerMargin?: number;
density?: Density;
logoStyle?: LogoStyle;
}
Loading

0 comments on commit 64944d4

Please sign in to comment.