@unifylib/ui-lib 1.1.3 → 1.1.4
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/esm2022/iq-ui-lib.mjs +5 -0
- package/esm2022/lib/base-model/SearchStrConfig.mjs +11 -0
- package/esm2022/lib/base-model/api-response.mjs +2 -0
- package/esm2022/lib/base-model/audit-log-entry.mjs +3 -0
- package/esm2022/lib/base-model/button-action-settings.mjs +16 -0
- package/esm2022/lib/base-model/column-def.model.mjs +28 -0
- package/esm2022/lib/base-model/do-action-request.mjs +8 -0
- package/esm2022/lib/base-model/field-action.mjs +6 -0
- package/esm2022/lib/base-model/field-filter.model.mjs +3 -0
- package/esm2022/lib/base-model/field-info.mjs +57 -0
- package/esm2022/lib/base-model/field-predicate.model.mjs +10 -0
- package/esm2022/lib/base-model/filter-request.mjs +13 -0
- package/esm2022/lib/base-model/filter.model.mjs +25 -0
- package/esm2022/lib/base-model/get-items-list.mjs +10 -0
- package/esm2022/lib/base-model/index.mjs +12 -0
- package/esm2022/lib/base-model/items-total.model.mjs +8 -0
- package/esm2022/lib/base-model/line-item.model.mjs +11 -0
- package/esm2022/lib/base-model/lookupItem.mjs +16 -0
- package/esm2022/lib/base-model/page-info.mjs +17 -0
- package/esm2022/lib/base-model/report-request.model.mjs +17 -0
- package/esm2022/lib/base-model/response-envelop.model.mjs +10 -0
- package/esm2022/lib/base-model/snack-message.model.mjs +11 -0
- package/esm2022/lib/base-model/table-column.interface.mjs +2 -0
- package/esm2022/lib/base-model/table-page-user-action.interface.mjs +21 -0
- package/esm2022/lib/base-model/workflow/workflow-steps.model.mjs +9 -0
- package/esm2022/lib/base-model/workflow/workflow.model.mjs +42 -0
- package/esm2022/lib/components/action-comment/action-comment.component.mjs +101 -0
- package/esm2022/lib/components/action-confirmation/action-confirmation.component.mjs +55 -0
- package/esm2022/lib/components/activity-report-form/activity-report-form.component.mjs +499 -0
- package/esm2022/lib/components/advanced-filter/field-filter/field-filter.component.mjs +41 -0
- package/esm2022/lib/components/advanced-filter/filter-builder/filter-builder.component.mjs +162 -0
- package/esm2022/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.mjs +70 -0
- package/esm2022/lib/components/audit-log-list/audit-log.component.mjs +99 -0
- package/esm2022/lib/components/auto-complete/auto-complete.component.mjs +292 -0
- package/esm2022/lib/components/base-form/base-form.component.mjs +297 -0
- package/esm2022/lib/components/base-form-canvas/base-form-canvas.component.mjs +591 -0
- package/esm2022/lib/components/base-input-dialog/base-input-dialog.component.mjs +72 -0
- package/esm2022/lib/components/base-table/base-table.component.mjs +514 -0
- package/esm2022/lib/components/button-actions/button-actions.component.mjs +70 -0
- package/esm2022/lib/components/editable-base-table/editable-base-table.component.mjs +496 -0
- package/esm2022/lib/components/equation-builder/equation-builder.component.mjs +112 -0
- package/esm2022/lib/components/item-line-editor/item-line-editor.component.mjs +299 -0
- package/esm2022/lib/components/multi-auto-complete/multi-auto-complete.component.mjs +278 -0
- package/esm2022/lib/components/paginator/paginator.component.mjs +91 -0
- package/esm2022/lib/components/report-details-dialog/report-details-dialog.component.mjs +102 -0
- package/esm2022/lib/components/report-form/report-form.component.mjs +498 -0
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +62 -0
- package/esm2022/lib/components/section-form-canvas/section-form-canvas.component.mjs +81 -0
- package/esm2022/lib/components/shared/action-button/action-button.component.mjs +59 -0
- package/esm2022/lib/components/shared/action-card/action-card.component.mjs +93 -0
- package/esm2022/lib/components/shared/attachment-uploader/attachment-uploader.component.mjs +70 -0
- package/esm2022/lib/components/shared-list/shared-list.component.mjs +47 -0
- package/esm2022/lib/components/snackbar-static/snackbar-static.component.mjs +43 -0
- package/esm2022/lib/components/title-bar/title-bar.component.mjs +119 -0
- package/esm2022/lib/services/backend-service.mjs +240 -0
- package/esm2022/lib/services/index.mjs +4 -0
- package/esm2022/lib/services/top-panel.mjs +22 -0
- package/esm2022/lib/services/trigger-form.service.mjs +17 -0
- package/esm2022/lib/utils/base-utils.mjs +97 -0
- package/esm2022/lib/validators/date-range-validator.mjs +27 -0
- package/esm2022/lib/validators/index.mjs +4 -0
- package/esm2022/lib/validators/match-list.validator.mjs +9 -0
- package/esm2022/lib/validators/multi-email-validator.mjs +13 -0
- package/esm2022/public-api.mjs +29 -0
- package/esm2022/q-btech-ui-lib.mjs +5 -0
- package/esm2022/unifylib-ui-lib.mjs +5 -0
- package/fesm2022/iq-ui-lib.mjs +5625 -0
- package/fesm2022/iq-ui-lib.mjs.map +1 -0
- package/fesm2022/q-btech-ui-lib.mjs +5619 -0
- package/fesm2022/q-btech-ui-lib.mjs.map +1 -0
- package/fesm2022/unifylib-ui-lib.mjs +5625 -0
- package/fesm2022/unifylib-ui-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/base-model/SearchStrConfig.d.ts +8 -0
- package/{src/lib/base-model/api-response.ts → lib/base-model/api-response.d.ts} +21 -23
- package/lib/base-model/audit-log-entry.d.ts +7 -0
- package/lib/base-model/button-action-settings.d.ts +15 -0
- package/lib/base-model/column-def.model.d.ts +11 -0
- package/lib/base-model/do-action-request.d.ts +10 -0
- package/lib/base-model/field-action.d.ts +6 -0
- package/lib/base-model/field-filter.model.d.ts +7 -0
- package/lib/base-model/field-info.d.ts +53 -0
- package/lib/base-model/field-predicate.model.d.ts +7 -0
- package/lib/base-model/filter-request.d.ts +15 -0
- package/lib/base-model/filter.model.d.ts +22 -0
- package/lib/base-model/get-items-list.d.ts +21 -0
- package/lib/base-model/index.d.ts +11 -0
- package/lib/base-model/items-total.model.d.ts +6 -0
- package/lib/base-model/line-item.model.d.ts +9 -0
- package/lib/base-model/lookupItem.d.ts +13 -0
- package/lib/base-model/page-info.d.ts +52 -0
- package/lib/base-model/report-request.model.d.ts +18 -0
- package/lib/base-model/response-envelop.model.d.ts +8 -0
- package/lib/base-model/snack-message.model.d.ts +7 -0
- package/lib/base-model/table-column.interface.d.ts +28 -0
- package/lib/base-model/table-page-user-action.interface.d.ts +14 -0
- package/lib/base-model/workflow/workflow-steps.model.d.ts +7 -0
- package/lib/base-model/workflow/workflow.model.d.ts +13 -0
- package/lib/components/action-comment/action-comment.component.d.ts +32 -0
- package/lib/components/action-confirmation/action-confirmation.component.d.ts +19 -0
- package/lib/components/activity-report-form/activity-report-form.component.d.ts +93 -0
- package/lib/components/advanced-filter/field-filter/field-filter.component.d.ts +20 -0
- package/lib/components/advanced-filter/filter-builder/filter-builder.component.d.ts +28 -0
- package/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.d.ts +25 -0
- package/lib/components/audit-log-list/audit-log.component.d.ts +36 -0
- package/lib/components/auto-complete/auto-complete.component.d.ts +51 -0
- package/lib/components/base-form/base-form.component.d.ts +59 -0
- package/lib/components/base-form-canvas/base-form-canvas.component.d.ts +124 -0
- package/lib/components/base-input-dialog/base-input-dialog.component.d.ts +23 -0
- package/lib/components/base-table/base-table.component.d.ts +128 -0
- package/lib/components/button-actions/button-actions.component.d.ts +17 -0
- package/lib/components/editable-base-table/editable-base-table.component.d.ts +106 -0
- package/lib/components/equation-builder/equation-builder.component.d.ts +23 -0
- package/lib/components/item-line-editor/item-line-editor.component.d.ts +64 -0
- package/lib/components/multi-auto-complete/multi-auto-complete.component.d.ts +51 -0
- package/lib/components/paginator/paginator.component.d.ts +26 -0
- package/lib/components/report-details-dialog/report-details-dialog.component.d.ts +34 -0
- package/lib/components/report-form/report-form.component.d.ts +92 -0
- package/lib/components/search-bar/search-bar.component.d.ts +29 -0
- package/lib/components/section-form-canvas/section-form-canvas.component.d.ts +27 -0
- package/lib/components/shared/action-button/action-button.component.d.ts +17 -0
- package/lib/components/shared/action-card/action-card.component.d.ts +37 -0
- package/lib/components/shared/attachment-uploader/attachment-uploader.component.d.ts +16 -0
- package/lib/components/shared-list/shared-list.component.d.ts +21 -0
- package/lib/components/snackbar-static/snackbar-static.component.d.ts +15 -0
- package/lib/components/title-bar/title-bar.component.d.ts +42 -0
- package/lib/services/backend-service.d.ts +59 -0
- package/{src/lib/services/index.ts → lib/services/index.d.ts} +3 -3
- package/lib/services/top-panel.d.ts +8 -0
- package/lib/services/trigger-form.service.d.ts +7 -0
- package/lib/utils/base-utils.d.ts +13 -0
- package/lib/validators/date-range-validator.d.ts +2 -0
- package/{src/lib/validators/index.ts → lib/validators/index.d.ts} +3 -3
- package/lib/validators/match-list.validator.d.ts +4 -0
- package/lib/validators/multi-email-validator.d.ts +6 -0
- package/package.json +27 -14
- package/{src/public-api.ts → public-api.d.ts} +25 -29
- package/ng-package.json +0 -7
- package/src/lib/base-model/SearchStrConfig.ts +0 -12
- package/src/lib/base-model/audit-log-entry.ts +0 -7
- package/src/lib/base-model/button-action-settings.ts +0 -29
- package/src/lib/base-model/column-def.model.ts +0 -34
- package/src/lib/base-model/do-action-request.ts +0 -11
- package/src/lib/base-model/feature-item.ts +0 -9
- package/src/lib/base-model/field-action.ts +0 -7
- package/src/lib/base-model/field-filter.model.ts +0 -7
- package/src/lib/base-model/field-info.ts +0 -102
- package/src/lib/base-model/field-predicate.model.ts +0 -7
- package/src/lib/base-model/filter-request.ts +0 -27
- package/src/lib/base-model/filter.model.ts +0 -49
- package/src/lib/base-model/get-items-list.ts +0 -24
- package/src/lib/base-model/index.ts +0 -11
- package/src/lib/base-model/items-total.model.ts +0 -12
- package/src/lib/base-model/line-item.model.ts +0 -18
- package/src/lib/base-model/lookupItem.ts +0 -21
- package/src/lib/base-model/null-snackmessage.ts +0 -9
- package/src/lib/base-model/page-info.ts +0 -54
- package/src/lib/base-model/report-request.model.ts +0 -33
- package/src/lib/base-model/response-envelop.model.ts +0 -15
- package/src/lib/base-model/snack-message.model.ts +0 -14
- package/src/lib/base-model/snackmessage-interface.ts +0 -7
- package/src/lib/base-model/table-column.interface.ts +0 -29
- package/src/lib/base-model/table-page-user-action.interface.ts +0 -33
- package/src/lib/base-model/workflow/workflow-steps.model.ts +0 -9
- package/src/lib/base-model/workflow/workflow.model.ts +0 -52
- package/src/lib/components/action-comment/action-comment.component.css +0 -52
- package/src/lib/components/action-comment/action-comment.component.html +0 -47
- package/src/lib/components/action-comment/action-comment.component.spec.ts +0 -23
- package/src/lib/components/action-comment/action-comment.component.ts +0 -102
- package/src/lib/components/action-confirmation/action-confirmation.component.css +0 -46
- package/src/lib/components/action-confirmation/action-confirmation.component.html +0 -32
- package/src/lib/components/action-confirmation/action-confirmation.component.spec.ts +0 -23
- package/src/lib/components/action-confirmation/action-confirmation.component.ts +0 -58
- package/src/lib/components/activity-report-form/activity-report-form.component.html +0 -110
- package/src/lib/components/activity-report-form/activity-report-form.component.scss +0 -69
- package/src/lib/components/activity-report-form/activity-report-form.component.spec.ts +0 -25
- package/src/lib/components/activity-report-form/activity-report-form.component.ts +0 -616
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.html +0 -8
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.scss +0 -0
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.spec.ts +0 -25
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.ts +0 -55
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.html +0 -36
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.scss +0 -130
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.spec.ts +0 -25
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.ts +0 -186
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.css +0 -51
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.html +0 -23
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.spec.ts +0 -23
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.ts +0 -69
- package/src/lib/components/audit-log-list/audit-log.component.html +0 -26
- package/src/lib/components/audit-log-list/audit-log.component.scss +0 -50
- package/src/lib/components/audit-log-list/audit-log.component.spec.ts +0 -25
- package/src/lib/components/audit-log-list/audit-log.component.ts +0 -114
- package/src/lib/components/auto-complete/auto-complete.component.css +0 -55
- package/src/lib/components/auto-complete/auto-complete.component.html +0 -45
- package/src/lib/components/auto-complete/auto-complete.component.spec.ts +0 -23
- package/src/lib/components/auto-complete/auto-complete.component.ts +0 -331
- package/src/lib/components/base-form/base-form.component.html +0 -59
- package/src/lib/components/base-form/base-form.component.scss +0 -68
- package/src/lib/components/base-form/base-form.component.spec.ts +0 -25
- package/src/lib/components/base-form/base-form.component.ts +0 -323
- package/src/lib/components/base-form-canvas/base-form-canvas.component.css +0 -196
- package/src/lib/components/base-form-canvas/base-form-canvas.component.html +0 -1095
- package/src/lib/components/base-form-canvas/base-form-canvas.component.spec.ts +0 -23
- package/src/lib/components/base-form-canvas/base-form-canvas.component.ts +0 -680
- package/src/lib/components/base-input-dialog/base-input-dialog.component.css +0 -67
- package/src/lib/components/base-input-dialog/base-input-dialog.component.html +0 -47
- package/src/lib/components/base-input-dialog/base-input-dialog.component.spec.ts +0 -23
- package/src/lib/components/base-input-dialog/base-input-dialog.component.ts +0 -77
- package/src/lib/components/base-table/base-table.component.html +0 -268
- package/src/lib/components/base-table/base-table.component.scss +0 -140
- package/src/lib/components/base-table/base-table.component.spec.ts +0 -25
- package/src/lib/components/base-table/base-table.component.ts +0 -621
- package/src/lib/components/button-actions/button-actions.component.html +0 -27
- package/src/lib/components/button-actions/button-actions.component.scss +0 -101
- package/src/lib/components/button-actions/button-actions.component.spec.ts +0 -23
- package/src/lib/components/button-actions/button-actions.component.ts +0 -70
- package/src/lib/components/editable-base-table/editable-base-table.component.html +0 -337
- package/src/lib/components/editable-base-table/editable-base-table.component.scss +0 -126
- package/src/lib/components/editable-base-table/editable-base-table.component.spec.ts +0 -25
- package/src/lib/components/editable-base-table/editable-base-table.component.ts +0 -579
- package/src/lib/components/equation-builder/equation-builder.component.css +0 -39
- package/src/lib/components/equation-builder/equation-builder.component.html +0 -31
- package/src/lib/components/equation-builder/equation-builder.component.spec.ts +0 -23
- package/src/lib/components/equation-builder/equation-builder.component.ts +0 -119
- package/src/lib/components/item-line-editor/item-line-editor.component.html +0 -102
- package/src/lib/components/item-line-editor/item-line-editor.component.scss +0 -152
- package/src/lib/components/item-line-editor/item-line-editor.component.spec.ts +0 -23
- package/src/lib/components/item-line-editor/item-line-editor.component.ts +0 -306
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.css +0 -19
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.html +0 -38
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.spec.ts +0 -23
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.ts +0 -315
- package/src/lib/components/paginator/paginator.component.css +0 -65
- package/src/lib/components/paginator/paginator.component.html +0 -30
- package/src/lib/components/paginator/paginator.component.ts +0 -87
- package/src/lib/components/report-details-dialog/report-details-dialog.component.css +0 -17
- package/src/lib/components/report-details-dialog/report-details-dialog.component.html +0 -16
- package/src/lib/components/report-details-dialog/report-details-dialog.component.spec.ts +0 -23
- package/src/lib/components/report-details-dialog/report-details-dialog.component.ts +0 -111
- package/src/lib/components/report-form/report-form.component.html +0 -92
- package/src/lib/components/report-form/report-form.component.scss +0 -51
- package/src/lib/components/report-form/report-form.component.spec.ts +0 -25
- package/src/lib/components/report-form/report-form.component.ts +0 -599
- package/src/lib/components/search-bar/search-bar.component.html +0 -51
- package/src/lib/components/search-bar/search-bar.component.scss +0 -63
- package/src/lib/components/search-bar/search-bar.component.spec.ts +0 -25
- package/src/lib/components/search-bar/search-bar.component.ts +0 -68
- package/src/lib/components/section-form-canvas/section-form-canvas.component.html +0 -43
- package/src/lib/components/section-form-canvas/section-form-canvas.component.scss +0 -81
- package/src/lib/components/section-form-canvas/section-form-canvas.component.spec.ts +0 -23
- package/src/lib/components/section-form-canvas/section-form-canvas.component.ts +0 -67
- package/src/lib/components/shared/action-button/action-button.component.html +0 -12
- package/src/lib/components/shared/action-button/action-button.component.scss +0 -45
- package/src/lib/components/shared/action-button/action-button.component.ts +0 -51
- package/src/lib/components/shared/action-card/action-card.component.html +0 -78
- package/src/lib/components/shared/action-card/action-card.component.scss +0 -238
- package/src/lib/components/shared/action-card/action-card.component.ts +0 -56
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.css +0 -135
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.html +0 -36
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.spec.ts +0 -23
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.ts +0 -71
- package/src/lib/components/shared-list/shared-list.component.css +0 -0
- package/src/lib/components/shared-list/shared-list.component.html +0 -17
- package/src/lib/components/shared-list/shared-list.component.spec.ts +0 -23
- package/src/lib/components/shared-list/shared-list.component.ts +0 -53
- package/src/lib/components/snackbar-static/snackbar-static.component.html +0 -20
- package/src/lib/components/snackbar-static/snackbar-static.component.scss +0 -135
- package/src/lib/components/snackbar-static/snackbar-static.component.ts +0 -26
- package/src/lib/components/title-bar/title-bar.component.css +0 -0
- package/src/lib/components/title-bar/title-bar.component.css.map +0 -1
- package/src/lib/components/title-bar/title-bar.component.html +0 -35
- package/src/lib/components/title-bar/title-bar.component.scss +0 -126
- package/src/lib/components/title-bar/title-bar.component.spec.ts +0 -23
- package/src/lib/components/title-bar/title-bar.component.ts +0 -126
- package/src/lib/services/backend-service.ts +0 -287
- package/src/lib/services/top-panel.ts +0 -17
- package/src/lib/services/trigger-form.service.ts +0 -11
- package/src/lib/share-module/shared-module.ts +0 -10
- package/src/lib/utils/base-utils.ts +0 -102
- package/src/lib/validators/date-range-validator.ts +0 -31
- package/src/lib/validators/match-list.validator.ts +0 -10
- package/src/lib/validators/multi-email-validator.ts +0 -15
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
|
-
Component,
|
|
4
|
-
effect,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Inject,
|
|
7
|
-
Input,
|
|
8
|
-
OnChanges, OnDestroy,
|
|
9
|
-
OnInit,
|
|
10
|
-
Output,
|
|
11
|
-
SimpleChanges
|
|
12
|
-
} from "@angular/core";
|
|
13
|
-
import {
|
|
14
|
-
MatCell,
|
|
15
|
-
MatCellDef,
|
|
16
|
-
MatColumnDef,
|
|
17
|
-
MatHeaderCell,
|
|
18
|
-
MatHeaderCellDef,
|
|
19
|
-
MatHeaderRow,
|
|
20
|
-
MatHeaderRowDef,
|
|
21
|
-
MatRow,
|
|
22
|
-
MatRowDef,
|
|
23
|
-
MatTable,
|
|
24
|
-
MatTableDataSource
|
|
25
|
-
} from "@angular/material/table";
|
|
26
|
-
import {TranslateModule, TranslateService} from "@ngx-translate/core";
|
|
27
|
-
import {MatSortModule, Sort} from "@angular/material/sort";
|
|
28
|
-
import {
|
|
29
|
-
CurrencyPipe,
|
|
30
|
-
DatePipe, DecimalPipe,
|
|
31
|
-
JsonPipe,
|
|
32
|
-
NgClass,
|
|
33
|
-
NgForOf,
|
|
34
|
-
NgIf,
|
|
35
|
-
NgStyle,
|
|
36
|
-
NgSwitch,
|
|
37
|
-
NgSwitchCase,
|
|
38
|
-
NgSwitchDefault, UpperCasePipe
|
|
39
|
-
} from "@angular/common";
|
|
40
|
-
import {MatIcon} from "@angular/material/icon";
|
|
41
|
-
import {MatButton, MatButtonModule, MatIconButton} from "@angular/material/button";
|
|
42
|
-
import {NgxPaginationModule} from "ngx-pagination";
|
|
43
|
-
import {ButtonActionsComponent} from "../button-actions/button-actions.component";
|
|
44
|
-
import {ShareDataService} from "../../services/trigger-form.service";
|
|
45
|
-
import {BaseUtils} from "../../utils/base-utils";
|
|
46
|
-
import {BackendService} from "../../services/backend-service";
|
|
47
|
-
import {Filter} from "../../base-model/filter.model";
|
|
48
|
-
import {FilterRequest} from "../../base-model/filter-request";
|
|
49
|
-
import {
|
|
50
|
-
ADD_NEW_RECORD_ACTION,
|
|
51
|
-
ButtonActionSettings,
|
|
52
|
-
EMPTY_PAGE_INFO, FieldInfo,
|
|
53
|
-
FRONT_END_COLUMN_TYPES,
|
|
54
|
-
PageInfo,
|
|
55
|
-
SELECT_RECORD_ACTION, TABLE_RECORD_ACTION,
|
|
56
|
-
TableColumn
|
|
57
|
-
} from "../../base-model";
|
|
58
|
-
import {ReportRequest} from "../../base-model/report-request.model";
|
|
59
|
-
import {TablePageUserAction} from "../../base-model/table-page-user-action.interface";
|
|
60
|
-
import {Workflow} from "../../base-model/workflow/workflow.model";
|
|
61
|
-
import {ResponseEnvelop} from "../../base-model/response-envelop.model";
|
|
62
|
-
import {Router} from "@angular/router";
|
|
63
|
-
import {MatLabel} from "@angular/material/form-field";
|
|
64
|
-
import {MatChipListbox, MatChipOption} from "@angular/material/chips";
|
|
65
|
-
import {MatButtonToggle, MatButtonToggleGroup} from "@angular/material/button-toggle";
|
|
66
|
-
import {TitleBarComponent} from "../title-bar/title-bar.component";
|
|
67
|
-
import {PaginatorComponent} from "../paginator/paginator.component";
|
|
68
|
-
import {MatCheckbox} from "@angular/material/checkbox";
|
|
69
|
-
import {BaseFormCanvasComponent} from "../base-form-canvas/base-form-canvas.component";
|
|
70
|
-
import {FilterBuilderComponent} from "../advanced-filter/filter-builder/filter-builder.component";
|
|
71
|
-
import {FieldFilter} from "../../base-model/field-filter.model";
|
|
72
|
-
import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu";
|
|
73
|
-
|
|
74
|
-
@Component({
|
|
75
|
-
selector: 'app-base-table',
|
|
76
|
-
standalone: true,
|
|
77
|
-
templateUrl: './base-table.component.html',
|
|
78
|
-
styleUrls: ['./base-table.component.scss'],
|
|
79
|
-
animations: [],
|
|
80
|
-
imports: [
|
|
81
|
-
NgStyle,
|
|
82
|
-
NgClass,
|
|
83
|
-
TranslateModule,
|
|
84
|
-
MatIcon,
|
|
85
|
-
MatSortModule,
|
|
86
|
-
MatColumnDef,
|
|
87
|
-
MatHeaderCellDef,
|
|
88
|
-
NgIf,
|
|
89
|
-
MatTable,
|
|
90
|
-
MatHeaderCell,
|
|
91
|
-
NgSwitch,
|
|
92
|
-
MatButtonModule,
|
|
93
|
-
MatCell,
|
|
94
|
-
MatCellDef,
|
|
95
|
-
DatePipe,
|
|
96
|
-
CurrencyPipe,
|
|
97
|
-
NgxPaginationModule,
|
|
98
|
-
MatRow,
|
|
99
|
-
MatRowDef,
|
|
100
|
-
MatHeaderRow,
|
|
101
|
-
NgSwitchCase,
|
|
102
|
-
NgSwitchDefault,
|
|
103
|
-
MatHeaderRowDef,
|
|
104
|
-
MatIconButton,
|
|
105
|
-
NgForOf,
|
|
106
|
-
JsonPipe,
|
|
107
|
-
MatButton,
|
|
108
|
-
ButtonActionsComponent,
|
|
109
|
-
MatLabel,
|
|
110
|
-
MatChipListbox,
|
|
111
|
-
MatChipOption,
|
|
112
|
-
MatButtonToggleGroup,
|
|
113
|
-
MatButtonToggle,
|
|
114
|
-
TitleBarComponent,
|
|
115
|
-
PaginatorComponent,
|
|
116
|
-
DecimalPipe,
|
|
117
|
-
MatCheckbox,
|
|
118
|
-
BaseFormCanvasComponent,
|
|
119
|
-
FilterBuilderComponent,
|
|
120
|
-
MatMenuTrigger,
|
|
121
|
-
MatMenu,
|
|
122
|
-
MatMenuItem,
|
|
123
|
-
UpperCasePipe,
|
|
124
|
-
]
|
|
125
|
-
})
|
|
126
|
-
export class BaseTableComponent extends BaseUtils implements OnInit, OnChanges, OnDestroy {
|
|
127
|
-
types: string[] = ["pdf", "csv", "xlsx"]
|
|
128
|
-
collection = {count: 60, data: []};
|
|
129
|
-
config = {
|
|
130
|
-
itemsPerPage: 15,
|
|
131
|
-
currentPage: 1,
|
|
132
|
-
totalItems: this.collection.count
|
|
133
|
-
};
|
|
134
|
-
public maxSize: number = 7;
|
|
135
|
-
public directionLinks: boolean = true;
|
|
136
|
-
public autoHide: boolean = false;
|
|
137
|
-
public responsive: boolean = true;
|
|
138
|
-
public labels: any = {
|
|
139
|
-
previousLabel: '<',
|
|
140
|
-
nextLabel: '>',
|
|
141
|
-
screenReaderPaginationLabel: 'Pagination',
|
|
142
|
-
screenReaderPageLabel: 'page',
|
|
143
|
-
screenReaderCurrentLabel: `You're on page`
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
@Input()
|
|
147
|
-
filterFields: FieldInfo[];
|
|
148
|
-
@Input() noDataFoundIcon = 'close';
|
|
149
|
-
@Input() noDataFoundTitle = 'noDataFoundTitle';
|
|
150
|
-
@Input() noDataFoundSubtitle = 'noDataFoundSubtitle';
|
|
151
|
-
totalElements = 0;
|
|
152
|
-
pagesCount = 0;
|
|
153
|
-
pageIndex = 1;
|
|
154
|
-
pageSize = 15;
|
|
155
|
-
private selectedStatusFilter: Filter[] = [];
|
|
156
|
-
advancedAppliedFilter: any[] = [];
|
|
157
|
-
searchStr: string = '';
|
|
158
|
-
private filterRequest: FilterRequest = new FilterRequest();
|
|
159
|
-
private timer: any;
|
|
160
|
-
@Input()
|
|
161
|
-
override pageInfo: PageInfo = EMPTY_PAGE_INFO;
|
|
162
|
-
|
|
163
|
-
@Input()
|
|
164
|
-
enablePagination: boolean = true;
|
|
165
|
-
|
|
166
|
-
@Input() data?: MatTableDataSource<any>;
|
|
167
|
-
@Input()
|
|
168
|
-
listAction: ButtonActionSettings[] = [];
|
|
169
|
-
|
|
170
|
-
@Input()
|
|
171
|
-
columns: TableColumn<any>[];
|
|
172
|
-
|
|
173
|
-
@Input()
|
|
174
|
-
filters: Filter[] = [];
|
|
175
|
-
|
|
176
|
-
@Input() //@ts-ignore
|
|
177
|
-
pathParam: number;
|
|
178
|
-
|
|
179
|
-
@Input() //@ts-ignore
|
|
180
|
-
extraButton: string;
|
|
181
|
-
|
|
182
|
-
@Input() //@ts-ignore
|
|
183
|
-
enforceRefresh: boolean = false;
|
|
184
|
-
|
|
185
|
-
@Input()
|
|
186
|
-
isPending: boolean = false;
|
|
187
|
-
|
|
188
|
-
@Input()
|
|
189
|
-
trigger: boolean = false;
|
|
190
|
-
|
|
191
|
-
@Input()
|
|
192
|
-
reportRequest: ReportRequest = new ReportRequest({});
|
|
193
|
-
|
|
194
|
-
@Input()
|
|
195
|
-
separateEndpointData: any;
|
|
196
|
-
@Input()
|
|
197
|
-
manageablePages: boolean = false;
|
|
198
|
-
@Input()
|
|
199
|
-
totalPagesCount: number = 0;
|
|
200
|
-
@Input()
|
|
201
|
-
currentPageIndex: number = 0;
|
|
202
|
-
|
|
203
|
-
@Output()
|
|
204
|
-
pageChange: EventEmitter<any> = new EventEmitter();
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
@Output()
|
|
208
|
-
userAction: EventEmitter<TablePageUserAction> = new EventEmitter<TablePageUserAction>();
|
|
209
|
-
@Output()
|
|
210
|
-
hyperLinkAction: EventEmitter<TablePageUserAction> = new EventEmitter<TablePageUserAction>();
|
|
211
|
-
|
|
212
|
-
@Output()
|
|
213
|
-
extraAction: EventEmitter<TablePageUserAction> = new EventEmitter<TablePageUserAction>();
|
|
214
|
-
|
|
215
|
-
@Output()
|
|
216
|
-
selectedColumn: EventEmitter<Sort> = new EventEmitter<Sort>();
|
|
217
|
-
|
|
218
|
-
@Output()
|
|
219
|
-
listActionClicked: EventEmitter<{ action: ButtonActionSettings, row: any }> = new EventEmitter<{
|
|
220
|
-
action: ButtonActionSettings,
|
|
221
|
-
row: any
|
|
222
|
-
}>();
|
|
223
|
-
|
|
224
|
-
@Output()
|
|
225
|
-
showDialog: EventEmitter<any> = new EventEmitter<any>();
|
|
226
|
-
|
|
227
|
-
usedWorkflow!: Workflow;
|
|
228
|
-
|
|
229
|
-
mode:any;
|
|
230
|
-
|
|
231
|
-
@Input()
|
|
232
|
-
customizedData?: MatTableDataSource<any>;
|
|
233
|
-
dataSource: MatTableDataSource<any>;
|
|
234
|
-
selectedRowIndex = -1;
|
|
235
|
-
noDataFound = false;
|
|
236
|
-
totalRequiredCountItem = 0;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
@Output()
|
|
240
|
-
clickRoutePage: EventEmitter<any> = new EventEmitter<any>();
|
|
241
|
-
|
|
242
|
-
constructor(
|
|
243
|
-
private backendService: BackendService,
|
|
244
|
-
public translateService: TranslateService,
|
|
245
|
-
public shareDataService: ShareDataService,
|
|
246
|
-
@Inject('securityManager') private securityManager: any,
|
|
247
|
-
private router: Router,
|
|
248
|
-
) {
|
|
249
|
-
super();
|
|
250
|
-
this.dataSource = new MatTableDataSource();
|
|
251
|
-
this.columns = [];
|
|
252
|
-
this.filterRequest = new FilterRequest();
|
|
253
|
-
|
|
254
|
-
effect(() => {
|
|
255
|
-
if (this.pageInfo.lazyLoadData !== true || this.enforceRefresh === true) {
|
|
256
|
-
this.loadData();
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
ngOnDestroy(): void {
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
ngOnInit(): void {
|
|
266
|
-
this.backendService.isEmptyItems = this.dataSource.data.length <= 0;
|
|
267
|
-
if (this.customizedData) {
|
|
268
|
-
this.dataSource = this.customizedData;
|
|
269
|
-
}
|
|
270
|
-
if(this.manageablePages) {
|
|
271
|
-
this.pagesCount = this.totalPagesCount;
|
|
272
|
-
this.pageIndex = this.currentPageIndex;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
onPageChange(event: number) {
|
|
278
|
-
this.pageIndex = event;
|
|
279
|
-
this.getNext(this.pageIndex - 1);
|
|
280
|
-
if (this.manageablePages) {
|
|
281
|
-
this.pageChange.emit(this.pageIndex);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
extractFieldName(element: any, property: string) {
|
|
287
|
-
if (property.includes('.')) {
|
|
288
|
-
return property.split('.').reduce((acc, part) => acc && acc[part], element);
|
|
289
|
-
} else {
|
|
290
|
-
const c = this.columns.find(c => c.property === property);
|
|
291
|
-
if (Array.isArray(element[property]) && c.arraySubProperty ) {
|
|
292
|
-
const fieldValues = element[property].map(f => f[c.arraySubProperty]);
|
|
293
|
-
return fieldValues.join(', ');
|
|
294
|
-
}else {
|
|
295
|
-
return element[property];
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
get visibleColumns() {
|
|
301
|
-
this.buildGroups()
|
|
302
|
-
return this.columns.filter(column => column.visible).map(column => column.property);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
getNext(pageIndex: number) {
|
|
306
|
-
this.reportRequest.filterRequest.pageIndex = pageIndex;
|
|
307
|
-
this.reportRequest.filterRequest.pageSize = this.pageSize;
|
|
308
|
-
this.loadData();
|
|
309
|
-
}
|
|
310
|
-
onPageSizeChange(event: number) {
|
|
311
|
-
this.pageSize = event;
|
|
312
|
-
this.pageIndex = 1; // reset to first page on page size change
|
|
313
|
-
this.reportRequest.filterRequest.pageSize = this.pageSize;
|
|
314
|
-
this.getNext(0);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
private loadData() {
|
|
320
|
-
clearTimeout(this.timer);
|
|
321
|
-
if (!this.reportRequest.filterRequest) {
|
|
322
|
-
this.reportRequest.filterRequest = new FilterRequest(this.pageInfo.pageSize);
|
|
323
|
-
this.reportRequest.filterRequest.filters = this.advancedAppliedFilter;
|
|
324
|
-
}
|
|
325
|
-
if (this.separateEndpointData || !this.pageInfo.apiUri || this.pageInfo.apiUri.length === 0) {
|
|
326
|
-
this.dataSource.data = this.separateEndpointData;
|
|
327
|
-
} else if(this.reportRequest == undefined){
|
|
328
|
-
return;
|
|
329
|
-
} else if(!this.manageablePages) {
|
|
330
|
-
this.timer = setTimeout(() => {
|
|
331
|
-
this.reportRequest.filterRequest.columns = this.columns?.filter(c => FRONT_END_COLUMN_TYPES.indexOf(c.type) < 0 ).map(c => c.property) || [];
|
|
332
|
-
this.reportRequest.filterRequest.pendingPage = this.isPending;
|
|
333
|
-
this.reportRequest.filterRequest.filters = this.advancedAppliedFilter;
|
|
334
|
-
this.backendService.getItemsByFilter(this.reportRequest?.filterRequest, this.pageInfo.apiUri).subscribe(resp => {
|
|
335
|
-
const responseEnvelope = new ResponseEnvelop(resp);
|
|
336
|
-
if (responseEnvelope.valid) {
|
|
337
|
-
this.totalRequiredCountItem = this.reportRequest.filterRequest.pageSize
|
|
338
|
-
this.noDataFound = responseEnvelope.body.length < 1;
|
|
339
|
-
this.dataSource.data = responseEnvelope.body;
|
|
340
|
-
this.backendService.isEmptyItems = this.dataSource.data.length <= 0;
|
|
341
|
-
this.totalElements = responseEnvelope.totalSize || 0;
|
|
342
|
-
this.pagesCount = Math.ceil(this.totalElements / this.pageSize) || 1;
|
|
343
|
-
this.pageIndex = (this.reportRequest.filterRequest.pageIndex || 0) + 1;
|
|
344
|
-
this.config.totalItems = responseEnvelope.totalSize || 0;
|
|
345
|
-
this.config.currentPage = this.pageIndex + 1;
|
|
346
|
-
// this.pageSize = this.reportRequest.filterRequest.pageSize;
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
, 300);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
getStatusDescription(element: any) {
|
|
355
|
-
return this.backendService.getStatusDescription(element, this.usedWorkflow);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
getStateType(element: any) {
|
|
359
|
-
return element.stateType
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
363
|
-
if (changes["customizedData"] && !changes["customizedData"].isFirstChange()) {
|
|
364
|
-
this.dataSource.data = changes["customizedData"].currentValue?.data || []; // Update data source with new data
|
|
365
|
-
this.pagesCount=this.totalPagesCount;
|
|
366
|
-
this.pageIndex=this.currentPageIndex;
|
|
367
|
-
}
|
|
368
|
-
if (changes["enforceRefresh"] && !changes["enforceRefresh"].isFirstChange()) {
|
|
369
|
-
this.loadData();
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
getCroppedText(elementValue: any, subWidth: number = 20) {
|
|
373
|
-
return elementValue && elementValue.length > subWidth ? elementValue.substring(0, subWidth) + "..." : elementValue;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
emitEvent(element: any) {
|
|
377
|
-
this.showDialog.emit(element);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
extractFormat(column: TableColumn<any>) {
|
|
381
|
-
return column?.format || 'd/M/yyyy, h:mm a';
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
actionListClicked(listAction: ButtonActionSettings, element: any) {
|
|
385
|
-
this.listActionClicked.emit({action:listAction, row: element});
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
hyperLinkClicked(actionName: string, element: any) {
|
|
389
|
-
const action = TABLE_RECORD_ACTION;
|
|
390
|
-
action.actionKey = actionName;
|
|
391
|
-
action.item = element;
|
|
392
|
-
action.pageInfo = this.pageInfo;
|
|
393
|
-
this.hyperLinkAction.emit(action)
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
emitRoutePage(element: any){
|
|
398
|
-
this.clickRoutePage.emit(element);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
onSelectItem(row: any) {
|
|
402
|
-
if (this.pageInfo.selfRouting) {
|
|
403
|
-
const mode = this.isPending ? 'pending' : 'view';
|
|
404
|
-
const url = `${this.pageInfo.listRoutePath || this.router.url}/view`;
|
|
405
|
-
|
|
406
|
-
const encryptedId = this.backendService.encrypt(String(row.id));
|
|
407
|
-
const encryptedMode = this.backendService.encrypt(mode);
|
|
408
|
-
|
|
409
|
-
const encryptedRow = this.backendService.encrypt(JSON.stringify(row));
|
|
410
|
-
|
|
411
|
-
this.router.navigate([url], {
|
|
412
|
-
queryParams: { token: encryptedId, mode: encryptedMode },
|
|
413
|
-
state: { raw: encryptedRow },
|
|
414
|
-
});
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
// const action = SELECT_RECORD_ACTION;
|
|
418
|
-
// action.id = row?.id;
|
|
419
|
-
// action.item = row;
|
|
420
|
-
// this.userAction.emit(action)
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
openNewTab(row) {
|
|
424
|
-
if (!this.pageInfo.embededTableOnly) {
|
|
425
|
-
const mode = this.isPending ? 'pending' : 'view';
|
|
426
|
-
window.open(`${this.pageInfo.listRoutePath}/${mode}` + '/' + row?.id);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
switchViewMode(b: boolean) {
|
|
431
|
-
this.isPending = !this.isPending;
|
|
432
|
-
this.loadData();
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
onAddNewAction($event: any) {
|
|
436
|
-
const url = `${this.pageInfo.listRoutePath || this.router.url}/view`;
|
|
437
|
-
const encryptedId = this.backendService.encrypt("-1");
|
|
438
|
-
const encryptedMode = this.backendService.encrypt("pending");
|
|
439
|
-
this.router.navigate([`${url}`],
|
|
440
|
-
{ queryParams: { token: encryptedId , mode : encryptedMode } });
|
|
441
|
-
|
|
442
|
-
// const action = SELECT_RECORD_ACTION;
|
|
443
|
-
// action.id = row?.id;
|
|
444
|
-
// action.item = row;
|
|
445
|
-
// this.userAction.emit(action)
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
showAddNew() {
|
|
449
|
-
return this.pageInfo.hasAddButton ;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
onExtraButtionAction($event: any) {
|
|
453
|
-
this.extraAction.emit($event);
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
hasGroups() {
|
|
458
|
-
let b = this.columns.findIndex(p => p.group);
|
|
459
|
-
return b >= 0;
|
|
460
|
-
}
|
|
461
|
-
groupNames: any = []
|
|
462
|
-
groupSpans: Map<string, number> = new Map();
|
|
463
|
-
|
|
464
|
-
buildGroups(){
|
|
465
|
-
let count = 0;
|
|
466
|
-
this.groupNames = [];
|
|
467
|
-
this.groupSpans.clear();
|
|
468
|
-
if(this.hasGroups() === false){
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
this.columns
|
|
472
|
-
.filter(column => column.visible === true)
|
|
473
|
-
.forEach((column) => {
|
|
474
|
-
if (column.group === "-") {
|
|
475
|
-
this.groupNames.push(count.toString());
|
|
476
|
-
this.insertInMap(count);
|
|
477
|
-
count++;
|
|
478
|
-
return;
|
|
479
|
-
} else if (!this.groupNames.includes(column.group)) {
|
|
480
|
-
this.groupNames.push(column.group);
|
|
481
|
-
this.insertInMap(column.group);
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
this.insertInMap(column.group);
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
insertInMap(key){
|
|
489
|
-
if(this.groupSpans.has(key)){
|
|
490
|
-
this.groupSpans.set(key.toString(), this.groupSpans.get(key) + 1);
|
|
491
|
-
} else {
|
|
492
|
-
this.groupSpans.set(key.toString(), 1);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
isHumanMade(str){
|
|
497
|
-
return isNaN(str);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
actionButtonClicked(actionKey: string, item: any): void {
|
|
501
|
-
if (actionKey === 'navigate') {
|
|
502
|
-
this.handleNavigateAction(item);
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
this.emitTableAction(actionKey, item);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
private handleNavigateAction(item: any): void {
|
|
510
|
-
const mode = this.isPending ? 'pending' : 'view';
|
|
511
|
-
const basePath = this.pageInfo.listRoutePath || this.router.url;
|
|
512
|
-
const url = `${basePath}/view`;
|
|
513
|
-
|
|
514
|
-
const encryptedId = this.backendService.encrypt(item.id.toString());
|
|
515
|
-
const encryptedMode = this.backendService.encrypt(mode);
|
|
516
|
-
|
|
517
|
-
this.router.navigate([url], {
|
|
518
|
-
queryParams: { token: encryptedId, mode: encryptedMode }
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
private emitTableAction(actionKey: string, item: any): void {
|
|
523
|
-
const action = TABLE_RECORD_ACTION;
|
|
524
|
-
action.actionKey = actionKey;
|
|
525
|
-
action.item = item;
|
|
526
|
-
action.pageInfo = this.pageInfo;
|
|
527
|
-
this.userAction.emit(action);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
extractReport(reportType: any) {
|
|
531
|
-
const myFilters = this.reportRequest.filterRequest;
|
|
532
|
-
const reportRequest = this.backendService.buildReportRequest(this.columns, this.pageInfo.labelsSection + '.list_title',
|
|
533
|
-
myFilters, reportType, this.pageInfo, this.searchStr, 'LANDSCAPE');
|
|
534
|
-
this.backendService.downloadReport(reportRequest, this.pageInfo.apiUri);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
getIcon(status: string): string {
|
|
538
|
-
switch (status) {
|
|
539
|
-
case 'pass': return 'check_circle';
|
|
540
|
-
case 'warning': return 'warning';
|
|
541
|
-
case 'error': return 'error';
|
|
542
|
-
default: return 'help';
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
actionCheckedClicked(property: string, element) {
|
|
547
|
-
element[property]= !element[property];
|
|
548
|
-
this.actionButtonClicked(property, element);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
isDarkHighlight(row: any): boolean {
|
|
553
|
-
const groupByProp = this.pageInfo?.groupByProperty;
|
|
554
|
-
const groupByValues = this.pageInfo?.groupByValue;
|
|
555
|
-
|
|
556
|
-
if (!groupByProp || !groupByValues || !row[groupByProp]) {
|
|
557
|
-
return false;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
const cellValue = row[groupByProp].toString();
|
|
561
|
-
|
|
562
|
-
return groupByValues.some(val =>
|
|
563
|
-
cellValue.includes(val) && cellValue.length > val.length
|
|
564
|
-
);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
shouldRenderAsHyperLink(element: any): boolean {
|
|
568
|
-
const groupByProp = this.pageInfo?.groupByProperty;
|
|
569
|
-
const groupByValues = this.pageInfo?.groupByValue;
|
|
570
|
-
|
|
571
|
-
if (!groupByProp || !groupByValues || !element[groupByProp]) {
|
|
572
|
-
return false;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
const value = element[groupByProp].toString();
|
|
576
|
-
|
|
577
|
-
return !groupByValues.some(v => value.includes(v) && value.length >= v.length);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
onSortAction($event: Sort) {
|
|
582
|
-
this.reportRequest.filterRequest.sortKey = $event.active && $event.direction ?
|
|
583
|
-
this.columns.find(c => c.property === $event.active)?.orderByProperty || $event.active
|
|
584
|
-
: 'id';
|
|
585
|
-
this.reportRequest.filterRequest.sortDirection = $event.direction === 'asc' ? 'ASC' : 'DESC';
|
|
586
|
-
this.reportRequest.filterRequest.pageIndex = 0;
|
|
587
|
-
this.selectedColumn.emit($event);
|
|
588
|
-
this.loadData();
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
shouldShowButton(element: any): boolean {
|
|
592
|
-
const groupByProp = this.pageInfo?.groupByProperty;
|
|
593
|
-
const groupByValues = this.pageInfo?.groupByValue;
|
|
594
|
-
|
|
595
|
-
if (!groupByProp || !groupByValues || !element[groupByProp]) {
|
|
596
|
-
return true;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
const value = element[groupByProp].toString();
|
|
600
|
-
|
|
601
|
-
return !groupByValues.some(v => value.includes(v) && value.length >= v.length);
|
|
602
|
-
}
|
|
603
|
-
doAdvancedSearch($event: FieldFilter[]) {
|
|
604
|
-
this.advancedAppliedFilter = [];
|
|
605
|
-
if ($event.length === 0) {
|
|
606
|
-
this.advancedAppliedFilter = [];
|
|
607
|
-
this.loadData();
|
|
608
|
-
// this.paginator.firstPage();
|
|
609
|
-
} else {
|
|
610
|
-
this.advancedAppliedFilter = $event;
|
|
611
|
-
this.loadData();
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
resetData($event: boolean) {
|
|
615
|
-
if ($event) {
|
|
616
|
-
this.advancedAppliedFilter = [];
|
|
617
|
-
this.loadData();
|
|
618
|
-
// this.paginator.firstPage();
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<ng-container *ngIf="buttonsAction; else list_Action">
|
|
2
|
-
<div class="action-buttons-container" *ngIf="(actions?.length ? actions : listAction)?.length > 0">
|
|
3
|
-
<button
|
|
4
|
-
*ngFor="let action of (actions?.length ? actions : listAction); let i = index"
|
|
5
|
-
class="action-button"
|
|
6
|
-
(click)="getClickedAction(action)"
|
|
7
|
-
[disabled]="disabled"
|
|
8
|
-
[attr.id]="action.id || ('actions-btn-' + action.label)"
|
|
9
|
-
[title]="action.label | translate"
|
|
10
|
-
>
|
|
11
|
-
<mat-icon *ngIf="action.icon?.length" class="action-icon">{{ action.icon }}</mat-icon>
|
|
12
|
-
</button>
|
|
13
|
-
</div>
|
|
14
|
-
</ng-container>
|
|
15
|
-
|
|
16
|
-
<ng-template #list_Action>
|
|
17
|
-
<div *ngIf="listAction?.length > 0">
|
|
18
|
-
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="$event.stopPropagation()" style="justify-content: center; color: grey" id="actions-menu-trigger">
|
|
19
|
-
<mat-icon>more_vert</mat-icon>
|
|
20
|
-
</button>
|
|
21
|
-
<mat-menu #menu="matMenu">
|
|
22
|
-
<button mat-menu-item *ngFor="let list_Action of listAction" (click)="getClickedAction(list_Action)" [attr.id]="list_Action.id || ('actions-menu-item-' + list_Action.label)">
|
|
23
|
-
<span>{{ list_Action.label | translate }}</span>
|
|
24
|
-
</button>
|
|
25
|
-
</mat-menu>
|
|
26
|
-
</div>
|
|
27
|
-
</ng-template>
|