@yuuvis/client-framework 0.6.5
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 +62 -0
- package/actions/README.md +3 -0
- package/actions/index.d.ts +6 -0
- package/actions/lib/actions/copy-action/copy-action.d.ts +17 -0
- package/actions/lib/actions/cut-action/cut-action.d.ts +17 -0
- package/actions/lib/actions/delete-action/delete/delete.component.d.ts +22 -0
- package/actions/lib/actions/delete-action/delete-action.d.ts +17 -0
- package/actions/lib/actions/download-action/download-action.d.ts +17 -0
- package/actions/lib/actions.icon.d.ts +7 -0
- package/actions/lib/actions.interface.d.ts +86 -0
- package/actions/lib/actions.module.d.ts +8 -0
- package/actions/lib/actions.service.d.ts +38 -0
- package/actions/lib/components/contextmenu/contextmenu.component.d.ts +11 -0
- package/app-bar/README.md +3 -0
- package/app-bar/index.d.ts +1 -0
- package/app-bar/lib/app-bar.component.d.ts +47 -0
- package/clipboard/README.md +3 -0
- package/clipboard/index.d.ts +1 -0
- package/clipboard/lib/clipboard.component.d.ts +16 -0
- package/common/README.md +3 -0
- package/common/index.d.ts +5 -0
- package/common/lib/components/focus-indicator/focus-indicator.component.d.ts +7 -0
- package/common/lib/components/token-input/token-input.component.d.ts +55 -0
- package/common/lib/components/token-input/token-input.interface.d.ts +8 -0
- package/common/lib/directives/busy-overlay.directive.d.ts +25 -0
- package/common/lib/directives/click-double.directive.d.ts +17 -0
- package/common/lib/directives/container-size.directive.d.ts +30 -0
- package/common/lib/directives/drag-select.directive.d.ts +21 -0
- package/common/lib/directives/file-drop-zone/file-drop-zone.directive.d.ts +18 -0
- package/common/lib/directives/file-drop-zone/file-drop-zone.interface.d.ts +5 -0
- package/common/lib/directives/focus-within.directive.d.ts +36 -0
- package/common/lib/directives/index.d.ts +8 -0
- package/common/lib/directives/light-dismiss.directive.d.ts +19 -0
- package/common/lib/directives/longpress.directive.d.ts +13 -0
- package/common/lib/directives/noop-value-accessor.directive.d.ts +10 -0
- package/esm2022/actions/index.mjs +7 -0
- package/esm2022/actions/lib/actions/copy-action/copy-action.mjs +31 -0
- package/esm2022/actions/lib/actions/cut-action/cut-action.mjs +30 -0
- package/esm2022/actions/lib/actions/delete-action/delete/delete.component.mjs +67 -0
- package/esm2022/actions/lib/actions/delete-action/delete-action.mjs +44 -0
- package/esm2022/actions/lib/actions/download-action/download-action.mjs +33 -0
- package/esm2022/actions/lib/actions.icon.mjs +8 -0
- package/esm2022/actions/lib/actions.interface.mjs +19 -0
- package/esm2022/actions/lib/actions.module.mjs +16 -0
- package/esm2022/actions/lib/actions.service.mjs +89 -0
- package/esm2022/actions/lib/components/contextmenu/contextmenu.component.mjs +27 -0
- package/esm2022/actions/yuuvis-client-framework-actions.mjs +5 -0
- package/esm2022/app-bar/index.mjs +2 -0
- package/esm2022/app-bar/lib/app-bar.component.mjs +89 -0
- package/esm2022/app-bar/yuuvis-client-framework-app-bar.mjs +5 -0
- package/esm2022/clipboard/index.mjs +2 -0
- package/esm2022/clipboard/lib/clipboard.component.mjs +48 -0
- package/esm2022/clipboard/yuuvis-client-framework-clipboard.mjs +5 -0
- package/esm2022/common/index.mjs +6 -0
- package/esm2022/common/lib/components/focus-indicator/focus-indicator.component.mjs +41 -0
- package/esm2022/common/lib/components/token-input/token-input.component.mjs +324 -0
- package/esm2022/common/lib/components/token-input/token-input.interface.mjs +2 -0
- package/esm2022/common/lib/directives/busy-overlay.directive.mjs +88 -0
- package/esm2022/common/lib/directives/click-double.directive.mjs +61 -0
- package/esm2022/common/lib/directives/container-size.directive.mjs +56 -0
- package/esm2022/common/lib/directives/drag-select.directive.mjs +114 -0
- package/esm2022/common/lib/directives/file-drop-zone/file-drop-zone.directive.mjs +153 -0
- package/esm2022/common/lib/directives/file-drop-zone/file-drop-zone.interface.mjs +2 -0
- package/esm2022/common/lib/directives/focus-within.directive.mjs +81 -0
- package/esm2022/common/lib/directives/index.mjs +9 -0
- package/esm2022/common/lib/directives/light-dismiss.directive.mjs +44 -0
- package/esm2022/common/lib/directives/longpress.directive.mjs +36 -0
- package/esm2022/common/lib/directives/noop-value-accessor.directive.mjs +42 -0
- package/esm2022/common/yuuvis-client-framework-common.mjs +5 -0
- package/esm2022/forms/index.mjs +19 -0
- package/esm2022/forms/lib/elements/catalog/catalog.component.mjs +118 -0
- package/esm2022/forms/lib/elements/datetime/datetime.component.mjs +82 -0
- package/esm2022/forms/lib/elements/datetime-range/datetime-range.component.mjs +166 -0
- package/esm2022/forms/lib/elements/number/number.component.mjs +195 -0
- package/esm2022/forms/lib/elements/number-range/number-range.component.mjs +176 -0
- package/esm2022/forms/lib/elements/organization/organization.component.mjs +268 -0
- package/esm2022/forms/lib/elements/string/string.component.mjs +254 -0
- package/esm2022/forms/lib/form-input/form-input.component.mjs +88 -0
- package/esm2022/forms/lib/forms.module.mjs +58 -0
- package/esm2022/forms/yuuvis-client-framework-forms.mjs +5 -0
- package/esm2022/icons/index.mjs +4 -0
- package/esm2022/icons/lib/icon.service.mjs +59 -0
- package/esm2022/icons/lib/icons.mjs +31 -0
- package/esm2022/icons/lib/object-type-icon/object-type-icon.component.mjs +29 -0
- package/esm2022/icons/yuuvis-client-framework-icons.mjs +5 -0
- package/esm2022/index.mjs +2 -0
- package/esm2022/lib/yuuvis-client-framework.module.mjs +15 -0
- package/esm2022/list/index.mjs +3 -0
- package/esm2022/list/lib/list-item.directive.mjs +72 -0
- package/esm2022/list/lib/list.component.mjs +133 -0
- package/esm2022/list/yuuvis-client-framework-list.mjs +5 -0
- package/esm2022/metadata-form/index.mjs +4 -0
- package/esm2022/metadata-form/lib/metadata-default-templates/metadata-default-templates.component.mjs +31 -0
- package/esm2022/metadata-form/lib/metadata-form-element-registry.service.mjs +99 -0
- package/esm2022/metadata-form/lib/metadata-form-field/metadata-form-field.component.mjs +126 -0
- package/esm2022/metadata-form/lib/object-metadata-element-template.directive.mjs +52 -0
- package/esm2022/metadata-form/yuuvis-client-framework-metadata-form.mjs +5 -0
- package/esm2022/object-details/index.mjs +7 -0
- package/esm2022/object-details/lib/object-audit/object-audit.component.mjs +195 -0
- package/esm2022/object-details/lib/object-details-shell/object-details-shell.component.mjs +127 -0
- package/esm2022/object-details/lib/object-details.component.mjs +61 -0
- package/esm2022/object-details/lib/object-metadata/form-section-group.pipe.mjs +17 -0
- package/esm2022/object-details/lib/object-metadata/object-metadata.component.mjs +201 -0
- package/esm2022/object-details/lib/object-metadata/object-metadata.interface.mjs +2 -0
- package/esm2022/object-details/yuuvis-client-framework-object-details.mjs +5 -0
- package/esm2022/object-flavor/index.mjs +6 -0
- package/esm2022/object-flavor/lib/abstract-apply-create-flavor/abstract-apply-create-flavor.component.mjs +25 -0
- package/esm2022/object-flavor/lib/abstract-apply-object-flavor/abstract-apply-object-flavor.component.mjs +21 -0
- package/esm2022/object-flavor/lib/flavor-chip/flavor-chip.component.mjs +35 -0
- package/esm2022/object-flavor/lib/object-flavor/object-flavor.component.mjs +93 -0
- package/esm2022/object-flavor/lib/object-flavor-picker/object-flavor-picker.component.mjs +43 -0
- package/esm2022/object-flavor/yuuvis-client-framework-object-flavor.mjs +5 -0
- package/esm2022/object-form/index.mjs +5 -0
- package/esm2022/object-form/lib/form-scripting.api.interface.mjs +2 -0
- package/esm2022/object-form/lib/form-scripting.service.mjs +160 -0
- package/esm2022/object-form/lib/object-form-element/object-form-element.component.mjs +87 -0
- package/esm2022/object-form/lib/object-form-extension.interface.mjs +36 -0
- package/esm2022/object-form/lib/object-form-group/object-form-group.component.mjs +85 -0
- package/esm2022/object-form/lib/object-form-script/form-scripting-element-extension/form-scripting-element-extension.component.mjs +23 -0
- package/esm2022/object-form/lib/object-form-script/object-form-script.service.mjs +115 -0
- package/esm2022/object-form/lib/object-form-script/object-form-scripting-scope.mjs +251 -0
- package/esm2022/object-form/lib/object-form-translate.service.mjs +73 -0
- package/esm2022/object-form/lib/object-form.component.mjs +627 -0
- package/esm2022/object-form/lib/object-form.interface.mjs +9 -0
- package/esm2022/object-form/lib/object-form.model.mjs +20 -0
- package/esm2022/object-form/lib/object-form.service.mjs +127 -0
- package/esm2022/object-form/lib/object-form.utils.mjs +55 -0
- package/esm2022/object-form/lib/object-form.validation.mjs +48 -0
- package/esm2022/object-form/yuuvis-client-framework-object-form.mjs +5 -0
- package/esm2022/object-preview/index.mjs +3 -0
- package/esm2022/object-preview/lib/components/index.mjs +3 -0
- package/esm2022/object-preview/lib/components/object-email-preview/object-email-preview.component.mjs +45 -0
- package/esm2022/object-preview/lib/components/object-preview/object-preview.component.mjs +78 -0
- package/esm2022/object-preview/lib/services/object-preview.service.mjs +92 -0
- package/esm2022/object-preview/yuuvis-client-framework-object-preview.mjs +5 -0
- package/esm2022/object-summary/index.mjs +5 -0
- package/esm2022/object-summary/lib/multi-object-summary/multi-object-summary.component.mjs +33 -0
- package/esm2022/object-summary/lib/object-summary/object-summary.component.mjs +273 -0
- package/esm2022/object-summary/lib/object-summary-data/object-summary-data.component.mjs +80 -0
- package/esm2022/object-summary/lib/object-summary.module.mjs +15 -0
- package/esm2022/object-summary/yuuvis-client-framework-object-summary.mjs +5 -0
- package/esm2022/pagination/index.mjs +3 -0
- package/esm2022/pagination/lib/pagination.component.mjs +48 -0
- package/esm2022/pagination/lib/pagination.interface.mjs +2 -0
- package/esm2022/pagination/yuuvis-client-framework-pagination.mjs +5 -0
- package/esm2022/panel/index.mjs +2 -0
- package/esm2022/panel/lib/panel.component.mjs +20 -0
- package/esm2022/panel/yuuvis-client-framework-panel.mjs +5 -0
- package/esm2022/renderer/index.mjs +11 -0
- package/esm2022/renderer/lib/property-renderer/abstract.renderer.mjs +29 -0
- package/esm2022/renderer/lib/property-renderer/datetime.renderer.mjs +13 -0
- package/esm2022/renderer/lib/property-renderer/decimal.renderer.component.mjs +12 -0
- package/esm2022/renderer/lib/property-renderer/filesize.renderer.component.mjs +28 -0
- package/esm2022/renderer/lib/property-renderer/icon.renderer.component.mjs +23 -0
- package/esm2022/renderer/lib/property-renderer/integer.renderer.component.mjs +12 -0
- package/esm2022/renderer/lib/property-renderer/organization.renderer.mjs +19 -0
- package/esm2022/renderer/lib/property-renderer/string.renderer.component.mjs +12 -0
- package/esm2022/renderer/lib/property-renderer/unknown.renderer.mjs +12 -0
- package/esm2022/renderer/lib/renderer.directive.mjs +51 -0
- package/esm2022/renderer/lib/services/renderer/renderer.interface.mjs +2 -0
- package/esm2022/renderer/lib/services/renderer/renderer.service.mjs +84 -0
- package/esm2022/renderer/yuuvis-client-framework-renderer.mjs +5 -0
- package/esm2022/sequence-list/index.mjs +6 -0
- package/esm2022/sequence-list/lib/due-date-picker/due-date-picker.component.mjs +99 -0
- package/esm2022/sequence-list/lib/sequence-list-template-manage/sequence-list-template-manage.component.mjs +183 -0
- package/esm2022/sequence-list/lib/sequence-list-templates/sequence-list-templates.component.mjs +114 -0
- package/esm2022/sequence-list/lib/sequence-list.component.mjs +146 -0
- package/esm2022/sequence-list/lib/sequence-list.interface.mjs +2 -0
- package/esm2022/sequence-list/yuuvis-client-framework-sequence-list.mjs +5 -0
- package/esm2022/simple-search/index.mjs +3 -0
- package/esm2022/simple-search/lib/simple-search/simple-search.component.mjs +111 -0
- package/esm2022/simple-search/lib/simple-search/simple-search.interface.mjs +2 -0
- package/esm2022/simple-search/yuuvis-client-framework-simple-search.mjs +5 -0
- package/esm2022/tile-list/index.mjs +11 -0
- package/esm2022/tile-list/lib/tile/tile.component.mjs +53 -0
- package/esm2022/tile-list/lib/tile-config/action-select/action-select.component.mjs +22 -0
- package/esm2022/tile-list/lib/tile-config/icon-select/icon-select.component.mjs +33 -0
- package/esm2022/tile-list/lib/tile-config/property-select/property-select.component.mjs +91 -0
- package/esm2022/tile-list/lib/tile-config/tile-config-tile/tile-config-tile.component.mjs +66 -0
- package/esm2022/tile-list/lib/tile-config/tile-config-trigger/tile-config-trigger.component.mjs +46 -0
- package/esm2022/tile-list/lib/tile-config/tile-config.component.mjs +156 -0
- package/esm2022/tile-list/lib/tile-extension/directive/tile-extension.directive.mjs +37 -0
- package/esm2022/tile-list/lib/tile-extension/extensions/email.extension.mjs +42 -0
- package/esm2022/tile-list/lib/tile-extension/tile-extension.service.mjs +35 -0
- package/esm2022/tile-list/lib/tile-list/tile-list.component.mjs +510 -0
- package/esm2022/tile-list/lib/tile-list/tile-list.interface.mjs +2 -0
- package/esm2022/tile-list/yuuvis-client-framework-tile-list.mjs +5 -0
- package/esm2022/token-search/index.mjs +3 -0
- package/esm2022/token-search/token-search.component.mjs +78 -0
- package/esm2022/token-search/token-search.interface.mjs +2 -0
- package/esm2022/token-search/yuuvis-client-framework-token-search.mjs +5 -0
- package/esm2022/tree/index.mjs +3 -0
- package/esm2022/tree/lib/tree-node/tree-node.component.mjs +65 -0
- package/esm2022/tree/lib/tree.component.mjs +148 -0
- package/esm2022/tree/lib/tree.interface.mjs +2 -0
- package/esm2022/tree/lib/tree.service.mjs +95 -0
- package/esm2022/tree/yuuvis-client-framework-tree.mjs +5 -0
- package/esm2022/upload-progress/index.mjs +2 -0
- package/esm2022/upload-progress/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.mjs +49 -0
- package/esm2022/upload-progress/lib/upload-progress/upload-progress.component.mjs +37 -0
- package/esm2022/upload-progress/yuuvis-client-framework-upload-progress.mjs +5 -0
- package/esm2022/user-avatar/index.mjs +3 -0
- package/esm2022/user-avatar/lib/user-avatar.component.mjs +69 -0
- package/esm2022/user-avatar/lib/user-avatar.module.mjs +24 -0
- package/esm2022/user-avatar/yuuvis-client-framework-user-avatar.mjs +5 -0
- package/esm2022/yuuvis-client-framework.mjs +5 -0
- package/fesm2022/yuuvis-client-framework-actions.mjs +333 -0
- package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-app-bar.mjs +96 -0
- package/fesm2022/yuuvis-client-framework-app-bar.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-clipboard.mjs +55 -0
- package/fesm2022/yuuvis-client-framework-clipboard.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-common.mjs +1020 -0
- package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-forms.mjs +1355 -0
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-icons.mjs +123 -0
- package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-list.mjs +209 -0
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +302 -0
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-object-details.mjs +583 -0
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs +200 -0
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-object-form.mjs +1664 -0
- package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-object-preview.mjs +213 -0
- package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-object-summary.mjs +397 -0
- package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-pagination.mjs +55 -0
- package/fesm2022/yuuvis-client-framework-pagination.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-panel.mjs +27 -0
- package/fesm2022/yuuvis-client-framework-panel.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-renderer.mjs +262 -0
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs +519 -0
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-simple-search.mjs +118 -0
- package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +1036 -0
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-token-search.mjs +85 -0
- package/fesm2022/yuuvis-client-framework-token-search.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-tree.mjs +307 -0
- package/fesm2022/yuuvis-client-framework-tree.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs +84 -0
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-user-avatar.mjs +96 -0
- package/fesm2022/yuuvis-client-framework-user-avatar.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework.mjs +22 -0
- package/fesm2022/yuuvis-client-framework.mjs.map +1 -0
- package/forms/README.md +3 -0
- package/forms/index.d.ts +9 -0
- package/forms/lib/elements/catalog/catalog.component.d.ts +68 -0
- package/forms/lib/elements/datetime/datetime.component.d.ts +32 -0
- package/forms/lib/elements/datetime-range/datetime-range.component.d.ts +51 -0
- package/forms/lib/elements/number/number.component.d.ts +77 -0
- package/forms/lib/elements/number-range/number-range.component.d.ts +66 -0
- package/forms/lib/elements/organization/organization.component.d.ts +93 -0
- package/forms/lib/elements/string/string.component.d.ts +104 -0
- package/forms/lib/form-input/form-input.component.d.ts +48 -0
- package/forms/lib/forms.module.d.ts +16 -0
- package/icons/README.md +5 -0
- package/icons/index.d.ts +3 -0
- package/icons/lib/icon.service.d.ts +38 -0
- package/icons/lib/icons.d.ts +1 -0
- package/icons/lib/object-type-icon/object-type-icon.component.d.ts +11 -0
- package/index.d.ts +1 -0
- package/lib/yuuvis-client-framework.module.d.ts +7 -0
- package/list/README.md +3 -0
- package/list/index.d.ts +2 -0
- package/list/lib/list-item.directive.d.ts +15 -0
- package/list/lib/list.component.d.ts +36 -0
- package/metadata-form/README.md +21 -0
- package/metadata-form/index.d.ts +3 -0
- package/metadata-form/lib/metadata-default-templates/metadata-default-templates.component.d.ts +5 -0
- package/metadata-form/lib/metadata-form-element-registry.service.d.ts +47 -0
- package/metadata-form/lib/metadata-form-field/metadata-form-field.component.d.ts +31 -0
- package/metadata-form/lib/object-metadata-element-template.directive.d.ts +27 -0
- package/object-details/README.md +28 -0
- package/object-details/index.d.ts +6 -0
- package/object-details/lib/object-audit/object-audit.component.d.ts +59 -0
- package/object-details/lib/object-details-shell/object-details-shell.component.d.ts +51 -0
- package/object-details/lib/object-details.component.d.ts +36 -0
- package/object-details/lib/object-metadata/form-section-group.pipe.d.ts +8 -0
- package/object-details/lib/object-metadata/object-metadata.component.d.ts +48 -0
- package/object-details/lib/object-metadata/object-metadata.interface.d.ts +26 -0
- package/object-flavor/README.md +3 -0
- package/object-flavor/index.d.ts +5 -0
- package/object-flavor/lib/abstract-apply-create-flavor/abstract-apply-create-flavor.component.d.ts +12 -0
- package/object-flavor/lib/abstract-apply-object-flavor/abstract-apply-object-flavor.component.d.ts +12 -0
- package/object-flavor/lib/flavor-chip/flavor-chip.component.d.ts +17 -0
- package/object-flavor/lib/object-flavor/object-flavor.component.d.ts +26 -0
- package/object-flavor/lib/object-flavor-picker/object-flavor-picker.component.d.ts +10 -0
- package/object-form/README.md +3 -0
- package/object-form/index.d.ts +4 -0
- package/object-form/lib/form-scripting.api.interface.d.ts +131 -0
- package/object-form/lib/form-scripting.service.d.ts +30 -0
- package/object-form/lib/object-form-element/object-form-element.component.d.ts +22 -0
- package/object-form/lib/object-form-extension.interface.d.ts +22 -0
- package/object-form/lib/object-form-group/object-form-group.component.d.ts +22 -0
- package/object-form/lib/object-form-script/form-scripting-element-extension/form-scripting-element-extension.component.d.ts +10 -0
- package/object-form/lib/object-form-script/object-form-script.service.d.ts +45 -0
- package/object-form/lib/object-form-script/object-form-scripting-scope.d.ts +50 -0
- package/object-form/lib/object-form-translate.service.d.ts +15 -0
- package/object-form/lib/object-form.component.d.ts +60 -0
- package/object-form/lib/object-form.interface.d.ts +113 -0
- package/object-form/lib/object-form.model.d.ts +18 -0
- package/object-form/lib/object-form.service.d.ts +39 -0
- package/object-form/lib/object-form.utils.d.ts +20 -0
- package/object-form/lib/object-form.validation.d.ts +21 -0
- package/object-preview/README.md +3 -0
- package/object-preview/index.d.ts +2 -0
- package/object-preview/lib/components/index.d.ts +2 -0
- package/object-preview/lib/components/object-email-preview/object-email-preview.component.d.ts +16 -0
- package/object-preview/lib/components/object-preview/object-preview.component.d.ts +13 -0
- package/object-preview/lib/services/object-preview.service.d.ts +37 -0
- package/object-summary/README.md +3 -0
- package/object-summary/index.d.ts +4 -0
- package/object-summary/lib/multi-object-summary/multi-object-summary.component.d.ts +7 -0
- package/object-summary/lib/object-summary/object-summary.component.d.ts +73 -0
- package/object-summary/lib/object-summary-data/object-summary-data.component.d.ts +11 -0
- package/object-summary/lib/object-summary.module.d.ts +7 -0
- package/package.json +173 -0
- package/pagination/README.md +3 -0
- package/pagination/index.d.ts +2 -0
- package/pagination/lib/pagination.component.d.ts +18 -0
- package/pagination/lib/pagination.interface.d.ts +5 -0
- package/panel/README.md +3 -0
- package/panel/index.d.ts +1 -0
- package/panel/lib/panel.component.d.ts +12 -0
- package/renderer/README.md +5 -0
- package/renderer/index.d.ts +10 -0
- package/renderer/lib/property-renderer/abstract.renderer.d.ts +14 -0
- package/renderer/lib/property-renderer/datetime.renderer.d.ts +6 -0
- package/renderer/lib/property-renderer/decimal.renderer.component.d.ts +6 -0
- package/renderer/lib/property-renderer/filesize.renderer.component.d.ts +7 -0
- package/renderer/lib/property-renderer/icon.renderer.component.d.ts +6 -0
- package/renderer/lib/property-renderer/integer.renderer.component.d.ts +6 -0
- package/renderer/lib/property-renderer/organization.renderer.d.ts +7 -0
- package/renderer/lib/property-renderer/string.renderer.component.d.ts +6 -0
- package/renderer/lib/property-renderer/unknown.renderer.d.ts +6 -0
- package/renderer/lib/renderer.directive.d.ts +17 -0
- package/renderer/lib/services/renderer/renderer.interface.d.ts +8 -0
- package/renderer/lib/services/renderer/renderer.service.d.ts +35 -0
- package/sequence-list/README.md +3 -0
- package/sequence-list/index.d.ts +5 -0
- package/sequence-list/lib/due-date-picker/due-date-picker.component.d.ts +28 -0
- package/sequence-list/lib/sequence-list-template-manage/sequence-list-template-manage.component.d.ts +52 -0
- package/sequence-list/lib/sequence-list-templates/sequence-list-templates.component.d.ts +36 -0
- package/sequence-list/lib/sequence-list.component.d.ts +43 -0
- package/sequence-list/lib/sequence-list.interface.d.ts +16 -0
- package/simple-search/README.md +3 -0
- package/simple-search/index.d.ts +2 -0
- package/simple-search/lib/simple-search/simple-search.component.d.ts +55 -0
- package/simple-search/lib/simple-search/simple-search.interface.d.ts +4 -0
- package/styles/client-framework.scss +27 -0
- package/tile-list/README.md +3 -0
- package/tile-list/index.d.ts +10 -0
- package/tile-list/lib/tile/tile.component.d.ts +22 -0
- package/tile-list/lib/tile-config/action-select/action-select.component.d.ts +13 -0
- package/tile-list/lib/tile-config/icon-select/icon-select.component.d.ts +11 -0
- package/tile-list/lib/tile-config/property-select/property-select.component.d.ts +25 -0
- package/tile-list/lib/tile-config/tile-config-tile/tile-config-tile.component.d.ts +20 -0
- package/tile-list/lib/tile-config/tile-config-trigger/tile-config-trigger.component.d.ts +17 -0
- package/tile-list/lib/tile-config/tile-config.component.d.ts +47 -0
- package/tile-list/lib/tile-extension/directive/tile-extension.directive.d.ts +11 -0
- package/tile-list/lib/tile-extension/extensions/email.extension.d.ts +10 -0
- package/tile-list/lib/tile-extension/tile-extension.service.d.ts +16 -0
- package/tile-list/lib/tile-list/tile-list.component.d.ts +116 -0
- package/tile-list/lib/tile-list/tile-list.interface.d.ts +18 -0
- package/token-search/README.md +3 -0
- package/token-search/index.d.ts +2 -0
- package/token-search/token-search.component.d.ts +22 -0
- package/token-search/token-search.interface.d.ts +4 -0
- package/tree/README.md +3 -0
- package/tree/index.d.ts +2 -0
- package/tree/lib/tree-node/tree-node.component.d.ts +21 -0
- package/tree/lib/tree.component.d.ts +53 -0
- package/tree/lib/tree.interface.d.ts +11 -0
- package/tree/lib/tree.service.d.ts +35 -0
- package/upload-progress/README.md +3 -0
- package/upload-progress/index.d.ts +1 -0
- package/upload-progress/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.d.ts +17 -0
- package/upload-progress/lib/upload-progress/upload-progress.component.d.ts +16 -0
- package/user-avatar/README.md +3 -0
- package/user-avatar/index.d.ts +2 -0
- package/user-avatar/lib/user-avatar.component.d.ts +44 -0
- package/user-avatar/lib/user-avatar.module.d.ts +8 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, HostBinding, inject, output } from '@angular/core';
|
|
3
|
+
import { TranslateModule, UploadService } from '@yuuvis/client-core';
|
|
4
|
+
import { YUV_ICONS } from '@yuuvis/client-framework/icons';
|
|
5
|
+
import { ICONS, YvcIconModule } from '@yuuvis/components/icon';
|
|
6
|
+
import { UploadProgressOverlayComponent } from './upload-progress-overlay/upload-progress-overlay.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/common";
|
|
9
|
+
import * as i2 from "@yuuvis/components/icon";
|
|
10
|
+
import * as i3 from "@yuuvis/client-core";
|
|
11
|
+
export class UploadProgressComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.#uploadService = inject(UploadService);
|
|
14
|
+
this.progressStatus$ = this.#uploadService.status$;
|
|
15
|
+
this.completedUp$ = this.#uploadService.uploadStatus$;
|
|
16
|
+
this.icons = {
|
|
17
|
+
toggle: YUV_ICONS.arrowDown,
|
|
18
|
+
close: ICONS.clear
|
|
19
|
+
};
|
|
20
|
+
this.expanded = true;
|
|
21
|
+
this.resultItemClick = output();
|
|
22
|
+
}
|
|
23
|
+
#uploadService;
|
|
24
|
+
close() {
|
|
25
|
+
this.#uploadService.cancelItem();
|
|
26
|
+
}
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UploadProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: UploadProgressComponent, isStandalone: true, selector: "yuv-upload-progress", outputs: { resultItemClick: "resultItemClick" }, host: { properties: { "class.expanded": "this.expanded" } }, ngImport: i0, template: "@let ps = progressStatus$ | async;\n@if (ps && ps.items.length) {\n @let completed = completedUp$ | async;\n\n <div class=\"upload-progress\">\n <header>\n <h4>\n @if (!completed) {\n {{ 'yuv.upload-progress.header.uploading' | translate: { count: ps.items.length } }}\n } @else {\n {{ 'yuv.upload-progress.header.uploaded' | translate: { count: ps.items.length } }}\n }\n </h4>\n <button (click)=\"expanded = !expanded\"><yvc-icon class=\"toggle\" [svg]=\"icons.toggle\"></yvc-icon></button>\n <button (click)=\"close()\"><yvc-icon [svg]=\"icons.close\"></yvc-icon></button>\n </header>\n @if (expanded) {\n <yuv-upload-progress-overlay [items]=\"ps.items\" (itemClick)=\"resultItemClick.emit($event)\"></yuv-upload-progress-overlay>\n }\n </div>\n}\n", styles: [":host{--upload-progress-background-header: var(--panel-background-grey);--upload-progress-background-main: var(--panel-background);--upload-progress-border-color: var(--panel-background);--upload-progress-outline: 4px solid rgb(from var(--panel-divider-color) r g b / .9);--upload-progress-border-radius: calc(var(--app-pane-padding) / 4);position:absolute;inset-block-end:var(--app-pane-padding);inset-inline-end:var(--app-pane-padding);z-index:1000}:host .upload-progress{display:flex;flex-flow:column;background-color:var(--upload-progress-background-main);border:1px solid var(--upload-progress-border-color);border-radius:var(--upload-progress-border-radius);outline:var(--upload-progress-outline);min-width:250px;max-height:30vh;overflow:hidden;animation:appear .3s ease-in-out}:host .toggle{rotate:180deg}:host.expanded .toggle{rotate:0deg}:host header{display:flex;align-items:center;gap:calc(var(--app-pane-padding) / 4);background-color:var(--upload-progress-background-header);padding:calc(var(--app-pane-padding) / 4)}:host header h4{margin:0;padding:0 calc(var(--app-pane-padding) / 2);flex:1}:host header button{padding:0;border-radius:4px;--icon-size: 18px}:host yuv-upload-progress-overlay{overflow-y:auto}@keyframes appear{0%{opacity:0;transform:translateY(var(--app-pane-padding))}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i2.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: UploadProgressOverlayComponent, selector: "yuv-upload-progress-overlay", inputs: ["items"], outputs: ["itemClick"] }] }); }
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UploadProgressComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'yuv-upload-progress', standalone: true, imports: [CommonModule, YvcIconModule, TranslateModule, UploadProgressOverlayComponent], template: "@let ps = progressStatus$ | async;\n@if (ps && ps.items.length) {\n @let completed = completedUp$ | async;\n\n <div class=\"upload-progress\">\n <header>\n <h4>\n @if (!completed) {\n {{ 'yuv.upload-progress.header.uploading' | translate: { count: ps.items.length } }}\n } @else {\n {{ 'yuv.upload-progress.header.uploaded' | translate: { count: ps.items.length } }}\n }\n </h4>\n <button (click)=\"expanded = !expanded\"><yvc-icon class=\"toggle\" [svg]=\"icons.toggle\"></yvc-icon></button>\n <button (click)=\"close()\"><yvc-icon [svg]=\"icons.close\"></yvc-icon></button>\n </header>\n @if (expanded) {\n <yuv-upload-progress-overlay [items]=\"ps.items\" (itemClick)=\"resultItemClick.emit($event)\"></yuv-upload-progress-overlay>\n }\n </div>\n}\n", styles: [":host{--upload-progress-background-header: var(--panel-background-grey);--upload-progress-background-main: var(--panel-background);--upload-progress-border-color: var(--panel-background);--upload-progress-outline: 4px solid rgb(from var(--panel-divider-color) r g b / .9);--upload-progress-border-radius: calc(var(--app-pane-padding) / 4);position:absolute;inset-block-end:var(--app-pane-padding);inset-inline-end:var(--app-pane-padding);z-index:1000}:host .upload-progress{display:flex;flex-flow:column;background-color:var(--upload-progress-background-main);border:1px solid var(--upload-progress-border-color);border-radius:var(--upload-progress-border-radius);outline:var(--upload-progress-outline);min-width:250px;max-height:30vh;overflow:hidden;animation:appear .3s ease-in-out}:host .toggle{rotate:180deg}:host.expanded .toggle{rotate:0deg}:host header{display:flex;align-items:center;gap:calc(var(--app-pane-padding) / 4);background-color:var(--upload-progress-background-header);padding:calc(var(--app-pane-padding) / 4)}:host header h4{margin:0;padding:0 calc(var(--app-pane-padding) / 2);flex:1}:host header button{padding:0;border-radius:4px;--icon-size: 18px}:host yuv-upload-progress-overlay{overflow-y:auto}@keyframes appear{0%{opacity:0;transform:translateY(var(--app-pane-padding))}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
33
|
+
}], propDecorators: { expanded: [{
|
|
34
|
+
type: HostBinding,
|
|
35
|
+
args: ['class.expanded']
|
|
36
|
+
}] } });
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLXByb2dyZXNzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMveXV1dmlzL2NsaWVudC1mcmFtZXdvcmsvdXBsb2FkLXByb2dyZXNzL3NyYy9saWIvdXBsb2FkLXByb2dyZXNzL3VwbG9hZC1wcm9ncmVzcy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3l1dXZpcy9jbGllbnQtZnJhbWV3b3JrL3VwbG9hZC1wcm9ncmVzcy9zcmMvbGliL3VwbG9hZC1wcm9ncmVzcy91cGxvYWQtcHJvZ3Jlc3MuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSx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HNlIHtcbiAgICAgICAgICB7eyAneXV2LnVwbG9hZC1wcm9ncmVzcy5oZWFkZXIudXBsb2FkZWQnIHwgdHJhbnNsYXRlOiB7IGNvdW50OiBwcy5pdGVtcy5sZW5ndGggfSB9fVxuICAgICAgICB9XG4gICAgICA8L2g0PlxuICAgICAgPGJ1dHRvbiAoY2xpY2spPVwiZXhwYW5kZWQgPSAhZXhwYW5kZWRcIj48eXZjLWljb24gY2xhc3M9XCJ0b2dnbGVcIiBbc3ZnXT1cImljb25zLnRvZ2dsZVwiPjwveXZjLWljb24+PC9idXR0b24+XG4gICAgICA8YnV0dG9uIChjbGljayk9XCJjbG9zZSgpXCI+PHl2Yy1pY29uIFtzdmddPVwiaWNvbnMuY2xvc2VcIj48L3l2Yy1pY29uPjwvYnV0dG9uPlxuICAgIDwvaGVhZGVyPlxuICAgIEBpZiAoZXhwYW5kZWQpIHtcbiAgICAgIDx5dXYtdXBsb2FkLXByb2dyZXNzLW92ZXJsYXkgW2l0ZW1zXT1cInBzLml0ZW1zXCIgKGl0ZW1DbGljayk9XCJyZXN1bHRJdGVtQ2xpY2suZW1pdCgkZXZlbnQpXCI+PC95dXYtdXBsb2FkLXByb2dyZXNzLW92ZXJsYXk+XG4gICAgfVxuICA8L2Rpdj5cbn1cbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieXV1dmlzLWNsaWVudC1mcmFtZXdvcmstdXBsb2FkLXByb2dyZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy95dXV2aXMvY2xpZW50LWZyYW1ld29yay91cGxvYWQtcHJvZ3Jlc3Mvc3JjL3l1dXZpcy1jbGllbnQtZnJhbWV3b3JrLXVwbG9hZC1wcm9ncmVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './lib/user-avatar.component';
|
|
2
|
+
export * from './lib/user-avatar.module';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3l1dXZpcy9jbGllbnQtZnJhbWV3b3JrL3VzZXItYXZhdGFyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsMEJBQTBCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi91c2VyLWF2YXRhci5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdXNlci1hdmF0YXIubW9kdWxlJztcbiJdfQ==
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Component, ElementRef, HostBinding, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/platform-browser";
|
|
5
|
+
/**
|
|
6
|
+
* Component rendering a users avatar. If there is no avatar image availbale, the
|
|
7
|
+
* component will render the initials of the user, but only if we can fetch a first-
|
|
8
|
+
* and lastname. Otherwise there will be a fallback image.
|
|
9
|
+
*
|
|
10
|
+
* [Screenshot](../assets/images/yuv-user-avatar.gif)
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export class UserAvatarComponent {
|
|
16
|
+
/**
|
|
17
|
+
* The user to display the avatar image for.
|
|
18
|
+
*/
|
|
19
|
+
set user(u) {
|
|
20
|
+
if (!!u && !this.currentUserId || u?.id !== this.currentUserId) {
|
|
21
|
+
this.getUserImage(u);
|
|
22
|
+
}
|
|
23
|
+
this.currentUserId = u?.id;
|
|
24
|
+
}
|
|
25
|
+
constructor(sanitizer, elRef, renderer) {
|
|
26
|
+
this.sanitizer = sanitizer;
|
|
27
|
+
this.elRef = elRef;
|
|
28
|
+
this.renderer = renderer;
|
|
29
|
+
this.defaultUserImage = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="rgba(0,0,0,.2)"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>';
|
|
30
|
+
this.img = null;
|
|
31
|
+
this.setDefaulUserImage();
|
|
32
|
+
}
|
|
33
|
+
getUserImage(user) {
|
|
34
|
+
if (user && user.image) {
|
|
35
|
+
this.img = this.sanitizer.bypassSecurityTrustStyle(`url('${user.image}')`);
|
|
36
|
+
}
|
|
37
|
+
else if (user && !user.image && user.firstname && user.lastname) {
|
|
38
|
+
this.img = null;
|
|
39
|
+
this.elRef.nativeElement.classList.add('initials');
|
|
40
|
+
const initials = document.createElement('div');
|
|
41
|
+
// scale initials font-size based on the containers size
|
|
42
|
+
const rect = this.elRef.nativeElement.getBoundingClientRect();
|
|
43
|
+
// when rendered invisible the width will be 0px
|
|
44
|
+
if (rect.width > 0) {
|
|
45
|
+
initials.style.fontSize = `${rect.width * 0.5}px`;
|
|
46
|
+
}
|
|
47
|
+
initials.innerText = `${user.firstname.substr(0, 1)}${user.lastname.substr(0, 1)}`;
|
|
48
|
+
this.renderer.appendChild(this.elRef.nativeElement, initials);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.setDefaulUserImage();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
setDefaulUserImage() {
|
|
55
|
+
this.img = this.sanitizer.bypassSecurityTrustStyle(`url('${this.defaultUserImage}')`);
|
|
56
|
+
}
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAvatarComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserAvatarComponent, selector: "yuv-user-avatar", inputs: { user: "user" }, host: { properties: { "style.backgroundImage": "this.img" }, classAttribute: "yuv-user-avatar" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:flex;flex-flow:column;align-items:center;justify-content:center;height:100%;box-sizing:border-box;background-repeat:no-repeat;background-size:cover;background-position:center center}:host.initials{background-color:var(--color-accent);color:var(--color-accent-tone)}:host.initials>div{font-weight:var(--font-weight-bold);opacity:.8}\n"] }); }
|
|
59
|
+
}
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAvatarComponent, decorators: [{
|
|
61
|
+
type: Component,
|
|
62
|
+
args: [{ selector: 'yuv-user-avatar', template: '', host: { class: 'yuv-user-avatar' }, styles: [":host{display:flex;flex-flow:column;align-items:center;justify-content:center;height:100%;box-sizing:border-box;background-repeat:no-repeat;background-size:cover;background-position:center center}:host.initials{background-color:var(--color-accent);color:var(--color-accent-tone)}:host.initials>div{font-weight:var(--font-weight-bold);opacity:.8}\n"] }]
|
|
63
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { user: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], img: [{
|
|
66
|
+
type: HostBinding,
|
|
67
|
+
args: ['style.backgroundImage']
|
|
68
|
+
}] } });
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1hdmF0YXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy95dXV2aXMvY2xpZW50LWZyYW1ld29yay91c2VyLWF2YXRhci9zcmMvbGliL3VzZXItYXZhdGFyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRixPQUFPLEVBQUUsWUFBWSxFQUFhLE1BQU0sMkJBQTJCLENBQUM7OztBQW1CcEU7Ozs7Ozs7OztHQVNHO0FBT0gsTUFBTSxPQUFPLG1CQUFtQjtJQUs5Qjs7T0FFRztJQUNILElBQ0ksSUFBSSxDQUFDLENBQXNCO1FBQzdCLElBQUksQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxhQUFhLElBQUksQ0FBQyxFQUFFLEVBQUUsS0FBSyxJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7WUFDL0QsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFFLENBQUMsQ0FBQztRQUN4QixDQUFDO1FBQ0QsSUFBSSxDQUFDLGFBQWEsR0FBRyxDQUFDLEVBQUUsRUFBRSxDQUFDO0lBQzdCLENBQUM7SUFHRCxZQUFvQixTQUF1QixFQUFVLEtBQWlCLEVBQVUsUUFBbUI7UUFBL0UsY0FBUyxHQUFULFNBQVMsQ0FBYztRQUFVLFVBQUssR0FBTC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udCwgaW5pdGlhbHMpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLnNldERlZmF1bFVzZXJJbWFnZSgpO1xuICAgIH1cbiAgfVxuXG4gIHByaXZhdGUgc2V0RGVmYXVsVXNlckltYWdlKCkge1xuICAgIHRoaXMuaW1nID0gdGhpcy5zYW5pdGl6ZXIuYnlwYXNzU2VjdXJpdHlUcnVzdFN0eWxlKGB1cmwoJyR7dGhpcy5kZWZhdWx0VXNlckltYWdlfScpYCk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { UserAvatarComponent } from './user-avatar.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class YuvUserAvatarModule {
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: YuvUserAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: YuvUserAvatarModule, declarations: [UserAvatarComponent], imports: [CommonModule], exports: [UserAvatarComponent] }); }
|
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: YuvUserAvatarModule, imports: [CommonModule] }); }
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: YuvUserAvatarModule, decorators: [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
declarations: [
|
|
14
|
+
UserAvatarComponent
|
|
15
|
+
],
|
|
16
|
+
imports: [
|
|
17
|
+
CommonModule
|
|
18
|
+
],
|
|
19
|
+
exports: [
|
|
20
|
+
UserAvatarComponent
|
|
21
|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vbmVudCc7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW1xuICAgIFVzZXJBdmF0YXJDb21wb25lbnRcbiAgXSxcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZVxuICBdLFxuICBleHBvcnRzOiBbXG4gICAgVXNlckF2YXRhckNvbXBvbmVudFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIFl1dlVzZXJBdmF0YXJNb2R1bGUgeyB9XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieXV1dmlzLWNsaWVudC1mcmFtZXdvcmstdXNlci1hdmF0YXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3l1dXZpcy9jbGllbnQtZnJhbWV3b3JrL3VzZXItYXZhdGFyL3NyYy95dXV2aXMtY2xpZW50LWZyYW1ld29yay11c2VyLWF2YXRhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieXV1dmlzLWNsaWVudC1mcmFtZXdvcmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL3l1dXZpcy9jbGllbnQtZnJhbWV3b3JrL3NyYy95dXV2aXMtY2xpZW50LWZyYW1ld29yay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgModule, inject, Component, Injector, runInInjectionContext, Injectable } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@ngx-translate/core';
|
|
6
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
7
|
+
import { DmsService, TranslateService, TranslateModule as TranslateModule$1, RetentionField, ClipboardService, Utils } from '@yuuvis/client-core';
|
|
8
|
+
import { of, map, forkJoin } from 'rxjs';
|
|
9
|
+
import { YvcOverlayRef, YvcOverlayService } from '@yuuvis/components/overlay';
|
|
10
|
+
import * as i2$1 from '@angular/cdk/a11y';
|
|
11
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
12
|
+
import { ListComponent, ListItemDirective } from '@yuuvis/client-framework/list';
|
|
13
|
+
import * as i1$1 from '@yuuvis/components/icon';
|
|
14
|
+
import { YvcIconModule } from '@yuuvis/components/icon';
|
|
15
|
+
|
|
16
|
+
class ActionsModule {
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
18
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ActionsModule, imports: [CommonModule, TranslateModule] }); }
|
|
19
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsModule, imports: [CommonModule, TranslateModule] }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsModule, decorators: [{
|
|
22
|
+
type: NgModule,
|
|
23
|
+
args: [{
|
|
24
|
+
imports: [CommonModule, TranslateModule]
|
|
25
|
+
}]
|
|
26
|
+
}] });
|
|
27
|
+
|
|
28
|
+
const ACTION_ICON = {
|
|
29
|
+
download: '<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#e8eaed"><path d="M480-336 288-528l51-51 105 105v-342h72v342l105-105 51 51-192 192ZM263.72-192Q234-192 213-213.15T192-264v-72h72v72h432v-72h72v72q0 29.7-21.16 50.85Q725.68-192 695.96-192H263.72Z"/></svg>',
|
|
30
|
+
delete: '<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#e8eaed"><path d="M312-144q-29.7 0-50.85-21.15Q240-186.3 240-216v-480h-48v-72h192v-48h192v48h192v72h-48v479.57Q720-186 698.85-165T648-144H312Zm336-552H312v480h336v-480ZM384-288h72v-336h-72v336Zm120 0h72v-336h-72v336ZM312-696v480-480Z"/></svg>',
|
|
31
|
+
copy: '<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#e8eaed"><path d="M360-240q-29.7 0-50.85-21.15Q288-282.3 288-312v-480q0-29.7 21.15-50.85Q330.3-864 360-864h384q29.7 0 50.85 21.15Q816-821.7 816-792v480q0 29.7-21.15 50.85Q773.7-240 744-240H360Zm0-72h384v-480H360v480ZM216-96q-29.7 0-50.85-21.15Q144-138.3 144-168v-552h72v552h456v72H216Zm144-216v-480 480Z"/></svg>',
|
|
32
|
+
cut: '<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#e8eaed"><path d="M744-144 480-407l-87 88q8 16 11.5 32.85 3.5 16.86 3.5 33.71 0 65.44-45 110.94T252-96q-64.35 0-110.18-45.5Q96-187 96-252t45.5-110.5Q187-408 252.44-408q16.85 0 33.71 4Q303-400 319-392l88-87-88-88q-16 8-32.85 11.5-16.86 3.5-33.71 3.5-65.44 0-110.94-45.5T96-708q0-65 45.5-110.5T252-864q65 0 110.5 45.5T408-707.56q0 16.85-3.5 33.71Q401-657 393-641l471 469v28H744ZM595-520l-74-74 223-222h120v28L595-520ZM252.25-624q34.75 0 59.25-24.75t24.5-59.5q0-34.75-24.75-59.25t-59.5-24.5q-34.75 0-59.25 24.75t-24.5 59.5q0 34.75 24.75 59.25t59.5 24.5ZM480-456q9.6 0 16.8-7.2 7.2-7.2 7.2-16.8 0-9.6-7.2-16.8-7.2-7.2-16.8-7.2-9.6 0-16.8 7.2-7.2 7.2-7.2 16.8 0 9.6 7.2 16.8 7.2 7.2 16.8 7.2ZM252.25-168q34.75 0 59.25-24.75t24.5-59.5q0-34.75-24.75-59.25t-59.5-24.5q-34.75 0-59.25 24.75t-24.5 59.5q0 34.75 24.75 59.25t59.5 24.5Z"/></svg>',
|
|
33
|
+
manageFlavor: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="m489-460 91-55 91 55-24-104 80-69-105-9-42-98-42 98-105 9 80 69-24 104Zm19 260h224q-7 26-24 42t-44 20L228-85q-33 5-59.5-15.5T138-154L85-591q-4-33 16-59t53-30l46-6v80l-36 5 54 437 290-36Zm-148-80q-33 0-56.5-23.5T280-360v-440q0-33 23.5-56.5T360-880h440q33 0 56.5 23.5T880-800v440q0 33-23.5 56.5T800-280H360Zm0-80h440v-440H360v440Zm220-220ZM218-164Z"/></svg>'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
class AbstractContextAction {
|
|
37
|
+
constructor(context) {
|
|
38
|
+
this.context = context;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
var SelectionRange;
|
|
42
|
+
(function (SelectionRange) {
|
|
43
|
+
SelectionRange[SelectionRange["SINGLE_SELECT"] = 0] = "SINGLE_SELECT";
|
|
44
|
+
SelectionRange[SelectionRange["MULTI_SELECT"] = 1] = "MULTI_SELECT";
|
|
45
|
+
SelectionRange[SelectionRange["MULTI_SELECT_ONLY"] = 2] = "MULTI_SELECT_ONLY";
|
|
46
|
+
SelectionRange[SelectionRange["ANY"] = 3] = "ANY";
|
|
47
|
+
})(SelectionRange || (SelectionRange = {}));
|
|
48
|
+
const BASE_ACTION = {
|
|
49
|
+
copy: 'yuv.base.copy',
|
|
50
|
+
cut: 'yuv.base.cut',
|
|
51
|
+
download: 'yuv.base.download',
|
|
52
|
+
delete: 'yuv.base.delete'
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @ignore
|
|
57
|
+
*/
|
|
58
|
+
class DeleteComponent {
|
|
59
|
+
constructor() {
|
|
60
|
+
this.#dmsService = inject(DmsService);
|
|
61
|
+
this.#oref = inject(YvcOverlayRef);
|
|
62
|
+
this.translate = inject(TranslateService);
|
|
63
|
+
this.errors = [];
|
|
64
|
+
this.deleting = false;
|
|
65
|
+
this.deleteItems = this.#oref.data.items;
|
|
66
|
+
this.context = this.#oref.data.context;
|
|
67
|
+
}
|
|
68
|
+
#dmsService;
|
|
69
|
+
#oref;
|
|
70
|
+
run() {
|
|
71
|
+
this.errors = [];
|
|
72
|
+
if (this.deleteItems.length) {
|
|
73
|
+
this.deleting = true;
|
|
74
|
+
this.#dmsService
|
|
75
|
+
.deleteDmsObjects(this.deleteItems.map((o) => ({
|
|
76
|
+
id: o.id,
|
|
77
|
+
subject: o.data[this.context.subjectProperty || o.id]
|
|
78
|
+
})))
|
|
79
|
+
.subscribe({
|
|
80
|
+
next: (res) => {
|
|
81
|
+
this.errors = res
|
|
82
|
+
.filter((r) => !!r._error)
|
|
83
|
+
.map((r) => ({
|
|
84
|
+
status: r._error.status,
|
|
85
|
+
subject: this.context?.subjectProperty ? r.properties[this.context.subjectProperty].value : r.id,
|
|
86
|
+
message: this.#getErrorMessage(r._error)
|
|
87
|
+
}));
|
|
88
|
+
!this.errors.length && this.#oref.close();
|
|
89
|
+
},
|
|
90
|
+
complete: () => (this.deleting = false)
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
#getErrorMessage(error) {
|
|
95
|
+
switch (error.status) {
|
|
96
|
+
case 403:
|
|
97
|
+
return this.translate.instant('yuv.action-menu.action.delete.error.403');
|
|
98
|
+
case 404:
|
|
99
|
+
return this.translate.instant('yuv.action-menu.action.delete.error.404');
|
|
100
|
+
default:
|
|
101
|
+
return this.translate.instant('yuv.action-menu.action.delete.error.default');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
cancel() {
|
|
105
|
+
this.#oref.close();
|
|
106
|
+
}
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DeleteComponent, isStandalone: true, selector: "yuv-delete", ngImport: i0, template: "<div class=\"yuv-delete\" [ngClass]=\"{ deleting }\">\n <div class=\"yuv-loader-linear\"></div>\n\n @if (errors?.length) {\n <ul class=\"errors\">\n @for (e of errors; track $index) {\n <li class=\"error\">\n <span class=\"subject\">{{ e.subject }}</span>\n <span class=\"message\">{{ e.message }}</span>\n </li>\n }\n </ul>\n } @else {\n <p>{{ 'yuv.action-menu.action.delete.dms.object.confirm.message' | translate }}</p>\n }\n\n <div class=\"form-buttons\">\n <button [disabled]=\"deleting || errors?.length\" class=\"primary\" (click)=\"run()\">{{ 'yuv.action-menu.action.delete.dms.object.confirm.ok' | translate }}</button>\n <button [disabled]=\"deleting\" class=\"secondary\" (click)=\"cancel()\">{{ 'yuv.action-menu.action.delete.dms.object.confirm.cancel' | translate }}</button>\n </div>\n</div>\n", styles: [".yuv-delete{display:flex;flex-flow:column;justify-content:center;padding:var(--app-pane-padding);position:relative}.yuv-delete .yuv-loader-linear{position:absolute;inset-block-start:0;inset-inline-start:0;inset-inline-end:0}.yuv-delete:not(.deleting) .yuv-loader-linear{opacity:0}.yuv-delete p{margin:0}.yuv-delete ul.errors{list-style:none;margin:0;background-color:var(--color-error);color:#fff;padding:calc(var(--app-pane-padding) / 2);border-radius:.5rem;display:flex;flex-flow:column;gap:.5rem}.yuv-delete ul.errors .error{display:grid;grid-template-rows:auto auto;grid-template-columns:auto 1fr;grid-template-areas:\"icon subject\" \"icon message\";row-gap:.2em;column-gap:1em;align-items:center}.yuv-delete ul.errors .error .subject{grid-area:subject;font-weight:700}.yuv-delete ul.errors .error .message{grid-area:message;font-weight:400;font-style:italic;display:block}.yuv-delete ul.errors .error:before{align-self:start;font-weight:700;grid-area:icon;content:\"!\";outline:2px solid currentColor;border-radius:2px;width:1em;display:grid;place-items:center}.yuv-delete .form-buttons{display:flex;flex-flow:row-reverse;justify-content:flex-end;justify-content:end;gap:calc(var(--app-pane-padding) / 4);align-items:center;margin-block-start:calc(var(--app-pane-padding) * 1.5)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeleteComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ selector: 'yuv-delete', standalone: true, imports: [CommonModule, TranslateModule$1], template: "<div class=\"yuv-delete\" [ngClass]=\"{ deleting }\">\n <div class=\"yuv-loader-linear\"></div>\n\n @if (errors?.length) {\n <ul class=\"errors\">\n @for (e of errors; track $index) {\n <li class=\"error\">\n <span class=\"subject\">{{ e.subject }}</span>\n <span class=\"message\">{{ e.message }}</span>\n </li>\n }\n </ul>\n } @else {\n <p>{{ 'yuv.action-menu.action.delete.dms.object.confirm.message' | translate }}</p>\n }\n\n <div class=\"form-buttons\">\n <button [disabled]=\"deleting || errors?.length\" class=\"primary\" (click)=\"run()\">{{ 'yuv.action-menu.action.delete.dms.object.confirm.ok' | translate }}</button>\n <button [disabled]=\"deleting\" class=\"secondary\" (click)=\"cancel()\">{{ 'yuv.action-menu.action.delete.dms.object.confirm.cancel' | translate }}</button>\n </div>\n</div>\n", styles: [".yuv-delete{display:flex;flex-flow:column;justify-content:center;padding:var(--app-pane-padding);position:relative}.yuv-delete .yuv-loader-linear{position:absolute;inset-block-start:0;inset-inline-start:0;inset-inline-end:0}.yuv-delete:not(.deleting) .yuv-loader-linear{opacity:0}.yuv-delete p{margin:0}.yuv-delete ul.errors{list-style:none;margin:0;background-color:var(--color-error);color:#fff;padding:calc(var(--app-pane-padding) / 2);border-radius:.5rem;display:flex;flex-flow:column;gap:.5rem}.yuv-delete ul.errors .error{display:grid;grid-template-rows:auto auto;grid-template-columns:auto 1fr;grid-template-areas:\"icon subject\" \"icon message\";row-gap:.2em;column-gap:1em;align-items:center}.yuv-delete ul.errors .error .subject{grid-area:subject;font-weight:700}.yuv-delete ul.errors .error .message{grid-area:message;font-weight:400;font-style:italic;display:block}.yuv-delete ul.errors .error:before{align-self:start;font-weight:700;grid-area:icon;content:\"!\";outline:2px solid currentColor;border-radius:2px;width:1em;display:grid;place-items:center}.yuv-delete .form-buttons{display:flex;flex-flow:row-reverse;justify-content:flex-end;justify-content:end;gap:calc(var(--app-pane-padding) / 4);align-items:center;margin-block-start:calc(var(--app-pane-padding) * 1.5)}\n"] }]
|
|
113
|
+
}] });
|
|
114
|
+
|
|
115
|
+
class DeleteAction extends AbstractContextAction {
|
|
116
|
+
constructor() {
|
|
117
|
+
super(...arguments);
|
|
118
|
+
this.translate = inject(TranslateService);
|
|
119
|
+
this.overlay = inject(YvcOverlayService);
|
|
120
|
+
this.id = BASE_ACTION.delete;
|
|
121
|
+
this.label = this.translate.instant('yuv.action-menu.action.delete.dms.object.label');
|
|
122
|
+
this.description = this.translate.instant('yuv.action-menu.action.delete.dms.object.description');
|
|
123
|
+
this.priority = 8;
|
|
124
|
+
this.icon = ACTION_ICON.delete;
|
|
125
|
+
this.group = 'common';
|
|
126
|
+
this.range = SelectionRange.MULTI_SELECT;
|
|
127
|
+
this.supports = {
|
|
128
|
+
pattern: '*'
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
isExecutable(items) {
|
|
132
|
+
const e = items[0];
|
|
133
|
+
let isRetentionActive = false;
|
|
134
|
+
if (e && e.data[RetentionField.RETENTION_START] && e.data[RetentionField.RETENTION_END]) {
|
|
135
|
+
const currentDate = new Date();
|
|
136
|
+
const retentionStart = new Date(e.data[RetentionField.RETENTION_START]);
|
|
137
|
+
const retentionEnd = new Date(e.data[RetentionField.RETENTION_END]);
|
|
138
|
+
isRetentionActive = retentionStart <= currentDate && currentDate <= retentionEnd;
|
|
139
|
+
}
|
|
140
|
+
return of(e && !!e.permissions && e.permissions.deleteObject && !isRetentionActive);
|
|
141
|
+
}
|
|
142
|
+
run(items) {
|
|
143
|
+
return this.overlay
|
|
144
|
+
.open(DeleteComponent, {
|
|
145
|
+
items,
|
|
146
|
+
context: this.context
|
|
147
|
+
})
|
|
148
|
+
.afterClosed$.pipe(map(() => true));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
class DownloadAction extends AbstractContextAction {
|
|
153
|
+
constructor() {
|
|
154
|
+
super(...arguments);
|
|
155
|
+
this.translate = inject(TranslateService);
|
|
156
|
+
this.dmsService = inject(DmsService);
|
|
157
|
+
this.id = BASE_ACTION.download;
|
|
158
|
+
this.label = this.translate.instant('yuv.action-menu.action.download.dms.object.content.label');
|
|
159
|
+
this.description = this.translate.instant('yuv.action-menu.action.download.dms.object.content.description');
|
|
160
|
+
this.priority = 2;
|
|
161
|
+
this.icon = ACTION_ICON.download;
|
|
162
|
+
this.group = 'common';
|
|
163
|
+
this.range = SelectionRange.MULTI_SELECT;
|
|
164
|
+
this.supports = {
|
|
165
|
+
pattern: '*'
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
isExecutable(selection) {
|
|
169
|
+
const noContentMatch = (Array.isArray(selection) ? selection : [selection]).find((e) => !e.content);
|
|
170
|
+
if (selection.length < 1)
|
|
171
|
+
return of(false);
|
|
172
|
+
return of(!noContentMatch);
|
|
173
|
+
}
|
|
174
|
+
run(selection) {
|
|
175
|
+
this.dmsService.downloadContent(Array.isArray(selection) ? selection : [selection]);
|
|
176
|
+
return of(true);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
class CopyAction extends AbstractContextAction {
|
|
181
|
+
constructor() {
|
|
182
|
+
super(...arguments);
|
|
183
|
+
this.clipboardService = inject(ClipboardService);
|
|
184
|
+
this.translate = inject(TranslateService);
|
|
185
|
+
this.id = BASE_ACTION.copy;
|
|
186
|
+
this.label = this.translate.instant('yuv.action-menu.action.copy.dms.object.label');
|
|
187
|
+
this.description = this.translate.instant('yuv.action-menu.action.copy.dms.object.description');
|
|
188
|
+
this.priority = 8;
|
|
189
|
+
this.icon = ACTION_ICON.copy;
|
|
190
|
+
this.group = 'common';
|
|
191
|
+
this.range = SelectionRange.MULTI_SELECT;
|
|
192
|
+
this.supports = {
|
|
193
|
+
pattern: '*'
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
isExecutable(items) {
|
|
197
|
+
const notAllowed = items.some((item) => !item.permissions?.writeIndexData);
|
|
198
|
+
return of(items.length > 0 && !notAllowed);
|
|
199
|
+
}
|
|
200
|
+
run(items) {
|
|
201
|
+
this.clipboardService.addObjects(items, 'copy', this.context?.appId);
|
|
202
|
+
return of(true);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
class ContextmenuComponent {
|
|
207
|
+
constructor() {
|
|
208
|
+
this.oRef = inject(YvcOverlayRef);
|
|
209
|
+
this.actions = this.oRef.data.actions;
|
|
210
|
+
this.callback = this.oRef.data.callback;
|
|
211
|
+
}
|
|
212
|
+
onItemSelect(index) {
|
|
213
|
+
this.oRef?.close();
|
|
214
|
+
this.callback(this.actions()[index[0]]);
|
|
215
|
+
}
|
|
216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContextmenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
217
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ContextmenuComponent, isStandalone: true, selector: "yuv-contextmenu", ngImport: i0, template: "<yuv-list (itemSelect)=\"onItemSelect($event)\" cdkTrapFocus>\n @for (a of actions(); track a.id) {\n <div yuvListItem><yvc-icon [svg]=\"a.icon\"></yvc-icon> {{ a.label }}</div>\n }\n</yuv-list>\n", styles: [":host{--contextmenu-item-padding: calc(var(--app-pane-padding) / 2);--contextmenu-item-icon-size: 20px}:host [yuvListItem]{cursor:pointer;border-width:0 0 1px 0;display:flex;align-items:center;padding:var(--contextmenu-item-padding);gap:calc(var(--contextmenu-item-padding) * 1.5)}:host [yuvListItem] yvc-icon{--icon-size: var(--contextmenu-item-icon-size);flex:0 0 auto;color:var(--text-color-caption)}:host [yuvListItem]:hover,:host [yuvListItem][aria-current=true]{background-color:var(--item-focus-background-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ListComponent, selector: "yuv-list", inputs: ["multiselect", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1$1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
|
|
218
|
+
}
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContextmenuComponent, decorators: [{
|
|
220
|
+
type: Component,
|
|
221
|
+
args: [{ selector: 'yuv-contextmenu', standalone: true, imports: [CommonModule, ListComponent, ListItemDirective, YvcIconModule, A11yModule], template: "<yuv-list (itemSelect)=\"onItemSelect($event)\" cdkTrapFocus>\n @for (a of actions(); track a.id) {\n <div yuvListItem><yvc-icon [svg]=\"a.icon\"></yvc-icon> {{ a.label }}</div>\n }\n</yuv-list>\n", styles: [":host{--contextmenu-item-padding: calc(var(--app-pane-padding) / 2);--contextmenu-item-icon-size: 20px}:host [yuvListItem]{cursor:pointer;border-width:0 0 1px 0;display:flex;align-items:center;padding:var(--contextmenu-item-padding);gap:calc(var(--contextmenu-item-padding) * 1.5)}:host [yuvListItem] yvc-icon{--icon-size: var(--contextmenu-item-icon-size);flex:0 0 auto;color:var(--text-color-caption)}:host [yuvListItem]:hover,:host [yuvListItem][aria-current=true]{background-color:var(--item-focus-background-color)}\n"] }]
|
|
222
|
+
}] });
|
|
223
|
+
|
|
224
|
+
class CutAction extends AbstractContextAction {
|
|
225
|
+
constructor() {
|
|
226
|
+
super(...arguments);
|
|
227
|
+
this.clipboardService = inject(ClipboardService);
|
|
228
|
+
this.translate = inject(TranslateService);
|
|
229
|
+
this.id = BASE_ACTION.cut;
|
|
230
|
+
this.label = this.translate.instant('yuv.action-menu.action.cut.dms.object.label');
|
|
231
|
+
this.description = this.translate.instant('yuv.action-menu.action.cut.dms.object.description');
|
|
232
|
+
this.priority = 8;
|
|
233
|
+
this.icon = ACTION_ICON.cut;
|
|
234
|
+
this.group = 'common';
|
|
235
|
+
this.range = SelectionRange.MULTI_SELECT;
|
|
236
|
+
this.supports = {
|
|
237
|
+
pattern: '*'
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
isExecutable(items) {
|
|
241
|
+
return of(items.length > 0 && items.every((item) => item.permissions?.writeContent && item.permissions?.writeIndexData && item.permissions?.deleteObject));
|
|
242
|
+
}
|
|
243
|
+
run(items) {
|
|
244
|
+
this.clipboardService.addObjects(items, 'cut', this.context?.appId);
|
|
245
|
+
return of(true);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
class ActionsService {
|
|
250
|
+
constructor() {
|
|
251
|
+
this.injector = inject(Injector);
|
|
252
|
+
this.overlay = inject(YvcOverlayService);
|
|
253
|
+
this._registeredActions = {};
|
|
254
|
+
}
|
|
255
|
+
registerActions(a) {
|
|
256
|
+
Array.isArray(a) && a.forEach((a) => (this._registeredActions[a.id] = a.action));
|
|
257
|
+
}
|
|
258
|
+
concealActions(actionIDs) {
|
|
259
|
+
Array.isArray(actionIDs) && actionIDs.forEach((id) => delete this._registeredActions[id]);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Returns all actions that are executable for the given selection.
|
|
263
|
+
* @param selection Array of DmsObjects to check for executable actions
|
|
264
|
+
* @param options options to filter the actions
|
|
265
|
+
* @returns Observable of actions that are executable for the given selection
|
|
266
|
+
*/
|
|
267
|
+
getActions(selection, options) {
|
|
268
|
+
// TODO: check if selection is empty or if nessasery at all
|
|
269
|
+
// if (!selection || selection.length === 0) return of([]);
|
|
270
|
+
const s = this.getAvailableActions(options?.context)
|
|
271
|
+
.filter((ac) => options?.exclude
|
|
272
|
+
? Array.isArray(options.exclude)
|
|
273
|
+
? !options.exclude.includes(ac.id)
|
|
274
|
+
: options.exclude instanceof RegExp
|
|
275
|
+
? !options.exclude.test(ac.id)
|
|
276
|
+
: true
|
|
277
|
+
: true)
|
|
278
|
+
.map((action) => action.isExecutable(selection).pipe(map((executable) => ({
|
|
279
|
+
action,
|
|
280
|
+
executable
|
|
281
|
+
}))));
|
|
282
|
+
return forkJoin(s).pipe(map((res) => res.filter((r) => r.executable).map((r) => r.action)));
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Get all available actions. This includes the default actions and all registered actions but
|
|
286
|
+
* without checking if they are executable.
|
|
287
|
+
* @param context Context passed to the actions
|
|
288
|
+
* @returns Array of available actions
|
|
289
|
+
*/
|
|
290
|
+
getAvailableActions(context) {
|
|
291
|
+
let a = [];
|
|
292
|
+
runInInjectionContext(this.injector, () => {
|
|
293
|
+
a = [...this._getDefaulActions(context), ...Object.values(this._registeredActions).map((ac) => new ac(context))];
|
|
294
|
+
});
|
|
295
|
+
return a;
|
|
296
|
+
}
|
|
297
|
+
getActionsForType(objectTypeId, context) {
|
|
298
|
+
return this.getAvailableActions(context).filter((a) => this._actionsSupportsType(a, objectTypeId));
|
|
299
|
+
}
|
|
300
|
+
getActionById(id, context) {
|
|
301
|
+
return this.getAvailableActions(context).find((a) => a.id === id);
|
|
302
|
+
}
|
|
303
|
+
getActionsById(ids, context) {
|
|
304
|
+
return this.getAvailableActions(context).filter((a) => ids.includes(a.id));
|
|
305
|
+
}
|
|
306
|
+
openContextMenu(actions, callback, element) {
|
|
307
|
+
this.overlay.open(ContextmenuComponent, { actions, callback }, {}, element);
|
|
308
|
+
}
|
|
309
|
+
_actionsSupportsType(action, objectTypeId) {
|
|
310
|
+
const matchesTypes = action.supports.types ? action.supports.types.includes(objectTypeId) : false;
|
|
311
|
+
const matchesSOTs = action.supports.sots ? action.supports.sots.includes(objectTypeId) : false;
|
|
312
|
+
const matchesPattern = action.supports.pattern ? Utils.patternToRegExp(action.supports.pattern).test(objectTypeId) : false;
|
|
313
|
+
return matchesTypes || matchesSOTs || matchesPattern;
|
|
314
|
+
}
|
|
315
|
+
_getDefaulActions(context) {
|
|
316
|
+
return [new DeleteAction(context), new DownloadAction(context), new CopyAction(context), new CutAction(context)];
|
|
317
|
+
}
|
|
318
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
319
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsService, providedIn: 'root' }); }
|
|
320
|
+
}
|
|
321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionsService, decorators: [{
|
|
322
|
+
type: Injectable,
|
|
323
|
+
args: [{
|
|
324
|
+
providedIn: 'root'
|
|
325
|
+
}]
|
|
326
|
+
}] });
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Generated bundle index. Do not edit.
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
export { ACTION_ICON, AbstractContextAction, ActionsModule, ActionsService, BASE_ACTION, DeleteAction, DownloadAction, SelectionRange };
|
|
333
|
+
//# sourceMappingURL=yuuvis-client-framework-actions.mjs.map
|