@pega/angular-sdk-overrides 0.23.1
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/lib/designSystemExtension/alert/alert.component.html +19 -0
- package/lib/designSystemExtension/alert/alert.component.scss +52 -0
- package/lib/designSystemExtension/alert/alert.component.spec.ts +22 -0
- package/lib/designSystemExtension/alert/alert.component.ts +43 -0
- package/lib/designSystemExtension/alert-banner/alert-banner.component.html +12 -0
- package/lib/designSystemExtension/alert-banner/alert-banner.component.scss +0 -0
- package/lib/designSystemExtension/alert-banner/alert-banner.component.spec.ts +22 -0
- package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +27 -0
- package/lib/designSystemExtension/banner/banner.component.html +28 -0
- package/lib/designSystemExtension/banner/banner.component.scss +64 -0
- package/lib/designSystemExtension/banner/banner.component.spec.ts +22 -0
- package/lib/designSystemExtension/banner/banner.component.ts +26 -0
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.html +12 -0
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.scss +0 -0
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.spec.ts +24 -0
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +58 -0
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +52 -0
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +142 -0
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.spec.ts +24 -0
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +80 -0
- package/lib/designSystemExtension/material-details/material-details.component.html +40 -0
- package/lib/designSystemExtension/material-details/material-details.component.scss +121 -0
- package/lib/designSystemExtension/material-details/material-details.component.spec.ts +24 -0
- package/lib/designSystemExtension/material-details/material-details.component.ts +32 -0
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +23 -0
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +33 -0
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +22 -0
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +29 -0
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.html +37 -0
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +127 -0
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.spec.ts +24 -0
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +32 -0
- package/lib/designSystemExtension/material-summary-list/material-summary-list.component.html +3 -0
- package/lib/designSystemExtension/material-summary-list/material-summary-list.component.scss +1 -0
- package/lib/designSystemExtension/material-summary-list/material-summary-list.component.spec.ts +24 -0
- package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +17 -0
- package/lib/designSystemExtension/material-utility/material-utility.component.html +17 -0
- package/lib/designSystemExtension/material-utility/material-utility.component.scss +52 -0
- package/lib/designSystemExtension/material-utility/material-utility.component.spec.ts +24 -0
- package/lib/designSystemExtension/material-utility/material-utility.component.ts +26 -0
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.html +12 -0
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.scss +28 -0
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.spec.ts +24 -0
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +40 -0
- package/lib/designSystemExtension/operator/operator.component.html +20 -0
- package/lib/designSystemExtension/operator/operator.component.scss +83 -0
- package/lib/designSystemExtension/operator/operator.component.spec.ts +24 -0
- package/lib/designSystemExtension/operator/operator.component.ts +146 -0
- package/lib/designSystemExtension/pulse/pulse.component.html +3 -0
- package/lib/designSystemExtension/pulse/pulse.component.scss +8 -0
- package/lib/designSystemExtension/pulse/pulse.component.spec.ts +24 -0
- package/lib/designSystemExtension/pulse/pulse.component.ts +40 -0
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +20 -0
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.html +13 -0
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +43 -0
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.spec.ts +22 -0
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +15 -0
- package/lib/field/auto-complete/auto-complete.component.html +32 -0
- package/lib/field/auto-complete/auto-complete.component.scss +20 -0
- package/lib/field/auto-complete/auto-complete.component.spec.ts +24 -0
- package/lib/field/auto-complete/auto-complete.component.ts +345 -0
- package/lib/field/auto-complete/config-ext.json +10 -0
- package/lib/field/cancel-alert/cancel-alert.component.html +18 -0
- package/lib/field/cancel-alert/cancel-alert.component.scss +24 -0
- package/lib/field/cancel-alert/cancel-alert.component.spec.ts +24 -0
- package/lib/field/cancel-alert/cancel-alert.component.ts +107 -0
- package/lib/field/check-box/check-box.component.html +41 -0
- package/lib/field/check-box/check-box.component.scss +24 -0
- package/lib/field/check-box/check-box.component.spec.ts +24 -0
- package/lib/field/check-box/check-box.component.ts +188 -0
- package/lib/field/check-box/config-ext.json +9 -0
- package/lib/field/currency/config-ext.json +9 -0
- package/lib/field/currency/currency.component.html +31 -0
- package/lib/field/currency/currency.component.scss +28 -0
- package/lib/field/currency/currency.component.spec.ts +24 -0
- package/lib/field/currency/currency.component.ts +197 -0
- package/lib/field/date/config-ext.json +9 -0
- package/lib/field/date/date.component.html +31 -0
- package/lib/field/date/date.component.scss +24 -0
- package/lib/field/date/date.component.spec.ts +24 -0
- package/lib/field/date/date.component.ts +245 -0
- package/lib/field/date-time/config-ext.json +8 -0
- package/lib/field/date-time/date-time.component.html +29 -0
- package/lib/field/date-time/date-time.component.scss +80 -0
- package/lib/field/date-time/date-time.component.spec.ts +24 -0
- package/lib/field/date-time/date-time.component.ts +224 -0
- package/lib/field/decimal/config-ext.json +8 -0
- package/lib/field/decimal/decimal.component.html +28 -0
- package/lib/field/decimal/decimal.component.scss +20 -0
- package/lib/field/decimal/decimal.component.spec.ts +24 -0
- package/lib/field/decimal/decimal.component.ts +187 -0
- package/lib/field/dropdown/config-ext.json +8 -0
- package/lib/field/dropdown/dropdown.component.html +31 -0
- package/lib/field/dropdown/dropdown.component.scss +25 -0
- package/lib/field/dropdown/dropdown.component.spec.ts +24 -0
- package/lib/field/dropdown/dropdown.component.ts +247 -0
- package/lib/field/email/config-ext.json +8 -0
- package/lib/field/email/email.component.html +27 -0
- package/lib/field/email/email.component.scss +20 -0
- package/lib/field/email/email.component.spec.ts +24 -0
- package/lib/field/email/email.component.ts +180 -0
- package/lib/field/integer/config-ext.json +8 -0
- package/lib/field/integer/integer.component.html +28 -0
- package/lib/field/integer/integer.component.scss +20 -0
- package/lib/field/integer/integer.component.spec.ts +24 -0
- package/lib/field/integer/integer.component.ts +185 -0
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +12 -0
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.scss +1 -0
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.spec.ts +22 -0
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +40 -0
- package/lib/field/percentage/config-ext.json +8 -0
- package/lib/field/percentage/percentage.component.html +29 -0
- package/lib/field/percentage/percentage.component.scss +20 -0
- package/lib/field/percentage/percentage.component.spec.ts +24 -0
- package/lib/field/percentage/percentage.component.ts +181 -0
- package/lib/field/phone/config-ext.json +8 -0
- package/lib/field/phone/phone.component.html +26 -0
- package/lib/field/phone/phone.component.scss +81 -0
- package/lib/field/phone/phone.component.spec.ts +24 -0
- package/lib/field/phone/phone.component.ts +199 -0
- package/lib/field/radio-buttons/config-ext.json +8 -0
- package/lib/field/radio-buttons/radio-buttons.component.html +37 -0
- package/lib/field/radio-buttons/radio-buttons.component.scss +39 -0
- package/lib/field/radio-buttons/radio-buttons.component.spec.ts +24 -0
- package/lib/field/radio-buttons/radio-buttons.component.ts +241 -0
- package/lib/field/rich-text/rich-text.component.html +20 -0
- package/lib/field/rich-text/rich-text.component.scss +0 -0
- package/lib/field/rich-text/rich-text.component.spec.ts +24 -0
- package/lib/field/rich-text/rich-text.component.ts +131 -0
- package/lib/field/scalar-list/config-ext.json +8 -0
- package/lib/field/scalar-list/scalar-list.component.html +9 -0
- package/lib/field/scalar-list/scalar-list.component.scss +0 -0
- package/lib/field/scalar-list/scalar-list.component.spec.ts +22 -0
- package/lib/field/scalar-list/scalar-list.component.ts +119 -0
- package/lib/field/semantic-link/config-ext.json +7 -0
- package/lib/field/semantic-link/semantic-link.component.html +10 -0
- package/lib/field/semantic-link/semantic-link.component.scss +16 -0
- package/lib/field/semantic-link/semantic-link.component.spec.ts +0 -0
- package/lib/field/semantic-link/semantic-link.component.ts +70 -0
- package/lib/field/text/text.component.html +14 -0
- package/lib/field/text/text.component.scss +30 -0
- package/lib/field/text/text.component.spec.ts +24 -0
- package/lib/field/text/text.component.ts +158 -0
- package/lib/field/text-area/config-ext.json +8 -0
- package/lib/field/text-area/text-area.component.html +29 -0
- package/lib/field/text-area/text-area.component.scss +20 -0
- package/lib/field/text-area/text-area.component.spec.ts +24 -0
- package/lib/field/text-area/text-area.component.ts +186 -0
- package/lib/field/text-content/config-ext.json +7 -0
- package/lib/field/text-content/text-content.component.html +7 -0
- package/lib/field/text-content/text-content.component.scss +4 -0
- package/lib/field/text-content/text-content.component.spec.ts +24 -0
- package/lib/field/text-content/text-content.component.ts +89 -0
- package/lib/field/text-input/config-ext.json +8 -0
- package/lib/field/text-input/text-input.component.html +27 -0
- package/lib/field/text-input/text-input.component.scss +20 -0
- package/lib/field/text-input/text-input.component.spec.ts +24 -0
- package/lib/field/text-input/text-input.component.ts +183 -0
- package/lib/field/time/config-ext.json +8 -0
- package/lib/field/time/time.component.html +26 -0
- package/lib/field/time/time.component.scss +20 -0
- package/lib/field/time/time.component.spec.ts +24 -0
- package/lib/field/time/time.component.ts +177 -0
- package/lib/field/url/config-ext.json +8 -0
- package/lib/field/url/url.component.html +26 -0
- package/lib/field/url/url.component.scss +20 -0
- package/lib/field/url/url.component.spec.ts +24 -0
- package/lib/field/url/url.component.ts +179 -0
- package/lib/field/user-reference/config-ext.json +7 -0
- package/lib/field/user-reference/user-reference.component.html +48 -0
- package/lib/field/user-reference/user-reference.component.scss +30 -0
- package/lib/field/user-reference/user-reference.component.spec.ts +24 -0
- package/lib/field/user-reference/user-reference.component.ts +213 -0
- package/lib/infra/Containers/flow-container/flow-container.component.html +39 -0
- package/lib/infra/Containers/flow-container/flow-container.component.scss +33 -0
- package/lib/infra/Containers/flow-container/flow-container.component.spec.ts +24 -0
- package/lib/infra/Containers/flow-container/flow-container.component.ts +633 -0
- package/lib/infra/Containers/flow-container/helpers.ts +79 -0
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.html +1 -0
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.scss +0 -0
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.spec.ts +24 -0
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +24 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.scss +29 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.spec.ts +24 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +394 -0
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.html +1 -0
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.scss +0 -0
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.spec.ts +24 -0
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +35 -0
- package/lib/infra/Containers/view-container/view-container.component.html +31 -0
- package/lib/infra/Containers/view-container/view-container.component.scss +7 -0
- package/lib/infra/Containers/view-container/view-container.component.spec.ts +24 -0
- package/lib/infra/Containers/view-container/view-container.component.ts +289 -0
- package/lib/infra/action-buttons/action-buttons.component.html +12 -0
- package/lib/infra/action-buttons/action-buttons.component.scss +1 -0
- package/lib/infra/action-buttons/action-buttons.component.spec.ts +24 -0
- package/lib/infra/action-buttons/action-buttons.component.ts +25 -0
- package/lib/infra/assignment/assignment.component.html +28 -0
- package/lib/infra/assignment/assignment.component.scss +0 -0
- package/lib/infra/assignment/assignment.component.spec.ts +24 -0
- package/lib/infra/assignment/assignment.component.ts +463 -0
- package/lib/infra/assignment-card/assignment-card.component.html +26 -0
- package/lib/infra/assignment-card/assignment-card.component.scss +9 -0
- package/lib/infra/assignment-card/assignment-card.component.spec.ts +24 -0
- package/lib/infra/assignment-card/assignment-card.component.ts +39 -0
- package/lib/infra/dashboard-filter/dashboard-filter.component.html +35 -0
- package/lib/infra/dashboard-filter/dashboard-filter.component.scss +14 -0
- package/lib/infra/dashboard-filter/dashboard-filter.component.spec.ts +24 -0
- package/lib/infra/dashboard-filter/dashboard-filter.component.ts +90 -0
- package/lib/infra/defer-load/defer-load.component.html +3 -0
- package/lib/infra/defer-load/defer-load.component.scss +0 -0
- package/lib/infra/defer-load/defer-load.component.spec.ts +24 -0
- package/lib/infra/defer-load/defer-load.component.ts +169 -0
- package/lib/infra/error-boundary/error-boundary.component.html +1 -0
- package/lib/infra/error-boundary/error-boundary.component.scss +0 -0
- package/lib/infra/error-boundary/error-boundary.component.spec.ts +22 -0
- package/lib/infra/error-boundary/error-boundary.component.ts +16 -0
- package/lib/infra/multi-step/multi-step.component.html +98 -0
- package/lib/infra/multi-step/multi-step.component.scss +247 -0
- package/lib/infra/multi-step/multi-step.component.spec.ts +24 -0
- package/lib/infra/multi-step/multi-step.component.ts +85 -0
- package/lib/infra/navbar/navbar.component.html +55 -0
- package/lib/infra/navbar/navbar.component.scss +154 -0
- package/lib/infra/navbar/navbar.component.spec.ts +24 -0
- package/lib/infra/navbar/navbar.component.ts +175 -0
- package/lib/infra/reference/reference.component.html +1 -0
- package/lib/infra/reference/reference.component.scss +0 -0
- package/lib/infra/reference/reference.component.ts +165 -0
- package/lib/infra/region/region.component.html +11 -0
- package/lib/infra/region/region.component.scss +0 -0
- package/lib/infra/region/region.component.spec.ts +24 -0
- package/lib/infra/region/region.component.ts +37 -0
- package/lib/infra/root-container/root-container.component.html +36 -0
- package/lib/infra/root-container/root-container.component.scss +20 -0
- package/lib/infra/root-container/root-container.component.spec.ts +24 -0
- package/lib/infra/root-container/root-container.component.ts +256 -0
- package/lib/infra/stages/stages.component.html +15 -0
- package/lib/infra/stages/stages.component.scss +109 -0
- package/lib/infra/stages/stages.component.spec.ts +24 -0
- package/lib/infra/stages/stages.component.ts +83 -0
- package/lib/infra/view/view.component.html +38 -0
- package/lib/infra/view/view.component.scss +16 -0
- package/lib/infra/view/view.component.spec.ts +24 -0
- package/lib/infra/view/view.component.ts +214 -0
- package/lib/template/app-shell/app-shell.component.html +15 -0
- package/lib/template/app-shell/app-shell.component.scss +51 -0
- package/lib/template/app-shell/app-shell.component.spec.ts +24 -0
- package/lib/template/app-shell/app-shell.component.ts +192 -0
- package/lib/template/banner-page/banner-page.component.html +12 -0
- package/lib/template/banner-page/banner-page.component.scss +0 -0
- package/lib/template/banner-page/banner-page.component.spec.ts +22 -0
- package/lib/template/banner-page/banner-page.component.ts +65 -0
- package/lib/template/case-summary/case-summary.component.html +1 -0
- package/lib/template/case-summary/case-summary.component.scss +44 -0
- package/lib/template/case-summary/case-summary.component.spec.ts +24 -0
- package/lib/template/case-summary/case-summary.component.ts +100 -0
- package/lib/template/case-summary/config-ext.json +8 -0
- package/lib/template/case-view/case-view.component.html +89 -0
- package/lib/template/case-view/case-view.component.scss +107 -0
- package/lib/template/case-view/case-view.component.spec.ts +24 -0
- package/lib/template/case-view/case-view.component.ts +242 -0
- package/lib/template/case-view/config-ext.json +8 -0
- package/lib/template/confirmation/config-ext.json +11 -0
- package/lib/template/confirmation/confirmation.component.html +23 -0
- package/lib/template/confirmation/confirmation.component.scss +10 -0
- package/lib/template/confirmation/confirmation.component.spec.ts +23 -0
- package/lib/template/confirmation/confirmation.component.ts +91 -0
- package/lib/template/data-reference/config-ext.json +8 -0
- package/lib/template/data-reference/data-reference.component.html +13 -0
- package/lib/template/data-reference/data-reference.component.scss +0 -0
- package/lib/template/data-reference/data-reference.component.spec.ts +24 -0
- package/lib/template/data-reference/data-reference.component.ts +275 -0
- package/lib/template/default-form/config-ext.json +8 -0
- package/lib/template/default-form/default-form.component.html +19 -0
- package/lib/template/default-form/default-form.component.scss +38 -0
- package/lib/template/default-form/default-form.component.spec.ts +24 -0
- package/lib/template/default-form/default-form.component.ts +76 -0
- package/lib/template/details/config-ext.json +9 -0
- package/lib/template/details/details.component.html +3 -0
- package/lib/template/details/details.component.scss +7 -0
- package/lib/template/details/details.component.spec.ts +24 -0
- package/lib/template/details/details.component.ts +113 -0
- package/lib/template/details-narrow-wide/config-ext.json +8 -0
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +4 -0
- package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +7 -0
- package/lib/template/details-narrow-wide/details-narrow-wide.component.spec.ts +24 -0
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +82 -0
- package/lib/template/details-one-column/config-ext.json +9 -0
- package/lib/template/details-one-column/details-one-column.component.html +1 -0
- package/lib/template/details-one-column/details-one-column.component.scss +0 -0
- package/lib/template/details-one-column/details-one-column.component.spec.ts +24 -0
- package/lib/template/details-one-column/details-one-column.component.ts +85 -0
- package/lib/template/details-sub-tabs/config-ext.json +8 -0
- package/lib/template/details-sub-tabs/details-sub-tabs.component.html +15 -0
- package/lib/template/details-sub-tabs/details-sub-tabs.component.scss +0 -0
- package/lib/template/details-sub-tabs/details-sub-tabs.component.spec.ts +24 -0
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +73 -0
- package/lib/template/details-three-column/config-ext.json +8 -0
- package/lib/template/details-three-column/details-three-column.component.html +4 -0
- package/lib/template/details-three-column/details-three-column.component.scss +7 -0
- package/lib/template/details-three-column/details-three-column.component.spec.ts +24 -0
- package/lib/template/details-three-column/details-three-column.component.ts +94 -0
- package/lib/template/details-two-column/config-ext.json +8 -0
- package/lib/template/details-two-column/details-two-column.component.html +4 -0
- package/lib/template/details-two-column/details-two-column.component.scss +7 -0
- package/lib/template/details-two-column/details-two-column.component.spec.ts +24 -0
- package/lib/template/details-two-column/details-two-column.component.ts +92 -0
- package/lib/template/details-wide-narrow/config-ext.json +8 -0
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +4 -0
- package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +7 -0
- package/lib/template/details-wide-narrow/details-wide-narrow.component.spec.ts +24 -0
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +88 -0
- package/lib/template/dynamic-tabs/config-ext.json +36 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.html +5 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.scss +0 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.spec.ts +22 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +78 -0
- package/lib/template/field-group-list/field-group-list.component.html +8 -0
- package/lib/template/field-group-list/field-group-list.component.scss +12 -0
- package/lib/template/field-group-list/field-group-list.component.spec.ts +22 -0
- package/lib/template/field-group-list/field-group-list.component.ts +18 -0
- package/lib/template/field-group-template/field-group-template.component.html +33 -0
- package/lib/template/field-group-template/field-group-template.component.scss +8 -0
- package/lib/template/field-group-template/field-group-template.component.spec.ts +22 -0
- package/lib/template/field-group-template/field-group-template.component.ts +168 -0
- package/lib/template/field-value-list/field-value-list.component.html +15 -0
- package/lib/template/field-value-list/field-value-list.component.scss +18 -0
- package/lib/template/field-value-list/field-value-list.component.spec.ts +22 -0
- package/lib/template/field-value-list/field-value-list.component.ts +15 -0
- package/lib/template/inline-dashboard/inline-dashboard.component.html +19 -0
- package/lib/template/inline-dashboard/inline-dashboard.component.scss +31 -0
- package/lib/template/inline-dashboard/inline-dashboard.component.spec.ts +24 -0
- package/lib/template/inline-dashboard/inline-dashboard.component.ts +24 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.html +1 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.scss +0 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.spec.ts +24 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +55 -0
- package/lib/template/list-page/config-ext.json +7 -0
- package/lib/template/list-page/list-page.component.html +1 -0
- package/lib/template/list-page/list-page.component.scss +0 -0
- package/lib/template/list-page/list-page.component.spec.ts +24 -0
- package/lib/template/list-page/list-page.component.ts +13 -0
- package/lib/template/list-view/DefaultViewMeta.ts +220 -0
- package/lib/template/list-view/config-ext.json +8 -0
- package/lib/template/list-view/list-view.component.html +253 -0
- package/lib/template/list-view/list-view.component.scss +169 -0
- package/lib/template/list-view/list-view.component.spec.ts +24 -0
- package/lib/template/list-view/list-view.component.ts +1408 -0
- package/lib/template/list-view/listViewHelpers.ts +87 -0
- package/lib/template/list-view/utils.ts +745 -0
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.html +4 -0
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.scss +0 -0
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.spec.ts +22 -0
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +54 -0
- package/lib/template/narrow-wide-form/config-ext.json +8 -0
- package/lib/template/narrow-wide-form/narrow-wide-form.component.html +16 -0
- package/lib/template/narrow-wide-form/narrow-wide-form.component.scss +20 -0
- package/lib/template/narrow-wide-form/narrow-wide-form.component.spec.ts +24 -0
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +34 -0
- package/lib/template/one-column/config-ext.json +8 -0
- package/lib/template/one-column/one-column.component.html +11 -0
- package/lib/template/one-column/one-column.component.scss +3 -0
- package/lib/template/one-column/one-column.component.spec.ts +24 -0
- package/lib/template/one-column/one-column.component.ts +34 -0
- package/lib/template/one-column-page/config-ext.json +8 -0
- package/lib/template/one-column-page/one-column-page.component.html +1 -0
- package/lib/template/one-column-page/one-column-page.component.scss +0 -0
- package/lib/template/one-column-page/one-column-page.component.spec.ts +24 -0
- package/lib/template/one-column-page/one-column-page.component.ts +15 -0
- package/lib/template/one-column-tab/config-ext.json +8 -0
- package/lib/template/one-column-tab/one-column-tab.component.html +9 -0
- package/lib/template/one-column-tab/one-column-tab.component.scss +9 -0
- package/lib/template/one-column-tab/one-column-tab.component.ts +34 -0
- package/lib/template/page/page.component.html +12 -0
- package/lib/template/page/page.component.scss +3 -0
- package/lib/template/page/page.component.spec.ts +24 -0
- package/lib/template/page/page.component.ts +68 -0
- package/lib/template/promoted-filters/promoted-filters.component.html +27 -0
- package/lib/template/promoted-filters/promoted-filters.component.scss +7 -0
- package/lib/template/promoted-filters/promoted-filters.component.spec.ts +24 -0
- package/lib/template/promoted-filters/promoted-filters.component.ts +157 -0
- package/lib/template/repeating-structures/repeating-structures.component.html +21 -0
- package/lib/template/repeating-structures/repeating-structures.component.scss +17 -0
- package/lib/template/repeating-structures/repeating-structures.component.spec.ts +24 -0
- package/lib/template/repeating-structures/repeating-structures.component.ts +155 -0
- package/lib/template/simple-table/config-ext.json +7 -0
- package/lib/template/simple-table/simple-table.component.html +13 -0
- package/lib/template/simple-table/simple-table.component.scss +0 -0
- package/lib/template/simple-table/simple-table.component.spec.ts +24 -0
- package/lib/template/simple-table/simple-table.component.ts +171 -0
- package/lib/template/simple-table-manual/helpers.ts +294 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.html +147 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +185 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.spec.ts +24 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +950 -0
- package/lib/template/simple-table-select/simple-table-select.component.html +14 -0
- package/lib/template/simple-table-select/simple-table-select.component.scss +0 -0
- package/lib/template/simple-table-select/simple-table-select.component.spec.ts +24 -0
- package/lib/template/simple-table-select/simple-table-select.component.ts +151 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +1 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +0 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.spec.ts +22 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +15 -0
- package/lib/template/sub-tabs/config-ext.json +8 -0
- package/lib/template/sub-tabs/sub-tabs.component.html +12 -0
- package/lib/template/sub-tabs/sub-tabs.component.scss +3 -0
- package/lib/template/sub-tabs/sub-tabs.component.spec.ts +24 -0
- package/lib/template/sub-tabs/sub-tabs.component.ts +76 -0
- package/lib/template/three-column/config-ext.json +8 -0
- package/lib/template/three-column/three-column.component.html +13 -0
- package/lib/template/three-column/three-column.component.scss +16 -0
- package/lib/template/three-column/three-column.component.spec.ts +24 -0
- package/lib/template/three-column/three-column.component.ts +34 -0
- package/lib/template/three-column-page/config-ext.json +8 -0
- package/lib/template/three-column-page/three-column-page.component.html +1 -0
- package/lib/template/three-column-page/three-column-page.component.scss +0 -0
- package/lib/template/three-column-page/three-column-page.component.spec.ts +24 -0
- package/lib/template/three-column-page/three-column-page.component.ts +15 -0
- package/lib/template/two-column/config-ext.json +8 -0
- package/lib/template/two-column/two-column.component.html +16 -0
- package/lib/template/two-column/two-column.component.scss +28 -0
- package/lib/template/two-column/two-column.component.spec.ts +24 -0
- package/lib/template/two-column/two-column.component.ts +34 -0
- package/lib/template/two-column-page/config-ext.json +8 -0
- package/lib/template/two-column-page/two-column-page.component.html +1 -0
- package/lib/template/two-column-page/two-column-page.component.scss +0 -0
- package/lib/template/two-column-page/two-column-page.component.spec.ts +24 -0
- package/lib/template/two-column-page/two-column-page.component.ts +43 -0
- package/lib/template/two-column-tab/config-ext.json +8 -0
- package/lib/template/two-column-tab/two-column-tab.component.html +16 -0
- package/lib/template/two-column-tab/two-column-tab.component.scss +28 -0
- package/lib/template/two-column-tab/two-column-tab.component.spec.ts +24 -0
- package/lib/template/two-column-tab/two-column-tab.component.ts +34 -0
- package/lib/template/utils.ts +23 -0
- package/lib/template/wide-narrow-form/config-ext.json +8 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.html +16 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.scss +20 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.spec.ts +24 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +34 -0
- package/lib/template/wide-narrow-page/config-ext.json +8 -0
- package/lib/template/wide-narrow-page/wide-narrow-page.component.html +6 -0
- package/lib/template/wide-narrow-page/wide-narrow-page.component.scss +0 -0
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +61 -0
- package/lib/template/wss-nav-bar/wss-nav-bar.component.html +32 -0
- package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +166 -0
- package/lib/template/wss-nav-bar/wss-nav-bar.component.spec.ts +22 -0
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +172 -0
- package/lib/widget/app-announcement/app-announcement.component.html +13 -0
- package/lib/widget/app-announcement/app-announcement.component.scss +21 -0
- package/lib/widget/app-announcement/app-announcement.component.spec.ts +24 -0
- package/lib/widget/app-announcement/app-announcement.component.ts +35 -0
- package/lib/widget/app-announcement/config-ext.json +8 -0
- package/lib/widget/attachment/attachment.component.html +31 -0
- package/lib/widget/attachment/attachment.component.scss +57 -0
- package/lib/widget/attachment/attachment.component.spec.ts +24 -0
- package/lib/widget/attachment/attachment.component.ts +705 -0
- package/lib/widget/attachment/config-ext.json +7 -0
- package/lib/widget/case-history/case-history.component.html +12 -0
- package/lib/widget/case-history/case-history.component.scss +22 -0
- package/lib/widget/case-history/case-history.component.spec.ts +24 -0
- package/lib/widget/case-history/case-history.component.ts +104 -0
- package/lib/widget/case-history/config-ext.json +8 -0
- package/lib/widget/feed-container/config-ext.json +12 -0
- package/lib/widget/feed-container/feed-api.ts +410 -0
- package/lib/widget/feed-container/feed-container.component.html +137 -0
- package/lib/widget/feed-container/feed-container.component.scss +188 -0
- package/lib/widget/feed-container/feed-container.component.spec.ts +24 -0
- package/lib/widget/feed-container/feed-container.component.ts +616 -0
- package/lib/widget/file-utility/config-ext.json +8 -0
- package/lib/widget/file-utility/file-utility.component.html +100 -0
- package/lib/widget/file-utility/file-utility.component.scss +107 -0
- package/lib/widget/file-utility/file-utility.component.spec.ts +24 -0
- package/lib/widget/file-utility/file-utility.component.ts +759 -0
- package/lib/widget/list-utility/list-utility.component.html +32 -0
- package/lib/widget/list-utility/list-utility.component.scss +135 -0
- package/lib/widget/list-utility/list-utility.component.spec.ts +24 -0
- package/lib/widget/list-utility/list-utility.component.ts +47 -0
- package/lib/widget/quick-create/quick-create.component.html +1 -0
- package/lib/widget/quick-create/quick-create.component.scss +0 -0
- package/lib/widget/quick-create/quick-create.component.spec.ts +22 -0
- package/lib/widget/quick-create/quick-create.component.ts +96 -0
- package/lib/widget/todo/config-ext.json +8 -0
- package/lib/widget/todo/todo.component.html +47 -0
- package/lib/widget/todo/todo.component.scss +98 -0
- package/lib/widget/todo/todo.component.spec.ts +24 -0
- package/lib/widget/todo/todo.component.ts +265 -0
- package/lib/widget/utility/utility.component.html +1 -0
- package/lib/widget/utility/utility.component.scss +0 -0
- package/lib/widget/utility/utility.component.spec.ts +24 -0
- package/lib/widget/utility/utility.component.ts +50 -0
- package/package.json +14 -0
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
import { Component, OnInit, Input, NgZone, forwardRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
6
|
+
import download from 'downloadjs';
|
|
7
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
8
|
+
import { Utils } from '@pega/angular-sdk-components';
|
|
9
|
+
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
10
|
+
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
11
|
+
|
|
12
|
+
interface AttachmentProps extends Omit<PConnFieldProps, 'value'> {
|
|
13
|
+
// If any, enter additional props that only exist on this component
|
|
14
|
+
value: any;
|
|
15
|
+
extensions: any;
|
|
16
|
+
allowMultiple: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
selector: 'app-attachment',
|
|
21
|
+
templateUrl: './attachment.component.html',
|
|
22
|
+
styleUrls: ['./attachment.component.scss'],
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [CommonModule, MatProgressSpinnerModule, MatButtonModule, forwardRef(() => ComponentMapperComponent)]
|
|
25
|
+
})
|
|
26
|
+
export class AttachmentComponent implements OnInit, OnDestroy {
|
|
27
|
+
@Input() pConn$: typeof PConnect;
|
|
28
|
+
@Input() formGroup$: FormGroup;
|
|
29
|
+
|
|
30
|
+
// For interaction with AngularPConnect
|
|
31
|
+
angularPConnectData: AngularPConnectData = {};
|
|
32
|
+
|
|
33
|
+
label$ = '';
|
|
34
|
+
value$: any;
|
|
35
|
+
bRequired$ = false;
|
|
36
|
+
bReadonly$ = false;
|
|
37
|
+
bDisabled$ = false;
|
|
38
|
+
bVisible$ = true;
|
|
39
|
+
bLoading$ = false;
|
|
40
|
+
arFiles$: any[] = [];
|
|
41
|
+
arFileList$: any[] = [];
|
|
42
|
+
removeFileFromList$: any;
|
|
43
|
+
arMenuList$: any[] = [];
|
|
44
|
+
bShowSelector$ = true;
|
|
45
|
+
bShowJustDelete$ = false;
|
|
46
|
+
att_valueRef: any;
|
|
47
|
+
att_categoryName: string;
|
|
48
|
+
att_id: string;
|
|
49
|
+
myFiles: any;
|
|
50
|
+
fileTemp: any = {};
|
|
51
|
+
caseID: any;
|
|
52
|
+
allowMultiple$ = false;
|
|
53
|
+
extensions$ = '';
|
|
54
|
+
status = '';
|
|
55
|
+
validateMessage: string | undefined = '';
|
|
56
|
+
valueRef: string;
|
|
57
|
+
imagePath$: string;
|
|
58
|
+
|
|
59
|
+
constructor(
|
|
60
|
+
private angularPConnect: AngularPConnectService,
|
|
61
|
+
private utils: Utils,
|
|
62
|
+
private ngZone: NgZone
|
|
63
|
+
) {}
|
|
64
|
+
|
|
65
|
+
ngOnInit(): void {
|
|
66
|
+
// // First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
67
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
68
|
+
|
|
69
|
+
this.removeFileFromList$ = { onClick: this._removeFileFromList.bind(this) };
|
|
70
|
+
|
|
71
|
+
this.caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', this.pConn$.getContextName());
|
|
72
|
+
|
|
73
|
+
// let configProps: any = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
74
|
+
this.checkAndUpdate();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
checkAndUpdate() {
|
|
78
|
+
// Should always check the bridge to see if the component should
|
|
79
|
+
// update itself (re-render)
|
|
80
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
81
|
+
|
|
82
|
+
// ONLY call updateSelf when the component should update
|
|
83
|
+
if (bUpdateSelf) {
|
|
84
|
+
this.updateSelf();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
ngOnDestroy(): void {
|
|
89
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
90
|
+
this.angularPConnectData.unsubscribeFn();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, this.caseID);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Callback passed when subscribing to store change
|
|
97
|
+
onStateChange() {
|
|
98
|
+
this.checkAndUpdate();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
updateAttachmentsInfo() {
|
|
102
|
+
// @ts-ignore - Property 'attachmentsInfo' does not exist on type 'C11nEnv'
|
|
103
|
+
if (!this.pConn$.attachmentsInfo) {
|
|
104
|
+
// @ts-ignore - Property 'attachmentsInfo' does not exist on type 'C11nEnv'
|
|
105
|
+
this.pConn$.attachmentsInfo = {
|
|
106
|
+
type: 'File',
|
|
107
|
+
attachmentFieldName: this.att_valueRef,
|
|
108
|
+
category: this.att_categoryName
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
processFile(file, i) {
|
|
114
|
+
file.props.type = file.responseProps.pyMimeFileExtension;
|
|
115
|
+
file.props.mimeType = file.responseProps.pyMimeFileExtension;
|
|
116
|
+
file.props.ID = file.responseProps.pzInsKey;
|
|
117
|
+
|
|
118
|
+
const arMenuList = [
|
|
119
|
+
{
|
|
120
|
+
icon: 'download',
|
|
121
|
+
text: this.pConn$.getLocalizedValue('Download', '', ''),
|
|
122
|
+
onClick: () => this._downloadFileFromList(this.value$.pxResults[i])
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
icon: 'trash',
|
|
126
|
+
text: this.pConn$.getLocalizedValue('Delete', '', ''),
|
|
127
|
+
onClick: () => this._removeFileFromList(this.arFileList$[i])
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
const arFilesAttachmentIDs: any = [];
|
|
132
|
+
this.arFileList$.forEach(arFile => {
|
|
133
|
+
arFilesAttachmentIDs.push(arFile.id);
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
if (!arFilesAttachmentIDs.includes(file.props.ID)) {
|
|
137
|
+
this.arFileList$.push(
|
|
138
|
+
this.getNewListUtilityItemProps({
|
|
139
|
+
att: file.props,
|
|
140
|
+
downloadFile: null,
|
|
141
|
+
cancelFile: null,
|
|
142
|
+
deleteFile: null,
|
|
143
|
+
removeFile: null
|
|
144
|
+
})
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
this.arFileList$[i].actions = arMenuList;
|
|
149
|
+
this.arFileList$[i].noDeleteIcon = true;
|
|
150
|
+
|
|
151
|
+
this.bShowSelector$ = false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
updateSelf() {
|
|
155
|
+
const configProps: AttachmentProps = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as AttachmentProps;
|
|
156
|
+
const stateProps: any = this.pConn$.getStateProps();
|
|
157
|
+
|
|
158
|
+
const { value, label, extensions } = configProps;
|
|
159
|
+
|
|
160
|
+
if (configProps.required != null) {
|
|
161
|
+
this.bRequired$ = this.utils.getBooleanValue(configProps.required);
|
|
162
|
+
}
|
|
163
|
+
if (configProps.visibility != null) {
|
|
164
|
+
this.bVisible$ = this.utils.getBooleanValue(configProps.visibility);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// disabled
|
|
168
|
+
if (configProps.disabled != undefined) {
|
|
169
|
+
this.bDisabled$ = this.utils.getBooleanValue(configProps.disabled);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (configProps.readOnly != null) {
|
|
173
|
+
this.bReadonly$ = this.utils.getBooleanValue(configProps.readOnly);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (configProps.allowMultiple != null) {
|
|
177
|
+
this.allowMultiple$ = this.utils.getBooleanValue(configProps.allowMultiple);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
this.bShowJustDelete$ = true;
|
|
181
|
+
this.label$ = label;
|
|
182
|
+
this.value$ = value;
|
|
183
|
+
this.status = stateProps.status;
|
|
184
|
+
this.validateMessage = this.angularPConnectData.validateMessage;
|
|
185
|
+
this.extensions$ = extensions;
|
|
186
|
+
this.valueRef = (this.pConn$.getStateProps() as any).value;
|
|
187
|
+
this.valueRef = this.valueRef.startsWith('.') ? this.valueRef.substring(1) : this.valueRef;
|
|
188
|
+
|
|
189
|
+
/* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
|
|
190
|
+
let { required, disabled } = configProps;
|
|
191
|
+
[required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
|
|
192
|
+
|
|
193
|
+
this.att_categoryName = '';
|
|
194
|
+
if (value && value.pyCategoryName) {
|
|
195
|
+
this.att_categoryName = value.pyCategoryName;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
this.att_valueRef = (this.pConn$.getStateProps() as any).value;
|
|
199
|
+
this.att_valueRef = this.att_valueRef.indexOf('.') === 0 ? this.att_valueRef.substring(1) : this.att_valueRef;
|
|
200
|
+
|
|
201
|
+
this.updateAttachments();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
updateAttachments() {
|
|
205
|
+
const attachmentsFromServer = this.value$ && this.value$.pxResults && +this.value$.pyCount > 0;
|
|
206
|
+
|
|
207
|
+
if (attachmentsFromServer) {
|
|
208
|
+
this.updateAttachmentsFromServer();
|
|
209
|
+
} else {
|
|
210
|
+
// Get the attachments from the Redux
|
|
211
|
+
this.myFiles = this.getCurrentAttachmentsList(this.getAttachmentKey(this.att_valueRef), this.pConn$.getContextName());
|
|
212
|
+
|
|
213
|
+
if (this.myFiles?.length && this.arFiles$.length === 0) {
|
|
214
|
+
this.arFileList$ = this.myFiles.map(att => {
|
|
215
|
+
return this.getNewListUtilityItemProps({
|
|
216
|
+
att,
|
|
217
|
+
downloadFile: null,
|
|
218
|
+
cancelFile: null,
|
|
219
|
+
deleteFile: null,
|
|
220
|
+
removeFile: null
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const myFilesAttachmentIDs: any = [];
|
|
226
|
+
this.myFiles.forEach(myFile => {
|
|
227
|
+
myFilesAttachmentIDs.push(myFile.ID);
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
this.arFiles$.forEach(arFile => {
|
|
231
|
+
if (!myFilesAttachmentIDs.includes(arFile.ID)) {
|
|
232
|
+
this.myFiles = [...this.myFiles, arFile];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
this.bShowJustDelete$ = true;
|
|
238
|
+
this.bShowSelector$ = !(this.arFileList$?.length > 0) || this.allowMultiple$;
|
|
239
|
+
|
|
240
|
+
if (this.arFileList$.length > 0) {
|
|
241
|
+
this.CheckForInvalidAttachment();
|
|
242
|
+
}
|
|
243
|
+
PCore.getPubSubUtils().subscribe(
|
|
244
|
+
PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,
|
|
245
|
+
this.resetAttachmentStoredState.bind(this),
|
|
246
|
+
this.caseID
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
updateAttachmentsFromServer() {
|
|
251
|
+
this.value$.pxResults.forEach((attachment, i) => {
|
|
252
|
+
const file: any = this.buildFilePropsFromResponse(attachment);
|
|
253
|
+
if (file.responseProps) {
|
|
254
|
+
this.updateAttachmentsInfo();
|
|
255
|
+
if (file.responseProps.pzInsKey && !file.responseProps.pzInsKey.includes('temp')) {
|
|
256
|
+
this.processFile(file, i);
|
|
257
|
+
}
|
|
258
|
+
if (file) {
|
|
259
|
+
const currentAttachmentList = this.getCurrentAttachmentsList(this.getAttachmentKey(this.att_valueRef), this.pConn$.getContextName());
|
|
260
|
+
const index = currentAttachmentList.findIndex(element => element.props.ID === file.props.ID);
|
|
261
|
+
let tempFiles: any = [];
|
|
262
|
+
if (index < 0) {
|
|
263
|
+
tempFiles = [file];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
PCore.getStateUtils().updateState(
|
|
267
|
+
this.pConn$.getContextName(),
|
|
268
|
+
this.getAttachmentKey(this.att_valueRef),
|
|
269
|
+
[...currentAttachmentList, ...tempFiles],
|
|
270
|
+
{
|
|
271
|
+
pageReference: 'context_data',
|
|
272
|
+
isArrayDeepMerge: false
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
resetAttachmentStoredState() {
|
|
281
|
+
PCore.getStateUtils().updateState(this.pConn$.getContextName(), this.getAttachmentKey(this.att_valueRef), undefined, {
|
|
282
|
+
pageReference: 'context_data',
|
|
283
|
+
isArrayDeepMerge: false
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
_downloadFileFromList(fileObj: any) {
|
|
288
|
+
PCore.getAttachmentUtils()
|
|
289
|
+
// @ts-ignore - 3rd parameter "responseEncoding" should be optional
|
|
290
|
+
.downloadAttachment(fileObj.pzInsKey, this.pConn$.getContextName())
|
|
291
|
+
.then((content: any) => {
|
|
292
|
+
const extension = fileObj.pyAttachName.split('.').pop();
|
|
293
|
+
this.fileDownload(content.data, fileObj.pyFileName, extension);
|
|
294
|
+
})
|
|
295
|
+
.catch(e => {
|
|
296
|
+
console.log(e);
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
fileDownload = (data, fileName, ext) => {
|
|
301
|
+
const file = ext ? `${fileName}.${ext}` : fileName;
|
|
302
|
+
download(atob(data), file);
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
getAttachmentKey = (name = '') => (name ? `attachmentsList.${name}` : 'attachmentsList');
|
|
306
|
+
|
|
307
|
+
CheckForInvalidAttachment() {
|
|
308
|
+
let isValid = true;
|
|
309
|
+
this.arFileList$.forEach(file => {
|
|
310
|
+
if (file.secondary.error) {
|
|
311
|
+
isValid = false;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
if (isValid) {
|
|
315
|
+
// @ts-ignore
|
|
316
|
+
PCore.getMessageManager().clearMessages({
|
|
317
|
+
type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
|
|
318
|
+
property: (this.pConn$.getStateProps() as any).value,
|
|
319
|
+
pageReference: this.pConn$.getPageReference(),
|
|
320
|
+
context: this.pConn$.getContextName()
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
_removeFileFromList(item: any) {
|
|
326
|
+
const fileListIndex = this.arFileList$.findIndex(element => element?.id === item?.id);
|
|
327
|
+
const fileIndex = this.arFiles$.findIndex(element => element?.ID === item?.id);
|
|
328
|
+
|
|
329
|
+
const attachmentsList = [];
|
|
330
|
+
let currentAttachmentList = this.getCurrentAttachmentsList(this.getAttachmentKey(this.att_valueRef), this.pConn$.getContextName());
|
|
331
|
+
if (this.value$ && this.value$.pxResults && +this.value$.pyCount > 0 && item.actions) {
|
|
332
|
+
const updatedAttachments = currentAttachmentList.map(attachment => {
|
|
333
|
+
if (attachment?.ID === this.arFileList$[fileListIndex].id || attachment?.props?.ID === this.arFileList$[fileListIndex].id) {
|
|
334
|
+
return { ...attachment, delete: true, label: this.valueRef };
|
|
335
|
+
}
|
|
336
|
+
return attachment;
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
// updating the redux store to help form-handler in passing the data to delete the file from server
|
|
340
|
+
PCore.getStateUtils().updateState(this.pConn$.getContextName(), this.getAttachmentKey(this.att_valueRef), updatedAttachments, {
|
|
341
|
+
pageReference: 'context_data',
|
|
342
|
+
isArrayDeepMerge: false
|
|
343
|
+
});
|
|
344
|
+
} else {
|
|
345
|
+
currentAttachmentList = currentAttachmentList.filter(f => f.ID !== item.id);
|
|
346
|
+
PCore.getStateUtils().updateState(
|
|
347
|
+
this.pConn$.getContextName(),
|
|
348
|
+
this.getAttachmentKey(this.att_valueRef),
|
|
349
|
+
[...currentAttachmentList, ...attachmentsList],
|
|
350
|
+
{
|
|
351
|
+
pageReference: 'context_data',
|
|
352
|
+
isArrayDeepMerge: false
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (fileListIndex > -1) {
|
|
358
|
+
this.arFileList$.splice(fileListIndex, 1);
|
|
359
|
+
}
|
|
360
|
+
if (fileIndex > -1) {
|
|
361
|
+
this.arFiles$.splice(fileIndex, 1);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
this.CheckForInvalidAttachment();
|
|
365
|
+
|
|
366
|
+
this.bShowSelector$ = !(this.arFileList$?.length > 0) || this.allowMultiple$;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
getCurrentAttachmentsList(key, context) {
|
|
370
|
+
return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
errorHandler(isFetchCanceled, file) {
|
|
374
|
+
return error => {
|
|
375
|
+
if (!isFetchCanceled(error)) {
|
|
376
|
+
let uploadFailMsg = this.pConn$.getLocalizedValue('Something went wrong', '', '');
|
|
377
|
+
if (error.response && error.response.data && error.response.data.errorDetails) {
|
|
378
|
+
uploadFailMsg = this.pConn$.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', '');
|
|
379
|
+
}
|
|
380
|
+
for (const myFile of this.myFiles) {
|
|
381
|
+
if (myFile.ID === file.ID) {
|
|
382
|
+
myFile.meta = uploadFailMsg;
|
|
383
|
+
myFile.error = true;
|
|
384
|
+
myFile.fileName = this.pConn$.getLocalizedValue('Unable to upload file', '', '');
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
this.bShowSelector$ = false;
|
|
388
|
+
this.arFileList$ = this.myFiles.map(att => {
|
|
389
|
+
if (att.id) {
|
|
390
|
+
return att;
|
|
391
|
+
}
|
|
392
|
+
return this.getNewListUtilityItemProps({
|
|
393
|
+
att,
|
|
394
|
+
downloadFile: null,
|
|
395
|
+
cancelFile: null,
|
|
396
|
+
deleteFile: null,
|
|
397
|
+
removeFile: null
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
PCore.getMessageManager().addMessages({
|
|
402
|
+
// @ts-ignore
|
|
403
|
+
messages: [
|
|
404
|
+
{
|
|
405
|
+
type: 'error',
|
|
406
|
+
message: this.pConn$.getLocalizedValue('Error with one or more files', '', '')
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
property: (this.pConn$.getStateProps() as any).value,
|
|
410
|
+
pageReference: this.pConn$.getPageReference(),
|
|
411
|
+
context: this.pConn$.getContextName()
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
this.bShowJustDelete$ = true;
|
|
415
|
+
this.bLoading$ = false;
|
|
416
|
+
}
|
|
417
|
+
throw error;
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
uploadMyFiles(event: any) {
|
|
422
|
+
let arrAttachmentFiles: any = [];
|
|
423
|
+
if (this.arFiles$.length) {
|
|
424
|
+
arrAttachmentFiles = this.arFiles$;
|
|
425
|
+
} else {
|
|
426
|
+
arrAttachmentFiles = this.arFileList$;
|
|
427
|
+
}
|
|
428
|
+
this.arFiles$ = [...arrAttachmentFiles, ...this.getFiles(event.target.files)];
|
|
429
|
+
|
|
430
|
+
// convert FileList to an array
|
|
431
|
+
this.myFiles = Array.from(this.arFiles$);
|
|
432
|
+
|
|
433
|
+
this.bLoading$ = true;
|
|
434
|
+
|
|
435
|
+
const filesToBeUploaded = this.myFiles
|
|
436
|
+
.filter(e => {
|
|
437
|
+
if (e.id) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
const isFileUploaded = e && e.progress === 100;
|
|
441
|
+
const fileHasError = e && e.error;
|
|
442
|
+
const isFileUploadedinLastStep = e.responseProps && e.responseProps.pzInsKey;
|
|
443
|
+
return !isFileUploaded && !fileHasError && !isFileUploadedinLastStep;
|
|
444
|
+
})
|
|
445
|
+
.map(f =>
|
|
446
|
+
PCore.getAttachmentUtils().uploadAttachment(
|
|
447
|
+
f,
|
|
448
|
+
() => {
|
|
449
|
+
this.onUploadProgress();
|
|
450
|
+
},
|
|
451
|
+
isFetchCanceled => {
|
|
452
|
+
return this.errorHandler(isFetchCanceled, f);
|
|
453
|
+
},
|
|
454
|
+
this.pConn$.getContextName()
|
|
455
|
+
)
|
|
456
|
+
);
|
|
457
|
+
|
|
458
|
+
Promise.allSettled(filesToBeUploaded)
|
|
459
|
+
.then((fileResponses: any) => {
|
|
460
|
+
this.handleFileUploadSuccess(fileResponses);
|
|
461
|
+
})
|
|
462
|
+
.catch(error => {
|
|
463
|
+
console.log(error);
|
|
464
|
+
this.handleFileUploadFailure();
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
handleFileUploadSuccess(fileResponses) {
|
|
469
|
+
const successFileResponses = fileResponses.filter(fr => fr.status !== 'rejected'); // in case of deleting an in progress file, promise gets cancelled but still enters then block
|
|
470
|
+
let reqObj;
|
|
471
|
+
if (successFileResponses.length > 0) {
|
|
472
|
+
const tempFilesUploaded = [...this.arFiles$.filter(file => !file.id)];
|
|
473
|
+
let newAttachments: any = [];
|
|
474
|
+
tempFilesUploaded.forEach(fileRes => {
|
|
475
|
+
const index = successFileResponses.findIndex((fr: any) => fr.value.clientFileID === fileRes.ID);
|
|
476
|
+
if (index >= 0) {
|
|
477
|
+
reqObj = {
|
|
478
|
+
type: 'File',
|
|
479
|
+
label: this.att_valueRef,
|
|
480
|
+
category: this.att_categoryName,
|
|
481
|
+
handle: successFileResponses[index].value.ID,
|
|
482
|
+
ID: fileRes.ID,
|
|
483
|
+
name: fileRes.name
|
|
484
|
+
};
|
|
485
|
+
newAttachments = [...newAttachments, reqObj];
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
const currentAttachmentList = this.getCurrentAttachmentsList(this.getAttachmentKey(this.att_valueRef), this.pConn$.getContextName()).filter(
|
|
489
|
+
f => f.label !== this.att_valueRef
|
|
490
|
+
);
|
|
491
|
+
PCore.getStateUtils().updateState(
|
|
492
|
+
this.pConn$.getContextName(),
|
|
493
|
+
this.getAttachmentKey(this.att_valueRef),
|
|
494
|
+
[...currentAttachmentList, ...newAttachments],
|
|
495
|
+
{
|
|
496
|
+
pageReference: 'context_data',
|
|
497
|
+
isArrayDeepMerge: false
|
|
498
|
+
}
|
|
499
|
+
);
|
|
500
|
+
this.arFiles$ = tempFilesUploaded;
|
|
501
|
+
|
|
502
|
+
this.ngZone.run(() => {
|
|
503
|
+
this.bShowSelector$ = this.allowMultiple$;
|
|
504
|
+
this.arFiles$.forEach(file => {
|
|
505
|
+
if (!file.error) {
|
|
506
|
+
file.meta = this.pConn$.getLocalizedValue('File uploaded successfully', '', '');
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
this.arFileList$ = this.myFiles.map(att => {
|
|
510
|
+
if (att.id) {
|
|
511
|
+
return att;
|
|
512
|
+
}
|
|
513
|
+
return this.getNewListUtilityItemProps({
|
|
514
|
+
att,
|
|
515
|
+
downloadFile: null,
|
|
516
|
+
cancelFile: null,
|
|
517
|
+
deleteFile: null,
|
|
518
|
+
removeFile: null
|
|
519
|
+
});
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
this.CheckForInvalidAttachment();
|
|
523
|
+
|
|
524
|
+
this.bShowJustDelete$ = true;
|
|
525
|
+
this.bLoading$ = false;
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
handleFileUploadFailure() {
|
|
531
|
+
this.bShowJustDelete$ = true;
|
|
532
|
+
this.bLoading$ = false;
|
|
533
|
+
this.bShowSelector$ = this.allowMultiple$;
|
|
534
|
+
this.myFiles.forEach(file => {
|
|
535
|
+
if (file?.secondary?.error) {
|
|
536
|
+
file.meta = 'File uploaded failed';
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
this.arFileList$ = this.myFiles.map(att => {
|
|
541
|
+
return this.getNewListUtilityItemProps({
|
|
542
|
+
att,
|
|
543
|
+
downloadFile: null,
|
|
544
|
+
cancelFile: null,
|
|
545
|
+
deleteFile: null,
|
|
546
|
+
removeFile: null
|
|
547
|
+
});
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
this.bShowJustDelete$ = true;
|
|
551
|
+
this.bLoading$ = false;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
getNewListUtilityItemProps = ({ att, cancelFile, downloadFile, deleteFile, removeFile }) => {
|
|
555
|
+
let actions;
|
|
556
|
+
let isDownloadable = false;
|
|
557
|
+
|
|
558
|
+
if (att.progress && att.progress !== 100) {
|
|
559
|
+
actions = [
|
|
560
|
+
{
|
|
561
|
+
id: `Cancel-${att.ID}`,
|
|
562
|
+
text: this.pConn$.getLocalizedValue('Cancel', '', ''),
|
|
563
|
+
icon: 'times',
|
|
564
|
+
onClick: cancelFile
|
|
565
|
+
}
|
|
566
|
+
];
|
|
567
|
+
} else if (att.links) {
|
|
568
|
+
const isFile = att.type === 'FILE';
|
|
569
|
+
const ID = att.ID.replace(/\s/gi, '');
|
|
570
|
+
const actionsMap = new Map([
|
|
571
|
+
[
|
|
572
|
+
'download',
|
|
573
|
+
{
|
|
574
|
+
id: `download-${ID}`,
|
|
575
|
+
text: isFile ? this.pConn$.getLocalizedValue('Download', '', '') : this.pConn$.getLocalizedValue('Open', '', ''),
|
|
576
|
+
icon: isFile ? 'download' : 'open',
|
|
577
|
+
onClick: downloadFile
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
[
|
|
581
|
+
'delete',
|
|
582
|
+
{
|
|
583
|
+
id: `Delete-${ID}`,
|
|
584
|
+
text: this.pConn$.getLocalizedValue('Delete', '', ''),
|
|
585
|
+
icon: 'trash',
|
|
586
|
+
onClick: deleteFile
|
|
587
|
+
}
|
|
588
|
+
]
|
|
589
|
+
]);
|
|
590
|
+
actions = [];
|
|
591
|
+
actionsMap.forEach((action, actionKey) => {
|
|
592
|
+
if (att.links[actionKey]) {
|
|
593
|
+
actions.push(action);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
597
|
+
isDownloadable = att.links.download;
|
|
598
|
+
} else if (att.error) {
|
|
599
|
+
actions = [
|
|
600
|
+
{
|
|
601
|
+
id: `Remove-${att.ID}`,
|
|
602
|
+
text: this.pConn$.getLocalizedValue('Remove', '', ''),
|
|
603
|
+
icon: 'trash',
|
|
604
|
+
onClick: removeFile
|
|
605
|
+
}
|
|
606
|
+
];
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
return {
|
|
610
|
+
id: att.ID,
|
|
611
|
+
visual: {
|
|
612
|
+
icon: this.utils.getIconForAttachment(att),
|
|
613
|
+
progress: att.progress == 100 ? undefined : att.progress
|
|
614
|
+
},
|
|
615
|
+
primary: {
|
|
616
|
+
type: att.type,
|
|
617
|
+
name: att.error ? att.fileName : att.name,
|
|
618
|
+
icon: 'trash',
|
|
619
|
+
click: removeFile
|
|
620
|
+
},
|
|
621
|
+
secondary: {
|
|
622
|
+
text: att.meta,
|
|
623
|
+
error: att.error
|
|
624
|
+
},
|
|
625
|
+
actions
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
onUploadProgress() {}
|
|
630
|
+
|
|
631
|
+
getFiles(arFiles: any[]): any[] {
|
|
632
|
+
const files = this.allowMultiple$ ? arFiles : [arFiles[0]];
|
|
633
|
+
return this.setNewFiles(files);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
setNewFiles(arFiles) {
|
|
637
|
+
let index = 0;
|
|
638
|
+
const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize() || 5;
|
|
639
|
+
for (const file of arFiles) {
|
|
640
|
+
file.mimeType = file.type;
|
|
641
|
+
file.icon = this.utils.getIconFromFileType(file.type);
|
|
642
|
+
file.ID = `${new Date().getTime()}I${index}`;
|
|
643
|
+
|
|
644
|
+
if (!this.validateMaxSize(file, maxAttachmentSize)) {
|
|
645
|
+
file.error = true;
|
|
646
|
+
file.meta = this.pConn$.getLocalizedValue('File is too big. Max allowed size is 5MB.', '', '');
|
|
647
|
+
} else if (!this.validateFileExtension(file, this.extensions$)) {
|
|
648
|
+
file.error = true;
|
|
649
|
+
file.meta = `${this.pConn$.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${this.extensions$.replaceAll(
|
|
650
|
+
'.',
|
|
651
|
+
''
|
|
652
|
+
)}`;
|
|
653
|
+
}
|
|
654
|
+
if (file.error) {
|
|
655
|
+
const fieldName = (this.pConn$.getStateProps() as any).value;
|
|
656
|
+
const context = this.pConn$.getContextName();
|
|
657
|
+
PCore.getMessageManager().addMessages({
|
|
658
|
+
// @ts-ignore
|
|
659
|
+
messages: [
|
|
660
|
+
{
|
|
661
|
+
type: 'error',
|
|
662
|
+
message: this.pConn$.getLocalizedValue('Error with one or more files', '', '')
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
property: fieldName,
|
|
666
|
+
pageReference: this.pConn$.getPageReference(),
|
|
667
|
+
context
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
index++;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
return [...arFiles];
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
validateMaxSize(fileObj, maxSizeInMB): boolean {
|
|
677
|
+
const fileSize = (fileObj.size / 1048576).toFixed(2);
|
|
678
|
+
return parseFloat(fileSize) < parseFloat(maxSizeInMB);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
validateFileExtension = (fileObj, allowedExtensions) => {
|
|
682
|
+
if (!allowedExtensions) {
|
|
683
|
+
return true;
|
|
684
|
+
}
|
|
685
|
+
const allowedExtensionList = allowedExtensions
|
|
686
|
+
.toLowerCase()
|
|
687
|
+
.split(',')
|
|
688
|
+
.map(item => item.replaceAll('.', '').trim());
|
|
689
|
+
const extension = fileObj.name.split('.').pop().toLowerCase();
|
|
690
|
+
return allowedExtensionList.includes(extension);
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
buildFilePropsFromResponse(respObj) {
|
|
694
|
+
return {
|
|
695
|
+
props: {
|
|
696
|
+
meta: `${respObj.pyCategoryName}, ${respObj.pxCreateOperator}`,
|
|
697
|
+
name: respObj.pyAttachName,
|
|
698
|
+
icon: this.utils.getIconFromFileType(respObj.pyMimeFileExtension)
|
|
699
|
+
},
|
|
700
|
+
responseProps: {
|
|
701
|
+
...respObj
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
}
|