@fundamental-ngx/platform 0.47.4 → 0.48.0-rc.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/README.md +0 -28
- package/esm2022/approval-flow/approval-flow-add-node/approval-flow-add-node.component.mjs +6 -11
- package/esm2022/approval-flow/approval-flow-approver-details/approval-flow-approver-details.component.mjs +6 -8
- package/esm2022/approval-flow/approval-flow-messages/approval-flow-messages.component.mjs +5 -6
- package/esm2022/approval-flow/approval-flow-node/approval-flow-drop-zone.directive.mjs +5 -5
- package/esm2022/approval-flow/approval-flow-node/approval-flow-node.component.mjs +8 -11
- package/esm2022/approval-flow/approval-flow-select-type/approval-flow-select-type.component.mjs +6 -8
- package/esm2022/approval-flow/approval-flow-team-list/approval-flow-team-list.component.mjs +5 -7
- package/esm2022/approval-flow/approval-flow-toolbar-actions/approval-flow-toolbar-actions.component.mjs +5 -6
- package/esm2022/approval-flow/approval-flow-user-details/approval-flow-user-details.component.mjs +6 -6
- package/esm2022/approval-flow/approval-flow-user-list/approval-flow-user-list.component.mjs +6 -7
- package/esm2022/approval-flow/approval-flow.component.mjs +8 -10
- package/esm2022/approval-flow/approval-flow.module.mjs +4 -4
- package/esm2022/approval-flow/services/approval-flow-add-node-view.service.mjs +3 -3
- package/esm2022/button/button.component.mjs +5 -5
- package/esm2022/button/button.module.mjs +4 -4
- package/esm2022/dynamic-page/directives/dynamic-page-header-subtitle.directive.mjs +3 -3
- package/esm2022/dynamic-page/directives/dynamic-page-header-title.directive.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page-content/dynamic-page-content-host.component.mjs +5 -5
- package/esm2022/dynamic-page/dynamic-page-content/dynamic-page-content.component.mjs +5 -5
- package/esm2022/dynamic-page/dynamic-page-footer/dynamic-page-footer.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page-header/actions/global-actions/dynamic-page-global-actions.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page-header/actions/layout-actions/dynamic-page-layout-actions.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page-header/header/dynamic-page-header.component.mjs +4 -4
- package/esm2022/dynamic-page/dynamic-page-header/key-info/dynamic-page-key-info.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page-header/title/dynamic-page-title-image.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page-header/title/dynamic-page-title.component.mjs +3 -3
- package/esm2022/dynamic-page/dynamic-page.component.mjs +8 -10
- package/esm2022/dynamic-page/dynamic-page.config.mjs +4 -4
- package/esm2022/dynamic-page/dynamic-page.module.mjs +4 -4
- package/esm2022/dynamic-page/dynamic-page.service.mjs +3 -3
- package/esm2022/feed-input/feed-input.component.mjs +6 -7
- package/esm2022/feed-input/feed-input.module.mjs +4 -4
- package/esm2022/form/auto-complete/auto-complete.directive.mjs +5 -5
- package/esm2022/form/auto-complete/auto-complete.module.mjs +4 -4
- package/esm2022/form/checkbox/checkbox.component.mjs +6 -6
- package/esm2022/form/checkbox/checkbox.module.mjs +4 -4
- package/esm2022/form/checkbox-group/checkbox-group.component.mjs +8 -8
- package/esm2022/form/checkbox-group/checkbox-group.module.mjs +4 -4
- package/esm2022/form/combobox/combobox/combobox.component.mjs +9 -11
- package/esm2022/form/combobox/combobox-mobile/combobox/combobox-mobile.component.mjs +13 -15
- package/esm2022/form/combobox/combobox-mobile/combobox-mobile.module.mjs +4 -4
- package/esm2022/form/combobox/combobox.config.mjs +4 -4
- package/esm2022/form/combobox/combobox.module.mjs +4 -4
- package/esm2022/form/combobox/commons/base-combobox.mjs +8 -6
- package/esm2022/form/combobox/directives/combobox-item.directive.mjs +15 -15
- package/esm2022/form/date-picker/date-picker.component.mjs +6 -6
- package/esm2022/form/date-picker/date-picker.module.mjs +4 -4
- package/esm2022/form/datetime-picker/datetime-picker.component.mjs +6 -6
- package/esm2022/form/datetime-picker/datetime-picker.module.mjs +4 -4
- package/esm2022/form/form-generator/base-dynamic-form-generator-control.mjs +3 -3
- package/esm2022/form/form-generator/controls/dynamic-form-generator-checkbox/dynamic-form-generator-checkbox.component.mjs +4 -4
- package/esm2022/form/form-generator/controls/dynamic-form-generator-datepicker/dynamic-form-generator-datepicker.component.mjs +4 -4
- package/esm2022/form/form-generator/controls/dynamic-form-generator-editor/dynamic-form-generator-editor.component.mjs +4 -4
- package/esm2022/form/form-generator/controls/dynamic-form-generator-input/dynamic-form-generator-input.component.mjs +6 -7
- package/esm2022/form/form-generator/controls/dynamic-form-generator-multi-input/dynamic-form-generator-multi-input.component.mjs +4 -4
- package/esm2022/form/form-generator/controls/dynamic-form-generator-object-status/dynamic-form-generator-object-status.component.mjs +3 -3
- package/esm2022/form/form-generator/controls/dynamic-form-generator-radio/dynamic-form-generator-radio.component.mjs +4 -4
- package/esm2022/form/form-generator/controls/dynamic-form-generator-select/dynamic-form-generator-select.component.mjs +4 -4
- package/esm2022/form/form-generator/controls/dynamic-form-generator-switch/dynamic-form-generator-switch.component.mjs +4 -4
- package/esm2022/form/form-generator/dynamic-form-control-field.directive.mjs +5 -5
- package/esm2022/form/form-generator/dynamic-form-control.directive.mjs +6 -6
- package/esm2022/form/form-generator/fdp-form-generator.module.mjs +4 -4
- package/esm2022/form/form-generator/form-generator/form-generator.component.mjs +9 -11
- package/esm2022/form/form-generator/form-generator-components-accessor.service.mjs +3 -3
- package/esm2022/form/form-generator/form-generator-field/form-generator-field.component.mjs +7 -8
- package/esm2022/form/form-generator/form-generator.service.mjs +5 -5
- package/esm2022/form/form-generator/pipes/get-hint-options.pipe.mjs +5 -5
- package/esm2022/form/form-generator/pipes/get-ordered-form-controls.pipe.mjs +3 -3
- package/esm2022/form/form-group/fdp-form.module.mjs +4 -4
- package/esm2022/form/form-group/form-field/form-field.component.mjs +10 -10
- package/esm2022/form/form-group/form-field-error/form-field-error-description.directive.mjs +6 -6
- package/esm2022/form/form-group/form-field-error/form-field-error-heading.directive.mjs +6 -6
- package/esm2022/form/form-group/form-field-error/form-field-error.directive.mjs +5 -5
- package/esm2022/form/form-group/form-field-extras/form-field-extras.component.mjs +3 -3
- package/esm2022/form/form-group/form-field-group/form-field-group.component.mjs +6 -6
- package/esm2022/form/form-group/form-group-header/form-group-header.component.mjs +6 -6
- package/esm2022/form/form-group/form-group.component.mjs +8 -10
- package/esm2022/form/form-group/pipes/field-group-row-value.pipe.mjs +3 -3
- package/esm2022/form/form-group/services/form-field-layout.service.mjs +5 -5
- package/esm2022/form/index.mjs +1 -3
- package/esm2022/form/input/fdp-input.module.mjs +4 -4
- package/esm2022/form/input/input.component.mjs +6 -6
- package/esm2022/form/input-group/addon-body.component.mjs +5 -5
- package/esm2022/form/input-group/addon.component.mjs +5 -5
- package/esm2022/form/input-group/input-group.component.mjs +12 -12
- package/esm2022/form/input-group/input-group.config.mjs +4 -4
- package/esm2022/form/input-group/input-group.module.mjs +4 -4
- package/esm2022/form/input-group/input.component.mjs +3 -3
- package/esm2022/form/input-message-group-with-template/input-message-group-with-template.component.mjs +7 -7
- package/esm2022/form/multi-combobox/commons/base-multi-combobox.mjs +6 -6
- package/esm2022/form/multi-combobox/multi-combobox/multi-combobox.component.mjs +10 -12
- package/esm2022/form/multi-combobox/multi-combobox-mobile/multi-combobox/multi-combobox-mobile.component.mjs +8 -9
- package/esm2022/form/multi-combobox/multi-combobox-mobile/multi-combobox-mobile.module.mjs +4 -4
- package/esm2022/form/multi-combobox/multi-combobox.config.mjs +4 -4
- package/esm2022/form/multi-combobox/multi-combobox.module.mjs +4 -4
- package/esm2022/form/multi-input/base-multi-input.mjs +6 -6
- package/esm2022/form/multi-input/multi-input-mobile/multi-input-mobile.component.mjs +12 -12
- package/esm2022/form/multi-input/multi-input-mobile/multi-input-mobile.module.mjs +4 -4
- package/esm2022/form/multi-input/multi-input.component.mjs +9 -11
- package/esm2022/form/multi-input/multi-input.config.mjs +4 -4
- package/esm2022/form/multi-input/multi-input.module.mjs +4 -4
- package/esm2022/form/radio-group/radio/radio.component.mjs +8 -8
- package/esm2022/form/radio-group/radio-group.component.mjs +8 -8
- package/esm2022/form/radio-group/radio-group.module.mjs +4 -4
- package/esm2022/form/select/commons/base-select.mjs +6 -6
- package/esm2022/form/select/select/select.component.mjs +8 -8
- package/esm2022/form/select/select.config.mjs +4 -4
- package/esm2022/form/select/select.module.mjs +4 -4
- package/esm2022/form/step-input/base.step-input.mjs +5 -5
- package/esm2022/form/step-input/number/number-step-input.component.mjs +9 -10
- package/esm2022/form/step-input/step-input-action-button.mjs +3 -3
- package/esm2022/form/step-input/step-input-control.directive.mjs +6 -6
- package/esm2022/form/step-input/step-input-decrement.directive.mjs +5 -5
- package/esm2022/form/step-input/step-input-increment.directive.mjs +5 -5
- package/esm2022/form/step-input/step-input.config.mjs +3 -3
- package/esm2022/form/step-input/step-input.module.mjs +4 -4
- package/esm2022/form/switch/switch/switch.component.mjs +6 -6
- package/esm2022/form/switch/switch/switch.config.mjs +3 -3
- package/esm2022/form/switch/switch.module.mjs +4 -4
- package/esm2022/form/text-area/text-area.component.mjs +8 -9
- package/esm2022/form/text-area/text-area.config.mjs +3 -3
- package/esm2022/form/text-area/text-area.module.mjs +4 -4
- package/esm2022/form/time-picker/time-picker.component.mjs +6 -6
- package/esm2022/form/time-picker/time-picker.module.mjs +4 -4
- package/esm2022/fundamental-ngx.module.mjs +14 -33
- package/esm2022/icon-tab-bar/components/closable-icon-tab-bar.class.mjs +3 -3
- package/esm2022/icon-tab-bar/components/icon-tab-bar-base.class.mjs +5 -9
- package/esm2022/icon-tab-bar/components/icon-tab-bar-filter-type/icon-tab-bar-filter-type.component.mjs +6 -8
- package/esm2022/icon-tab-bar/components/icon-tab-bar-icon-type/icon-tab-bar-icon-type.component.mjs +6 -8
- package/esm2022/icon-tab-bar/components/icon-tab-bar-process-type/icon-tab-bar-process-type.component.mjs +5 -8
- package/esm2022/icon-tab-bar/components/icon-tab-bar-text-type/icon-tab-bar-text-type.component.mjs +7 -9
- package/esm2022/icon-tab-bar/components/popovers/icon-tab-bar-popover/icon-tab-bar-popover.component.mjs +6 -15
- package/esm2022/icon-tab-bar/components/popovers/icon-tab-bar-popover-base.class.mjs +5 -9
- package/esm2022/icon-tab-bar/components/popovers/text-type-popover/text-type-popover.component.mjs +6 -8
- package/esm2022/icon-tab-bar/directives/dnd/icon-bar-dnd-container.directive.mjs +5 -5
- package/esm2022/icon-tab-bar/directives/dnd/icon-bar-dnd-item.directive.mjs +5 -5
- package/esm2022/icon-tab-bar/directives/dnd/icon-bar-dnd-list.directive.mjs +5 -5
- package/esm2022/icon-tab-bar/icon-tab-bar.component.mjs +8 -9
- package/esm2022/icon-tab-bar/icon-tab-bar.module.mjs +4 -4
- package/esm2022/index.mjs +8 -12
- package/esm2022/info-label/info-label.component.mjs +5 -5
- package/esm2022/info-label/info-label.module.mjs +4 -4
- package/esm2022/link/link.component.mjs +5 -5
- package/esm2022/link/link.module.mjs +4 -4
- package/esm2022/list/action-list-item/action-list-item.component.mjs +3 -3
- package/esm2022/list/action-list-item/action-list-item.module.mjs +4 -4
- package/esm2022/list/base-list-item.mjs +11 -11
- package/esm2022/list/display-list-item/display-list-item.component.mjs +6 -7
- package/esm2022/list/display-list-item/display-list-item.module.mjs +4 -4
- package/esm2022/list/free-content-list-item/free-content-list-item.component.mjs +4 -4
- package/esm2022/list/list-group-footer.component.mjs +3 -3
- package/esm2022/list/list-group-header.component.mjs +3 -3
- package/esm2022/list/list.component.mjs +9 -11
- package/esm2022/list/list.config.mjs +3 -3
- package/esm2022/list/list.module.mjs +4 -4
- package/esm2022/list/load-more-content.directive.mjs +4 -4
- package/esm2022/list/object-list-item/object-list-item-row.component.mjs +4 -4
- package/esm2022/list/object-list-item/object-list-item.component.mjs +6 -7
- package/esm2022/list/object-list-item/object-list-item.module.mjs +4 -4
- package/esm2022/list/standard-list-item/standard-list-item.component.mjs +6 -7
- package/esm2022/list/standard-list-item/standard-list-item.module.mjs +4 -4
- package/esm2022/menu/menu-item.component.mjs +7 -7
- package/esm2022/menu/menu-trigger.directive.mjs +6 -6
- package/esm2022/menu/menu.component.mjs +6 -6
- package/esm2022/menu/menu.module.mjs +4 -4
- package/esm2022/menu-button/menu-button.component.mjs +5 -5
- package/esm2022/menu-button/menu-button.module.mjs +4 -4
- package/esm2022/message-popover/components/message-popover-form-wrapper/message-popover-form-wrapper.component.mjs +6 -6
- package/esm2022/message-popover/components/message-view/message-view.component.mjs +8 -10
- package/esm2022/message-popover/directives/message-popover-form-item.directive.mjs +6 -6
- package/esm2022/message-popover/message-popover.component.mjs +7 -9
- package/esm2022/message-popover/platform-message-popover.module.mjs +4 -4
- package/esm2022/object-marker/object-marker.component.mjs +6 -7
- package/esm2022/object-marker/object-marker.module.mjs +4 -4
- package/esm2022/object-status/object-status.component.mjs +8 -8
- package/esm2022/object-status/object-status.module.mjs +4 -4
- package/esm2022/page-footer/page-footer.component.mjs +6 -6
- package/esm2022/page-footer/page-footer.module.mjs +4 -4
- package/esm2022/panel/panel-actions.component.mjs +3 -3
- package/esm2022/panel/panel-content/panel-content.component.mjs +4 -4
- package/esm2022/panel/panel.component.mjs +5 -5
- package/esm2022/panel/panel.config.mjs +4 -4
- package/esm2022/panel/panel.module.mjs +4 -4
- package/esm2022/search-field/search-field-mobile/search-field/search-field-mobile.component.mjs +8 -9
- package/esm2022/search-field/search-field-mobile/search-field-mobile.module.mjs +4 -4
- package/esm2022/search-field/search-field.component.mjs +16 -18
- package/esm2022/search-field/search-field.module.mjs +4 -4
- package/esm2022/settings-generator/controls/theme-selector-list/theme-selector-list.component.mjs +9 -16
- package/esm2022/settings-generator/layouts/base-settings-generator-layout.mjs +3 -3
- package/esm2022/settings-generator/layouts/settings-generator-sidebar-layout/settings-generator-sidebar-icon/settings-generator-sidebar-icon.component.mjs +5 -6
- package/esm2022/settings-generator/layouts/settings-generator-sidebar-layout/settings-generator-sidebar-layout.component.mjs +6 -9
- package/esm2022/settings-generator/settings-generator-content/settings-generator-content.component.mjs +6 -8
- package/esm2022/settings-generator/settings-generator-content/settings-generator-section/settings-generator-section.component.mjs +7 -7
- package/esm2022/settings-generator/settings-generator-layout-accessor.service.mjs +3 -3
- package/esm2022/settings-generator/settings-generator.component.mjs +9 -9
- package/esm2022/settings-generator/settings-generator.module.mjs +4 -4
- package/esm2022/settings-generator/settings-generator.service.mjs +4 -4
- package/esm2022/shared/base.mjs +5 -5
- package/esm2022/shared/form/base.input.mjs +6 -6
- package/esm2022/shared/form/collection-base.input.mjs +6 -6
- package/esm2022/shared/form/inline-layout-collection-base.input.mjs +13 -13
- package/esm2022/shared/pipes/convert-bytes/convert-bytes.pipe.mjs +3 -3
- package/esm2022/shared/pipes/pipe.module.mjs +4 -4
- package/esm2022/shared/platform.config.mjs +3 -3
- package/esm2022/slider/slider.component.mjs +6 -6
- package/esm2022/slider/slider.module.mjs +4 -4
- package/esm2022/smart-filter-bar/components/smart-filter-bar-condition-field/base-smart-filter-bar-condition-field.mjs +4 -4
- package/esm2022/smart-filter-bar/components/smart-filter-bar-condition-field/smart-filter-bar-condition-field.component.mjs +4 -4
- package/esm2022/smart-filter-bar/components/smart-filter-bar-conditions-dialog/smart-filter-bar-conditions-dialog.component.mjs +6 -9
- package/esm2022/smart-filter-bar/components/smart-filter-bar-settings-dialog/smart-filter-bar-settings-dialog.component.mjs +7 -9
- package/esm2022/smart-filter-bar/directives/smart-filter-bar-field-definition.directive.mjs +3 -3
- package/esm2022/smart-filter-bar/directives/smart-filter-bar-subject.directive.mjs +5 -5
- package/esm2022/smart-filter-bar/directives/smart-filter-bar-toolbar-item.directive.mjs +4 -4
- package/esm2022/smart-filter-bar/smart-filter-bar.class.mjs +3 -3
- package/esm2022/smart-filter-bar/smart-filter-bar.component.mjs +8 -10
- package/esm2022/smart-filter-bar/smart-filter-bar.module.mjs +4 -4
- package/esm2022/smart-filter-bar/smart-filter-bar.service.mjs +4 -4
- package/esm2022/split-menu-button/split-menu-button.component.mjs +6 -6
- package/esm2022/split-menu-button/split-menu-button.module.mjs +4 -4
- package/esm2022/table/components/no-data-wrapper/no-data-wrapper.component.mjs +3 -3
- package/esm2022/table/components/reset-button/reset-button.component.mjs +5 -5
- package/esm2022/table/components/table-cell-header-popover/table-cell-header-popover.component.mjs +6 -8
- package/esm2022/table/components/table-column/table-column.component.mjs +6 -6
- package/esm2022/table/components/table-column-resizer/table-column-resizer.component.mjs +6 -6
- package/esm2022/table/components/table-editable-cell/table-editable-cell.component.mjs +5 -15
- package/esm2022/table/components/table-group-row/table-group-row.component.mjs +7 -7
- package/esm2022/table/components/table-header-cell-content/table-header-cell-content.component.mjs +6 -6
- package/esm2022/table/components/table-header-row/table-header-row.component.mjs +11 -13
- package/esm2022/table/components/table-p13-dialog/columns/columns.component.mjs +7 -9
- package/esm2022/table/components/table-p13-dialog/filtering/filter-rule.component.mjs +9 -11
- package/esm2022/table/components/table-p13-dialog/filtering/filtering.component.mjs +6 -9
- package/esm2022/table/components/table-p13-dialog/grouping/grouping.component.mjs +6 -8
- package/esm2022/table/components/table-p13-dialog/sorting/sorting.component.mjs +9 -11
- package/esm2022/table/components/table-p13-dialog/table-p13-columns.component.mjs +3 -3
- package/esm2022/table/components/table-p13-dialog/table-p13-dialog.component.mjs +5 -5
- package/esm2022/table/components/table-p13-dialog/table-p13-filter.component.mjs +3 -3
- package/esm2022/table/components/table-p13-dialog/table-p13-group.component.mjs +3 -3
- package/esm2022/table/components/table-p13-dialog/table-p13-sort.component.mjs +3 -3
- package/esm2022/table/components/table-popping-row/table-popping-row.component.mjs +7 -9
- package/esm2022/table/components/table-row/table-row.component.mjs +8 -12
- package/esm2022/table/components/table-toolbar/table-toolbar-actions.component.mjs +3 -3
- package/esm2022/table/components/table-toolbar/table-toolbar-left-actions.component.mjs +3 -3
- package/esm2022/table/components/table-toolbar/table-toolbar.component.mjs +7 -8
- package/esm2022/table/components/table-view-settings-dialog/filtering/filter-custom.component.mjs +6 -6
- package/esm2022/table/components/table-view-settings-dialog/filtering/filter-multi-select.component.mjs +5 -6
- package/esm2022/table/components/table-view-settings-dialog/filtering/filter-single-select.component.mjs +5 -14
- package/esm2022/table/components/table-view-settings-dialog/filtering/filter-step.component.mjs +5 -8
- package/esm2022/table/components/table-view-settings-dialog/filtering/filters-list-step.component.mjs +5 -7
- package/esm2022/table/components/table-view-settings-dialog/filtering/filters.component.mjs +7 -10
- package/esm2022/table/components/table-view-settings-dialog/grouping/grouping.component.mjs +6 -8
- package/esm2022/table/components/table-view-settings-dialog/sorting/sorting.component.mjs +6 -9
- package/esm2022/table/components/table-view-settings-dialog/table-view-settings-dialog.component.mjs +5 -5
- package/esm2022/table/components/table-view-settings-dialog/table-view-settings-filter.component.mjs +3 -3
- package/esm2022/table/table.component.mjs +9 -14
- package/esm2022/table/table.module.mjs +4 -4
- package/esm2022/table-helpers/directives/platform-table-column-responsive.directive.mjs +6 -6
- package/esm2022/table-helpers/directives/table-cell-header-popover.directive.mjs +4 -4
- package/esm2022/table-helpers/directives/table-cell-resizable.directive.mjs +5 -5
- package/esm2022/table-helpers/directives/table-cell-selectable.directive.mjs +3 -3
- package/esm2022/table-helpers/directives/table-cell.directive.mjs +16 -16
- package/esm2022/table-helpers/directives/table-data-source.directive.mjs +3 -3
- package/esm2022/table-helpers/directives/table-draggable.directive.mjs +3 -3
- package/esm2022/table-helpers/directives/table-header-resizer.directive.mjs +3 -3
- package/esm2022/table-helpers/directives/table-header.directive.mjs +7 -7
- package/esm2022/table-helpers/directives/table-initial-state.directive.mjs +3 -3
- package/esm2022/table-helpers/directives/table-scrollable.directive.mjs +4 -4
- package/esm2022/table-helpers/directives/table-view-settings-filter-custom.directive.mjs +4 -4
- package/esm2022/table-helpers/directives/table-virtual-scroll.directive.mjs +3 -3
- package/esm2022/table-helpers/enums/collection-filter.enum.mjs +16 -1
- package/esm2022/table-helpers/pipes/cell-styles.pipe.mjs +3 -3
- package/esm2022/table-helpers/pipes/column-resizable-side.pipe.mjs +3 -3
- package/esm2022/table-helpers/pipes/column-sorting-direction.pipe.mjs +3 -3
- package/esm2022/table-helpers/pipes/row-classes.pipe.mjs +3 -3
- package/esm2022/table-helpers/pipes/selection-cell-styles.pipe.mjs +3 -3
- package/esm2022/table-helpers/services/table-column-resize.service.mjs +5 -5
- package/esm2022/table-helpers/services/table-responsive.service.mjs +5 -5
- package/esm2022/table-helpers/services/table-row.service.mjs +3 -3
- package/esm2022/table-helpers/services/table-scroll-dispatcher.service.mjs +3 -3
- package/esm2022/table-helpers/services/table.service.mjs +3 -3
- package/esm2022/table-helpers/table-helpers.module.mjs +4 -4
- package/esm2022/value-help-dialog/components/base-tab/vhd-base-tab.component.mjs +5 -5
- package/esm2022/value-help-dialog/components/define-tab/define-tab.component.mjs +6 -10
- package/esm2022/value-help-dialog/components/select-tab/select-tab.component.mjs +13 -15
- package/esm2022/value-help-dialog/components/value-help-dialog-filter/value-help-dialog-filter.component.mjs +3 -3
- package/esm2022/value-help-dialog/directives/condition-count-message.directive.mjs +5 -5
- package/esm2022/value-help-dialog/value-help-dialog/value-help-dialog.component.mjs +12 -17
- package/esm2022/value-help-dialog/value-help-dialog.module.mjs +4 -4
- package/esm2022/variant-management/components/manage-variant-item/manage-variant-item.component.mjs +5 -5
- package/esm2022/variant-management/components/manage-variants-dialog/manage-variants-dialog.component.mjs +6 -8
- package/esm2022/variant-management/components/variant-management-wrapper/variant-management-wrapper.component.mjs +3 -3
- package/esm2022/variant-management/directives/variant-management-dirty-label.directive.mjs +4 -4
- package/esm2022/variant-management/variant-management.component.mjs +8 -10
- package/esm2022/variant-management/variant-management.module.mjs +4 -4
- package/esm2022/wizard-generator/base-wizard-generator.mjs +5 -5
- package/esm2022/wizard-generator/components/dialog-wizard-generator/dialog-wizard-generator.component.mjs +7 -8
- package/esm2022/wizard-generator/components/wizard-body/wizard-body.component.mjs +7 -9
- package/esm2022/wizard-generator/components/wizard-generator/wizard-generator.component.mjs +6 -7
- package/esm2022/wizard-generator/components/wizard-generator-step/wizard-generator-step.component.mjs +6 -7
- package/esm2022/wizard-generator/components/wizard-summary-step/wizard-summary-section/wizard-summary-section.component.mjs +5 -6
- package/esm2022/wizard-generator/components/wizard-summary-step/wizard-summary-step.component.mjs +7 -7
- package/esm2022/wizard-generator/directives/wizard-generator-finish-button.directive.mjs +3 -3
- package/esm2022/wizard-generator/directives/wizard-generator-go-next-button.directive.mjs +3 -3
- package/esm2022/wizard-generator/directives/wizard-generator-review-button.directive.mjs +3 -3
- package/esm2022/wizard-generator/directives/wizard-generator-summary-step.directive.mjs +3 -3
- package/esm2022/wizard-generator/wizard-dialog-generator.service.mjs +4 -4
- package/esm2022/wizard-generator/wizard-generator.module.mjs +4 -4
- package/esm2022/wizard-generator/wizard-generator.service.mjs +4 -4
- package/fesm2022/fundamental-ngx-platform-approval-flow.mjs +62 -74
- package/fesm2022/fundamental-ngx-platform-approval-flow.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-button.mjs +8 -8
- package/fesm2022/fundamental-ngx-platform-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-dynamic-page.mjs +54 -56
- package/fesm2022/fundamental-ngx-platform-dynamic-page.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-feed-input.mjs +9 -10
- package/fesm2022/fundamental-ngx-platform-feed-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-form.mjs +444 -602
- package/fesm2022/fundamental-ngx-platform-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-icon-tab-bar.mjs +59 -87
- package/fesm2022/fundamental-ngx-platform-icon-tab-bar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-info-label.mjs +8 -8
- package/fesm2022/fundamental-ngx-platform-info-label.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-link.mjs +8 -8
- package/fesm2022/fundamental-ngx-platform-link.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-list.mjs +73 -78
- package/fesm2022/fundamental-ngx-platform-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-menu-button.mjs +8 -8
- package/fesm2022/fundamental-ngx-platform-menu-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-menu.mjs +20 -20
- package/fesm2022/fundamental-ngx-platform-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-message-popover.mjs +29 -33
- package/fesm2022/fundamental-ngx-platform-message-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-object-marker.mjs +9 -10
- package/fesm2022/fundamental-ngx-platform-object-marker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-object-status.mjs +12 -12
- package/fesm2022/fundamental-ngx-platform-object-status.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-page-footer.mjs +9 -9
- package/fesm2022/fundamental-ngx-platform-page-footer.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-panel.mjs +19 -19
- package/fesm2022/fundamental-ngx-platform-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-search-field.mjs +29 -32
- package/fesm2022/fundamental-ngx-platform-search-field.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-settings-generator.mjs +45 -56
- package/fesm2022/fundamental-ngx-platform-settings-generator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-shared.mjs +36 -36
- package/fesm2022/fundamental-ngx-platform-shared.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-slider.mjs +9 -9
- package/fesm2022/fundamental-ngx-platform-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-smart-filter-bar.mjs +48 -53
- package/fesm2022/fundamental-ngx-platform-smart-filter-bar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-split-menu-button.mjs +9 -9
- package/fesm2022/fundamental-ngx-platform-split-menu-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-table-helpers.mjs +115 -100
- package/fesm2022/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-table.mjs +168 -218
- package/fesm2022/fundamental-ngx-platform-table.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-value-help-dialog.mjs +41 -52
- package/fesm2022/fundamental-ngx-platform-value-help-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-variant-management.mjs +28 -31
- package/fesm2022/fundamental-ngx-platform-variant-management.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-wizard-generator.mjs +58 -61
- package/fesm2022/fundamental-ngx-platform-wizard-generator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform.mjs +19 -42
- package/fesm2022/fundamental-ngx-platform.mjs.map +1 -1
- package/form/combobox/combobox-mobile/combobox/combobox-mobile.component.d.ts +2 -2
- package/form/form-group/form-group.component.d.ts +1 -1
- package/form/index.d.ts +0 -2
- package/form/input-group/input-group.component.d.ts +2 -2
- package/form/multi-combobox/multi-combobox/multi-combobox.component.d.ts +1 -1
- package/form/multi-input/multi-input-mobile/multi-input-mobile.component.d.ts +2 -2
- package/fundamental-ngx-platform-v0.48.0-rc.1.tgz +0 -0
- package/fundamental-ngx.module.d.ts +27 -31
- package/icon-tab-bar/components/icon-tab-bar-base.class.d.ts +0 -2
- package/icon-tab-bar/components/popovers/icon-tab-bar-popover-base.class.d.ts +0 -2
- package/index.d.ts +7 -11
- package/list/list.component.d.ts +1 -1
- package/package.json +4 -28
- package/page-footer/page-footer.component.d.ts +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/settings-generator/settings-generator-content/settings-generator-section/settings-generator-section.component.d.ts +1 -1
- package/settings-generator/settings-generator.component.d.ts +2 -2
- package/table/components/table-p13-dialog/filtering/filter-rule.component.d.ts +2 -0
- package/table/table.component.d.ts +1 -1
- package/table-helpers/enums/collection-filter.enum.d.ts +2 -0
- package/value-help-dialog/components/select-tab/select-tab.component.d.ts +1 -1
- package/value-help-dialog/value-help-dialog/value-help-dialog.component.d.ts +1 -1
- package/wizard-generator/components/wizard-generator-step/wizard-generator-step.component.d.ts +2 -2
- package/wizard-generator/components/wizard-summary-step/wizard-summary-step.component.d.ts +2 -2
- package/action-bar/README.md +0 -25
- package/action-bar/action-bar.component.d.ts +0 -36
- package/action-bar/action-bar.module.d.ts +0 -8
- package/action-bar/index.d.ts +0 -2
- package/action-button-group/README.md +0 -25
- package/action-button-group/action-button-group.component.d.ts +0 -11
- package/action-button-group/action-button-group.module.d.ts +0 -7
- package/action-button-group/index.d.ts +0 -2
- package/esm2022/action-bar/action-bar.component.mjs +0 -64
- package/esm2022/action-bar/action-bar.module.mjs +0 -17
- package/esm2022/action-bar/fundamental-ngx-platform-action-bar.mjs +0 -5
- package/esm2022/action-bar/index.mjs +0 -3
- package/esm2022/action-button-group/action-button-group.component.mjs +0 -21
- package/esm2022/action-button-group/action-button-group.module.mjs +0 -16
- package/esm2022/action-button-group/fundamental-ngx-platform-action-button-group.mjs +0 -5
- package/esm2022/action-button-group/index.mjs +0 -3
- package/esm2022/form/platform-file-uploader/platform-file-uploader.component.mjs +0 -143
- package/esm2022/form/platform-file-uploader/platform-file-uploader.module.mjs +0 -16
- package/esm2022/thumbnail/fundamental-ngx-platform-thumbnail.mjs +0 -5
- package/esm2022/thumbnail/index.mjs +0 -6
- package/esm2022/thumbnail/thumbnail-details/thumbnail-details.component.mjs +0 -166
- package/esm2022/thumbnail/thumbnail-image/thumbnail-image.component.mjs +0 -100
- package/esm2022/thumbnail/thumbnail.component.mjs +0 -148
- package/esm2022/thumbnail/thumbnail.interfaces.mjs +0 -2
- package/esm2022/thumbnail/thumbnail.module.mjs +0 -19
- package/esm2022/upload-collection/dialogs/move-to/move-to.component.mjs +0 -148
- package/esm2022/upload-collection/dialogs/new-folder/new-folder.component.mjs +0 -69
- package/esm2022/upload-collection/directives/upload-collection-dragndrop.directive.mjs +0 -138
- package/esm2022/upload-collection/domain/upload-collection-data-provider.mjs +0 -106
- package/esm2022/upload-collection/domain/upload-collection-data-source.mjs +0 -95
- package/esm2022/upload-collection/fundamental-ngx-platform-upload-collection.mjs +0 -5
- package/esm2022/upload-collection/helpers/generate-message-stripe-data.mjs +0 -20
- package/esm2022/upload-collection/index.mjs +0 -12
- package/esm2022/upload-collection/models/upload-collection.models.mjs +0 -58
- package/esm2022/upload-collection/services/files-validator.service.mjs +0 -68
- package/esm2022/upload-collection/upload-collection/upload-collection-data-provider-test.mjs +0 -280
- package/esm2022/upload-collection/upload-collection/upload-collection.component.mjs +0 -926
- package/esm2022/upload-collection/upload-collection.module.mjs +0 -33
- package/fesm2022/fundamental-ngx-platform-action-bar.mjs +0 -85
- package/fesm2022/fundamental-ngx-platform-action-bar.mjs.map +0 -1
- package/fesm2022/fundamental-ngx-platform-action-button-group.mjs +0 -41
- package/fesm2022/fundamental-ngx-platform-action-button-group.mjs.map +0 -1
- package/fesm2022/fundamental-ngx-platform-thumbnail.mjs +0 -418
- package/fesm2022/fundamental-ngx-platform-thumbnail.mjs.map +0 -1
- package/fesm2022/fundamental-ngx-platform-upload-collection.mjs +0 -1893
- package/fesm2022/fundamental-ngx-platform-upload-collection.mjs.map +0 -1
- package/form/platform-file-uploader/platform-file-uploader.component.d.ts +0 -69
- package/form/platform-file-uploader/platform-file-uploader.module.d.ts +0 -7
- package/fundamental-ngx-platform-v0.47.4.tgz +0 -0
- package/thumbnail/README.md +0 -25
- package/thumbnail/index.d.ts +0 -5
- package/thumbnail/thumbnail-details/thumbnail-details.component.d.ts +0 -57
- package/thumbnail/thumbnail-image/thumbnail-image.component.d.ts +0 -48
- package/thumbnail/thumbnail.component.d.ts +0 -73
- package/thumbnail/thumbnail.interfaces.d.ts +0 -12
- package/thumbnail/thumbnail.module.d.ts +0 -9
- package/upload-collection/README.md +0 -25
- package/upload-collection/dialogs/move-to/move-to.component.d.ts +0 -57
- package/upload-collection/dialogs/new-folder/new-folder.component.d.ts +0 -26
- package/upload-collection/directives/upload-collection-dragndrop.directive.d.ts +0 -64
- package/upload-collection/domain/upload-collection-data-provider.d.ts +0 -46
- package/upload-collection/domain/upload-collection-data-source.d.ts +0 -49
- package/upload-collection/helpers/generate-message-stripe-data.d.ts +0 -3
- package/upload-collection/index.d.ts +0 -11
- package/upload-collection/models/upload-collection.models.d.ts +0 -225
- package/upload-collection/services/files-validator.service.d.ts +0 -18
- package/upload-collection/upload-collection/upload-collection-data-provider-test.d.ts +0 -36
- package/upload-collection/upload-collection/upload-collection.component.d.ts +0 -259
- package/upload-collection/upload-collection.module.d.ts +0 -11
|
@@ -1,1893 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewChild, Injectable, EventEmitter, Directive, Input, Output, HostListener, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
|
-
import { ContentDensityModule } from '@fundamental-ngx/core/content-density';
|
|
4
|
-
import { take, tap, delay, map } from 'rxjs/operators';
|
|
5
|
-
import * as i1 from '@fundamental-ngx/core/dialog';
|
|
6
|
-
import { DialogComponent, DialogHeaderComponent, DialogTitleDirective, DialogBodyComponent, DialogFooterComponent } from '@fundamental-ngx/core/dialog';
|
|
7
|
-
import { isObject, isDataSource, ConvertBytesPipe, DataProvider } from '@fundamental-ngx/platform/shared';
|
|
8
|
-
import { CdkScrollable } from '@angular/cdk/overlay';
|
|
9
|
-
import { NgIf, NgFor, NgTemplateOutlet, NgSwitch, NgSwitchCase, DatePipe } from '@angular/common';
|
|
10
|
-
import { TemplateDirective, parserFileSize, uuidv4 as uuidv4$1 } from '@fundamental-ngx/cdk/utils';
|
|
11
|
-
import { ButtonBarComponent, BarLeftDirective, BarElementDirective, BarRightDirective } from '@fundamental-ngx/core/bar';
|
|
12
|
-
import { ButtonComponent } from '@fundamental-ngx/core/button';
|
|
13
|
-
import { IconComponent } from '@fundamental-ngx/core/icon';
|
|
14
|
-
import { ListComponent, ListItemComponent, ListTitleDirective, ListLinkDirective, ListIconDirective } from '@fundamental-ngx/core/list';
|
|
15
|
-
import { ScrollbarDirective } from '@fundamental-ngx/core/scrollbar';
|
|
16
|
-
import { TitleComponent } from '@fundamental-ngx/core/title';
|
|
17
|
-
import { FdTranslatePipe } from '@fundamental-ngx/i18n';
|
|
18
|
-
import * as i2 from '@angular/forms';
|
|
19
|
-
import { FormsModule } from '@angular/forms';
|
|
20
|
-
import { FormControlComponent, FormItemComponent, FormLabelComponent, FormInputMessageGroupComponent, FormMessageComponent } from '@fundamental-ngx/core/form';
|
|
21
|
-
import { ObjectStatusComponent } from '@fundamental-ngx/core/object-status';
|
|
22
|
-
import { BehaviorSubject, Subject, of } from 'rxjs';
|
|
23
|
-
import { BreadcrumbComponent, BreadcrumbItemComponent } from '@fundamental-ngx/core/breadcrumb';
|
|
24
|
-
import { BusyIndicatorComponent } from '@fundamental-ngx/core/busy-indicator';
|
|
25
|
-
import { FileUploaderSelectDirective } from '@fundamental-ngx/core/file-uploader';
|
|
26
|
-
import { InputGroupComponent } from '@fundamental-ngx/core/input-group';
|
|
27
|
-
import { LinkComponent } from '@fundamental-ngx/core/link';
|
|
28
|
-
import { MessageStripComponent } from '@fundamental-ngx/core/message-strip';
|
|
29
|
-
import { PaginationComponent } from '@fundamental-ngx/core/pagination';
|
|
30
|
-
import { ToolbarComponent, ToolbarSpacerDirective, ToolbarItemDirective } from '@fundamental-ngx/core/toolbar';
|
|
31
|
-
import { warnOnce, uuidv4 } from '@fundamental-ngx/core/utils';
|
|
32
|
-
import { MenuTriggerDirective, MenuComponent, MenuItemComponent } from '@fundamental-ngx/platform/menu';
|
|
33
|
-
import { MenuButtonComponent } from '@fundamental-ngx/platform/menu-button';
|
|
34
|
-
import { ColumnAlign, SelectionMode, TableComponent, TableColumnComponent } from '@fundamental-ngx/platform/table';
|
|
35
|
-
import { TableInitialStateDirective, FdpCellDef, FdpTableCell, FdpHeaderCellDef, FdpTableHeader, TableDataSourceDirective, TableHeaderResizerDirective } from '@fundamental-ngx/platform/table-helpers';
|
|
36
|
-
|
|
37
|
-
class NewFolderComponent {
|
|
38
|
-
/** @hidden */
|
|
39
|
-
constructor(dialogRef) {
|
|
40
|
-
this.dialogRef = dialogRef;
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
* The current folder in what need to create a new one
|
|
44
|
-
*/
|
|
45
|
-
this._currentFolder = this.dialogRef.data.currentFolder;
|
|
46
|
-
/** @hidden */
|
|
47
|
-
this._maxFilenameLength = this.dialogRef.data.maxFilenameLength;
|
|
48
|
-
/** @hidden */
|
|
49
|
-
this._newFolderName = 'New Folder';
|
|
50
|
-
}
|
|
51
|
-
/** @hidden */
|
|
52
|
-
ngAfterViewInit() {
|
|
53
|
-
const el = this.formControl.elementRef.nativeElement;
|
|
54
|
-
if (el) {
|
|
55
|
-
el.focus();
|
|
56
|
-
this._setSelectionRange(el, 0, this._newFolderName.length);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/** @hidden */
|
|
60
|
-
_setSelectionRange(el, selectionStart, selectionEnd) {
|
|
61
|
-
const direction = el.selectionDirection;
|
|
62
|
-
el.setSelectionRange(selectionStart, selectionEnd, direction || undefined);
|
|
63
|
-
}
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: NewFolderComponent, deps: [{ token: i1.DialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
65
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: NewFolderComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "formControl", first: true, predicate: FormControlComponent, descendants: true }], ngImport: i0, template: "<fd-dialog>\n <fd-dialog-header>\n <h1 class=\"fd-title--bold\" fd-dialog-title id=\"fdp-upload-collection-new-folder-title\" fd-title>\n {{ 'platformUploadCollection.newFolderTitle' | fdTranslate }}\n </h1>\n </fd-dialog-header>\n\n <fd-dialog-body>\n <div fd-form-item>\n <label fd-form-label for=\"fdp-upload-collection-new-folder-input\">\n {{\n (_currentFolder\n ? 'platformUploadCollection.newFolderAtFolderInputLabel'\n : 'platformUploadCollection.newFolderAtRootInputLabel'\n ) | fdTranslate : { folderName: _currentFolder?.name || '' }\n }}:\n </label>\n <input\n #formControl\n fd-form-control\n fdkInitialFocus\n id=\"fdp-upload-collection-new-folder-input\"\n type=\"text\"\n [(ngModel)]=\"_newFolderName\"\n [placeholder]=\"'platformUploadCollection.newFolderInputPlaceholder' | fdTranslate\"\n />\n <span\n *ngIf=\"_newFolderName.length > _maxFilenameLength\"\n fd-object-status\n status=\"negative\"\n [label]=\"'platformUploadCollection.newFolderInputErrorLabel' | fdTranslate\"\n [attr.title]=\"'platformUploadCollection.newFolderInputErrorLabel' | fdTranslate\"\n [attr.aria-label]=\"'platformUploadCollection.newFolderInputErrorLabel' | fdTranslate\"\n ></span>\n </div>\n </fd-dialog-body>\n\n <fd-dialog-footer>\n <fd-button-bar\n fdType=\"emphasized\"\n [label]=\"'platformUploadCollection.newFolderDialogCreateBtnLabel' | fdTranslate\"\n [disabled]=\"_newFolderName.length > _maxFilenameLength\"\n (click)=\"dialogRef.close(_newFolderName)\"\n >\n </fd-button-bar>\n <fd-button-bar\n [label]=\"'platformUploadCollection.newFolderDialogCancelBtnLabel' | fdTranslate\"\n (click)=\"dialogRef.dismiss()\"\n >\n </fd-button-bar>\n </fd-dialog-footer>\n</fd-dialog>\n", styles: [".fd-title--bold{font-weight:700}\n"], dependencies: [{ kind: "component", type: DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "component", type: TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: DialogTitleDirective, selector: "[fd-dialog-title]", inputs: ["id"] }, { kind: "component", type: DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: FormItemComponent, selector: "[fd-form-item]", inputs: ["isInline", "horizontal"] }, { kind: "component", type: FormLabelComponent, selector: "[fd-form-label]", inputs: ["required", "colon", "alignLabelEnd", "inlineHelpContent", "inlineHelpGlyph", "inlineHelpTriggers", "inlineHelpBodyPlacement", "inlineHelpPlacement", "inlineHelpLabel", "id"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormControlComponent, selector: "input[fd-form-control], textarea[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ObjectStatusComponent, selector: "[fd-object-status]", inputs: ["class", "status", "glyph", "label", "glyphAriaLabel", "indicationColor", "clickable", "inverted", "large", "secondaryIndication", "textTemplate"] }, { kind: "component", type: DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }] }); }
|
|
66
|
-
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: NewFolderComponent, decorators: [{
|
|
68
|
-
type: Component,
|
|
69
|
-
args: [{ standalone: true, imports: [
|
|
70
|
-
DialogComponent,
|
|
71
|
-
DialogHeaderComponent,
|
|
72
|
-
TitleComponent,
|
|
73
|
-
DialogTitleDirective,
|
|
74
|
-
CdkScrollable,
|
|
75
|
-
ScrollbarDirective,
|
|
76
|
-
DialogBodyComponent,
|
|
77
|
-
FormItemComponent,
|
|
78
|
-
FormLabelComponent,
|
|
79
|
-
FormsModule,
|
|
80
|
-
FormControlComponent,
|
|
81
|
-
NgIf,
|
|
82
|
-
ObjectStatusComponent,
|
|
83
|
-
DialogFooterComponent,
|
|
84
|
-
ButtonBarComponent,
|
|
85
|
-
FdTranslatePipe
|
|
86
|
-
], template: "<fd-dialog>\n <fd-dialog-header>\n <h1 class=\"fd-title--bold\" fd-dialog-title id=\"fdp-upload-collection-new-folder-title\" fd-title>\n {{ 'platformUploadCollection.newFolderTitle' | fdTranslate }}\n </h1>\n </fd-dialog-header>\n\n <fd-dialog-body>\n <div fd-form-item>\n <label fd-form-label for=\"fdp-upload-collection-new-folder-input\">\n {{\n (_currentFolder\n ? 'platformUploadCollection.newFolderAtFolderInputLabel'\n : 'platformUploadCollection.newFolderAtRootInputLabel'\n ) | fdTranslate : { folderName: _currentFolder?.name || '' }\n }}:\n </label>\n <input\n #formControl\n fd-form-control\n fdkInitialFocus\n id=\"fdp-upload-collection-new-folder-input\"\n type=\"text\"\n [(ngModel)]=\"_newFolderName\"\n [placeholder]=\"'platformUploadCollection.newFolderInputPlaceholder' | fdTranslate\"\n />\n <span\n *ngIf=\"_newFolderName.length > _maxFilenameLength\"\n fd-object-status\n status=\"negative\"\n [label]=\"'platformUploadCollection.newFolderInputErrorLabel' | fdTranslate\"\n [attr.title]=\"'platformUploadCollection.newFolderInputErrorLabel' | fdTranslate\"\n [attr.aria-label]=\"'platformUploadCollection.newFolderInputErrorLabel' | fdTranslate\"\n ></span>\n </div>\n </fd-dialog-body>\n\n <fd-dialog-footer>\n <fd-button-bar\n fdType=\"emphasized\"\n [label]=\"'platformUploadCollection.newFolderDialogCreateBtnLabel' | fdTranslate\"\n [disabled]=\"_newFolderName.length > _maxFilenameLength\"\n (click)=\"dialogRef.close(_newFolderName)\"\n >\n </fd-button-bar>\n <fd-button-bar\n [label]=\"'platformUploadCollection.newFolderDialogCancelBtnLabel' | fdTranslate\"\n (click)=\"dialogRef.dismiss()\"\n >\n </fd-button-bar>\n </fd-dialog-footer>\n</fd-dialog>\n", styles: [".fd-title--bold{font-weight:700}\n"] }]
|
|
87
|
-
}], ctorParameters: function () { return [{ type: i1.DialogRef }]; }, propDecorators: { formControl: [{
|
|
88
|
-
type: ViewChild,
|
|
89
|
-
args: [FormControlComponent]
|
|
90
|
-
}] } });
|
|
91
|
-
|
|
92
|
-
class MoveToComponent {
|
|
93
|
-
/** @hidden */
|
|
94
|
-
constructor(dialogRef, _dialogService, _cd) {
|
|
95
|
-
this.dialogRef = dialogRef;
|
|
96
|
-
this._dialogService = _dialogService;
|
|
97
|
-
this._cd = _cd;
|
|
98
|
-
/**
|
|
99
|
-
* List of upload collection items
|
|
100
|
-
*/
|
|
101
|
-
this.items = this.dialogRef.data.items;
|
|
102
|
-
/**
|
|
103
|
-
* The current folder in what need to create a new one
|
|
104
|
-
*/
|
|
105
|
-
this.originalFolder = this.dialogRef.data.currentFolder;
|
|
106
|
-
/** @hidden */
|
|
107
|
-
this.movableFolders = this.dialogRef.data.movableFolders;
|
|
108
|
-
/** @hidden */
|
|
109
|
-
this._maxFilenameLength = this.dialogRef.data.maxFilenameLength;
|
|
110
|
-
/** @hidden */
|
|
111
|
-
this._currentFolder = this.originalFolder && { ...this.originalFolder };
|
|
112
|
-
/** @hidden */
|
|
113
|
-
this._foldersList = [];
|
|
114
|
-
}
|
|
115
|
-
/** @hidden */
|
|
116
|
-
ngOnInit() {
|
|
117
|
-
this._init(this._currentFolder ? this._currentFolder.files : this.items);
|
|
118
|
-
}
|
|
119
|
-
/** @hidden */
|
|
120
|
-
_goToParentFolder() {
|
|
121
|
-
this.selectedFolder = null;
|
|
122
|
-
this._currentFolder = this._getParentFolderByCurrentFolderId(this._currentFolder?.documentId);
|
|
123
|
-
this._init(this._currentFolder ? this._currentFolder.files : this.items);
|
|
124
|
-
this._cd.detectChanges();
|
|
125
|
-
}
|
|
126
|
-
/** @hidden */
|
|
127
|
-
_close() {
|
|
128
|
-
this.dialogRef.dismiss();
|
|
129
|
-
}
|
|
130
|
-
/** @hidden */
|
|
131
|
-
_confirm() {
|
|
132
|
-
this.dialogRef.close({
|
|
133
|
-
selectedFolder: this.selectedFolder || this._currentFolder
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
/** @hidden */
|
|
137
|
-
_openFolder(folder) {
|
|
138
|
-
this.selectedFolder = null;
|
|
139
|
-
this._currentFolder = folder;
|
|
140
|
-
this._init(folder.files);
|
|
141
|
-
this._cd.detectChanges();
|
|
142
|
-
}
|
|
143
|
-
/** @hidden */
|
|
144
|
-
_selectFolder(folder) {
|
|
145
|
-
this.selectedFolder = folder;
|
|
146
|
-
}
|
|
147
|
-
/** @hidden */
|
|
148
|
-
_hasFolders(items) {
|
|
149
|
-
return items.some((item) => item.type === 'folder');
|
|
150
|
-
}
|
|
151
|
-
/** @hidden */
|
|
152
|
-
_newFolder() {
|
|
153
|
-
const dialogRef = this._dialogService.open(NewFolderComponent, {
|
|
154
|
-
responsivePadding: true,
|
|
155
|
-
backdropClickCloseable: false,
|
|
156
|
-
height: '350px',
|
|
157
|
-
backdropClass: 'fdp-upload-collection-dialig-no-bg',
|
|
158
|
-
data: {
|
|
159
|
-
currentFolder: this._currentFolder,
|
|
160
|
-
maxFilenameLength: this._maxFilenameLength
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
dialogRef.afterClosed.pipe(take(1)).subscribe((folderName) => {
|
|
164
|
-
this.dialogRef.close({
|
|
165
|
-
parentFolderId: this._currentFolder?.documentId,
|
|
166
|
-
selectedFolder: null,
|
|
167
|
-
folderName
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
/** @hidden */
|
|
172
|
-
_init(items) {
|
|
173
|
-
this._foldersList = items.filter((item) => item.type === 'folder' && !this.movableFolders?.some((folder) => folder.documentId === item.documentId));
|
|
174
|
-
}
|
|
175
|
-
/** @hidden */
|
|
176
|
-
_getParentFolderByCurrentFolderId(documentId) {
|
|
177
|
-
let foundObj;
|
|
178
|
-
if (documentId) {
|
|
179
|
-
JSON.stringify(this.items, (_, nestedValue) => {
|
|
180
|
-
if (!isObject(nestedValue) || nestedValue.type === 'file' || !nestedValue.files) {
|
|
181
|
-
return nestedValue;
|
|
182
|
-
}
|
|
183
|
-
if (nestedValue.files.some((item) => item.documentId === documentId)) {
|
|
184
|
-
foundObj = nestedValue;
|
|
185
|
-
}
|
|
186
|
-
return nestedValue;
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
return foundObj;
|
|
190
|
-
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MoveToComponent, deps: [{ token: i1.DialogRef }, { token: i1.DialogService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: MoveToComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<fd-dialog>\n <fd-dialog-header>\n <ng-template fdkTemplate=\"header\">\n <div fd-bar-left>\n <fd-bar-element>\n <h1 class=\"fd-title--bold\" *ngIf=\"!_currentFolder\" fd-title>\n {{ 'platformUploadCollection.moveToTitle' | fdTranslate }}\n </h1>\n <ng-container *ngIf=\"_currentFolder\">\n <button\n fd-button\n fdType=\"transparent\"\n glyph=\"navigation-left-arrow\"\n (click)=\"_goToParentFolder()\"\n ></button>\n <h1 fd-title>\n <span>{{ 'platformUploadCollection.moveToTitleFolder' | fdTranslate }}</span>\n {{ _currentFolder.name }}\n </h1>\n </ng-container>\n </fd-bar-element>\n </div>\n <div fd-bar-right>\n <fd-bar-element>\n <button\n fd-button\n [label]=\"'platformUploadCollection.moveToNewFolderBtnLabel' | fdTranslate\"\n (click)=\"_newFolder()\"\n ></button>\n </fd-bar-element>\n </div>\n </ng-template>\n </fd-dialog-header>\n\n <fd-dialog-body class=\"fd-dialog__body--no-horizontal-padding\">\n <ul fd-list>\n <li *ngIf=\"!_currentFolder\" fd-list-item class=\"fd-list__item--title-background\">\n <span fd-list-title>{{ 'platformUploadCollection.moveToAllFilesSubHeaderLabel' | fdTranslate }}</span>\n </li>\n <li\n fd-list-item\n *ngFor=\"let folder of _foldersList\"\n [selected]=\"selectedFolder?.documentId === folder.documentId\"\n >\n <a fd-list-link (click)=\"_hasFolders(folder.files) ? _openFolder(folder) : _selectFolder(folder)\">\n <fd-icon class=\"fdp-upload-collection__fd-icon\" glyph=\"folder-blank\"></fd-icon>\n <span fd-list-title>{{ folder.name }}</span>\n <i *ngIf=\"_hasFolders(folder.files)\" fd-list-icon glyph=\"slim-arrow-right\"></i>\n </a>\n </li>\n </ul>\n </fd-dialog-body>\n\n <fd-dialog-footer>\n <fd-button-bar\n fdType=\"emphasized\"\n type=\"submit\"\n [disabled]=\"\n !(\n (selectedFolder && originalFolder?.documentId !== selectedFolder.documentId) ||\n (!selectedFolder && originalFolder?.documentId !== _currentFolder?.documentId)\n )\n \"\n (click)=\"_confirm()\"\n >\n {{ 'platformUploadCollection.moveToConfirmBtn' | fdTranslate }}\n </fd-button-bar>\n <fd-button-bar (click)=\"_close()\">\n {{ 'platformUploadCollection.moveToCloseBtn' | fdTranslate }}\n </fd-button-bar>\n </fd-dialog-footer>\n</fd-dialog>\n", styles: [".fd-list__item--title-background{background-color:var(--sapList_HeaderBackground)}.fd-dialog__body--no-horizontal-padding{padding-left:0!important;padding-right:0!important}.fd-title--bold{font-weight:700}\n"], dependencies: [{ kind: "component", type: DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "directive", type: TemplateDirective, selector: "[fdkTemplate]", inputs: ["fdkTemplate"] }, { kind: "directive", type: BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: BarRightDirective, selector: "[fd-bar-right]" }, { kind: "component", type: DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline", "unreadIndicator", "role"], outputs: ["focusEscapeList"] }, { kind: "component", type: ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "noData", "action", "interactive", "growing", "counter", "unread", "byline", "ariaRole"], outputs: ["keyDown"] }, { kind: "directive", type: ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ListLinkDirective, selector: "[fd-list-link], [fdListLink]", inputs: ["navigationIndicator", "navigated", "focusable"] }, { kind: "component", type: IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "class", "ariaLabel", "ariaHidden"] }, { kind: "directive", type: ListIconDirective, selector: "[fdListIcon], [fd-list-icon]", inputs: ["glyph", "class", "role"] }, { kind: "component", type: DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }] }); }
|
|
193
|
-
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: MoveToComponent, decorators: [{
|
|
195
|
-
type: Component,
|
|
196
|
-
args: [{ standalone: true, imports: [
|
|
197
|
-
DialogComponent,
|
|
198
|
-
DialogHeaderComponent,
|
|
199
|
-
TemplateDirective,
|
|
200
|
-
BarLeftDirective,
|
|
201
|
-
BarElementDirective,
|
|
202
|
-
NgIf,
|
|
203
|
-
TitleComponent,
|
|
204
|
-
ButtonComponent,
|
|
205
|
-
BarRightDirective,
|
|
206
|
-
CdkScrollable,
|
|
207
|
-
ScrollbarDirective,
|
|
208
|
-
DialogBodyComponent,
|
|
209
|
-
ListComponent,
|
|
210
|
-
ListItemComponent,
|
|
211
|
-
ListTitleDirective,
|
|
212
|
-
NgFor,
|
|
213
|
-
ListLinkDirective,
|
|
214
|
-
IconComponent,
|
|
215
|
-
ListIconDirective,
|
|
216
|
-
DialogFooterComponent,
|
|
217
|
-
ButtonBarComponent,
|
|
218
|
-
FdTranslatePipe
|
|
219
|
-
], template: "<fd-dialog>\n <fd-dialog-header>\n <ng-template fdkTemplate=\"header\">\n <div fd-bar-left>\n <fd-bar-element>\n <h1 class=\"fd-title--bold\" *ngIf=\"!_currentFolder\" fd-title>\n {{ 'platformUploadCollection.moveToTitle' | fdTranslate }}\n </h1>\n <ng-container *ngIf=\"_currentFolder\">\n <button\n fd-button\n fdType=\"transparent\"\n glyph=\"navigation-left-arrow\"\n (click)=\"_goToParentFolder()\"\n ></button>\n <h1 fd-title>\n <span>{{ 'platformUploadCollection.moveToTitleFolder' | fdTranslate }}</span>\n {{ _currentFolder.name }}\n </h1>\n </ng-container>\n </fd-bar-element>\n </div>\n <div fd-bar-right>\n <fd-bar-element>\n <button\n fd-button\n [label]=\"'platformUploadCollection.moveToNewFolderBtnLabel' | fdTranslate\"\n (click)=\"_newFolder()\"\n ></button>\n </fd-bar-element>\n </div>\n </ng-template>\n </fd-dialog-header>\n\n <fd-dialog-body class=\"fd-dialog__body--no-horizontal-padding\">\n <ul fd-list>\n <li *ngIf=\"!_currentFolder\" fd-list-item class=\"fd-list__item--title-background\">\n <span fd-list-title>{{ 'platformUploadCollection.moveToAllFilesSubHeaderLabel' | fdTranslate }}</span>\n </li>\n <li\n fd-list-item\n *ngFor=\"let folder of _foldersList\"\n [selected]=\"selectedFolder?.documentId === folder.documentId\"\n >\n <a fd-list-link (click)=\"_hasFolders(folder.files) ? _openFolder(folder) : _selectFolder(folder)\">\n <fd-icon class=\"fdp-upload-collection__fd-icon\" glyph=\"folder-blank\"></fd-icon>\n <span fd-list-title>{{ folder.name }}</span>\n <i *ngIf=\"_hasFolders(folder.files)\" fd-list-icon glyph=\"slim-arrow-right\"></i>\n </a>\n </li>\n </ul>\n </fd-dialog-body>\n\n <fd-dialog-footer>\n <fd-button-bar\n fdType=\"emphasized\"\n type=\"submit\"\n [disabled]=\"\n !(\n (selectedFolder && originalFolder?.documentId !== selectedFolder.documentId) ||\n (!selectedFolder && originalFolder?.documentId !== _currentFolder?.documentId)\n )\n \"\n (click)=\"_confirm()\"\n >\n {{ 'platformUploadCollection.moveToConfirmBtn' | fdTranslate }}\n </fd-button-bar>\n <fd-button-bar (click)=\"_close()\">\n {{ 'platformUploadCollection.moveToCloseBtn' | fdTranslate }}\n </fd-button-bar>\n </fd-dialog-footer>\n</fd-dialog>\n", styles: [".fd-list__item--title-background{background-color:var(--sapList_HeaderBackground)}.fd-dialog__body--no-horizontal-padding{padding-left:0!important;padding-right:0!important}.fd-title--bold{font-weight:700}\n"] }]
|
|
220
|
-
}], ctorParameters: function () { return [{ type: i1.DialogRef }, { type: i1.DialogService }, { type: i0.ChangeDetectorRef }]; } });
|
|
221
|
-
|
|
222
|
-
class FilesValidatorService {
|
|
223
|
-
/**
|
|
224
|
-
* Method that validates files passed. It is based on
|
|
225
|
-
* @param files File[]
|
|
226
|
-
* @param params ValidateFilesParams
|
|
227
|
-
*/
|
|
228
|
-
validation(files, { maxFileNameLength, fileTypes, maxFileSize, mimeTypes }) {
|
|
229
|
-
return files.reduce((res, file) => {
|
|
230
|
-
if ((fileTypes && fileTypes.length > 0 && this._checkByFileExtension(file, fileTypes)) ||
|
|
231
|
-
(mimeTypes && mimeTypes.length > 0 && this._checkByMimeType(file, mimeTypes))) {
|
|
232
|
-
if (!res.typeMismatch) {
|
|
233
|
-
res.typeMismatch = [];
|
|
234
|
-
}
|
|
235
|
-
res.typeMismatch.push(file);
|
|
236
|
-
return res;
|
|
237
|
-
}
|
|
238
|
-
if (maxFileSize) {
|
|
239
|
-
const maxSize = parserFileSize(maxFileSize);
|
|
240
|
-
if (file.size > maxSize) {
|
|
241
|
-
if (!res.fileSizeExceed) {
|
|
242
|
-
res.fileSizeExceed = [];
|
|
243
|
-
}
|
|
244
|
-
res.fileSizeExceed.push(file);
|
|
245
|
-
return res;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (typeof maxFileNameLength === 'number' && this._checkByFileNameLength(file, maxFileNameLength)) {
|
|
249
|
-
if (!res.filenameLengthExceed) {
|
|
250
|
-
res.filenameLengthExceed = [];
|
|
251
|
-
}
|
|
252
|
-
res.filenameLengthExceed.push(file);
|
|
253
|
-
return res;
|
|
254
|
-
}
|
|
255
|
-
if (!res.validFiles) {
|
|
256
|
-
res.validFiles = [];
|
|
257
|
-
}
|
|
258
|
-
res.validFiles.push(file);
|
|
259
|
-
return res;
|
|
260
|
-
}, {});
|
|
261
|
-
}
|
|
262
|
-
/** @hidden */
|
|
263
|
-
_checkByFileExtension(file, fileTypes) {
|
|
264
|
-
const fileNameSplit = file.name.split('.');
|
|
265
|
-
const extension = fileNameSplit[fileNameSplit.length - 1].toLocaleLowerCase();
|
|
266
|
-
return !fileTypes.some((type) => type.replace('.', '').toLowerCase() === extension);
|
|
267
|
-
}
|
|
268
|
-
/** @hidden */
|
|
269
|
-
_checkByMimeType(file, mimeTypes) {
|
|
270
|
-
return !mimeTypes.some((type) => type.toLowerCase() === file.type);
|
|
271
|
-
}
|
|
272
|
-
/** @hidden */
|
|
273
|
-
_checkByFileNameLength(file, maxFileNameLength) {
|
|
274
|
-
const fileNameSplit = file.name.split('.');
|
|
275
|
-
fileNameSplit.pop();
|
|
276
|
-
const fileName = fileNameSplit.join('.');
|
|
277
|
-
return fileName.length > maxFileNameLength;
|
|
278
|
-
}
|
|
279
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FilesValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
280
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FilesValidatorService, providedIn: 'root' }); }
|
|
281
|
-
}
|
|
282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FilesValidatorService, decorators: [{
|
|
283
|
-
type: Injectable,
|
|
284
|
-
args: [{ providedIn: 'root' }]
|
|
285
|
-
}] });
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Directive that handles the drag and drop feature of the file input.
|
|
289
|
-
*/
|
|
290
|
-
class UploadCollectionDragnDropDirective {
|
|
291
|
-
/** @hidden */
|
|
292
|
-
constructor(_elementRef, _filesValidatorService) {
|
|
293
|
-
this._elementRef = _elementRef;
|
|
294
|
-
this._filesValidatorService = _filesValidatorService;
|
|
295
|
-
/** Whether multiple files can be dropped at once. */
|
|
296
|
-
this.multiple = true;
|
|
297
|
-
/**
|
|
298
|
-
* Defines the allowed file types for the upload.
|
|
299
|
-
* The chosen files will be checked against an array of file types.
|
|
300
|
-
* If at least one file does not fit the file type requirements,
|
|
301
|
-
* the upload is prevented. Example: ["jpg", "png", "bmp"].
|
|
302
|
-
*/
|
|
303
|
-
this.fileTypes = [];
|
|
304
|
-
/**
|
|
305
|
-
* Defines the allowed MIME types of files to be uploaded.
|
|
306
|
-
* The chosen files will be checked against an array of MIME types.
|
|
307
|
-
* If at least one file does not fit the MIME type requirements, the upload is prevented.
|
|
308
|
-
* Example: mimeTypes ["image/png", "image/jpeg"].
|
|
309
|
-
*/
|
|
310
|
-
this.mimeTypes = [];
|
|
311
|
-
/** Whether selecting of new files is disabled. */
|
|
312
|
-
this.disabled = false;
|
|
313
|
-
/** Whether drag and drop is enabled. Disables this directive. */
|
|
314
|
-
this.dragndrop = true;
|
|
315
|
-
/** Event emitted when files are dropped. Passes back an array of files. */
|
|
316
|
-
this.fileChanged = new EventEmitter();
|
|
317
|
-
/** Event emitted when the dragged file enters the dropzone or exits from it. */
|
|
318
|
-
this.cancel = new EventEmitter();
|
|
319
|
-
/** Event emitted when the dragged file enters the dropzone. */
|
|
320
|
-
this.onDropzone = new EventEmitter();
|
|
321
|
-
/** @hidden */
|
|
322
|
-
this.dropzonePreviousState = null;
|
|
323
|
-
const element = this._elementRef.nativeElement;
|
|
324
|
-
this.elementSelector = element.id ? `#${element.id}` : '';
|
|
325
|
-
this.elementSelector += element.className ? `.${element.className.split(' ').join('.')}` : '';
|
|
326
|
-
if (!this.elementSelector) {
|
|
327
|
-
this.elementSelector = `${element.localName}[fdpUploadCollectionDragnDrop]`;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
/** @hidden */
|
|
331
|
-
onWindowDragover(event) {
|
|
332
|
-
if (!this.dragndrop || this.disabled) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
this._muteEvent(event);
|
|
336
|
-
const isDragDropArea = !!(event.target instanceof HTMLElement && event.target.closest(this.elementSelector));
|
|
337
|
-
if (this.dropzonePreviousState !== isDragDropArea) {
|
|
338
|
-
this.dropzonePreviousState = isDragDropArea;
|
|
339
|
-
this.onDropzone.emit(isDragDropArea);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
/** @hidden */
|
|
343
|
-
onDragLeave(event) {
|
|
344
|
-
if (!this.dragndrop || this.disabled) {
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
const leavePositions = [event.screenX, event.screenY, event.clientX, event.clientY, event.pageX, event.pageY];
|
|
348
|
-
if (!leavePositions.some((item) => item > 0)) {
|
|
349
|
-
this._muteEvent(event);
|
|
350
|
-
this.dropzonePreviousState = null;
|
|
351
|
-
this.cancel.emit();
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
/** @hidden */
|
|
355
|
-
onDrop(event) {
|
|
356
|
-
if (!this.dragndrop || this.disabled) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
this.dropzonePreviousState = null;
|
|
360
|
-
this.cancel.emit();
|
|
361
|
-
const isDragDropArea = !!(event.target instanceof HTMLElement && event.target.closest(this.elementSelector));
|
|
362
|
-
if (!isDragDropArea) {
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
this._muteEvent(event);
|
|
366
|
-
const rawFiles = event.dataTransfer?.files ?? [];
|
|
367
|
-
const files = Array.from(rawFiles);
|
|
368
|
-
const output = this._filesValidatorService.validation(files, {
|
|
369
|
-
maxFileSize: this.maxFileSize,
|
|
370
|
-
maxFileNameLength: this.maxFilenameLength,
|
|
371
|
-
fileTypes: this.fileTypes,
|
|
372
|
-
mimeTypes: this.mimeTypes
|
|
373
|
-
});
|
|
374
|
-
this.fileChanged.emit(output);
|
|
375
|
-
}
|
|
376
|
-
/** @hidden */
|
|
377
|
-
_muteEvent(event) {
|
|
378
|
-
event.preventDefault();
|
|
379
|
-
event.stopPropagation();
|
|
380
|
-
}
|
|
381
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: UploadCollectionDragnDropDirective, deps: [{ token: i0.ElementRef }, { token: FilesValidatorService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
382
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.7", type: UploadCollectionDragnDropDirective, isStandalone: true, selector: "[fdpUploadCollectionDragnDrop]", inputs: { multiple: "multiple", fileTypes: "fileTypes", maxFileSize: "maxFileSize", maxFilenameLength: "maxFilenameLength", mimeTypes: "mimeTypes", disabled: "disabled", dragndrop: "dragndrop" }, outputs: { fileChanged: "fileChanged", cancel: "cancel", onDropzone: "onDropzone" }, host: { listeners: { "window:dragover": "onWindowDragover($event)", "window:dragleave": "onDragLeave($event)", "window:drop": "onDrop($event)" } }, ngImport: i0 }); }
|
|
383
|
-
}
|
|
384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: UploadCollectionDragnDropDirective, decorators: [{
|
|
385
|
-
type: Directive,
|
|
386
|
-
args: [{
|
|
387
|
-
selector: '[fdpUploadCollectionDragnDrop]',
|
|
388
|
-
standalone: true
|
|
389
|
-
}]
|
|
390
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: FilesValidatorService }]; }, propDecorators: { multiple: [{
|
|
391
|
-
type: Input
|
|
392
|
-
}], fileTypes: [{
|
|
393
|
-
type: Input
|
|
394
|
-
}], maxFileSize: [{
|
|
395
|
-
type: Input
|
|
396
|
-
}], maxFilenameLength: [{
|
|
397
|
-
type: Input
|
|
398
|
-
}], mimeTypes: [{
|
|
399
|
-
type: Input
|
|
400
|
-
}], disabled: [{
|
|
401
|
-
type: Input
|
|
402
|
-
}], dragndrop: [{
|
|
403
|
-
type: Input
|
|
404
|
-
}], fileChanged: [{
|
|
405
|
-
type: Output
|
|
406
|
-
}], cancel: [{
|
|
407
|
-
type: Output
|
|
408
|
-
}], onDropzone: [{
|
|
409
|
-
type: Output
|
|
410
|
-
}], onWindowDragover: [{
|
|
411
|
-
type: HostListener,
|
|
412
|
-
args: ['window:dragover', ['$event']]
|
|
413
|
-
}], onDragLeave: [{
|
|
414
|
-
type: HostListener,
|
|
415
|
-
args: ['window:dragleave', ['$event']]
|
|
416
|
-
}], onDrop: [{
|
|
417
|
-
type: HostListener,
|
|
418
|
-
args: ['window:drop', ['$event']]
|
|
419
|
-
}] } });
|
|
420
|
-
|
|
421
|
-
function _groupByTypeAndCount(items) {
|
|
422
|
-
return items.reduce((res, item) => {
|
|
423
|
-
res[item.type] += 1;
|
|
424
|
-
return res;
|
|
425
|
-
}, { file: 0, folder: 0 });
|
|
426
|
-
}
|
|
427
|
-
/** @hidden */
|
|
428
|
-
function generateMessageStripeData(type, options) {
|
|
429
|
-
const newMessage = {
|
|
430
|
-
messageType: type,
|
|
431
|
-
messageStripType: options.type,
|
|
432
|
-
payload: options.payload
|
|
433
|
-
};
|
|
434
|
-
const items = options.payload.items;
|
|
435
|
-
if (items && items.length > 0) {
|
|
436
|
-
newMessage.count = _groupByTypeAndCount(items);
|
|
437
|
-
}
|
|
438
|
-
return newMessage;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
var UploadCollectionItemStatus;
|
|
442
|
-
(function (UploadCollectionItemStatus) {
|
|
443
|
-
UploadCollectionItemStatus["LOADING"] = "loading";
|
|
444
|
-
UploadCollectionItemStatus["SUCCESSFUL"] = "successful";
|
|
445
|
-
UploadCollectionItemStatus["UNSUCCESSFUL"] = "unsuccessful";
|
|
446
|
-
})(UploadCollectionItemStatus || (UploadCollectionItemStatus = {}));
|
|
447
|
-
var MessageStripType;
|
|
448
|
-
(function (MessageStripType) {
|
|
449
|
-
MessageStripType["WARNING"] = "warning";
|
|
450
|
-
MessageStripType["SUCCESS"] = "success";
|
|
451
|
-
MessageStripType["INFORMATION"] = "information";
|
|
452
|
-
MessageStripType["ERROR"] = "error";
|
|
453
|
-
})(MessageStripType || (MessageStripType = {}));
|
|
454
|
-
var MessageType;
|
|
455
|
-
(function (MessageType) {
|
|
456
|
-
MessageType[MessageType["CREATE"] = 0] = "CREATE";
|
|
457
|
-
MessageType[MessageType["REMOVE"] = 1] = "REMOVE";
|
|
458
|
-
MessageType[MessageType["MOVE"] = 2] = "MOVE";
|
|
459
|
-
MessageType[MessageType["UPDATE_VERSION"] = 3] = "UPDATE_VERSION";
|
|
460
|
-
MessageType[MessageType["FILE_RENAME"] = 4] = "FILE_RENAME";
|
|
461
|
-
MessageType[MessageType["TYPE_MISMATCH"] = 5] = "TYPE_MISMATCH";
|
|
462
|
-
MessageType[MessageType["FILE_NAME_LENGTH"] = 6] = "FILE_NAME_LENGTH";
|
|
463
|
-
MessageType[MessageType["FILE_SIZE"] = 7] = "FILE_SIZE";
|
|
464
|
-
})(MessageType || (MessageType = {}));
|
|
465
|
-
class FilenameLengthExceedEvent {
|
|
466
|
-
/**
|
|
467
|
-
* Filename length exceed event payload
|
|
468
|
-
* @param source Upload Collection component
|
|
469
|
-
* @param payload Files
|
|
470
|
-
*/
|
|
471
|
-
constructor(source, payload) {
|
|
472
|
-
this.source = source;
|
|
473
|
-
this.payload = payload;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
class TypeMismatchEvent {
|
|
477
|
-
/**
|
|
478
|
-
* Type mismatch event
|
|
479
|
-
* @param source Upload Collection component
|
|
480
|
-
* @param payload Files
|
|
481
|
-
*/
|
|
482
|
-
constructor(source, payload) {
|
|
483
|
-
this.source = source;
|
|
484
|
-
this.payload = payload;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
class FileSizeExceedEvent {
|
|
488
|
-
/**
|
|
489
|
-
* Filesize exceed event
|
|
490
|
-
* @param source Upload Collection component
|
|
491
|
-
* @param payload Files
|
|
492
|
-
*/
|
|
493
|
-
constructor(source, payload) {
|
|
494
|
-
this.source = source;
|
|
495
|
-
this.payload = payload;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
let randomId = 0;
|
|
500
|
-
/**
|
|
501
|
-
* @deprecated
|
|
502
|
-
* UploadCollection component is deprecated since version 0.40.0
|
|
503
|
-
*/
|
|
504
|
-
class UploadCollectionComponent {
|
|
505
|
-
/** Defines the number of items on the page */
|
|
506
|
-
set itemsPerPage(value) {
|
|
507
|
-
if (typeof value === 'number') {
|
|
508
|
-
this._itemsPerPage = value;
|
|
509
|
-
this._match();
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
const defaultValue = value.find((item) => item.default);
|
|
513
|
-
this._itemsPerPageOptions = value;
|
|
514
|
-
if (defaultValue) {
|
|
515
|
-
this._itemsPerPage = defaultValue.label;
|
|
516
|
-
this._match();
|
|
517
|
-
return;
|
|
518
|
-
}
|
|
519
|
-
this._itemsPerPage = value[Math.round(value.length / 2)].label;
|
|
520
|
-
this._match();
|
|
521
|
-
}
|
|
522
|
-
get itemsPerPage() {
|
|
523
|
-
return this._itemsPerPage;
|
|
524
|
-
}
|
|
525
|
-
/** List of items */
|
|
526
|
-
set dataSource(value) {
|
|
527
|
-
if (value) {
|
|
528
|
-
this._initializeDS(value);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
get dataSource() {
|
|
532
|
-
return this._dataSource;
|
|
533
|
-
}
|
|
534
|
-
/** @hidden */
|
|
535
|
-
constructor(_dialogService, _filesValidatorService, _cdr, _injector) {
|
|
536
|
-
this._dialogService = _dialogService;
|
|
537
|
-
this._filesValidatorService = _filesValidatorService;
|
|
538
|
-
this._cdr = _cdr;
|
|
539
|
-
this._injector = _injector;
|
|
540
|
-
/** ID of the upload collection element. If none is provided, one will be generated. */
|
|
541
|
-
this.id = `fdp-upload-collection-id-${randomId++}`;
|
|
542
|
-
/**
|
|
543
|
-
* Defines the allowed file types for the upload.
|
|
544
|
-
* The chosen files will be checked against an array of file types.
|
|
545
|
-
* If at least one file does not fit the file type requirements,
|
|
546
|
-
* the upload is prevented. Example: ["jpg", "png", "bmp"].
|
|
547
|
-
*/
|
|
548
|
-
this.fileTypes = [];
|
|
549
|
-
/**
|
|
550
|
-
* Defines the allowed MIME types of files to be uploaded.
|
|
551
|
-
* The chosen files will be checked against an array of MIME types.
|
|
552
|
-
* If at least one file does not fit the MIME type requirements, the upload is prevented.
|
|
553
|
-
* Example: mimeTypes ["image/png", "image/jpeg"].
|
|
554
|
-
*/
|
|
555
|
-
this.mimeTypes = [];
|
|
556
|
-
/** All action buttons will be disabled */
|
|
557
|
-
this.disabled = false;
|
|
558
|
-
/** All action buttons will be invisible */
|
|
559
|
-
this.readonly = false;
|
|
560
|
-
/** Allows to support hierarchy */
|
|
561
|
-
this.hierarchy = true;
|
|
562
|
-
/** Allows to show/hide pagination */
|
|
563
|
-
this.enablePagination = true;
|
|
564
|
-
/**
|
|
565
|
-
* If true, the button that is used to terminate the instant file upload gets visible.
|
|
566
|
-
* The button normally appears when a file is being uploaded.
|
|
567
|
-
*/
|
|
568
|
-
this.terminationEnabled = true;
|
|
569
|
-
/** Gives to select multiple files from the same folder and then upload them. */
|
|
570
|
-
this.multiple = true;
|
|
571
|
-
/** Allows to show/hide search */
|
|
572
|
-
this.showSearch = true;
|
|
573
|
-
/**
|
|
574
|
-
* Allows to use the same name for a file when editing the file name.
|
|
575
|
-
* 'Same name' refers to an already existing file name in the list.
|
|
576
|
-
* */
|
|
577
|
-
this.sameFileNameAllowed = false;
|
|
578
|
-
/**
|
|
579
|
-
* The event is triggered when the file type or the MIME type don't match the permitted types
|
|
580
|
-
* (only if the fileTypes property or the mimeTypes property are provided by the application).
|
|
581
|
-
*/
|
|
582
|
-
this.typeMismatch = new EventEmitter();
|
|
583
|
-
/**
|
|
584
|
-
* The event is triggered when the name of a chosen file is longer than the value specified
|
|
585
|
-
* with the maxFilenameLength property (only if provided by the application).
|
|
586
|
-
*/
|
|
587
|
-
this.filenameLengthExceed = new EventEmitter();
|
|
588
|
-
/**
|
|
589
|
-
* The event is triggered when the file size of an uploaded file is exceeded
|
|
590
|
-
* (only if the maxFileSize property was provided by the application).
|
|
591
|
-
*/
|
|
592
|
-
this.fileSizeExceed = new EventEmitter();
|
|
593
|
-
/** @hidden */
|
|
594
|
-
this._uploadCollectionItemStatus = UploadCollectionItemStatus;
|
|
595
|
-
/** @hidden */
|
|
596
|
-
this._breadcrumbList = [];
|
|
597
|
-
/** @hidden */
|
|
598
|
-
this._currentPage = 1;
|
|
599
|
-
/** @hidden */
|
|
600
|
-
this._itemsPerPage = 10;
|
|
601
|
-
/** @hidden */
|
|
602
|
-
this._itemsPerPageOptions = [];
|
|
603
|
-
/** @hidden */
|
|
604
|
-
this._totalItems = 0;
|
|
605
|
-
/** @hidden */
|
|
606
|
-
this._countShowedItems = 0;
|
|
607
|
-
/** @hidden */
|
|
608
|
-
this._countNotShowedItems = 0;
|
|
609
|
-
/** @hidden
|
|
610
|
-
* List of currently displayed items
|
|
611
|
-
*/
|
|
612
|
-
this._visibleList$ = new BehaviorSubject([]);
|
|
613
|
-
/** @hidden */
|
|
614
|
-
this.selectedItems = [];
|
|
615
|
-
/** @hidden */
|
|
616
|
-
this._searchText = '';
|
|
617
|
-
/** @hidden */
|
|
618
|
-
this._showDragDropArea = false;
|
|
619
|
-
/** @hidden */
|
|
620
|
-
this._onDragDropArea = false;
|
|
621
|
-
/** @hidden */
|
|
622
|
-
this._messageType = MessageType;
|
|
623
|
-
/** @hidden */
|
|
624
|
-
this._messageStripType = MessageStripType;
|
|
625
|
-
/** @hidden */
|
|
626
|
-
this._columnAlign = ColumnAlign;
|
|
627
|
-
/** @hidden */
|
|
628
|
-
this._selectionMode = SelectionMode;
|
|
629
|
-
/** @hidden */
|
|
630
|
-
/** @hidden */
|
|
631
|
-
this._contentDensityManuallySet = false;
|
|
632
|
-
/** @hidden */
|
|
633
|
-
this._imageExtensions = [
|
|
634
|
-
'.apng',
|
|
635
|
-
'.bmp',
|
|
636
|
-
'.gif',
|
|
637
|
-
'.ico',
|
|
638
|
-
'.cur',
|
|
639
|
-
'.jpg',
|
|
640
|
-
'.jpeg',
|
|
641
|
-
'.jfif',
|
|
642
|
-
'.pjpeg',
|
|
643
|
-
'.pjp',
|
|
644
|
-
'.png',
|
|
645
|
-
'.svg',
|
|
646
|
-
'.tif',
|
|
647
|
-
'.tiff',
|
|
648
|
-
'.webp',
|
|
649
|
-
'.flif',
|
|
650
|
-
'.cr2',
|
|
651
|
-
'.jxr',
|
|
652
|
-
'.psd',
|
|
653
|
-
'.bpg',
|
|
654
|
-
'.jp2',
|
|
655
|
-
'.jpm',
|
|
656
|
-
'.jpx',
|
|
657
|
-
'.heic',
|
|
658
|
-
'.dcm'
|
|
659
|
-
];
|
|
660
|
-
/** @hidden */
|
|
661
|
-
this._onDestroy$ = new Subject();
|
|
662
|
-
warnOnce('The Upload Collection component is deprecated and will be removed in next release.');
|
|
663
|
-
}
|
|
664
|
-
/** @hidden */
|
|
665
|
-
ngOnChanges(changes) {
|
|
666
|
-
if (changes.contentDensity) {
|
|
667
|
-
this._contentDensityManuallySet = true;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
/** @hidden */
|
|
671
|
-
ngOnDestroy() {
|
|
672
|
-
this._onDestroy$.next();
|
|
673
|
-
this._onDestroy$.complete();
|
|
674
|
-
this._dsSubscription?.unsubscribe();
|
|
675
|
-
this.dataSource.close();
|
|
676
|
-
}
|
|
677
|
-
/** Show meessage for types NEW FOLDER CREATE, REMOVE, MOVE TO, UPDATE_VERSION, FILE_RENAMED */
|
|
678
|
-
showMessage(type, options) {
|
|
679
|
-
this._message = generateMessageStripeData(type, options);
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* @hidden
|
|
683
|
-
* Opens the file selector.
|
|
684
|
-
*/
|
|
685
|
-
_fileNameChange(e, currentItem) {
|
|
686
|
-
const input = e.target;
|
|
687
|
-
const itemName = input.value.trim();
|
|
688
|
-
const newName = currentItem.type === 'file' ? `${itemName}.${currentItem.name.split('.').pop()}` : itemName;
|
|
689
|
-
if (currentItem.name === newName) {
|
|
690
|
-
return;
|
|
691
|
-
}
|
|
692
|
-
if (this.maxFilenameLength && itemName.length > this.maxFilenameLength) {
|
|
693
|
-
const renamedItem = {
|
|
694
|
-
...currentItem,
|
|
695
|
-
name: newName
|
|
696
|
-
};
|
|
697
|
-
const payload = {
|
|
698
|
-
items: [renamedItem]
|
|
699
|
-
};
|
|
700
|
-
const filenameLengthEvent = new FilenameLengthExceedEvent(this, payload);
|
|
701
|
-
this.showMessage(MessageType.FILE_NAME_LENGTH, { payload, type: MessageStripType.ERROR });
|
|
702
|
-
this.filenameLengthExceed.emit(filenameLengthEvent);
|
|
703
|
-
return;
|
|
704
|
-
}
|
|
705
|
-
if (currentItem.sameFilenameState) {
|
|
706
|
-
return;
|
|
707
|
-
}
|
|
708
|
-
const data = {
|
|
709
|
-
parentFolderId: this._getCurrentFolderId(),
|
|
710
|
-
fileName: newName,
|
|
711
|
-
item: { ...currentItem }
|
|
712
|
-
};
|
|
713
|
-
this.dataSource
|
|
714
|
-
.fileRenamed(data)
|
|
715
|
-
.pipe(tap(() => {
|
|
716
|
-
this.selectedItems = [];
|
|
717
|
-
this._match();
|
|
718
|
-
}))
|
|
719
|
-
.subscribe({
|
|
720
|
-
next: () => {
|
|
721
|
-
this.showMessage(MessageType.FILE_RENAME, {
|
|
722
|
-
payload: data,
|
|
723
|
-
type: MessageStripType.SUCCESS
|
|
724
|
-
});
|
|
725
|
-
},
|
|
726
|
-
error: () => {
|
|
727
|
-
this.showMessage(MessageType.FILE_RENAME, {
|
|
728
|
-
payload: data,
|
|
729
|
-
type: MessageStripType.ERROR
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
/** @hidden */
|
|
735
|
-
_checkName(e, currentItem) {
|
|
736
|
-
const input = e.target;
|
|
737
|
-
const itemName = input.value.trim();
|
|
738
|
-
const newName = currentItem.type === 'file' ? `${itemName}.${currentItem.name.split('.').pop()}` : itemName;
|
|
739
|
-
const nameAlreadyExists = this._getList().some((item) => currentItem.documentId !== item.documentId && item.name === newName);
|
|
740
|
-
if (!this.sameFileNameAllowed && nameAlreadyExists) {
|
|
741
|
-
currentItem.sameFilenameState = 'error';
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
delete currentItem.sameFilenameState;
|
|
745
|
-
}
|
|
746
|
-
/** @hidden
|
|
747
|
-
* Opens the file selector.
|
|
748
|
-
*/
|
|
749
|
-
_openUploadFiles() {
|
|
750
|
-
const input = this._uploadFilesRef.nativeElement;
|
|
751
|
-
if (input) {
|
|
752
|
-
input.click();
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
/** @hidden
|
|
756
|
-
* Opens the update file version selector.
|
|
757
|
-
*/
|
|
758
|
-
_openUpdateFileVersion() {
|
|
759
|
-
if (this.disabled) {
|
|
760
|
-
return;
|
|
761
|
-
}
|
|
762
|
-
const input = this._updateVersionRef.nativeElement;
|
|
763
|
-
if (input) {
|
|
764
|
-
this._currentUpdateFileVersion = this._activeItem;
|
|
765
|
-
input.click();
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
/** @hidden */
|
|
769
|
-
_selectHandler(files) {
|
|
770
|
-
this._validateFiles(files);
|
|
771
|
-
this._propagateFiles();
|
|
772
|
-
}
|
|
773
|
-
/** @hidden */
|
|
774
|
-
_handleDrop(output) {
|
|
775
|
-
this._validatedFiles = output;
|
|
776
|
-
this._propagateFiles();
|
|
777
|
-
}
|
|
778
|
-
/** @hidden */
|
|
779
|
-
_openNewFolderDialog() {
|
|
780
|
-
const dialogRef = this._dialogService.open(NewFolderComponent, {
|
|
781
|
-
responsivePadding: true,
|
|
782
|
-
backdropClickCloseable: false,
|
|
783
|
-
height: '320px',
|
|
784
|
-
data: {
|
|
785
|
-
currentFolder: this._getCurrentFolder(),
|
|
786
|
-
maxFilenameLength: this.maxFilenameLength
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
dialogRef.afterClosed.pipe(take(1)).subscribe((folderName) => {
|
|
790
|
-
const folder = this._generateTemporaryNewFolder(folderName);
|
|
791
|
-
const parentFolderId = this._getCurrentFolderId();
|
|
792
|
-
const data = {
|
|
793
|
-
parentFolderId,
|
|
794
|
-
folder: { ...folder }
|
|
795
|
-
};
|
|
796
|
-
this._findParentFolderAndAddTemporaryFiles(parentFolderId, [folder]);
|
|
797
|
-
this.dataSource
|
|
798
|
-
.newFolder(data)
|
|
799
|
-
.pipe(tap(() => this._match()))
|
|
800
|
-
.subscribe({
|
|
801
|
-
next: () => {
|
|
802
|
-
this.showMessage(MessageType.CREATE, {
|
|
803
|
-
payload: data,
|
|
804
|
-
type: MessageStripType.SUCCESS
|
|
805
|
-
});
|
|
806
|
-
},
|
|
807
|
-
error: () => {
|
|
808
|
-
this.showMessage(MessageType.CREATE, {
|
|
809
|
-
payload: data,
|
|
810
|
-
type: MessageStripType.ERROR
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
});
|
|
815
|
-
}
|
|
816
|
-
/** @hidden */
|
|
817
|
-
_moveToClicked(multiple) {
|
|
818
|
-
if (this.disabled) {
|
|
819
|
-
return;
|
|
820
|
-
}
|
|
821
|
-
const _activeItem = this._activeItem;
|
|
822
|
-
const currentFolder = this._getCurrentFolder();
|
|
823
|
-
const movableItems = multiple ? this.selectedItems : _activeItem ? [_activeItem] : [];
|
|
824
|
-
const dialogRef = this._dialogService.open(MoveToComponent, {
|
|
825
|
-
responsivePadding: true,
|
|
826
|
-
verticalPadding: false,
|
|
827
|
-
backdropClickCloseable: false,
|
|
828
|
-
height: '350px',
|
|
829
|
-
data: {
|
|
830
|
-
items: this.dataSource.dataProvider.items,
|
|
831
|
-
currentFolder,
|
|
832
|
-
movableFolders: movableItems.filter((item) => item?.type === 'folder'),
|
|
833
|
-
maxFilenameLength: this.maxFilenameLength
|
|
834
|
-
}
|
|
835
|
-
}, this._injector);
|
|
836
|
-
dialogRef.afterClosed.pipe(take(1)).subscribe(({ selectedFolder, parentFolderId, folderName }) => {
|
|
837
|
-
const payload = {
|
|
838
|
-
from: currentFolder,
|
|
839
|
-
to: selectedFolder,
|
|
840
|
-
items: movableItems
|
|
841
|
-
};
|
|
842
|
-
if (folderName) {
|
|
843
|
-
payload.newFolder = {
|
|
844
|
-
parentFolderId,
|
|
845
|
-
folderName
|
|
846
|
-
};
|
|
847
|
-
}
|
|
848
|
-
this.dataSource
|
|
849
|
-
.moveTo(payload)
|
|
850
|
-
.pipe(tap(() => {
|
|
851
|
-
this.selectedItems = [];
|
|
852
|
-
this._match();
|
|
853
|
-
}))
|
|
854
|
-
.subscribe({
|
|
855
|
-
next: () => {
|
|
856
|
-
this.showMessage(MessageType.MOVE, {
|
|
857
|
-
payload,
|
|
858
|
-
type: MessageStripType.SUCCESS
|
|
859
|
-
});
|
|
860
|
-
},
|
|
861
|
-
error: () => {
|
|
862
|
-
this.showMessage(MessageType.MOVE, {
|
|
863
|
-
payload,
|
|
864
|
-
type: MessageStripType.ERROR
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
}, (error) => {
|
|
869
|
-
console.error(error);
|
|
870
|
-
});
|
|
871
|
-
}
|
|
872
|
-
/** @hidden */
|
|
873
|
-
_downloadClicked(multiple) {
|
|
874
|
-
if (this.disabled) {
|
|
875
|
-
return;
|
|
876
|
-
}
|
|
877
|
-
const _activeItem = { ...this._activeItem };
|
|
878
|
-
const items = (multiple ? this.selectedItems : [_activeItem]);
|
|
879
|
-
this.dataSource.download({ items }).subscribe();
|
|
880
|
-
}
|
|
881
|
-
/** @hidden */
|
|
882
|
-
_remove(multiple) {
|
|
883
|
-
if (this.disabled) {
|
|
884
|
-
return;
|
|
885
|
-
}
|
|
886
|
-
const _activeItem = { ...this._activeItem };
|
|
887
|
-
const items = multiple ? this.selectedItems : [_activeItem];
|
|
888
|
-
const data = { parentFolderId: this._getCurrentFolderId(), items };
|
|
889
|
-
this.dataSource
|
|
890
|
-
.delete(data)
|
|
891
|
-
.pipe(tap(() => {
|
|
892
|
-
this.selectedItems = [];
|
|
893
|
-
this._match();
|
|
894
|
-
}))
|
|
895
|
-
.subscribe({
|
|
896
|
-
next: () => {
|
|
897
|
-
this.showMessage(MessageType.REMOVE, {
|
|
898
|
-
payload: data,
|
|
899
|
-
type: MessageStripType.SUCCESS
|
|
900
|
-
});
|
|
901
|
-
},
|
|
902
|
-
error: () => {
|
|
903
|
-
this.showMessage(MessageType.REMOVE, {
|
|
904
|
-
payload: data,
|
|
905
|
-
type: MessageStripType.ERROR
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
});
|
|
909
|
-
}
|
|
910
|
-
/** @hidden */
|
|
911
|
-
_runUploadNewFileAfterFail(item) {
|
|
912
|
-
this.dataSource
|
|
913
|
-
.runAfterFail({ parentFolderId: this._getCurrentFolderId(), items: [item] })
|
|
914
|
-
.pipe(tap(() => this._match()))
|
|
915
|
-
.subscribe();
|
|
916
|
-
}
|
|
917
|
-
/** @hidden */
|
|
918
|
-
_cancelUploadNewFile(file) {
|
|
919
|
-
this.dataSource
|
|
920
|
-
.cancelUploadNewFile({ parentFolderId: this._getCurrentFolderId(), item: file })
|
|
921
|
-
.pipe(tap(() => this._match()))
|
|
922
|
-
.subscribe();
|
|
923
|
-
}
|
|
924
|
-
/** @hidden */
|
|
925
|
-
_messageStripDismiss() {
|
|
926
|
-
this._message = undefined;
|
|
927
|
-
}
|
|
928
|
-
/** @hidden */
|
|
929
|
-
_openFolder(item) {
|
|
930
|
-
if (item.type === 'file' || !item.documentId) {
|
|
931
|
-
return;
|
|
932
|
-
}
|
|
933
|
-
if (this._breadcrumbList.length > 0) {
|
|
934
|
-
this._breadcrumbList[this._breadcrumbList.length - 1].clikable = true;
|
|
935
|
-
}
|
|
936
|
-
this._breadcrumbList.push({
|
|
937
|
-
clikable: false,
|
|
938
|
-
folderId: item.documentId,
|
|
939
|
-
folderName: item.name
|
|
940
|
-
});
|
|
941
|
-
this._match();
|
|
942
|
-
}
|
|
943
|
-
/** @hidden */
|
|
944
|
-
_actionButton(item) {
|
|
945
|
-
this._activeItem = item;
|
|
946
|
-
}
|
|
947
|
-
/** @hidden */
|
|
948
|
-
_onDropzone(event) {
|
|
949
|
-
this._showDragDropArea = true;
|
|
950
|
-
this._onDragDropArea = event;
|
|
951
|
-
}
|
|
952
|
-
/** @hidden */
|
|
953
|
-
_dragDropCancel() {
|
|
954
|
-
this._showDragDropArea = false;
|
|
955
|
-
}
|
|
956
|
-
/** @hidden */
|
|
957
|
-
_breadcrumbGoTo(event, index) {
|
|
958
|
-
event.preventDefault();
|
|
959
|
-
event.stopPropagation();
|
|
960
|
-
if (!Number.isInteger(index)) {
|
|
961
|
-
this._breadcrumbList = [];
|
|
962
|
-
this._match();
|
|
963
|
-
return;
|
|
964
|
-
}
|
|
965
|
-
this._breadcrumbList = this._breadcrumbList.slice(0, index + 1);
|
|
966
|
-
this._breadcrumbList[this._breadcrumbList.length - 1].clikable = false;
|
|
967
|
-
this._match();
|
|
968
|
-
}
|
|
969
|
-
/** @hidden */
|
|
970
|
-
_pageChanged(pageNumber) {
|
|
971
|
-
if (!this.enablePagination || this._currentPage === pageNumber) {
|
|
972
|
-
return;
|
|
973
|
-
}
|
|
974
|
-
this.selectedItems = [];
|
|
975
|
-
this._currentPage = pageNumber;
|
|
976
|
-
this._match();
|
|
977
|
-
}
|
|
978
|
-
/** @hidden */
|
|
979
|
-
_itemsPerPageChange(value) {
|
|
980
|
-
if (value === this._itemsPerPage) {
|
|
981
|
-
return;
|
|
982
|
-
}
|
|
983
|
-
this._itemsPerPage = value;
|
|
984
|
-
if (this._currentPage * this._itemsPerPage > this._totalItems) {
|
|
985
|
-
this._currentPage = Math.ceil(this._totalItems / this._itemsPerPage);
|
|
986
|
-
}
|
|
987
|
-
this._match();
|
|
988
|
-
}
|
|
989
|
-
/** @hidden */
|
|
990
|
-
_searchInputChanged() {
|
|
991
|
-
this._match();
|
|
992
|
-
}
|
|
993
|
-
/** @hidden */
|
|
994
|
-
_onRowSelectionChange(data) {
|
|
995
|
-
if (!this.sameFileNameAllowed) {
|
|
996
|
-
const removedItem = data.removed[0];
|
|
997
|
-
this._clearItemSameFilenameState(removedItem);
|
|
998
|
-
}
|
|
999
|
-
this.selectedItems = data.selection;
|
|
1000
|
-
}
|
|
1001
|
-
/** @hidden */
|
|
1002
|
-
_getItemName(item) {
|
|
1003
|
-
if (item.type === 'folder') {
|
|
1004
|
-
return item.name;
|
|
1005
|
-
}
|
|
1006
|
-
return item.name.split('.').slice(0, -1).join('.');
|
|
1007
|
-
}
|
|
1008
|
-
/** @hidden */
|
|
1009
|
-
_getItemExtension(item) {
|
|
1010
|
-
if (item.type === 'folder') {
|
|
1011
|
-
return '';
|
|
1012
|
-
}
|
|
1013
|
-
return `.${item.name.split('.').pop()}`;
|
|
1014
|
-
}
|
|
1015
|
-
/** @hidden */
|
|
1016
|
-
_getIconByType(file) {
|
|
1017
|
-
const type = `.${file.name.split('.').pop()}`;
|
|
1018
|
-
return this._imageExtensions.includes(type) ? 'background' : 'document';
|
|
1019
|
-
}
|
|
1020
|
-
/** @hidden */
|
|
1021
|
-
_showIfSelectedOnlyFiles() {
|
|
1022
|
-
return !this.selectedItems.some((item) => item.type === 'folder');
|
|
1023
|
-
}
|
|
1024
|
-
/** @hidden */
|
|
1025
|
-
_isSelectedItem(item) {
|
|
1026
|
-
return this.selectedItems.some((selectedItem) => selectedItem.documentId === item.documentId);
|
|
1027
|
-
}
|
|
1028
|
-
/** @hidden */
|
|
1029
|
-
_getList() {
|
|
1030
|
-
return this.dataSource.dataProvider.list;
|
|
1031
|
-
}
|
|
1032
|
-
/** @hidden */
|
|
1033
|
-
_trackByDocumentId(index, item) {
|
|
1034
|
-
return item.documentId;
|
|
1035
|
-
}
|
|
1036
|
-
/** @hidden */
|
|
1037
|
-
_getAllowedTypes() {
|
|
1038
|
-
return `${this.fileTypes?.join(', ')}${this.fileTypes?.length && this.mimeTypes?.length ? ', ' : ''}${this.mimeTypes?.join(', ')}`;
|
|
1039
|
-
}
|
|
1040
|
-
/** @hidden */
|
|
1041
|
-
_validateFiles(files) {
|
|
1042
|
-
this._validatedFiles = this._filesValidatorService.validation(files, {
|
|
1043
|
-
maxFileSize: this.maxFileSize,
|
|
1044
|
-
maxFileNameLength: this.maxFilenameLength,
|
|
1045
|
-
fileTypes: this.fileTypes,
|
|
1046
|
-
mimeTypes: this.mimeTypes
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
/** @hidden */
|
|
1050
|
-
_propagateFiles() {
|
|
1051
|
-
const { validFiles, typeMismatch, filenameLengthExceed, fileSizeExceed } = this._validatedFiles;
|
|
1052
|
-
if (validFiles) {
|
|
1053
|
-
if (this._currentUpdateFileVersion) {
|
|
1054
|
-
this._updateFileVersion(validFiles[0]);
|
|
1055
|
-
}
|
|
1056
|
-
else {
|
|
1057
|
-
this._uploadNewFiles(validFiles);
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
if (typeMismatch) {
|
|
1061
|
-
const payload = { items: typeMismatch };
|
|
1062
|
-
const event = new TypeMismatchEvent(this, payload);
|
|
1063
|
-
this.showMessage(MessageType.TYPE_MISMATCH, { payload, type: MessageStripType.ERROR });
|
|
1064
|
-
this.typeMismatch.emit(event);
|
|
1065
|
-
}
|
|
1066
|
-
if (filenameLengthExceed) {
|
|
1067
|
-
const payload = { items: filenameLengthExceed };
|
|
1068
|
-
const event = new FilenameLengthExceedEvent(this, payload);
|
|
1069
|
-
this.showMessage(MessageType.FILE_NAME_LENGTH, { payload, type: MessageStripType.ERROR });
|
|
1070
|
-
this.filenameLengthExceed.emit(event);
|
|
1071
|
-
}
|
|
1072
|
-
if (fileSizeExceed) {
|
|
1073
|
-
const payload = { items: fileSizeExceed };
|
|
1074
|
-
const event = new FileSizeExceedEvent(this, payload);
|
|
1075
|
-
this.showMessage(MessageType.FILE_SIZE, { payload, type: MessageStripType.ERROR });
|
|
1076
|
-
this.fileSizeExceed.emit(event);
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
/** @hidden */
|
|
1080
|
-
_updateFileVersion(newItem) {
|
|
1081
|
-
const currentFolderId = this._getCurrentFolderId();
|
|
1082
|
-
const currentItem = {
|
|
1083
|
-
...this._currentUpdateFileVersion,
|
|
1084
|
-
status: UploadCollectionItemStatus.LOADING
|
|
1085
|
-
};
|
|
1086
|
-
const data = {
|
|
1087
|
-
parentFolderId: this._getCurrentFolderId(),
|
|
1088
|
-
item: this._currentUpdateFileVersion,
|
|
1089
|
-
newItem
|
|
1090
|
-
};
|
|
1091
|
-
this._findParentFolderAndUpdateItem(currentFolderId, currentItem);
|
|
1092
|
-
this.dataSource
|
|
1093
|
-
.updateVersion(data)
|
|
1094
|
-
.pipe(tap(() => this._match()))
|
|
1095
|
-
.subscribe({
|
|
1096
|
-
next: () => {
|
|
1097
|
-
this.showMessage(MessageType.UPDATE_VERSION, {
|
|
1098
|
-
payload: data,
|
|
1099
|
-
type: MessageStripType.SUCCESS
|
|
1100
|
-
});
|
|
1101
|
-
this._currentUpdateFileVersion = undefined;
|
|
1102
|
-
},
|
|
1103
|
-
error: () => {
|
|
1104
|
-
this.showMessage(MessageType.UPDATE_VERSION, {
|
|
1105
|
-
payload: data,
|
|
1106
|
-
type: MessageStripType.ERROR
|
|
1107
|
-
});
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
/** @hidden */
|
|
1112
|
-
_uploadNewFiles(files) {
|
|
1113
|
-
const currentFolderId = this._getCurrentFolderId();
|
|
1114
|
-
const newItems = this._generateTemporaryNewFiles(files);
|
|
1115
|
-
this._findParentFolderAndAddTemporaryFiles(currentFolderId, newItems);
|
|
1116
|
-
this.dataSource
|
|
1117
|
-
.upload({
|
|
1118
|
-
parentFolderId: currentFolderId,
|
|
1119
|
-
items: newItems.map((item) => ({ ...item }))
|
|
1120
|
-
})
|
|
1121
|
-
.pipe(tap(() => this._match()))
|
|
1122
|
-
.subscribe();
|
|
1123
|
-
}
|
|
1124
|
-
/** @hidden */
|
|
1125
|
-
_getCurrentFolder() {
|
|
1126
|
-
const currentFolderId = this._getCurrentFolderId();
|
|
1127
|
-
return !currentFolderId ? undefined : this._findFolderById(currentFolderId);
|
|
1128
|
-
}
|
|
1129
|
-
/** @hidden */
|
|
1130
|
-
_getCurrentFolderId() {
|
|
1131
|
-
return this._breadcrumbList.length === 0
|
|
1132
|
-
? undefined
|
|
1133
|
-
: this._breadcrumbList[this._breadcrumbList.length - 1].folderId;
|
|
1134
|
-
}
|
|
1135
|
-
/** @hidden */
|
|
1136
|
-
_findFolderById(folderId, items = this.dataSource.dataProvider.items) {
|
|
1137
|
-
let foundObj;
|
|
1138
|
-
JSON.stringify(items, (_, nestedValue) => {
|
|
1139
|
-
if (nestedValue && nestedValue.documentId === folderId) {
|
|
1140
|
-
foundObj = nestedValue;
|
|
1141
|
-
}
|
|
1142
|
-
return nestedValue;
|
|
1143
|
-
});
|
|
1144
|
-
return foundObj;
|
|
1145
|
-
}
|
|
1146
|
-
/** @hidden */
|
|
1147
|
-
_findParentFolderAndUpdateItem(parentFolderId, updatedItem, items = this.dataSource.dataProvider.items) {
|
|
1148
|
-
if (!parentFolderId) {
|
|
1149
|
-
const index = items.findIndex((item) => item.documentId === updatedItem.documentId);
|
|
1150
|
-
if (index !== -1) {
|
|
1151
|
-
items[index] = updatedItem;
|
|
1152
|
-
}
|
|
1153
|
-
this._match();
|
|
1154
|
-
return;
|
|
1155
|
-
}
|
|
1156
|
-
for (let i = 0; i < items.length; i++) {
|
|
1157
|
-
const currentItem = items[i];
|
|
1158
|
-
if (currentItem.type !== 'folder') {
|
|
1159
|
-
continue;
|
|
1160
|
-
}
|
|
1161
|
-
if (currentItem.documentId === parentFolderId) {
|
|
1162
|
-
const index = currentItem.files.findIndex((item) => item.documentId === updatedItem.documentId);
|
|
1163
|
-
if (index !== -1) {
|
|
1164
|
-
currentItem.files[i] = updatedItem;
|
|
1165
|
-
this._match();
|
|
1166
|
-
break;
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
else {
|
|
1170
|
-
this._findParentFolderAndUpdateItem(parentFolderId, updatedItem, currentItem.files);
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
/** @hidden */
|
|
1175
|
-
_findParentFolderAndAddTemporaryFiles(parentFolderId, newItems, items = this.dataSource.dataProvider.items) {
|
|
1176
|
-
if (!parentFolderId) {
|
|
1177
|
-
items.push(...newItems);
|
|
1178
|
-
this._match();
|
|
1179
|
-
return;
|
|
1180
|
-
}
|
|
1181
|
-
for (let i = 0; i < items.length; i++) {
|
|
1182
|
-
const currentItem = items[i];
|
|
1183
|
-
if (currentItem.type !== 'folder') {
|
|
1184
|
-
continue;
|
|
1185
|
-
}
|
|
1186
|
-
if (currentItem.documentId === parentFolderId) {
|
|
1187
|
-
currentItem.files.push(...newItems);
|
|
1188
|
-
this._match();
|
|
1189
|
-
break;
|
|
1190
|
-
}
|
|
1191
|
-
else {
|
|
1192
|
-
this._findParentFolderAndAddTemporaryFiles(parentFolderId, newItems, currentItem.files);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
/** @hidden */
|
|
1197
|
-
_generateTemporaryNewFiles(files) {
|
|
1198
|
-
return files.map((file) => ({
|
|
1199
|
-
documentId: uuidv4(),
|
|
1200
|
-
type: 'file',
|
|
1201
|
-
name: file.name,
|
|
1202
|
-
uploadedBy: {
|
|
1203
|
-
id: uuidv4(),
|
|
1204
|
-
name: `You`
|
|
1205
|
-
},
|
|
1206
|
-
uploadedOn: new Date(),
|
|
1207
|
-
fileSize: file.size,
|
|
1208
|
-
version: 1,
|
|
1209
|
-
url: '',
|
|
1210
|
-
status: UploadCollectionItemStatus.LOADING,
|
|
1211
|
-
file
|
|
1212
|
-
}));
|
|
1213
|
-
}
|
|
1214
|
-
/** @hidden */
|
|
1215
|
-
_generateTemporaryNewFolder(folderName) {
|
|
1216
|
-
return {
|
|
1217
|
-
documentId: uuidv4(),
|
|
1218
|
-
type: 'folder',
|
|
1219
|
-
name: folderName,
|
|
1220
|
-
uploadedBy: {
|
|
1221
|
-
id: Date.now(),
|
|
1222
|
-
name: 'You'
|
|
1223
|
-
},
|
|
1224
|
-
uploadedOn: new Date(),
|
|
1225
|
-
files: [],
|
|
1226
|
-
status: UploadCollectionItemStatus.LOADING
|
|
1227
|
-
};
|
|
1228
|
-
}
|
|
1229
|
-
/** @hidden */
|
|
1230
|
-
_initializeDS(ds) {
|
|
1231
|
-
this._visibleList$.next([]);
|
|
1232
|
-
if (isDataSource(this.dataSource)) {
|
|
1233
|
-
this.dataSource.close();
|
|
1234
|
-
if (this._dsSubscription) {
|
|
1235
|
-
this._dsSubscription.unsubscribe();
|
|
1236
|
-
this._dsSubscription = undefined;
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
this._dataSource = this._openDataStream(ds);
|
|
1240
|
-
// initial data fetch
|
|
1241
|
-
this._match();
|
|
1242
|
-
}
|
|
1243
|
-
/** @hidden */
|
|
1244
|
-
_openDataStream(ds) {
|
|
1245
|
-
const initDataSource = this._toDataStream(ds);
|
|
1246
|
-
if (initDataSource === undefined) {
|
|
1247
|
-
throw new Error(`[dataSource] source did not match an array, Observable, or DataSource`);
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* This is single point of data entry to the component. We dont want to set data on different
|
|
1251
|
-
* places. If any new data comes in either you do a search and you want to pass initial data
|
|
1252
|
-
* its here.
|
|
1253
|
-
*/
|
|
1254
|
-
this._dsSubscription = initDataSource.open().subscribe((data) => {
|
|
1255
|
-
this._visibleList$.next(data);
|
|
1256
|
-
this._totalItems = initDataSource.dataProvider.totalItems;
|
|
1257
|
-
this._countUnvisibleItems();
|
|
1258
|
-
this._cdr.detectChanges();
|
|
1259
|
-
});
|
|
1260
|
-
return initDataSource;
|
|
1261
|
-
}
|
|
1262
|
-
/** @hidden */
|
|
1263
|
-
_toDataStream(ds) {
|
|
1264
|
-
if (isDataSource(ds)) {
|
|
1265
|
-
return ds;
|
|
1266
|
-
}
|
|
1267
|
-
return undefined;
|
|
1268
|
-
}
|
|
1269
|
-
/** @hidden */
|
|
1270
|
-
_match() {
|
|
1271
|
-
const query = new Map();
|
|
1272
|
-
query.set('folderId', this._getCurrentFolderId());
|
|
1273
|
-
query.set('page', this._currentPage);
|
|
1274
|
-
query.set('searchText', this._searchText || '*');
|
|
1275
|
-
if (this.enablePagination) {
|
|
1276
|
-
query.set('limit', this._itemsPerPage);
|
|
1277
|
-
}
|
|
1278
|
-
this.dataSource.match(query);
|
|
1279
|
-
}
|
|
1280
|
-
/** @hidden */
|
|
1281
|
-
_countUnvisibleItems() {
|
|
1282
|
-
const itemsPerPage = this._itemsPerPage;
|
|
1283
|
-
this._countShowedItems = this._currentPage * itemsPerPage - itemsPerPage + 1;
|
|
1284
|
-
this._countNotShowedItems = this._countShowedItems + this._visibleList$.value.length - 1;
|
|
1285
|
-
}
|
|
1286
|
-
/** @hidden */
|
|
1287
|
-
_clearItemSameFilenameState(currentItem) {
|
|
1288
|
-
if (!currentItem) {
|
|
1289
|
-
return;
|
|
1290
|
-
}
|
|
1291
|
-
for (const item of this._getList()) {
|
|
1292
|
-
if (item.documentId === currentItem.documentId) {
|
|
1293
|
-
delete item.sameFilenameState;
|
|
1294
|
-
break;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: UploadCollectionComponent, deps: [{ token: i1.DialogService }, { token: FilesValidatorService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1299
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: UploadCollectionComponent, isStandalone: true, selector: "fdp-upload-collection", inputs: { id: "id", itemsPerPage: "itemsPerPage", dataSource: "dataSource", fileTypes: "fileTypes", maxFileSize: "maxFileSize", maxFilenameLength: "maxFilenameLength", mimeTypes: "mimeTypes", disabled: "disabled", readonly: "readonly", hierarchy: "hierarchy", enablePagination: "enablePagination", terminationEnabled: "terminationEnabled", multiple: "multiple", showSearch: "showSearch", sameFileNameAllowed: "sameFileNameAllowed" }, outputs: { typeMismatch: "typeMismatch", filenameLengthExceed: "filenameLengthExceed", fileSizeExceed: "fileSizeExceed" }, viewQueries: [{ propertyName: "_uploadFilesRef", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "_updateVersionRef", first: true, predicate: ["updateVersionInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [id]=\"id\" class=\"fdp-upload-collection\">\n <!-- Message strip -->\n <fd-message-strip *ngIf=\"_message\" [type]=\"_message.messageStripType\" (onDismiss)=\"_messageStripDismiss()\">\n <ng-container\n [ngTemplateOutlet]=\"message\"\n [ngTemplateOutletContext]=\"{\n messageType: _message.messageType,\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n </fd-message-strip>\n\n <!-- Toolbar -->\n <fd-toolbar class=\"fdp-upload-collection__toolbar\">\n <div [style.flex]=\"'1 auto'\">\n <fd-breadcrumb [id]=\"id + '-breadcrumb'\">\n <fd-breadcrumb-item>\n <ng-template #multipleBreadcrumbs>\n <a href=\"#\" fd-link (click)=\"_breadcrumbGoTo($event)\">\n {{ 'platformUploadCollection.breadcrumbLabelAllFiles' | fdTranslate }}\n </a>\n </ng-template>\n <ng-template #singleBreadcrumb>\n <span>\n {{\n 'platformUploadCollection.breadcrumbLabelAllFilesWithTotal'\n | fdTranslate : { total: _totalItems }\n }}\n </span>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"_breadcrumbList.length > 0 ? multipleBreadcrumbs : singleBreadcrumb\"\n ></ng-container>\n </fd-breadcrumb-item>\n <fd-breadcrumb-item *ngFor=\"let item of _breadcrumbList; let i = index\">\n <ng-template #clickableBreadcrumb>\n <a href=\"#\" fd-link (click)=\"_breadcrumbGoTo($event, i)\">{{ item.folderName }}</a>\n </ng-template>\n <ng-template #textBreadcrumb>\n <span>{{ item.folderName }} ({{ _totalItems }})</span>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"item.clikable ? clickableBreadcrumb : textBreadcrumb\"\n ></ng-container>\n </fd-breadcrumb-item>\n </fd-breadcrumb>\n </div>\n\n <fd-toolbar-spacer [style.max-width.rem]=\"3\"></fd-toolbar-spacer>\n <ng-container *ngIf=\"readonly || selectedItems.length === 0\">\n <fd-input-group\n *ngIf=\"showSearch\"\n [(ngModel)]=\"_searchText\"\n (ngModelChange)=\"_searchInputChanged()\"\n glyph=\"search\"\n [ariaLabelledBy]=\"id + '-breadcrumb'\"\n [placeholder]=\"'platformUploadCollection.searchPlaceholder' | fdTranslate\"\n ></fd-input-group>\n\n <ng-container *ngIf=\"!readonly\">\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_openUploadFiles()\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n [label]=\"'platformUploadCollection.addBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.addBtnLabel' | fdTranslate\"\n ></button>\n\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_openNewFolderDialog()\"\n *ngIf=\"hierarchy\"\n [disabled]=\"disabled\"\n fdType=\"transparent\"\n [label]=\"'platformUploadCollection.newFolderBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.newFolderBtnLabel' | fdTranslate\"\n ></button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!readonly && selectedItems.length > 0\">\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_moveToClicked(true)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n [label]=\"'platformUploadCollection.moveToBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.moveToBtnLabel' | fdTranslate\"\n ></button>\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_downloadClicked(true)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n *ngIf=\"_showIfSelectedOnlyFiles()\"\n [label]=\"'platformUploadCollection.downloadBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.downloadBtnLabel' | fdTranslate\"\n ></button>\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_remove(true)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n [label]=\"'platformUploadCollection.removeBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.removeBtnLabel' | fdTranslate\"\n ></button>\n </ng-container>\n </fd-toolbar>\n\n <div class=\"fdp-upload-collection__table--wrapper\">\n <div\n class=\"fdp-upload-collection__table\"\n fdpUploadCollectionDragnDrop\n [fileTypes]=\"fileTypes\"\n [maxFilenameLength]=\"maxFilenameLength\"\n [maxFileSize]=\"maxFileSize\"\n [mimeTypes]=\"mimeTypes\"\n [dragndrop]=\"!readonly\"\n [disabled]=\"disabled\"\n [multiple]=\"multiple\"\n (fileChanged)=\"_handleDrop($event)\"\n (cancel)=\"_dragDropCancel()\"\n (onDropzone)=\"_onDropzone($event)\"\n >\n <!-- Table -->\n <fdp-table\n *ngIf=\"_visibleList$.value.length > 0\"\n [dataSource]=\"_visibleList$\"\n [loading]=\"dataSource.isDataLoading\"\n selectionMode=\"multiple\"\n emptyTableMessage=\"\"\n [noHorizontalBorders]=\"true\"\n [trackBy]=\"_trackByDocumentId\"\n (rowSelectionChange)=\"_onRowSelectionChange($event)\"\n >\n <fdp-column name=\"name\" label=\"Name\" width=\"8rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">\n <div class=\"fdp-upload-collection__vertical-align-center\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n *ngIf=\"item.type === 'folder'\"\n glyph=\"folder-blank\"\n [title]=\"'platformUploadCollection.folderIconTitle' | fdTranslate\"\n ></fd-icon>\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n *ngIf=\"item.type === 'file'\"\n [glyph]=\"_getIconByType(item)\"\n [title]=\"'platformUploadCollection.fileIconTitle' | fdTranslate\"\n ></fd-icon>\n\n <ng-container *ngIf=\"disabled || readonly || !_isSelectedItem(item); else editMode\">\n <span\n [class.fdp-upload-collection__cursor]=\"item.type === 'folder'\"\n (click)=\"_openFolder(item)\"\n >{{ item.name }}</span\n >\n </ng-container>\n </div>\n\n <ng-template #editMode>\n <div fd-form-item>\n <fd-form-input-message-group [triggers]=\"[]\" [isOpen]=\"!!item.sameFilenameState\">\n <div class=\"fdp-upload-collection__vertical-align-center\">\n <input\n fd-form-control\n [value]=\"_getItemName(item)\"\n (blur)=\"_fileNameChange($event, item)\"\n (input)=\"_checkName($event, item)\"\n type=\"text\"\n [placeholder]=\"\n 'platformUploadCollection.editFileNameInputPlaceholder' | fdTranslate\n \"\n [state]=\"item.sameFilenameState\"\n />\n <span class=\"fdp-upload-collection__item_extension\">{{\n _getItemExtension(item)\n }}</span>\n </div>\n\n <fd-form-message [type]=\"item.sameFilenameState\">\n {{\n (item.type === 'file'\n ? 'platformUploadCollection.editFileNameFileAlreadyExistsError'\n : 'platformUploadCollection.editFileNameFolderAlreadyExistsError'\n ) | fdTranslate\n }}\n </fd-form-message>\n </fd-form-input-message-group>\n </div>\n </ng-template>\n </fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"uploadedBy\" label=\"Uploaded by\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.uploadedBy.name }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"uploadedOn\" label=\"Uploaded on\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.uploadedOn | date : 'shortDate' }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"size\" label=\"File size\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.fileSize | convertBytes }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"version\" label=\"Version\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.version || '' }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"status\" label=\"Status\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">\n <fd-busy-indicator\n *ngIf=\"item.status === _uploadCollectionItemStatus.LOADING\"\n [loading]=\"true\"\n ariaLabel=\"Status: Loading\"\n ariaLive=\"polite\"\n size=\"s\"\n ></fd-busy-indicator>\n <span\n *ngIf=\"item.status === _uploadCollectionItemStatus.SUCCESSFUL\"\n fd-object-status\n status=\"positive\"\n >\n {{ 'platformUploadCollection.itemStatusSuccessful' | fdTranslate }}\n </span>\n <span\n *ngIf=\"item.status === _uploadCollectionItemStatus.UNSUCCESSFUL\"\n fd-object-status\n status=\"negative\"\n >\n {{ 'platformUploadCollection.itemStatusUnsuccessful' | fdTranslate }}\n </span>\n </fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"action\" *ngIf=\"!readonly\" width=\"5rem\" align=\"end\">\n <fdp-table-header *fdpHeaderCellDef>Action</fdp-table-header>\n <fdp-table-cell *fdpCellDef=\"let item\">\n <div class=\"fdp-upload-collection__actions\">\n <div class=\"fdp-upload-collection__actions--status\">\n <button\n fd-button\n [label]=\"'platformUploadCollection.uploadNewFileAfterFailAction' | fdTranslate\"\n [title]=\"'platformUploadCollection.uploadNewFileAfterFailAction' | fdTranslate\"\n (click)=\"_runUploadNewFileAfterFail(item)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n *ngIf=\"item.status === _uploadCollectionItemStatus.UNSUCCESSFUL\"\n ></button>\n\n <button\n fd-button\n [label]=\"'platformUploadCollection.cancelUploadNewFileAction' | fdTranslate\"\n [title]=\"'platformUploadCollection.cancelUploadNewFileAction' | fdTranslate\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n (click)=\"_cancelUploadNewFile(item)\"\n *ngIf=\"terminationEnabled && item.status === _uploadCollectionItemStatus.LOADING\"\n ></button>\n </div>\n\n <fdp-menu-button\n icon=\"overflow\"\n [disabled]=\"disabled\"\n type=\"transparent\"\n [title]=\"'platformUploadCollection.itemMenuBtnTitle' | fdTranslate\"\n [fdpMenuTriggerFor]=\"menuActions\"\n (buttonClicked)=\"_actionButton(item)\"\n >\n </fdp-menu-button>\n </div>\n </fdp-table-cell>\n </fdp-column>\n </fdp-table>\n\n <!-- Dragdrop area -->\n <div\n class=\"fdp-upload-collection__dragdrop-area\"\n *ngIf=\"_showDragDropArea\"\n [class.active]=\"_onDragDropArea\"\n >\n <fd-icon class=\"fdp-upload-collection__dragdrop-area--icon\" glyph=\"upload-to-cloud\"></fd-icon>\n <p class=\"fdp-upload-collection__dragdrop-area--text\">\n {{ 'platformUploadCollection.dragDropAreaText' | fdTranslate }}\n </p>\n </div>\n\n <!-- No data -->\n <div\n class=\"fdp-upload-collection__no-data\"\n *ngIf=\"_visibleList$.value.length === 0\"\n [class.invisible]=\"_showDragDropArea\"\n >\n <fd-icon glyph=\"document\"></fd-icon>\n <h3>{{ 'platformUploadCollection.noDataText' | fdTranslate }}</h3>\n <p>{{ 'platformUploadCollection.noDataDescription' | fdTranslate }}</p>\n </div>\n </div>\n\n <!-- Table footer -->\n <div class=\"fdp-upload-collection__table-footer\" *ngIf=\"enablePagination && _totalItems\">\n <!-- Pagination -->\n <div class=\"fdp-upload-collection__pagination\">\n <span [id]=\"id + '-pagination'\" class=\"fdp-upload-collection__pagination--total\">\n {{\n 'platformUploadCollection.paginationTotal'\n | fdTranslate : { from: _countShowedItems, to: _countNotShowedItems, total: _totalItems }\n }}\n </span>\n <fd-pagination\n [totalItems]=\"_totalItems\"\n [displayTotalItems]=\"false\"\n (pageChangeStart)=\"_pageChanged($event)\"\n [itemsPerPage]=\"_itemsPerPage\"\n [currentPage]=\"_currentPage\"\n [attr.aria-labelledby]=\"id + '-pagination'\"\n ></fd-pagination>\n </div>\n\n <!-- Results per page -->\n <div class=\"fdp-upload-collection__results\">\n <span class=\"fdp-upload-collection__results--title\">\n <span [id]=\"id + '-results'\">\n {{ 'platformUploadCollection.resultsPerPage' | fdTranslate }}\n </span>\n <span *ngIf=\"_itemsPerPageOptions.length === 0\">{{ _itemsPerPage }}</span>\n </span>\n <fdp-menu-button\n *ngIf=\"_itemsPerPageOptions.length > 0\"\n type=\"ghost\"\n [ariaLabelledBy]=\"id + '-results'\"\n [fdpMenuTriggerFor]=\"itemsPerPageMenu\"\n [label]=\"_itemsPerPage + ''\"\n >\n </fdp-menu-button>\n </div>\n </div>\n </div>\n</div>\n\n<fdp-menu #itemsPerPageMenu xPosition=\"before\">\n <fdp-menu-item\n *ngFor=\"let value of _itemsPerPageOptions\"\n (itemSelect)=\"_itemsPerPageChange(value.label)\"\n [attr.title]=\"'Results per page: ' + value.label\"\n >\n <span>{{ value.label }}</span>\n </fdp-menu-item>\n</fdp-menu>\n\n<fdp-menu #menuActions xPosition=\"before\">\n <fdp-menu-item (itemSelect)=\"_moveToClicked()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"folder-blank\"\n [title]=\"'platformUploadCollection.moveToBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.moveToBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n <ng-container *ngIf=\"_activeItem?.type === 'file'\">\n <fdp-menu-item (itemSelect)=\"_downloadClicked()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"download\"\n [title]=\"'platformUploadCollection.downloadBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.downloadBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n <fdp-menu-item (itemSelect)=\"_openUpdateFileVersion()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"drill-up\"\n [title]=\"'platformUploadCollection.updateVersionBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.updateVersionBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n </ng-container>\n <fdp-menu-item (itemSelect)=\"_remove()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"delete\"\n [title]=\"'platformUploadCollection.removeBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.removeBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n</fdp-menu>\n\n<input\n #fileInput\n class=\"fdp-upload-collection__hidden\"\n type=\"file\"\n (fileSelected)=\"_selectHandler($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n fdFileSelect\n/>\n\n<input\n #updateVersionInput\n class=\"fdp-upload-collection__hidden\"\n type=\"file\"\n (fileSelected)=\"_selectHandler($event)\"\n [disabled]=\"disabled\"\n [multiple]=\"false\"\n fdFileSelect\n/>\n\n<ng-template\n let-messageType=\"messageType\"\n let-payload=\"payload\"\n let-messageStripType=\"messageStripType\"\n let-count=\"count\"\n #message\n>\n <ng-container *ngIf=\"_message\" [ngSwitch]=\"messageType\">\n <ng-container\n *ngSwitchCase=\"_messageType.CREATE\"\n [ngTemplateOutlet]=\"messageNewFolder\"\n [ngTemplateOutletContext]=\"{\n messageStripType: _message.messageStripType,\n payload: _message.payload\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.UPDATE_VERSION\"\n [ngTemplateOutlet]=\"messageUpdateVersion\"\n [ngTemplateOutletContext]=\"{\n messageStripType: _message.messageStripType,\n payload: _message.payload\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.FILE_RENAME\"\n [ngTemplateOutlet]=\"messageFileRename\"\n [ngTemplateOutletContext]=\"{\n messageStripType: _message.messageStripType,\n payload: _message.payload\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.REMOVE\"\n [ngTemplateOutlet]=\"messageRemove\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.MOVE\"\n [ngTemplateOutlet]=\"messageMove\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.TYPE_MISMATCH\"\n [ngTemplateOutlet]=\"messageTypeMismatch\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.FILE_SIZE\"\n [ngTemplateOutlet]=\"messageFileSize\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.FILE_NAME_LENGTH\"\n [ngTemplateOutlet]=\"messageFilenameLength\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #messageNewFolder let-payload=\"payload\" let-messageStripType=\"messageStripType\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersCreated\">\n {{ 'platformUploadCollection.messageCreateFailed' | fdTranslate : { folderName: payload.folder.name } }}\n </ng-container>\n <ng-template #foldersCreated>\n {{ 'platformUploadCollection.messageCreateSuccess' | fdTranslate : { folderName: payload.folder.name } }}\n </ng-template>\n</ng-template>\n\n<ng-template #messageUpdateVersion let-payload=\"payload\" let-messageStripType=\"messageStripType\">\n <ng-container *ngIf=\"messageStripType === 'error'; else versionUpdated\">\n {{ 'platformUploadCollection.messageUpdateVersionFailed' | fdTranslate : { folderName: payload.item.name } }}\n </ng-container>\n <ng-template #versionUpdated>\n {{ 'platformUploadCollection.messageUpdateVersionSuccess' | fdTranslate : { folderName: payload.item.name } }}\n </ng-template>\n</ng-template>\n\n<ng-template #messageFileRename let-payload=\"payload\" let-messageStripType=\"messageStripType\">\n <ng-container *ngIf=\"messageStripType === 'error'; else fileRenamed\">\n {{\n 'platformUploadCollection.messageFileRenameFailed'\n | fdTranslate : { from: payload.item.name, to: payload.fileName }\n }}\n </ng-container>\n <ng-template #fileRenamed>\n {{\n 'platformUploadCollection.messageFileRenameSuccess'\n | fdTranslate : { from: payload.item.name, to: payload.fileName }\n }}\n </ng-template>\n</ng-template>\n\n<ng-template #messageRemove let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersAndFilesRemoved\">\n {{\n 'platformUploadCollection.messageRemoveFoldersAndFilesFailed'\n | fdTranslate : { foldersCount: count.folder, filesCount: count.file }\n }}\n </ng-container>\n <ng-template #foldersAndFilesRemoved>\n {{\n 'platformUploadCollection.messageRemoveFoldersAndFilesSuccess'\n | fdTranslate : { foldersCount: count.folder, filesCount: count.file }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && !count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersRemoved\">\n {{ 'platformUploadCollection.messageRemoveFoldersFailed' | fdTranslate : { foldersCount: count.folder } }}\n </ng-container>\n <ng-template #foldersRemoved>\n {{ 'platformUploadCollection.messageRemoveFoldersSuccess' | fdTranslate : { foldersCount: count.folder } }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.file && !count.folder\">\n <ng-container *ngIf=\"messageStripType === 'error'; else filesRemoved\">\n {{ 'platformUploadCollection.messageRemoveFilesFailed' | fdTranslate : { filesCount: count.file } }}\n </ng-container>\n <ng-template #filesRemoved>\n {{ 'platformUploadCollection.messageRemoveFilesSuccess' | fdTranslate : { filesCount: count.file } }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n <ng-container *ngIf=\"messageStripType === 'error'; else oneItemRemoved\">\n {{\n 'platformUploadCollection.messageRemoveFileOrFolderFailed'\n | fdTranslate : { name: payload.items[0].name }\n }}\n </ng-container>\n <ng-template #oneItemRemoved>\n {{\n 'platformUploadCollection.messageRemoveFileOrFolderSuccess'\n | fdTranslate : { name: payload.items[0].name }\n }}\n </ng-template>\n </ng-container>\n</ng-template>\n\n<ng-template #messageMove let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else filesAndFoldersMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersAndFilesFailed'\n : 'platformUploadCollection.messageMoveRootFoldersAndFilesFailed'\n ) | fdTranslate : { foldersCount: count.folder, filesCount: count.file, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #filesAndFoldersMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersAndFilesSuccess'\n : 'platformUploadCollection.messageMoveRootFoldersAndFilesSuccess'\n ) | fdTranslate : { foldersCount: count.folder, filesCount: count.file, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && !count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersFailed'\n : 'platformUploadCollection.messageMoveRootFoldersFailed'\n ) | fdTranslate : { foldersCount: count.folder, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #foldersMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersSuccess'\n : 'platformUploadCollection.messageMoveRootFoldersSuccess'\n ) | fdTranslate : { foldersCount: count.folder, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.file && !count.folder\">\n <ng-container *ngIf=\"messageStripType === 'error'; else filesMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFilesFailed'\n : 'platformUploadCollection.messageMoveRootFilesFailed'\n ) | fdTranslate : { filesCount: count.file, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #filesMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFilesSuccess'\n : 'platformUploadCollection.messageMoveRootFilesSuccess'\n ) | fdTranslate : { filesCount: count.file, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n <ng-container *ngIf=\"messageStripType === 'error'; else oneItemMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFileOrFolderFailed'\n : 'platformUploadCollection.messageMoveRootFileOrFolderFailed'\n ) | fdTranslate : { name: payload.items[0].name, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #oneItemMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFileOrFolderSuccess'\n : 'platformUploadCollection.messageMoveRootFileOrFolderSuccess'\n ) | fdTranslate : { name: payload.items[0].name, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n</ng-template>\n\n<ng-template #messageTypeMismatch let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1\">\n {{\n 'platformUploadCollection.messageFileTypeMismatchPlural'\n | fdTranslate : { filesCount: payload.items.length, allowedTypes: _getAllowedTypes() }\n }}\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n {{\n 'platformUploadCollection.messageFileTypeMismatchSingular'\n | fdTranslate : { fileName: payload.items[0].name, allowedTypes: _getAllowedTypes() }\n }}\n </ng-container>\n</ng-template>\n\n<ng-template #messageFileSize let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1\">\n {{\n 'platformUploadCollection.messageFileSizeExceededPlural'\n | fdTranslate : { filesCount: payload.items.length, maxFileSize: maxFileSize || 0 }\n }}\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n {{\n 'platformUploadCollection.messageFileSizeExceededSingular'\n | fdTranslate : { fileName: payload.items[0].name, maxFileSize: maxFileSize || 0 }\n }}\n </ng-container>\n</ng-template>\n\n<ng-template #messageFilenameLength let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1\">\n {{\n 'platformUploadCollection.messageFileNameLengthExceededPlural'\n | fdTranslate : { filesCount: payload.items.length, maxFilenameLength: maxFilenameLength || 0 }\n }}\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n {{\n 'platformUploadCollection.messageFileNameLengthExceededSingular'\n | fdTranslate : { fileName: payload.items[0].name, maxFilenameLength: maxFilenameLength || 0 }\n }}\n </ng-container>\n</ng-template>\n", styles: [".fdp-upload-collection__fd-icon{color:#0854a0!important;color:var(--sapHighlightColor)!important;margin-right:.625rem!important;font-size:1rem!important}.fdp-upload-collection fd-message-strip{margin-bottom:.625rem}.fdp-upload-collection__toolbar .fd-toolbar{margin-bottom:.625rem;border:0}.fdp-upload-collection__toolbar .fd-toolbar fd-input-group .sap-icon--search{color:#0854a0;color:var(--sapHighlightColor)}.fdp-upload-collection__no-data{text-align:center;min-height:230px;display:flex;align-items:center;flex-direction:column;justify-content:center}.fdp-upload-collection__no-data fd-icon{font-size:3rem;line-height:3rem;margin:0;color:#6a6d70;color:var(--sapContent_LabelColor)}.fdp-upload-collection__no-data h3{font-size:1.125rem;font-size:var(--sapFontHeader4Size);line-height:1rem;margin:8px 0}.fdp-upload-collection__no-data p{font-size:.875rem;font-size:var(--sapFontSize);line-height:1rem;color:#6a6d70;color:var(--sapContent_LabelColor);margin:0}.fdp-upload-collection__no-data.invisible{opacity:0}.fdp-upload-collection__table{position:relative}.fdp-upload-collection__table-footer{display:flex;justify-content:space-between;align-items:center;margin-top:.625rem}.fdp-upload-collection__table-footer .fdp-upload-collection__results--title,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total{line-height:1.4;line-height:var(--sapContent_LineHeight);color:#32363a;color:var(--sapTextColor);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily);font-weight:400;-webkit-font-smoothing:antialiased;box-sizing:border-box;padding:0;margin:0;border:0;font-size:.875rem;font-size:var(--sapFontSize);color:#6a6d70;color:var(--sapContent_LabelColor);margin-right:.5rem}.fdp-upload-collection__table-footer .fdp-upload-collection__results--title:before,.fdp-upload-collection__table-footer .fdp-upload-collection__results--title:after,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total:before,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total:after{box-sizing:inherit;font-size:inherit}[dir=rtl] .fdp-upload-collection__table-footer .fdp-upload-collection__results--title,.fdp-upload-collection__table-footer .fdp-upload-collection__results--title[dir=rtl],[dir=rtl] .fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total[dir=rtl]{margin-right:0;margin-left:.5rem}.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total{width:100%;align-self:center}.fdp-upload-collection__table-footer .fdp-upload-collection__pagination{font-size:.875rem;font-size:var(--sapFontSize);line-height:1.4;line-height:var(--sapContent_LineHeight);color:#32363a;color:var(--sapTextColor);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily);font-weight:400;-webkit-font-smoothing:antialiased;box-sizing:border-box;padding:0;margin:0;border:0;display:flex}.fdp-upload-collection__table-footer .fdp-upload-collection__pagination:before,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination:after{box-sizing:inherit;font-size:inherit}.fdp-upload-collection__hidden{display:none}.fdp-upload-collection__vertical-align-center{display:flex;align-items:center}.fdp-upload-collection__cursor{cursor:pointer}.fdp-upload-collection__item_extension{white-space:nowrap}.fdp-upload-collection__actions{display:flex;justify-content:space-between;align-items:center}.fdp-upload-collection__actions .sap-icon--slim-arrow-down{display:none}.fdp-upload-collection__dragdrop-area{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;background:rgba(255,255,255,.5);outline:2px dashed transparent;outline-color:#89919a;outline-color:var(--sapField_BorderColor);outline-offset:-4px;box-sizing:border-box}.fdp-upload-collection__dragdrop-area fd-icon{font-size:3rem;line-height:3rem;margin-bottom:1rem;color:#6a6d70;color:var(--sapContent_LabelColor)}.fdp-upload-collection__dragdrop-area p{font-size:1rem;line-height:1.125rem;color:#6a6d70;color:var(--sapContent_LabelColor)}.fdp-upload-collection__dragdrop-area.active{outline-color:#0854a0;outline-color:var(--sapContent_DragAndDropActiveColor);background:rgba(8,84,160,.08)}.fdp-upload-collection__dragdrop-area.active fd-icon,.fdp-upload-collection__dragdrop-area.active p{color:#0854a0;color:var(--sapContent_DragAndDropActiveColor)}.fdp-upload-collection .fd-form-item{align-items:center;flex-direction:row}.fdp-upload-collection-dialig-no-bg{background-color:transparent!important}[dir=rtl] .fdp-upload-collection fd-icon{margin-right:0;margin-left:.625rem}.fd-menu__list .disabled{background-color:#fff!important;background-color:var(--sapList_Background)!important;cursor:not-allowed}.fd-menu__list .disabled .fd-menu__title{color:#32363a!important;color:var(--sapList_TextColor)!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MessageStripComponent, selector: "fd-message-strip", inputs: ["class", "dismissible", "noIcon", "type", "id", "ariaLabelledBy", "ariaLabel", "width", "minWidth", "marginBottom", "indicationColor"], outputs: ["onDismiss"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ToolbarComponent, selector: "fd-toolbar", inputs: ["titleId", "class", "shouldOverflow", "fdType", "title", "active", "clearBorder", "forceOverflow", "tabindex", "ariaLabel", "ariaLabelledBy"] }, { kind: "component", type: BreadcrumbComponent, selector: "fd-breadcrumb", inputs: ["reverse", "tabIndex"], outputs: ["visibleItemsCount", "hiddenItemsCount"] }, { kind: "component", type: BreadcrumbItemComponent, selector: "fd-breadcrumb-item" }, { kind: "component", type: LinkComponent, selector: "[fdLink], [fd-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ToolbarSpacerDirective, selector: "fd-toolbar-spacer", inputs: ["width", "class", "fixed"] }, { kind: "component", type: InputGroupComponent, selector: "fd-input-group", inputs: ["placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "addonButtonAriaHidden", "iconTitle", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: ToolbarItemDirective, selector: "[fd-toolbar-item], [fdOverflowGroup], [fdOverflowPriority]", inputs: ["fdOverflowPriority", "fdOverflowGroup"] }, { kind: "directive", type: UploadCollectionDragnDropDirective, selector: "[fdpUploadCollectionDragnDrop]", inputs: ["multiple", "fileTypes", "maxFileSize", "maxFilenameLength", "mimeTypes", "disabled", "dragndrop"], outputs: ["fileChanged", "cancel", "onDropzone"] }, { kind: "component", type: TableComponent, selector: "fdp-table", inputs: ["name", "id", "enableDragResize", "fixed", "freezeColumnsTo", "freezeEndColumnsTo", "pageScrolling", "pageSize", "pageScrollingThreshold", "bodyHeight", "emptyTableMessage", "noVisibleColumnsMessage", "noHorizontalBorders", "noVerticalBorders", "noBorders", "noBodyBorders", "noOuterBorders", "noBorderX", "noBorderY", "relationKey", "expandedStateKey", "hasChildrenKey", "rowNavigatable", "highlightNavigatedRow", "rowsActivable", "selectedKey", "selectableKey", "trackBy", "rowComparator", "rowsClass", "editableRowSkeleton", "expandOnInit", "rowHeight", "loadPagesBefore", "selectionMode", "enableTristateMode", "semanticHighlighting", "forceCheckedAllState", "ariaLabelledBy", "loading"], outputs: ["presetChanged", "rowSelectionChange", "sortChange", "filterChange", "groupChange", "columnsChange", "pageChange", "columnFreeze", "rowToggleOpenState", "rowActivate", "rowNavigate", "emptyRowAdded", "save", "cancel", "tableScrolled", "tableRowsSet", "allRowsExpanded", "allRowsCollapsed", "cellFocused"] }, { kind: "directive", type: TableInitialStateDirective, selector: "[fdpTableInitialState], fdp-table", inputs: ["initialVisibleColumns", "initialSortBy", "initialFilterBy", "initialGroupBy", "initialPage", "state"] }, { kind: "component", type: TableColumnComponent, selector: "fdp-column", inputs: ["name", "key", "label", "align", "sortable", "filterable", "visible", "dataType", "groupable", "freezable", "endFreezable", "width", "noWrap", "applyText", "role"] }, { kind: "directive", type: FdpCellDef, selector: "[fdpCellDef]", inputs: ["fdpCellDefAs"] }, { kind: "directive", type: FdpTableCell, selector: "fdp-table-cell" }, { kind: "component", type: IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "class", "ariaLabel", "ariaHidden"] }, { kind: "component", type: FormItemComponent, selector: "[fd-form-item]", inputs: ["isInline", "horizontal"] }, { kind: "component", type: FormInputMessageGroupComponent, selector: "fd-form-input-message-group", inputs: ["triggers", "closeOnOutsideClick", "fillControlMode", "noArrow", "closeOnEscapeKey", "placement", "placementContainer", "isOpen"], outputs: ["isOpenChange"] }, { kind: "component", type: FormControlComponent, selector: "input[fd-form-control], textarea[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "component", type: FormMessageComponent, selector: "fd-form-message", inputs: ["type", "static", "embedded", "class"] }, { kind: "component", type: BusyIndicatorComponent, selector: "fd-busy-indicator", inputs: ["loading", "size", "block", "ariaLabel", "title", "label", "ariaLive"] }, { kind: "component", type: ObjectStatusComponent, selector: "[fd-object-status]", inputs: ["class", "status", "glyph", "label", "glyphAriaLabel", "indicationColor", "clickable", "inverted", "large", "secondaryIndication", "textTemplate"] }, { kind: "directive", type: FdpHeaderCellDef, selector: "[fdpHeaderCellDef]" }, { kind: "directive", type: FdpTableHeader, selector: "fdp-table-header" }, { kind: "component", type: MenuButtonComponent, selector: "fdp-menu-button", inputs: ["label", "title", "icon", "type"], outputs: ["buttonClicked"] }, { kind: "directive", type: MenuTriggerDirective, selector: "[fdpMenuTriggerFor]", inputs: ["fdpMenuTriggerFor"] }, { kind: "component", type: PaginationComponent, selector: "fd-pagination", inputs: ["id", "mobile", "totalItems", "currentPage", "itemsPerPage", "itemsPerPageTemplate", "itemsPerPageOptions", "displayTotalItems", "displayTextTemplate"], outputs: ["pageChangeStart", "itemsPerPageChange"] }, { kind: "component", type: MenuComponent, selector: "fdp-menu", inputs: ["id", "openByArrowKeys", "xPosition"], outputs: ["close"] }, { kind: "component", type: MenuItemComponent, selector: "fdp-menu-item", inputs: ["disabled", "cascadeDirection"], outputs: ["itemSelect"] }, { kind: "directive", type: FileUploaderSelectDirective, selector: "[fdFileSelect]", inputs: ["multiple"], outputs: ["fileSelected"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }, { kind: "pipe", type: ConvertBytesPipe, name: "convertBytes" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1300
|
-
}
|
|
1301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: UploadCollectionComponent, decorators: [{
|
|
1302
|
-
type: Component,
|
|
1303
|
-
args: [{ selector: 'fdp-upload-collection', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
|
|
1304
|
-
NgIf,
|
|
1305
|
-
MessageStripComponent,
|
|
1306
|
-
NgTemplateOutlet,
|
|
1307
|
-
ToolbarComponent,
|
|
1308
|
-
BreadcrumbComponent,
|
|
1309
|
-
BreadcrumbItemComponent,
|
|
1310
|
-
LinkComponent,
|
|
1311
|
-
NgFor,
|
|
1312
|
-
ToolbarSpacerDirective,
|
|
1313
|
-
InputGroupComponent,
|
|
1314
|
-
FormsModule,
|
|
1315
|
-
ButtonComponent,
|
|
1316
|
-
ToolbarItemDirective,
|
|
1317
|
-
UploadCollectionDragnDropDirective,
|
|
1318
|
-
TableDataSourceDirective,
|
|
1319
|
-
TableHeaderResizerDirective,
|
|
1320
|
-
TableComponent,
|
|
1321
|
-
TableInitialStateDirective,
|
|
1322
|
-
TableColumnComponent,
|
|
1323
|
-
FdpCellDef,
|
|
1324
|
-
FdpTableCell,
|
|
1325
|
-
IconComponent,
|
|
1326
|
-
FormItemComponent,
|
|
1327
|
-
FormInputMessageGroupComponent,
|
|
1328
|
-
FormControlComponent,
|
|
1329
|
-
FormMessageComponent,
|
|
1330
|
-
BusyIndicatorComponent,
|
|
1331
|
-
ObjectStatusComponent,
|
|
1332
|
-
FdpHeaderCellDef,
|
|
1333
|
-
FdpTableHeader,
|
|
1334
|
-
MenuButtonComponent,
|
|
1335
|
-
MenuTriggerDirective,
|
|
1336
|
-
PaginationComponent,
|
|
1337
|
-
MenuComponent,
|
|
1338
|
-
MenuItemComponent,
|
|
1339
|
-
FileUploaderSelectDirective,
|
|
1340
|
-
NgSwitch,
|
|
1341
|
-
NgSwitchCase,
|
|
1342
|
-
DatePipe,
|
|
1343
|
-
FdTranslatePipe,
|
|
1344
|
-
ConvertBytesPipe
|
|
1345
|
-
], template: "<div [id]=\"id\" class=\"fdp-upload-collection\">\n <!-- Message strip -->\n <fd-message-strip *ngIf=\"_message\" [type]=\"_message.messageStripType\" (onDismiss)=\"_messageStripDismiss()\">\n <ng-container\n [ngTemplateOutlet]=\"message\"\n [ngTemplateOutletContext]=\"{\n messageType: _message.messageType,\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n </fd-message-strip>\n\n <!-- Toolbar -->\n <fd-toolbar class=\"fdp-upload-collection__toolbar\">\n <div [style.flex]=\"'1 auto'\">\n <fd-breadcrumb [id]=\"id + '-breadcrumb'\">\n <fd-breadcrumb-item>\n <ng-template #multipleBreadcrumbs>\n <a href=\"#\" fd-link (click)=\"_breadcrumbGoTo($event)\">\n {{ 'platformUploadCollection.breadcrumbLabelAllFiles' | fdTranslate }}\n </a>\n </ng-template>\n <ng-template #singleBreadcrumb>\n <span>\n {{\n 'platformUploadCollection.breadcrumbLabelAllFilesWithTotal'\n | fdTranslate : { total: _totalItems }\n }}\n </span>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"_breadcrumbList.length > 0 ? multipleBreadcrumbs : singleBreadcrumb\"\n ></ng-container>\n </fd-breadcrumb-item>\n <fd-breadcrumb-item *ngFor=\"let item of _breadcrumbList; let i = index\">\n <ng-template #clickableBreadcrumb>\n <a href=\"#\" fd-link (click)=\"_breadcrumbGoTo($event, i)\">{{ item.folderName }}</a>\n </ng-template>\n <ng-template #textBreadcrumb>\n <span>{{ item.folderName }} ({{ _totalItems }})</span>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"item.clikable ? clickableBreadcrumb : textBreadcrumb\"\n ></ng-container>\n </fd-breadcrumb-item>\n </fd-breadcrumb>\n </div>\n\n <fd-toolbar-spacer [style.max-width.rem]=\"3\"></fd-toolbar-spacer>\n <ng-container *ngIf=\"readonly || selectedItems.length === 0\">\n <fd-input-group\n *ngIf=\"showSearch\"\n [(ngModel)]=\"_searchText\"\n (ngModelChange)=\"_searchInputChanged()\"\n glyph=\"search\"\n [ariaLabelledBy]=\"id + '-breadcrumb'\"\n [placeholder]=\"'platformUploadCollection.searchPlaceholder' | fdTranslate\"\n ></fd-input-group>\n\n <ng-container *ngIf=\"!readonly\">\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_openUploadFiles()\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n [label]=\"'platformUploadCollection.addBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.addBtnLabel' | fdTranslate\"\n ></button>\n\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_openNewFolderDialog()\"\n *ngIf=\"hierarchy\"\n [disabled]=\"disabled\"\n fdType=\"transparent\"\n [label]=\"'platformUploadCollection.newFolderBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.newFolderBtnLabel' | fdTranslate\"\n ></button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!readonly && selectedItems.length > 0\">\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_moveToClicked(true)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n [label]=\"'platformUploadCollection.moveToBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.moveToBtnLabel' | fdTranslate\"\n ></button>\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_downloadClicked(true)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n *ngIf=\"_showIfSelectedOnlyFiles()\"\n [label]=\"'platformUploadCollection.downloadBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.downloadBtnLabel' | fdTranslate\"\n ></button>\n <button\n fd-toolbar-item\n fd-button\n (click)=\"_remove(true)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n [label]=\"'platformUploadCollection.removeBtnLabel' | fdTranslate\"\n [title]=\"'platformUploadCollection.removeBtnLabel' | fdTranslate\"\n ></button>\n </ng-container>\n </fd-toolbar>\n\n <div class=\"fdp-upload-collection__table--wrapper\">\n <div\n class=\"fdp-upload-collection__table\"\n fdpUploadCollectionDragnDrop\n [fileTypes]=\"fileTypes\"\n [maxFilenameLength]=\"maxFilenameLength\"\n [maxFileSize]=\"maxFileSize\"\n [mimeTypes]=\"mimeTypes\"\n [dragndrop]=\"!readonly\"\n [disabled]=\"disabled\"\n [multiple]=\"multiple\"\n (fileChanged)=\"_handleDrop($event)\"\n (cancel)=\"_dragDropCancel()\"\n (onDropzone)=\"_onDropzone($event)\"\n >\n <!-- Table -->\n <fdp-table\n *ngIf=\"_visibleList$.value.length > 0\"\n [dataSource]=\"_visibleList$\"\n [loading]=\"dataSource.isDataLoading\"\n selectionMode=\"multiple\"\n emptyTableMessage=\"\"\n [noHorizontalBorders]=\"true\"\n [trackBy]=\"_trackByDocumentId\"\n (rowSelectionChange)=\"_onRowSelectionChange($event)\"\n >\n <fdp-column name=\"name\" label=\"Name\" width=\"8rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">\n <div class=\"fdp-upload-collection__vertical-align-center\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n *ngIf=\"item.type === 'folder'\"\n glyph=\"folder-blank\"\n [title]=\"'platformUploadCollection.folderIconTitle' | fdTranslate\"\n ></fd-icon>\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n *ngIf=\"item.type === 'file'\"\n [glyph]=\"_getIconByType(item)\"\n [title]=\"'platformUploadCollection.fileIconTitle' | fdTranslate\"\n ></fd-icon>\n\n <ng-container *ngIf=\"disabled || readonly || !_isSelectedItem(item); else editMode\">\n <span\n [class.fdp-upload-collection__cursor]=\"item.type === 'folder'\"\n (click)=\"_openFolder(item)\"\n >{{ item.name }}</span\n >\n </ng-container>\n </div>\n\n <ng-template #editMode>\n <div fd-form-item>\n <fd-form-input-message-group [triggers]=\"[]\" [isOpen]=\"!!item.sameFilenameState\">\n <div class=\"fdp-upload-collection__vertical-align-center\">\n <input\n fd-form-control\n [value]=\"_getItemName(item)\"\n (blur)=\"_fileNameChange($event, item)\"\n (input)=\"_checkName($event, item)\"\n type=\"text\"\n [placeholder]=\"\n 'platformUploadCollection.editFileNameInputPlaceholder' | fdTranslate\n \"\n [state]=\"item.sameFilenameState\"\n />\n <span class=\"fdp-upload-collection__item_extension\">{{\n _getItemExtension(item)\n }}</span>\n </div>\n\n <fd-form-message [type]=\"item.sameFilenameState\">\n {{\n (item.type === 'file'\n ? 'platformUploadCollection.editFileNameFileAlreadyExistsError'\n : 'platformUploadCollection.editFileNameFolderAlreadyExistsError'\n ) | fdTranslate\n }}\n </fd-form-message>\n </fd-form-input-message-group>\n </div>\n </ng-template>\n </fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"uploadedBy\" label=\"Uploaded by\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.uploadedBy.name }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"uploadedOn\" label=\"Uploaded on\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.uploadedOn | date : 'shortDate' }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"size\" label=\"File size\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.fileSize | convertBytes }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"version\" label=\"Version\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">{{ item.version || '' }}</fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"status\" label=\"Status\" width=\"5rem\">\n <fdp-table-cell *fdpCellDef=\"let item\">\n <fd-busy-indicator\n *ngIf=\"item.status === _uploadCollectionItemStatus.LOADING\"\n [loading]=\"true\"\n ariaLabel=\"Status: Loading\"\n ariaLive=\"polite\"\n size=\"s\"\n ></fd-busy-indicator>\n <span\n *ngIf=\"item.status === _uploadCollectionItemStatus.SUCCESSFUL\"\n fd-object-status\n status=\"positive\"\n >\n {{ 'platformUploadCollection.itemStatusSuccessful' | fdTranslate }}\n </span>\n <span\n *ngIf=\"item.status === _uploadCollectionItemStatus.UNSUCCESSFUL\"\n fd-object-status\n status=\"negative\"\n >\n {{ 'platformUploadCollection.itemStatusUnsuccessful' | fdTranslate }}\n </span>\n </fdp-table-cell>\n </fdp-column>\n\n <fdp-column name=\"action\" *ngIf=\"!readonly\" width=\"5rem\" align=\"end\">\n <fdp-table-header *fdpHeaderCellDef>Action</fdp-table-header>\n <fdp-table-cell *fdpCellDef=\"let item\">\n <div class=\"fdp-upload-collection__actions\">\n <div class=\"fdp-upload-collection__actions--status\">\n <button\n fd-button\n [label]=\"'platformUploadCollection.uploadNewFileAfterFailAction' | fdTranslate\"\n [title]=\"'platformUploadCollection.uploadNewFileAfterFailAction' | fdTranslate\"\n (click)=\"_runUploadNewFileAfterFail(item)\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n *ngIf=\"item.status === _uploadCollectionItemStatus.UNSUCCESSFUL\"\n ></button>\n\n <button\n fd-button\n [label]=\"'platformUploadCollection.cancelUploadNewFileAction' | fdTranslate\"\n [title]=\"'platformUploadCollection.cancelUploadNewFileAction' | fdTranslate\"\n fdType=\"ghost\"\n [disabled]=\"disabled\"\n (click)=\"_cancelUploadNewFile(item)\"\n *ngIf=\"terminationEnabled && item.status === _uploadCollectionItemStatus.LOADING\"\n ></button>\n </div>\n\n <fdp-menu-button\n icon=\"overflow\"\n [disabled]=\"disabled\"\n type=\"transparent\"\n [title]=\"'platformUploadCollection.itemMenuBtnTitle' | fdTranslate\"\n [fdpMenuTriggerFor]=\"menuActions\"\n (buttonClicked)=\"_actionButton(item)\"\n >\n </fdp-menu-button>\n </div>\n </fdp-table-cell>\n </fdp-column>\n </fdp-table>\n\n <!-- Dragdrop area -->\n <div\n class=\"fdp-upload-collection__dragdrop-area\"\n *ngIf=\"_showDragDropArea\"\n [class.active]=\"_onDragDropArea\"\n >\n <fd-icon class=\"fdp-upload-collection__dragdrop-area--icon\" glyph=\"upload-to-cloud\"></fd-icon>\n <p class=\"fdp-upload-collection__dragdrop-area--text\">\n {{ 'platformUploadCollection.dragDropAreaText' | fdTranslate }}\n </p>\n </div>\n\n <!-- No data -->\n <div\n class=\"fdp-upload-collection__no-data\"\n *ngIf=\"_visibleList$.value.length === 0\"\n [class.invisible]=\"_showDragDropArea\"\n >\n <fd-icon glyph=\"document\"></fd-icon>\n <h3>{{ 'platformUploadCollection.noDataText' | fdTranslate }}</h3>\n <p>{{ 'platformUploadCollection.noDataDescription' | fdTranslate }}</p>\n </div>\n </div>\n\n <!-- Table footer -->\n <div class=\"fdp-upload-collection__table-footer\" *ngIf=\"enablePagination && _totalItems\">\n <!-- Pagination -->\n <div class=\"fdp-upload-collection__pagination\">\n <span [id]=\"id + '-pagination'\" class=\"fdp-upload-collection__pagination--total\">\n {{\n 'platformUploadCollection.paginationTotal'\n | fdTranslate : { from: _countShowedItems, to: _countNotShowedItems, total: _totalItems }\n }}\n </span>\n <fd-pagination\n [totalItems]=\"_totalItems\"\n [displayTotalItems]=\"false\"\n (pageChangeStart)=\"_pageChanged($event)\"\n [itemsPerPage]=\"_itemsPerPage\"\n [currentPage]=\"_currentPage\"\n [attr.aria-labelledby]=\"id + '-pagination'\"\n ></fd-pagination>\n </div>\n\n <!-- Results per page -->\n <div class=\"fdp-upload-collection__results\">\n <span class=\"fdp-upload-collection__results--title\">\n <span [id]=\"id + '-results'\">\n {{ 'platformUploadCollection.resultsPerPage' | fdTranslate }}\n </span>\n <span *ngIf=\"_itemsPerPageOptions.length === 0\">{{ _itemsPerPage }}</span>\n </span>\n <fdp-menu-button\n *ngIf=\"_itemsPerPageOptions.length > 0\"\n type=\"ghost\"\n [ariaLabelledBy]=\"id + '-results'\"\n [fdpMenuTriggerFor]=\"itemsPerPageMenu\"\n [label]=\"_itemsPerPage + ''\"\n >\n </fdp-menu-button>\n </div>\n </div>\n </div>\n</div>\n\n<fdp-menu #itemsPerPageMenu xPosition=\"before\">\n <fdp-menu-item\n *ngFor=\"let value of _itemsPerPageOptions\"\n (itemSelect)=\"_itemsPerPageChange(value.label)\"\n [attr.title]=\"'Results per page: ' + value.label\"\n >\n <span>{{ value.label }}</span>\n </fdp-menu-item>\n</fdp-menu>\n\n<fdp-menu #menuActions xPosition=\"before\">\n <fdp-menu-item (itemSelect)=\"_moveToClicked()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"folder-blank\"\n [title]=\"'platformUploadCollection.moveToBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.moveToBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n <ng-container *ngIf=\"_activeItem?.type === 'file'\">\n <fdp-menu-item (itemSelect)=\"_downloadClicked()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"download\"\n [title]=\"'platformUploadCollection.downloadBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.downloadBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n <fdp-menu-item (itemSelect)=\"_openUpdateFileVersion()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"drill-up\"\n [title]=\"'platformUploadCollection.updateVersionBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.updateVersionBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n </ng-container>\n <fdp-menu-item (itemSelect)=\"_remove()\">\n <fd-icon\n class=\"fdp-upload-collection__fd-icon\"\n glyph=\"delete\"\n [title]=\"'platformUploadCollection.removeBtnLabel' | fdTranslate\"\n ></fd-icon>\n <span>\n {{ 'platformUploadCollection.removeBtnLabel' | fdTranslate }}\n </span>\n </fdp-menu-item>\n</fdp-menu>\n\n<input\n #fileInput\n class=\"fdp-upload-collection__hidden\"\n type=\"file\"\n (fileSelected)=\"_selectHandler($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n fdFileSelect\n/>\n\n<input\n #updateVersionInput\n class=\"fdp-upload-collection__hidden\"\n type=\"file\"\n (fileSelected)=\"_selectHandler($event)\"\n [disabled]=\"disabled\"\n [multiple]=\"false\"\n fdFileSelect\n/>\n\n<ng-template\n let-messageType=\"messageType\"\n let-payload=\"payload\"\n let-messageStripType=\"messageStripType\"\n let-count=\"count\"\n #message\n>\n <ng-container *ngIf=\"_message\" [ngSwitch]=\"messageType\">\n <ng-container\n *ngSwitchCase=\"_messageType.CREATE\"\n [ngTemplateOutlet]=\"messageNewFolder\"\n [ngTemplateOutletContext]=\"{\n messageStripType: _message.messageStripType,\n payload: _message.payload\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.UPDATE_VERSION\"\n [ngTemplateOutlet]=\"messageUpdateVersion\"\n [ngTemplateOutletContext]=\"{\n messageStripType: _message.messageStripType,\n payload: _message.payload\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.FILE_RENAME\"\n [ngTemplateOutlet]=\"messageFileRename\"\n [ngTemplateOutletContext]=\"{\n messageStripType: _message.messageStripType,\n payload: _message.payload\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.REMOVE\"\n [ngTemplateOutlet]=\"messageRemove\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.MOVE\"\n [ngTemplateOutlet]=\"messageMove\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.TYPE_MISMATCH\"\n [ngTemplateOutlet]=\"messageTypeMismatch\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.FILE_SIZE\"\n [ngTemplateOutlet]=\"messageFileSize\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n\n <ng-container\n *ngSwitchCase=\"_messageType.FILE_NAME_LENGTH\"\n [ngTemplateOutlet]=\"messageFilenameLength\"\n [ngTemplateOutletContext]=\"{\n payload: _message.payload,\n messageStripType: _message.messageStripType,\n count: _message.count\n }\"\n ></ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #messageNewFolder let-payload=\"payload\" let-messageStripType=\"messageStripType\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersCreated\">\n {{ 'platformUploadCollection.messageCreateFailed' | fdTranslate : { folderName: payload.folder.name } }}\n </ng-container>\n <ng-template #foldersCreated>\n {{ 'platformUploadCollection.messageCreateSuccess' | fdTranslate : { folderName: payload.folder.name } }}\n </ng-template>\n</ng-template>\n\n<ng-template #messageUpdateVersion let-payload=\"payload\" let-messageStripType=\"messageStripType\">\n <ng-container *ngIf=\"messageStripType === 'error'; else versionUpdated\">\n {{ 'platformUploadCollection.messageUpdateVersionFailed' | fdTranslate : { folderName: payload.item.name } }}\n </ng-container>\n <ng-template #versionUpdated>\n {{ 'platformUploadCollection.messageUpdateVersionSuccess' | fdTranslate : { folderName: payload.item.name } }}\n </ng-template>\n</ng-template>\n\n<ng-template #messageFileRename let-payload=\"payload\" let-messageStripType=\"messageStripType\">\n <ng-container *ngIf=\"messageStripType === 'error'; else fileRenamed\">\n {{\n 'platformUploadCollection.messageFileRenameFailed'\n | fdTranslate : { from: payload.item.name, to: payload.fileName }\n }}\n </ng-container>\n <ng-template #fileRenamed>\n {{\n 'platformUploadCollection.messageFileRenameSuccess'\n | fdTranslate : { from: payload.item.name, to: payload.fileName }\n }}\n </ng-template>\n</ng-template>\n\n<ng-template #messageRemove let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersAndFilesRemoved\">\n {{\n 'platformUploadCollection.messageRemoveFoldersAndFilesFailed'\n | fdTranslate : { foldersCount: count.folder, filesCount: count.file }\n }}\n </ng-container>\n <ng-template #foldersAndFilesRemoved>\n {{\n 'platformUploadCollection.messageRemoveFoldersAndFilesSuccess'\n | fdTranslate : { foldersCount: count.folder, filesCount: count.file }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && !count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersRemoved\">\n {{ 'platformUploadCollection.messageRemoveFoldersFailed' | fdTranslate : { foldersCount: count.folder } }}\n </ng-container>\n <ng-template #foldersRemoved>\n {{ 'platformUploadCollection.messageRemoveFoldersSuccess' | fdTranslate : { foldersCount: count.folder } }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.file && !count.folder\">\n <ng-container *ngIf=\"messageStripType === 'error'; else filesRemoved\">\n {{ 'platformUploadCollection.messageRemoveFilesFailed' | fdTranslate : { filesCount: count.file } }}\n </ng-container>\n <ng-template #filesRemoved>\n {{ 'platformUploadCollection.messageRemoveFilesSuccess' | fdTranslate : { filesCount: count.file } }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n <ng-container *ngIf=\"messageStripType === 'error'; else oneItemRemoved\">\n {{\n 'platformUploadCollection.messageRemoveFileOrFolderFailed'\n | fdTranslate : { name: payload.items[0].name }\n }}\n </ng-container>\n <ng-template #oneItemRemoved>\n {{\n 'platformUploadCollection.messageRemoveFileOrFolderSuccess'\n | fdTranslate : { name: payload.items[0].name }\n }}\n </ng-template>\n </ng-container>\n</ng-template>\n\n<ng-template #messageMove let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else filesAndFoldersMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersAndFilesFailed'\n : 'platformUploadCollection.messageMoveRootFoldersAndFilesFailed'\n ) | fdTranslate : { foldersCount: count.folder, filesCount: count.file, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #filesAndFoldersMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersAndFilesSuccess'\n : 'platformUploadCollection.messageMoveRootFoldersAndFilesSuccess'\n ) | fdTranslate : { foldersCount: count.folder, filesCount: count.file, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.folder && !count.file\">\n <ng-container *ngIf=\"messageStripType === 'error'; else foldersMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersFailed'\n : 'platformUploadCollection.messageMoveRootFoldersFailed'\n ) | fdTranslate : { foldersCount: count.folder, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #foldersMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFoldersSuccess'\n : 'platformUploadCollection.messageMoveRootFoldersSuccess'\n ) | fdTranslate : { foldersCount: count.folder, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length > 1 && count.file && !count.folder\">\n <ng-container *ngIf=\"messageStripType === 'error'; else filesMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFilesFailed'\n : 'platformUploadCollection.messageMoveRootFilesFailed'\n ) | fdTranslate : { filesCount: count.file, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #filesMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFilesSuccess'\n : 'platformUploadCollection.messageMoveRootFilesSuccess'\n ) | fdTranslate : { filesCount: count.file, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n <ng-container *ngIf=\"messageStripType === 'error'; else oneItemMovedTo\">\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFileOrFolderFailed'\n : 'platformUploadCollection.messageMoveRootFileOrFolderFailed'\n ) | fdTranslate : { name: payload.items[0].name, to: payload.to?.name }\n }}\n </ng-container>\n <ng-template #oneItemMovedTo>\n {{\n (payload.to\n ? 'platformUploadCollection.messageMoveFileOrFolderSuccess'\n : 'platformUploadCollection.messageMoveRootFileOrFolderSuccess'\n ) | fdTranslate : { name: payload.items[0].name, to: payload.to?.name }\n }}\n </ng-template>\n </ng-container>\n</ng-template>\n\n<ng-template #messageTypeMismatch let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1\">\n {{\n 'platformUploadCollection.messageFileTypeMismatchPlural'\n | fdTranslate : { filesCount: payload.items.length, allowedTypes: _getAllowedTypes() }\n }}\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n {{\n 'platformUploadCollection.messageFileTypeMismatchSingular'\n | fdTranslate : { fileName: payload.items[0].name, allowedTypes: _getAllowedTypes() }\n }}\n </ng-container>\n</ng-template>\n\n<ng-template #messageFileSize let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1\">\n {{\n 'platformUploadCollection.messageFileSizeExceededPlural'\n | fdTranslate : { filesCount: payload.items.length, maxFileSize: maxFileSize || 0 }\n }}\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n {{\n 'platformUploadCollection.messageFileSizeExceededSingular'\n | fdTranslate : { fileName: payload.items[0].name, maxFileSize: maxFileSize || 0 }\n }}\n </ng-container>\n</ng-template>\n\n<ng-template #messageFilenameLength let-payload=\"payload\" let-messageStripType=\"messageStripType\" let-count=\"count\">\n <ng-container *ngIf=\"payload.items.length > 1\">\n {{\n 'platformUploadCollection.messageFileNameLengthExceededPlural'\n | fdTranslate : { filesCount: payload.items.length, maxFilenameLength: maxFilenameLength || 0 }\n }}\n </ng-container>\n\n <ng-container *ngIf=\"payload.items.length === 1\">\n {{\n 'platformUploadCollection.messageFileNameLengthExceededSingular'\n | fdTranslate : { fileName: payload.items[0].name, maxFilenameLength: maxFilenameLength || 0 }\n }}\n </ng-container>\n</ng-template>\n", styles: [".fdp-upload-collection__fd-icon{color:#0854a0!important;color:var(--sapHighlightColor)!important;margin-right:.625rem!important;font-size:1rem!important}.fdp-upload-collection fd-message-strip{margin-bottom:.625rem}.fdp-upload-collection__toolbar .fd-toolbar{margin-bottom:.625rem;border:0}.fdp-upload-collection__toolbar .fd-toolbar fd-input-group .sap-icon--search{color:#0854a0;color:var(--sapHighlightColor)}.fdp-upload-collection__no-data{text-align:center;min-height:230px;display:flex;align-items:center;flex-direction:column;justify-content:center}.fdp-upload-collection__no-data fd-icon{font-size:3rem;line-height:3rem;margin:0;color:#6a6d70;color:var(--sapContent_LabelColor)}.fdp-upload-collection__no-data h3{font-size:1.125rem;font-size:var(--sapFontHeader4Size);line-height:1rem;margin:8px 0}.fdp-upload-collection__no-data p{font-size:.875rem;font-size:var(--sapFontSize);line-height:1rem;color:#6a6d70;color:var(--sapContent_LabelColor);margin:0}.fdp-upload-collection__no-data.invisible{opacity:0}.fdp-upload-collection__table{position:relative}.fdp-upload-collection__table-footer{display:flex;justify-content:space-between;align-items:center;margin-top:.625rem}.fdp-upload-collection__table-footer .fdp-upload-collection__results--title,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total{line-height:1.4;line-height:var(--sapContent_LineHeight);color:#32363a;color:var(--sapTextColor);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily);font-weight:400;-webkit-font-smoothing:antialiased;box-sizing:border-box;padding:0;margin:0;border:0;font-size:.875rem;font-size:var(--sapFontSize);color:#6a6d70;color:var(--sapContent_LabelColor);margin-right:.5rem}.fdp-upload-collection__table-footer .fdp-upload-collection__results--title:before,.fdp-upload-collection__table-footer .fdp-upload-collection__results--title:after,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total:before,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total:after{box-sizing:inherit;font-size:inherit}[dir=rtl] .fdp-upload-collection__table-footer .fdp-upload-collection__results--title,.fdp-upload-collection__table-footer .fdp-upload-collection__results--title[dir=rtl],[dir=rtl] .fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total[dir=rtl]{margin-right:0;margin-left:.5rem}.fdp-upload-collection__table-footer .fdp-upload-collection__pagination--total{width:100%;align-self:center}.fdp-upload-collection__table-footer .fdp-upload-collection__pagination{font-size:.875rem;font-size:var(--sapFontSize);line-height:1.4;line-height:var(--sapContent_LineHeight);color:#32363a;color:var(--sapTextColor);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily);font-weight:400;-webkit-font-smoothing:antialiased;box-sizing:border-box;padding:0;margin:0;border:0;display:flex}.fdp-upload-collection__table-footer .fdp-upload-collection__pagination:before,.fdp-upload-collection__table-footer .fdp-upload-collection__pagination:after{box-sizing:inherit;font-size:inherit}.fdp-upload-collection__hidden{display:none}.fdp-upload-collection__vertical-align-center{display:flex;align-items:center}.fdp-upload-collection__cursor{cursor:pointer}.fdp-upload-collection__item_extension{white-space:nowrap}.fdp-upload-collection__actions{display:flex;justify-content:space-between;align-items:center}.fdp-upload-collection__actions .sap-icon--slim-arrow-down{display:none}.fdp-upload-collection__dragdrop-area{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;background:rgba(255,255,255,.5);outline:2px dashed transparent;outline-color:#89919a;outline-color:var(--sapField_BorderColor);outline-offset:-4px;box-sizing:border-box}.fdp-upload-collection__dragdrop-area fd-icon{font-size:3rem;line-height:3rem;margin-bottom:1rem;color:#6a6d70;color:var(--sapContent_LabelColor)}.fdp-upload-collection__dragdrop-area p{font-size:1rem;line-height:1.125rem;color:#6a6d70;color:var(--sapContent_LabelColor)}.fdp-upload-collection__dragdrop-area.active{outline-color:#0854a0;outline-color:var(--sapContent_DragAndDropActiveColor);background:rgba(8,84,160,.08)}.fdp-upload-collection__dragdrop-area.active fd-icon,.fdp-upload-collection__dragdrop-area.active p{color:#0854a0;color:var(--sapContent_DragAndDropActiveColor)}.fdp-upload-collection .fd-form-item{align-items:center;flex-direction:row}.fdp-upload-collection-dialig-no-bg{background-color:transparent!important}[dir=rtl] .fdp-upload-collection fd-icon{margin-right:0;margin-left:.625rem}.fd-menu__list .disabled{background-color:#fff!important;background-color:var(--sapList_Background)!important;cursor:not-allowed}.fd-menu__list .disabled .fd-menu__title{color:#32363a!important;color:var(--sapList_TextColor)!important}\n"] }]
|
|
1346
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: FilesValidatorService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }]; }, propDecorators: { id: [{
|
|
1347
|
-
type: Input
|
|
1348
|
-
}], itemsPerPage: [{
|
|
1349
|
-
type: Input
|
|
1350
|
-
}], dataSource: [{
|
|
1351
|
-
type: Input
|
|
1352
|
-
}], fileTypes: [{
|
|
1353
|
-
type: Input
|
|
1354
|
-
}], maxFileSize: [{
|
|
1355
|
-
type: Input
|
|
1356
|
-
}], maxFilenameLength: [{
|
|
1357
|
-
type: Input
|
|
1358
|
-
}], mimeTypes: [{
|
|
1359
|
-
type: Input
|
|
1360
|
-
}], disabled: [{
|
|
1361
|
-
type: Input
|
|
1362
|
-
}], readonly: [{
|
|
1363
|
-
type: Input
|
|
1364
|
-
}], hierarchy: [{
|
|
1365
|
-
type: Input
|
|
1366
|
-
}], enablePagination: [{
|
|
1367
|
-
type: Input
|
|
1368
|
-
}], terminationEnabled: [{
|
|
1369
|
-
type: Input
|
|
1370
|
-
}], multiple: [{
|
|
1371
|
-
type: Input
|
|
1372
|
-
}], showSearch: [{
|
|
1373
|
-
type: Input
|
|
1374
|
-
}], sameFileNameAllowed: [{
|
|
1375
|
-
type: Input
|
|
1376
|
-
}], typeMismatch: [{
|
|
1377
|
-
type: Output
|
|
1378
|
-
}], filenameLengthExceed: [{
|
|
1379
|
-
type: Output
|
|
1380
|
-
}], fileSizeExceed: [{
|
|
1381
|
-
type: Output
|
|
1382
|
-
}], _uploadFilesRef: [{
|
|
1383
|
-
type: ViewChild,
|
|
1384
|
-
args: ['fileInput']
|
|
1385
|
-
}], _updateVersionRef: [{
|
|
1386
|
-
type: ViewChild,
|
|
1387
|
-
args: ['updateVersionInput']
|
|
1388
|
-
}] } });
|
|
1389
|
-
|
|
1390
|
-
class PlatformUploadCollectionModule {
|
|
1391
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PlatformUploadCollectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1392
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: PlatformUploadCollectionModule, imports: [ContentDensityModule,
|
|
1393
|
-
UploadCollectionComponent,
|
|
1394
|
-
NewFolderComponent,
|
|
1395
|
-
MoveToComponent,
|
|
1396
|
-
UploadCollectionDragnDropDirective], exports: [UploadCollectionComponent, ContentDensityModule] }); }
|
|
1397
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PlatformUploadCollectionModule, imports: [ContentDensityModule,
|
|
1398
|
-
UploadCollectionComponent,
|
|
1399
|
-
NewFolderComponent,
|
|
1400
|
-
MoveToComponent, ContentDensityModule] }); }
|
|
1401
|
-
}
|
|
1402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PlatformUploadCollectionModule, decorators: [{
|
|
1403
|
-
type: NgModule,
|
|
1404
|
-
args: [{
|
|
1405
|
-
imports: [
|
|
1406
|
-
ContentDensityModule,
|
|
1407
|
-
UploadCollectionComponent,
|
|
1408
|
-
NewFolderComponent,
|
|
1409
|
-
MoveToComponent,
|
|
1410
|
-
UploadCollectionDragnDropDirective
|
|
1411
|
-
],
|
|
1412
|
-
exports: [UploadCollectionComponent, ContentDensityModule]
|
|
1413
|
-
}]
|
|
1414
|
-
}] });
|
|
1415
|
-
|
|
1416
|
-
/**
|
|
1417
|
-
* Default implementation for Observable Arrays and Arrays.
|
|
1418
|
-
*/
|
|
1419
|
-
/**
|
|
1420
|
-
* In Memory implementation of DataProvider that supports fulltext search
|
|
1421
|
-
*/
|
|
1422
|
-
class UploadCollectionDataProvider extends DataProvider {
|
|
1423
|
-
constructor() {
|
|
1424
|
-
super(...arguments);
|
|
1425
|
-
/** @hidden */
|
|
1426
|
-
this.totalItems = 0;
|
|
1427
|
-
/** @hidden */
|
|
1428
|
-
this.list = [];
|
|
1429
|
-
}
|
|
1430
|
-
/** @hidden */
|
|
1431
|
-
fetch(params) {
|
|
1432
|
-
let currentItems = this.items;
|
|
1433
|
-
const folderId = params.get('folderId');
|
|
1434
|
-
if (folderId) {
|
|
1435
|
-
const folder = this._findFolderById(folderId);
|
|
1436
|
-
currentItems = folder ? folder.files : [];
|
|
1437
|
-
}
|
|
1438
|
-
let _list = this._defaultSorting(currentItems);
|
|
1439
|
-
const searchText = params.get('searchText') ?? '';
|
|
1440
|
-
const limit = +(params.get('limit') ?? 100);
|
|
1441
|
-
const page = +(params.get('page') ?? 1);
|
|
1442
|
-
if (!searchText || searchText === '*') {
|
|
1443
|
-
this.list = _list;
|
|
1444
|
-
this.totalItems = _list.length;
|
|
1445
|
-
return of(this._getItemsByPage(_list, page, limit));
|
|
1446
|
-
}
|
|
1447
|
-
const keyword = searchText.toLowerCase();
|
|
1448
|
-
_list = _list.filter((item) => item.name.toLowerCase().indexOf(keyword) > -1);
|
|
1449
|
-
this.list = _list;
|
|
1450
|
-
this.totalItems = _list.length;
|
|
1451
|
-
_list = this._getItemsByPage(_list, page, limit);
|
|
1452
|
-
return of(_list);
|
|
1453
|
-
}
|
|
1454
|
-
/** @hidden */
|
|
1455
|
-
_getItemsByPage(items, page, limit) {
|
|
1456
|
-
const firstDisplayedRow = (page - 1) * limit;
|
|
1457
|
-
const _visibleList = items.slice(firstDisplayedRow, firstDisplayedRow + limit);
|
|
1458
|
-
if (_visibleList.length === 0 && items.length > 0) {
|
|
1459
|
-
this._getItemsByPage(items, page > 1 ? page - 1 : 1, limit);
|
|
1460
|
-
}
|
|
1461
|
-
return _visibleList;
|
|
1462
|
-
}
|
|
1463
|
-
/** @hidden */
|
|
1464
|
-
_defaultSorting(list) {
|
|
1465
|
-
let _list = [];
|
|
1466
|
-
const groupByType = list.reduce((res, item) => {
|
|
1467
|
-
const type = `${item.type}s`;
|
|
1468
|
-
if (!res[type]) {
|
|
1469
|
-
res[type] = [];
|
|
1470
|
-
}
|
|
1471
|
-
if (item.type === 'folder') {
|
|
1472
|
-
item.fileSize = +this._getFileSize(item).toFixed(2);
|
|
1473
|
-
}
|
|
1474
|
-
res[type].push(item);
|
|
1475
|
-
return res;
|
|
1476
|
-
}, {});
|
|
1477
|
-
groupByType.folders = this._sortBy(groupByType.folders, 'name');
|
|
1478
|
-
groupByType.files = this._sortBy(groupByType.files, 'name');
|
|
1479
|
-
if (groupByType.folders) {
|
|
1480
|
-
_list = groupByType.folders;
|
|
1481
|
-
}
|
|
1482
|
-
else {
|
|
1483
|
-
_list = [];
|
|
1484
|
-
}
|
|
1485
|
-
if (groupByType.files) {
|
|
1486
|
-
_list.push(...groupByType.files);
|
|
1487
|
-
}
|
|
1488
|
-
return _list;
|
|
1489
|
-
}
|
|
1490
|
-
/** @hidden */
|
|
1491
|
-
_getFileSize(item) {
|
|
1492
|
-
if (item.type === 'file') {
|
|
1493
|
-
return item.fileSize;
|
|
1494
|
-
}
|
|
1495
|
-
if (item.type === 'folder') {
|
|
1496
|
-
return item.files.reduce((res, folderItem) => {
|
|
1497
|
-
res += this._getFileSize(folderItem);
|
|
1498
|
-
return res;
|
|
1499
|
-
}, 0);
|
|
1500
|
-
}
|
|
1501
|
-
return 0;
|
|
1502
|
-
}
|
|
1503
|
-
/** @hidden */
|
|
1504
|
-
_sortBy(items = [], key) {
|
|
1505
|
-
return items.sort((a, b) => (a[key] > b[key] ? 1 : -1));
|
|
1506
|
-
}
|
|
1507
|
-
/** @hidden */
|
|
1508
|
-
_findFolderById(folderId) {
|
|
1509
|
-
let foundObj;
|
|
1510
|
-
JSON.stringify(this.items, (_, nestedValue) => {
|
|
1511
|
-
if (nestedValue && nestedValue.documentId === folderId) {
|
|
1512
|
-
foundObj = nestedValue;
|
|
1513
|
-
}
|
|
1514
|
-
return nestedValue;
|
|
1515
|
-
});
|
|
1516
|
-
return foundObj;
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
class UploadCollectionDataSource {
|
|
1521
|
-
/** Max items for response */
|
|
1522
|
-
static { this.MaxLimit = Number.MAX_SAFE_INTEGER; }
|
|
1523
|
-
/** @hidden */
|
|
1524
|
-
get isDataLoading() {
|
|
1525
|
-
return this._dataLoading;
|
|
1526
|
-
}
|
|
1527
|
-
/** @hidden */
|
|
1528
|
-
constructor(dataProvider) {
|
|
1529
|
-
this.dataProvider = dataProvider;
|
|
1530
|
-
/** @hidden */
|
|
1531
|
-
this._dataChanges = new BehaviorSubject([]);
|
|
1532
|
-
/** @hidden */
|
|
1533
|
-
this._onDataRequested$ = new Subject();
|
|
1534
|
-
/** @hidden */
|
|
1535
|
-
this._onDataReceived$ = new Subject();
|
|
1536
|
-
/** @hidden */
|
|
1537
|
-
this._dataLoading = false;
|
|
1538
|
-
}
|
|
1539
|
-
/** Filtering data */
|
|
1540
|
-
match(searchParam) {
|
|
1541
|
-
this._onDataRequested$.next();
|
|
1542
|
-
this._dataLoading = true;
|
|
1543
|
-
if (!(searchParam instanceof Map)) {
|
|
1544
|
-
throw new Error('DataSource.match() predicate can only accepts string and Map');
|
|
1545
|
-
}
|
|
1546
|
-
if (!searchParam.has('limit')) {
|
|
1547
|
-
searchParam.set('limit', UploadCollectionDataSource.MaxLimit);
|
|
1548
|
-
}
|
|
1549
|
-
this.dataProvider
|
|
1550
|
-
.fetch(searchParam)
|
|
1551
|
-
.pipe(take(1))
|
|
1552
|
-
.subscribe((result) => {
|
|
1553
|
-
this._onDataReceived$.next();
|
|
1554
|
-
this._dataLoading = false;
|
|
1555
|
-
this._dataChanges.next(result);
|
|
1556
|
-
}, () => {
|
|
1557
|
-
this._onDataReceived$.next();
|
|
1558
|
-
this._dataLoading = false;
|
|
1559
|
-
});
|
|
1560
|
-
}
|
|
1561
|
-
/** The method is triggered when valid files are selected in the file uploader dialog. */
|
|
1562
|
-
upload(data) {
|
|
1563
|
-
return this.dataProvider.upload(data).pipe(take(1));
|
|
1564
|
-
}
|
|
1565
|
-
/** The method is triggered when an uploaded attachment is selected and the Download button is pressed. */
|
|
1566
|
-
download(data) {
|
|
1567
|
-
return this.dataProvider.download(data);
|
|
1568
|
-
}
|
|
1569
|
-
/** The method is triggered when Move to button is pressed and folder to move is selected in the dialog modal. */
|
|
1570
|
-
moveTo(data) {
|
|
1571
|
-
return this.dataProvider.moveTo(data).pipe(take(1));
|
|
1572
|
-
}
|
|
1573
|
-
/** The method is triggered when an uploaded attachment is selected and the Delete button is pressed. */
|
|
1574
|
-
delete(data) {
|
|
1575
|
-
return this.dataProvider.delete(data).pipe(take(1));
|
|
1576
|
-
}
|
|
1577
|
-
/** The method is triggered when the file name is changed. */
|
|
1578
|
-
fileRenamed(data) {
|
|
1579
|
-
return this.dataProvider.fileRenamed(data).pipe(take(1));
|
|
1580
|
-
}
|
|
1581
|
-
/** The method is triggered when the new folder added. */
|
|
1582
|
-
newFolder(data) {
|
|
1583
|
-
return this.dataProvider.newFolder(data).pipe(take(1));
|
|
1584
|
-
}
|
|
1585
|
-
/** The method is triggered when Update Version button is pressed and valid file are selected in the file uploader dialog. */
|
|
1586
|
-
updateVersion(data) {
|
|
1587
|
-
return this.dataProvider.updateVersion(data).pipe(take(1));
|
|
1588
|
-
}
|
|
1589
|
-
/** The method is triggered when Run button is pressed */
|
|
1590
|
-
runAfterFail(data) {
|
|
1591
|
-
return this.dataProvider.runAfterFail(data).pipe(take(1));
|
|
1592
|
-
}
|
|
1593
|
-
/** The method is triggered when Cancel button is pressed */
|
|
1594
|
-
cancelUploadNewFile(data) {
|
|
1595
|
-
return this.dataProvider.cancelUploadNewFile(data).pipe(take(1));
|
|
1596
|
-
}
|
|
1597
|
-
/** @hidden */
|
|
1598
|
-
open() {
|
|
1599
|
-
return this._dataChanges.asObservable();
|
|
1600
|
-
}
|
|
1601
|
-
/** @hidden */
|
|
1602
|
-
close() { }
|
|
1603
|
-
/** @hidden */
|
|
1604
|
-
onDataRequested() {
|
|
1605
|
-
return this._onDataRequested$.asObservable();
|
|
1606
|
-
}
|
|
1607
|
-
/** @hidden */
|
|
1608
|
-
onDataReceived() {
|
|
1609
|
-
return this._onDataReceived$.asObservable();
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
const dataSource = [
|
|
1614
|
-
{
|
|
1615
|
-
documentId: uuidv4$1(),
|
|
1616
|
-
type: 'folder',
|
|
1617
|
-
name: 'Folder-1',
|
|
1618
|
-
uploadedBy: {
|
|
1619
|
-
id: uuidv4$1(),
|
|
1620
|
-
name: 'Lucas A.'
|
|
1621
|
-
},
|
|
1622
|
-
uploadedOn: new Date(2018, 4, 1),
|
|
1623
|
-
files: [
|
|
1624
|
-
{
|
|
1625
|
-
documentId: uuidv4$1(),
|
|
1626
|
-
type: 'file',
|
|
1627
|
-
name: 'File-2',
|
|
1628
|
-
uploadedBy: {
|
|
1629
|
-
id: uuidv4$1(),
|
|
1630
|
-
name: 'Oliver T.'
|
|
1631
|
-
},
|
|
1632
|
-
url: '',
|
|
1633
|
-
uploadedOn: new Date(2018, 0, 1),
|
|
1634
|
-
fileSize: 1024,
|
|
1635
|
-
version: 2
|
|
1636
|
-
}
|
|
1637
|
-
]
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
documentId: uuidv4$1(),
|
|
1641
|
-
type: 'file',
|
|
1642
|
-
name: `File-1`,
|
|
1643
|
-
uploadedBy: {
|
|
1644
|
-
id: uuidv4$1(),
|
|
1645
|
-
name: 'William G.'
|
|
1646
|
-
},
|
|
1647
|
-
url: '',
|
|
1648
|
-
uploadedOn: new Date(2010, 9, 4),
|
|
1649
|
-
fileSize: 2048,
|
|
1650
|
-
version: 1
|
|
1651
|
-
}
|
|
1652
|
-
];
|
|
1653
|
-
class UploadCollectionDataProviderTest extends UploadCollectionDataProvider {
|
|
1654
|
-
constructor() {
|
|
1655
|
-
super(...arguments);
|
|
1656
|
-
/** @hidden */
|
|
1657
|
-
this.items = dataSource.map((item) => ({ ...item }));
|
|
1658
|
-
/** @hidden */
|
|
1659
|
-
this._cancelUploadNewFileIds = [];
|
|
1660
|
-
}
|
|
1661
|
-
/** The method is triggered when valid files are selected in the file uploader dialog. */
|
|
1662
|
-
upload({ parentFolderId, items }) {
|
|
1663
|
-
console.log('upload', parentFolderId, items);
|
|
1664
|
-
const newFiles = items.map((item) => {
|
|
1665
|
-
delete item.file;
|
|
1666
|
-
item.status = UploadCollectionItemStatus.SUCCESSFUL;
|
|
1667
|
-
return {
|
|
1668
|
-
temporaryDocumentId: item.documentId,
|
|
1669
|
-
item
|
|
1670
|
-
};
|
|
1671
|
-
});
|
|
1672
|
-
this._findParentFolderAndAddNewFiles(parentFolderId, newFiles);
|
|
1673
|
-
return of(this.items).pipe(delay(5000), map((updatedItems) => {
|
|
1674
|
-
const ids = newFiles
|
|
1675
|
-
.filter((file) => {
|
|
1676
|
-
const includes = file.item.documentId && this._cancelUploadNewFileIds.includes(file.item.documentId);
|
|
1677
|
-
if (includes) {
|
|
1678
|
-
this._cancelUploadNewFileIds = this._cancelUploadNewFileIds.filter((id) => id !== file.item.documentId);
|
|
1679
|
-
return true;
|
|
1680
|
-
}
|
|
1681
|
-
return false;
|
|
1682
|
-
})
|
|
1683
|
-
.map((file) => file.item.documentId);
|
|
1684
|
-
this._findParentFolderAndRemoveItemsByIds(parentFolderId, ids, updatedItems);
|
|
1685
|
-
return updatedItems;
|
|
1686
|
-
}));
|
|
1687
|
-
}
|
|
1688
|
-
/** The method is triggered when an uploaded attachment is selected and the Download button is pressed. */
|
|
1689
|
-
download(data) {
|
|
1690
|
-
console.log('download', data);
|
|
1691
|
-
return of(undefined);
|
|
1692
|
-
}
|
|
1693
|
-
/**
|
|
1694
|
-
* The method is triggered when Move to button is pressed and folder to move is selected in the dialog modal.
|
|
1695
|
-
* Should return full dataSource
|
|
1696
|
-
* */
|
|
1697
|
-
moveTo(data) {
|
|
1698
|
-
console.log('moveTo', data);
|
|
1699
|
-
return of([]);
|
|
1700
|
-
}
|
|
1701
|
-
/** The method is triggered when an uploaded attachment is selected and the Delete button is pressed. */
|
|
1702
|
-
delete({ parentFolderId, items }) {
|
|
1703
|
-
console.log('delete', parentFolderId, items);
|
|
1704
|
-
const ids = items.map((item) => item.documentId);
|
|
1705
|
-
this._findParentFolderAndRemoveItemsByIds(parentFolderId, ids);
|
|
1706
|
-
return of(this.items);
|
|
1707
|
-
}
|
|
1708
|
-
/** The method is triggered when the file name is changed. */
|
|
1709
|
-
fileRenamed({ parentFolderId, item, fileName }) {
|
|
1710
|
-
console.log('fileRenamed', parentFolderId, item, fileName);
|
|
1711
|
-
let updatedItem = {
|
|
1712
|
-
...item,
|
|
1713
|
-
name: fileName,
|
|
1714
|
-
status: UploadCollectionItemStatus.SUCCESSFUL
|
|
1715
|
-
};
|
|
1716
|
-
this._findParentFolderAndUpdateItem(parentFolderId, updatedItem);
|
|
1717
|
-
return of(this.items).pipe(delay(5000), map((updatedItems) => {
|
|
1718
|
-
const itemId = item.documentId;
|
|
1719
|
-
const includes = itemId && this._cancelUploadNewFileIds.includes(itemId);
|
|
1720
|
-
if (includes) {
|
|
1721
|
-
updatedItem = { ...updatedItem };
|
|
1722
|
-
updatedItem.name = item.name;
|
|
1723
|
-
updatedItem.status = UploadCollectionItemStatus.SUCCESSFUL;
|
|
1724
|
-
this._findParentFolderAndUpdateItem(parentFolderId, updatedItem, updatedItems);
|
|
1725
|
-
this._cancelUploadNewFileIds = this._cancelUploadNewFileIds.filter((id) => id !== itemId);
|
|
1726
|
-
}
|
|
1727
|
-
return updatedItems;
|
|
1728
|
-
}));
|
|
1729
|
-
}
|
|
1730
|
-
/** The method is triggered when the new folder added. */
|
|
1731
|
-
newFolder({ parentFolderId, folder }) {
|
|
1732
|
-
console.log('newFolder', folder, parentFolderId);
|
|
1733
|
-
folder.status = UploadCollectionItemStatus.SUCCESSFUL;
|
|
1734
|
-
this._findParentFolderAndAddNewFiles(parentFolderId, [
|
|
1735
|
-
{
|
|
1736
|
-
temporaryDocumentId: folder.documentId,
|
|
1737
|
-
item: folder
|
|
1738
|
-
}
|
|
1739
|
-
]);
|
|
1740
|
-
return of(this.items).pipe(delay(5000), map((updatedItems) => {
|
|
1741
|
-
const folderId = folder.documentId;
|
|
1742
|
-
const includes = !!folderId && this._cancelUploadNewFileIds.includes(folderId);
|
|
1743
|
-
if (includes) {
|
|
1744
|
-
this._cancelUploadNewFileIds = this._cancelUploadNewFileIds.filter((id) => id !== folderId);
|
|
1745
|
-
this._findParentFolderAndRemoveItemsByIds(parentFolderId, [folderId], updatedItems);
|
|
1746
|
-
}
|
|
1747
|
-
return updatedItems;
|
|
1748
|
-
}));
|
|
1749
|
-
}
|
|
1750
|
-
/** The method is triggered when Update Version button is pressed and valid file are selected in the file uploader dialog. */
|
|
1751
|
-
updateVersion({ parentFolderId, item, newItem }) {
|
|
1752
|
-
console.log('updateVersion', parentFolderId, item);
|
|
1753
|
-
let updatedItem = {
|
|
1754
|
-
...item,
|
|
1755
|
-
status: UploadCollectionItemStatus.SUCCESSFUL,
|
|
1756
|
-
uploadedOn: new Date(),
|
|
1757
|
-
uploadedBy: {
|
|
1758
|
-
id: Date.now(),
|
|
1759
|
-
name: 'You'
|
|
1760
|
-
},
|
|
1761
|
-
version: +item.version,
|
|
1762
|
-
name: newItem.name,
|
|
1763
|
-
fileSize: newItem.size
|
|
1764
|
-
};
|
|
1765
|
-
this._findParentFolderAndUpdateItem(parentFolderId, updatedItem);
|
|
1766
|
-
return of(this.items).pipe(delay(5000), map((updatedItems) => {
|
|
1767
|
-
const itemId = updatedItem.documentId;
|
|
1768
|
-
const includes = this._cancelUploadNewFileIds.includes(itemId);
|
|
1769
|
-
if (includes) {
|
|
1770
|
-
updatedItem = { ...item };
|
|
1771
|
-
this._findParentFolderAndUpdateItem(parentFolderId, updatedItem, updatedItems);
|
|
1772
|
-
this._cancelUploadNewFileIds = this._cancelUploadNewFileIds.filter((id) => id !== itemId);
|
|
1773
|
-
}
|
|
1774
|
-
return updatedItems;
|
|
1775
|
-
}));
|
|
1776
|
-
}
|
|
1777
|
-
/** @hidden */
|
|
1778
|
-
runAfterFail({ parentFolderId, items }) {
|
|
1779
|
-
console.log('runAfterFail', parentFolderId, items);
|
|
1780
|
-
const item = items[0];
|
|
1781
|
-
this._findParentFolderAndAddNewFiles(parentFolderId, [
|
|
1782
|
-
{
|
|
1783
|
-
temporaryDocumentId: item.documentId,
|
|
1784
|
-
item: {
|
|
1785
|
-
...item,
|
|
1786
|
-
status: UploadCollectionItemStatus.SUCCESSFUL
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
]);
|
|
1790
|
-
return of(this.items);
|
|
1791
|
-
}
|
|
1792
|
-
/** The method is triggered when Cancel button is pressed */
|
|
1793
|
-
cancelUploadNewFile({ parentFolderId, item }) {
|
|
1794
|
-
console.log('cancelUploadNewFile', parentFolderId, item);
|
|
1795
|
-
const id = item.documentId;
|
|
1796
|
-
this._cancelUploadNewFileIds.push(id);
|
|
1797
|
-
this._findParentFolderAndRemoveItemsByIds(parentFolderId, [id]);
|
|
1798
|
-
return of([]);
|
|
1799
|
-
}
|
|
1800
|
-
/** @hidden */
|
|
1801
|
-
_findParentFolderAndUpdateItem(parentFolderId, updatedItem, items = this.items) {
|
|
1802
|
-
if (!parentFolderId) {
|
|
1803
|
-
const index = items.findIndex((item) => item.documentId === updatedItem.documentId);
|
|
1804
|
-
if (index !== -1) {
|
|
1805
|
-
items[index] = updatedItem;
|
|
1806
|
-
}
|
|
1807
|
-
return;
|
|
1808
|
-
}
|
|
1809
|
-
for (let i = 0; i < items.length; i++) {
|
|
1810
|
-
const currentItem = items[i];
|
|
1811
|
-
if (currentItem.type !== 'folder') {
|
|
1812
|
-
continue;
|
|
1813
|
-
}
|
|
1814
|
-
if (currentItem.documentId === parentFolderId) {
|
|
1815
|
-
const index = currentItem.files.findIndex((item) => item.documentId === updatedItem.documentId);
|
|
1816
|
-
if (index !== -1) {
|
|
1817
|
-
currentItem.files[i] = updatedItem;
|
|
1818
|
-
break;
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
else {
|
|
1822
|
-
this._findParentFolderAndUpdateItem(parentFolderId, updatedItem, currentItem.files);
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
/** @hidden */
|
|
1827
|
-
_findParentFolderAndAddNewFiles(parentFolderId, uploadedFiles, items = this.items) {
|
|
1828
|
-
if (uploadedFiles.length === 0) {
|
|
1829
|
-
return;
|
|
1830
|
-
}
|
|
1831
|
-
if (!parentFolderId) {
|
|
1832
|
-
const uploadedFile = uploadedFiles.pop();
|
|
1833
|
-
const index = items.findIndex((item) => item.documentId === uploadedFile?.temporaryDocumentId);
|
|
1834
|
-
if (index !== -1) {
|
|
1835
|
-
items[index] = uploadedFile.item;
|
|
1836
|
-
this._findParentFolderAndAddNewFiles(parentFolderId, uploadedFiles);
|
|
1837
|
-
}
|
|
1838
|
-
return;
|
|
1839
|
-
}
|
|
1840
|
-
for (let i = 0; i < items.length; i++) {
|
|
1841
|
-
const currentItem = items[i];
|
|
1842
|
-
if (currentItem.type !== 'folder') {
|
|
1843
|
-
continue;
|
|
1844
|
-
}
|
|
1845
|
-
if (currentItem.documentId === parentFolderId) {
|
|
1846
|
-
const hash = uploadedFiles.reduce((res, file) => {
|
|
1847
|
-
res[file.temporaryDocumentId] = file.item;
|
|
1848
|
-
return res;
|
|
1849
|
-
}, {});
|
|
1850
|
-
currentItem.files = currentItem.files.map((item) => hash[item.documentId] || item);
|
|
1851
|
-
break;
|
|
1852
|
-
}
|
|
1853
|
-
else {
|
|
1854
|
-
this._findParentFolderAndAddNewFiles(parentFolderId, uploadedFiles, currentItem.files);
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
|
-
}
|
|
1858
|
-
/** @hidden */
|
|
1859
|
-
_findParentFolderAndRemoveItemsByIds(parentFolderId, documentsIds, items = this.items) {
|
|
1860
|
-
if (documentsIds.length === 0) {
|
|
1861
|
-
return;
|
|
1862
|
-
}
|
|
1863
|
-
if (!parentFolderId) {
|
|
1864
|
-
const documentId = documentsIds.pop();
|
|
1865
|
-
const index = items.findIndex((item) => item.documentId === documentId);
|
|
1866
|
-
if (index !== -1) {
|
|
1867
|
-
items.splice(index, 1);
|
|
1868
|
-
this._findParentFolderAndRemoveItemsByIds(parentFolderId, documentsIds);
|
|
1869
|
-
}
|
|
1870
|
-
return;
|
|
1871
|
-
}
|
|
1872
|
-
for (let i = 0; i < items.length; i++) {
|
|
1873
|
-
const currentItem = items[i];
|
|
1874
|
-
if (currentItem.type !== 'folder') {
|
|
1875
|
-
continue;
|
|
1876
|
-
}
|
|
1877
|
-
if (currentItem.documentId === parentFolderId) {
|
|
1878
|
-
currentItem.files = currentItem.files.filter((item) => !documentsIds.some((documentId) => documentId === item.documentId));
|
|
1879
|
-
break;
|
|
1880
|
-
}
|
|
1881
|
-
else {
|
|
1882
|
-
this._findParentFolderAndRemoveItemsByIds(parentFolderId, documentsIds, currentItem.files);
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* Generated bundle index. Do not edit.
|
|
1890
|
-
*/
|
|
1891
|
-
|
|
1892
|
-
export { FileSizeExceedEvent, FilenameLengthExceedEvent, FilesValidatorService, MessageStripType, MessageType, MoveToComponent, NewFolderComponent, PlatformUploadCollectionModule, TypeMismatchEvent, UploadCollectionComponent, UploadCollectionDataProvider, UploadCollectionDataProviderTest, UploadCollectionDataSource, UploadCollectionDragnDropDirective, UploadCollectionItemStatus, generateMessageStripeData };
|
|
1893
|
-
//# sourceMappingURL=fundamental-ngx-platform-upload-collection.mjs.map
|