@churchillliving/se-ui-toolkit 6.53.509 → 6.53.511
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/README.md +28 -28
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +19 -27
- package/src/assets/images/doc.png +0 -0
- package/src/assets/images/pdf-file.png +0 -0
- package/src/assets/images/xls.png +0 -0
- package/src/lib/components/base/alert-pop-up/alert-pop-up.component.css +1 -0
- package/src/lib/components/base/alert-pop-up/alert-pop-up.component.html +6 -0
- package/src/lib/components/base/alert-pop-up/alert-pop-up.component.ts +32 -0
- package/src/lib/components/base/caption/caption.component.html +10 -0
- package/src/lib/components/base/caption/caption.component.scss +50 -0
- package/src/lib/components/base/caption/caption.component.ts +78 -0
- package/src/lib/components/base/cards/card.component.html +62 -0
- package/src/lib/components/base/cards/card.component.scss +107 -0
- package/src/lib/components/base/cards/card.component.ts +152 -0
- package/src/lib/components/base/file/file.component.html +101 -0
- package/src/lib/components/base/file/file.component.scss +98 -0
- package/src/lib/components/base/file/file.component.ts +114 -0
- package/src/lib/components/base/file-upload/file-upload.component.html +11 -0
- package/src/lib/components/base/file-upload/file-upload.component.scss +1 -0
- package/src/lib/components/base/file-upload/file-upload.component.ts +66 -0
- package/src/lib/components/base/filter/filter.component.html +9 -0
- package/src/lib/components/base/filter/filter.component.ts +46 -0
- package/src/lib/components/base/form/form.component.html +663 -0
- package/src/lib/components/base/form/form.component.scss +276 -0
- package/src/lib/components/base/form/form.component.ts +1262 -0
- package/src/lib/components/base/grid/grid.component.html +833 -0
- package/src/lib/components/base/grid/grid.component.scss +194 -0
- package/src/lib/components/base/grid/grid.component.ts +2876 -0
- package/src/lib/components/base/grid/grid.constant.ts +26 -0
- package/src/lib/components/base/grid-row-actions/grid-row-actions.component.html +42 -0
- package/src/lib/components/base/grid-row-actions/grid-row-actions.component.scss +3 -0
- package/src/lib/components/base/grid-row-actions/grid-row-actions.component.ts +51 -0
- package/src/lib/components/base/header/header.component.html +176 -0
- package/src/lib/components/base/header/header.component.scss +65 -0
- package/src/lib/components/base/header/header.component.ts +96 -0
- package/src/lib/components/base/iframe/iframe.component.html +1 -0
- package/src/lib/components/base/iframe/iframe.component.scss +4 -0
- package/src/lib/components/base/iframe/iframe.component.ts +49 -0
- package/src/lib/components/base/image-gallery/image-gallery.component.css +21 -0
- package/src/lib/components/base/image-gallery/image-gallery.component.html +16 -0
- package/src/lib/components/base/image-gallery/image-gallery.component.ts +29 -0
- package/src/lib/components/base/loader/loader.component.html +11 -0
- package/src/lib/components/base/loader/loader.component.scss +26 -0
- package/src/lib/components/base/loader/loader.component.ts +35 -0
- package/src/lib/components/base/menu-bar/menu-bar.component.html +42 -0
- package/src/lib/components/base/menu-bar/menu-bar.component.scss +165 -0
- package/src/lib/components/base/menu-bar/menu-bar.component.ts +135 -0
- package/src/lib/components/base/report/report-Filter/report-filter/report-filter.component.html +7 -0
- package/src/lib/components/base/report/report-Filter/report-filter/report-filter.component.scss +0 -0
- package/src/lib/components/base/report/report-Filter/report-filter/report-filter.component.ts +124 -0
- package/src/lib/components/base/report/reportGenerateBtn/generate-report-btn/generate-report-btn.component.html +8 -0
- package/src/lib/components/base/report/reportGenerateBtn/generate-report-btn/generate-report-btn.component.scss +0 -0
- package/src/lib/components/base/report/reportGenerateBtn/generate-report-btn/generate-report-btn.component.ts +28 -0
- package/src/lib/components/base/sidebar/sidebar.component.html +25 -0
- package/src/lib/components/base/sidebar/sidebar.component.scss +178 -0
- package/src/lib/components/base/sidebar/sidebar.component.ts +348 -0
- package/src/lib/components/shared/dropdown/dropdown.component.html +5 -0
- package/src/lib/components/shared/dropdown/dropdown.component.scss +0 -0
- package/src/lib/components/shared/dropdown/dropdown.component.ts +38 -0
- package/src/lib/components/shared/filter-menu/filter-menu.component.html +6 -0
- package/src/lib/components/shared/filter-menu/filter-menu.component.scss +34 -0
- package/src/lib/components/shared/filter-menu/filter-menu.component.ts +29 -0
- package/src/lib/components/shared/global-filters/global-filters.component.html +393 -0
- package/src/lib/components/shared/global-filters/global-filters.component.scss +125 -0
- package/src/lib/components/shared/global-filters/global-filters.component.ts +556 -0
- package/src/lib/components/shared/notes/notes.component.html +36 -0
- package/src/lib/components/shared/notes/notes.component.scss +6 -0
- package/src/lib/components/shared/notes/notes.component.ts +30 -0
- package/src/lib/directive/add-row.directive.ts +32 -0
- package/{lib/models/common.model.d.ts → src/lib/models/common.model.ts} +10 -9
- package/src/lib/models/form.model.ts +382 -0
- package/src/lib/models/grid.model.ts +542 -0
- package/src/lib/models/header.model.ts +85 -0
- package/{lib/models/menu.model.d.ts → src/lib/models/menu.model.ts} +8 -7
- package/src/lib/models/request.model.ts +15 -0
- package/src/lib/models/response.model.ts +11 -0
- package/src/lib/models/sidebar.model.ts +48 -0
- package/{lib/models/user-info.model.d.ts → src/lib/models/user-info.model.ts} +29 -25
- package/src/lib/se-ui-toolkit.module.ts +156 -0
- package/src/lib/services/alert.service.ts +87 -0
- package/src/lib/services/authentication.service.ts +49 -0
- package/src/lib/services/card.service.ts +106 -0
- package/src/lib/services/dropdown.service.ts +73 -0
- package/src/lib/services/form.service.ts +532 -0
- package/src/lib/services/grid.service.ts +1597 -0
- package/src/lib/services/header.service.ts +64 -0
- package/src/lib/services/hyperlink.service.ts +167 -0
- package/src/lib/services/loader.service.ts +33 -0
- package/src/lib/services/page-logger.service.ts +22 -0
- package/src/lib/services/report.service.ts +167 -0
- package/src/lib/services/request.service.ts +48 -0
- package/src/lib/services/sidebar.service.ts +65 -0
- package/src/lib/services/utilities.service.ts +1281 -0
- package/src/lib/shared/style.scss +29 -0
- package/{public-api.d.ts → src/public-api.ts} +62 -54
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/bundles/churchillliving-se-ui-toolkit.umd.js +0 -10767
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +0 -1
- package/churchillliving-se-ui-toolkit.d.ts +0 -9
- package/churchillliving-se-ui-toolkit.metadata.json +0 -1
- package/esm2015/churchillliving-se-ui-toolkit.js +0 -10
- package/esm2015/lib/components/base/alert-pop-up/alert-pop-up.component.js +0 -36
- package/esm2015/lib/components/base/caption/caption.component.js +0 -75
- package/esm2015/lib/components/base/cards/card.component.js +0 -157
- package/esm2015/lib/components/base/file/file.component.js +0 -114
- package/esm2015/lib/components/base/file-upload/file-upload.component.js +0 -74
- package/esm2015/lib/components/base/filter/filter.component.js +0 -54
- package/esm2015/lib/components/base/form/form.component.js +0 -1142
- package/esm2015/lib/components/base/grid/grid.component.js +0 -2657
- package/esm2015/lib/components/base/grid/grid.constant.js +0 -26
- package/esm2015/lib/components/base/grid-row-actions/grid-row-actions.component.js +0 -48
- package/esm2015/lib/components/base/header/header.component.js +0 -99
- package/esm2015/lib/components/base/iframe/iframe.component.js +0 -46
- package/esm2015/lib/components/base/image-gallery/image-gallery.component.js +0 -33
- package/esm2015/lib/components/base/loader/loader.component.js +0 -39
- package/esm2015/lib/components/base/menu-bar/menu-bar.component.js +0 -120
- package/esm2015/lib/components/base/report/report-Filter/report-filter/report-filter.component.js +0 -132
- package/esm2015/lib/components/base/report/reportGenerateBtn/generate-report-btn/generate-report-btn.component.js +0 -31
- package/esm2015/lib/components/base/sidebar/sidebar.component.js +0 -346
- package/esm2015/lib/components/shared/dropdown/dropdown.component.js +0 -36
- package/esm2015/lib/components/shared/filter-menu/filter-menu.component.js +0 -31
- package/esm2015/lib/components/shared/global-filters/global-filters.component.js +0 -472
- package/esm2015/lib/components/shared/notes/notes.component.js +0 -34
- package/esm2015/lib/directive/add-row.directive.js +0 -25
- package/esm2015/lib/models/common.model.js +0 -2
- package/esm2015/lib/models/form.model.js +0 -97
- package/esm2015/lib/models/grid.model.js +0 -121
- package/esm2015/lib/models/header.model.js +0 -19
- package/esm2015/lib/models/menu.model.js +0 -2
- package/esm2015/lib/models/request.model.js +0 -2
- package/esm2015/lib/models/response.model.js +0 -2
- package/esm2015/lib/models/sidebar.model.js +0 -11
- package/esm2015/lib/models/user-info.model.js +0 -9
- package/esm2015/lib/se-ui-toolkit.module.js +0 -152
- package/esm2015/lib/services/alert.service.js +0 -80
- package/esm2015/lib/services/authentication.service.js +0 -50
- package/esm2015/lib/services/card.service.js +0 -106
- package/esm2015/lib/services/dropdown.service.js +0 -72
- package/esm2015/lib/services/form.service.js +0 -469
- package/esm2015/lib/services/grid.service.js +0 -1370
- package/esm2015/lib/services/header.service.js +0 -61
- package/esm2015/lib/services/hyperlink.service.js +0 -159
- package/esm2015/lib/services/loader.service.js +0 -36
- package/esm2015/lib/services/page-logger.service.js +0 -28
- package/esm2015/lib/services/report.service.js +0 -168
- package/esm2015/lib/services/request.service.js +0 -49
- package/esm2015/lib/services/sidebar.service.js +0 -64
- package/esm2015/lib/services/utilities.service.js +0 -1078
- package/esm2015/public-api.js +0 -58
- package/fesm2015/churchillliving-se-ui-toolkit.js +0 -9834
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +0 -1
- package/lib/components/base/alert-pop-up/alert-pop-up.component.d.ts +0 -12
- package/lib/components/base/caption/caption.component.d.ts +0 -21
- package/lib/components/base/cards/card.component.d.ts +0 -28
- package/lib/components/base/file/file.component.d.ts +0 -26
- package/lib/components/base/file-upload/file-upload.component.d.ts +0 -16
- package/lib/components/base/filter/filter.component.d.ts +0 -21
- package/lib/components/base/form/form.component.d.ts +0 -170
- package/lib/components/base/grid/grid.component.d.ts +0 -390
- package/lib/components/base/grid/grid.constant.d.ts +0 -2
- package/lib/components/base/grid-row-actions/grid-row-actions.component.d.ts +0 -20
- package/lib/components/base/header/header.component.d.ts +0 -17
- package/lib/components/base/iframe/iframe.component.d.ts +0 -15
- package/lib/components/base/image-gallery/image-gallery.component.d.ts +0 -6
- package/lib/components/base/loader/loader.component.d.ts +0 -13
- package/lib/components/base/menu-bar/menu-bar.component.d.ts +0 -33
- package/lib/components/base/report/report-Filter/report-filter/report-filter.component.d.ts +0 -22
- package/lib/components/base/report/reportGenerateBtn/generate-report-btn/generate-report-btn.component.d.ts +0 -14
- package/lib/components/base/sidebar/sidebar.component.d.ts +0 -65
- package/lib/components/shared/dropdown/dropdown.component.d.ts +0 -13
- package/lib/components/shared/filter-menu/filter-menu.component.d.ts +0 -11
- package/lib/components/shared/global-filters/global-filters.component.d.ts +0 -82
- package/lib/components/shared/notes/notes.component.d.ts +0 -12
- package/lib/directive/add-row.directive.d.ts +0 -7
- package/lib/models/form.model.d.ts +0 -348
- package/lib/models/grid.model.d.ts +0 -491
- package/lib/models/header.model.d.ts +0 -72
- package/lib/models/request.model.d.ts +0 -13
- package/lib/models/response.model.d.ts +0 -10
- package/lib/models/sidebar.model.d.ts +0 -44
- package/lib/se-ui-toolkit.module.d.ts +0 -7
- package/lib/services/alert.service.d.ts +0 -22
- package/lib/services/authentication.service.d.ts +0 -8
- package/lib/services/card.service.d.ts +0 -17
- package/lib/services/dropdown.service.d.ts +0 -15
- package/lib/services/form.service.d.ts +0 -47
- package/lib/services/grid.service.d.ts +0 -119
- package/lib/services/header.service.d.ts +0 -11
- package/lib/services/hyperlink.service.d.ts +0 -16
- package/lib/services/loader.service.d.ts +0 -18
- package/lib/services/page-logger.service.d.ts +0 -6
- package/lib/services/report.service.d.ts +0 -18
- package/lib/services/request.service.d.ts +0 -16
- package/lib/services/sidebar.service.d.ts +0 -18
- package/lib/services/utilities.service.d.ts +0 -64
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# SeUiToolkit
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.4.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project se-ui-toolkit` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project se-ui-toolkit`.
|
|
8
|
-
> Note: Don't forget to add `--project se-ui-toolkit` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build se-ui-toolkit` 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 se-ui-toolkit`, go to the dist folder `cd dist/se-ui-toolkit` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test se-ui-toolkit` 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.
|
|
25
|
-
|
|
26
|
-
## Library Publish Command
|
|
27
|
-
|
|
28
|
-
run `npm run publish-toolkit` to publish the npm package
|
|
1
|
+
# SeUiToolkit
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.4.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project se-ui-toolkit` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project se-ui-toolkit`.
|
|
8
|
+
> Note: Don't forget to add `--project se-ui-toolkit` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build se-ui-toolkit` 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 se-ui-toolkit`, go to the dist folder `cd dist/se-ui-toolkit` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test se-ui-toolkit` 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.
|
|
25
|
+
|
|
26
|
+
## Library Publish Command
|
|
27
|
+
|
|
28
|
+
run `npm run publish-toolkit` to publish the npm package
|
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/se-ui-toolkit'),
|
|
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/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@churchillliving/se-ui-toolkit",
|
|
3
|
-
"version": "6.53.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "
|
|
6
|
-
"@angular/core": "
|
|
7
|
-
"jspdf": "^2.3.1",
|
|
8
|
-
"file-saver": "^2.0.5",
|
|
9
|
-
"primeicons": "^4.1.0",
|
|
10
|
-
"primeng": "^13.0.4",
|
|
11
|
-
"xlsx": "^0.17.0",
|
|
12
|
-
"primeflex": "^2.0.0",
|
|
13
|
-
"@angular/cdk": "^12.0.4",
|
|
14
|
-
"ngx-toastr": "^14.0.0"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"tslib": "^2.0.0"
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
"module": "fesm2015/churchillliving-se-ui-toolkit.js",
|
|
21
|
-
"es2015": "fesm2015/churchillliving-se-ui-toolkit.js",
|
|
22
|
-
"esm2015": "esm2015/churchillliving-se-ui-toolkit.js",
|
|
23
|
-
"fesm2015": "fesm2015/churchillliving-se-ui-toolkit.js",
|
|
24
|
-
"typings": "churchillliving-se-ui-toolkit.d.ts",
|
|
25
|
-
"metadata": "churchillliving-se-ui-toolkit.metadata.json",
|
|
26
|
-
"sideEffects": false
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@churchillliving/se-ui-toolkit",
|
|
3
|
+
"version": "6.53.511",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "~14.3.0",
|
|
6
|
+
"@angular/core": "~14.3.0",
|
|
7
|
+
"jspdf": "^2.3.1",
|
|
8
|
+
"file-saver": "^2.0.5",
|
|
9
|
+
"primeicons": "^4.1.0",
|
|
10
|
+
"primeng": "^13.0.4",
|
|
11
|
+
"xlsx": "^0.17.0",
|
|
12
|
+
"primeflex": "^2.0.0",
|
|
13
|
+
"@angular/cdk": "^12.0.4",
|
|
14
|
+
"ngx-toastr": "^14.0.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"tslib": "^2.0.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* FOR FUNCTIONALITY USE ONLY! */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<h4><i [class]="icon"></i> {{message}}</h4>
|
|
2
|
+
<br>
|
|
3
|
+
<button *ngFor="let button of buttons" pButton type="button" [label]="button.buttonLabel"
|
|
4
|
+
[class]="button.buttonClass ? button.buttonClass+ ' p-mr-3' : 'p-mr-3 p-button-success'"
|
|
5
|
+
(click)="clickedBtn(button)">
|
|
6
|
+
</button>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component, OnInit, Optional } from '@angular/core';
|
|
2
|
+
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'lib-alert-pop-up',
|
|
6
|
+
templateUrl: './alert-pop-up.component.html',
|
|
7
|
+
styleUrls: ['./alert-pop-up.component.css']
|
|
8
|
+
})
|
|
9
|
+
export class AlertPopUpComponent implements OnInit {
|
|
10
|
+
buttons: any[]
|
|
11
|
+
message: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
|
|
14
|
+
constructor(@Optional() public config: DynamicDialogConfig,
|
|
15
|
+
@Optional() public ref: DynamicDialogRef,) { }
|
|
16
|
+
|
|
17
|
+
ngOnInit(): void {
|
|
18
|
+
if(this.config?.data){
|
|
19
|
+
this.message = this.config.data?.alertPopInfo?.message;
|
|
20
|
+
this.buttons = this.config.data?.alertPopInfo?.buttons;
|
|
21
|
+
this.icon = this.config.data?.alertPopInfo?.icon;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
clickedBtn(button: any){
|
|
26
|
+
const closeBtn = document.querySelectorAll(".alertPopUp button")[0] as HTMLButtonElement;
|
|
27
|
+
if(closeBtn){
|
|
28
|
+
closeBtn?.click();
|
|
29
|
+
this.ref.close(button);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* FOR FUNCTIONALITY USE ONLY! */
|
|
2
|
+
|
|
3
|
+
// :host ::ng-deep {
|
|
4
|
+
// .p-accordion .p-accordion-content {
|
|
5
|
+
// border: 0;
|
|
6
|
+
// padding: 0 10px;
|
|
7
|
+
// }
|
|
8
|
+
|
|
9
|
+
// .p-accordion-content div:first-child {
|
|
10
|
+
// padding: 0;
|
|
11
|
+
// }
|
|
12
|
+
|
|
13
|
+
// .caption-form {
|
|
14
|
+
// span div {
|
|
15
|
+
// flex-direction: row !important;
|
|
16
|
+
// align-items: center;
|
|
17
|
+
// }
|
|
18
|
+
|
|
19
|
+
// span div span {
|
|
20
|
+
// margin-right: 10px;
|
|
21
|
+
// width: 100px;
|
|
22
|
+
// }
|
|
23
|
+
|
|
24
|
+
// div input {
|
|
25
|
+
// width: 100%;
|
|
26
|
+
// }
|
|
27
|
+
|
|
28
|
+
// .sticky {
|
|
29
|
+
// bottom: 15px;
|
|
30
|
+
// width: unset !important;
|
|
31
|
+
// right: 25px !important;
|
|
32
|
+
// }
|
|
33
|
+
|
|
34
|
+
// .fixed-height {
|
|
35
|
+
// height: unset;
|
|
36
|
+
// }
|
|
37
|
+
|
|
38
|
+
// span.error {
|
|
39
|
+
// display: none;
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
42
|
+
// }
|
|
43
|
+
|
|
44
|
+
:host ::ng-deep {
|
|
45
|
+
.caption-form {
|
|
46
|
+
span.error {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Component, EventEmitter, OnInit, Optional, Output } from '@angular/core';
|
|
2
|
+
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
|
+
import { EValidator, IDynamicForm } from '../../../models/form.model';
|
|
4
|
+
import { AlertService } from '../../../services/alert.service';
|
|
5
|
+
import { FormService } from '../../../services/form.service';
|
|
6
|
+
import { RequestService } from '../../../services/request.service';
|
|
7
|
+
import * as utilities from '../../../services/utilities.service';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'se-caption',
|
|
11
|
+
templateUrl: './caption.component.html',
|
|
12
|
+
styleUrls: ['./caption.component.scss'],
|
|
13
|
+
})
|
|
14
|
+
export class CaptionComponent implements OnInit {
|
|
15
|
+
dynamicForm: IDynamicForm;
|
|
16
|
+
id: number;
|
|
17
|
+
caption: string;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
private formService: FormService,
|
|
21
|
+
private requestService: RequestService,
|
|
22
|
+
private alertService: AlertService,
|
|
23
|
+
@Optional() public config: DynamicDialogConfig,
|
|
24
|
+
@Optional() public ref: DynamicDialogRef
|
|
25
|
+
) {}
|
|
26
|
+
|
|
27
|
+
ngOnInit(): void {
|
|
28
|
+
if (this.config.data) {
|
|
29
|
+
this.id = this.config.data.id;
|
|
30
|
+
this.caption = this.config.data.caption;
|
|
31
|
+
}
|
|
32
|
+
this.initilizeForm();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
initilizeForm() {
|
|
36
|
+
this.dynamicForm = {
|
|
37
|
+
formSections: [
|
|
38
|
+
{
|
|
39
|
+
fields: [
|
|
40
|
+
this.formService.addTextbox({
|
|
41
|
+
field: 'fileCaption',
|
|
42
|
+
label: 'Caption',
|
|
43
|
+
value: this.caption,
|
|
44
|
+
column: 12,
|
|
45
|
+
validations: [{ type: EValidator.REQUIRED }]
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
saveForm(formFiels: any) {
|
|
54
|
+
this.requestService
|
|
55
|
+
.get<any[], any>('/AzureUpload/UpdateCaption', {
|
|
56
|
+
Id: this.id,
|
|
57
|
+
fileCaption: utilities.getFormFieldValue(
|
|
58
|
+
this.dynamicForm,
|
|
59
|
+
'fileCaption'
|
|
60
|
+
),
|
|
61
|
+
})
|
|
62
|
+
.subscribe(
|
|
63
|
+
(response: any) => {
|
|
64
|
+
if (response) {
|
|
65
|
+
this.alertService.success('Caption added successfully.');
|
|
66
|
+
this.ref.close(response);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
({ error }) => {
|
|
70
|
+
this.ref.close();
|
|
71
|
+
this.alertService.apiError(error);
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
cancelForm(event: any) {
|
|
76
|
+
//console.log('CancelForm: ', event);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- Display Files Card -->
|
|
2
|
+
<p-confirmDialog key="handlecolumnActions"></p-confirmDialog>
|
|
3
|
+
<div
|
|
4
|
+
cdkDropList
|
|
5
|
+
cdkDropListOrientation="horizontal"
|
|
6
|
+
class="example-list"
|
|
7
|
+
(cdkDropListDropped)="dragAndDrop($event)"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="p-d-flex cards-wrapper"
|
|
11
|
+
[ngStyle]="{ width: width, height: height }"
|
|
12
|
+
*ngIf="data"
|
|
13
|
+
[class]="card && card.class ? card.class : ''">
|
|
14
|
+
<div
|
|
15
|
+
cdkDrag
|
|
16
|
+
class="example-box p-d-flex p-flex-column cards-wrapper"
|
|
17
|
+
[class]="
|
|
18
|
+
card && card.width && card.width.length > 0
|
|
19
|
+
? 'p-col-' + card.width
|
|
20
|
+
: 'p-col-3'
|
|
21
|
+
"
|
|
22
|
+
*ngFor="let file of data; let i = index"
|
|
23
|
+
(click)="onClickEvent(file,i)"
|
|
24
|
+
[ngClass]="file.selectedCard ? file.selectedCard : ''"
|
|
25
|
+
>
|
|
26
|
+
<!-- start cards image functionality -->
|
|
27
|
+
<se-file
|
|
28
|
+
[url]="file.blobfileurl"
|
|
29
|
+
[type]="file.fileextension"
|
|
30
|
+
[caption]="file?.filecaption"
|
|
31
|
+
[height]="card?.height"
|
|
32
|
+
[allowDownloadFile]="card?.allowDownload"
|
|
33
|
+
[allowEditableCaption]="card?.allowEditableCaption"
|
|
34
|
+
[allowDeleteFile]="card?.allowDelete"
|
|
35
|
+
[name]="file.blobfileurl"
|
|
36
|
+
[id]="file.fileextension"
|
|
37
|
+
(onDeleteEvent)="deleteImage($event)"
|
|
38
|
+
(onSaveEvent)="saveCaption($event)"
|
|
39
|
+
></se-file>
|
|
40
|
+
<!-- End cards image functionality -->
|
|
41
|
+
|
|
42
|
+
<!-- start form functionality in card -->
|
|
43
|
+
<se-form
|
|
44
|
+
class="form-content"
|
|
45
|
+
[form]="file.dynamicform"
|
|
46
|
+
[hideSaveButton]="true"
|
|
47
|
+
[hideCancelButton]="true"
|
|
48
|
+
></se-form>
|
|
49
|
+
<!-- End form functionality in card -->
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<!-- in case of form and data is empty or null -->
|
|
54
|
+
<div *ngIf="dynamicForm && (!data || data.length == 0)">
|
|
55
|
+
<se-form
|
|
56
|
+
*ngIf="dynamicForm"
|
|
57
|
+
[form]="dynamicForm"
|
|
58
|
+
[hideSaveButton]="true"
|
|
59
|
+
[hideCancelButton]="true"
|
|
60
|
+
></se-form>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* FOR FUNCTIONALITY USE ONLY! */
|
|
2
|
+
:host ::ng-deep {
|
|
3
|
+
.custom-card {
|
|
4
|
+
.action-buttons {
|
|
5
|
+
// display: flex;
|
|
6
|
+
// justify-content: flex-end;
|
|
7
|
+
// background-color: #eee;
|
|
8
|
+
// position: absolute;
|
|
9
|
+
// top: 0;
|
|
10
|
+
// left: 0;
|
|
11
|
+
// width: 100%;
|
|
12
|
+
visibility: hidden;
|
|
13
|
+
}
|
|
14
|
+
// .p-card-body {
|
|
15
|
+
// padding: 0;
|
|
16
|
+
// }
|
|
17
|
+
// .p-card-content {
|
|
18
|
+
// padding: 0;
|
|
19
|
+
// }
|
|
20
|
+
// .p-button.p-button-icon-only {
|
|
21
|
+
// padding: 5px;
|
|
22
|
+
// height: unset;
|
|
23
|
+
// }
|
|
24
|
+
.image-wrapper:hover .action-buttons {
|
|
25
|
+
visibility: visible;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// .form-content .fixed-height {
|
|
29
|
+
// height: unset !important;
|
|
30
|
+
// }
|
|
31
|
+
// .p-accordion-content {
|
|
32
|
+
// border: 1px solid lightgray;
|
|
33
|
+
// border-top: 1px solid lightgray;
|
|
34
|
+
// border-radius: 10px !important;
|
|
35
|
+
// box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2),
|
|
36
|
+
// 1px 1px 1px inset rgba(0, 0, 0, 0.2);
|
|
37
|
+
// }
|
|
38
|
+
// .card-active .p-accordion-content{
|
|
39
|
+
// background: #eee !important;
|
|
40
|
+
// }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// .cards-wrapper {
|
|
44
|
+
// padding: 10px;
|
|
45
|
+
// overflow: auto;
|
|
46
|
+
// }
|
|
47
|
+
// .custom-card {
|
|
48
|
+
// width: 100%;
|
|
49
|
+
// height: 400px;
|
|
50
|
+
// .image-wrapper {
|
|
51
|
+
// position: relative;
|
|
52
|
+
// img {
|
|
53
|
+
// width: 100%;
|
|
54
|
+
// height: 300px;
|
|
55
|
+
// }
|
|
56
|
+
// }
|
|
57
|
+
// h4 {
|
|
58
|
+
// margin: auto;
|
|
59
|
+
// text-align: center;
|
|
60
|
+
// width: 90%;
|
|
61
|
+
// height: 27px;
|
|
62
|
+
// padding-bottom: 6px;
|
|
63
|
+
// overflow: hidden;
|
|
64
|
+
// white-space: nowrap;
|
|
65
|
+
// text-overflow: ellipsis;
|
|
66
|
+
// }
|
|
67
|
+
// }
|
|
68
|
+
|
|
69
|
+
.cdk-drag-preview {
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
73
|
+
0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.cdk-drag-placeholder {
|
|
77
|
+
opacity: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.cdk-drag-animating {
|
|
81
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// .example-box:last-child {
|
|
85
|
+
// border: none;
|
|
86
|
+
// }
|
|
87
|
+
// .example-list span {
|
|
88
|
+
// height: unset !important;
|
|
89
|
+
// }
|
|
90
|
+
|
|
91
|
+
.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) {
|
|
92
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// .header-icons{
|
|
96
|
+
// background-color: #eee;
|
|
97
|
+
// text-align: right;
|
|
98
|
+
// opacity: 0;
|
|
99
|
+
// }
|
|
100
|
+
.example-box:hover .header-icons{
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
.card-active{
|
|
104
|
+
transform: scale(1.1);
|
|
105
|
+
transition: all .2s linear;
|
|
106
|
+
z-index: 999;
|
|
107
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
3
|
+
import { IDynamicCard, IDynamicForm, IViewCardProp } from '../../../models/form.model';
|
|
4
|
+
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
5
|
+
import { GridService } from '../../../services/grid.service';
|
|
6
|
+
import * as utilities from '../../../services/utilities.service';
|
|
7
|
+
import { ConfirmationService } from 'primeng/api';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'se-card',
|
|
11
|
+
templateUrl: './card.component.html',
|
|
12
|
+
styleUrls: ['./card.component.scss'],
|
|
13
|
+
})
|
|
14
|
+
export class CardComponent implements OnInit {
|
|
15
|
+
@Output() selectedCard: EventEmitter<any> = new EventEmitter();
|
|
16
|
+
// @Output() onDeleteCard: EventEmitter<any> = new EventEmitter();
|
|
17
|
+
@Input() data: any = [];
|
|
18
|
+
@Input() width: string = '';
|
|
19
|
+
@Input() height: string = '';
|
|
20
|
+
@Input() card: any;
|
|
21
|
+
@Input() setCardData: boolean;
|
|
22
|
+
dynamicForm: IDynamicForm;
|
|
23
|
+
showFiles: boolean = false;
|
|
24
|
+
displayCardInfo: IViewCardProp;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
public dialogService: DialogService,
|
|
28
|
+
private gridService: GridService,
|
|
29
|
+
private confirmationService: ConfirmationService
|
|
30
|
+
) {}
|
|
31
|
+
|
|
32
|
+
ngOnInit(): void {}
|
|
33
|
+
|
|
34
|
+
ngOnChanges() {
|
|
35
|
+
if (this.card) {
|
|
36
|
+
let { data, formSections, cardInfo }: any = this.card;
|
|
37
|
+
if(cardInfo && Object.keys(cardInfo).length){
|
|
38
|
+
this.displayCardInfo = cardInfo;
|
|
39
|
+
data = this.gridService.setDataFields(data);
|
|
40
|
+
const newArr = [];
|
|
41
|
+
data?.forEach((record)=>{
|
|
42
|
+
if(!Object.keys(record)?.includes('azurecontainerid')){
|
|
43
|
+
newArr.push({...record, blobfileurl: record[cardInfo.url?.toLowerCase()], filecaption: record[cardInfo.caption?.toLowerCase()], fileextension: record[cardInfo.extension?.toLowerCase()]});
|
|
44
|
+
} else {
|
|
45
|
+
newArr.push(record);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
this.data = newArr;
|
|
49
|
+
} else {
|
|
50
|
+
this.data = this.gridService.setDataFields(data);
|
|
51
|
+
}
|
|
52
|
+
this.dynamicForm = { formSections };
|
|
53
|
+
// set the default value of allowDelete, allowEditableCaption and allowDownload
|
|
54
|
+
this.setCardPropValue('allowDownload');
|
|
55
|
+
this.setCardPropValue('allowDelete');
|
|
56
|
+
this.setCardPropValue('allowEditableCaption');
|
|
57
|
+
//files.allowEditableCaption = this.setCardPropValue(files.allowEditableCaption);
|
|
58
|
+
/** In case of when we are using this component for stand alone then if formSection is exist in
|
|
59
|
+
the this.card and then add in the data array.
|
|
60
|
+
*/
|
|
61
|
+
if (this.data) {
|
|
62
|
+
this.data.forEach((x: any) => {
|
|
63
|
+
if (!x.dynamicform) {
|
|
64
|
+
x.dynamicform = JSON.parse(JSON.stringify(this.dynamicForm));
|
|
65
|
+
}
|
|
66
|
+
utilities.setCardFieldsData(x);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// set the default value of allowDelete, allowEditableCaption and allowDownload
|
|
73
|
+
setCardPropValue(prop:string){
|
|
74
|
+
if(!this.card[prop]?.toString()?.length) {
|
|
75
|
+
this.card[prop]= true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
dragAndDrop(event: any) {
|
|
80
|
+
moveItemInArray(this.data, event.previousIndex, event.currentIndex);
|
|
81
|
+
event.item?.element?.nativeElement;
|
|
82
|
+
this.card.data = this.data;
|
|
83
|
+
this.card['change'] = true;
|
|
84
|
+
if (this.card && this.card.onSort) {
|
|
85
|
+
this.card.onSort(this.data);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
deleteImage(event: any) {
|
|
90
|
+
this.confirmationService.confirm({
|
|
91
|
+
message: 'Are you sure that you want to delete this Image?',
|
|
92
|
+
header: 'Delete Confirmation',
|
|
93
|
+
icon: 'pi pi-exclamation-triangle',
|
|
94
|
+
key: 'handlecolumnActions',
|
|
95
|
+
accept: () => {
|
|
96
|
+
if (this.data && event) {
|
|
97
|
+
let arr = [...this.data];
|
|
98
|
+
const index = arr.findIndex(
|
|
99
|
+
(i) => i.blobfileurl === event.blobfileurl
|
|
100
|
+
);
|
|
101
|
+
let obj = arr[index];
|
|
102
|
+
arr.splice(index, 1);
|
|
103
|
+
this.data = [...arr];
|
|
104
|
+
|
|
105
|
+
if (this.card && this.card.onDelete) {
|
|
106
|
+
obj = this.replacePropName(obj);
|
|
107
|
+
this.card.onDelete(obj);
|
|
108
|
+
// this.onDeleteCard.emit();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
this.confirmationService.close();
|
|
112
|
+
},
|
|
113
|
+
reject: () => {
|
|
114
|
+
this.confirmationService.close();
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
replacePropName(cardInfo:any){
|
|
120
|
+
if(this.displayCardInfo && Object.keys(this.displayCardInfo).length > 0){
|
|
121
|
+
const cardProp = {...this.displayCardInfo};
|
|
122
|
+
const obj = {...cardInfo,[cardProp.url]: cardInfo.blobfileurl,[cardProp.caption]: cardInfo.filecaption,[cardProp.extension]: cardInfo.fileextension};
|
|
123
|
+
return obj;
|
|
124
|
+
} else {
|
|
125
|
+
return cardInfo;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
saveCaption(event: any) {
|
|
130
|
+
if (this.data && event) {
|
|
131
|
+
let arr = [...this.data];
|
|
132
|
+
const index = arr.findIndex((i) => i.blobfileurl === event.blobfileurl);
|
|
133
|
+
let obj = arr[index];
|
|
134
|
+
if (index !== -1) {
|
|
135
|
+
obj.filecaption = event.caption;
|
|
136
|
+
arr.splice(index, 1, obj);
|
|
137
|
+
this.card.data = arr;
|
|
138
|
+
this.card['change'] = true;
|
|
139
|
+
}
|
|
140
|
+
if (this.card && this.card?.onCaptionSave) {
|
|
141
|
+
obj = this.replacePropName(obj);
|
|
142
|
+
this.card.onCaptionSave(obj);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
onClickEvent(data: any, index: number){
|
|
148
|
+
data['index'] = index;
|
|
149
|
+
this.selectedCard.emit(data);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
}
|