@colijnit/sharedcomponents 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +16 -0
- package/.editorconfig +16 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +11 -8
- package/Sharedcomponents.iml +11 -0
- package/angular.json +133 -0
- package/colijnit-sharedcomponents-1.0.6.tgz +0 -0
- package/karma.conf.js +44 -0
- package/move-assets.js +14 -0
- package/package.json +70 -25
- package/projects/sharedcomponents/.browserslistrc +16 -0
- package/projects/sharedcomponents/README.md +24 -0
- package/projects/sharedcomponents/karma.conf.js +44 -0
- package/projects/sharedcomponents/ng-package.json +17 -0
- package/projects/sharedcomponents/package.json +15 -0
- package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +82 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +50 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +252 -0
- package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +22 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_theme.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +6 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +215 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +27 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/style/_layout.scss +186 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/style/_material-definition.scss +1 -0
- package/projects/sharedcomponents/src/lib/components/send-method-dialog/style/_theme.scss +7 -0
- package/{lib/components/stock → projects/sharedcomponents/src/lib/components/send-method-dialog}/style/material.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +59 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +278 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +82 -0
- package/{lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts → projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts} +2 -2
- package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +111 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +78 -0
- package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +47 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_layout.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_material-definition.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_theme.scss +0 -0
- package/projects/sharedcomponents/src/lib/components/stock/style/material.scss +4 -0
- package/projects/sharedcomponents/src/lib/enum/icon.enum.ts +22 -0
- package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +120 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +113 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +61 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +63 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +41 -0
- package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +48 -0
- package/projects/sharedcomponents/src/lib/model/business-object.ts +85 -0
- package/projects/sharedcomponents/src/lib/model/icon-svg.ts +22 -0
- package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +51 -0
- package/projects/sharedcomponents/src/lib/service/ione-connector-adapter.service.ts +113 -0
- package/projects/sharedcomponents/src/lib/service/stock.service.ts +35 -0
- package/{lib → projects/sharedcomponents/src/lib}/style/_mixin.scss +0 -0
- package/{lib → projects/sharedcomponents/src/lib}/style/_variables.scss +0 -0
- package/projects/sharedcomponents/src/lib/utils/array-utils.ts +202 -0
- package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +4 -0
- package/{public-api.d.ts → projects/sharedcomponents/src/public-api.ts} +6 -0
- package/projects/sharedcomponents/src/test.ts +27 -0
- package/projects/sharedcomponents/tsconfig.lib.json +18 -0
- package/projects/sharedcomponents/tsconfig.lib.prod.json +10 -0
- package/projects/sharedcomponents/tsconfig.spec.json +17 -0
- package/src/app/app.component.scss +8 -0
- package/src/app/app.component.spec.ts +31 -0
- package/src/app/app.component.ts +97 -0
- package/src/app/app.module.ts +24 -0
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.prod.ts +3 -0
- package/src/environments/environment.ts +16 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +13 -0
- package/src/main.ts +12 -0
- package/src/polyfills.ts +53 -0
- package/src/styles.scss +28 -0
- package/src/test.ts +26 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +65 -0
- package/tsconfig.spec.json +18 -0
- package/bundles/colijnit-sharedcomponents.umd.js +0 -1901
- package/bundles/colijnit-sharedcomponents.umd.js.map +0 -1
- package/colijnit-sharedcomponents-1.0.5.tgz +0 -0
- package/colijnit-sharedcomponents.d.ts +0 -12
- package/colijnit-sharedcomponents.metadata.json +0 -1
- package/esm2015/colijnit-sharedcomponents.js +0 -13
- package/esm2015/lib/components/docsign/component/signature/signature.component.js +0 -75
- package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +0 -44
- package/esm2015/lib/components/docsign/docsign.component.js +0 -225
- package/esm2015/lib/components/docsign/docsign.module.js +0 -23
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +0 -60
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +0 -255
- package/esm2015/lib/components/stock/stock-location/stock-location.component.js +0 -62
- package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +0 -2
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +0 -98
- package/esm2015/lib/components/stock/stock.component.js +0 -74
- package/esm2015/lib/components/stock/stock.module.js +0 -42
- package/esm2015/lib/factory/business-object-factory.js +0 -120
- package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
- package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
- package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
- package/esm2015/lib/model/business-object.js +0 -81
- package/esm2015/lib/service/ione-connector-adapter.service.js +0 -98
- package/esm2015/lib/service/stock.service.js +0 -28
- package/esm2015/lib/utils/array-utils.js +0 -183
- package/esm2015/lib/utils/is-nill.function.js +0 -5
- package/esm2015/public-api.js +0 -8
- package/fesm2015/colijnit-sharedcomponents.js +0 -1731
- package/fesm2015/colijnit-sharedcomponents.js.map +0 -1
- package/lib/components/docsign/component/signature/signature.component.d.ts +0 -16
- package/lib/components/docsign/component/signatures/signatures.component.d.ts +0 -12
- package/lib/components/docsign/docsign.component.d.ts +0 -92
- package/lib/components/docsign/docsign.module.d.ts +0 -2
- package/lib/components/stock/stock-information/stock-information.component.d.ts +0 -10
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +0 -43
- package/lib/components/stock/stock-location/stock-location.component.d.ts +0 -12
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +0 -19
- package/lib/components/stock/stock.component.d.ts +0 -20
- package/lib/components/stock/stock.module.d.ts +0 -2
- package/lib/factory/business-object-factory.d.ts +0 -23
- package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
- package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
- package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
- package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
- package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
- package/lib/model/business-object.d.ts +0 -7
- package/lib/service/ione-connector-adapter.service.d.ts +0 -17
- package/lib/service/stock.service.d.ts +0 -11
- package/lib/utils/array-utils.d.ts +0 -57
- package/lib/utils/is-nill.function.d.ts +0 -1
package/.browserslistrc
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
+
# For additional information regarding the format and rule options, please see:
|
|
3
|
+
# https://github.com/browserslist/browserslist#queries
|
|
4
|
+
|
|
5
|
+
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
+
# https://angular.io/guide/browser-support
|
|
7
|
+
|
|
8
|
+
# You can see what browsers were selected by your queries by running:
|
|
9
|
+
# npx browserslist
|
|
10
|
+
|
|
11
|
+
last 1 Chrome version
|
|
12
|
+
last 1 Firefox version
|
|
13
|
+
last 2 Edge major versions
|
|
14
|
+
last 2 Safari major versions
|
|
15
|
+
last 2 iOS major versions
|
|
16
|
+
Firefox ESR
|
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "pwa-chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ng test",
|
|
14
|
+
"type": "chrome",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"preLaunchTask": "npm: test",
|
|
17
|
+
"url": "http://localhost:9876/debug.html"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "(.*?)"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation complete"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "npm",
|
|
25
|
+
"script": "test",
|
|
26
|
+
"isBackground": true,
|
|
27
|
+
"problemMatcher": {
|
|
28
|
+
"owner": "typescript",
|
|
29
|
+
"pattern": "$tsc",
|
|
30
|
+
"background": {
|
|
31
|
+
"activeOnStart": true,
|
|
32
|
+
"beginsPattern": {
|
|
33
|
+
"regexp": "(.*?)"
|
|
34
|
+
},
|
|
35
|
+
"endsPattern": {
|
|
36
|
+
"regexp": "bundle generation complete"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
package/README.md
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
# Sharedcomponents
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.1.4.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
|
4
8
|
|
|
5
9
|
## Code scaffolding
|
|
6
10
|
|
|
7
|
-
Run `ng generate component component-name
|
|
8
|
-
> Note: Don't forget to add `--project sharedcomponents` or else it will be added to the default project in your `angular.json` file.
|
|
11
|
+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
|
9
12
|
|
|
10
13
|
## Build
|
|
11
14
|
|
|
12
|
-
Run `ng build
|
|
15
|
+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
16
|
|
|
14
|
-
##
|
|
17
|
+
## Running unit tests
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
17
20
|
|
|
18
|
-
## Running
|
|
21
|
+
## Running end-to-end tests
|
|
19
22
|
|
|
20
|
-
Run `ng
|
|
23
|
+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
|
21
24
|
|
|
22
25
|
## Further help
|
|
23
26
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$">
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
</component>
|
|
11
|
+
</module>
|
package/angular.json
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"Sharedcomponents": {
|
|
7
|
+
"projectType": "application",
|
|
8
|
+
"schematics": {
|
|
9
|
+
"@schematics/angular:application": {
|
|
10
|
+
"strict": true,
|
|
11
|
+
"style": "scss"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"root": "",
|
|
15
|
+
"sourceRoot": "src",
|
|
16
|
+
"prefix": "app",
|
|
17
|
+
"architect": {
|
|
18
|
+
"build": {
|
|
19
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
20
|
+
"options": {
|
|
21
|
+
"outputPath": "dist/sharedcomponents",
|
|
22
|
+
"index": "src/index.html",
|
|
23
|
+
"main": "src/main.ts",
|
|
24
|
+
"polyfills": "src/polyfills.ts",
|
|
25
|
+
"tsConfig": "tsconfig.app.json",
|
|
26
|
+
"assets": [
|
|
27
|
+
"src/favicon.ico",
|
|
28
|
+
"src/assets"
|
|
29
|
+
],
|
|
30
|
+
"styles": [
|
|
31
|
+
"src/styles.scss"
|
|
32
|
+
],
|
|
33
|
+
"stylePreprocessorOptions": {
|
|
34
|
+
"includePaths": [
|
|
35
|
+
"node_modules/@syncfusion",
|
|
36
|
+
"node_modules/@colijnit",
|
|
37
|
+
"projects/sharedcomponents/src/lib"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"scripts": []
|
|
41
|
+
},
|
|
42
|
+
"configurations": {
|
|
43
|
+
"production": {
|
|
44
|
+
"fileReplacements": [
|
|
45
|
+
{
|
|
46
|
+
"replace": "src/environments/environment.ts",
|
|
47
|
+
"with": "src/environments/environment.prod.ts"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"outputHashing": "all"
|
|
51
|
+
},
|
|
52
|
+
"development": {
|
|
53
|
+
"buildOptimizer": false,
|
|
54
|
+
"optimization": false,
|
|
55
|
+
"vendorChunk": true,
|
|
56
|
+
"extractLicenses": false,
|
|
57
|
+
"sourceMap": true,
|
|
58
|
+
"namedChunks": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"defaultConfiguration": "production"
|
|
62
|
+
},
|
|
63
|
+
"serve": {
|
|
64
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
65
|
+
"configurations": {
|
|
66
|
+
"production": {
|
|
67
|
+
"browserTarget": "Sharedcomponents:build:production"
|
|
68
|
+
},
|
|
69
|
+
"development": {
|
|
70
|
+
"browserTarget": "Sharedcomponents:build:development"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"defaultConfiguration": "development"
|
|
74
|
+
},
|
|
75
|
+
"extract-i18n": {
|
|
76
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
77
|
+
"options": {
|
|
78
|
+
"browserTarget": "Sharedcomponents:build"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"test": {
|
|
82
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
83
|
+
"options": {
|
|
84
|
+
"main": "src/test.ts",
|
|
85
|
+
"polyfills": "src/polyfills.ts",
|
|
86
|
+
"tsConfig": "tsconfig.spec.json",
|
|
87
|
+
"karmaConfig": "karma.conf.js",
|
|
88
|
+
"assets": [
|
|
89
|
+
"src/favicon.ico",
|
|
90
|
+
"src/assets"
|
|
91
|
+
],
|
|
92
|
+
"styles": [
|
|
93
|
+
"src/styles.scss"
|
|
94
|
+
],
|
|
95
|
+
"scripts": []
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"sharedcomponents": {
|
|
101
|
+
"projectType": "library",
|
|
102
|
+
"root": "projects/sharedcomponents",
|
|
103
|
+
"sourceRoot": "projects/sharedcomponents/src",
|
|
104
|
+
"prefix": "lib",
|
|
105
|
+
"architect": {
|
|
106
|
+
"build": {
|
|
107
|
+
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
108
|
+
"options": {
|
|
109
|
+
"project": "projects/sharedcomponents/ng-package.json"
|
|
110
|
+
},
|
|
111
|
+
"configurations": {
|
|
112
|
+
"production": {
|
|
113
|
+
"tsConfig": "projects/sharedcomponents/tsconfig.lib.prod.json"
|
|
114
|
+
},
|
|
115
|
+
"development": {
|
|
116
|
+
"tsConfig": "projects/sharedcomponents/tsconfig.lib.json"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"defaultConfiguration": "production"
|
|
120
|
+
},
|
|
121
|
+
"test": {
|
|
122
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
123
|
+
"options": {
|
|
124
|
+
"main": "projects/sharedcomponents/src/test.ts",
|
|
125
|
+
"tsConfig": "projects/sharedcomponents/tsconfig.spec.json",
|
|
126
|
+
"karmaConfig": "projects/sharedcomponents/karma.conf.js"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"defaultProject": "Sharedcomponents"
|
|
133
|
+
}
|
|
Binary file
|
package/karma.conf.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: '',
|
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
+
plugins: [
|
|
9
|
+
require('karma-jasmine'),
|
|
10
|
+
require('karma-chrome-launcher'),
|
|
11
|
+
require('karma-jasmine-html-reporter'),
|
|
12
|
+
require('karma-coverage'),
|
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
+
],
|
|
15
|
+
client: {
|
|
16
|
+
jasmine: {
|
|
17
|
+
// you can add configuration options for Jasmine here
|
|
18
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
19
|
+
// for example, you can disable the random execution with `random: false`
|
|
20
|
+
// or set a specific seed with `seed: 4321`
|
|
21
|
+
},
|
|
22
|
+
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
23
|
+
},
|
|
24
|
+
jasmineHtmlReporter: {
|
|
25
|
+
suppressAll: true // removes the duplicated traces
|
|
26
|
+
},
|
|
27
|
+
coverageReporter: {
|
|
28
|
+
dir: require('path').join(__dirname, './coverage/sharedcomponents'),
|
|
29
|
+
subdir: '.',
|
|
30
|
+
reporters: [
|
|
31
|
+
{ type: 'html' },
|
|
32
|
+
{ type: 'text-summary' }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
reporters: ['progress', 'kjhtml'],
|
|
36
|
+
port: 9876,
|
|
37
|
+
colors: true,
|
|
38
|
+
logLevel: config.LOG_INFO,
|
|
39
|
+
autoWatch: true,
|
|
40
|
+
browsers: ['Chrome'],
|
|
41
|
+
singleRun: false,
|
|
42
|
+
restartOnFileChange: true
|
|
43
|
+
});
|
|
44
|
+
};
|
package/move-assets.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var fs = require('fs-extra')
|
|
2
|
+
|
|
3
|
+
var oldSrcPath = 'dist/sharedcomponents/src';
|
|
4
|
+
var oldPath = 'dist/sharedcomponents/src/lib';
|
|
5
|
+
var newPath = 'dist/sharedcomponents/lib';
|
|
6
|
+
|
|
7
|
+
const copyLibFolder = async () => {
|
|
8
|
+
await fs.copy(oldPath, newPath, function (err) {
|
|
9
|
+
if (err) throw err;
|
|
10
|
+
fs.rmSync(oldSrcPath, { recursive: true, force: true });
|
|
11
|
+
console.log('Successfully moved assets!')
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
copyLibFolder();
|
package/package.json
CHANGED
|
@@ -1,25 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@colijnit/sharedcomponents",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@colijnit/sharedcomponents",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"start": "ng serve",
|
|
7
|
+
"build": "ng build",
|
|
8
|
+
"watch": "ng build --watch --configuration development",
|
|
9
|
+
"package": "ng build && ng-packagr -p projects/sharedcomponents/ng-package.json && npm run postPackage",
|
|
10
|
+
"postPackage": "node move-assets",
|
|
11
|
+
"test": "ng test"
|
|
12
|
+
},
|
|
13
|
+
"private": false,
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@angular/animations": "^12.2.0",
|
|
16
|
+
"@angular/cdk": "^12.2.0",
|
|
17
|
+
"@angular/common": "^12.2.0",
|
|
18
|
+
"@angular/compiler": "^12.2.0",
|
|
19
|
+
"@angular/core": "^12.2.0",
|
|
20
|
+
"@angular/forms": "^12.2.0",
|
|
21
|
+
"@angular/platform-browser": "^12.2.0",
|
|
22
|
+
"@angular/platform-browser-dynamic": "^12.2.0",
|
|
23
|
+
"@angular/router": "^12.2.0",
|
|
24
|
+
"@colijnit/articleapi": "^1.0.2",
|
|
25
|
+
"@colijnit/sharedapi": "^1.0.1",
|
|
26
|
+
"@colijnit/corecomponents_v12": "12.0.24",
|
|
27
|
+
"@syncfusion/ej2-angular-buttons": "~19.3.44",
|
|
28
|
+
"@syncfusion/ej2-angular-calendars": "~19.3.44",
|
|
29
|
+
"@syncfusion/ej2-angular-dropdowns": "~19.3.45",
|
|
30
|
+
"@syncfusion/ej2-angular-grids": "~19.3.45",
|
|
31
|
+
"@syncfusion/ej2-angular-inputs": "~19.3.44",
|
|
32
|
+
"@syncfusion/ej2-angular-kanban": "~19.3.45",
|
|
33
|
+
"@syncfusion/ej2-angular-lists": "~19.3.45",
|
|
34
|
+
"@syncfusion/ej2-angular-navigations": "~19.3.45",
|
|
35
|
+
"@syncfusion/ej2-angular-pivotview": "~19.3.44",
|
|
36
|
+
"@syncfusion/ej2-angular-popups": "~19.3.43",
|
|
37
|
+
"@syncfusion/ej2-angular-richtexteditor": "~19.3.45",
|
|
38
|
+
"@syncfusion/ej2-angular-schedule": "~19.3.44",
|
|
39
|
+
"@syncfusion/ej2-angular-splitbuttons": "~19.3.45",
|
|
40
|
+
"@syncfusion/ej2-base": "~19.3.43",
|
|
41
|
+
"@syncfusion/ej2-popups": "~19.3.43",
|
|
42
|
+
"@types/three": "0.126.0",
|
|
43
|
+
"@tweenjs/tween.js": "^17.2.0",
|
|
44
|
+
"three": "0.126.0",
|
|
45
|
+
"pdf-lib": "^1.17.1",
|
|
46
|
+
"pdfjs-dist": "^2.12.313",
|
|
47
|
+
"rxjs": "~7.4.0",
|
|
48
|
+
"signature_pad": "^4.0.2",
|
|
49
|
+
"tslib": "^2.3.0",
|
|
50
|
+
"zone.js": "~0.11.4"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@angular-devkit/build-angular": "^12.2.0",
|
|
54
|
+
"@angular/cli": "^12.2.0",
|
|
55
|
+
"@angular/compiler-cli": "^12.2.0",
|
|
56
|
+
"@types/jasmine": "~3.10.0",
|
|
57
|
+
"@types/node": "^12.11.1",
|
|
58
|
+
"jasmine-core": "~3.10.0",
|
|
59
|
+
"karma": "~6.3.0",
|
|
60
|
+
"karma-chrome-launcher": "~3.1.0",
|
|
61
|
+
"karma-coverage": "~2.1.0",
|
|
62
|
+
"karma-jasmine": "~4.0.0",
|
|
63
|
+
"karma-jasmine-html-reporter": "~1.7.0",
|
|
64
|
+
"ng-packagr": "^12.1.1",
|
|
65
|
+
"typescript": "~4.3.5"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@colijnit/corecomponents_v12": "^12.0.21"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
+
# For additional information regarding the format and rule options, please see:
|
|
3
|
+
# https://github.com/browserslist/browserslist#queries
|
|
4
|
+
|
|
5
|
+
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
+
# https://angular.io/guide/browser-support
|
|
7
|
+
|
|
8
|
+
# You can see what browsers were selected by your queries by running:
|
|
9
|
+
# npx browserslist
|
|
10
|
+
|
|
11
|
+
last 1 Chrome version
|
|
12
|
+
last 1 Firefox version
|
|
13
|
+
last 2 Edge major versions
|
|
14
|
+
last 2 Safari major versions
|
|
15
|
+
last 2 iOS major versions
|
|
16
|
+
Firefox ESR
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Sharedcomponents
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.1.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project sharedcomponents` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project sharedcomponents`.
|
|
8
|
+
> Note: Don't forget to add `--project sharedcomponents` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build sharedcomponents` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build sharedcomponents`, go to the dist folder `cd dist/sharedcomponents` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test sharedcomponents` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: '',
|
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
+
plugins: [
|
|
9
|
+
require('karma-jasmine'),
|
|
10
|
+
require('karma-chrome-launcher'),
|
|
11
|
+
require('karma-jasmine-html-reporter'),
|
|
12
|
+
require('karma-coverage'),
|
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
+
],
|
|
15
|
+
client: {
|
|
16
|
+
jasmine: {
|
|
17
|
+
// you can add configuration options for Jasmine here
|
|
18
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
19
|
+
// for example, you can disable the random execution with `random: false`
|
|
20
|
+
// or set a specific seed with `seed: 4321`
|
|
21
|
+
},
|
|
22
|
+
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
23
|
+
},
|
|
24
|
+
jasmineHtmlReporter: {
|
|
25
|
+
suppressAll: true // removes the duplicated traces
|
|
26
|
+
},
|
|
27
|
+
coverageReporter: {
|
|
28
|
+
dir: require('path').join(__dirname, '../../coverage/sharedcomponents'),
|
|
29
|
+
subdir: '.',
|
|
30
|
+
reporters: [
|
|
31
|
+
{ type: 'html' },
|
|
32
|
+
{ type: 'text-summary' }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
reporters: ['progress', 'kjhtml'],
|
|
36
|
+
port: 9876,
|
|
37
|
+
colors: true,
|
|
38
|
+
logLevel: config.LOG_INFO,
|
|
39
|
+
autoWatch: true,
|
|
40
|
+
browsers: ['Chrome'],
|
|
41
|
+
singleRun: false,
|
|
42
|
+
restartOnFileChange: true
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/sharedcomponents",
|
|
4
|
+
"allowedNonPeerDependencies": [
|
|
5
|
+
"."
|
|
6
|
+
],
|
|
7
|
+
"lib": {
|
|
8
|
+
"entryFile": "src/public-api.ts",
|
|
9
|
+
"styleIncludePaths": [
|
|
10
|
+
"../../node_modules/@syncfusion",
|
|
11
|
+
"../../node_modules/@colijnit"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"assets": [
|
|
15
|
+
"**/*.scss"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@colijnit/sharedcomponents",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^12.2.0",
|
|
7
|
+
"@angular/core": "^12.2.0",
|
|
8
|
+
"pdf-lib": "^1.17.1",
|
|
9
|
+
"pdfjs-dist": "^2.12.313",
|
|
10
|
+
"rxjs": "~7.4.0",
|
|
11
|
+
"signature_pad": "^4.0.2",
|
|
12
|
+
"tslib": "^2.3.0",
|
|
13
|
+
"zone.js": "~0.11.4"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output, ViewChild, ViewEncapsulation} from "@angular/core";
|
|
2
|
+
import SignaturePad from "signature_pad";
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: "ione-signature",
|
|
6
|
+
template: `
|
|
7
|
+
<div class="signature-wrapper">
|
|
8
|
+
<div class="signature-header">
|
|
9
|
+
<span *ngIf="title" class="title" [textContent]="title"></span>
|
|
10
|
+
<div class="button-wrapper">
|
|
11
|
+
<input type="button" (click)="handleSave($event)" [value]="saveButtonLabel"/>
|
|
12
|
+
<input type="button" (click)="handleClear($event)" [value]="clearButtonLabel">
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="canvas">
|
|
16
|
+
<canvas #signature></canvas>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
`,
|
|
20
|
+
encapsulation: ViewEncapsulation.None
|
|
21
|
+
})
|
|
22
|
+
export class SignatureComponent {
|
|
23
|
+
@ViewChild("signature", {read: ElementRef}) set content(content: ElementRef) {
|
|
24
|
+
if (content) {
|
|
25
|
+
this.signatureCanvas = content;
|
|
26
|
+
this._initCanvas();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@Input()
|
|
31
|
+
public title: string;
|
|
32
|
+
|
|
33
|
+
@Input()
|
|
34
|
+
public saveButtonLabel: string = 'SAVE';
|
|
35
|
+
|
|
36
|
+
@Input()
|
|
37
|
+
public clearButtonLabel: string = 'CLEAR';
|
|
38
|
+
|
|
39
|
+
@Output()
|
|
40
|
+
public save: EventEmitter<string> = new EventEmitter<string>();
|
|
41
|
+
|
|
42
|
+
@HostBinding("class.ione-signature")
|
|
43
|
+
public showClass() {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public signature: SignaturePad;
|
|
48
|
+
public signatureCanvas: ElementRef;
|
|
49
|
+
|
|
50
|
+
public handleSave(event: MouseEvent): void {
|
|
51
|
+
// save canvas as svg
|
|
52
|
+
// const sig: string = this.signature.toDataURL("image/svg+xml");
|
|
53
|
+
const sig: string = this.signature.toDataURL("image/png");
|
|
54
|
+
// emit signature string
|
|
55
|
+
this.save.next(sig);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public handleClear(event: MouseEvent): void {
|
|
59
|
+
if (this.signature) {
|
|
60
|
+
this.signature.clear();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private _initCanvas(): void {
|
|
65
|
+
if (this.signatureCanvas && this.signatureCanvas.nativeElement) {
|
|
66
|
+
this.signature = new SignaturePad(this.signatureCanvas.nativeElement);
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
this._resizeSignatureCanvas(this.signature, this.signatureCanvas);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private _resizeSignatureCanvas(signature: SignaturePad, signatureCanvas: ElementRef): void {
|
|
74
|
+
const imageBeforeResize: string = signature.toDataURL();
|
|
75
|
+
const ratio: number = Math.max(window.devicePixelRatio || 1, 1);
|
|
76
|
+
signatureCanvas.nativeElement.width = signatureCanvas.nativeElement.offsetWidth * ratio;
|
|
77
|
+
signatureCanvas.nativeElement.height = signatureCanvas.nativeElement.offsetHeight * ratio;
|
|
78
|
+
signatureCanvas.nativeElement.getContext("2d").scale(ratio, ratio);
|
|
79
|
+
signature.fromDataURL(imageBeforeResize);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|