@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,1036 @@
|
|
|
1
|
+
import { NgClass, NgStyle, CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Injectable, inject, ViewContainerRef, input, effect, Directive, ElementRef, computed, Component, DestroyRef, contentChild, viewChildren, signal, output, untracked, HostListener, HostBinding, viewChild } from '@angular/core';
|
|
4
|
+
import * as i1$1 from '@yuuvis/client-core';
|
|
5
|
+
import { DmsService, ObjectConfigService, SystemService, SearchService, DeviceService, EventService, YuvEventType, BaseObjectTypeField, DmsObject, TranslateModule, ContentStreamField, Utils, Sort } from '@yuuvis/client-core';
|
|
6
|
+
import { ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective } from '@yuuvis/client-framework/common';
|
|
7
|
+
import { ActionsService } from '@yuuvis/client-framework/actions';
|
|
8
|
+
import { RendererDirective } from '@yuuvis/client-framework/renderer';
|
|
9
|
+
import * as i1 from '@yuuvis/components/icon';
|
|
10
|
+
import { YvcIconModule, ICONS } from '@yuuvis/components/icon';
|
|
11
|
+
import { switchMap, Subscription, finalize } from 'rxjs';
|
|
12
|
+
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
13
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
14
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
15
|
+
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
16
|
+
import { YUV_ICONS, ObjectTypeIconComponent } from '@yuuvis/client-framework/icons';
|
|
17
|
+
import { PaginationComponent } from '@yuuvis/client-framework/pagination';
|
|
18
|
+
import { YvcOverlayModule, YvcOverlayService } from '@yuuvis/components/overlay';
|
|
19
|
+
import { ListItemDirective, ListComponent } from '@yuuvis/client-framework/list';
|
|
20
|
+
import * as i1$2 from '@yuuvis/components/split-view';
|
|
21
|
+
import { YvcSplitViewModule } from '@yuuvis/components/split-view';
|
|
22
|
+
import { TranslateModule as TranslateModule$1 } from '@ngx-translate/core';
|
|
23
|
+
|
|
24
|
+
class TileExtensionService {
|
|
25
|
+
constructor() {
|
|
26
|
+
this._extensions = {};
|
|
27
|
+
// this.registerTileExtension({
|
|
28
|
+
// // typeId: 'appSystemmail:email',
|
|
29
|
+
// typeId: 'system:document',
|
|
30
|
+
// cmp: EmailTileExtensionComponent
|
|
31
|
+
// });
|
|
32
|
+
}
|
|
33
|
+
registerTileExtension(ext) {
|
|
34
|
+
this._extensions[ext.typeId] = ext;
|
|
35
|
+
}
|
|
36
|
+
hasTileExtension(objectTypeId) {
|
|
37
|
+
return !!this._extensions[objectTypeId];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get tile extensions for a certain type
|
|
41
|
+
* @param typeId ID of the type to fetch extesion for (objectTypeID or secondaryObjectTypeID)
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
getTileExtension(typeId) {
|
|
45
|
+
return this._extensions[typeId];
|
|
46
|
+
}
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileExtensionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileExtensionService, providedIn: 'root' }); }
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileExtensionService, decorators: [{
|
|
51
|
+
type: Injectable,
|
|
52
|
+
args: [{
|
|
53
|
+
providedIn: 'root'
|
|
54
|
+
}]
|
|
55
|
+
}], ctorParameters: () => [] });
|
|
56
|
+
|
|
57
|
+
class TileExtensionDirective {
|
|
58
|
+
constructor() {
|
|
59
|
+
this.#tileExtensioService = inject(TileExtensionService);
|
|
60
|
+
this.#containerRef = inject(ViewContainerRef);
|
|
61
|
+
this.yuvTileExtension = input.required();
|
|
62
|
+
this.#yuvTileExtensionEffect = effect(() => {
|
|
63
|
+
const tile = this.yuvTileExtension();
|
|
64
|
+
if (tile.typeId) {
|
|
65
|
+
const ext = this.#tileExtensioService.getTileExtension(tile.typeId);
|
|
66
|
+
if (ext)
|
|
67
|
+
this._render(ext, tile.data);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
#tileExtensioService;
|
|
72
|
+
#containerRef;
|
|
73
|
+
#yuvTileExtensionEffect;
|
|
74
|
+
_render(ext, data) {
|
|
75
|
+
if (this.component)
|
|
76
|
+
this.#containerRef.clear();
|
|
77
|
+
this.component = this.#containerRef.createComponent(ext.cmp);
|
|
78
|
+
this.component.setInput('data', data);
|
|
79
|
+
}
|
|
80
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileExtensionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
81
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: TileExtensionDirective, isStandalone: true, selector: "[yuvTileExtension]", inputs: { yuvTileExtension: { classPropertyName: "yuvTileExtension", publicName: "yuvTileExtension", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileExtensionDirective, decorators: [{
|
|
84
|
+
type: Directive,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: '[yuvTileExtension]',
|
|
87
|
+
standalone: true
|
|
88
|
+
}]
|
|
89
|
+
}] });
|
|
90
|
+
|
|
91
|
+
class TileComponent {
|
|
92
|
+
constructor() {
|
|
93
|
+
this.elRef = inject(ElementRef);
|
|
94
|
+
this.dmsService = inject(DmsService);
|
|
95
|
+
this.actionService = inject(ActionsService);
|
|
96
|
+
this.tile = input.required();
|
|
97
|
+
this.actionContext = input();
|
|
98
|
+
this.actions = computed(() => {
|
|
99
|
+
const actionsList = [];
|
|
100
|
+
if (this.tile().actions?.length) {
|
|
101
|
+
this.tile().actions?.forEach((a) => {
|
|
102
|
+
const aa = this.actionService.getActionById(a.id, this.actionContext());
|
|
103
|
+
if (aa)
|
|
104
|
+
actionsList.push(aa);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return actionsList;
|
|
108
|
+
});
|
|
109
|
+
this.rendererInputs = computed(() => {
|
|
110
|
+
return {
|
|
111
|
+
icon: this.tile().icon,
|
|
112
|
+
title: this.tile().title,
|
|
113
|
+
description: this.tile().description,
|
|
114
|
+
meta: this.tile().meta,
|
|
115
|
+
aside: this.tile().aside
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
executeAction(a, evt) {
|
|
120
|
+
evt.preventDefault();
|
|
121
|
+
evt.stopPropagation();
|
|
122
|
+
this.dmsService
|
|
123
|
+
.getDmsObject(this.tile().id)
|
|
124
|
+
.pipe(switchMap((o) => a.run([o])))
|
|
125
|
+
.subscribe();
|
|
126
|
+
}
|
|
127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TileComponent, isStandalone: true, selector: "yuv-tile", inputs: { tile: { classPropertyName: "tile", publicName: "tile", isSignal: true, isRequired: true, transformFunction: null }, actionContext: { classPropertyName: "actionContext", publicName: "actionContext", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div data-slot=\"icon\">\n <ng-container *yuvRenderer=\"rendererInputs().icon\"></ng-container>\n</div>\n\n<div class=\"slots\">\n <div data-slot=\"title\">\n <ng-container *yuvRenderer=\"rendererInputs().title\"></ng-container>\n </div>\n \n <div data-slot=\"actions\">\n @for (a of actions(); track a.id) {\n <button [title]=\"a.label\" (click)=\"executeAction(a, $event)\"><yvc-icon [svg]=\"a.icon\"></yvc-icon></button>\n }\n </div>\n \n <div data-slot=\"description\">\n <ng-container *yuvRenderer=\"rendererInputs().description\"></ng-container>\n </div>\n \n <div data-slot=\"aside\">\n <ng-container *yuvRenderer=\"rendererInputs().aside\"></ng-container>\n </div>\n \n <div data-slot=\"meta\">\n <ng-container *yuvRenderer=\"rendererInputs().meta\"></ng-container>\n </div>\n \n <div data-slot=\"badges\">{{ tile().badges }}</div>\n \n <div class=\"extension\">\n <ng-container *yuvTileExtension=\"{ typeId: tile().objectTypeId, data: tile().instanceData }\"></ng-container>\n </div>\n</div>\n", styles: [":host{--_tile-background: var(--tile-background, transparent);--_tile-icon-fill: var(--tile-icon-fill, currentColor);--_tile-padding: var(--tile-padding, var(--app-pane-padding));--_tile-action-icon-size: var(--tile-action-icon-size);--_tile-icon-size: var(--tile-icon-size);--_transition-duration: var(--transition-duration, .1s);display:flex;align-items:center;background-color:var(--_tile-background);padding:var(--_tile-padding);transition:background-color var(--_transition-duration)}:host .slots{display:grid;grid-template-rows:repeat(4,auto);grid-template-columns:1fr repeat(2,auto);grid-template-areas:\"title title actions\" \"description aside aside\" \"meta meta badges\" \"ext ext ext\";flex:1}:host [data-slot]{align-items:center;-webkit-user-select:none;user-select:none;display:grid}:host [data-slot=icon]{--icon-renderer-icon-size: var(--_tile-icon-size);color:var(--_tile-icon-fill);width:3rem;grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{font-weight:700;grid-area:title}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{opacity:0;transition:opacity var(--_transition-duration);pointer-events:none}:host:hover [data-slot=actions]{opacity:1;pointer-events:all}:host [data-slot=actions]{grid-area:actions;flex:0 0 auto;display:flex;align-items:start}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=actions] button yvc-icon{--icon-size: var(--_tile-action-icon-size)}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host .extension{grid-area:ext}\n"], dependencies: [{ kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "directive", type: TileExtensionDirective, selector: "[yuvTileExtension]", inputs: ["yuvTileExtension"] }] }); }
|
|
129
|
+
}
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileComponent, decorators: [{
|
|
131
|
+
type: Component,
|
|
132
|
+
args: [{ selector: 'yuv-tile', standalone: true, imports: [YvcIconModule, RendererDirective, TileExtensionDirective], template: "<div data-slot=\"icon\">\n <ng-container *yuvRenderer=\"rendererInputs().icon\"></ng-container>\n</div>\n\n<div class=\"slots\">\n <div data-slot=\"title\">\n <ng-container *yuvRenderer=\"rendererInputs().title\"></ng-container>\n </div>\n \n <div data-slot=\"actions\">\n @for (a of actions(); track a.id) {\n <button [title]=\"a.label\" (click)=\"executeAction(a, $event)\"><yvc-icon [svg]=\"a.icon\"></yvc-icon></button>\n }\n </div>\n \n <div data-slot=\"description\">\n <ng-container *yuvRenderer=\"rendererInputs().description\"></ng-container>\n </div>\n \n <div data-slot=\"aside\">\n <ng-container *yuvRenderer=\"rendererInputs().aside\"></ng-container>\n </div>\n \n <div data-slot=\"meta\">\n <ng-container *yuvRenderer=\"rendererInputs().meta\"></ng-container>\n </div>\n \n <div data-slot=\"badges\">{{ tile().badges }}</div>\n \n <div class=\"extension\">\n <ng-container *yuvTileExtension=\"{ typeId: tile().objectTypeId, data: tile().instanceData }\"></ng-container>\n </div>\n</div>\n", styles: [":host{--_tile-background: var(--tile-background, transparent);--_tile-icon-fill: var(--tile-icon-fill, currentColor);--_tile-padding: var(--tile-padding, var(--app-pane-padding));--_tile-action-icon-size: var(--tile-action-icon-size);--_tile-icon-size: var(--tile-icon-size);--_transition-duration: var(--transition-duration, .1s);display:flex;align-items:center;background-color:var(--_tile-background);padding:var(--_tile-padding);transition:background-color var(--_transition-duration)}:host .slots{display:grid;grid-template-rows:repeat(4,auto);grid-template-columns:1fr repeat(2,auto);grid-template-areas:\"title title actions\" \"description aside aside\" \"meta meta badges\" \"ext ext ext\";flex:1}:host [data-slot]{align-items:center;-webkit-user-select:none;user-select:none;display:grid}:host [data-slot=icon]{--icon-renderer-icon-size: var(--_tile-icon-size);color:var(--_tile-icon-fill);width:3rem;grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{font-weight:700;grid-area:title}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{opacity:0;transition:opacity var(--_transition-duration);pointer-events:none}:host:hover [data-slot=actions]{opacity:1;pointer-events:all}:host [data-slot=actions]{grid-area:actions;flex:0 0 auto;display:flex;align-items:start}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=actions] button yvc-icon{--icon-size: var(--_tile-action-icon-size)}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host .extension{grid-area:ext}\n"] }]
|
|
133
|
+
}] });
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* List that renders the result of a search query as object config based tiles. It also contains a component to
|
|
137
|
+
* set up that configuration.
|
|
138
|
+
*
|
|
139
|
+
* ## Paging
|
|
140
|
+
* If the search result contains more items than the page size, the list will show a
|
|
141
|
+
* pagination control to navigate inbetween the pages.
|
|
142
|
+
*
|
|
143
|
+
* ## Staggered animation
|
|
144
|
+
* Adding a class of `staggered` to the `yuv-tile-list` component will animate
|
|
145
|
+
* the tiles in a staggered way (only if the user has not set up the OS to not
|
|
146
|
+
* play animation).
|
|
147
|
+
*/
|
|
148
|
+
class TileListComponent {
|
|
149
|
+
#objectConfigService;
|
|
150
|
+
#system;
|
|
151
|
+
#searchService;
|
|
152
|
+
#destroyRef;
|
|
153
|
+
#device;
|
|
154
|
+
#elRef;
|
|
155
|
+
#events;
|
|
156
|
+
#listItemsEffect;
|
|
157
|
+
#openContextMenu;
|
|
158
|
+
#contextFlag;
|
|
159
|
+
onContextMenu(event) {
|
|
160
|
+
event.preventDefault();
|
|
161
|
+
if (this.#contextFlag()) {
|
|
162
|
+
this.#contextFlag.set(false);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
this.ctxMenu.emit({ event, selection: this.selection() });
|
|
167
|
+
}, 200);
|
|
168
|
+
}
|
|
169
|
+
onMouseDown(event) {
|
|
170
|
+
// TODO: Clicking on the scrollbar also resets selection ... need to find a different way
|
|
171
|
+
// (event.target as HTMLElement).parentElement?.tagName === 'YUV-TILE-LIST' && this.#select(-1);
|
|
172
|
+
if (event.button === 2) {
|
|
173
|
+
this.#contextFlag.set(true);
|
|
174
|
+
this.onContextMenu(event);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
onCopy(event) {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
if (this._selection.length)
|
|
180
|
+
this.copy.emit(this._selectionToTileData());
|
|
181
|
+
}
|
|
182
|
+
onCut(event) {
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
if (this._selection.length)
|
|
185
|
+
this.cut.emit(this._selectionToTileData());
|
|
186
|
+
}
|
|
187
|
+
onKeydown(event) {
|
|
188
|
+
switch (event.code) {
|
|
189
|
+
case 'Escape': {
|
|
190
|
+
this.clearSelection();
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
case 'Enter': {
|
|
194
|
+
// same as double click
|
|
195
|
+
const aii = this._keyManager.activeItemIndex !== null ? this._keyManager.activeItemIndex : -1;
|
|
196
|
+
if (aii >= 0) {
|
|
197
|
+
this.itemDblClick.emit(this.items[aii]);
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
case 'Space': {
|
|
202
|
+
// same as single click
|
|
203
|
+
const aii = this._keyManager.activeItemIndex !== null ? this._keyManager.activeItemIndex : -1;
|
|
204
|
+
if (aii >= 0) {
|
|
205
|
+
this.select(this.items[aii], event);
|
|
206
|
+
}
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
default: {
|
|
210
|
+
this._keyManager?.onKeydown(event);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
#_busyEffect;
|
|
215
|
+
#query;
|
|
216
|
+
#executeQueryEffect;
|
|
217
|
+
constructor() {
|
|
218
|
+
this.#objectConfigService = inject(ObjectConfigService);
|
|
219
|
+
this.#system = inject(SystemService);
|
|
220
|
+
this.#searchService = inject(SearchService);
|
|
221
|
+
this.#destroyRef = inject(DestroyRef);
|
|
222
|
+
this.#device = inject(DeviceService);
|
|
223
|
+
this.#elRef = inject(ElementRef);
|
|
224
|
+
this.#events = inject(EventService);
|
|
225
|
+
this.emptyContent = contentChild('empty');
|
|
226
|
+
this.isTouchDevice = this.#device.isTouchEnabled;
|
|
227
|
+
this.tiles = viewChildren(TileComponent);
|
|
228
|
+
this.listItems = viewChildren(ListItemDirective);
|
|
229
|
+
this.#listItemsEffect = effect(() => {
|
|
230
|
+
if (this._keyManager)
|
|
231
|
+
this._keyManager.destroy();
|
|
232
|
+
this._keyManager = new ActiveDescendantKeyManager(this.listItems() || []).withWrap();
|
|
233
|
+
});
|
|
234
|
+
this.searchResultSubscription = new Subscription();
|
|
235
|
+
this.#openContextMenu = signal(null);
|
|
236
|
+
this.#contextFlag = signal(false);
|
|
237
|
+
this._busy = signal(false);
|
|
238
|
+
this.#_busyEffect = effect(() => {
|
|
239
|
+
this.busy.emit(this._busy());
|
|
240
|
+
});
|
|
241
|
+
this._selection = [];
|
|
242
|
+
this.selectedTile = signal([]);
|
|
243
|
+
this.empytIcon = signal(YUV_ICONS.trash);
|
|
244
|
+
/**
|
|
245
|
+
* The ID of the selected list item
|
|
246
|
+
*/
|
|
247
|
+
this.selection = signal([]);
|
|
248
|
+
/**
|
|
249
|
+
* Tile configurations are stored globally for all apps. If you want a
|
|
250
|
+
* separate config for your app/component you can specify a bucket. A bucket
|
|
251
|
+
* is basically an ID where your custom tile config will be stored and
|
|
252
|
+
* retrieved. Buckets should be unique so be sure to use a unique namespace.
|
|
253
|
+
*/
|
|
254
|
+
this.bucket = input();
|
|
255
|
+
/**
|
|
256
|
+
* Sets up the ability to select multile tiles
|
|
257
|
+
*/
|
|
258
|
+
this.multiselect = input(false);
|
|
259
|
+
this.options = input(undefined);
|
|
260
|
+
this.flavor = input();
|
|
261
|
+
this.flavorEffect = effect(() => {
|
|
262
|
+
const f = this.flavor();
|
|
263
|
+
if (f)
|
|
264
|
+
this.applyFlavor(f);
|
|
265
|
+
});
|
|
266
|
+
/**
|
|
267
|
+
* The search query to be executed
|
|
268
|
+
*/
|
|
269
|
+
this.query = input();
|
|
270
|
+
// Items to be preselected (TODO: remove after refactoring ???)
|
|
271
|
+
this.preselect = input();
|
|
272
|
+
this.highlights = input([]);
|
|
273
|
+
this.highlightStyles = computed(() => {
|
|
274
|
+
const x = {};
|
|
275
|
+
(this.highlights() || []).forEach((highlight) => {
|
|
276
|
+
highlight.ids.forEach((id) => {
|
|
277
|
+
if (!x[id])
|
|
278
|
+
x[id] = {};
|
|
279
|
+
x[id] = { ...x[id], ...highlight.cssStyles };
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
return x;
|
|
283
|
+
});
|
|
284
|
+
/**
|
|
285
|
+
* Emitted when a list item has been selected
|
|
286
|
+
*/
|
|
287
|
+
this.itemSelect = output();
|
|
288
|
+
this.copy = output();
|
|
289
|
+
this.cut = output();
|
|
290
|
+
this.busy = output();
|
|
291
|
+
this.queryResult = output();
|
|
292
|
+
/**
|
|
293
|
+
* Emitted when selected items changed. If 'multiselect' input is set to true, this will
|
|
294
|
+
* emit the whole selection, while 'itemSelect' will only emit the item that currently
|
|
295
|
+
* has bee added to the selection.
|
|
296
|
+
*/
|
|
297
|
+
this.selectionChange = output();
|
|
298
|
+
/**
|
|
299
|
+
* Emitted when a list item has been doubleclicked
|
|
300
|
+
*/
|
|
301
|
+
this.itemDblClick = output();
|
|
302
|
+
this.ctxMenu = output();
|
|
303
|
+
// the items rendered in the list
|
|
304
|
+
this.items = [];
|
|
305
|
+
this.searchExecuted = false;
|
|
306
|
+
this.#executeQueryEffect = effect(() => {
|
|
307
|
+
// execute the query each time it changes
|
|
308
|
+
this.#query = this.query();
|
|
309
|
+
if (this.#query && this.oc)
|
|
310
|
+
untracked(() => {
|
|
311
|
+
this._executeQuery(this.#query || undefined);
|
|
312
|
+
this.empytIcon.set(YUV_ICONS.refresh);
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
this.#events
|
|
316
|
+
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
317
|
+
.pipe(takeUntilDestroyed())
|
|
318
|
+
.subscribe((e) => {
|
|
319
|
+
const dmsObject = e.data;
|
|
320
|
+
// check if the updated object is part of the list
|
|
321
|
+
this.items.findIndex((item) => item.id === dmsObject.id) >= 0 && this.updateTileList([dmsObject]);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
contextMenuHandler(event, index) {
|
|
325
|
+
if (!coerceBooleanProperty(this.tiles()[index].elRef.nativeElement.ariaSelected)) {
|
|
326
|
+
this._selectByIndex(index, event);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
select(i, evt) {
|
|
330
|
+
const idx = this.items.findIndex((item) => item.id === i.id);
|
|
331
|
+
this._selectByIndex(idx, evt);
|
|
332
|
+
}
|
|
333
|
+
onDragSelectChange(sel) {
|
|
334
|
+
if (this._keyManager.activeItemIndex !== -1)
|
|
335
|
+
this._keyManager.setActiveItem(-1);
|
|
336
|
+
this._selection = sel;
|
|
337
|
+
this._selection.sort();
|
|
338
|
+
this.listItems().forEach((item, i) => (item.selected = this._selection.includes(i)));
|
|
339
|
+
}
|
|
340
|
+
onDragSelect(sel) {
|
|
341
|
+
this.#elRef.nativeElement.focus();
|
|
342
|
+
this._selection = sel;
|
|
343
|
+
this._keyManager.setActiveItem(sel[0] || 0);
|
|
344
|
+
const tiles = this._selectionToTileData();
|
|
345
|
+
this.selectionChange.emit(tiles);
|
|
346
|
+
}
|
|
347
|
+
_selectByIndex(idx, evt) {
|
|
348
|
+
this._keyManager.setActiveItem(idx);
|
|
349
|
+
this.#select(idx, evt?.shiftKey, evt?.ctrlKey);
|
|
350
|
+
}
|
|
351
|
+
refresh() {
|
|
352
|
+
if (this.#query) {
|
|
353
|
+
if (this.pagination) {
|
|
354
|
+
this.goToPage(this.pagination.page);
|
|
355
|
+
}
|
|
356
|
+
else
|
|
357
|
+
this._executeQuery(this.query() || undefined);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
applyFlavor(flavor) {
|
|
361
|
+
this.appliedFlavor = this.appliedFlavor?.id === flavor.id ? undefined : flavor;
|
|
362
|
+
if (this._rawResult)
|
|
363
|
+
this.items = this._mapSearchResult(this._rawResult);
|
|
364
|
+
}
|
|
365
|
+
clearSelection(silent = false) {
|
|
366
|
+
if (this._selection.length) {
|
|
367
|
+
this._selection = [];
|
|
368
|
+
this._keyManager.setActiveItem(-1);
|
|
369
|
+
this.listItems().forEach((item, i) => (item.selected = false));
|
|
370
|
+
if (!silent)
|
|
371
|
+
this.selectionChange.emit([]);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
selectNext() {
|
|
375
|
+
if (this._lastSelection) {
|
|
376
|
+
let i = this._lastSelection + 1;
|
|
377
|
+
if (i > this.items.length)
|
|
378
|
+
i = 0;
|
|
379
|
+
this.#select(i);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
selectPrev() {
|
|
383
|
+
if (this._lastSelection) {
|
|
384
|
+
let i = this._lastSelection - 1;
|
|
385
|
+
if (i < 0)
|
|
386
|
+
i = this.items.length - 1;
|
|
387
|
+
this.#select(this._lastSelection - 1);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
goToPage(page) {
|
|
391
|
+
if (!this.#query)
|
|
392
|
+
return;
|
|
393
|
+
this._busy.set(true);
|
|
394
|
+
this.#searchService
|
|
395
|
+
.getPage(this.#query, page)
|
|
396
|
+
.pipe(finalize(() => this._busy.set(false)))
|
|
397
|
+
.subscribe({
|
|
398
|
+
next: (res) => {
|
|
399
|
+
this.#setupPagination(res);
|
|
400
|
+
this.items = this._mapSearchResult(res);
|
|
401
|
+
},
|
|
402
|
+
error: (err) => {
|
|
403
|
+
// TODO: how should errors be handles in case hat loading pages fail
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
#select(index, shiftKey = false, ctrlKey = false) {
|
|
408
|
+
this.#elRef.nativeElement.focus();
|
|
409
|
+
if (index === -1)
|
|
410
|
+
this._selection = [];
|
|
411
|
+
else {
|
|
412
|
+
if (this.multiselect()) {
|
|
413
|
+
this._selection = this._selection.filter((i) => i !== index);
|
|
414
|
+
if (ctrlKey) {
|
|
415
|
+
// if ctrl key add to selection
|
|
416
|
+
this._selection.push(index);
|
|
417
|
+
}
|
|
418
|
+
else if (shiftKey) {
|
|
419
|
+
// add range
|
|
420
|
+
if (this._lastSelection !== undefined) {
|
|
421
|
+
const startIndex = this._lastSelection < index ? this._lastSelection : index;
|
|
422
|
+
const endIndex = this._lastSelection > index ? this._lastSelection : index;
|
|
423
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
424
|
+
this._selection.push(i);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
this._selection = [index];
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
this._selection = [index];
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
else
|
|
436
|
+
this._selection = [index];
|
|
437
|
+
this._selection = [...new Set(this._selection)];
|
|
438
|
+
}
|
|
439
|
+
this._lastSelection = this._selection.length === 0 ? undefined : index;
|
|
440
|
+
this._selection.sort();
|
|
441
|
+
this.listItems().forEach((item, i) => (item.selected = this._selection.includes(i)));
|
|
442
|
+
const tiles = this._selectionToTileData();
|
|
443
|
+
this.selectionChange.emit(tiles);
|
|
444
|
+
tiles.length === 1 && this.itemSelect.emit(tiles[0]);
|
|
445
|
+
this.selectedTile.set(this._selection.map((idx) => this.items[idx]));
|
|
446
|
+
}
|
|
447
|
+
_selectionToTileData() {
|
|
448
|
+
return this._selection.map((idx) => this.items[idx]);
|
|
449
|
+
}
|
|
450
|
+
_executeQuery(q) {
|
|
451
|
+
if (q && this.#system.system) {
|
|
452
|
+
this.searchExecuted = false;
|
|
453
|
+
// reset items to avoid old data being shown while new stuff is loaded
|
|
454
|
+
this.items = [];
|
|
455
|
+
// q.fields = Object.keys(this.#system.system.allFields);
|
|
456
|
+
q.fields = undefined;
|
|
457
|
+
this._busy.set(true);
|
|
458
|
+
this.searchResultSubscription = this.#searchService
|
|
459
|
+
.search(q)
|
|
460
|
+
.pipe(finalize(() => this._busy.set(false)))
|
|
461
|
+
.subscribe({
|
|
462
|
+
next: (res) => {
|
|
463
|
+
this.#setupPagination(res);
|
|
464
|
+
this.items = this._mapSearchResult(res);
|
|
465
|
+
this.queryResult.emit({ totalCount: res.items.length });
|
|
466
|
+
const preselect = this.preselect();
|
|
467
|
+
if (preselect) {
|
|
468
|
+
preselect.forEach((id) => {
|
|
469
|
+
const idx = this.items.findIndex((item) => item.id === id);
|
|
470
|
+
if (idx >= 0)
|
|
471
|
+
this._selectByIndex(idx);
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
error: (err) => console.error(err)
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
#setupPagination(searchResult) {
|
|
480
|
+
this.pagination = undefined;
|
|
481
|
+
if (this.#query && searchResult.totalNumItems > (this.#query.size || SearchService.DEFAULT_QUERY_SIZE)) {
|
|
482
|
+
this.pagination = {
|
|
483
|
+
total: searchResult.totalNumItems,
|
|
484
|
+
pages: Math.ceil(searchResult.totalNumItems / (this.#query?.size || SearchService.DEFAULT_QUERY_SIZE)),
|
|
485
|
+
page: (!this.#query?.from ? 0 : this.#query.from / (this.#query?.size || SearchService.DEFAULT_QUERY_SIZE)) + 1
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
#mapToTileData(objects) {
|
|
490
|
+
return objects.map((dmsObject) => {
|
|
491
|
+
const sots = dmsObject.sots || [];
|
|
492
|
+
let oc = this.oc[dmsObject.objectTypeId];
|
|
493
|
+
// check if result oitem matches virtual config type
|
|
494
|
+
const cfgTypes = this.options()?.configTypes || [];
|
|
495
|
+
cfgTypes.forEach((cft) => {
|
|
496
|
+
const matchesType = !cft.objectType || cft.objectType === dmsObject.objectTypeId;
|
|
497
|
+
const matchesSOTs = !cft.sots || !cft.sots.length || cft.sots.every((sot) => sots.includes(sot));
|
|
498
|
+
if (matchesType && matchesSOTs)
|
|
499
|
+
oc = this.oc[cft.id];
|
|
500
|
+
});
|
|
501
|
+
// only apply a flavor if the object has that SOT
|
|
502
|
+
const ownAppliedFlavor = this.appliedFlavor && sots.includes(this.appliedFlavor.sot) && this.oc[this.appliedFlavor.sot];
|
|
503
|
+
if (ownAppliedFlavor) {
|
|
504
|
+
oc = this.oc[this.appliedFlavor.id];
|
|
505
|
+
}
|
|
506
|
+
if (!oc)
|
|
507
|
+
oc = this.#objectConfigService.getDefaultConfig(dmsObject.objectTypeId);
|
|
508
|
+
const tli = {
|
|
509
|
+
objectTypeId: dmsObject.objectTypeId,
|
|
510
|
+
id: dmsObject.id,
|
|
511
|
+
actions: oc.actions,
|
|
512
|
+
badges: oc.badges,
|
|
513
|
+
instanceData: dmsObject.data,
|
|
514
|
+
dmsObject,
|
|
515
|
+
title: oc.title ? this.#getResolvedObjectConfigItem(oc.title.propertyName, dmsObject.data) : { propertyName: '', value: '' }
|
|
516
|
+
};
|
|
517
|
+
tli.icon = oc.icon
|
|
518
|
+
? {
|
|
519
|
+
rendererType: 'icon',
|
|
520
|
+
propertyName: 'custom',
|
|
521
|
+
value: oc.icon.svg
|
|
522
|
+
}
|
|
523
|
+
: {
|
|
524
|
+
rendererType: 'icon',
|
|
525
|
+
propertyName: BaseObjectTypeField.OBJECT_TYPE_ID,
|
|
526
|
+
value: ownAppliedFlavor && this.appliedFlavor ? this.appliedFlavor.sot : dmsObject.objectTypeId
|
|
527
|
+
};
|
|
528
|
+
if (oc.description)
|
|
529
|
+
tli.description = this.#getResolvedObjectConfigItem(oc.description.propertyName, dmsObject.data);
|
|
530
|
+
if (oc.meta)
|
|
531
|
+
tli.meta = this.#getResolvedObjectConfigItem(oc.meta.propertyName, dmsObject.data);
|
|
532
|
+
if (oc.aside)
|
|
533
|
+
tli.aside = this.#getResolvedObjectConfigItem(oc.aside.propertyName, dmsObject.data);
|
|
534
|
+
return tli;
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
_mapSearchResult(res) {
|
|
538
|
+
this.searchExecuted = true;
|
|
539
|
+
this._rawResult = res;
|
|
540
|
+
return this.oc ? this.#mapToTileData(res.items.map((i) => new DmsObject(i))) : [];
|
|
541
|
+
}
|
|
542
|
+
#getResolvedObjectConfigItem(propertyName, instanceData) {
|
|
543
|
+
const item = {
|
|
544
|
+
propertyName: propertyName,
|
|
545
|
+
value: instanceData[propertyName]
|
|
546
|
+
};
|
|
547
|
+
// Meta data are considered properties that start with the property name followed by an underscore.
|
|
548
|
+
// Organization fields for example have an additional property 'xyz_title' that contains the resolved
|
|
549
|
+
// name of a user while the value itself is the users ID.
|
|
550
|
+
const metaData = Object.keys(instanceData)
|
|
551
|
+
.filter((key) => key.startsWith(propertyName + '_'))
|
|
552
|
+
.map((key) => ({ [key.substring(key.indexOf('_') + 1)]: instanceData[key] }));
|
|
553
|
+
// If there are meta data properties, they'll be merged into a Record where the
|
|
554
|
+
// key is the property name without the underscore and the actual properties name.
|
|
555
|
+
// So { 'xyz_title': 'John Doe' } will be merged into { title: 'John Doe' }
|
|
556
|
+
if (metaData.length) {
|
|
557
|
+
const meta = metaData.reduce((acc, cur) => ({ ...acc, ...cur }), {});
|
|
558
|
+
item.meta = meta;
|
|
559
|
+
}
|
|
560
|
+
return item;
|
|
561
|
+
}
|
|
562
|
+
updateTileList(listItems) {
|
|
563
|
+
listItems.forEach((item) => {
|
|
564
|
+
const idx = this.items.findIndex((listItem) => listItem.id === item.id);
|
|
565
|
+
if (idx >= 0 && this.oc) {
|
|
566
|
+
const mappedTileData = this.#mapToTileData([item]);
|
|
567
|
+
this.items[idx] = mappedTileData[0];
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
ngOnInit() {
|
|
572
|
+
this.#objectConfigService
|
|
573
|
+
.getObjectConfigs$(this.bucket() || '', true)
|
|
574
|
+
.pipe(takeUntilDestroyed(this.#destroyRef))
|
|
575
|
+
.subscribe({
|
|
576
|
+
next: (res) => {
|
|
577
|
+
this.oc = res;
|
|
578
|
+
const q = this.query();
|
|
579
|
+
q && this._executeQuery(q);
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
ngOnDestroy() {
|
|
584
|
+
this._keyManager?.destroy();
|
|
585
|
+
this.searchResultSubscription.unsubscribe();
|
|
586
|
+
}
|
|
587
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
588
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TileListComponent, isStandalone: true, selector: "yuv-tile-list", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, flavor: { classPropertyName: "flavor", publicName: "flavor", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, preselect: { classPropertyName: "preselect", publicName: "preselect", isSignal: true, isRequired: false, transformFunction: null }, highlights: { classPropertyName: "highlights", publicName: "highlights", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", copy: "copy", cut: "cut", busy: "busy", queryResult: "queryResult", selectionChange: "selectionChange", itemDblClick: "itemDblClick", ctxMenu: "ctxMenu" }, host: { attributes: { "tabindex": "0", "role": "listbox" }, listeners: { "contextmenu": "onContextMenu($event)", "mousedown": "onMouseDown($event)", "keydown.control.c": "onCopy($event)", "keydown.control.x": "onCut($event)", "keydown": "onKeydown($event)" }, properties: { "class.pagination": "this.pagination" } }, providers: [], queries: [{ propertyName: "emptyContent", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tiles", predicate: TileComponent, descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ListItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"tiles\"\n [yuvDragSelect]=\"{ disabled: !this.multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n>\n @for (i of items; track i.id) {\n <yuv-tile\n yuvDragSelectItem\n yuvListItem\n [style.--i]=\"$index\"\n [attr.aria-selected]=\"selection().includes(i.id)\"\n (click.single)=\"select(i, $event)\"\n (click.double)=\"itemDblClick.emit(i)\"\n [ngClass]=\"{ selected: selection().includes(i.id), last: $last }\"\n [actionContext]=\"options()?.actionContext\"\n [tile]=\"i\"\n [ngStyle]=\"highlightStyles()[i.id]\"\n (contextmenu)=\"contextMenuHandler($event, $index)\"\n ></yuv-tile>\n } @empty {\n <div class=\"empyt-list\">\n @if (searchExecuted && emptyContent()) {\n <ng-content></ng-content>\n }\n </div>\n }\n <div class=\"offset\" (click)=\"clearSelection()\"></div>\n</div>\n@if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n}\n", styles: [":host{--_tile-hover-background: var(--tile-hover-background, var(--item-focus-background-color));--_tile-selected-background: var(--tile-selected-background, var(--item-selected-background-color));--_tile-selected-icon-fill: var(--tile-selected-icon-fill, var(--color-accent));--tile-gap: 0px;--tile-border: none;--tile-border-width: 1px;--tile-icon-size: initial;--tile-slot-padding: 2px;--staggered-animation-duration: .2s;--paging-button-size: 18px;--paging-margin: calc(var(--app-pane-padding) / 2);--paging-padding: calc(var(--app-pane-padding) / 4);display:grid;grid-template-rows:1fr auto var(--paging-margin);grid-template-columns:var(--paging-margin) 1fr var(--paging-margin)}:host.pagination yuv-tile.last{margin-block-end:calc(var(--paging-margin) * 2 + var(--paging-padding) * 2 + var(--paging-button-size))}:host .tiles{grid-column:1/-1;grid-row:1/-1;overflow-y:auto;display:flex;flex-flow:column}:host .tiles yuv-tile{flex:0 0 auto}:host .tiles .offset{flex:1 1 auto}:host yuv-pagination{z-index:2;grid-column:2/-2;grid-row:2/-2;border:1px solid var(--panel-divider-color);animation:fade-in-up .2s ease-in-out forwards}:host yuv-tile{cursor:pointer}:host yuv-tile:not(.last){border:var(--tile-border);border-width:var(--tile-border-width);margin-block-end:var(--tile-gap)}:host yuv-tile:hover,:host yuv-tile[aria-current=true]{--tile-background: var(--_tile-hover-background)}:host yuv-tile[aria-selected=true]{--tile-background: var(--_tile-selected-background);--tile-icon-fill: var(--_tile-selected-icon-fill)}:host .empyt-list{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}@keyframes fade-in-up{0%{opacity:0;transform:translateY(var(--paging-margin))}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TileComponent, selector: "yuv-tile", inputs: ["tile", "actionContext"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: YvcOverlayModule }, { kind: "component", type: PaginationComponent, selector: "yuv-pagination", inputs: ["pagination"], outputs: ["pageChange"] }, { kind: "ngmodule", type: YvcIconModule }, { kind: "directive", type: ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }, { kind: "directive", type: DragSelectDirective, selector: "[yuvDragSelect]", inputs: ["yuvDragSelect"], outputs: ["dragSelectChange", "dragSelect"] }, { kind: "directive", type: DragSelectItemDirective, selector: "[yuvDragSelectItem]" }] }); }
|
|
589
|
+
}
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileListComponent, decorators: [{
|
|
591
|
+
type: Component,
|
|
592
|
+
args: [{ selector: 'yuv-tile-list', standalone: true, providers: [], imports: [
|
|
593
|
+
NgClass,
|
|
594
|
+
NgStyle,
|
|
595
|
+
TileComponent,
|
|
596
|
+
TranslateModule,
|
|
597
|
+
ReactiveFormsModule,
|
|
598
|
+
YvcOverlayModule,
|
|
599
|
+
PaginationComponent,
|
|
600
|
+
YvcIconModule,
|
|
601
|
+
ListItemDirective,
|
|
602
|
+
ClickDoubleDirective,
|
|
603
|
+
DragSelectDirective,
|
|
604
|
+
DragSelectItemDirective
|
|
605
|
+
], host: {
|
|
606
|
+
tabindex: '0',
|
|
607
|
+
role: 'listbox'
|
|
608
|
+
}, template: "<div\n class=\"tiles\"\n [yuvDragSelect]=\"{ disabled: !this.multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n>\n @for (i of items; track i.id) {\n <yuv-tile\n yuvDragSelectItem\n yuvListItem\n [style.--i]=\"$index\"\n [attr.aria-selected]=\"selection().includes(i.id)\"\n (click.single)=\"select(i, $event)\"\n (click.double)=\"itemDblClick.emit(i)\"\n [ngClass]=\"{ selected: selection().includes(i.id), last: $last }\"\n [actionContext]=\"options()?.actionContext\"\n [tile]=\"i\"\n [ngStyle]=\"highlightStyles()[i.id]\"\n (contextmenu)=\"contextMenuHandler($event, $index)\"\n ></yuv-tile>\n } @empty {\n <div class=\"empyt-list\">\n @if (searchExecuted && emptyContent()) {\n <ng-content></ng-content>\n }\n </div>\n }\n <div class=\"offset\" (click)=\"clearSelection()\"></div>\n</div>\n@if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n}\n", styles: [":host{--_tile-hover-background: var(--tile-hover-background, var(--item-focus-background-color));--_tile-selected-background: var(--tile-selected-background, var(--item-selected-background-color));--_tile-selected-icon-fill: var(--tile-selected-icon-fill, var(--color-accent));--tile-gap: 0px;--tile-border: none;--tile-border-width: 1px;--tile-icon-size: initial;--tile-slot-padding: 2px;--staggered-animation-duration: .2s;--paging-button-size: 18px;--paging-margin: calc(var(--app-pane-padding) / 2);--paging-padding: calc(var(--app-pane-padding) / 4);display:grid;grid-template-rows:1fr auto var(--paging-margin);grid-template-columns:var(--paging-margin) 1fr var(--paging-margin)}:host.pagination yuv-tile.last{margin-block-end:calc(var(--paging-margin) * 2 + var(--paging-padding) * 2 + var(--paging-button-size))}:host .tiles{grid-column:1/-1;grid-row:1/-1;overflow-y:auto;display:flex;flex-flow:column}:host .tiles yuv-tile{flex:0 0 auto}:host .tiles .offset{flex:1 1 auto}:host yuv-pagination{z-index:2;grid-column:2/-2;grid-row:2/-2;border:1px solid var(--panel-divider-color);animation:fade-in-up .2s ease-in-out forwards}:host yuv-tile{cursor:pointer}:host yuv-tile:not(.last){border:var(--tile-border);border-width:var(--tile-border-width);margin-block-end:var(--tile-gap)}:host yuv-tile:hover,:host yuv-tile[aria-current=true]{--tile-background: var(--_tile-hover-background)}:host yuv-tile[aria-selected=true]{--tile-background: var(--_tile-selected-background);--tile-icon-fill: var(--_tile-selected-icon-fill)}:host .empyt-list{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}@keyframes fade-in-up{0%{opacity:0;transform:translateY(var(--paging-margin))}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
609
|
+
}], ctorParameters: () => [], propDecorators: { onContextMenu: [{
|
|
610
|
+
type: HostListener,
|
|
611
|
+
args: ['contextmenu', ['$event']]
|
|
612
|
+
}], onMouseDown: [{
|
|
613
|
+
type: HostListener,
|
|
614
|
+
args: ['mousedown', ['$event']]
|
|
615
|
+
}], onCopy: [{
|
|
616
|
+
type: HostListener,
|
|
617
|
+
args: ['keydown.control.c', ['$event']]
|
|
618
|
+
}], onCut: [{
|
|
619
|
+
type: HostListener,
|
|
620
|
+
args: ['keydown.control.x', ['$event']]
|
|
621
|
+
}], onKeydown: [{
|
|
622
|
+
type: HostListener,
|
|
623
|
+
args: ['keydown', ['$event']]
|
|
624
|
+
}], pagination: [{
|
|
625
|
+
type: HostBinding,
|
|
626
|
+
args: ['class.pagination']
|
|
627
|
+
}] } });
|
|
628
|
+
|
|
629
|
+
class ActionSelectComponent {
|
|
630
|
+
constructor() {
|
|
631
|
+
this.actionService = inject(ActionsService);
|
|
632
|
+
this.objectType = input.required();
|
|
633
|
+
this.actions = computed(() => (this.objectType() ? this.actionService.getActionsForType(this.objectType().id) : []));
|
|
634
|
+
this.selectedActionIds = input([]);
|
|
635
|
+
this.actionSelect = output();
|
|
636
|
+
}
|
|
637
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
638
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ActionSelectComponent, isStandalone: true, selector: "yuv-tile-action-select", inputs: { objectType: { classPropertyName: "objectType", publicName: "objectType", isSignal: true, isRequired: true, transformFunction: null }, selectedActionIds: { classPropertyName: "selectedActionIds", publicName: "selectedActionIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionSelect: "actionSelect" }, ngImport: i0, template: "<div class=\"actions\">\n @for (a of actions(); track a.id) {\n <button [ngClass]=\"{ selected: selectedActionIds().includes(a.id) }\" (click)=\"actionSelect.emit(a)\">\n <yvc-icon [svg]=\"a.icon!\"></yvc-icon>{{ a.label }}\n </button>\n }\n</div>\n", styles: [":host .actions button{width:100%;border:1px solid var(--panel-divider-color);border-radius:0;margin-block-end:1px}:host .actions button.selected{background-color:var(--color-accent);color:var(--color-accent-tone)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }] }); }
|
|
639
|
+
}
|
|
640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ActionSelectComponent, decorators: [{
|
|
641
|
+
type: Component,
|
|
642
|
+
args: [{ selector: 'yuv-tile-action-select', standalone: true, imports: [NgClass, YvcIconModule], template: "<div class=\"actions\">\n @for (a of actions(); track a.id) {\n <button [ngClass]=\"{ selected: selectedActionIds().includes(a.id) }\" (click)=\"actionSelect.emit(a)\">\n <yvc-icon [svg]=\"a.icon!\"></yvc-icon>{{ a.label }}\n </button>\n }\n</div>\n", styles: [":host .actions button{width:100%;border:1px solid var(--panel-divider-color);border-radius:0;margin-block-end:1px}:host .actions button.selected{background-color:var(--color-accent);color:var(--color-accent-tone)}\n"] }]
|
|
643
|
+
}] });
|
|
644
|
+
|
|
645
|
+
class IconSelectComponent {
|
|
646
|
+
constructor() {
|
|
647
|
+
this.objectType = input();
|
|
648
|
+
this.iconSelect = output();
|
|
649
|
+
}
|
|
650
|
+
async createIcon(inputEl) {
|
|
651
|
+
const file = inputEl.files ? inputEl.files[0] : undefined;
|
|
652
|
+
if (file) {
|
|
653
|
+
const text = await file.text();
|
|
654
|
+
this.#emit(text);
|
|
655
|
+
}
|
|
656
|
+
else
|
|
657
|
+
this.#emit(null);
|
|
658
|
+
}
|
|
659
|
+
reset() {
|
|
660
|
+
this.#emit(null);
|
|
661
|
+
}
|
|
662
|
+
#emit(data) {
|
|
663
|
+
this.iconSelect.emit(data);
|
|
664
|
+
}
|
|
665
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IconSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
666
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: IconSelectComponent, isStandalone: true, selector: "yuv-icon-select", inputs: { objectType: { classPropertyName: "objectType", publicName: "objectType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { iconSelect: "iconSelect" }, ngImport: i0, template: "<input style=\"display: none\" #fileInput type=\"file\" accept=\".svg\" (change)=\"createIcon(fileInput)\" />\n\n<button class=\"primary\" (click)=\"fileInput.click()\">{{ 'yuv.tile-config.icon-select.pick' | translate }}</button>\n<button class=\"secondary\" (click)=\"reset()\">{{ 'yuv.tile-config.icon-select.reset' | translate }}</button>\n", styles: [":host{display:flex;gap:var(--app-pane-padding)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
667
|
+
}
|
|
668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IconSelectComponent, decorators: [{
|
|
669
|
+
type: Component,
|
|
670
|
+
args: [{ selector: 'yuv-icon-select', standalone: true, imports: [CommonModule, TranslateModule], template: "<input style=\"display: none\" #fileInput type=\"file\" accept=\".svg\" (change)=\"createIcon(fileInput)\" />\n\n<button class=\"primary\" (click)=\"fileInput.click()\">{{ 'yuv.tile-config.icon-select.pick' | translate }}</button>\n<button class=\"secondary\" (click)=\"reset()\">{{ 'yuv.tile-config.icon-select.reset' | translate }}</button>\n", styles: [":host{display:flex;gap:var(--app-pane-padding)}\n"] }]
|
|
671
|
+
}] });
|
|
672
|
+
|
|
673
|
+
class PropertySelectComponent {
|
|
674
|
+
constructor() {
|
|
675
|
+
this.system = inject(SystemService);
|
|
676
|
+
// fields that should not be available to be placed in the slots
|
|
677
|
+
this.#excludeFields = [
|
|
678
|
+
BaseObjectTypeField.PARENT_ID,
|
|
679
|
+
BaseObjectTypeField.PARENT_OBJECT_TYPE_ID,
|
|
680
|
+
BaseObjectTypeField.OBJECT_ID,
|
|
681
|
+
BaseObjectTypeField.OBJECT_TYPE_ID,
|
|
682
|
+
BaseObjectTypeField.BASE_TYPE_ID,
|
|
683
|
+
BaseObjectTypeField.PARENT_VERSION_NUMBER,
|
|
684
|
+
BaseObjectTypeField.SECONDARY_OBJECT_TYPE_IDS,
|
|
685
|
+
BaseObjectTypeField.TAGS,
|
|
686
|
+
BaseObjectTypeField.TENANT,
|
|
687
|
+
BaseObjectTypeField.TRACE_ID,
|
|
688
|
+
ContentStreamField.REPOSITORY_ID,
|
|
689
|
+
ContentStreamField.DIGEST,
|
|
690
|
+
ContentStreamField.ARCHIVE_PATH,
|
|
691
|
+
ContentStreamField.ID,
|
|
692
|
+
ContentStreamField.RANGE
|
|
693
|
+
];
|
|
694
|
+
this.objectTypeFields = [];
|
|
695
|
+
this.clearIcon = ICONS.clear;
|
|
696
|
+
this.query = signal(null);
|
|
697
|
+
this.objectType = input();
|
|
698
|
+
this.filteredObjectTypeFields = computed(() => {
|
|
699
|
+
return this.query() !== null
|
|
700
|
+
? this.objectTypeFields.filter((otf) => otf.label.toLowerCase().indexOf(this.query()?.toLocaleLowerCase() || '') !== -1)
|
|
701
|
+
: this.getObjectTypeFields(this.objectType());
|
|
702
|
+
});
|
|
703
|
+
this.objectTypesEffect = effect(() => {
|
|
704
|
+
untracked(() => this.getObjectTypeFields(this.objectType()));
|
|
705
|
+
});
|
|
706
|
+
this.selectedProperty = input();
|
|
707
|
+
this.propertySelect = output();
|
|
708
|
+
}
|
|
709
|
+
// fields that should not be available to be placed in the slots
|
|
710
|
+
#excludeFields;
|
|
711
|
+
selectProperty(field) {
|
|
712
|
+
this.propertySelect.emit(field);
|
|
713
|
+
}
|
|
714
|
+
removeProperty(evt) {
|
|
715
|
+
evt.stopPropagation();
|
|
716
|
+
this.propertySelect.emit(undefined);
|
|
717
|
+
}
|
|
718
|
+
getObjectTypeFields(type) {
|
|
719
|
+
if (!type)
|
|
720
|
+
return [];
|
|
721
|
+
// load properties
|
|
722
|
+
const otf = [];
|
|
723
|
+
if (type.sots && type.sots.length > 0) {
|
|
724
|
+
type.sots.forEach((s) => {
|
|
725
|
+
const sot = this.system.getSecondaryObjectType(s);
|
|
726
|
+
if (sot)
|
|
727
|
+
sot.fields.forEach((of) => otf.push({
|
|
728
|
+
id: of.id,
|
|
729
|
+
label: this._getLabel(of)
|
|
730
|
+
}));
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
let objectTypeProperties = [];
|
|
734
|
+
if (type.objectType) {
|
|
735
|
+
const ot = this.system.getObjectType(type.objectType);
|
|
736
|
+
objectTypeProperties = (ot?.fields || []).map((otf) => ({ ...otf, label: this._getLabel(otf), baseProperty: true }));
|
|
737
|
+
}
|
|
738
|
+
this.objectTypeFields = [...objectTypeProperties, ...otf]
|
|
739
|
+
.filter((f) => f.id && !this.#excludeFields.includes(f.id))
|
|
740
|
+
// sort alphanummeric by label
|
|
741
|
+
.sort(Utils.sortValues('label', Sort.ASC))
|
|
742
|
+
// put base properties at the end
|
|
743
|
+
.sort(Utils.sortValues('baseProperty', Sort.ASC));
|
|
744
|
+
return this.objectTypeFields;
|
|
745
|
+
}
|
|
746
|
+
_getLabel(otf) {
|
|
747
|
+
return this.system.getLocalizedLabel(otf.id) || otf.id;
|
|
748
|
+
}
|
|
749
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PropertySelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
750
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PropertySelectComponent, isStandalone: true, selector: "yuv-tile-property-select", inputs: { objectType: { classPropertyName: "objectType", publicName: "objectType", isSignal: true, isRequired: false, transformFunction: null }, selectedProperty: { classPropertyName: "selectedProperty", publicName: "selectedProperty", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { propertySelect: "propertySelect" }, ngImport: i0, template: "<!-- TODO: enable once filtering of properties makes sense -->\n<!-- <form class=\"filter\">\n <div class=\"filter-input\">\n <input type=\"text\" [placeholder]=\"'yuv.tile-config.property-select.filter.placeholder' | translate\" name=\"query\" [(ngModel)]=\"query\" />\n @if (query()) {\n <button class=\"icn\" (click)=\"query.set(null)\">\n <yvc-icon [svg]=\"clearIcon\"></yvc-icon>\n </button>\n }\n </div>\n</form> -->\n\n<ul class=\"properties\">\n @for (p of filteredObjectTypeFields(); track $index) {\n <li [ngClass]=\"{ baseProperty: p.baseProperty, selected: p.id === selectedProperty()?.propertyName }\" (click)=\"selectProperty(p)\">\n <div class=\"label\">{{ p.label }}</div>\n <button (click)=\"removeProperty($event)\"><yvc-icon [svg]=\"clearIcon\"></yvc-icon>\n </button>\n </li>\n }\n</ul>\n", styles: [":host{display:flex;flex-flow:column;max-height:100%}:host .filter{flex:0 0 auto}:host .filter .filter-input{background-color:var(--panel-background);border:1px solid var(--panel-divider-color);display:flex;padding:.25em;align-items:center}:host .filter .filter-input input{background-color:transparent;border:0;outline:0;flex:1;color:var(--text-color-body)}:host .filter .filter-input button{width:1.5em;height:1.5em;border-radius:50%;padding:0}:host ul.properties{list-style:none;margin:0;padding:0;flex:1;column-count:3;column-width:30ch;column-rule:1px dotted var(--text-color-hint);column-gap:2em;margin-block-start:var(--app-pane-padding)}:host ul.properties li{border:1px solid var(--panel-divider-color);border-radius:0;margin-block-end:1px;display:flex;align-items:center;justify-content:space-between;cursor:default}:host ul.properties li:hover{background-color:var(--item-focus-background-color)}:host ul.properties li.baseProperty{font-style:italic}:host ul.properties li.selected{background-color:var(--color-accent);color:var(--color-accent-tone)}:host ul.properties li:not(.selected) button{display:none}:host ul.properties li .label{padding:calc(var(--app-pane-padding) / 2) var(--app-pane-padding)}:host ul.properties li button{--icon-size: 18px;color:currentColor;padding:0 calc(var(--app-pane-padding) / 2);align-self:stretch}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }] }); }
|
|
751
|
+
}
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PropertySelectComponent, decorators: [{
|
|
753
|
+
type: Component,
|
|
754
|
+
args: [{ selector: 'yuv-tile-property-select', standalone: true, imports: [NgClass, FormsModule, TranslateModule, YvcIconModule], template: "<!-- TODO: enable once filtering of properties makes sense -->\n<!-- <form class=\"filter\">\n <div class=\"filter-input\">\n <input type=\"text\" [placeholder]=\"'yuv.tile-config.property-select.filter.placeholder' | translate\" name=\"query\" [(ngModel)]=\"query\" />\n @if (query()) {\n <button class=\"icn\" (click)=\"query.set(null)\">\n <yvc-icon [svg]=\"clearIcon\"></yvc-icon>\n </button>\n }\n </div>\n</form> -->\n\n<ul class=\"properties\">\n @for (p of filteredObjectTypeFields(); track $index) {\n <li [ngClass]=\"{ baseProperty: p.baseProperty, selected: p.id === selectedProperty()?.propertyName }\" (click)=\"selectProperty(p)\">\n <div class=\"label\">{{ p.label }}</div>\n <button (click)=\"removeProperty($event)\"><yvc-icon [svg]=\"clearIcon\"></yvc-icon>\n </button>\n </li>\n }\n</ul>\n", styles: [":host{display:flex;flex-flow:column;max-height:100%}:host .filter{flex:0 0 auto}:host .filter .filter-input{background-color:var(--panel-background);border:1px solid var(--panel-divider-color);display:flex;padding:.25em;align-items:center}:host .filter .filter-input input{background-color:transparent;border:0;outline:0;flex:1;color:var(--text-color-body)}:host .filter .filter-input button{width:1.5em;height:1.5em;border-radius:50%;padding:0}:host ul.properties{list-style:none;margin:0;padding:0;flex:1;column-count:3;column-width:30ch;column-rule:1px dotted var(--text-color-hint);column-gap:2em;margin-block-start:var(--app-pane-padding)}:host ul.properties li{border:1px solid var(--panel-divider-color);border-radius:0;margin-block-end:1px;display:flex;align-items:center;justify-content:space-between;cursor:default}:host ul.properties li:hover{background-color:var(--item-focus-background-color)}:host ul.properties li.baseProperty{font-style:italic}:host ul.properties li.selected{background-color:var(--color-accent);color:var(--color-accent-tone)}:host ul.properties li:not(.selected) button{display:none}:host ul.properties li .label{padding:calc(var(--app-pane-padding) / 2) var(--app-pane-padding)}:host ul.properties li button{--icon-size: 18px;color:currentColor;padding:0 calc(var(--app-pane-padding) / 2);align-self:stretch}\n"] }]
|
|
755
|
+
}] });
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Component for setting up a tile config
|
|
759
|
+
*/
|
|
760
|
+
class TileConfigTileComponent {
|
|
761
|
+
constructor() {
|
|
762
|
+
this.actionService = inject(ActionsService);
|
|
763
|
+
this.elRef = inject(ElementRef);
|
|
764
|
+
this.#system = inject(SystemService);
|
|
765
|
+
this.disableIconSlot = input();
|
|
766
|
+
this.disableBadgesSlot = input();
|
|
767
|
+
this.objectConfigInput = input.required({ alias: 'objectConfig' });
|
|
768
|
+
this.objectConfig = computed(() => {
|
|
769
|
+
const oc = this.objectConfigInput();
|
|
770
|
+
if (oc) {
|
|
771
|
+
[oc.title, oc.description, oc.meta, oc.aside].forEach((field) => {
|
|
772
|
+
if (field) {
|
|
773
|
+
const label = this.#system.getLocalizedLabel(field.propertyName);
|
|
774
|
+
field.label = label || field.label || field.propertyName;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
return oc;
|
|
779
|
+
});
|
|
780
|
+
this.actions = computed(() => {
|
|
781
|
+
const actionsList = [];
|
|
782
|
+
const ocActions = this.objectConfig();
|
|
783
|
+
if (ocActions.actions?.length) {
|
|
784
|
+
ocActions.actions?.forEach((a) => {
|
|
785
|
+
const aa = this.actionService.getActionById(a.id);
|
|
786
|
+
if (aa)
|
|
787
|
+
actionsList.push(aa);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
return actionsList;
|
|
791
|
+
});
|
|
792
|
+
this.slotSelect = output();
|
|
793
|
+
}
|
|
794
|
+
#system;
|
|
795
|
+
selectSlot(slot) {
|
|
796
|
+
if (this.disableIconSlot() && slot === 'icon')
|
|
797
|
+
return;
|
|
798
|
+
this.slotSelect.emit(slot);
|
|
799
|
+
// set active state
|
|
800
|
+
this.elRef.nativeElement.querySelectorAll('[data-slot]').forEach((e) => {
|
|
801
|
+
if (e.getAttribute('data-slot') === slot)
|
|
802
|
+
e.classList.add('active');
|
|
803
|
+
else
|
|
804
|
+
e.classList.remove('active');
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileConfigTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
808
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TileConfigTileComponent, isStandalone: true, selector: "yuv-tile-config-tile", inputs: { disableIconSlot: { classPropertyName: "disableIconSlot", publicName: "disableIconSlot", isSignal: true, isRequired: false, transformFunction: null }, disableBadgesSlot: { classPropertyName: "disableBadgesSlot", publicName: "disableBadgesSlot", isSignal: true, isRequired: false, transformFunction: null }, objectConfigInput: { classPropertyName: "objectConfigInput", publicName: "objectConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { slotSelect: "slotSelect" }, ngImport: i0, template: "@let oc = objectConfig();\n\n<div data-slot=\"icon\" [attr.disabled]=\"disableIconSlot()\" (click)=\"selectSlot('icon')\">\n @if (oc.icon) {\n <yvc-icon [svg]=\"oc.icon.svg\"></yvc-icon>\n } @else {\n <yuv-object-type-icon [objectTypeId]=\"oc.objectTypeId\"></yuv-object-type-icon>\n }\n</div>\n<div data-slot=\"title\" (click)=\"selectSlot('title')\">{{ oc.title?.label }}</div>\n<div data-slot=\"actions\" (click)=\"selectSlot('actions')\">\n @for (a of actions(); track a.id) {\n <button [title]=\"a.label\"><yvc-icon [svg]=\"a.icon\"></yvc-icon></button>\n }\n</div>\n<div data-slot=\"description\" (click)=\"selectSlot('description')\">{{ oc.description?.label }}</div>\n<div data-slot=\"aside\" (click)=\"selectSlot('aside')\">{{ oc.aside?.label }}</div>\n<div data-slot=\"meta\" (click)=\"selectSlot('meta')\">{{ oc.meta?.label }}</div>\n@if (!disableBadgesSlot()) {\n <div data-slot=\"badges\" (click)=\"selectSlot('badges')\">\n <!-- {{ tile().badges }} -->\n {{ oc.badges }}\n </div>\n}\n", styles: [":host{--tile-item-gap: .5em;--tile-background: transparent;--tile-icon-fill: currentColor;display:grid;grid-template-rows:auto auto auto auto;grid-template-columns:3rem 1fr auto;grid-template-areas:\"icon title title actions\" \"icon description aside aside\" \"icon meta meta badges\";gap:var(--tile-item-gap);padding:var(--app-pane-padding);background-color:var(--tile-background)}:host:hover [data-slot=actions]{opacity:1}:host [data-slot=icon]{grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{grid-area:title;font-weight:700}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{flex:0 0 auto;display:flex;justify-self:end;grid-area:actions}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]){display:flex;align-items:center;background-color:var(--panel-background-grey);padding:.25em .5em;box-sizing:border-box;min-height:1.7em;border-radius:.25em}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]){cursor:pointer}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]).active,:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]):hover{background-color:var(--color-accent);color:var(--color-accent-tone)}:host :where([data-slot=badges],[data-slot=actions]){min-width:3em}:host :where([data-slot=badges],[data-slot=actions]) button{pointer-events:none;color:currentColor}:host [data-slot=aside]{min-width:4em}:host [data-slot=icon]{height:3em;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectTypeIconComponent, selector: "yuv-object-type-icon", inputs: ["objectTypeId"] }] }); }
|
|
809
|
+
}
|
|
810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileConfigTileComponent, decorators: [{
|
|
811
|
+
type: Component,
|
|
812
|
+
args: [{ selector: 'yuv-tile-config-tile', standalone: true, imports: [YvcIconModule, CommonModule, ObjectTypeIconComponent], template: "@let oc = objectConfig();\n\n<div data-slot=\"icon\" [attr.disabled]=\"disableIconSlot()\" (click)=\"selectSlot('icon')\">\n @if (oc.icon) {\n <yvc-icon [svg]=\"oc.icon.svg\"></yvc-icon>\n } @else {\n <yuv-object-type-icon [objectTypeId]=\"oc.objectTypeId\"></yuv-object-type-icon>\n }\n</div>\n<div data-slot=\"title\" (click)=\"selectSlot('title')\">{{ oc.title?.label }}</div>\n<div data-slot=\"actions\" (click)=\"selectSlot('actions')\">\n @for (a of actions(); track a.id) {\n <button [title]=\"a.label\"><yvc-icon [svg]=\"a.icon\"></yvc-icon></button>\n }\n</div>\n<div data-slot=\"description\" (click)=\"selectSlot('description')\">{{ oc.description?.label }}</div>\n<div data-slot=\"aside\" (click)=\"selectSlot('aside')\">{{ oc.aside?.label }}</div>\n<div data-slot=\"meta\" (click)=\"selectSlot('meta')\">{{ oc.meta?.label }}</div>\n@if (!disableBadgesSlot()) {\n <div data-slot=\"badges\" (click)=\"selectSlot('badges')\">\n <!-- {{ tile().badges }} -->\n {{ oc.badges }}\n </div>\n}\n", styles: [":host{--tile-item-gap: .5em;--tile-background: transparent;--tile-icon-fill: currentColor;display:grid;grid-template-rows:auto auto auto auto;grid-template-columns:3rem 1fr auto;grid-template-areas:\"icon title title actions\" \"icon description aside aside\" \"icon meta meta badges\";gap:var(--tile-item-gap);padding:var(--app-pane-padding);background-color:var(--tile-background)}:host:hover [data-slot=actions]{opacity:1}:host [data-slot=icon]{grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{grid-area:title;font-weight:700}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{flex:0 0 auto;display:flex;justify-self:end;grid-area:actions}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]){display:flex;align-items:center;background-color:var(--panel-background-grey);padding:.25em .5em;box-sizing:border-box;min-height:1.7em;border-radius:.25em}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]){cursor:pointer}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]).active,:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]):hover{background-color:var(--color-accent);color:var(--color-accent-tone)}:host :where([data-slot=badges],[data-slot=actions]){min-width:3em}:host :where([data-slot=badges],[data-slot=actions]) button{pointer-events:none;color:currentColor}:host [data-slot=aside]{min-width:4em}:host [data-slot=icon]{height:3em;width:100%}\n"] }]
|
|
813
|
+
}] });
|
|
814
|
+
|
|
815
|
+
class TileConfigComponent {
|
|
816
|
+
constructor() {
|
|
817
|
+
this.#objectConfigService = inject(ObjectConfigService);
|
|
818
|
+
this.#system = inject(SystemService);
|
|
819
|
+
/**
|
|
820
|
+
* Tile configurations are stored globally for all apps. If you want a
|
|
821
|
+
* separate config for your app/component you can specify a bucket. A bucket
|
|
822
|
+
* is basically an ID where your custom tile config will be stored and
|
|
823
|
+
* retrieved. Buckets should be unique so be sure to use a unique namespace.
|
|
824
|
+
*/
|
|
825
|
+
this.bucket = input(undefined);
|
|
826
|
+
this.bucketLabel = input(undefined);
|
|
827
|
+
this.configTypes = input(undefined);
|
|
828
|
+
this.configFlavors = input([]);
|
|
829
|
+
this.types = computed(() => {
|
|
830
|
+
const ct = this.configTypes() || [];
|
|
831
|
+
const cf = [];
|
|
832
|
+
// TODO: enable when flavors are supported in tile config
|
|
833
|
+
// const cf = this.configFlavors() || [];
|
|
834
|
+
return [...ct.map((t) => ({ id: t.id, icon: t.icon, data: t })), ...cf.map((f) => ({ id: f.id, icon: f.icon, flavor: true, data: f }))];
|
|
835
|
+
});
|
|
836
|
+
this.save = output();
|
|
837
|
+
this.cancel = output();
|
|
838
|
+
this.selectedTypeProperties = [];
|
|
839
|
+
this._emptyObjectConfig = {
|
|
840
|
+
objectTypeId: '',
|
|
841
|
+
title: { propertyName: '', label: '' },
|
|
842
|
+
description: { propertyName: '', label: '' },
|
|
843
|
+
meta: { propertyName: '', label: '' },
|
|
844
|
+
aside: { propertyName: '', label: '' },
|
|
845
|
+
actions: [],
|
|
846
|
+
badges: []
|
|
847
|
+
};
|
|
848
|
+
this.flavors = [];
|
|
849
|
+
this.icons = {
|
|
850
|
+
clear: ICONS.clear
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
#objectConfigService;
|
|
854
|
+
#system;
|
|
855
|
+
// getObjectFlavorEffect = effect(() => {
|
|
856
|
+
// this.flavors = this.configFlavors();
|
|
857
|
+
// });
|
|
858
|
+
getConfigValue(p) {
|
|
859
|
+
return this.objectConfig ? this.objectConfig[p] : undefined;
|
|
860
|
+
}
|
|
861
|
+
getConfigProperty(p) {
|
|
862
|
+
return this.getConfigValue(p);
|
|
863
|
+
}
|
|
864
|
+
getSelectedActions() {
|
|
865
|
+
return this.objectConfig?.actions ? this.objectConfig.actions.map((a) => a.id) : [];
|
|
866
|
+
}
|
|
867
|
+
slotSelect(item) {
|
|
868
|
+
this.selectedSlot = item;
|
|
869
|
+
}
|
|
870
|
+
itemSelected(idx) {
|
|
871
|
+
const t = this.types()[idx[0]];
|
|
872
|
+
if (!t)
|
|
873
|
+
return;
|
|
874
|
+
if (t.flavor)
|
|
875
|
+
this.#selectFlavor(t.data);
|
|
876
|
+
else
|
|
877
|
+
this.#selectType(t.data);
|
|
878
|
+
}
|
|
879
|
+
#selectFlavor(flavor) {
|
|
880
|
+
const t = this.#system.getObjectType(flavor.sot);
|
|
881
|
+
if (t)
|
|
882
|
+
this.#selectType({
|
|
883
|
+
id: flavor.id,
|
|
884
|
+
objectType: flavor.objectTypeID,
|
|
885
|
+
sots: [flavor.sot]
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
async #selectType(t) {
|
|
889
|
+
this.selectedType = t;
|
|
890
|
+
// load tile config
|
|
891
|
+
this.objectConfig = await this.#objectConfigService.getObjectConfig(t, this.bucket() || '');
|
|
892
|
+
if (!this.objectConfig) {
|
|
893
|
+
this.objectConfig = {
|
|
894
|
+
...this._emptyObjectConfig,
|
|
895
|
+
objectTypeId: t.id
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
iconSelected(icon) {
|
|
900
|
+
if (this.objectConfig)
|
|
901
|
+
this.objectConfig.icon = icon ? { svg: icon } : undefined;
|
|
902
|
+
}
|
|
903
|
+
propertySelected(tileSlot, field) {
|
|
904
|
+
const p = {};
|
|
905
|
+
p[tileSlot] = field
|
|
906
|
+
? {
|
|
907
|
+
label: field.label,
|
|
908
|
+
propertyName: field.id
|
|
909
|
+
}
|
|
910
|
+
: undefined;
|
|
911
|
+
this.objectConfig = structuredClone({
|
|
912
|
+
...this.objectConfig,
|
|
913
|
+
...p
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
actionSelected(action) {
|
|
917
|
+
if (this.objectConfig) {
|
|
918
|
+
if (!this.objectConfig?.actions)
|
|
919
|
+
this.objectConfig.actions = [];
|
|
920
|
+
const idx = this.objectConfig.actions.findIndex((a) => a.id === action.id);
|
|
921
|
+
if (idx !== -1)
|
|
922
|
+
this.objectConfig.actions.splice(idx, 1);
|
|
923
|
+
else
|
|
924
|
+
this.objectConfig.actions.push({ id: action.id });
|
|
925
|
+
this.objectConfig = structuredClone(this.objectConfig);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
saveConfig() {
|
|
929
|
+
this._saveTileConfig();
|
|
930
|
+
}
|
|
931
|
+
_saveTileConfig() {
|
|
932
|
+
if (this.selectedType && this.objectConfig) {
|
|
933
|
+
this.#objectConfigService.saveObjectConfig(this.selectedType, this.objectConfig, this.bucket()).subscribe((_) => this.save.emit());
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
937
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TileConfigComponent, isStandalone: true, selector: "yuv-tile-config", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, bucketLabel: { classPropertyName: "bucketLabel", publicName: "bucketLabel", isSignal: true, isRequired: false, transformFunction: null }, configTypes: { classPropertyName: "configTypes", publicName: "configTypes", isSignal: true, isRequired: false, transformFunction: null }, configFlavors: { classPropertyName: "configFlavors", publicName: "configFlavors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", cancel: "cancel" }, ngImport: i0, template: "<header>\n <h1>{{ 'yuv.tile-config.title' | translate }}</h1>\n <div class=\"bucket\">{{ bucketLabel() }}</div>\n @if (cancel) {\n <button class=\"icon\" (click)=\"cancel.emit()\">\n <yvc-icon [svg]=\"icons.clear\"></yvc-icon>\n </button>\n }\n</header>\n\n<yvc-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"'yuv.framework.tile-config.layout'\">\n <!-- list of types -->\n <ng-template yvcSplitArea [size]=\"30\">\n <div class=\"types\">\n <yuv-list (itemSelect)=\"itemSelected($event)\">\n @for (t of types() || []; track t.id) {\n <div yuvListItem>\n @if (t.icon) {\n <yvc-icon [svg]=\"t.icon\"></yvc-icon>\n } @else {\n <yuv-object-type-icon [objectTypeId]=\"t.id\"></yuv-object-type-icon>\n }\n {{ t.id | translate }}\n </div>\n }\n </yuv-list>\n </div>\n </ng-template>\n\n <!-- selected type details-->\n <ng-template yvcSplitArea [size]=\"70\">\n <div class=\"details\">\n @if (selectedType) {\n <header>{{ selectedType.id | translate }}</header>\n <div class=\"dummy-preview\">\n <yuv-tile-config-tile [disableIconSlot]=\"true\" [disableBadgesSlot]=\"true\" [objectConfig]=\"objectConfig!\" (slotSelect)=\"slotSelect($event)\"></yuv-tile-config-tile>\n </div>\n <main>\n @if (selectedSlot === 'icon') {\n <h2>{{ 'yuv.tile-config.slot.icon.headline' | translate }}</h2>\n <yuv-icon-select [objectType]=\"selectedType\" (iconSelect)=\"iconSelected($event)\"></yuv-icon-select>\n } @else if (selectedSlot === 'badges') {\n <div class=\"placeholder empty\">\n <p>Future feature: Select badges (like: is favorite, ratings, ...)</p>\n </div>\n } @else if (!selectedSlot) {\n } @else if (selectedSlot === 'actions') {\n <h2>{{ 'yuv.tile-config.slot.action.headline' | translate }}</h2>\n <yuv-tile-action-select\n [objectType]=\"selectedType\"\n [selectedActionIds]=\"getSelectedActions()\"\n (actionSelect)=\"actionSelected($event)\"\n ></yuv-tile-action-select>\n } @else {\n <h2>{{ 'yuv.tile-config.slot.property.headline' | translate }}</h2>\n <yuv-tile-property-select\n [objectType]=\"selectedType\"\n [selectedProperty]=\"getConfigProperty(selectedSlot)\"\n (propertySelect)=\"propertySelected(selectedSlot, $event)\"\n ></yuv-tile-property-select>\n }\n </main>\n <footer>\n <button class=\"primary\" (click)=\"saveConfig()\">{{ 'yuv.tile-config.button.save' | translate }}</button>\n </footer>\n } @else {\n <div class=\"placeholder empty\">\n <h2>{{ 'yuv.tile-config.details.empty.title' | translate }}</h2>\n <p>{{ 'yuv.tile-config.details.empty.description' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n</yvc-split-view>\n", styles: [":host{display:flex;height:100%;flex-flow:column}:host header{flex:0 0 auto;display:grid;grid-template-rows:auto auto;grid-template-columns:1fr auto;grid-template-areas:\"title close\" \"bucket close\";padding:var(--app-pane-padding);border-block-end:1px solid var(--panel-divider-color)}:host header h1{grid-area:title;padding:0;margin:0 0 .5rem;font-size:var(--font-title);font-weight:400}:host header .bucket{grid-area:bucket}:host header button{grid-area:close;align-self:start;--icon-size: 18px}:host yvc-split-view{flex:1}:host .details{box-sizing:border-box}:host div.types{box-sizing:border-box;height:100%;overflow-y:auto;background-color:var(--panel-background-lightgrey)}:host div.types div[yuvListItem]{display:flex;gap:var(--app-pane-padding);align-items:center;padding:calc(var(--app-pane-padding) / 2) var(--app-pane-padding);cursor:pointer}:host div.types div[yuvListItem]:not([aria-selected=true]):hover,:host div.types div[yuvListItem]:not([aria-selected=true])[aria-current=true]{background-color:var(--item-focus-background-color)}:host div.types div[yuvListItem][aria-selected=true]{background-color:var(--color-accent);color:var(--color-accent-tone)}:host div.types div[yuvListItem] yvc-icon,:host div.types div[yuvListItem] yuv-object-type-icon{flex:0 0 auto;color:currentColor;opacity:.54}:host .details{height:100%;display:flex;flex-flow:column;overflow:hidden;background-color:var(--panel-background-lightgrey)}:host .details header{flex:0 0 auto;border-bottom:1px solid var(--panel-divider-color);padding:var(--app-pane-padding);font-size:var(--font-title)}:host .details .dummy-preview{flex:0 0 auto;padding:var(--app-pane-padding);background-color:var(--panel-background-grey);border-bottom:1px solid var(--panel-divider-color)}:host .details .dummy-preview yuv-tile-config-tile{border:1px solid var(--panel-divider-color);background-color:var(--panel-background)}:host .details main{flex:1;overflow-y:auto;padding:var(--app-pane-padding)}:host .details main h2{margin:0;padding-block-end:var(--app-pane-padding);font-size:var(--font-subhead)}:host .details .placeholder.empty{height:100%;display:grid;place-content:center;color:var(--text-color-hint)}:host .details footer{flex:0 0 auto;padding:calc(var(--app-pane-padding) / 2);display:flex;justify-content:flex-end;gap:calc(var(--app-pane-padding) / 4)}\n"], dependencies: [{ kind: "ngmodule", type: YvcSplitViewModule }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yvc-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "gutterDblClickDuration", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yvcSplitArea]", inputs: ["size", "order", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: ObjectTypeIconComponent, selector: "yuv-object-type-icon", inputs: ["objectTypeId"] }, { kind: "component", type: TileConfigTileComponent, selector: "yuv-tile-config-tile", inputs: ["disableIconSlot", "disableBadgesSlot", "objectConfig"], outputs: ["slotSelect"] }, { kind: "component", type: IconSelectComponent, selector: "yuv-icon-select", inputs: ["objectType"], outputs: ["iconSelect"] }, { kind: "component", type: PropertySelectComponent, selector: "yuv-tile-property-select", inputs: ["objectType", "selectedProperty"], outputs: ["propertySelect"] }, { kind: "component", type: ActionSelectComponent, selector: "yuv-tile-action-select", inputs: ["objectType", "selectedActionIds"], outputs: ["actionSelect"] }, { kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ListComponent, selector: "yuv-list", inputs: ["multiselect", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }] }); }
|
|
938
|
+
}
|
|
939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileConfigComponent, decorators: [{
|
|
940
|
+
type: Component,
|
|
941
|
+
args: [{ selector: 'yuv-tile-config', standalone: true, imports: [
|
|
942
|
+
NgClass,
|
|
943
|
+
YvcSplitViewModule,
|
|
944
|
+
ObjectTypeIconComponent,
|
|
945
|
+
TileConfigTileComponent,
|
|
946
|
+
IconSelectComponent,
|
|
947
|
+
PropertySelectComponent,
|
|
948
|
+
ActionSelectComponent,
|
|
949
|
+
YvcIconModule,
|
|
950
|
+
TranslateModule,
|
|
951
|
+
ListComponent,
|
|
952
|
+
ListItemDirective
|
|
953
|
+
], template: "<header>\n <h1>{{ 'yuv.tile-config.title' | translate }}</h1>\n <div class=\"bucket\">{{ bucketLabel() }}</div>\n @if (cancel) {\n <button class=\"icon\" (click)=\"cancel.emit()\">\n <yvc-icon [svg]=\"icons.clear\"></yvc-icon>\n </button>\n }\n</header>\n\n<yvc-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"'yuv.framework.tile-config.layout'\">\n <!-- list of types -->\n <ng-template yvcSplitArea [size]=\"30\">\n <div class=\"types\">\n <yuv-list (itemSelect)=\"itemSelected($event)\">\n @for (t of types() || []; track t.id) {\n <div yuvListItem>\n @if (t.icon) {\n <yvc-icon [svg]=\"t.icon\"></yvc-icon>\n } @else {\n <yuv-object-type-icon [objectTypeId]=\"t.id\"></yuv-object-type-icon>\n }\n {{ t.id | translate }}\n </div>\n }\n </yuv-list>\n </div>\n </ng-template>\n\n <!-- selected type details-->\n <ng-template yvcSplitArea [size]=\"70\">\n <div class=\"details\">\n @if (selectedType) {\n <header>{{ selectedType.id | translate }}</header>\n <div class=\"dummy-preview\">\n <yuv-tile-config-tile [disableIconSlot]=\"true\" [disableBadgesSlot]=\"true\" [objectConfig]=\"objectConfig!\" (slotSelect)=\"slotSelect($event)\"></yuv-tile-config-tile>\n </div>\n <main>\n @if (selectedSlot === 'icon') {\n <h2>{{ 'yuv.tile-config.slot.icon.headline' | translate }}</h2>\n <yuv-icon-select [objectType]=\"selectedType\" (iconSelect)=\"iconSelected($event)\"></yuv-icon-select>\n } @else if (selectedSlot === 'badges') {\n <div class=\"placeholder empty\">\n <p>Future feature: Select badges (like: is favorite, ratings, ...)</p>\n </div>\n } @else if (!selectedSlot) {\n } @else if (selectedSlot === 'actions') {\n <h2>{{ 'yuv.tile-config.slot.action.headline' | translate }}</h2>\n <yuv-tile-action-select\n [objectType]=\"selectedType\"\n [selectedActionIds]=\"getSelectedActions()\"\n (actionSelect)=\"actionSelected($event)\"\n ></yuv-tile-action-select>\n } @else {\n <h2>{{ 'yuv.tile-config.slot.property.headline' | translate }}</h2>\n <yuv-tile-property-select\n [objectType]=\"selectedType\"\n [selectedProperty]=\"getConfigProperty(selectedSlot)\"\n (propertySelect)=\"propertySelected(selectedSlot, $event)\"\n ></yuv-tile-property-select>\n }\n </main>\n <footer>\n <button class=\"primary\" (click)=\"saveConfig()\">{{ 'yuv.tile-config.button.save' | translate }}</button>\n </footer>\n } @else {\n <div class=\"placeholder empty\">\n <h2>{{ 'yuv.tile-config.details.empty.title' | translate }}</h2>\n <p>{{ 'yuv.tile-config.details.empty.description' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n</yvc-split-view>\n", styles: [":host{display:flex;height:100%;flex-flow:column}:host header{flex:0 0 auto;display:grid;grid-template-rows:auto auto;grid-template-columns:1fr auto;grid-template-areas:\"title close\" \"bucket close\";padding:var(--app-pane-padding);border-block-end:1px solid var(--panel-divider-color)}:host header h1{grid-area:title;padding:0;margin:0 0 .5rem;font-size:var(--font-title);font-weight:400}:host header .bucket{grid-area:bucket}:host header button{grid-area:close;align-self:start;--icon-size: 18px}:host yvc-split-view{flex:1}:host .details{box-sizing:border-box}:host div.types{box-sizing:border-box;height:100%;overflow-y:auto;background-color:var(--panel-background-lightgrey)}:host div.types div[yuvListItem]{display:flex;gap:var(--app-pane-padding);align-items:center;padding:calc(var(--app-pane-padding) / 2) var(--app-pane-padding);cursor:pointer}:host div.types div[yuvListItem]:not([aria-selected=true]):hover,:host div.types div[yuvListItem]:not([aria-selected=true])[aria-current=true]{background-color:var(--item-focus-background-color)}:host div.types div[yuvListItem][aria-selected=true]{background-color:var(--color-accent);color:var(--color-accent-tone)}:host div.types div[yuvListItem] yvc-icon,:host div.types div[yuvListItem] yuv-object-type-icon{flex:0 0 auto;color:currentColor;opacity:.54}:host .details{height:100%;display:flex;flex-flow:column;overflow:hidden;background-color:var(--panel-background-lightgrey)}:host .details header{flex:0 0 auto;border-bottom:1px solid var(--panel-divider-color);padding:var(--app-pane-padding);font-size:var(--font-title)}:host .details .dummy-preview{flex:0 0 auto;padding:var(--app-pane-padding);background-color:var(--panel-background-grey);border-bottom:1px solid var(--panel-divider-color)}:host .details .dummy-preview yuv-tile-config-tile{border:1px solid var(--panel-divider-color);background-color:var(--panel-background)}:host .details main{flex:1;overflow-y:auto;padding:var(--app-pane-padding)}:host .details main h2{margin:0;padding-block-end:var(--app-pane-padding);font-size:var(--font-subhead)}:host .details .placeholder.empty{height:100%;display:grid;place-content:center;color:var(--text-color-hint)}:host .details footer{flex:0 0 auto;padding:calc(var(--app-pane-padding) / 2);display:flex;justify-content:flex-end;gap:calc(var(--app-pane-padding) / 4)}\n"] }]
|
|
954
|
+
}] });
|
|
955
|
+
|
|
956
|
+
class TileConfigTriggerComponent {
|
|
957
|
+
constructor() {
|
|
958
|
+
this.overlayService = inject(YvcOverlayService);
|
|
959
|
+
this.tplTileConfig = viewChild.required('tplTileConfig');
|
|
960
|
+
this.icon = input(YUV_ICONS.settings);
|
|
961
|
+
this.bucket = input();
|
|
962
|
+
this.bucketLabel = input();
|
|
963
|
+
this.options = input(undefined);
|
|
964
|
+
}
|
|
965
|
+
openTileConfigOverlay() {
|
|
966
|
+
const popoverConfig = {
|
|
967
|
+
height: '80%',
|
|
968
|
+
width: '80%'
|
|
969
|
+
// maxWidth: '400px',
|
|
970
|
+
// data: {
|
|
971
|
+
// bucket: this.bucket
|
|
972
|
+
// }
|
|
973
|
+
};
|
|
974
|
+
this._oRef = this.overlayService.open(this.tplTileConfig(), null, popoverConfig);
|
|
975
|
+
}
|
|
976
|
+
onObjectConfigSave() {
|
|
977
|
+
if (this._oRef)
|
|
978
|
+
this._oRef.close();
|
|
979
|
+
}
|
|
980
|
+
onObjectConfigCancel() {
|
|
981
|
+
if (this._oRef)
|
|
982
|
+
this._oRef.close();
|
|
983
|
+
}
|
|
984
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileConfigTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
985
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: TileConfigTriggerComponent, isStandalone: true, selector: "yuv-tile-config-trigger", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, bucketLabel: { classPropertyName: "bucketLabel", publicName: "bucketLabel", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tplTileConfig", first: true, predicate: ["tplTileConfig"], descendants: true, isSignal: true }], ngImport: i0, template: "<button class=\"settings icon\" (click)=\"openTileConfigOverlay()\"\ntitle=\"{{ 'yuv.tile-config.trigger.tooltip' | translate }}\"\n><yvc-icon [svg]=\"icon()\"></yvc-icon></button>\n\n<ng-template #tplTileConfig>\n <yuv-tile-config\n (save)=\"onObjectConfigSave()\"\n (cancel)=\"onObjectConfigCancel()\"\n [bucket]=\"bucket() || undefined\"\n [bucketLabel]=\"bucketLabel()\"\n [configTypes]=\"options()?.configTypes\"\n [configFlavors]=\"options()?.configFlavors || []\"\n ></yuv-tile-config>\n</ng-template>\n", styles: [":host button{padding:var(--button-padding)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TileConfigComponent, selector: "yuv-tile-config", inputs: ["bucket", "bucketLabel", "configTypes", "configFlavors"], outputs: ["save", "cancel"] }, { kind: "ngmodule", type: YvcIconModule }, { kind: "component", type: i1.Icon, selector: "yvc-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
986
|
+
}
|
|
987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileConfigTriggerComponent, decorators: [{
|
|
988
|
+
type: Component,
|
|
989
|
+
args: [{ selector: 'yuv-tile-config-trigger', standalone: true, imports: [CommonModule, TileConfigComponent, YvcIconModule, TranslateModule$1], template: "<button class=\"settings icon\" (click)=\"openTileConfigOverlay()\"\ntitle=\"{{ 'yuv.tile-config.trigger.tooltip' | translate }}\"\n><yvc-icon [svg]=\"icon()\"></yvc-icon></button>\n\n<ng-template #tplTileConfig>\n <yuv-tile-config\n (save)=\"onObjectConfigSave()\"\n (cancel)=\"onObjectConfigCancel()\"\n [bucket]=\"bucket() || undefined\"\n [bucketLabel]=\"bucketLabel()\"\n [configTypes]=\"options()?.configTypes\"\n [configFlavors]=\"options()?.configFlavors || []\"\n ></yuv-tile-config>\n</ng-template>\n", styles: [":host button{padding:var(--button-padding)}\n"] }]
|
|
990
|
+
}] });
|
|
991
|
+
|
|
992
|
+
class EmailTileExtensionComponent {
|
|
993
|
+
constructor() {
|
|
994
|
+
this.data = input.required();
|
|
995
|
+
this.attachments = computed(() => this.data()['appSystemmail:attachments'] || []);
|
|
996
|
+
this.hasAttachements = computed(() => !!this.data()['appSystemmail:attachmentCount']);
|
|
997
|
+
}
|
|
998
|
+
onClick(a, evt) {
|
|
999
|
+
evt.preventDefault();
|
|
1000
|
+
evt.stopPropagation();
|
|
1001
|
+
alert(`You clicked '${a}' my friend.`);
|
|
1002
|
+
}
|
|
1003
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EmailTileExtensionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1004
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: EmailTileExtensionComponent, isStandalone: true, selector: "yuv-email-tile-extension", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.attachments": "hasAttachements()" } }, ngImport: i0, template: `
|
|
1005
|
+
@if (hasAttachements()) {
|
|
1006
|
+
<span>{{ attachments().length }}</span>
|
|
1007
|
+
<svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#5f6368" viewBox="0 -960 960 960">
|
|
1008
|
+
<path
|
|
1009
|
+
d="M720-330q0 104-73 177T470-80q-104 0-177-73t-73-177v-370q0-75 52.5-127.5T400-880q75 0 127.5 52.5T580-700v350q0 46-32 78t-78 32q-46 0-78-32t-32-78v-370h80v370q0 13 8.5 21.5T470-320q13 0 21.5-8.5T500-350v-350q-1-42-29.5-71T400-800q-42 0-71 29t-29 71v370q-1 71 49 120.5T470-160q70 0 119-49.5T640-330v-390h80v390Z"
|
|
1010
|
+
/>
|
|
1011
|
+
</svg>
|
|
1012
|
+
}
|
|
1013
|
+
`, isInline: true, styles: [":host{display:flex;justify-content:end;margin-top:.5rem}:host .icon{height:1rem}\n"] }); }
|
|
1014
|
+
}
|
|
1015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EmailTileExtensionComponent, decorators: [{
|
|
1016
|
+
type: Component,
|
|
1017
|
+
args: [{ selector: 'yuv-email-tile-extension', standalone: true, imports: [NgClass], template: `
|
|
1018
|
+
@if (hasAttachements()) {
|
|
1019
|
+
<span>{{ attachments().length }}</span>
|
|
1020
|
+
<svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#5f6368" viewBox="0 -960 960 960">
|
|
1021
|
+
<path
|
|
1022
|
+
d="M720-330q0 104-73 177T470-80q-104 0-177-73t-73-177v-370q0-75 52.5-127.5T400-880q75 0 127.5 52.5T580-700v350q0 46-32 78t-78 32q-46 0-78-32t-32-78v-370h80v370q0 13 8.5 21.5T470-320q13 0 21.5-8.5T500-350v-350q-1-42-29.5-71T400-800q-42 0-71 29t-29 71v370q-1 71 49 120.5T470-160q70 0 119-49.5T640-330v-390h80v390Z"
|
|
1023
|
+
/>
|
|
1024
|
+
</svg>
|
|
1025
|
+
}
|
|
1026
|
+
`, host: {
|
|
1027
|
+
'[class.attachments]': 'hasAttachements()'
|
|
1028
|
+
}, styles: [":host{display:flex;justify-content:end;margin-top:.5rem}:host .icon{height:1rem}\n"] }]
|
|
1029
|
+
}] });
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Generated bundle index. Do not edit.
|
|
1033
|
+
*/
|
|
1034
|
+
|
|
1035
|
+
export { ActionSelectComponent, EmailTileExtensionComponent, PropertySelectComponent, TileComponent, TileConfigComponent, TileConfigTriggerComponent, TileExtensionDirective, TileExtensionService, TileListComponent };
|
|
1036
|
+
//# sourceMappingURL=yuuvis-client-framework-tile-list.mjs.map
|