@yuuvis/client-framework 2.0.0-beta.0 → 2.0.0-beta.11
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/actions/lib/actions/delete-action/delete/delete.component.d.ts +3 -3
- package/actions/lib/actions/delete-action/delete-action.d.ts +1 -1
- package/actions/lib/actions.service.d.ts +7 -3
- package/actions/lib/components/contextmenu/contextmenu.component.d.ts +3 -1
- package/autocomplete/README.md +3 -0
- package/autocomplete/index.d.ts +3 -0
- package/autocomplete/lib/autocomplete.component.d.ts +72 -0
- package/autocomplete/lib/autocomplete.interface.d.ts +4 -0
- package/autocomplete/lib/autocomplete.module.d.ts +7 -0
- package/common/index.d.ts +4 -4
- package/common/lib/common.module.d.ts +19 -0
- package/common/lib/common.utils.d.ts +2 -0
- package/common/lib/components/confirm/confirm.component.d.ts +7 -0
- package/common/lib/components/confirm/confirm.interface.d.ts +7 -0
- package/common/lib/components/confirm/confirm.service.d.ts +9 -0
- package/common/lib/components/dialog/dialog.component.d.ts +6 -0
- package/common/lib/components/dialog/dialog.options.d.ts +7 -0
- package/common/lib/components/index.d.ts +5 -0
- package/common/lib/directives/autofocus-child.directive.d.ts +13 -0
- package/common/lib/directives/autofocus-delayed.directive.d.ts +18 -0
- package/common/lib/directives/drag-scroll.directive.d.ts +20 -0
- package/common/lib/directives/index.d.ts +8 -4
- package/common/lib/directives/noop-value-accessor.directive.d.ts +2 -2
- package/common/lib/mat-form-field.abstract.d.ts +41 -0
- package/common/lib/services/index.d.ts +1 -1
- package/common/lib/services/layout-settings/layout-settings.service.d.ts +18 -0
- package/datepicker/README.md +3 -0
- package/datepicker/index.d.ts +5 -0
- package/datepicker/lib/calendar/calendar.component.d.ts +72 -0
- package/datepicker/lib/date-input/date-input-element/date-input-element.component.d.ts +43 -0
- package/datepicker/lib/date-input/date-input-hour-element/date-input-hour-element.component.d.ts +11 -0
- package/datepicker/lib/date-input/date-input.component.d.ts +61 -0
- package/datepicker/lib/datepicker-calendar/datepicker-calendar-trigger.component.d.ts +7 -0
- package/datepicker/lib/datepicker-calendar/datepicker-calendar.component.d.ts +12 -0
- package/datepicker/lib/datepicker.component.d.ts +80 -0
- package/datepicker/lib/datepicker.interface.d.ts +34 -0
- package/datepicker/lib/datepicker.module.d.ts +9 -0
- package/datepicker/lib/datepicker.service.d.ts +46 -0
- package/datepicker/lib/datepicker.utils.d.ts +23 -0
- package/datepicker/lib/time-input/time-input.component.d.ts +36 -0
- package/datepicker/lib/time-input/time-input.interface.d.ts +6 -0
- package/fesm2022/yuuvis-client-framework-actions.mjs +147 -105
- package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-app-bar.mjs +7 -8
- package/fesm2022/yuuvis-client-framework-app-bar.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-autocomplete.mjs +210 -0
- package/fesm2022/yuuvis-client-framework-autocomplete.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-clipboard.mjs +9 -9
- package/fesm2022/yuuvis-client-framework-clipboard.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-common.mjs +853 -780
- package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-datepicker.mjs +1688 -0
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-forms.mjs +945 -1157
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-icons.mjs +85 -12
- package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-list.mjs +81 -45
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-master-details.mjs +112 -0
- package/fesm2022/yuuvis-client-framework-master-details.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +60 -0
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +125 -100
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +49 -59
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs +188 -77
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.mjs +99 -184
- package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-preview.mjs +12 -12
- package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-summary.mjs +46 -42
- package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-overflow-menu.mjs +126 -0
- package/fesm2022/yuuvis-client-framework-overflow-menu.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-pagination.mjs +7 -9
- package/fesm2022/yuuvis-client-framework-pagination.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-panel.mjs +8 -7
- package/fesm2022/yuuvis-client-framework-panel.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-popout.mjs +212 -0
- package/fesm2022/yuuvis-client-framework-popout.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-renderer.mjs +99 -72
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs +29 -112
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-simple-search.mjs +40 -21
- package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-split-view.mjs +188 -0
- package/fesm2022/yuuvis-client-framework-split-view.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +100 -93
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tree.mjs +15 -15
- package/fesm2022/yuuvis-client-framework-tree.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs +16 -21
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework.mjs +4 -4
- package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
- package/forms/index.d.ts +7 -1
- package/forms/lib/elements/catalog/catalog.component.d.ts +17 -56
- package/forms/lib/elements/data-grid/edit-table-data/edit-data.component.d.ts +5 -4
- package/forms/lib/elements/datetime/datetime.component.d.ts +19 -10
- package/forms/lib/elements/datetime-range/datetime-range.component.d.ts +12 -27
- package/forms/lib/elements/index.d.ts +0 -1
- package/forms/lib/elements/number/number.component.d.ts +21 -30
- package/forms/lib/elements/number-range/number-range.component.d.ts +12 -7
- package/forms/lib/elements/organization/organization.component.d.ts +23 -51
- package/forms/lib/elements/range-select-date/range-select-date.component.d.ts +12 -7
- package/forms/lib/elements/range-select-filesize/range-select-filesize.component.d.ts +12 -7
- package/forms/lib/elements/string/string.component.d.ts +15 -20
- package/forms/lib/forms.module.d.ts +8 -11
- package/icons/index.d.ts +1 -0
- package/icons/lib/icon.component.d.ts +20 -0
- package/lib/assets/i18n/de.json +7 -23
- package/lib/assets/i18n/en.json +10 -26
- package/list/index.d.ts +1 -0
- package/list/lib/list-item.directive.d.ts +5 -4
- package/list/lib/list.component.d.ts +6 -3
- package/list/lib/list.module.d.ts +8 -0
- package/master-details/README.md +3 -0
- package/master-details/index.d.ts +2 -0
- package/master-details/lib/master-details.component.d.ts +58 -0
- package/master-details/lib/master-details.interface.d.ts +7 -0
- package/master-details/lib/master-details.module.d.ts +7 -0
- package/metadata-form/index.d.ts +4 -1
- package/metadata-form/lib/metadata-form-field/metadata-form-field.component.d.ts +4 -17
- package/metadata-form/lib/metadata-form-field/metadata-form-field.interface.d.ts +11 -0
- package/metadata-form/lib/object-metadata-element-error.directive.d.ts +13 -0
- package/metadata-form/lib/object-metadata-element-label.directive.d.ts +10 -0
- package/metadata-form/lib/object-metadata-element-template.directive.d.ts +3 -3
- package/metadata-form-defaults/README.md +3 -0
- package/metadata-form-defaults/index.d.ts +2 -0
- package/metadata-form-defaults/lib/metadata-form-defaults.module.d.ts +7 -0
- package/object-details/lib/object-audit/object-audit.component.d.ts +3 -9
- package/object-details/lib/object-details.component.d.ts +0 -2
- package/object-details/lib/object-metadata/object-metadata.component.d.ts +4 -3
- package/object-details/lib/retention-badge/retention-badge.component.d.ts +0 -3
- package/object-flavor/index.d.ts +1 -0
- package/object-flavor/lib/abstract-apply-create-flavor/abstract-apply-create-flavor.component.d.ts +1 -2
- package/object-flavor/lib/abstract-apply-object-flavor/abstract-apply-object-flavor.component.d.ts +3 -2
- package/object-flavor/lib/default-apply-flavor/default-apply-flavor.component.d.ts +19 -0
- package/object-flavor/lib/flavor-chip/flavor-chip.component.d.ts +1 -1
- package/object-flavor/lib/object-flavor/object-flavor.component.d.ts +3 -6
- package/object-flavor/lib/object-flavor-picker/object-flavor-picker.component.d.ts +0 -1
- package/object-form/index.d.ts +1 -1
- package/object-form/lib/object-form-element/object-form-element.component.d.ts +2 -2
- package/object-form/lib/object-form-group/object-form-group.component.d.ts +1 -3
- package/object-form/lib/object-form.component.d.ts +2 -2
- package/object-form/lib/object-form.interface.d.ts +0 -44
- package/object-form/lib/object-form.module.d.ts +7 -0
- package/object-form/lib/object-form.service.d.ts +1 -2
- package/object-form/lib/object-form.utils.d.ts +1 -1
- package/object-summary/lib/object-summary/object-summary.component.d.ts +13 -15
- package/overflow-menu/README.md +3 -0
- package/overflow-menu/index.d.ts +3 -0
- package/overflow-menu/lib/overflow-menu.component.d.ts +31 -0
- package/overflow-menu/lib/overflow-menu.interface.d.ts +9 -0
- package/overflow-menu/lib/overflow-menu.module.d.ts +7 -0
- package/package.json +44 -70
- package/popout/README.md +3 -0
- package/popout/index.d.ts +3 -0
- package/popout/lib/popout.component.d.ts +58 -0
- package/popout/lib/popout.interface.d.ts +17 -0
- package/popout/lib/popout.module.d.ts +7 -0
- package/renderer/lib/property-renderer/abstract.renderer.d.ts +4 -4
- package/renderer/lib/property-renderer/icon.renderer.component.d.ts +2 -0
- package/renderer/lib/renderer.directive.d.ts +4 -3
- package/sequence-list/index.d.ts +0 -1
- package/sequence-list/lib/sequence-list.component.d.ts +0 -4
- package/simple-search/index.d.ts +0 -1
- package/simple-search/lib/simple-search/simple-search.component.d.ts +6 -10
- package/split-view/README.md +3 -0
- package/split-view/index.d.ts +4 -0
- package/split-view/lib/split-area.directive.d.ts +16 -0
- package/split-view/lib/split-view.component.d.ts +76 -0
- package/split-view/lib/split-view.interface.d.ts +10 -0
- package/split-view/lib/split-view.module.d.ts +8 -0
- package/styles/client-framework.scss +21 -67
- package/tile-list/lib/tile/tile.component.d.ts +1 -2
- package/tile-list/lib/tile-config/property-select/property-select.component.d.ts +0 -1
- package/tile-list/lib/tile-config/tile-config-trigger/tile-config-trigger.component.d.ts +1 -2
- package/tile-list/lib/tile-config/tile-config.component.d.ts +0 -3
- package/tile-list/lib/tile-list/tile-list.component.d.ts +5 -5
- package/upload-progress/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.d.ts +0 -5
- package/upload-progress/lib/upload-progress/upload-progress.component.d.ts +0 -4
- package/common/lib/components/focus-indicator/focus-indicator.component.d.ts +0 -7
- package/common/lib/components/token-input/token-input.component.d.ts +0 -55
- package/common/lib/components/token-input/token-input.interface.d.ts +0 -8
- package/common/lib/services/error-messages/error-messages.service.d.ts +0 -7
- package/esm2022/actions/index.mjs +0 -7
- package/esm2022/actions/lib/actions/copy-action/copy-action.mjs +0 -31
- package/esm2022/actions/lib/actions/cut-action/cut-action.mjs +0 -30
- package/esm2022/actions/lib/actions/delete-action/delete/delete.component.mjs +0 -67
- package/esm2022/actions/lib/actions/delete-action/delete-action.mjs +0 -38
- package/esm2022/actions/lib/actions/download-action/download-action.mjs +0 -33
- package/esm2022/actions/lib/actions.icon.mjs +0 -8
- package/esm2022/actions/lib/actions.interface.mjs +0 -19
- package/esm2022/actions/lib/actions.module.mjs +0 -16
- package/esm2022/actions/lib/actions.service.mjs +0 -89
- package/esm2022/actions/lib/components/contextmenu/contextmenu.component.mjs +0 -27
- package/esm2022/actions/yuuvis-client-framework-actions.mjs +0 -5
- package/esm2022/app-bar/index.mjs +0 -2
- package/esm2022/app-bar/lib/app-bar.component.mjs +0 -89
- package/esm2022/app-bar/yuuvis-client-framework-app-bar.mjs +0 -5
- package/esm2022/clipboard/index.mjs +0 -2
- package/esm2022/clipboard/lib/clipboard.component.mjs +0 -48
- package/esm2022/clipboard/yuuvis-client-framework-clipboard.mjs +0 -5
- package/esm2022/common/index.mjs +0 -7
- package/esm2022/common/lib/components/focus-indicator/focus-indicator.component.mjs +0 -41
- package/esm2022/common/lib/components/token-input/token-input.component.mjs +0 -324
- package/esm2022/common/lib/components/token-input/token-input.interface.mjs +0 -2
- package/esm2022/common/lib/directives/busy-overlay.directive.mjs +0 -88
- package/esm2022/common/lib/directives/click-double.directive.mjs +0 -61
- package/esm2022/common/lib/directives/container-size.directive.mjs +0 -56
- package/esm2022/common/lib/directives/drag-select.directive.mjs +0 -114
- package/esm2022/common/lib/directives/file-drop-zone/file-drop-zone.directive.mjs +0 -153
- package/esm2022/common/lib/directives/file-drop-zone/file-drop-zone.interface.mjs +0 -2
- package/esm2022/common/lib/directives/focus-within.directive.mjs +0 -81
- package/esm2022/common/lib/directives/index.mjs +0 -9
- package/esm2022/common/lib/directives/light-dismiss.directive.mjs +0 -44
- package/esm2022/common/lib/directives/longpress.directive.mjs +0 -36
- package/esm2022/common/lib/directives/noop-value-accessor.directive.mjs +0 -42
- package/esm2022/common/lib/services/error-messages/error-messages.service.mjs +0 -68
- package/esm2022/common/lib/services/index.mjs +0 -2
- package/esm2022/common/yuuvis-client-framework-common.mjs +0 -5
- package/esm2022/forms/index.mjs +0 -24
- package/esm2022/forms/lib/elements/catalog/catalog.component.mjs +0 -118
- package/esm2022/forms/lib/elements/data-grid/data-grid/data-grid.component.mjs +0 -172
- package/esm2022/forms/lib/elements/data-grid/edit-table-data/edit-data.component.mjs +0 -95
- package/esm2022/forms/lib/elements/data-grid/model/data-grid.interface.mjs +0 -9
- package/esm2022/forms/lib/elements/datetime/datetime.component.mjs +0 -82
- package/esm2022/forms/lib/elements/datetime-range/datetime-range.component.mjs +0 -166
- package/esm2022/forms/lib/elements/index.mjs +0 -11
- package/esm2022/forms/lib/elements/number/number.component.mjs +0 -195
- package/esm2022/forms/lib/elements/number-range/number-range.component.mjs +0 -176
- package/esm2022/forms/lib/elements/organization/organization.component.mjs +0 -286
- package/esm2022/forms/lib/elements/range-select-date/date-range-picker/date-range-picker.component.mjs +0 -38
- package/esm2022/forms/lib/elements/range-select-date/range-select-date.component.mjs +0 -181
- package/esm2022/forms/lib/elements/range-select-date/range-select-date.interface.mjs +0 -2
- package/esm2022/forms/lib/elements/range-select-filesize/range-select-filesize.component.mjs +0 -98
- package/esm2022/forms/lib/elements/range-select-filesize/range-select-filesize.interface.mjs +0 -2
- package/esm2022/forms/lib/elements/string/string.component.mjs +0 -261
- package/esm2022/forms/lib/form-input/form-input.component.mjs +0 -88
- package/esm2022/forms/lib/forms.module.mjs +0 -58
- package/esm2022/forms/yuuvis-client-framework-forms.mjs +0 -5
- package/esm2022/icons/index.mjs +0 -4
- package/esm2022/icons/lib/icon.service.mjs +0 -59
- package/esm2022/icons/lib/icons.mjs +0 -32
- package/esm2022/icons/lib/object-type-icon/object-type-icon.component.mjs +0 -29
- package/esm2022/icons/yuuvis-client-framework-icons.mjs +0 -5
- package/esm2022/index.mjs +0 -2
- package/esm2022/lib/yuuvis-client-framework.module.mjs +0 -15
- package/esm2022/list/index.mjs +0 -3
- package/esm2022/list/lib/list-item.directive.mjs +0 -72
- package/esm2022/list/lib/list.component.mjs +0 -135
- package/esm2022/list/yuuvis-client-framework-list.mjs +0 -5
- package/esm2022/metadata-form/index.mjs +0 -4
- package/esm2022/metadata-form/lib/metadata-default-templates/metadata-default-templates.component.mjs +0 -32
- package/esm2022/metadata-form/lib/metadata-form-element-registry.service.mjs +0 -99
- package/esm2022/metadata-form/lib/metadata-form-field/metadata-form-field.component.mjs +0 -83
- package/esm2022/metadata-form/lib/object-metadata-element-template.directive.mjs +0 -52
- package/esm2022/metadata-form/yuuvis-client-framework-metadata-form.mjs +0 -5
- package/esm2022/object-details/index.mjs +0 -8
- package/esm2022/object-details/lib/object-audit/object-audit.component.mjs +0 -195
- package/esm2022/object-details/lib/object-details-shell/object-details-shell.component.mjs +0 -127
- package/esm2022/object-details/lib/object-details.component.mjs +0 -61
- package/esm2022/object-details/lib/object-metadata/form-section-group.pipe.mjs +0 -17
- package/esm2022/object-details/lib/object-metadata/object-metadata.component.mjs +0 -202
- package/esm2022/object-details/lib/object-metadata/object-metadata.interface.mjs +0 -2
- package/esm2022/object-details/lib/retention-badge/retention-badge.component.mjs +0 -27
- package/esm2022/object-details/yuuvis-client-framework-object-details.mjs +0 -5
- package/esm2022/object-flavor/index.mjs +0 -6
- package/esm2022/object-flavor/lib/abstract-apply-create-flavor/abstract-apply-create-flavor.component.mjs +0 -25
- package/esm2022/object-flavor/lib/abstract-apply-object-flavor/abstract-apply-object-flavor.component.mjs +0 -21
- package/esm2022/object-flavor/lib/flavor-chip/flavor-chip.component.mjs +0 -35
- package/esm2022/object-flavor/lib/object-flavor/object-flavor.component.mjs +0 -93
- package/esm2022/object-flavor/lib/object-flavor-picker/object-flavor-picker.component.mjs +0 -43
- package/esm2022/object-flavor/yuuvis-client-framework-object-flavor.mjs +0 -5
- package/esm2022/object-form/index.mjs +0 -5
- package/esm2022/object-form/lib/form-scripting.api.interface.mjs +0 -2
- package/esm2022/object-form/lib/form-scripting.service.mjs +0 -160
- package/esm2022/object-form/lib/object-form-element/object-form-element.component.mjs +0 -87
- package/esm2022/object-form/lib/object-form-extension.interface.mjs +0 -36
- package/esm2022/object-form/lib/object-form-group/object-form-group.component.mjs +0 -85
- package/esm2022/object-form/lib/object-form-script/form-scripting-element-extension/form-scripting-element-extension.component.mjs +0 -23
- package/esm2022/object-form/lib/object-form-script/object-form-script.service.mjs +0 -115
- package/esm2022/object-form/lib/object-form-script/object-form-scripting-scope.mjs +0 -251
- package/esm2022/object-form/lib/object-form-translate.service.mjs +0 -73
- package/esm2022/object-form/lib/object-form.component.mjs +0 -628
- package/esm2022/object-form/lib/object-form.interface.mjs +0 -9
- package/esm2022/object-form/lib/object-form.model.mjs +0 -20
- package/esm2022/object-form/lib/object-form.service.mjs +0 -130
- package/esm2022/object-form/lib/object-form.utils.mjs +0 -55
- package/esm2022/object-form/lib/object-form.validation.mjs +0 -48
- package/esm2022/object-form/yuuvis-client-framework-object-form.mjs +0 -5
- package/esm2022/object-preview/index.mjs +0 -3
- package/esm2022/object-preview/lib/components/index.mjs +0 -3
- package/esm2022/object-preview/lib/components/object-email-preview/object-email-preview.component.mjs +0 -45
- package/esm2022/object-preview/lib/components/object-preview/object-preview.component.mjs +0 -78
- package/esm2022/object-preview/lib/services/object-preview.service.mjs +0 -119
- package/esm2022/object-preview/yuuvis-client-framework-object-preview.mjs +0 -5
- package/esm2022/object-summary/index.mjs +0 -5
- package/esm2022/object-summary/lib/multi-object-summary/multi-object-summary.component.mjs +0 -33
- package/esm2022/object-summary/lib/object-summary/object-summary.component.mjs +0 -275
- package/esm2022/object-summary/lib/object-summary-data/object-summary-data.component.mjs +0 -80
- package/esm2022/object-summary/lib/object-summary.module.mjs +0 -15
- package/esm2022/object-summary/yuuvis-client-framework-object-summary.mjs +0 -5
- package/esm2022/pagination/index.mjs +0 -3
- package/esm2022/pagination/lib/pagination.component.mjs +0 -46
- package/esm2022/pagination/lib/pagination.interface.mjs +0 -2
- package/esm2022/pagination/yuuvis-client-framework-pagination.mjs +0 -5
- package/esm2022/panel/index.mjs +0 -2
- package/esm2022/panel/lib/panel.component.mjs +0 -20
- package/esm2022/panel/yuuvis-client-framework-panel.mjs +0 -5
- package/esm2022/renderer/index.mjs +0 -11
- package/esm2022/renderer/lib/property-renderer/abstract.renderer.mjs +0 -29
- package/esm2022/renderer/lib/property-renderer/datetime.renderer.mjs +0 -13
- package/esm2022/renderer/lib/property-renderer/decimal.renderer.component.mjs +0 -12
- package/esm2022/renderer/lib/property-renderer/filesize.renderer.component.mjs +0 -28
- package/esm2022/renderer/lib/property-renderer/icon.renderer.component.mjs +0 -23
- package/esm2022/renderer/lib/property-renderer/integer.renderer.component.mjs +0 -12
- package/esm2022/renderer/lib/property-renderer/organization.renderer.mjs +0 -19
- package/esm2022/renderer/lib/property-renderer/string.renderer.component.mjs +0 -12
- package/esm2022/renderer/lib/property-renderer/unknown.renderer.mjs +0 -12
- package/esm2022/renderer/lib/renderer.directive.mjs +0 -51
- package/esm2022/renderer/lib/services/renderer/renderer.interface.mjs +0 -2
- package/esm2022/renderer/lib/services/renderer/renderer.service.mjs +0 -84
- package/esm2022/renderer/yuuvis-client-framework-renderer.mjs +0 -5
- package/esm2022/sequence-list/index.mjs +0 -4
- package/esm2022/sequence-list/lib/due-date-picker/due-date-picker.component.mjs +0 -99
- package/esm2022/sequence-list/lib/sequence-list.component.mjs +0 -141
- package/esm2022/sequence-list/lib/sequence-list.interface.mjs +0 -2
- package/esm2022/sequence-list/yuuvis-client-framework-sequence-list.mjs +0 -5
- package/esm2022/simple-search/index.mjs +0 -3
- package/esm2022/simple-search/lib/simple-search/simple-search.component.mjs +0 -111
- package/esm2022/simple-search/lib/simple-search/simple-search.interface.mjs +0 -2
- package/esm2022/simple-search/yuuvis-client-framework-simple-search.mjs +0 -5
- package/esm2022/tile-list/index.mjs +0 -11
- package/esm2022/tile-list/lib/tile/tile.component.mjs +0 -53
- package/esm2022/tile-list/lib/tile-config/action-select/action-select.component.mjs +0 -25
- package/esm2022/tile-list/lib/tile-config/icon-select/icon-select.component.mjs +0 -33
- package/esm2022/tile-list/lib/tile-config/property-select/property-select.component.mjs +0 -91
- package/esm2022/tile-list/lib/tile-config/tile-config-tile/tile-config-tile.component.mjs +0 -66
- package/esm2022/tile-list/lib/tile-config/tile-config-trigger/tile-config-trigger.component.mjs +0 -46
- package/esm2022/tile-list/lib/tile-config/tile-config.component.mjs +0 -156
- package/esm2022/tile-list/lib/tile-extension/directive/tile-extension.directive.mjs +0 -37
- package/esm2022/tile-list/lib/tile-extension/extensions/email.extension.mjs +0 -42
- package/esm2022/tile-list/lib/tile-extension/tile-extension.service.mjs +0 -35
- package/esm2022/tile-list/lib/tile-list/tile-list.component.mjs +0 -510
- package/esm2022/tile-list/lib/tile-list/tile-list.interface.mjs +0 -2
- package/esm2022/tile-list/yuuvis-client-framework-tile-list.mjs +0 -5
- package/esm2022/token-search/index.mjs +0 -3
- package/esm2022/token-search/token-search.component.mjs +0 -78
- package/esm2022/token-search/token-search.interface.mjs +0 -2
- package/esm2022/token-search/yuuvis-client-framework-token-search.mjs +0 -5
- package/esm2022/tree/index.mjs +0 -3
- package/esm2022/tree/lib/tree-node/tree-node.component.mjs +0 -65
- package/esm2022/tree/lib/tree.component.mjs +0 -148
- package/esm2022/tree/lib/tree.interface.mjs +0 -2
- package/esm2022/tree/lib/tree.service.mjs +0 -95
- package/esm2022/tree/yuuvis-client-framework-tree.mjs +0 -5
- package/esm2022/upload-progress/index.mjs +0 -2
- package/esm2022/upload-progress/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.mjs +0 -49
- package/esm2022/upload-progress/lib/upload-progress/upload-progress.component.mjs +0 -37
- package/esm2022/upload-progress/yuuvis-client-framework-upload-progress.mjs +0 -5
- package/esm2022/user-avatar/index.mjs +0 -3
- package/esm2022/user-avatar/lib/user-avatar.component.mjs +0 -69
- package/esm2022/user-avatar/lib/user-avatar.module.mjs +0 -24
- package/esm2022/user-avatar/yuuvis-client-framework-user-avatar.mjs +0 -5
- package/esm2022/yuuvis-client-framework.mjs +0 -5
- package/fesm2022/yuuvis-client-framework-token-search.mjs +0 -85
- package/fesm2022/yuuvis-client-framework-token-search.mjs.map +0 -1
- package/fesm2022/yuuvis-client-framework-user-avatar.mjs +0 -96
- package/fesm2022/yuuvis-client-framework-user-avatar.mjs.map +0 -1
- package/forms/lib/form-input/form-input.component.d.ts +0 -48
- package/object-form/lib/object-form-translate.service.d.ts +0 -15
- package/object-form/lib/object-form.model.d.ts +0 -18
- package/sequence-list/lib/due-date-picker/due-date-picker.component.d.ts +0 -28
- package/simple-search/lib/simple-search/simple-search.interface.d.ts +0 -4
- package/token-search/README.md +0 -3
- package/token-search/index.d.ts +0 -2
- package/token-search/token-search.component.d.ts +0 -22
- package/token-search/token-search.interface.d.ts +0 -4
- package/user-avatar/README.md +0 -3
- package/user-avatar/index.d.ts +0 -2
- package/user-avatar/lib/user-avatar.component.d.ts +0 -44
- package/user-avatar/lib/user-avatar.module.d.ts +0 -8
- /package/{metadata-form → metadata-form-defaults}/lib/metadata-default-templates/metadata-default-templates.component.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-tree.mjs","sources":["../../../../../libs/yuuvis/client-framework/tree/src/lib/tree.service.ts","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree-node/tree-node.component.ts","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree-node/tree-node.component.html","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree.component.ts","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree.component.html","../../../../../libs/yuuvis/client-framework/tree/src/yuuvis-client-framework-tree.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { Tree, TreeNode } from './tree.interface';\n\n@Injectable()\nexport class TreeService {\n private _tree?: Tree;\n private _selection: TreeNode[] = [];\n private _selectionSource = new ReplaySubject<TreeNode[]>();\n selection$: Observable<TreeNode[]> = this._selectionSource.asObservable();\n\n private _nodeClickSource = new Subject<TreeNode>();\n nodeClick$: Observable<TreeNode> = this._nodeClickSource.asObservable();\n\n private _nodeFocusSource = new ReplaySubject<string | null | undefined>();\n nodeFocus$: Observable<string | null | undefined> = this._nodeFocusSource.asObservable();\n\n multiselect = false;\n\n setTree(tree: Tree) {\n this._tree = tree;\n }\n\n focusNode(id: string | null | undefined) {\n this._nodeFocusSource.next(id);\n }\n\n toggleNode(id: string | null) {\n if (id) {\n const node = this._getNodeById(id);\n if (node) node.expanded = !node.expanded;\n }\n }\n\n selectNodeByID(id: string, ctrlKey = false) {\n const node = this._getNodeById(id);\n if (node) this.selectNode(node, ctrlKey);\n }\n\n /**\n * Select a tree node. If the node has already been selected it'll be\n * removed from the selection. Otherwise it will be added. By default selection\n * will only contain a single node. If `multiselect` is set to true and CTRL is\n * pressed the current collection will be extended.\n * @param node The tree node to be added/removed\n * @param ctrlKey Whether or not the CTRL key has been pressed\n * @returns The updated list of selected tree nodes\n */\n selectNode(node: TreeNode, ctrlKey = false): void {\n if (node.selectable) {\n if (!this.multiselect || !ctrlKey) {\n this._selection = [node];\n } else {\n const ids = this._selection.map((n) => n.id);\n if (ids.includes(node.id)) this._selection = this._selection.filter((n) => n.id !== node.id);\n else this._selection.push(node);\n }\n this._selectionSource.next(this._selection);\n }\n this._nodeClickSource.next(node);\n }\n\n setSelection(nodeIds: string[]) {\n this._resolveSelectedNodes(nodeIds);\n this._selectionSource.next(this._selection);\n }\n\n private _getNodeById(id: string): TreeNode | undefined {\n return this._tree ? this._getChildNodeById(id, this._tree.nodes) : undefined;\n }\n private _getChildNodeById(id: string, nodes: TreeNode[]): TreeNode | undefined {\n let match: TreeNode | undefined;\n nodes.forEach((n) => {\n if (n.id === id) match = n;\n if (!match && n.children) match = this._getChildNodeById(id, n.children);\n });\n return match;\n }\n\n private _resolveSelectedNodes(nodeIDs: string[]): void {\n this._selection = [];\n if (!this._tree) return;\n this._resolveChildren(nodeIDs, this._tree.nodes);\n }\n\n private _resolveChildren(nodeIDs: string[], nodes: TreeNode[]): void {\n nodes.forEach((n) => {\n if (nodeIDs.includes(n.id)) this._selection.push(n);\n if (n.children?.length) this._resolveChildren(nodeIDs, n.children);\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, HostBinding, OnDestroy, OnInit, effect, inject, input } from '@angular/core';\nimport { YvcIconModule } from '@yuuvis/components/icon';\nimport { Subscription } from 'rxjs';\nimport { TreeNode } from '../tree.interface';\nimport { TreeService } from '../tree.service';\n\n@Component({\n selector: 'yuv-tree-node',\n standalone: true,\n imports: [CommonModule, YvcIconModule],\n templateUrl: './tree-node.component.html',\n styleUrl: './tree-node.component.scss',\n host: {\n role: 'treeitem'\n }\n})\nexport class TreeNodeComponent implements OnInit, OnDestroy {\n private treeService = inject(TreeService);\n\n node = input.required<TreeNode>();\n toggleIcon = input<string>(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"18px\" viewBox=\"0 -960 960 960\" width=\"18px\"><path d=\"M522-480 333-669l51-51 240 240-240 240-51-51 189-189Z\"/></svg>'\n );\n @HostBinding('class.focused') focused = false;\n @HostBinding('attr.aria-selected') selected = false;\n @HostBinding('attr.aria-expanded') expanded = false;\n\n private _selectedNodes: string[] = [];\n private _subs: Subscription[] = [];\n\n treeSelectEffect = effect(() => {\n this._setSelection();\n this.expanded = !!this.node().expanded;\n });\n\n select(evt: MouseEvent | KeyboardEvent) {\n this.treeService.selectNode(this.node(), evt.ctrlKey);\n }\n\n toggleExpanded() {\n this.node().expanded = !this.node().expanded;\n this.expanded = !!this.node().expanded;\n }\n\n private _setSelection() {\n if (!this.node()) return;\n this.selected = this._selectedNodes.includes(this.node().id);\n }\n\n ngOnInit(): void {\n this._subs.push(\n this.treeService.selection$.subscribe((selection: TreeNode[]) => {\n this._selectedNodes = selection.map((n) => n.id);\n this._setSelection();\n })\n );\n this._subs.push(\n this.treeService.nodeFocus$.subscribe((id: string | null | undefined) => {\n this.focused = this.node().id === id;\n })\n );\n }\n\n ngOnDestroy(): void {\n this._subs.forEach((s) => s.unsubscribe());\n }\n}\n","@if (node().children?.length) {\n <!-- toggle children button-->\n <!-- TODO: title should be i18n -->\n <button class=\"toggle\" (click)=\"toggleExpanded()\" title=\"toggle Expand\">\n <yvc-icon [svg]=\"toggleIcon()\"></yvc-icon>\n </button>\n}\n<div class=\"node-label\" [attr.node-id]=\"node().id\" [ngClass]=\"{ selectable: node().selectable }\" (click)=\"select($event)\">\n @if (node().icon) {\n <yvc-icon class=\"node-icon\" [svg]=\"node().icon!\"></yvc-icon>\n }\n <div class=\"label\">{{ node().label }}</div>\n</div>\n\n@if (node().expanded) {\n <div class=\"children\">\n @for (childNode of node().children; track $index) {\n <yuv-tree-node [toggleIcon]=\"toggleIcon()\" [node]=\"childNode\"></yuv-tree-node>\n }\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n HostAttributeToken,\n HostBinding,\n HostListener,\n Input,\n OnDestroy,\n effect,\n inject,\n input,\n output\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { TreeNodeComponent } from './tree-node/tree-node.component';\nimport { Tree, TreeNode } from './tree.interface';\nimport { TreeService } from './tree.service';\n\n/**\n * Component rendering a tree. \n */\n@Component({\n selector: 'yuv-tree',\n standalone: true,\n imports: [CommonModule, TreeNodeComponent],\n providers: [TreeService],\n templateUrl: './tree.component.html',\n styleUrl: './tree.component.scss',\n host: {\n class: 'yuv-tree',\n role: 'tree'\n }\n})\nexport class TreeComponent implements AfterViewInit, OnDestroy {\n private treeService = inject(TreeService);\n private elRef = inject(ElementRef);\n\n private items?: NodeListOf<HTMLElement>;\n\n private _observer = new MutationObserver(() => {\n this._getVisibleNodes();\n });\n\n /**\n * The tree to be rendered\n */\n tree = input.required<Tree>();\n\n /**\n * Whether or not multiple nodes should be selectable. Only works when selection is enableed by \n * setting 'selectable' attribute:\n * \n * ```html\n * <yuv-tree selectable [multiselect]=\"true\"></yuv-tree\n * ```\n */\n multiselect = input<boolean>(false);\n\n /**\n * Host attribute to enable persistent selection of nodes. \n */\n @HostBinding('class.selectable')\n selectable: string | null = inject(new HostAttributeToken('selectable'), { optional: true });\n\n private __focusedIndex = -1;\n private set _focusedIndex(idx: number) {\n this.__focusedIndex = idx;\n this.treeService.focusNode(this.items?.item(idx).getAttribute('node-id'));\n }\n get _focusedIndex() {\n return this.__focusedIndex;\n }\n\n /**\n * IDs of nodes that should be set 'selected'.\n */\n @Input() set selectedNodes(nodeIds: string[]) {\n this.treeService.setSelection(nodeIds);\n }\n\n /**\n * Emitted when selection changes\n */\n selectionChange = output<TreeNode[]>();\n\n @HostBinding('attr.tabindex') readonly tabindex = '0';\n @HostListener('keydown', ['$event']) onKeydown(event: KeyboardEvent) {\n switch (event.code) {\n case 'ArrowDown': {\n if ((this.items && this._focusedIndex === this.items.length - 1) || this.__focusedIndex === -1) {\n this._focusedIndex = 0;\n } else this._focusedIndex++;\n break;\n }\n case 'ArrowUp': {\n if (this.items && (this._focusedIndex === 0 || this.__focusedIndex === -1)) {\n this._focusedIndex = this.items.length - 1;\n } else this._focusedIndex--;\n break;\n }\n case 'ArrowRight': {\n this._toggle();\n break;\n }\n case 'ArrowLeft': {\n this._toggle();\n break;\n }\n case 'Space': {\n this._selectFocusedNode(event.ctrlKey);\n break;\n }\n case 'Enter': {\n this._selectFocusedNode(event.ctrlKey);\n break;\n }\n }\n }\n setTreeEffect = effect(() => {\n this.treeService.setTree(this.tree());\n // if (this.tree()) this.selectedNodes = [];\n });\n setTreeMultiselectEffect = effect(() => (this.treeService.multiselect = this.multiselect()));\n\n constructor() {\n this.treeService.nodeClick$.pipe(takeUntilDestroyed()).subscribe((node) => {\n const idx = Array.from(this.items || []).findIndex((i) => i.getAttribute('node-id') === node.id);\n if (idx !== -1) this._focusedIndex = idx;\n });\n this.treeService.selection$.pipe(takeUntilDestroyed()).subscribe((selection) => {\n this.selectionChange.emit(selection);\n });\n }\n\n private _toggle() {\n this.treeService.toggleNode(this._getFocusedNodeId());\n }\n\n private _selectFocusedNode(ctrlKey = false) {\n const fid = this._getFocusedNodeId();\n if (fid) this.treeService.selectNodeByID(fid, ctrlKey);\n }\n\n private _getFocusedNodeId(): string | null {\n return Array.from(this.items || [])[this.__focusedIndex].getAttribute('node-id');\n }\n\n private _getVisibleNodes() {\n this.items = (this.elRef.nativeElement as HTMLElement).querySelectorAll<HTMLElement>('.node-label');\n }\n\n ngAfterViewInit(): void {\n this._getVisibleNodes();\n this._observer.observe(this.elRef.nativeElement, {\n childList: true,\n subtree: true\n });\n }\n\n ngOnDestroy(): void {\n this._observer.disconnect();\n }\n}\n","@for (node of tree().nodes; track node.id) {\n <yuv-tree-node [node]=\"node\"></yuv-tree-node>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAKa,WAAW,CAAA;AADxB,IAAA,WAAA,GAAA;QAGU,IAAU,CAAA,UAAA,GAAe,EAAE,CAAC;AAC5B,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,aAAa,EAAc,CAAC;AAC3D,QAAA,IAAA,CAAA,UAAU,GAA2B,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;AAElE,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAY,CAAC;AACnD,QAAA,IAAA,CAAA,UAAU,GAAyB,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;AAEhE,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,aAAa,EAA6B,CAAC;AAC1E,QAAA,IAAA,CAAA,UAAU,GAA0C,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QAEzF,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AA0ErB,KAAA;AAxEC,IAAA,OAAO,CAAC,IAAU,EAAA;AAChB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;KACnB;AAED,IAAA,SAAS,CAAC,EAA6B,EAAA;AACrC,QAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KAChC;AAED,IA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UAAA,EAAA,IAAA,EDuBY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAS9B,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EACR,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,iBAAiB,CAAC,EAC/B,SAAA,EAAA,CAAC,WAAW,CAAC,EAGlB,IAAA,EAAA;AACJ,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,IAAI,EAAE,MAAM;AACb,qBAAA,EAAA,QAAA,EAAA,sGAAA,EAAA,MAAA,EAAA,CAAA,4HAAA,CAAA,EAAA,CAAA;wDA+BD,UAAU,EAAA,CAAA;sBADT,WAAW;uBAAC,kBAAkB,CAAA;gBAelB,aAAa,EAAA,CAAA;sBAAzB,KAAK;gBASiC,QAAQ,EAAA,CAAA;sBAA9C,WAAW;uBAAC,eAAe,CAAA;gBACS,SAAS,EAAA,CAAA;sBAA7C,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;;;AExFrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-tree.mjs","sources":["../../../../../libs/yuuvis/client-framework/tree/src/lib/tree.service.ts","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree-node/tree-node.component.ts","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree-node/tree-node.component.html","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree.component.ts","../../../../../libs/yuuvis/client-framework/tree/src/lib/tree.component.html","../../../../../libs/yuuvis/client-framework/tree/src/yuuvis-client-framework-tree.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { Tree, TreeNode } from './tree.interface';\n\n@Injectable()\nexport class TreeService {\n private _tree?: Tree;\n private _selection: TreeNode[] = [];\n private _selectionSource = new ReplaySubject<TreeNode[]>();\n selection$: Observable<TreeNode[]> = this._selectionSource.asObservable();\n\n private _nodeClickSource = new Subject<TreeNode>();\n nodeClick$: Observable<TreeNode> = this._nodeClickSource.asObservable();\n\n private _nodeFocusSource = new ReplaySubject<string | null | undefined>();\n nodeFocus$: Observable<string | null | undefined> = this._nodeFocusSource.asObservable();\n\n multiselect = false;\n\n setTree(tree: Tree) {\n this._tree = tree;\n }\n\n focusNode(id: string | null | undefined) {\n this._nodeFocusSource.next(id);\n }\n\n toggleNode(id: string | null) {\n if (id) {\n const node = this._getNodeById(id);\n if (node) node.expanded = !node.expanded;\n }\n }\n\n selectNodeByID(id: string, ctrlKey = false) {\n const node = this._getNodeById(id);\n if (node) this.selectNode(node, ctrlKey);\n }\n\n /**\n * Select a tree node. If the node has already been selected it'll be\n * removed from the selection. Otherwise it will be added. By default selection\n * will only contain a single node. If `multiselect` is set to true and CTRL is\n * pressed the current collection will be extended.\n * @param node The tree node to be added/removed\n * @param ctrlKey Whether or not the CTRL key has been pressed\n * @returns The updated list of selected tree nodes\n */\n selectNode(node: TreeNode, ctrlKey = false): void {\n if (node.selectable) {\n if (!this.multiselect || !ctrlKey) {\n this._selection = [node];\n } else {\n const ids = this._selection.map((n) => n.id);\n if (ids.includes(node.id)) this._selection = this._selection.filter((n) => n.id !== node.id);\n else this._selection.push(node);\n }\n this._selectionSource.next(this._selection);\n }\n this._nodeClickSource.next(node);\n }\n\n setSelection(nodeIds: string[]) {\n this._resolveSelectedNodes(nodeIds);\n this._selectionSource.next(this._selection);\n }\n\n private _getNodeById(id: string): TreeNode | undefined {\n return this._tree ? this._getChildNodeById(id, this._tree.nodes) : undefined;\n }\n private _getChildNodeById(id: string, nodes: TreeNode[]): TreeNode | undefined {\n let match: TreeNode | undefined;\n nodes.forEach((n) => {\n if (n.id === id) match = n;\n if (!match && n.children) match = this._getChildNodeById(id, n.children);\n });\n return match;\n }\n\n private _resolveSelectedNodes(nodeIDs: string[]): void {\n this._selection = [];\n if (!this._tree) return;\n this._resolveChildren(nodeIDs, this._tree.nodes);\n }\n\n private _resolveChildren(nodeIDs: string[], nodes: TreeNode[]): void {\n nodes.forEach((n) => {\n if (nodeIDs.includes(n.id)) this._selection.push(n);\n if (n.children?.length) this._resolveChildren(nodeIDs, n.children);\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, HostBinding, OnDestroy, OnInit, effect, inject, input } from '@angular/core';\nimport { YuvIconComponent } from '@yuuvis/client-framework/icons';\nimport { Subscription } from 'rxjs';\nimport { TreeNode } from '../tree.interface';\nimport { TreeService } from '../tree.service';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n\n@Component({\n selector: 'yuv-tree-node',\n standalone: true,\n imports: [CommonModule, YuvIconComponent, MatTooltipModule],\n templateUrl: './tree-node.component.html',\n styleUrl: './tree-node.component.scss',\n host: {\n role: 'treeitem'\n }\n})\nexport class TreeNodeComponent implements OnInit, OnDestroy {\n private treeService = inject(TreeService);\n\n node = input.required<TreeNode>();\n toggleIcon = input<string>(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"18px\" viewBox=\"0 -960 960 960\" width=\"18px\"><path d=\"M522-480 333-669l51-51 240 240-240 240-51-51 189-189Z\"/></svg>'\n );\n @HostBinding('class.focused') focused = false;\n @HostBinding('attr.aria-selected') selected = false;\n @HostBinding('attr.aria-expanded') expanded = false;\n\n private _selectedNodes: string[] = [];\n private _subs: Subscription[] = [];\n\n treeSelectEffect = effect(() => {\n this._setSelection();\n this.expanded = !!this.node().expanded;\n });\n\n select(evt: MouseEvent | KeyboardEvent) {\n this.treeService.selectNode(this.node(), evt.ctrlKey);\n }\n\n toggleExpanded() {\n this.node().expanded = !this.node().expanded;\n this.expanded = !!this.node().expanded;\n }\n\n private _setSelection() {\n if (!this.node()) return;\n this.selected = this._selectedNodes.includes(this.node().id);\n }\n\n ngOnInit(): void {\n this._subs.push(\n this.treeService.selection$.subscribe((selection: TreeNode[]) => {\n this._selectedNodes = selection.map((n) => n.id);\n this._setSelection();\n })\n );\n this._subs.push(\n this.treeService.nodeFocus$.subscribe((id: string | null | undefined) => {\n this.focused = this.node().id === id;\n })\n );\n }\n\n ngOnDestroy(): void {\n this._subs.forEach((s) => s.unsubscribe());\n }\n}\n","@if (node().children?.length) {\n <!-- toggle children button-->\n <!-- TODO: title should be i18n -->\n <button class=\"toggle\" (click)=\"toggleExpanded()\">\n <yuv-icon [svg]=\"toggleIcon()\"></yuv-icon>\n </button>\n}\n<div class=\"node-label\" [attr.node-id]=\"node().id\" [ngClass]=\"{ selectable: node().selectable }\" (click)=\"select($event)\">\n @if (node().icon) {\n <yuv-icon class=\"node-icon\" [svg]=\"node().icon!\"></yuv-icon>\n }\n <div class=\"label\">{{ node().label }}</div>\n</div>\n\n@if (node().expanded) {\n <div class=\"children\">\n @for (childNode of node().children; track $index) {\n <yuv-tree-node [toggleIcon]=\"toggleIcon()\" [node]=\"childNode\"></yuv-tree-node>\n }\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n HostAttributeToken,\n HostBinding,\n HostListener,\n Input,\n OnDestroy,\n effect,\n inject,\n input,\n output\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { TreeNodeComponent } from './tree-node/tree-node.component';\nimport { Tree, TreeNode } from './tree.interface';\nimport { TreeService } from './tree.service';\n\n/**\n * Component rendering a tree. \n */\n@Component({\n selector: 'yuv-tree',\n standalone: true,\n imports: [CommonModule, TreeNodeComponent],\n providers: [TreeService],\n templateUrl: './tree.component.html',\n styleUrl: './tree.component.scss',\n host: {\n class: 'yuv-tree',\n role: 'tree'\n }\n})\nexport class TreeComponent implements AfterViewInit, OnDestroy {\n private treeService = inject(TreeService);\n private elRef = inject(ElementRef);\n\n private items?: NodeListOf<HTMLElement>;\n\n private _observer = new MutationObserver(() => {\n this._getVisibleNodes();\n });\n\n /**\n * The tree to be rendered\n */\n tree = input.required<Tree>();\n\n /**\n * Whether or not multiple nodes should be selectable. Only works when selection is enableed by \n * setting 'selectable' attribute:\n * \n * ```html\n * <yuv-tree selectable [multiselect]=\"true\"></yuv-tree\n * ```\n */\n multiselect = input<boolean>(false);\n\n /**\n * Host attribute to enable persistent selection of nodes. \n */\n @HostBinding('class.selectable')\n selectable: string | null = inject(new HostAttributeToken('selectable'), { optional: true });\n\n private __focusedIndex = -1;\n private set _focusedIndex(idx: number) {\n this.__focusedIndex = idx;\n this.treeService.focusNode(this.items?.item(idx).getAttribute('node-id'));\n }\n get _focusedIndex() {\n return this.__focusedIndex;\n }\n\n /**\n * IDs of nodes that should be set 'selected'.\n */\n @Input() set selectedNodes(nodeIds: string[]) {\n this.treeService.setSelection(nodeIds);\n }\n\n /**\n * Emitted when selection changes\n */\n selectionChange = output<TreeNode[]>();\n\n @HostBinding('attr.tabindex') readonly tabindex = '0';\n @HostListener('keydown', ['$event']) onKeydown(event: KeyboardEvent) {\n switch (event.code) {\n case 'ArrowDown': {\n if ((this.items && this._focusedIndex === this.items.length - 1) || this.__focusedIndex === -1) {\n this._focusedIndex = 0;\n } else this._focusedIndex++;\n break;\n }\n case 'ArrowUp': {\n if (this.items && (this._focusedIndex === 0 || this.__focusedIndex === -1)) {\n this._focusedIndex = this.items.length - 1;\n } else this._focusedIndex--;\n break;\n }\n case 'ArrowRight': {\n this._toggle();\n break;\n }\n case 'ArrowLeft': {\n this._toggle();\n break;\n }\n case 'Space': {\n this._selectFocusedNode(event.ctrlKey);\n break;\n }\n case 'Enter': {\n this._selectFocusedNode(event.ctrlKey);\n break;\n }\n }\n }\n setTreeEffect = effect(() => {\n this.treeService.setTree(this.tree());\n // if (this.tree()) this.selectedNodes = [];\n });\n setTreeMultiselectEffect = effect(() => (this.treeService.multiselect = this.multiselect()));\n\n constructor() {\n this.treeService.nodeClick$.pipe(takeUntilDestroyed()).subscribe((node) => {\n const idx = Array.from(this.items || []).findIndex((i) => i.getAttribute('node-id') === node.id);\n if (idx !== -1) this._focusedIndex = idx;\n });\n this.treeService.selection$.pipe(takeUntilDestroyed()).subscribe((selection) => {\n this.selectionChange.emit(selection);\n });\n }\n\n private _toggle() {\n this.treeService.toggleNode(this._getFocusedNodeId());\n }\n\n private _selectFocusedNode(ctrlKey = false) {\n const fid = this._getFocusedNodeId();\n if (fid) this.treeService.selectNodeByID(fid, ctrlKey);\n }\n\n private _getFocusedNodeId(): string | null {\n return Array.from(this.items || [])[this.__focusedIndex].getAttribute('node-id');\n }\n\n private _getVisibleNodes() {\n this.items = (this.elRef.nativeElement as HTMLElement).querySelectorAll<HTMLElement>('.node-label');\n }\n\n ngAfterViewInit(): void {\n this._getVisibleNodes();\n this._observer.observe(this.elRef.nativeElement, {\n childList: true,\n subtree: true\n });\n }\n\n ngOnDestroy(): void {\n this._observer.disconnect();\n }\n}\n","@for (node of tree().nodes; track node.id) {\n <yuv-tree-node [node]=\"node\"></yuv-tree-node>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAKa,WAAW,CAAA;AADxB,IAAA,WAAA,GAAA;QAGU,IAAU,CAAA,UAAA,GAAe,EAAE;AAC3B,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,aAAa,EAAc;AAC1D,QAAA,IAAA,CAAA,UAAU,GAA2B,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;AAEjE,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAY;AAClD,QAAA,IAAA,CAAA,UAAU,GAAyB,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;AAE/D,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,aAAa,EAA6B;AACzE,QAAA,IAAA,CAAA,UAAU,GAA0C,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;QAExF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AAA,EAAA,IAAA,EDuBY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAS9B,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EACR,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,iBAAiB,CAAC,EAC/B,SAAA,EAAA,CAAC,WAAW,CAAC,EAGlB,IAAA,EAAA;AACJ,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,IAAI,EAAE;AACP,qBAAA,EAAA,QAAA,EAAA,sGAAA,EAAA,MAAA,EAAA,CAAA,gHAAA,CAAA,EAAA;wDA+BD,UAAU,EAAA,CAAA;sBADT,WAAW;uBAAC,kBAAkB;gBAelB,aAAa,EAAA,CAAA;sBAAzB;gBASsC,QAAQ,EAAA,CAAA;sBAA9C,WAAW;uBAAC,eAAe;gBACS,SAAS,EAAA,CAAA;sBAA7C,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;AExFrC;;AAEG;;;;"}
|
|
@@ -2,11 +2,13 @@ import * as i1 from '@angular/common';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, input, computed, output, Component, HostBinding } from '@angular/core';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i2 from '@angular/material/button';
|
|
6
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
+
import * as i3 from '@angular/material/icon';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
+
import * as i4 from '@yuuvis/client-core';
|
|
6
10
|
import { UploadService, TranslateService, TranslateModule } from '@yuuvis/client-core';
|
|
7
|
-
import {
|
|
8
|
-
import * as i2 from '@yuuvis/components/icon';
|
|
9
|
-
import { ICONS, YvcIconModule } from '@yuuvis/components/icon';
|
|
11
|
+
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
10
12
|
|
|
11
13
|
class UploadProgressOverlayComponent {
|
|
12
14
|
constructor() {
|
|
@@ -23,11 +25,6 @@ class UploadProgressOverlayComponent {
|
|
|
23
25
|
return items;
|
|
24
26
|
});
|
|
25
27
|
this.itemClick = output();
|
|
26
|
-
this.icons = {
|
|
27
|
-
remove: ICONS.clear,
|
|
28
|
-
done: YUV_ICONS.check,
|
|
29
|
-
err: YUV_ICONS.attention
|
|
30
|
-
};
|
|
31
28
|
}
|
|
32
29
|
#uploadService;
|
|
33
30
|
remove(id) {
|
|
@@ -41,12 +38,14 @@ class UploadProgressOverlayComponent {
|
|
|
41
38
|
return this.translate.instant('yuv.upload-progress-overlay.error.default');
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
45
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: UploadProgressOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: UploadProgressOverlayComponent, isStandalone: true, selector: "yuv-upload-progress-overlay", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "<ul>\n @for (item of _items(); track item.id) {\n @let progress = item.progress | async;\n <li [ngClass]=\"{ err: !!item.err, done: !!item.result }\" [style.--progress]=\"progress + '%'\">\n <button mat-icon-button class=\"remove\" (click)=\"remove(item.id)\">\n <mat-icon [ngClass]=\"{ err: !!item.err }\">close</mat-icon>\n </button>\n\n @if (!item.result) {\n <div class=\"name\">{{ item.filename }}\n @if(item.err) {\n <span class=\"error\">{{item.err.message}}</span>\n }\n </div>\n <div class=\"progress\">\n @if (progress && progress < 100) {\n <div class=\"percentage\">{{ progress }}</div>\n }\n @else if(item.err) {\n <mat-icon class=\"error\">warning</mat-icon>\n }\n @else {\n <mat-progress-spinner mode=\"indeterminate\" class=\"ymt-progress-spinner--tiny\"></mat-progress-spinner>\n }\n </div>\n } @else {\n <div class=\"result-items\">\n @for (res of item.result; track $index) {\n <div class=\"result-item\">\n <div class=\"name\" (click)=\"itemClick.emit(res)\">\n {{ res.label }}\n </div>\n </div>\n }\n </div>\n <mat-icon class=\"done\">check</mat-icon>\n }\n </li>\n }\n</ul>\n", styles: [":host ul{list-style:none;padding:0;margin:var(--ymt-spacing-xs) 0}:host li{--hover-background: transparent;display:grid;grid-template-columns:1fr auto auto;grid-template-rows:auto;cursor:default;grid-template-areas:\"result progress action\";align-items:center;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) var(--ymt-spacing-xs);gap:.5em;margin-block-end:1px;background:linear-gradient(90deg,rgb(from var(--ymt-primary) r g b/.1) 0%,rgb(from var(--ymt-primary) r g b/.3) var(--progress),var(--hover-background) var(--progress));transition:background-color .3s ease-in-out}:host li.done{background:var(--hover-background)}:host li:hover{--hover-background: var(--ymt-hover-background)}:host li .name{grid-area:result;max-width:35ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host li .name .error{color:var(--ymt-text-color-subtle);display:block;font-style:italic;max-width:35ch}:host li .progress{grid-area:progress}:host li .percentage{font-family:monospace;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-m);font:var(--ymt-font-body-subtle);color:var(--ymt-text-color-subtle);align-self:center}:host li .percentage:after{content:\"%\"}:host li mat-icon.done{--icon-size: 18px;fill:var(--ymt-primary)}:host li .remove{grid-area:action}:host li .remove mat-icon{color:var(--ymt-text-color-subtle)}:host .result-items{grid-area:result}:host .result-items .result-item{cursor:pointer}:host mat-icon{--icon-size: 18px;border-radius:4px}:host mat-icon.done{background-color:var(--ymt-primary);color:var(--ymt-on-primary)}:host mat-icon.error{color:var(--ymt-danger)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
|
|
46
43
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: UploadProgressOverlayComponent, decorators: [{
|
|
48
45
|
type: Component,
|
|
49
|
-
args: [{ selector: 'yuv-upload-progress-overlay', standalone: true, imports: [CommonModule,
|
|
46
|
+
args: [{ selector: 'yuv-upload-progress-overlay', standalone: true, imports: [CommonModule,
|
|
47
|
+
MatButtonModule,
|
|
48
|
+
MatIconModule, TranslateModule, MatProgressSpinner], template: "<ul>\n @for (item of _items(); track item.id) {\n @let progress = item.progress | async;\n <li [ngClass]=\"{ err: !!item.err, done: !!item.result }\" [style.--progress]=\"progress + '%'\">\n <button mat-icon-button class=\"remove\" (click)=\"remove(item.id)\">\n <mat-icon [ngClass]=\"{ err: !!item.err }\">close</mat-icon>\n </button>\n\n @if (!item.result) {\n <div class=\"name\">{{ item.filename }}\n @if(item.err) {\n <span class=\"error\">{{item.err.message}}</span>\n }\n </div>\n <div class=\"progress\">\n @if (progress && progress < 100) {\n <div class=\"percentage\">{{ progress }}</div>\n }\n @else if(item.err) {\n <mat-icon class=\"error\">warning</mat-icon>\n }\n @else {\n <mat-progress-spinner mode=\"indeterminate\" class=\"ymt-progress-spinner--tiny\"></mat-progress-spinner>\n }\n </div>\n } @else {\n <div class=\"result-items\">\n @for (res of item.result; track $index) {\n <div class=\"result-item\">\n <div class=\"name\" (click)=\"itemClick.emit(res)\">\n {{ res.label }}\n </div>\n </div>\n }\n </div>\n <mat-icon class=\"done\">check</mat-icon>\n }\n </li>\n }\n</ul>\n", styles: [":host ul{list-style:none;padding:0;margin:var(--ymt-spacing-xs) 0}:host li{--hover-background: transparent;display:grid;grid-template-columns:1fr auto auto;grid-template-rows:auto;cursor:default;grid-template-areas:\"result progress action\";align-items:center;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) var(--ymt-spacing-xs);gap:.5em;margin-block-end:1px;background:linear-gradient(90deg,rgb(from var(--ymt-primary) r g b/.1) 0%,rgb(from var(--ymt-primary) r g b/.3) var(--progress),var(--hover-background) var(--progress));transition:background-color .3s ease-in-out}:host li.done{background:var(--hover-background)}:host li:hover{--hover-background: var(--ymt-hover-background)}:host li .name{grid-area:result;max-width:35ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host li .name .error{color:var(--ymt-text-color-subtle);display:block;font-style:italic;max-width:35ch}:host li .progress{grid-area:progress}:host li .percentage{font-family:monospace;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-m);font:var(--ymt-font-body-subtle);color:var(--ymt-text-color-subtle);align-self:center}:host li .percentage:after{content:\"%\"}:host li mat-icon.done{--icon-size: 18px;fill:var(--ymt-primary)}:host li .remove{grid-area:action}:host li .remove mat-icon{color:var(--ymt-text-color-subtle)}:host .result-items{grid-area:result}:host .result-items .result-item{cursor:pointer}:host mat-icon{--icon-size: 18px;border-radius:4px}:host mat-icon.done{background-color:var(--ymt-primary);color:var(--ymt-on-primary)}:host mat-icon.error{color:var(--ymt-danger)}\n"] }]
|
|
50
49
|
}] });
|
|
51
50
|
|
|
52
51
|
class UploadProgressComponent {
|
|
@@ -54,10 +53,6 @@ class UploadProgressComponent {
|
|
|
54
53
|
this.#uploadService = inject(UploadService);
|
|
55
54
|
this.progressStatus$ = this.#uploadService.status$;
|
|
56
55
|
this.completedUp$ = this.#uploadService.uploadStatus$;
|
|
57
|
-
this.icons = {
|
|
58
|
-
toggle: YUV_ICONS.arrowDown,
|
|
59
|
-
close: ICONS.clear
|
|
60
|
-
};
|
|
61
56
|
this.expanded = true;
|
|
62
57
|
this.resultItemClick = output();
|
|
63
58
|
}
|
|
@@ -65,12 +60,12 @@ class UploadProgressComponent {
|
|
|
65
60
|
close() {
|
|
66
61
|
this.#uploadService.cancelItem();
|
|
67
62
|
}
|
|
68
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
69
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: UploadProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: UploadProgressComponent, isStandalone: true, selector: "yuv-upload-progress", outputs: { resultItemClick: "resultItemClick" }, host: { properties: { "class.expanded": "this.expanded" } }, ngImport: i0, template: "@let ps = progressStatus$ | async;\n@if (ps && ps.items.length) {\n @let completed = completedUp$ | async;\n\n <div class=\"upload-progress\">\n <header>\n <h4>\n @if (!completed) {\n {{ 'yuv.upload-progress.header.uploading' | translate: { count: ps.items.length } }}\n } @else {\n {{ 'yuv.upload-progress.header.uploaded' | translate: { count: ps.items.length } }}\n }\n </h4>\n <button mat-icon-button (click)=\"expanded = !expanded\">\n <mat-icon class=\"toggle\">keyboard_arrow_down</mat-icon>\n </button>\n <button mat-icon-button (click)=\"close()\">\n <mat-icon class=\"toggle\">clear</mat-icon>\n </button>\n </header>\n @if (expanded) {\n <yuv-upload-progress-overlay [items]=\"ps.items\" (itemClick)=\"resultItemClick.emit($event)\"></yuv-upload-progress-overlay>\n }\n </div>\n}\n", styles: [":host{--upload-progress-background-header: var(--ymt-surface-panel);--upload-progress-background-main: var(--ymt-surface-panel);--upload-progress-border-color: var(--ymt-surface-panel);--upload-progress-outline: 4px solid rgb(from var(--ymt-outline-variant) r g b / .9);--upload-progress-border-radius: var(--ymt-spacing-2xs);position:absolute;inset-block-end:var(--ymt-spacing-m);inset-inline-end:var(--ymt-spacing-m);z-index:1000}:host .upload-progress{display:flex;flex-flow:column;background-color:var(--upload-progress-background-main);border:1px solid var(--upload-progress-border-color);border-radius:var(--upload-progress-border-radius);outline:var(--upload-progress-outline);min-width:250px;max-height:30vh;overflow:hidden;animation:appear .3s ease-in-out}:host .toggle{rotate:180deg}:host.expanded .toggle{rotate:0deg}:host header{display:flex;align-items:center;gap:var(--ymt-spacing-2xs);background-color:var(--upload-progress-background-header);padding:var(--ymt-spacing-2xs)}:host header h4{margin:0;padding:0 var(--ymt-spacing-xs);flex:1}:host yuv-upload-progress-overlay{overflow-y:auto}@keyframes appear{0%{opacity:0;transform:translateY(var(--ymt-spacing-m))}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "component", type: UploadProgressOverlayComponent, selector: "yuv-upload-progress-overlay", inputs: ["items"], outputs: ["itemClick"] }] }); }
|
|
70
65
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: UploadProgressComponent, decorators: [{
|
|
72
67
|
type: Component,
|
|
73
|
-
args: [{ selector: 'yuv-upload-progress', standalone: true, imports: [CommonModule,
|
|
68
|
+
args: [{ selector: 'yuv-upload-progress', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, TranslateModule, UploadProgressOverlayComponent], template: "@let ps = progressStatus$ | async;\n@if (ps && ps.items.length) {\n @let completed = completedUp$ | async;\n\n <div class=\"upload-progress\">\n <header>\n <h4>\n @if (!completed) {\n {{ 'yuv.upload-progress.header.uploading' | translate: { count: ps.items.length } }}\n } @else {\n {{ 'yuv.upload-progress.header.uploaded' | translate: { count: ps.items.length } }}\n }\n </h4>\n <button mat-icon-button (click)=\"expanded = !expanded\">\n <mat-icon class=\"toggle\">keyboard_arrow_down</mat-icon>\n </button>\n <button mat-icon-button (click)=\"close()\">\n <mat-icon class=\"toggle\">clear</mat-icon>\n </button>\n </header>\n @if (expanded) {\n <yuv-upload-progress-overlay [items]=\"ps.items\" (itemClick)=\"resultItemClick.emit($event)\"></yuv-upload-progress-overlay>\n }\n </div>\n}\n", styles: [":host{--upload-progress-background-header: var(--ymt-surface-panel);--upload-progress-background-main: var(--ymt-surface-panel);--upload-progress-border-color: var(--ymt-surface-panel);--upload-progress-outline: 4px solid rgb(from var(--ymt-outline-variant) r g b / .9);--upload-progress-border-radius: var(--ymt-spacing-2xs);position:absolute;inset-block-end:var(--ymt-spacing-m);inset-inline-end:var(--ymt-spacing-m);z-index:1000}:host .upload-progress{display:flex;flex-flow:column;background-color:var(--upload-progress-background-main);border:1px solid var(--upload-progress-border-color);border-radius:var(--upload-progress-border-radius);outline:var(--upload-progress-outline);min-width:250px;max-height:30vh;overflow:hidden;animation:appear .3s ease-in-out}:host .toggle{rotate:180deg}:host.expanded .toggle{rotate:0deg}:host header{display:flex;align-items:center;gap:var(--ymt-spacing-2xs);background-color:var(--upload-progress-background-header);padding:var(--ymt-spacing-2xs)}:host header h4{margin:0;padding:0 var(--ymt-spacing-xs);flex:1}:host yuv-upload-progress-overlay{overflow-y:auto}@keyframes appear{0%{opacity:0;transform:translateY(var(--ymt-spacing-m))}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
74
69
|
}], propDecorators: { expanded: [{
|
|
75
70
|
type: HostBinding,
|
|
76
71
|
args: ['class.expanded']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-upload-progress.mjs","sources":["../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.ts","../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.html","../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress.component.ts","../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress.component.html","../../../../../libs/yuuvis/client-framework/upload-progress/src/yuuvis-client-framework-upload-progress.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-upload-progress.mjs","sources":["../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.ts","../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.html","../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress.component.ts","../../../../../libs/yuuvis/client-framework/upload-progress/src/lib/upload-progress/upload-progress.component.html","../../../../../libs/yuuvis/client-framework/upload-progress/src/yuuvis-client-framework-upload-progress.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { ProgressStatusItem, TranslateModule, TranslateService, UploadResult, UploadService } from '@yuuvis/client-core';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\n\n@Component({\n selector: 'yuv-upload-progress-overlay',\n standalone: true,\n imports: [CommonModule,\n MatButtonModule,\n MatIconModule, TranslateModule, MatProgressSpinner],\n templateUrl: './upload-progress-overlay.component.html',\n styleUrl: './upload-progress-overlay.component.scss'\n})\nexport class UploadProgressOverlayComponent {\n #uploadService = inject(UploadService);\n translate = inject(TranslateService);\n\n items = input<ProgressStatusItem[]>();\n _items = computed(() => {\n const items = this.items() || [];\n items.forEach((item) => {\n if (item.err) {\n item.err.message = this.#getErrorMessage(item.err.code);\n }\n });\n return items;\n });\n itemClick = output<UploadResult>();\n\n remove(id?: string) {\n this.#uploadService.cancelItem(id);\n }\n\n #getErrorMessage(status: number): string {\n switch (status) {\n case 403:\n return this.translate.instant('yuv.upload-progress-overlay.error.403');\n default:\n return this.translate.instant('yuv.upload-progress-overlay.error.default');\n }\n }\n}\n","<ul>\n @for (item of _items(); track item.id) {\n @let progress = item.progress | async;\n <li [ngClass]=\"{ err: !!item.err, done: !!item.result }\" [style.--progress]=\"progress + '%'\">\n <button mat-icon-button class=\"remove\" (click)=\"remove(item.id)\">\n <mat-icon [ngClass]=\"{ err: !!item.err }\">close</mat-icon>\n </button>\n\n @if (!item.result) {\n <div class=\"name\">{{ item.filename }}\n @if(item.err) {\n <span class=\"error\">{{item.err.message}}</span>\n }\n </div>\n <div class=\"progress\">\n @if (progress && progress < 100) {\n <div class=\"percentage\">{{ progress }}</div>\n }\n @else if(item.err) {\n <mat-icon class=\"error\">warning</mat-icon>\n }\n @else {\n <mat-progress-spinner mode=\"indeterminate\" class=\"ymt-progress-spinner--tiny\"></mat-progress-spinner>\n }\n </div>\n } @else {\n <div class=\"result-items\">\n @for (res of item.result; track $index) {\n <div class=\"result-item\">\n <div class=\"name\" (click)=\"itemClick.emit(res)\">\n {{ res.label }}\n </div>\n </div>\n }\n </div>\n <mat-icon class=\"done\">check</mat-icon>\n }\n </li>\n }\n</ul>\n","import { CommonModule } from '@angular/common';\nimport { Component, HostBinding, inject, output } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { TranslateModule, UploadResult, UploadService } from '@yuuvis/client-core';\nimport { UploadProgressOverlayComponent } from './upload-progress-overlay/upload-progress-overlay.component';\n\n@Component({\n selector: 'yuv-upload-progress',\n standalone: true,\n imports: [CommonModule, MatButtonModule, MatIconModule, TranslateModule, UploadProgressOverlayComponent],\n templateUrl: './upload-progress.component.html',\n styleUrl: './upload-progress.component.scss'\n})\nexport class UploadProgressComponent {\n #uploadService = inject(UploadService);\n progressStatus$ = this.#uploadService.status$;\n completedUp$ = this.#uploadService.uploadStatus$;\n\n @HostBinding('class.expanded') expanded = true;\n resultItemClick = output<UploadResult>();\n\n close() {\n this.#uploadService.cancelItem();\n }\n}\n","@let ps = progressStatus$ | async;\n@if (ps && ps.items.length) {\n @let completed = completedUp$ | async;\n\n <div class=\"upload-progress\">\n <header>\n <h4>\n @if (!completed) {\n {{ 'yuv.upload-progress.header.uploading' | translate: { count: ps.items.length } }}\n } @else {\n {{ 'yuv.upload-progress.header.uploaded' | translate: { count: ps.items.length } }}\n }\n </h4>\n <button mat-icon-button (click)=\"expanded = !expanded\">\n <mat-icon class=\"toggle\">keyboard_arrow_down</mat-icon>\n </button>\n <button mat-icon-button (click)=\"close()\">\n <mat-icon class=\"toggle\">clear</mat-icon>\n </button>\n </header>\n @if (expanded) {\n <yuv-upload-progress-overlay [items]=\"ps.items\" (itemClick)=\"resultItemClick.emit($event)\"></yuv-upload-progress-overlay>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\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A,EAAA,MAAA,EAAA,CAAA,msCAAA,CAAA,EAAA;8BASzE,QAAQ,EAAA,CAAA;sBAAtC,WAAW;uBAAC,gBAAgB;;;AEnB/B;;AAEG;;;;"}
|
|
@@ -3,11 +3,11 @@ import { NgModule } from '@angular/core';
|
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
class YuuvisClientFrameworkModule {
|
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
8
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: YuuvisClientFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: YuuvisClientFrameworkModule, imports: [CommonModule] }); }
|
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: YuuvisClientFrameworkModule, imports: [CommonModule] }); }
|
|
9
9
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: YuuvisClientFrameworkModule, decorators: [{
|
|
11
11
|
type: NgModule,
|
|
12
12
|
args: [{
|
|
13
13
|
imports: [CommonModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework.mjs","sources":["../../../../../libs/yuuvis/client-framework/src/lib/yuuvis-client-framework.module.ts","../../../../../libs/yuuvis/client-framework/src/yuuvis-client-framework.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class YuuvisClientFrameworkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,2BAA2B,CAAA;+GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework.mjs","sources":["../../../../../libs/yuuvis/client-framework/src/lib/yuuvis-client-framework.module.ts","../../../../../libs/yuuvis/client-framework/src/yuuvis-client-framework.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class YuuvisClientFrameworkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,2BAA2B,CAAA;+GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAF5B,YAAY,CAAA,EAAA,CAAA,CAAA;AAEX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAF5B,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEX,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAHvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;ACLD;;AAEG;;;;"}
|
package/forms/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
export { FormInputComponent } from './lib/form-input/form-input.component';
|
|
2
1
|
export * from './lib/elements';
|
|
2
|
+
export { DatetimeRangeComponent } from './lib/elements/datetime-range/datetime-range.component';
|
|
3
|
+
export { DatetimeComponent } from './lib/elements/datetime/datetime.component';
|
|
4
|
+
export { NumberRangeComponent } from './lib/elements/number-range/number-range.component';
|
|
5
|
+
export { NumberComponent } from './lib/elements/number/number.component';
|
|
6
|
+
export { OrganizationComponent } from './lib/elements/organization/organization.component';
|
|
7
|
+
export { StringComponent } from './lib/elements/string/string.component';
|
|
3
8
|
export * from './lib/forms.module';
|
|
4
9
|
export * from './lib/elements/range-select-date/range-select-date.component';
|
|
5
10
|
export * from './lib/elements/range-select-date/range-select-date.interface';
|
|
6
11
|
export * from './lib/elements/range-select-filesize/range-select-filesize.component';
|
|
7
12
|
export * from './lib/elements/range-select-filesize/range-select-filesize.interface';
|
|
13
|
+
export * from './lib/elements/catalog/catalog.component';
|
|
@@ -1,68 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
+
import { AbstractMatFormField } from '@yuuvis/client-framework/common';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* with a classification of `catalog[Item1, Item2, Item3]` will use this component
|
|
12
|
-
* as well. So you may also choose to set a classification like this in order to
|
|
13
|
-
* apply your options.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* <!-- setting options as string array -->
|
|
17
|
-
* <yuv-catalog [options]="cities" [(ngModel)]="hometown"></yuv-catalog>
|
|
18
|
-
*
|
|
19
|
-
* <!-- setting options using a classification -->
|
|
20
|
-
* <yuv-catalog [classification]="'catalog[Berlin, Chicago, Paris]'" [(ngModel)]="hometown"></yuv-catalog>
|
|
21
|
-
*/
|
|
22
|
-
export declare class CatalogComponent implements ControlValueAccessor {
|
|
23
|
-
private systemService;
|
|
24
|
-
value?: string | string[];
|
|
25
|
-
_options: DropdownOption[];
|
|
26
|
-
getLabel: (value: any) => any;
|
|
5
|
+
export declare class CatalogComponent extends AbstractMatFormField<string | string[]> implements ControlValueAccessor, OnInit, OnDestroy {
|
|
6
|
+
#private;
|
|
7
|
+
readonly: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
multiple: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
_options: import("@angular/core").WritableSignal<string[]>;
|
|
10
|
+
options: import("@angular/core").InputSignal<string[]>;
|
|
27
11
|
/**
|
|
28
|
-
*
|
|
12
|
+
* Additional semantics for the form element.
|
|
29
13
|
*/
|
|
30
|
-
|
|
14
|
+
classifications: import("@angular/core").InputSignal<string[]>;
|
|
31
15
|
/**
|
|
32
16
|
* Possibles values are `EDIT` (default),`SEARCH`,`CREATE`. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.
|
|
33
17
|
*/
|
|
34
18
|
situation?: string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* change this number.
|
|
38
|
-
*/
|
|
39
|
-
enableFilterWhenOptionsExceed: number;
|
|
40
|
-
/**
|
|
41
|
-
* Array of selectable entries
|
|
42
|
-
*/
|
|
43
|
-
set options(options: (string | any)[]);
|
|
44
|
-
/**
|
|
45
|
-
* Indicator that multiple items could be selected
|
|
46
|
-
*/
|
|
47
|
-
multiselect: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Additional semantics for the form element.
|
|
50
|
-
*/
|
|
51
|
-
set classifications(c: string[]);
|
|
52
|
-
/**
|
|
53
|
-
* Will attch the overlay to this HTMLelement
|
|
54
|
-
*/
|
|
55
|
-
appendTo: null;
|
|
56
|
-
/**
|
|
57
|
-
* Will prevent the input from being changed (default: false)
|
|
58
|
-
*/
|
|
59
|
-
readonly: boolean;
|
|
60
|
-
constructor(systemService: SystemService);
|
|
19
|
+
ngControl: import("@angular/forms").NgControl | null;
|
|
20
|
+
readonly fc: FormControl<string | string[] | null | undefined>;
|
|
61
21
|
propagateChange: (_: any) => void;
|
|
62
|
-
writeValue(value:
|
|
22
|
+
writeValue(value: string | string[]): void;
|
|
63
23
|
registerOnChange(fn: any): void;
|
|
64
24
|
registerOnTouched(fn: any): void;
|
|
65
|
-
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
66
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogComponent, never>;
|
|
67
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CatalogComponent, "yuv-catalog", never, { "
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CatalogComponent, "yuv-catalog", never, { "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "classifications": { "alias": "classifications"; "required": false; "isSignal": true; }; "situation": { "alias": "situation"; "required": false; }; }, {}, never, never, true, never>;
|
|
68
29
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { Situation } from '@yuuvis/client-core';
|
|
3
|
+
import { ObjectTypeField, Situation } from '@yuuvis/client-core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class EditTableDataComponent<T = any> implements OnInit {
|
|
6
6
|
#private;
|
|
7
|
-
|
|
7
|
+
errorMessage: import("@angular/core").WritableSignal<any[] | null>;
|
|
8
8
|
tableForm: FormGroup;
|
|
9
9
|
isInnerTableForm: import("@angular/core").InputSignal<boolean>;
|
|
10
10
|
formElement: {
|
|
11
11
|
[key: string]: any;
|
|
12
12
|
};
|
|
13
|
+
columns: ObjectTypeField[];
|
|
13
14
|
situation: Situation;
|
|
14
|
-
header:
|
|
15
|
-
adding:
|
|
15
|
+
header: any;
|
|
16
|
+
adding: any;
|
|
16
17
|
cancel(): void;
|
|
17
18
|
submit(): void;
|
|
18
19
|
ngOnInit(): void;
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
-
import {
|
|
3
|
+
import { AbstractMatFormField } from '@yuuvis/client-framework/common';
|
|
4
|
+
import { DatepickerComponent, DatepickerLabels } from '@yuuvis/client-framework/datepicker';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class DatetimeComponent implements ControlValueAccessor {
|
|
6
|
+
export declare class DatetimeComponent extends AbstractMatFormField<Date | null> implements ControlValueAccessor, OnInit {
|
|
7
|
+
#private;
|
|
5
8
|
private translate;
|
|
6
|
-
|
|
7
|
-
locale: string;
|
|
9
|
+
pickerCmp: import("@angular/core").Signal<DatepickerComponent>;
|
|
8
10
|
labels?: DatepickerLabels;
|
|
11
|
+
ngControl: import("@angular/forms").NgControl | null;
|
|
12
|
+
_locale: import("@angular/core").WritableSignal<string>;
|
|
13
|
+
locale: import("@angular/core").InputSignal<string>;
|
|
9
14
|
/**
|
|
10
15
|
* Whether or not to allow only values in the future (default: false)
|
|
11
16
|
*/
|
|
12
|
-
onlyFutureDates: boolean
|
|
17
|
+
onlyFutureDates: import("@angular/core").InputSignal<boolean>;
|
|
13
18
|
/**
|
|
14
19
|
* Will prevent the input from being changed (default: false)
|
|
15
20
|
*/
|
|
16
|
-
readonly: boolean
|
|
21
|
+
readonly: import("@angular/core").InputSignal<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the calendar icon that opens the date picker calendar (default: true)
|
|
24
|
+
*/
|
|
25
|
+
calendar: import("@angular/core").InputSignal<boolean>;
|
|
17
26
|
/**
|
|
18
27
|
* Enables setting time as well (default: false)
|
|
19
28
|
*/
|
|
20
|
-
withTime: boolean
|
|
21
|
-
|
|
22
|
-
private _setLabels;
|
|
29
|
+
withTime: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
openCalendar(): void;
|
|
23
31
|
propagateChange: (fn: () => void) => void;
|
|
24
32
|
validationChange: () => void;
|
|
25
33
|
writeValue(value: any): void;
|
|
@@ -27,6 +35,7 @@ export declare class DatetimeComponent implements ControlValueAccessor {
|
|
|
27
35
|
registerOnValidatorChange?(fn: () => void): void;
|
|
28
36
|
registerOnTouched(): void;
|
|
29
37
|
onValueChange(e: any): void;
|
|
38
|
+
ngOnInit(): void;
|
|
30
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimeComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimeComponent, "yuv-datetime", never, { "onlyFutureDates": { "alias": "onlyFutureDates"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "withTime": { "alias": "withTime"; "required": false; }; }, {}, never, never, true, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimeComponent, "yuv-datetime", never, { "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "onlyFutureDates": { "alias": "onlyFutureDates"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "calendar": { "alias": "calendar"; "required": false; "isSignal": true; }; "withTime": { "alias": "withTime"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
41
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor,
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Operator, RangeValue } from '@yuuvis/client-core';
|
|
4
|
+
import { AbstractMatFormField } from '@yuuvis/client-framework/common';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DatetimeRangeComponent implements ControlValueAccessor,
|
|
6
|
-
private
|
|
6
|
+
export declare class DatetimeRangeComponent extends AbstractMatFormField<RangeValue> implements ControlValueAccessor, OnInit, OnDestroy {
|
|
7
|
+
#private;
|
|
7
8
|
/**
|
|
8
9
|
* Enables setting time as well (default: false)
|
|
9
10
|
*/
|
|
@@ -14,39 +15,23 @@ export declare class DatetimeRangeComponent implements ControlValueAccessor, Val
|
|
|
14
15
|
readonly: boolean;
|
|
15
16
|
operator: string;
|
|
16
17
|
situation?: string;
|
|
17
|
-
rangeForm: FormGroup;
|
|
18
|
-
value?: RangeValue;
|
|
19
18
|
private _isValid;
|
|
19
|
+
ngControl: import("@angular/forms").NgControl | null;
|
|
20
20
|
availableSearchOptions: {
|
|
21
21
|
label: string;
|
|
22
22
|
value: Operator;
|
|
23
23
|
}[];
|
|
24
|
-
|
|
24
|
+
rangeForm: FormGroup<{
|
|
25
|
+
dateValue: FormControl<Date | undefined>;
|
|
26
|
+
operator: FormControl<Operator>;
|
|
27
|
+
dateValueFrom: FormControl<Date | undefined>;
|
|
28
|
+
}>;
|
|
25
29
|
propagateChange: (_: any) => void;
|
|
26
30
|
writeValue(value: RangeValue): void;
|
|
27
31
|
registerOnChange(fn: any): void;
|
|
28
32
|
registerOnTouched(fn: any): void;
|
|
29
|
-
onValueChange(): void;
|
|
30
|
-
validate(): {
|
|
31
|
-
datecontrol: {
|
|
32
|
-
valid: boolean;
|
|
33
|
-
};
|
|
34
|
-
daterangeorder?: undefined;
|
|
35
|
-
daterange?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
daterangeorder: {
|
|
38
|
-
valid: boolean;
|
|
39
|
-
};
|
|
40
|
-
datecontrol?: undefined;
|
|
41
|
-
daterange?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
daterange: {
|
|
44
|
-
valid: boolean;
|
|
45
|
-
};
|
|
46
|
-
datecontrol?: undefined;
|
|
47
|
-
daterangeorder?: undefined;
|
|
48
|
-
} | null;
|
|
49
33
|
ngOnInit(): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
50
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimeRangeComponent, never>;
|
|
51
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimeRangeComponent, "yuv-datetime-range", never, { "withTime": { "alias": "withTime"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "operator": { "alias": "operator"; "required": false; }; "situation": { "alias": "situation"; "required": false; }; }, {}, never, never, true, never>;
|
|
52
37
|
}
|