@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,759 @@
|
|
|
1
|
+
import { Component, OnInit, Input, NgZone, forwardRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
4
|
+
import { MatInputModule } from '@angular/material/input';
|
|
5
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
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
|
+
|
|
11
|
+
interface FileUtilityProps {
|
|
12
|
+
// If any, enter additional props that only exist on this component
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'app-file-utility',
|
|
18
|
+
templateUrl: './file-utility.component.html',
|
|
19
|
+
styleUrls: ['./file-utility.component.scss'],
|
|
20
|
+
standalone: true,
|
|
21
|
+
imports: [CommonModule, MatButtonModule, MatFormFieldModule, MatInputModule, forwardRef(() => ComponentMapperComponent)]
|
|
22
|
+
})
|
|
23
|
+
export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
24
|
+
@Input() pConn$: typeof PConnect;
|
|
25
|
+
|
|
26
|
+
// For interaction with AngularPConnect
|
|
27
|
+
angularPConnectData: AngularPConnectData = {};
|
|
28
|
+
|
|
29
|
+
arFullListAttachments: any[] = [];
|
|
30
|
+
|
|
31
|
+
lu_name$ = '';
|
|
32
|
+
lu_icon$ = '';
|
|
33
|
+
lu_bLoading$ = false;
|
|
34
|
+
lu_count$ = 0;
|
|
35
|
+
lu_arActions$: any[] = [];
|
|
36
|
+
lu_arItems$: any = [];
|
|
37
|
+
|
|
38
|
+
va_arItems$: any[] = [];
|
|
39
|
+
|
|
40
|
+
lu_onViewAllFunction: any;
|
|
41
|
+
|
|
42
|
+
bShowFileModal$ = false;
|
|
43
|
+
bShowLinkModal$ = false;
|
|
44
|
+
bShowViewAllModal$ = false;
|
|
45
|
+
|
|
46
|
+
arFileMainButtons$: any[] = [];
|
|
47
|
+
arFileSecondaryButtons$: any[] = [];
|
|
48
|
+
|
|
49
|
+
arLinkMainButtons$: any[] = [];
|
|
50
|
+
arLinkSecondaryButtons$: any[] = [];
|
|
51
|
+
|
|
52
|
+
arFiles$: any[] = [];
|
|
53
|
+
arFileList$: any[] = [];
|
|
54
|
+
removeFileFromList$: any;
|
|
55
|
+
|
|
56
|
+
arLinks$: any[] = [];
|
|
57
|
+
arLinksList$: any[] = [];
|
|
58
|
+
removeLinksFromList$: any;
|
|
59
|
+
|
|
60
|
+
link_title$ = '';
|
|
61
|
+
link_url$ = '';
|
|
62
|
+
|
|
63
|
+
closeSvgIcon$ = '';
|
|
64
|
+
|
|
65
|
+
currentCaseID = '';
|
|
66
|
+
|
|
67
|
+
addAttachmentsActions: any[] = [
|
|
68
|
+
{
|
|
69
|
+
text: 'Add files',
|
|
70
|
+
id: 'addNewFiles',
|
|
71
|
+
onClick: () => this.createModal('addLocalFile')
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
text: 'Add links',
|
|
75
|
+
id: 'addNewLinks',
|
|
76
|
+
onClick: () => this.createModal('addLocalLink')
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
constructor(
|
|
81
|
+
private angularPConnect: AngularPConnectService,
|
|
82
|
+
private utils: Utils,
|
|
83
|
+
private ngZone: NgZone
|
|
84
|
+
) {}
|
|
85
|
+
|
|
86
|
+
ngOnInit(): void {
|
|
87
|
+
// // First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
88
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
89
|
+
|
|
90
|
+
const configProps: FileUtilityProps = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
91
|
+
|
|
92
|
+
this.lu_name$ = configProps.label ?? '';
|
|
93
|
+
this.lu_icon$ = 'paper-clip';
|
|
94
|
+
|
|
95
|
+
this.closeSvgIcon$ = this.utils.getImageSrc('times', this.utils.getSDKStaticContentUrl());
|
|
96
|
+
|
|
97
|
+
// const onViewAllCallback = () => this.onViewAll(this.arFullListAttachments);
|
|
98
|
+
|
|
99
|
+
this.lu_onViewAllFunction = { onClick: this.onViewAll.bind(this) };
|
|
100
|
+
|
|
101
|
+
this.removeFileFromList$ = { onClick: this.removeFileFromList.bind(this) };
|
|
102
|
+
this.removeLinksFromList$ = { onClick: this.removeLinksFromList.bind(this) };
|
|
103
|
+
|
|
104
|
+
this.updateSelf();
|
|
105
|
+
|
|
106
|
+
this.createModalButtons();
|
|
107
|
+
|
|
108
|
+
PCore.getPubSubUtils().subscribe(
|
|
109
|
+
(PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,
|
|
110
|
+
this.updateSelf.bind(this),
|
|
111
|
+
'caseAttachmentsUpdateFromCaseview'
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ngOnDestroy(): void {
|
|
116
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
117
|
+
this.angularPConnectData.unsubscribeFn();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
PCore.getPubSubUtils().unsubscribe(
|
|
121
|
+
(PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,
|
|
122
|
+
'caseAttachmentsUpdateFromCaseview'
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Callback passed when subscribing to store change
|
|
127
|
+
onStateChange() {
|
|
128
|
+
// adding a property to track in configProps, when ever the attachment file changes
|
|
129
|
+
// need to trigger a redraw
|
|
130
|
+
this.pConn$.registerAdditionalProps({
|
|
131
|
+
lastRefreshTime: `@P ${PCore.getConstants().SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME}`
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Should always check the bridge to see if the component should update itself (re-render)
|
|
135
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
136
|
+
|
|
137
|
+
// ONLY call updateSelf when the component should update
|
|
138
|
+
if (bUpdateSelf || this.caseHasChanged()) {
|
|
139
|
+
this.updateSelf();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
onAttachFiles(files) {
|
|
144
|
+
const attachmentUtils = PCore.getAttachmentUtils();
|
|
145
|
+
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
146
|
+
const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
|
|
147
|
+
|
|
148
|
+
if (files.length > 0) {
|
|
149
|
+
this.lu_bLoading$ = true;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// const uploadedFiles = [];
|
|
153
|
+
|
|
154
|
+
for (const file of files) {
|
|
155
|
+
attachmentUtils
|
|
156
|
+
.uploadAttachment(file, this.onUploadProgress, this.errorHandler, this.pConn$.getContextName())
|
|
157
|
+
.then((fileResponse: any) => {
|
|
158
|
+
if (fileResponse.type === 'File') {
|
|
159
|
+
(attachmentUtils.linkAttachmentsToCase(caseID, [fileResponse], 'File', this.pConn$.getContextName()) as Promise<any>)
|
|
160
|
+
.then(() => {
|
|
161
|
+
this.refreshAttachments();
|
|
162
|
+
})
|
|
163
|
+
.catch(console.error);
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
.catch(console.error);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
this.arFileList$ = [];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
refreshAttachments() {
|
|
173
|
+
this.updateSelf();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
onUploadProgress() {}
|
|
177
|
+
|
|
178
|
+
errorHandler() {}
|
|
179
|
+
|
|
180
|
+
onAttachLinks(links) {
|
|
181
|
+
const attachmentUtils = PCore.getAttachmentUtils();
|
|
182
|
+
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
183
|
+
const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
|
|
184
|
+
|
|
185
|
+
if (links.length > 0) {
|
|
186
|
+
this.lu_bLoading$ = true;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const linksToAttach = links.map(link => ({
|
|
190
|
+
type: 'URL',
|
|
191
|
+
category: 'URL',
|
|
192
|
+
url: link.url,
|
|
193
|
+
name: link.linkTitle
|
|
194
|
+
}));
|
|
195
|
+
|
|
196
|
+
(attachmentUtils.linkAttachmentsToCase(caseID, linksToAttach, 'URL', this.pConn$.getContextName()) as Promise<any>)
|
|
197
|
+
.then(() => {
|
|
198
|
+
this.refreshAttachments();
|
|
199
|
+
})
|
|
200
|
+
.catch(console.log);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
addAttachments(attsFromResp: any[] = []) {
|
|
204
|
+
this.lu_bLoading$ = false;
|
|
205
|
+
|
|
206
|
+
attsFromResp = attsFromResp.map(respAtt => {
|
|
207
|
+
const updatedAtt = {
|
|
208
|
+
...respAtt,
|
|
209
|
+
meta: `${respAtt.category} . ${this.utils.generateDateTime(respAtt.createTime, 'DateTime-Since')}, ${respAtt.createdBy}`
|
|
210
|
+
};
|
|
211
|
+
if (updatedAtt.type === 'FILE') {
|
|
212
|
+
updatedAtt.nameWithExt = updatedAtt.fileName;
|
|
213
|
+
}
|
|
214
|
+
return updatedAtt;
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
return attsFromResp;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
onViewAll(): void {
|
|
221
|
+
this.bShowViewAllModal$ = true;
|
|
222
|
+
|
|
223
|
+
// add clickAway listener
|
|
224
|
+
// window.addEventListener('mouseup', this._clickAway.bind(this));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Below method is not needed, still having it commented in case we want in future
|
|
228
|
+
// _clickAway(event: any) {
|
|
229
|
+
// let bInPopUp = false;
|
|
230
|
+
|
|
231
|
+
// // run through list of elements in path, if menu not in th path, then want to
|
|
232
|
+
// // hide (toggle) the menu
|
|
233
|
+
// for (const i in event.path) {
|
|
234
|
+
// if (event.path[i].className == 'psdk-modal-file-top' || event.path[i].tagName == 'BUTTON') {
|
|
235
|
+
// bInPopUp = true;
|
|
236
|
+
// break;
|
|
237
|
+
// }
|
|
238
|
+
// }
|
|
239
|
+
// if (!bInPopUp) {
|
|
240
|
+
// this.bShowViewAllModal$ = false;
|
|
241
|
+
|
|
242
|
+
// window.removeEventListener('mouseup', this._clickAway.bind(this));
|
|
243
|
+
// }
|
|
244
|
+
// }
|
|
245
|
+
|
|
246
|
+
_closeViewAll() {
|
|
247
|
+
this.bShowViewAllModal$ = false;
|
|
248
|
+
|
|
249
|
+
// window.removeEventListener('mouseup', this._clickAway.bind(this));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
removeFileFromList(item: any) {
|
|
253
|
+
if (item != null) {
|
|
254
|
+
const arFileList = this.arFileList$;
|
|
255
|
+
const itemId = item.id;
|
|
256
|
+
|
|
257
|
+
for (let fileIndex = 0; fileIndex < arFileList.length; fileIndex++) {
|
|
258
|
+
if (arFileList[fileIndex].id == itemId) {
|
|
259
|
+
// remove the file from the list and redraw
|
|
260
|
+
this.ngZone.run(() => {
|
|
261
|
+
arFileList.splice(fileIndex, 1);
|
|
262
|
+
});
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
removeLinksFromList(item: any) {
|
|
270
|
+
const localLinksList = this.arLinksList$.slice();
|
|
271
|
+
|
|
272
|
+
if (item != null) {
|
|
273
|
+
const itemId = item.id;
|
|
274
|
+
|
|
275
|
+
for (let linkIndex = 0; linkIndex < localLinksList.length; linkIndex++) {
|
|
276
|
+
if (localLinksList[linkIndex].id == itemId) {
|
|
277
|
+
// remove the file from the list and redraw
|
|
278
|
+
localLinksList.splice(linkIndex, 1);
|
|
279
|
+
|
|
280
|
+
this.ngZone.run(() => {
|
|
281
|
+
this.arLinksList$ = localLinksList.slice();
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
getNewListUtilityItemProps = ({ att, cancelFile, downloadFile, deleteFile, removeFile }) => {
|
|
291
|
+
let actions;
|
|
292
|
+
let isDownloadable = false;
|
|
293
|
+
|
|
294
|
+
if (att.progress && att.progress !== 100) {
|
|
295
|
+
actions = [
|
|
296
|
+
{
|
|
297
|
+
id: `Cancel-${att.ID}`,
|
|
298
|
+
text: 'Cancel',
|
|
299
|
+
icon: 'times',
|
|
300
|
+
onClick: cancelFile
|
|
301
|
+
}
|
|
302
|
+
];
|
|
303
|
+
} else if (att.links) {
|
|
304
|
+
const isFile = att.type === 'FILE';
|
|
305
|
+
const ID = att.ID.replace(/\s/gi, '');
|
|
306
|
+
const actionsMap = new Map([
|
|
307
|
+
[
|
|
308
|
+
'download',
|
|
309
|
+
{
|
|
310
|
+
id: `download-${ID}`,
|
|
311
|
+
text: isFile ? 'Download' : 'Open',
|
|
312
|
+
icon: isFile ? 'download' : 'open',
|
|
313
|
+
onClick: downloadFile
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
[
|
|
317
|
+
'delete',
|
|
318
|
+
{
|
|
319
|
+
id: `Delete-${ID}`,
|
|
320
|
+
text: 'Delete',
|
|
321
|
+
icon: 'trash',
|
|
322
|
+
onClick: deleteFile
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
]);
|
|
326
|
+
actions = [];
|
|
327
|
+
actionsMap.forEach((action, actionKey) => {
|
|
328
|
+
if (att.links[actionKey]) {
|
|
329
|
+
actions.push(action);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
333
|
+
isDownloadable = att.links.download;
|
|
334
|
+
} else if (att.error) {
|
|
335
|
+
actions = [
|
|
336
|
+
{
|
|
337
|
+
id: `Remove-${att.ID}`,
|
|
338
|
+
text: 'Remove',
|
|
339
|
+
icon: 'trash',
|
|
340
|
+
onClick: removeFile
|
|
341
|
+
}
|
|
342
|
+
];
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return {
|
|
346
|
+
id: att.ID,
|
|
347
|
+
visual: {
|
|
348
|
+
icon: this.utils.getIconForAttachment(att),
|
|
349
|
+
progress: att.progress == 100 ? undefined : att.progress
|
|
350
|
+
},
|
|
351
|
+
primary: {
|
|
352
|
+
type: att.type,
|
|
353
|
+
name: att.name,
|
|
354
|
+
icon: 'trash',
|
|
355
|
+
click: removeFile
|
|
356
|
+
},
|
|
357
|
+
secondary: {
|
|
358
|
+
text: att.meta
|
|
359
|
+
},
|
|
360
|
+
actions
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
getListUtilityItemProps = ({ att, cancelFile, downloadFile, deleteFile, removeFile }) => {
|
|
365
|
+
let actions;
|
|
366
|
+
let isDownloadable = false;
|
|
367
|
+
|
|
368
|
+
if (att.progress && att.progress !== 100) {
|
|
369
|
+
actions = [
|
|
370
|
+
{
|
|
371
|
+
id: `Cancel-${att.ID}`,
|
|
372
|
+
text: this.pConn$.getLocalizedValue('Cancel', '', ''),
|
|
373
|
+
icon: 'times',
|
|
374
|
+
onClick: cancelFile
|
|
375
|
+
}
|
|
376
|
+
];
|
|
377
|
+
} else if (att.links) {
|
|
378
|
+
const isFile = att.type === 'FILE';
|
|
379
|
+
const ID = att.ID.replace(/\s/gi, '');
|
|
380
|
+
const actionsMap = new Map([
|
|
381
|
+
[
|
|
382
|
+
'download',
|
|
383
|
+
{
|
|
384
|
+
id: `download-${ID}`,
|
|
385
|
+
text: isFile ? this.pConn$.getLocalizedValue('Download', '', '') : this.pConn$.getLocalizedValue('Open', '', ''),
|
|
386
|
+
icon: isFile ? 'download' : 'open',
|
|
387
|
+
onClick: downloadFile
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
[
|
|
391
|
+
'delete',
|
|
392
|
+
{
|
|
393
|
+
id: `Delete-${ID}`,
|
|
394
|
+
text: this.pConn$.getLocalizedValue('Delete', '', ''),
|
|
395
|
+
icon: 'trash',
|
|
396
|
+
onClick: deleteFile
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
]);
|
|
400
|
+
actions = [];
|
|
401
|
+
actionsMap.forEach((action, actionKey) => {
|
|
402
|
+
if (att.links[actionKey]) {
|
|
403
|
+
actions.push(action);
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
407
|
+
isDownloadable = att.links.download;
|
|
408
|
+
} else if (att.error) {
|
|
409
|
+
actions = [
|
|
410
|
+
{
|
|
411
|
+
id: `Remove-${att.ID}`,
|
|
412
|
+
text: this.pConn$.getLocalizedValue('Remove', '', ''),
|
|
413
|
+
icon: 'trash',
|
|
414
|
+
onClick: removeFile
|
|
415
|
+
}
|
|
416
|
+
];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return {
|
|
420
|
+
id: att.ID,
|
|
421
|
+
visual: {
|
|
422
|
+
icon: this.utils.getIconForAttachment(att),
|
|
423
|
+
progress: att.progress == 100 ? undefined : att.progress
|
|
424
|
+
},
|
|
425
|
+
primary: {
|
|
426
|
+
type: att.type,
|
|
427
|
+
name: att.name,
|
|
428
|
+
icon: 'open',
|
|
429
|
+
click: downloadFile
|
|
430
|
+
},
|
|
431
|
+
secondary: {
|
|
432
|
+
text: att.meta
|
|
433
|
+
},
|
|
434
|
+
actions
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
_addLink() {
|
|
439
|
+
// copy list locally
|
|
440
|
+
const localList = this.arLinksList$.slice();
|
|
441
|
+
|
|
442
|
+
const url = this.link_url$;
|
|
443
|
+
|
|
444
|
+
if (!/^(http|https):\/\//.test(this.link_url$)) {
|
|
445
|
+
this.link_url$ = `http://${this.link_url$}`;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// list for display
|
|
449
|
+
let oLink: any = {};
|
|
450
|
+
oLink.icon = 'chain';
|
|
451
|
+
|
|
452
|
+
oLink.ID = `${new Date().getTime()}`;
|
|
453
|
+
|
|
454
|
+
oLink = this.getNewListUtilityItemProps({
|
|
455
|
+
att: oLink,
|
|
456
|
+
downloadFile: null,
|
|
457
|
+
cancelFile: null,
|
|
458
|
+
deleteFile: null,
|
|
459
|
+
removeFile: null
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
oLink.type = 'URL';
|
|
463
|
+
oLink.primary.type = oLink.type;
|
|
464
|
+
oLink.visual.icon = 'chain';
|
|
465
|
+
oLink.primary.name = this.link_title$;
|
|
466
|
+
oLink.primary.icon = 'open';
|
|
467
|
+
oLink.secondary.text = url;
|
|
468
|
+
|
|
469
|
+
this.ngZone.run(() => {
|
|
470
|
+
// need to create a new array or summary list won't detect changes
|
|
471
|
+
this.arLinksList$ = localList.slice();
|
|
472
|
+
this.arLinksList$.push(oLink);
|
|
473
|
+
|
|
474
|
+
// list for actually attachments
|
|
475
|
+
const link: any = {};
|
|
476
|
+
link.id = oLink.id;
|
|
477
|
+
link.linkTitle = this.link_title$;
|
|
478
|
+
link.type = oLink.type;
|
|
479
|
+
link.url = url;
|
|
480
|
+
|
|
481
|
+
this.arLinks$.push(link);
|
|
482
|
+
|
|
483
|
+
// clear values
|
|
484
|
+
this.link_title$ = '';
|
|
485
|
+
this.link_url$ = '';
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
_changeTitle(event: any) {
|
|
490
|
+
this.link_title$ = event.srcElement.value;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
_changeUrl(event: any) {
|
|
494
|
+
this.link_url$ = event.srcElement.value;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
downloadFile(att: any) {
|
|
498
|
+
const attachUtils = PCore.getAttachmentUtils();
|
|
499
|
+
const { ID, name, extension, type } = att;
|
|
500
|
+
const context = this.pConn$.getContextName();
|
|
501
|
+
|
|
502
|
+
attachUtils
|
|
503
|
+
// @ts-ignore - 3rd parameter "responseEncoding" is optional
|
|
504
|
+
.downloadAttachment(ID, context)
|
|
505
|
+
.then((content: any) => {
|
|
506
|
+
if (type === 'FILE') {
|
|
507
|
+
this.fileDownload(content.data, name, extension);
|
|
508
|
+
} else if (type === 'URL') {
|
|
509
|
+
let { data } = content;
|
|
510
|
+
if (!/^(http|https):\/\//.test(data)) {
|
|
511
|
+
data = `//${data}`;
|
|
512
|
+
}
|
|
513
|
+
window.open(content.data, '_blank');
|
|
514
|
+
}
|
|
515
|
+
})
|
|
516
|
+
.catch(console.error);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
fileDownload = (data, fileName, ext) => {
|
|
520
|
+
const file = ext ? `${fileName}.${ext}` : fileName;
|
|
521
|
+
download(atob(data), file);
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
cancelFile() {
|
|
525
|
+
alert('cancel');
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
deleteFile(att: any) {
|
|
529
|
+
setTimeout(() => {
|
|
530
|
+
const attachUtils = PCore.getAttachmentUtils();
|
|
531
|
+
const { ID } = att;
|
|
532
|
+
const context = this.pConn$.getContextName();
|
|
533
|
+
|
|
534
|
+
attachUtils
|
|
535
|
+
.deleteAttachment(ID, context)
|
|
536
|
+
.then(() => {
|
|
537
|
+
this.updateSelf();
|
|
538
|
+
// let newAttachments;
|
|
539
|
+
// setAttachments((current) => {
|
|
540
|
+
// newAttachments = current.filter((file) => file.ID !== ID);
|
|
541
|
+
// return newAttachments;
|
|
542
|
+
// });
|
|
543
|
+
// if (callbackFn) {
|
|
544
|
+
// callbackFn(newAttachments);
|
|
545
|
+
// }
|
|
546
|
+
})
|
|
547
|
+
.catch(console.error);
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
removeFile() {
|
|
552
|
+
alert('remove');
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
removeNewFile() {
|
|
556
|
+
alert('remove');
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
createModal(modalType: string) {
|
|
560
|
+
switch (modalType) {
|
|
561
|
+
case 'addLocalFile':
|
|
562
|
+
this.ngZone.run(() => {
|
|
563
|
+
this.bShowFileModal$ = true;
|
|
564
|
+
});
|
|
565
|
+
|
|
566
|
+
break;
|
|
567
|
+
case 'addLocalLink':
|
|
568
|
+
this.ngZone.run(() => {
|
|
569
|
+
this.bShowLinkModal$ = true;
|
|
570
|
+
});
|
|
571
|
+
break;
|
|
572
|
+
default:
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
createModalButtons() {
|
|
578
|
+
this.arFileMainButtons$.push({ actionID: 'attach', jsAction: 'attachFiles', name: this.pConn$.getLocalizedValue('Attach files', '', '') });
|
|
579
|
+
this.arFileSecondaryButtons$.push({ actionID: 'cancel', jsAction: 'cancel', name: this.pConn$.getLocalizedValue('Cancel', '', '') });
|
|
580
|
+
|
|
581
|
+
this.arLinkMainButtons$.push({ actionID: 'attach', jsAction: 'attachLinks', name: this.pConn$.getLocalizedValue('Attach links', '', '') });
|
|
582
|
+
this.arLinkSecondaryButtons$.push({ actionID: 'cancel', jsAction: 'cancel', name: this.pConn$.getLocalizedValue('Cancel', '', '') });
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
uploadMyFiles($event) {
|
|
586
|
+
// alert($event.target.files[0]); // outputs the first file
|
|
587
|
+
this.arFiles$ = this.getFiles($event.target.files);
|
|
588
|
+
|
|
589
|
+
// convert FileList to an array
|
|
590
|
+
const myFiles = Array.from(this.arFiles$);
|
|
591
|
+
|
|
592
|
+
this.arFileList$ = myFiles.map(att => {
|
|
593
|
+
return this.getNewListUtilityItemProps({
|
|
594
|
+
att,
|
|
595
|
+
downloadFile: !att.progress ? () => this.downloadFile(att) : null,
|
|
596
|
+
cancelFile: att.progress ? () => this.cancelFile() : null,
|
|
597
|
+
deleteFile: !att.progress ? () => this.deleteFile(att) : null,
|
|
598
|
+
removeFile: att.error ? () => this.removeNewFile() : null
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
getFiles(arFiles: any[]): any[] {
|
|
604
|
+
return this.setNewFiles(arFiles);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
setNewFiles(arFiles) {
|
|
608
|
+
let index = 0;
|
|
609
|
+
for (const file of arFiles) {
|
|
610
|
+
if (!this.validateMaxSize(file, 5)) {
|
|
611
|
+
file.error = true;
|
|
612
|
+
file.meta = 'File is too big. Max allowed size is 5MB.';
|
|
613
|
+
}
|
|
614
|
+
file.mimeType = file.type;
|
|
615
|
+
file.icon = this.utils.getIconFromFileType(file.type);
|
|
616
|
+
file.ID = `${new Date().getTime()}I${index}`;
|
|
617
|
+
index++;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return arFiles;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
validateMaxSize(fileObj, maxSizeInMB): boolean {
|
|
624
|
+
const fileSize = (fileObj.size / 1048576).toFixed(2);
|
|
625
|
+
return fileSize < maxSizeInMB;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
onFileActionButtonClick(event: any) {
|
|
629
|
+
// modal buttons
|
|
630
|
+
switch (event.action) {
|
|
631
|
+
case 'cancel':
|
|
632
|
+
this.bShowFileModal$ = false;
|
|
633
|
+
|
|
634
|
+
this.clearOutFiles();
|
|
635
|
+
break;
|
|
636
|
+
case 'attachFiles':
|
|
637
|
+
this.bShowFileModal$ = false;
|
|
638
|
+
this.onAttachFiles(this.arFiles$);
|
|
639
|
+
|
|
640
|
+
this.clearOutFiles();
|
|
641
|
+
break;
|
|
642
|
+
default:
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
onLinkActionButtonClick(event: any) {
|
|
648
|
+
// modal buttons
|
|
649
|
+
switch (event.action) {
|
|
650
|
+
case 'cancel':
|
|
651
|
+
this.bShowLinkModal$ = false;
|
|
652
|
+
|
|
653
|
+
this.clearOutLinks();
|
|
654
|
+
break;
|
|
655
|
+
case 'attachLinks':
|
|
656
|
+
this.bShowLinkModal$ = false;
|
|
657
|
+
this.onAttachLinks(this.arLinks$);
|
|
658
|
+
|
|
659
|
+
this.clearOutLinks();
|
|
660
|
+
break;
|
|
661
|
+
default:
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
clearOutFiles() {
|
|
667
|
+
this.arFileList$ = [];
|
|
668
|
+
this.arFiles$ = [];
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
clearOutLinks() {
|
|
672
|
+
this.arLinksList$ = [];
|
|
673
|
+
this.arLinks$ = [];
|
|
674
|
+
this.link_title$ = '';
|
|
675
|
+
this.link_url$ = '';
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
addALink() {}
|
|
679
|
+
|
|
680
|
+
_fieldOnChangeLink(event: any) {
|
|
681
|
+
this.link_title$ = event.target.value;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
_fieldOnChangeURL(event: any) {
|
|
685
|
+
this.link_url$ = event.target.value;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
updateSelf() {
|
|
689
|
+
const caseID = this.getCaseID();
|
|
690
|
+
|
|
691
|
+
if (caseID) {
|
|
692
|
+
this.lu_bLoading$ = true;
|
|
693
|
+
|
|
694
|
+
this.fetchCaseAttachments(caseID).then(resp => {
|
|
695
|
+
this.handleAttachmentsResponse(resp);
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
getCaseID() {
|
|
701
|
+
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
702
|
+
return this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID) || '';
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
fetchCaseAttachments(caseID) {
|
|
706
|
+
const attachmentUtils = PCore.getAttachmentUtils();
|
|
707
|
+
return attachmentUtils.getCaseAttachments(caseID, this.pConn$.getContextName());
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
handleAttachmentsResponse(resp) {
|
|
711
|
+
this.arFullListAttachments = this.addAttachments(resp);
|
|
712
|
+
this.lu_count$ = this.arFullListAttachments.length;
|
|
713
|
+
this.lu_arActions$ = this.addAttachmentsActions;
|
|
714
|
+
|
|
715
|
+
this.lu_arItems$ = this.getUtilityItems(this.arFullListAttachments.slice(0, 3));
|
|
716
|
+
this.va_arItems$ = this.getUtilityItems(this.arFullListAttachments);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
getUtilityItems(attachments) {
|
|
720
|
+
return attachments.map(this.mapAttachmentToUtilityItem.bind(this));
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
mapAttachmentToUtilityItem(att) {
|
|
724
|
+
return this.getListUtilityItemProps({
|
|
725
|
+
att,
|
|
726
|
+
downloadFile: this.getDownloadFunction(att),
|
|
727
|
+
cancelFile: this.getCancelFunction(att),
|
|
728
|
+
deleteFile: this.getDeleteFunction(att),
|
|
729
|
+
removeFile: this.getRemoveFunction(att)
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
getDownloadFunction(att) {
|
|
734
|
+
return !att.progress ? () => this.downloadFile(att) : null;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
getCancelFunction(att) {
|
|
738
|
+
return att.progress ? () => this.cancelFile() : null;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
getDeleteFunction(att) {
|
|
742
|
+
return !att.progress ? () => this.deleteFile(att) : null;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
getRemoveFunction(att) {
|
|
746
|
+
return att.error ? () => this.removeFile() : null;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
caseHasChanged(): boolean {
|
|
750
|
+
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
751
|
+
const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
|
|
752
|
+
if (this.currentCaseID !== caseID) {
|
|
753
|
+
this.currentCaseID = caseID;
|
|
754
|
+
return true;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
}
|