@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,1020 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Directive, HostBinding, Input, EventEmitter, HostListener, Output, input, output, NgZone, contentChildren, computed, viewChild, contentChild, Component, forwardRef } from '@angular/core';
|
|
3
|
+
import { Utils } from '@yuuvis/client-core';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { Subject, fromEvent, merge, timer, of, filter as filter$1 } from 'rxjs';
|
|
6
|
+
import { debounceTime, filter, map, switchMap } from 'rxjs/operators';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { YvcOverlayService } from '@yuuvis/components/overlay';
|
|
10
|
+
import * as i2 from '@yuuvis/components/autocomplete';
|
|
11
|
+
import { YvcAutocompleteModule } from '@yuuvis/components/autocomplete';
|
|
12
|
+
import { NG_VALUE_ACCESSOR, NgControl, FormControlDirective, FormControlName, NgModel } from '@angular/forms';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A directive that will overlay its host component with a translucent background
|
|
16
|
+
* and a loading spinner once the condition resolves with true. This is useful for example to
|
|
17
|
+
* prevent user intercation while component data is loading or some processing is done.
|
|
18
|
+
*
|
|
19
|
+
* It'll also set the `inert` attribute on the host element. This will disable the host and
|
|
20
|
+
* all elements inside (like buttons, inputs etc.)
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <div class="result-list" [yuvBusyOverlay]="waitingForServerResponse">...</div>
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
class BusyOverlayDirective {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.stylePosition = 'initial';
|
|
29
|
+
this.#elRef = inject(ElementRef);
|
|
30
|
+
this.#overlayId = null;
|
|
31
|
+
}
|
|
32
|
+
#elRef;
|
|
33
|
+
#overlayId;
|
|
34
|
+
/**
|
|
35
|
+
* The Boolean expression to evaluate as the condition for showing the busy overlay
|
|
36
|
+
*/
|
|
37
|
+
set yuvBusyOverlay(b) {
|
|
38
|
+
if (b === true) {
|
|
39
|
+
this.#addBusyOverlay();
|
|
40
|
+
}
|
|
41
|
+
else if (this.#overlayId) {
|
|
42
|
+
this.#removeBusyOverlay();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
#addBusyOverlay() {
|
|
46
|
+
this.stylePosition = 'relative';
|
|
47
|
+
const overlay = document.createElement('div');
|
|
48
|
+
overlay.style.position = 'absolute';
|
|
49
|
+
overlay.style.transition = 'opacity 200ms';
|
|
50
|
+
overlay.style.opacity = '0';
|
|
51
|
+
overlay.style.inset = '0';
|
|
52
|
+
overlay.style.display = 'grid';
|
|
53
|
+
overlay.style.alignItems = 'center';
|
|
54
|
+
overlay.style.justifyContent = 'center';
|
|
55
|
+
overlay.style.zIndex = '5';
|
|
56
|
+
overlay.style.backgroundColor = 'var(--busy-overlay-background)';
|
|
57
|
+
this.#overlayId = `p${Utils.uuid()}`;
|
|
58
|
+
overlay.setAttribute('id', this.#overlayId);
|
|
59
|
+
const spinner = document.createElement('div');
|
|
60
|
+
spinner.setAttribute('class', 'yuv-loader');
|
|
61
|
+
overlay.append(spinner);
|
|
62
|
+
const el = this.#elRef.nativeElement;
|
|
63
|
+
el.setAttribute('inert', '');
|
|
64
|
+
el.append(overlay);
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
overlay.style.opacity = '1';
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
#removeBusyOverlay() {
|
|
70
|
+
const el = this.#elRef.nativeElement.querySelector(`#${this.#overlayId}`);
|
|
71
|
+
if (el) {
|
|
72
|
+
el.style.opacity = '0';
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
el.remove();
|
|
75
|
+
}, 200);
|
|
76
|
+
}
|
|
77
|
+
this.#elRef.nativeElement.removeAttribute('inert');
|
|
78
|
+
this.#overlayId = null;
|
|
79
|
+
}
|
|
80
|
+
ngOnInit() {
|
|
81
|
+
this.stylePosition = getComputedStyle(this.#elRef.nativeElement).position;
|
|
82
|
+
}
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BusyOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
84
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: BusyOverlayDirective, isStandalone: true, selector: "[yuvBusyOverlay]", inputs: { yuvBusyOverlay: "yuvBusyOverlay" }, host: { properties: { "style.position": "this.stylePosition" } }, ngImport: i0 }); }
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BusyOverlayDirective, decorators: [{
|
|
87
|
+
type: Directive,
|
|
88
|
+
args: [{
|
|
89
|
+
selector: '[yuvBusyOverlay]',
|
|
90
|
+
standalone: true
|
|
91
|
+
}]
|
|
92
|
+
}], propDecorators: { stylePosition: [{
|
|
93
|
+
type: HostBinding,
|
|
94
|
+
args: ['style.position']
|
|
95
|
+
}], yuvBusyOverlay: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}] } });
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Directive keeping track of the focus beeing within a component. Once the component or
|
|
101
|
+
* any of its child components gain focus, a class of `focusWithin` will be set on the
|
|
102
|
+
* host component in order to allow styling it while beeing focused. Furthermore you can
|
|
103
|
+
* register callbacks once the component gets or looses focus.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* // just set the css class
|
|
107
|
+
* <some-component yuvFocusWithin></some-component>
|
|
108
|
+
* // set the css class and listen to focus changes
|
|
109
|
+
* <some-component (yuvFocusWithin)="onFocusEnter()" (yuvFocusWithinBlur)="onFocusLeave()"></some-component>
|
|
110
|
+
*/
|
|
111
|
+
class FocusWithinDirective {
|
|
112
|
+
onFocusIn(evt) {
|
|
113
|
+
const hadFocusWithin = this.hasFocusWithin;
|
|
114
|
+
this.hasFocusWithin = this.matchesFocusWithin();
|
|
115
|
+
if (!hadFocusWithin && this.hasFocusWithin) {
|
|
116
|
+
this.yuvFocusWithin.emit();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
onFocusOut(evt) {
|
|
120
|
+
const hadFocusWithin = this.hasFocusWithin;
|
|
121
|
+
this.hasFocusWithin = this.matchesFocusWithin();
|
|
122
|
+
if (hadFocusWithin && !this.hasFocusWithin) {
|
|
123
|
+
this.yuvFocusWithinBlur.emit();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @ignore
|
|
128
|
+
*/
|
|
129
|
+
constructor(elRef) {
|
|
130
|
+
this.elRef = elRef;
|
|
131
|
+
this.eventCount = 0;
|
|
132
|
+
this.hasFocusWithin = false;
|
|
133
|
+
/**
|
|
134
|
+
* Emitted once the component or any of its child components gains focus.
|
|
135
|
+
*/
|
|
136
|
+
this.yuvFocusWithin = new EventEmitter();
|
|
137
|
+
/**
|
|
138
|
+
* Emitted once the component (incl. any of its child components) looses focus.
|
|
139
|
+
*/
|
|
140
|
+
this.yuvFocusWithinBlur = new EventEmitter();
|
|
141
|
+
}
|
|
142
|
+
// Determine if the given node matches the given selector.
|
|
143
|
+
// @see: https://www.bennadel.com/blog/3476-checking-to-see-if-an-element-has-a-css-pseudo-class-in-javascript.htm
|
|
144
|
+
matchesFocusWithin() {
|
|
145
|
+
const node = this.elRef.nativeElement;
|
|
146
|
+
var nativeMatches = node.matches || node.msMatchesSelector;
|
|
147
|
+
try {
|
|
148
|
+
return nativeMatches.call(node, ':focus-within');
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FocusWithinDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
155
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FocusWithinDirective, isStandalone: true, selector: "[yuvFocusWithin]", outputs: { yuvFocusWithin: "yuvFocusWithin", yuvFocusWithinBlur: "yuvFocusWithinBlur" }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)" }, properties: { "class.focusWithin": "this.hasFocusWithin" } }, ngImport: i0 }); }
|
|
156
|
+
}
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FocusWithinDirective, decorators: [{
|
|
158
|
+
type: Directive,
|
|
159
|
+
args: [{
|
|
160
|
+
selector: '[yuvFocusWithin]',
|
|
161
|
+
standalone: true
|
|
162
|
+
}]
|
|
163
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { hasFocusWithin: [{
|
|
164
|
+
type: HostBinding,
|
|
165
|
+
args: ['class.focusWithin']
|
|
166
|
+
}], onFocusIn: [{
|
|
167
|
+
type: HostListener,
|
|
168
|
+
args: ['focusin', ['$event']]
|
|
169
|
+
}], onFocusOut: [{
|
|
170
|
+
type: HostListener,
|
|
171
|
+
args: ['focusout', ['$event']]
|
|
172
|
+
}], yuvFocusWithin: [{
|
|
173
|
+
type: Output
|
|
174
|
+
}], yuvFocusWithinBlur: [{
|
|
175
|
+
type: Output
|
|
176
|
+
}] } });
|
|
177
|
+
|
|
178
|
+
class FileDropZoneDirective {
|
|
179
|
+
constructor() {
|
|
180
|
+
this.#elRef = inject(ElementRef);
|
|
181
|
+
this.#fileOver = false;
|
|
182
|
+
this.#defaultDragOverCoverStyles = {
|
|
183
|
+
outline: '2px dashed var(--color-accent)',
|
|
184
|
+
display: 'flex',
|
|
185
|
+
transition: 'background-color .3s ease-in-out',
|
|
186
|
+
'z-index': '500',
|
|
187
|
+
'align-items': 'center',
|
|
188
|
+
'justify-content': 'center',
|
|
189
|
+
'outline-offset': '-2px',
|
|
190
|
+
'background-color': 'rgba(var(--color-accent-rgb), .5)'
|
|
191
|
+
};
|
|
192
|
+
this.#defaultDragOverCoverLabelStyles = {
|
|
193
|
+
outline: '1px solid var(--color-accent)',
|
|
194
|
+
padding: 'var(--app-pane-padding, 16px)',
|
|
195
|
+
'background-color': 'rgba(var(--color-accent-rgb), .9)',
|
|
196
|
+
color: 'var(--color-accent-tone)'
|
|
197
|
+
};
|
|
198
|
+
this.yuvFileDropZone = input();
|
|
199
|
+
this.fileDropDisabled = input(false);
|
|
200
|
+
this.fileDrop = output();
|
|
201
|
+
this.fileDropOver = output();
|
|
202
|
+
}
|
|
203
|
+
#elRef;
|
|
204
|
+
#coverElement;
|
|
205
|
+
#fileOver;
|
|
206
|
+
set fileOver(fo) {
|
|
207
|
+
if (fo !== this.#fileOver) {
|
|
208
|
+
this.#fileOver = fo;
|
|
209
|
+
this.fileDropOver.emit(fo);
|
|
210
|
+
this.#toggleCover();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
get fileOver() {
|
|
214
|
+
return this.#fileOver;
|
|
215
|
+
}
|
|
216
|
+
#defaultDragOverCoverStyles;
|
|
217
|
+
#defaultDragOverCoverLabelStyles;
|
|
218
|
+
onDrop(event) {
|
|
219
|
+
if (this.fileDropDisabled())
|
|
220
|
+
return;
|
|
221
|
+
event.preventDefault();
|
|
222
|
+
event.stopPropagation();
|
|
223
|
+
this.fileOver = false;
|
|
224
|
+
const dataTransfer = event.dataTransfer;
|
|
225
|
+
if (dataTransfer) {
|
|
226
|
+
if (dataTransfer?.items) {
|
|
227
|
+
const files = [];
|
|
228
|
+
for (let i = 0; i < dataTransfer.items.length; i++) {
|
|
229
|
+
// If dropped items aren't files, reject them
|
|
230
|
+
if (dataTransfer.items[i].kind === 'file') {
|
|
231
|
+
const file = dataTransfer.items[i].getAsFile();
|
|
232
|
+
if (file)
|
|
233
|
+
files.push(file);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
dataTransfer.items.clear();
|
|
237
|
+
this.fileDrop.emit(files);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
const files = dataTransfer.files;
|
|
241
|
+
dataTransfer.clearData();
|
|
242
|
+
this.fileDrop.emit(Array.from(files));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
onDragOver(event) {
|
|
247
|
+
if (this.fileDropDisabled())
|
|
248
|
+
return;
|
|
249
|
+
event.stopPropagation();
|
|
250
|
+
event.preventDefault();
|
|
251
|
+
this.fileOver = true;
|
|
252
|
+
}
|
|
253
|
+
onDragLeave(event) {
|
|
254
|
+
if (this.fileDropDisabled())
|
|
255
|
+
return;
|
|
256
|
+
if (event.target.getAttribute('id') === this.#coverElement?.getAttribute('id')) {
|
|
257
|
+
this.fileOver = false;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
onBodyDragOver(event) {
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
event.stopPropagation();
|
|
263
|
+
}
|
|
264
|
+
onBodyDrop(event) {
|
|
265
|
+
event.preventDefault();
|
|
266
|
+
}
|
|
267
|
+
#toggleCover() {
|
|
268
|
+
const el = this.#elRef.nativeElement;
|
|
269
|
+
if (this.#coverElement) {
|
|
270
|
+
el.style.position = 'initial';
|
|
271
|
+
this.#coverElement.remove();
|
|
272
|
+
this.#coverElement = undefined;
|
|
273
|
+
}
|
|
274
|
+
if (this.#fileOver) {
|
|
275
|
+
el.style.position = 'relative';
|
|
276
|
+
this.#coverElement = this.#createCoverElement();
|
|
277
|
+
el.append(this.#coverElement);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
#createCoverElement() {
|
|
281
|
+
const coverElement = document.createElement('div');
|
|
282
|
+
coverElement.setAttribute('id', Utils.uuid());
|
|
283
|
+
coverElement.style.position = 'absolute';
|
|
284
|
+
coverElement.style.inset = '0';
|
|
285
|
+
const styles = this.yuvFileDropZone()?.coverStyles || this.#defaultDragOverCoverStyles;
|
|
286
|
+
Object.keys(styles).forEach((k) => {
|
|
287
|
+
coverElement.style[k] = styles[k];
|
|
288
|
+
});
|
|
289
|
+
const label = this.yuvFileDropZone()?.label;
|
|
290
|
+
if (label) {
|
|
291
|
+
const coverLabelElement = document.createElement('div');
|
|
292
|
+
coverLabelElement.innerText = label;
|
|
293
|
+
const labelStyles = this.yuvFileDropZone()?.coverLabelStyles || this.#defaultDragOverCoverLabelStyles;
|
|
294
|
+
Object.keys(labelStyles).forEach((k) => {
|
|
295
|
+
coverLabelElement.style[k] = labelStyles[k];
|
|
296
|
+
});
|
|
297
|
+
coverLabelElement.style.pointerEvents = 'none';
|
|
298
|
+
coverElement.append(coverLabelElement);
|
|
299
|
+
}
|
|
300
|
+
return coverElement;
|
|
301
|
+
}
|
|
302
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileDropZoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
303
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: FileDropZoneDirective, isStandalone: true, selector: "[yuvFileDropZone]", inputs: { yuvFileDropZone: { classPropertyName: "yuvFileDropZone", publicName: "yuvFileDropZone", isSignal: true, isRequired: false, transformFunction: null }, fileDropDisabled: { classPropertyName: "fileDropDisabled", publicName: "fileDropDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileDrop: "fileDrop", fileDropOver: "fileDropOver" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "body:dragover": "onBodyDragOver($event)", "body:drop": "onBodyDrop($event)" } }, ngImport: i0 }); }
|
|
304
|
+
}
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileDropZoneDirective, decorators: [{
|
|
306
|
+
type: Directive,
|
|
307
|
+
args: [{
|
|
308
|
+
selector: '[yuvFileDropZone]',
|
|
309
|
+
standalone: true
|
|
310
|
+
}]
|
|
311
|
+
}], propDecorators: { onDrop: [{
|
|
312
|
+
type: HostListener,
|
|
313
|
+
args: ['drop', ['$event']]
|
|
314
|
+
}], onDragOver: [{
|
|
315
|
+
type: HostListener,
|
|
316
|
+
args: ['dragover', ['$event']]
|
|
317
|
+
}], onDragLeave: [{
|
|
318
|
+
type: HostListener,
|
|
319
|
+
args: ['dragleave', ['$event']]
|
|
320
|
+
}], onBodyDragOver: [{
|
|
321
|
+
type: HostListener,
|
|
322
|
+
args: ['body:dragover', ['$event']]
|
|
323
|
+
}], onBodyDrop: [{
|
|
324
|
+
type: HostListener,
|
|
325
|
+
args: ['body:drop', ['$event']]
|
|
326
|
+
}] } });
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Fixes the issue of 'click' event beeing triggered on 'doubleclick' by defining new outputs that
|
|
330
|
+
* distinguish between single and double click.
|
|
331
|
+
*/
|
|
332
|
+
class ClickDoubleDirective {
|
|
333
|
+
constructor() {
|
|
334
|
+
this.debounceTime = 200;
|
|
335
|
+
this.doubleClick = new EventEmitter();
|
|
336
|
+
this.singleClick = new EventEmitter();
|
|
337
|
+
this.clicksSubject = new Subject();
|
|
338
|
+
this.clicksSubject.pipe(takeUntilDestroyed(), debounceTime(this.debounceTime)).subscribe({
|
|
339
|
+
next: (event) => {
|
|
340
|
+
if (event.type === 'click') {
|
|
341
|
+
this.singleClick.emit(event);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
this.doubleClick.emit(event);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
clickEvent(event) {
|
|
350
|
+
event.preventDefault();
|
|
351
|
+
event.stopPropagation();
|
|
352
|
+
this.clicksSubject.next(event);
|
|
353
|
+
}
|
|
354
|
+
doubleClickEvent(event) {
|
|
355
|
+
event.preventDefault();
|
|
356
|
+
event.stopPropagation();
|
|
357
|
+
this.clicksSubject.next(event);
|
|
358
|
+
}
|
|
359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ClickDoubleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
360
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: ClickDoubleDirective, isStandalone: true, selector: "[click.single],[click.double]", inputs: { debounceTime: "debounceTime" }, outputs: { doubleClick: "click.double", singleClick: "click.single" }, host: { listeners: { "click": "clickEvent($event)", "dblclick": "doubleClickEvent($event)" } }, ngImport: i0 }); }
|
|
361
|
+
}
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ClickDoubleDirective, decorators: [{
|
|
363
|
+
type: Directive,
|
|
364
|
+
args: [{
|
|
365
|
+
selector: '[click.single],[click.double]',
|
|
366
|
+
standalone: true
|
|
367
|
+
}]
|
|
368
|
+
}], ctorParameters: () => [], propDecorators: { debounceTime: [{
|
|
369
|
+
type: Input
|
|
370
|
+
}], doubleClick: [{
|
|
371
|
+
type: Output,
|
|
372
|
+
args: ['click.double']
|
|
373
|
+
}], singleClick: [{
|
|
374
|
+
type: Output,
|
|
375
|
+
args: ['click.single']
|
|
376
|
+
}], clickEvent: [{
|
|
377
|
+
type: HostListener,
|
|
378
|
+
args: ['click', ['$event']]
|
|
379
|
+
}], doubleClickEvent: [{
|
|
380
|
+
type: HostListener,
|
|
381
|
+
args: ['dblclick', ['$event']]
|
|
382
|
+
}] } });
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Directive for applying light dismiss actions. Adding this directive will trigger
|
|
386
|
+
* the given function when the user clicks outside the component or hits escape.
|
|
387
|
+
*
|
|
388
|
+
* ```ts
|
|
389
|
+
* <div class="notifications" (yuvLightDismiss)="close()">
|
|
390
|
+
* ...
|
|
391
|
+
* </div>
|
|
392
|
+
* ```
|
|
393
|
+
*/
|
|
394
|
+
class LightDismissDirective {
|
|
395
|
+
constructor() {
|
|
396
|
+
this.elRef = inject(ElementRef);
|
|
397
|
+
this.yuvLightDismiss = output();
|
|
398
|
+
}
|
|
399
|
+
onKeydownHandler(event) {
|
|
400
|
+
if (!event.defaultPrevented) {
|
|
401
|
+
this.yuvLightDismiss.emit();
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
onMousedown(event) {
|
|
405
|
+
if (!this.elRef.nativeElement.contains(event.target)) {
|
|
406
|
+
this.yuvLightDismiss.emit();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LightDismissDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
410
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LightDismissDirective, isStandalone: true, selector: "[yuvLightDismiss]", outputs: { yuvLightDismiss: "yuvLightDismiss" }, host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)", "document:mousedown": "onMousedown($event)" } }, ngImport: i0 }); }
|
|
411
|
+
}
|
|
412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LightDismissDirective, decorators: [{
|
|
413
|
+
type: Directive,
|
|
414
|
+
args: [{
|
|
415
|
+
selector: '[yuvLightDismiss]',
|
|
416
|
+
standalone: true
|
|
417
|
+
}]
|
|
418
|
+
}], propDecorators: { onKeydownHandler: [{
|
|
419
|
+
type: HostListener,
|
|
420
|
+
args: ['document:keydown.escape', ['$event']]
|
|
421
|
+
}], onMousedown: [{
|
|
422
|
+
type: HostListener,
|
|
423
|
+
args: ['document:mousedown', ['$event']]
|
|
424
|
+
}] } });
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Directive to watch the size of an element inside the DOM. Usefull for example to provide
|
|
428
|
+
* a different layout (different components) depending on the available screen estate. You
|
|
429
|
+
* should first try to use CSS container queries but somtimes you need a different set of
|
|
430
|
+
* components to be loaded for a certain component size.
|
|
431
|
+
*
|
|
432
|
+
* Let's say you have components designed for bigger screens. You do not want to load them
|
|
433
|
+
* if there is not enough space for them. So you rather load components that are designed to
|
|
434
|
+
* take less space by providing the best user experience on smaller devices.
|
|
435
|
+
*
|
|
436
|
+
* ```html
|
|
437
|
+
* <div yuvContainerSize (containerHeight)="onContainerResize($event)" (containerWidth)="onContainerResize($event)"></div>
|
|
438
|
+
* ```
|
|
439
|
+
*
|
|
440
|
+
*/
|
|
441
|
+
class ContainerSizeDirective {
|
|
442
|
+
constructor() {
|
|
443
|
+
this.elRef = inject(ElementRef);
|
|
444
|
+
this.ngZone = inject(NgZone);
|
|
445
|
+
this.containerHeight = output();
|
|
446
|
+
this.containerWidth = output();
|
|
447
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
448
|
+
const size = entries[0].borderBoxSize[0];
|
|
449
|
+
if (!this._size || size.blockSize !== this._size.blockSize) {
|
|
450
|
+
this._emit(size.blockSize, true);
|
|
451
|
+
}
|
|
452
|
+
if (!this._size || size.inlineSize !== this._size.inlineSize) {
|
|
453
|
+
this._emit(size.inlineSize);
|
|
454
|
+
}
|
|
455
|
+
this._size = size;
|
|
456
|
+
});
|
|
457
|
+
this._resizeObserver.observe(this.elRef.nativeElement);
|
|
458
|
+
}
|
|
459
|
+
_emit(value, isHeight = false) {
|
|
460
|
+
// ResizeObserver callback is not covered by change detection
|
|
461
|
+
// so it has to be executed withing ngZone
|
|
462
|
+
this.ngZone.run(() => {
|
|
463
|
+
(isHeight ? this.containerHeight : this.containerWidth).emit(value);
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
ngOnDestroy() {
|
|
467
|
+
this._resizeObserver.unobserve(this.elRef.nativeElement);
|
|
468
|
+
}
|
|
469
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContainerSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
470
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: ContainerSizeDirective, isStandalone: true, selector: "[yuvContainerSize]", outputs: { containerHeight: "containerHeight", containerWidth: "containerWidth" }, ngImport: i0 }); }
|
|
471
|
+
}
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContainerSizeDirective, decorators: [{
|
|
473
|
+
type: Directive,
|
|
474
|
+
args: [{
|
|
475
|
+
selector: '[yuvContainerSize]',
|
|
476
|
+
standalone: true
|
|
477
|
+
}]
|
|
478
|
+
}], ctorParameters: () => [] });
|
|
479
|
+
|
|
480
|
+
class LongPressDirective {
|
|
481
|
+
constructor() {
|
|
482
|
+
this.elRef = inject(ElementRef);
|
|
483
|
+
this.threshold = 500;
|
|
484
|
+
this.yuvLongPress = input({
|
|
485
|
+
enabled: false
|
|
486
|
+
});
|
|
487
|
+
this.longpress = output();
|
|
488
|
+
const mousedown = fromEvent(this.elRef.nativeElement, 'mousedown').pipe(takeUntilDestroyed(), filter((event) => event.button == 0), // Only allow left button (Primary button)
|
|
489
|
+
map(() => true) // turn on threshold counter
|
|
490
|
+
);
|
|
491
|
+
const touchstart = fromEvent(this.elRef.nativeElement, 'touchstart').pipe(takeUntilDestroyed(), map(() => true));
|
|
492
|
+
const touchEnd = fromEvent(this.elRef.nativeElement, 'touchend').pipe(takeUntilDestroyed(), map(() => false));
|
|
493
|
+
const mouseup = fromEvent(window, 'mouseup').pipe(takeUntilDestroyed(), filter((event) => event.button == 0), // Only allow left button (Primary button)
|
|
494
|
+
map(() => false) // reset threshold counter
|
|
495
|
+
);
|
|
496
|
+
merge(mousedown, mouseup, touchstart, touchEnd)
|
|
497
|
+
.pipe(takeUntilDestroyed(), switchMap((state) => (state ? timer(this.threshold, 100) : of(null))), filter((value) => !!value))
|
|
498
|
+
.subscribe(() => this.longpress.emit());
|
|
499
|
+
}
|
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LongPressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
501
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: LongPressDirective, isStandalone: true, selector: "[yuvLongPress]", inputs: { yuvLongPress: { classPropertyName: "yuvLongPress", publicName: "yuvLongPress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { longpress: "longpress" }, ngImport: i0 }); }
|
|
502
|
+
}
|
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LongPressDirective, decorators: [{
|
|
504
|
+
type: Directive,
|
|
505
|
+
args: [{
|
|
506
|
+
selector: '[yuvLongPress]',
|
|
507
|
+
standalone: true
|
|
508
|
+
}]
|
|
509
|
+
}], ctorParameters: () => [] });
|
|
510
|
+
|
|
511
|
+
class DragSelectDirective {
|
|
512
|
+
constructor() {
|
|
513
|
+
this.#selectStartX = 0;
|
|
514
|
+
this.#selectStartY = 0;
|
|
515
|
+
this.#selection = [];
|
|
516
|
+
this.items = contentChildren(DragSelectItemDirective);
|
|
517
|
+
this.#selectables = computed(() => this.items().map((item) => item.el));
|
|
518
|
+
this.yuvDragSelect = input();
|
|
519
|
+
this.dragSelectChange = output();
|
|
520
|
+
this.dragSelect = output();
|
|
521
|
+
this.#onPointerUp = () => {
|
|
522
|
+
removeEventListener('pointermove', this.#resize);
|
|
523
|
+
removeEventListener('pointerup', this.#onPointerUp);
|
|
524
|
+
if (this.#selection.length)
|
|
525
|
+
this.dragSelect.emit(this.#selection);
|
|
526
|
+
if (this.#selector)
|
|
527
|
+
this.#selector.remove();
|
|
528
|
+
};
|
|
529
|
+
this.#resize = (event) => {
|
|
530
|
+
if (!this.#selector)
|
|
531
|
+
return;
|
|
532
|
+
const diffX = event.pageX - this.#selectStartX;
|
|
533
|
+
const diffY = event.pageY - this.#selectStartY;
|
|
534
|
+
this.#selector.style.left = diffX < 0 ? this.#selectStartX + diffX + 'px' : this.#selectStartX + 'px';
|
|
535
|
+
this.#selector.style.top = diffY < 0 ? this.#selectStartY + diffY + 'px' : this.#selectStartY + 'px';
|
|
536
|
+
this.#selector.style.height = Math.abs(diffY) + 'px';
|
|
537
|
+
this.#selector.style.width = Math.abs(diffX) + 'px';
|
|
538
|
+
this.#selector.style.border = `1px solid ${this.yuvDragSelect()?.selectorColor || 'var(--color-accent'}`;
|
|
539
|
+
this.#checkSelected();
|
|
540
|
+
};
|
|
541
|
+
this.#checkSelected = () => {
|
|
542
|
+
if (!this.#selector)
|
|
543
|
+
return;
|
|
544
|
+
const select = this.#selector.getBoundingClientRect();
|
|
545
|
+
const { x, y, height, width } = select;
|
|
546
|
+
if (!height || !width)
|
|
547
|
+
return;
|
|
548
|
+
const currSelectionLength = this.#selection.length;
|
|
549
|
+
this.#selectables().forEach((selectable, idx) => {
|
|
550
|
+
const r1 = { x: x + window.scrollX, y: y + window.scrollY, height, width };
|
|
551
|
+
const r2 = selectable.getBoundingClientRect();
|
|
552
|
+
this.#selection = this.#selection.filter((s) => s !== idx);
|
|
553
|
+
if (this.#checkRectIntersection(r1, r2)) {
|
|
554
|
+
this.#selection.push(idx);
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
if (currSelectionLength !== this.#selection.length) {
|
|
558
|
+
this.dragSelectChange.emit(this.#selection);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
this.#checkRectIntersection = (r1, r2) => {
|
|
562
|
+
return !(r1.x + r1.width < r2.x || r2.x + r2.width < r1.x || r1.y + r1.height < r2.y || r2.y + r2.height < r1.y);
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
#selector;
|
|
566
|
+
#selectStartX;
|
|
567
|
+
#selectStartY;
|
|
568
|
+
#selection;
|
|
569
|
+
onPointerDown(event) {
|
|
570
|
+
if (this.yuvDragSelect()?.disabled)
|
|
571
|
+
return;
|
|
572
|
+
event.preventDefault();
|
|
573
|
+
this.#selectStartX = event.pageX;
|
|
574
|
+
this.#selectStartY = event.pageY;
|
|
575
|
+
const div = document.createElement('div');
|
|
576
|
+
div.style.position = 'absolute';
|
|
577
|
+
div.style.width = '0';
|
|
578
|
+
div.style.height = '0';
|
|
579
|
+
div.style.left = this.#selectStartX + 'px';
|
|
580
|
+
div.style.top = this.#selectStartY + 'px';
|
|
581
|
+
div.classList.add('drag-select');
|
|
582
|
+
this.#selector = div;
|
|
583
|
+
document.body.append(this.#selector);
|
|
584
|
+
this.#selection = [];
|
|
585
|
+
addEventListener('pointermove', this.#resize);
|
|
586
|
+
addEventListener('pointerup', this.#onPointerUp);
|
|
587
|
+
}
|
|
588
|
+
#selectables;
|
|
589
|
+
#onPointerUp;
|
|
590
|
+
#resize;
|
|
591
|
+
#checkSelected;
|
|
592
|
+
#checkRectIntersection;
|
|
593
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DragSelectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
594
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: DragSelectDirective, isStandalone: true, selector: "[yuvDragSelect]", inputs: { yuvDragSelect: { classPropertyName: "yuvDragSelect", publicName: "yuvDragSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dragSelectChange: "dragSelectChange", dragSelect: "dragSelect" }, host: { listeners: { "pointerdown": "onPointerDown($event)" } }, queries: [{ propertyName: "items", predicate: DragSelectItemDirective, isSignal: true }], ngImport: i0 }); }
|
|
595
|
+
}
|
|
596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DragSelectDirective, decorators: [{
|
|
597
|
+
type: Directive,
|
|
598
|
+
args: [{
|
|
599
|
+
selector: '[yuvDragSelect]',
|
|
600
|
+
standalone: true
|
|
601
|
+
}]
|
|
602
|
+
}], propDecorators: { onPointerDown: [{
|
|
603
|
+
type: HostListener,
|
|
604
|
+
args: ['pointerdown', ['$event']]
|
|
605
|
+
}] } });
|
|
606
|
+
class DragSelectItemDirective {
|
|
607
|
+
constructor() {
|
|
608
|
+
this.#elRef = inject(ElementRef);
|
|
609
|
+
this.el = this.#elRef.nativeElement;
|
|
610
|
+
}
|
|
611
|
+
#elRef;
|
|
612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DragSelectItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
613
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DragSelectItemDirective, isStandalone: true, selector: "[yuvDragSelectItem]", ngImport: i0 }); }
|
|
614
|
+
}
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DragSelectItemDirective, decorators: [{
|
|
616
|
+
type: Directive,
|
|
617
|
+
args: [{
|
|
618
|
+
selector: '[yuvDragSelectItem]',
|
|
619
|
+
standalone: true
|
|
620
|
+
}]
|
|
621
|
+
}] });
|
|
622
|
+
|
|
623
|
+
// TODO: Move to @yuuvis/components
|
|
624
|
+
class TokenInputComponent {
|
|
625
|
+
constructor() {
|
|
626
|
+
this.elRef = inject(ElementRef);
|
|
627
|
+
this.overlay = inject(YvcOverlayService);
|
|
628
|
+
this.ngZone = inject(NgZone);
|
|
629
|
+
this.optionsTemplate = viewChild.required('options');
|
|
630
|
+
/**
|
|
631
|
+
* Template to be used for rendering selected tokens
|
|
632
|
+
*/
|
|
633
|
+
this.tokenTemplate = contentChild('tokenTemplate');
|
|
634
|
+
/**
|
|
635
|
+
* Template to be used for rendering autocomplete suggestion entries
|
|
636
|
+
*/
|
|
637
|
+
this.optionTemplate = contentChild('optionTemplate');
|
|
638
|
+
this.TEXT_TOKEN_TYPE = 'txt';
|
|
639
|
+
this.tokens = input([]);
|
|
640
|
+
this.caseSensitive = input(false);
|
|
641
|
+
this.change = output();
|
|
642
|
+
this._cleanFormTokens = [this._newTextToken()];
|
|
643
|
+
this.formTokens = structuredClone(this._cleanFormTokens);
|
|
644
|
+
this.autocompleteValues = [];
|
|
645
|
+
this.autocompleteSelectedIndex = -1;
|
|
646
|
+
this.focusedTokenIndex = -1;
|
|
647
|
+
}
|
|
648
|
+
onArrowUpKey(event) {
|
|
649
|
+
event.preventDefault();
|
|
650
|
+
event.stopPropagation();
|
|
651
|
+
if (this.autocompleteSelectedIndex > 0)
|
|
652
|
+
this.autocompleteSelectedIndex--;
|
|
653
|
+
}
|
|
654
|
+
onArrowDownKey(event) {
|
|
655
|
+
event.preventDefault();
|
|
656
|
+
event.stopPropagation();
|
|
657
|
+
if (this.autocompleteValues && this.autocompleteSelectedIndex < this.autocompleteValues.length - 1)
|
|
658
|
+
this.autocompleteSelectedIndex++;
|
|
659
|
+
}
|
|
660
|
+
onEnterKey(event) {
|
|
661
|
+
if (this.autocompleteValues.length && this.autocompleteSelectedIndex >= 0) {
|
|
662
|
+
event.preventDefault();
|
|
663
|
+
event.stopPropagation();
|
|
664
|
+
this.onOptionSelect(this.autocompleteValues[this.autocompleteSelectedIndex]);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
clear() {
|
|
668
|
+
this.formTokens = structuredClone(this._cleanFormTokens);
|
|
669
|
+
this._inputElement.innerText = '';
|
|
670
|
+
this._emitChange(true);
|
|
671
|
+
}
|
|
672
|
+
onInputFocus(e) {
|
|
673
|
+
this._inputElement = e.target;
|
|
674
|
+
this.focusedTokenIndex = this._inputElement ? this.formTokens.findIndex((t) => t.id === this._inputElement.getAttribute('data-id')) : -1;
|
|
675
|
+
// console.log('FIndex: ' + this.focusedTokenIndex);
|
|
676
|
+
}
|
|
677
|
+
onInput(e) {
|
|
678
|
+
this._processValue();
|
|
679
|
+
this._emitChange();
|
|
680
|
+
}
|
|
681
|
+
onArrowLeft(e) {
|
|
682
|
+
const cp = this._getCaretPos(e.target);
|
|
683
|
+
if (cp === 0) {
|
|
684
|
+
e.stopPropagation();
|
|
685
|
+
e.preventDefault();
|
|
686
|
+
this._focusInput(-1);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
onArrowRight(e) {
|
|
690
|
+
const cp = this._getCaretPos(e.target);
|
|
691
|
+
if (cp === e.target.innerText.length) {
|
|
692
|
+
e.stopPropagation();
|
|
693
|
+
e.preventDefault();
|
|
694
|
+
this._focusInput(1);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
onDelete(e, index) {
|
|
698
|
+
const cp = this._getCaretPos(e.target);
|
|
699
|
+
if (cp === e.target.innerText.length) {
|
|
700
|
+
e.stopPropagation();
|
|
701
|
+
e.preventDefault();
|
|
702
|
+
// remove next token
|
|
703
|
+
if (index < this.formTokens.length - 2) {
|
|
704
|
+
this.formTokens.splice(index + 1, 1);
|
|
705
|
+
// if prev token is also a text token => merge
|
|
706
|
+
const nextIdx = index + 1;
|
|
707
|
+
if (nextIdx < this.formTokens.length && this.formTokens[nextIdx].type === this.TEXT_TOKEN_TYPE) {
|
|
708
|
+
const content = this.formTokens[index].label;
|
|
709
|
+
const nextContent = this.formTokens[nextIdx].label;
|
|
710
|
+
const mergedToken = {
|
|
711
|
+
id: this.formTokens[index + 1].id,
|
|
712
|
+
label: `${content} ${nextContent}`,
|
|
713
|
+
type: this.TEXT_TOKEN_TYPE
|
|
714
|
+
};
|
|
715
|
+
this.formTokens.splice(index + 1, 2, mergedToken);
|
|
716
|
+
const el = this.elRef.nativeElement.querySelector(`[data-id="${this.formTokens[index + 1].id}"]`);
|
|
717
|
+
if (el) {
|
|
718
|
+
el.innerText = mergedToken.label;
|
|
719
|
+
this._setCaretPos(el, content.length);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
this._emitChange();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
onBackspace(e, index) {
|
|
727
|
+
const cp = this._getCaretPos(e.target);
|
|
728
|
+
if (cp === 0) {
|
|
729
|
+
e.stopPropagation();
|
|
730
|
+
e.preventDefault();
|
|
731
|
+
// remove prev token
|
|
732
|
+
if (index > 0) {
|
|
733
|
+
this.formTokens.splice(index - 1, 1);
|
|
734
|
+
// if prev token is also a text token => merge
|
|
735
|
+
const prevIdx = index - 2;
|
|
736
|
+
if (prevIdx >= 0 && this.formTokens[prevIdx].type === this.TEXT_TOKEN_TYPE) {
|
|
737
|
+
const content = this.formTokens[index - 1].label;
|
|
738
|
+
const prevContent = this.formTokens[prevIdx].label;
|
|
739
|
+
const mergedToken = {
|
|
740
|
+
id: this.formTokens[prevIdx].id,
|
|
741
|
+
label: `${prevContent} ${content}`,
|
|
742
|
+
type: this.TEXT_TOKEN_TYPE
|
|
743
|
+
};
|
|
744
|
+
this.formTokens.splice(prevIdx, 2, mergedToken);
|
|
745
|
+
const el = this.elRef.nativeElement.querySelector(`[data-id="${this.formTokens[prevIdx].id}"]`);
|
|
746
|
+
if (el) {
|
|
747
|
+
el.innerText = mergedToken.label;
|
|
748
|
+
this._setCaretPos(el, prevContent.length);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
this._focusFirst();
|
|
753
|
+
}
|
|
754
|
+
this._emitChange();
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
_focusFirst() {
|
|
759
|
+
const el = this.elRef.nativeElement.querySelector(`[contenteditable]`);
|
|
760
|
+
if (el)
|
|
761
|
+
setTimeout(() => {
|
|
762
|
+
el?.focus();
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
_focusInput(offset) {
|
|
766
|
+
const inputs = Array.from(this.elRef.nativeElement.querySelectorAll('[contenteditable]'));
|
|
767
|
+
let i = inputs.findIndex((i) => i === document.activeElement);
|
|
768
|
+
i = i + offset;
|
|
769
|
+
if (i > inputs.length - 1)
|
|
770
|
+
i = 0;
|
|
771
|
+
if (i < 0)
|
|
772
|
+
i = inputs.length - 1;
|
|
773
|
+
this.ngZone.run(() => inputs[i].focus());
|
|
774
|
+
this._setCaretPos(inputs[i], offset > 0 || inputs[i].innerText.length === 0 ? 0 : inputs[i].innerText.length);
|
|
775
|
+
}
|
|
776
|
+
_setCaretPos(element, pos) {
|
|
777
|
+
const targetNode = element.childNodes.length ? element.childNodes[0] : element;
|
|
778
|
+
const range = document.createRange();
|
|
779
|
+
range.selectNode(element);
|
|
780
|
+
range.setStart(targetNode, pos);
|
|
781
|
+
range.setEnd(targetNode, pos);
|
|
782
|
+
const selection = window.getSelection();
|
|
783
|
+
selection.removeAllRanges();
|
|
784
|
+
selection.addRange(range);
|
|
785
|
+
}
|
|
786
|
+
_getCaretPos(node) {
|
|
787
|
+
const selection = window.getSelection();
|
|
788
|
+
const range = selection.getRangeAt(0);
|
|
789
|
+
const clonedRange = range.cloneRange();
|
|
790
|
+
clonedRange.selectNodeContents(node);
|
|
791
|
+
clonedRange.setEnd(range.endContainer, range.endOffset);
|
|
792
|
+
return clonedRange.toString().length;
|
|
793
|
+
}
|
|
794
|
+
onOptionSelect(o) {
|
|
795
|
+
let tokensAdded = 0;
|
|
796
|
+
let tokensRemoved = 0;
|
|
797
|
+
const inputValue = this._getInputValue();
|
|
798
|
+
const wordTokens = this._tokenize(inputValue);
|
|
799
|
+
const lastWord = wordTokens[wordTokens.length - 1];
|
|
800
|
+
if (lastWord.length === inputValue.length) {
|
|
801
|
+
this.formTokens.pop();
|
|
802
|
+
tokensRemoved++;
|
|
803
|
+
}
|
|
804
|
+
this.formTokens.splice(this.focusedTokenIndex + 1, 0, structuredClone(o));
|
|
805
|
+
tokensAdded++;
|
|
806
|
+
const shadowTokens = [];
|
|
807
|
+
// check for inbetween tokens
|
|
808
|
+
let txtTokenCount = -1;
|
|
809
|
+
this.formTokens.forEach((t, i) => {
|
|
810
|
+
if (t.type === this.TEXT_TOKEN_TYPE) {
|
|
811
|
+
txtTokenCount++;
|
|
812
|
+
t.id = this._textTokenId(txtTokenCount);
|
|
813
|
+
}
|
|
814
|
+
shadowTokens.push(t);
|
|
815
|
+
const nextToken = this.formTokens[i + 1];
|
|
816
|
+
if (t.type !== this.TEXT_TOKEN_TYPE && nextToken && nextToken.type !== this.TEXT_TOKEN_TYPE) {
|
|
817
|
+
// add inbetween token
|
|
818
|
+
txtTokenCount++;
|
|
819
|
+
shadowTokens.push(this._newTextToken(txtTokenCount));
|
|
820
|
+
tokensAdded++;
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
if (this.formTokens[this.formTokens.length - 1].type !== this.TEXT_TOKEN_TYPE) {
|
|
824
|
+
// add empty text token at the end
|
|
825
|
+
txtTokenCount++;
|
|
826
|
+
shadowTokens.push(this._newTextToken(txtTokenCount));
|
|
827
|
+
tokensAdded++;
|
|
828
|
+
}
|
|
829
|
+
this.formTokens = shadowTokens;
|
|
830
|
+
this._inputElement.innerText = inputValue.substring(0, inputValue.length - lastWord.length).trim();
|
|
831
|
+
this._emitChange();
|
|
832
|
+
setTimeout(() => {
|
|
833
|
+
// console.log(`fi: ${this.focusedTokenIndex}, ta: ${tokensAdded}, tr: ${tokensRemoved}, ne: ${this.focusedTokenIndex + (tokensAdded - tokensRemoved)}`);
|
|
834
|
+
this._focusTokenInput(this.focusedTokenIndex + (tokensAdded - tokensRemoved));
|
|
835
|
+
});
|
|
836
|
+
this.closeOptions();
|
|
837
|
+
}
|
|
838
|
+
_focusTokenInput(index) {
|
|
839
|
+
const selector = index === undefined ? 'div:last-child' : `div:nth-child(${index + 1})`;
|
|
840
|
+
console.log(selector);
|
|
841
|
+
const lastInput = this.elRef.nativeElement.querySelector(selector);
|
|
842
|
+
lastInput.focus();
|
|
843
|
+
return lastInput;
|
|
844
|
+
}
|
|
845
|
+
// private _focusInput(): HTMLElement {
|
|
846
|
+
// const lastInput: HTMLElement = (
|
|
847
|
+
// this.elRef.nativeElement as HTMLElement
|
|
848
|
+
// ).querySelector('[contenteditable]:last-child') as HTMLElement;
|
|
849
|
+
// lastInput.focus();
|
|
850
|
+
// return lastInput;
|
|
851
|
+
// }
|
|
852
|
+
openOptions() {
|
|
853
|
+
if (this._overlayRef || !this.autocompleteValues.length)
|
|
854
|
+
return;
|
|
855
|
+
this._overlayRef = this.overlay.open(this.optionsTemplate(), null, {
|
|
856
|
+
lightDismiss: true,
|
|
857
|
+
maxHeight: '97vh'
|
|
858
|
+
}, this.elRef);
|
|
859
|
+
}
|
|
860
|
+
closeOptions() {
|
|
861
|
+
if (this._overlayRef) {
|
|
862
|
+
this._overlayRef.close();
|
|
863
|
+
this._overlayRef = undefined;
|
|
864
|
+
}
|
|
865
|
+
this.autocompleteSelectedIndex = -1;
|
|
866
|
+
this.autocompleteValues = [];
|
|
867
|
+
}
|
|
868
|
+
onTokenEnter(e) {
|
|
869
|
+
e.preventDefault();
|
|
870
|
+
}
|
|
871
|
+
_emitChange(focusFirst = false) {
|
|
872
|
+
// need to set timeout so DOM changes are applied before accessing elements
|
|
873
|
+
setTimeout(() => {
|
|
874
|
+
this.formTokens.forEach((t) => {
|
|
875
|
+
if (t.type === this.TEXT_TOKEN_TYPE) {
|
|
876
|
+
const el = this.elRef.nativeElement.querySelector(`[data-id="${t.id}"]`);
|
|
877
|
+
if (el)
|
|
878
|
+
t.label = el.innerText;
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
this.change.emit(this.formTokens
|
|
882
|
+
.filter((t) => t.type !== this.TEXT_TOKEN_TYPE || t.label.length > 0)
|
|
883
|
+
.map((t) => ({
|
|
884
|
+
id: t.id,
|
|
885
|
+
label: t.label,
|
|
886
|
+
type: t.type
|
|
887
|
+
})));
|
|
888
|
+
if (focusFirst)
|
|
889
|
+
this._focusFirst();
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
_newTextToken(idx) {
|
|
893
|
+
const index = idx !== undefined ? idx : this.formTokens?.length ? this.formTokens.filter((t) => t.type === this.TEXT_TOKEN_TYPE).length : 0;
|
|
894
|
+
return {
|
|
895
|
+
id: this._textTokenId(index),
|
|
896
|
+
label: '',
|
|
897
|
+
type: this.TEXT_TOKEN_TYPE
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
_textTokenId(i) {
|
|
901
|
+
return `txt_${i}`;
|
|
902
|
+
}
|
|
903
|
+
_tokenize(value) {
|
|
904
|
+
const wordTokens = value.split(/\W+/).filter((t) => t?.length);
|
|
905
|
+
return wordTokens;
|
|
906
|
+
}
|
|
907
|
+
_getInputValue() {
|
|
908
|
+
return this._inputElement.innerText.replaceAll(' ', '');
|
|
909
|
+
}
|
|
910
|
+
_processValue() {
|
|
911
|
+
const wordTokens = this._tokenize(this._getInputValue());
|
|
912
|
+
const lastWord = wordTokens[wordTokens.length - 1];
|
|
913
|
+
this.autocompleteValues =
|
|
914
|
+
!lastWord || lastWord.length < 2
|
|
915
|
+
? []
|
|
916
|
+
: this.tokens().filter((t) => lastWord && new RegExp(lastWord, this.caseSensitive() ? '' : 'i').test(t.label));
|
|
917
|
+
this.autocompleteSelectedIndex = this.autocompleteValues.length ? 0 : -1;
|
|
918
|
+
if (this.autocompleteValues.length)
|
|
919
|
+
this.openOptions();
|
|
920
|
+
else
|
|
921
|
+
this.closeOptions();
|
|
922
|
+
}
|
|
923
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TokenInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
924
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TokenInputComponent, isStandalone: true, selector: "yuv-token-input", inputs: { tokens: { classPropertyName: "tokens", publicName: "tokens", isSignal: true, isRequired: false, transformFunction: null }, caseSensitive: { classPropertyName: "caseSensitive", publicName: "caseSensitive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { listeners: { "keydown.arrowUp": "onArrowUpKey($event)", "keydown.arrowDown": "onArrowDownKey($event)", "keydown.enter": "onEnterKey($event)" } }, queries: [{ propertyName: "tokenTemplate", first: true, predicate: ["tokenTemplate"], descendants: true, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["optionTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionsTemplate", first: true, predicate: ["options"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- fi {{focusedTokenIndex}} -->\n\n@for (ft of formTokens; let i = $index; track $index) {\n @if (ft.type === TEXT_TOKEN_TYPE) {\n <div\n contenteditable\n [attr.data-id]=\"ft.id\"\n (input)=\"onInput($event)\"\n (focus)=\"onInputFocus($event)\"\n (keydown.enter)=\"onTokenEnter($event)\"\n (keydown.arrowLeft)=\"onArrowLeft($event)\"\n (keydown.arrowRight)=\"onArrowRight($event)\"\n (keydown.delete)=\"onDelete($event, i)\"\n (keydown.backspace)=\"onBackspace($event, i)\"\n ></div>\n } @else {\n @if (tokenTemplate()) {\n <ng-container *ngTemplateOutlet=\"tokenTemplate()!; context: { $implicit: ft }\"></ng-container>\n } @else {\n <div class=\"chip\">{{ ft.label }}</div>\n }\n }\n}\n\n<ng-template #options>\n <yvc-autocomplete-options\n class=\"popover animateIn\"\n [values]=\"autocompleteValues\"\n [(focusedIndex)]=\"autocompleteSelectedIndex\"\n [autocompleteOptionTemplate]=\"optionTemplate() || null\"\n (optionSelect)=\"onOptionSelect($event)\"\n [field]=\"'label'\"\n ></yvc-autocomplete-options>\n</ng-template>\n", styles: [":host{--token-input-chip-border-color: var(--item-focus-border-color);--token-input-chip-background-color: var(--item-focus-background-color);--token-padding-y: .15em;display:flex;align-items:center;flex-flow:row wrap;padding:2px}:host [contenteditable],:host .chip{border:1px solid transparent;border-radius:2px}:host [contenteditable]{display:inline-block;padding:var(--token-padding-y) 2px;min-width:1px}:host [contenteditable]:focus-visible{outline:0}:host [contenteditable]:last-child{flex:1}:host .chip{padding:var(--token-padding-y) .25em;border-color:var(--token-input-chip-border-color);background-color:var(--token-input-chip-background-color)}:host .chip>span{font-size:var(--font-hint);color:var(--text-color-hint)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: YvcAutocompleteModule }, { kind: "component", type: i2.AutocompleteOptionsComponent, selector: "yvc-autocomplete-options", inputs: ["autocompleteOptionTemplate", "values", "field", "focusedIndex"], outputs: ["focusedIndexChange", "optionSelect"] }] }); }
|
|
925
|
+
}
|
|
926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TokenInputComponent, decorators: [{
|
|
927
|
+
type: Component,
|
|
928
|
+
args: [{ selector: 'yuv-token-input', standalone: true, imports: [CommonModule, YvcAutocompleteModule], template: "<!-- fi {{focusedTokenIndex}} -->\n\n@for (ft of formTokens; let i = $index; track $index) {\n @if (ft.type === TEXT_TOKEN_TYPE) {\n <div\n contenteditable\n [attr.data-id]=\"ft.id\"\n (input)=\"onInput($event)\"\n (focus)=\"onInputFocus($event)\"\n (keydown.enter)=\"onTokenEnter($event)\"\n (keydown.arrowLeft)=\"onArrowLeft($event)\"\n (keydown.arrowRight)=\"onArrowRight($event)\"\n (keydown.delete)=\"onDelete($event, i)\"\n (keydown.backspace)=\"onBackspace($event, i)\"\n ></div>\n } @else {\n @if (tokenTemplate()) {\n <ng-container *ngTemplateOutlet=\"tokenTemplate()!; context: { $implicit: ft }\"></ng-container>\n } @else {\n <div class=\"chip\">{{ ft.label }}</div>\n }\n }\n}\n\n<ng-template #options>\n <yvc-autocomplete-options\n class=\"popover animateIn\"\n [values]=\"autocompleteValues\"\n [(focusedIndex)]=\"autocompleteSelectedIndex\"\n [autocompleteOptionTemplate]=\"optionTemplate() || null\"\n (optionSelect)=\"onOptionSelect($event)\"\n [field]=\"'label'\"\n ></yvc-autocomplete-options>\n</ng-template>\n", styles: [":host{--token-input-chip-border-color: var(--item-focus-border-color);--token-input-chip-background-color: var(--item-focus-background-color);--token-padding-y: .15em;display:flex;align-items:center;flex-flow:row wrap;padding:2px}:host [contenteditable],:host .chip{border:1px solid transparent;border-radius:2px}:host [contenteditable]{display:inline-block;padding:var(--token-padding-y) 2px;min-width:1px}:host [contenteditable]:focus-visible{outline:0}:host [contenteditable]:last-child{flex:1}:host .chip{padding:var(--token-padding-y) .25em;border-color:var(--token-input-chip-border-color);background-color:var(--token-input-chip-background-color)}:host .chip>span{font-size:var(--font-hint);color:var(--text-color-hint)}\n"] }]
|
|
929
|
+
}], propDecorators: { onArrowUpKey: [{
|
|
930
|
+
type: HostListener,
|
|
931
|
+
args: ['keydown.arrowUp', ['$event']]
|
|
932
|
+
}], onArrowDownKey: [{
|
|
933
|
+
type: HostListener,
|
|
934
|
+
args: ['keydown.arrowDown', ['$event']]
|
|
935
|
+
}], onEnterKey: [{
|
|
936
|
+
type: HostListener,
|
|
937
|
+
args: ['keydown.enter', ['$event']]
|
|
938
|
+
}] } });
|
|
939
|
+
|
|
940
|
+
class FocusIndicatorComponent {
|
|
941
|
+
#elRef = inject(ElementRef);
|
|
942
|
+
constructor() {
|
|
943
|
+
fromEvent(document, 'keyup')
|
|
944
|
+
.pipe(takeUntilDestroyed(), filter$1((e) => e.code === 'Tab'))
|
|
945
|
+
.subscribe(() => this.#position());
|
|
946
|
+
fromEvent(document, 'focusout')
|
|
947
|
+
.pipe(takeUntilDestroyed())
|
|
948
|
+
.subscribe(() => {
|
|
949
|
+
const fi = this.#elRef.nativeElement;
|
|
950
|
+
fi.classList.remove('visible');
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
#position() {
|
|
954
|
+
setTimeout(() => {
|
|
955
|
+
const focusedElement = document.activeElement;
|
|
956
|
+
const fi = this.#elRef.nativeElement;
|
|
957
|
+
if (fi && focusedElement && focusedElement.matches(':focus-visible')) {
|
|
958
|
+
fi.classList.add('visible');
|
|
959
|
+
const { left, top, width, height } = focusedElement.getBoundingClientRect();
|
|
960
|
+
fi.style.translate = ` ${Math.round(left)}px ${Math.round(top)}px`;
|
|
961
|
+
fi.style.width = `${Math.round(width)}px`;
|
|
962
|
+
fi.style.height = `${Math.round(height)}px`;
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FocusIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
967
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FocusIndicatorComponent, isStandalone: true, selector: "yuv-focus-indicator", host: { attributes: { "inert": "true" } }, ngImport: i0, template: '', isInline: true, styles: [":host{--outline-color: rgba(var(--color-accent-rgb), .4);--outline-width: 2px;--outline-offset: 1px;--border-radius: var(--outline-width);display:block;position:absolute;inset-inline-start:0;inset-block-start:0;opacity:0;outline:var(--outline-width) solid var(--outline-color);outline-offset:var(--outline-offset);border-radius:var(--border-radius);transition:all .15s ease}:host.visible{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
968
|
+
}
|
|
969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FocusIndicatorComponent, decorators: [{
|
|
970
|
+
type: Component,
|
|
971
|
+
args: [{ selector: 'yuv-focus-indicator', standalone: true, imports: [CommonModule], template: '', host: {
|
|
972
|
+
inert: 'true'
|
|
973
|
+
}, styles: [":host{--outline-color: rgba(var(--color-accent-rgb), .4);--outline-width: 2px;--outline-offset: 1px;--border-radius: var(--outline-width);display:block;position:absolute;inset-inline-start:0;inset-block-start:0;opacity:0;outline:var(--outline-width) solid var(--outline-color);outline-offset:var(--outline-offset);border-radius:var(--border-radius);transition:all .15s ease}:host.visible{opacity:1}\n"] }]
|
|
974
|
+
}], ctorParameters: () => [] });
|
|
975
|
+
|
|
976
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
977
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
978
|
+
// @see: https://netbasal.com/forwarding-form-controls-to-custom-control-components-in-angular-701e8406cc55
|
|
979
|
+
class NoopValueAccessorDirective {
|
|
980
|
+
writeValue(obj) { }
|
|
981
|
+
registerOnChange(fn) { }
|
|
982
|
+
registerOnTouched(fn) { }
|
|
983
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NoopValueAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
984
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: NoopValueAccessorDirective, isStandalone: true, providers: [
|
|
985
|
+
{
|
|
986
|
+
provide: NG_VALUE_ACCESSOR,
|
|
987
|
+
multi: true,
|
|
988
|
+
useExisting: forwardRef(() => NoopValueAccessorDirective),
|
|
989
|
+
},
|
|
990
|
+
], ngImport: i0 }); }
|
|
991
|
+
}
|
|
992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NoopValueAccessorDirective, decorators: [{
|
|
993
|
+
type: Directive,
|
|
994
|
+
args: [{
|
|
995
|
+
standalone: true,
|
|
996
|
+
providers: [
|
|
997
|
+
{
|
|
998
|
+
provide: NG_VALUE_ACCESSOR,
|
|
999
|
+
multi: true,
|
|
1000
|
+
useExisting: forwardRef(() => NoopValueAccessorDirective),
|
|
1001
|
+
},
|
|
1002
|
+
],
|
|
1003
|
+
}]
|
|
1004
|
+
}] });
|
|
1005
|
+
function injectNgControl() {
|
|
1006
|
+
const ngControl = inject(NgControl, { self: true, optional: true });
|
|
1007
|
+
if (!ngControl)
|
|
1008
|
+
throw new Error('...');
|
|
1009
|
+
if (ngControl instanceof FormControlDirective || ngControl instanceof FormControlName || ngControl instanceof NgModel) {
|
|
1010
|
+
return ngControl;
|
|
1011
|
+
}
|
|
1012
|
+
throw new Error('...');
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Generated bundle index. Do not edit.
|
|
1017
|
+
*/
|
|
1018
|
+
|
|
1019
|
+
export { BusyOverlayDirective, ClickDoubleDirective, ContainerSizeDirective, DragSelectDirective, DragSelectItemDirective, FileDropZoneDirective, FocusIndicatorComponent, FocusWithinDirective, LightDismissDirective, LongPressDirective, NoopValueAccessorDirective, TokenInputComponent, injectNgControl };
|
|
1020
|
+
//# sourceMappingURL=yuuvis-client-framework-common.mjs.map
|