@mediusinc/mng-commons 6.0.0-rc.5 → 6.0.0-rc.7
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 +6 -6
- package/core/components/notification/notification-wrapper.component.d.ts +4 -4
- package/core/data-list/data-list-params-helpers.d.ts +1 -0
- package/core/directives/component.directive.d.ts +11 -13
- package/core/directives/rerender.directive.d.ts +1 -1
- package/core/directives/template.directive.d.ts +3 -7
- package/core/error/error.model.d.ts +4 -4
- package/core/helpers/notification.d.ts +2 -2
- package/core/i18n/i18n-common.d.ts +2 -2
- package/core/provide.d.ts +3 -3
- package/core/styles/style-constants.d.ts +9 -8
- package/core/styles/style.model.d.ts +2 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +167 -201
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +8 -9
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +151 -52
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-a8KG1NIX.mjs +30 -0
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-a8KG1NIX.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-C2vrMoNL.mjs +2130 -0
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-C2vrMoNL.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table.mjs +1 -2154
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +97 -49
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +332 -293
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/form/api/index.d.ts +1 -0
- package/form/api/models/empty-value.model.d.ts +7 -0
- package/form/components/autocomplete/autocomplete.component.d.ts +1 -2
- package/form/components/date-range/date-range.component.d.ts +4 -3
- package/form/components/dropdown/dropdown.component.d.ts +3 -2
- package/form/components/number-range/number-range.component.d.ts +3 -2
- package/form/directives/input-empty-value.directive.d.ts +40 -0
- package/form/directives/input-trim.directive.d.ts +3 -5
- package/form/index.d.ts +1 -0
- package/i18n/en.json +57 -8
- package/i18n/sl.json +1 -3
- package/package.json +10 -36
- package/provide.d.ts +2 -2
- package/table/components/column-toggle/column-toggle.component.d.ts +12 -0
- package/table/components/filter/filter-form/filter-form.component.d.ts +2 -2
- package/table/components/table/table.component.d.ts +0 -1
- package/table/helpers/filters.d.ts +3 -2
- package/table/helpers/notification.d.ts +2 -2
- package/table/provide.d.ts +7 -0
- package/table/services/table-metadata.service.d.ts +3 -3
- package/tableview/action/components/action/action.component.d.ts +1 -0
- package/tableview/action/components/editor/action-editor.component.d.ts +1 -1
- package/tableview/action/components/table/action-table.component.d.ts +2 -1
- package/tableview/action/helpers/notification.d.ts +3 -3
- package/tableview/action/models/execution/action-context.model.d.ts +2 -2
- package/tableview/action/services/action-executor.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action.descriptor.d.ts +3 -3
- package/tableview/api/action/models/action-confirmation.model.d.ts +4 -2
- package/tableview/api/action/models/execution/action-context.model.d.ts +2 -2
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +5 -0
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +14 -10
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +10 -0
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +36 -9
- package/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.d.ts +1 -1
- package/tableview/api/editor/models/field-action-context.model.d.ts +1 -1
- package/tableview/api/editor/models/field.model.d.ts +1 -2
- package/tableview/api/editor/models/form-editor.interface.d.ts +2 -2
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +1 -1
- package/tableview/api/editor/models/formly-field.model.d.ts +2 -2
- package/tableview/editor/components/editor/form-editor.component.d.ts +2 -2
- package/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.d.ts +1 -1
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +2 -1
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +4 -6
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +0 -2
- package/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +2 -2
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +8 -15
- package/tableview/editor/components/formly/fields/formly-group-type.abstract.component.d.ts +7 -0
- package/tableview/editor/components/formly/fields/formly-type.abstract.component.d.ts +20 -0
- package/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.d.ts +11 -4
- package/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +2 -1
- package/tableview/editor/helpers/formly-config.d.ts +1 -1
- package/tableview/editor/helpers/notification.d.ts +3 -3
- package/tableview/editor/models/formly-config.model.d.ts +10 -1
- package/tableview/editor/models/formly.model.d.ts +23 -0
- package/tableview/editor/services/form-editor.service.d.ts +2 -2
- package/tableview/tableview/router/tableview-route-builder.d.ts +10 -3
- package/tableview/tableview/services/tableview-feature-config.token.d.ts +1 -1
- package/version-info.json +3 -3
- package/esm2022/core/action/action-data.model.mjs +0 -2
- package/esm2022/core/action/action-parameters.model.mjs +0 -2
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +0 -50
- package/esm2022/core/data-list/data-list-params-helpers.mjs +0 -465
- package/esm2022/core/data-list/data-list.model.mjs +0 -2
- package/esm2022/core/data-list/filter-match.model.mjs +0 -105
- package/esm2022/core/data-list/filter-metadata.model.mjs +0 -2
- package/esm2022/core/data-providers/base.data-provider.mjs +0 -16
- package/esm2022/core/data-providers/lookup.data-provider.mjs +0 -2
- package/esm2022/core/descriptors/action.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/column.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/editor.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/enum.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/filter.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/lookup.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/model.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/table.descriptor.mjs +0 -2
- package/esm2022/core/descriptors/tableview.descriptor.mjs +0 -2
- package/esm2022/core/directives/component.directive.mjs +0 -75
- package/esm2022/core/directives/rerender.directive.mjs +0 -25
- package/esm2022/core/directives/template.directive.mjs +0 -29
- package/esm2022/core/enum/enum-helpers.mjs +0 -90
- package/esm2022/core/enum/enum.model.mjs +0 -2
- package/esm2022/core/error/error-handler.mjs +0 -20
- package/esm2022/core/error/error-helpers.mjs +0 -273
- package/esm2022/core/error/error.model.mjs +0 -33
- package/esm2022/core/helpers/coercion.mjs +0 -55
- package/esm2022/core/helpers/date.mjs +0 -119
- package/esm2022/core/helpers/notification.mjs +0 -21
- package/esm2022/core/helpers/number.mjs +0 -19
- package/esm2022/core/helpers/object.mjs +0 -152
- package/esm2022/core/helpers/route.mjs +0 -58
- package/esm2022/core/helpers/string.mjs +0 -57
- package/esm2022/core/helpers/templates.mjs +0 -4
- package/esm2022/core/helpers/type-helpers.mjs +0 -2
- package/esm2022/core/i18n/i18n-common.mjs +0 -24
- package/esm2022/core/i18n/i18n-error.mjs +0 -29
- package/esm2022/core/i18n/i18n-type.mjs +0 -46
- package/esm2022/core/index.mjs +0 -107
- package/esm2022/core/log/log-publisher-console.service.mjs +0 -40
- package/esm2022/core/log/log.model.mjs +0 -10
- package/esm2022/core/log/logger.service.mjs +0 -131
- package/esm2022/core/mediusinc-mng-commons-core.mjs +0 -5
- package/esm2022/core/models/class-attribute.model.mjs +0 -2
- package/esm2022/core/models/class-service.model.mjs +0 -2
- package/esm2022/core/models/getter.model.mjs +0 -2
- package/esm2022/core/models/i18n.model.mjs +0 -2
- package/esm2022/core/models/menu.model.mjs +0 -2
- package/esm2022/core/models/user.model.mjs +0 -2
- package/esm2022/core/models/version.model.mjs +0 -2
- package/esm2022/core/pipes/boolean.pipe.mjs +0 -34
- package/esm2022/core/pipes/class-map.pipe.mjs +0 -23
- package/esm2022/core/pipes/enum.pipe.mjs +0 -38
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +0 -36
- package/esm2022/core/pipes/enumerate.pipe.mjs +0 -49
- package/esm2022/core/pipes/getter.pipe.mjs +0 -21
- package/esm2022/core/pipes/i18n-property.pipe.mjs +0 -19
- package/esm2022/core/pipes/json-path.pipe.mjs +0 -25
- package/esm2022/core/pipes/parametrize.pipe.mjs +0 -86
- package/esm2022/core/pipes/template.pipe.mjs +0 -25
- package/esm2022/core/provide.mjs +0 -79
- package/esm2022/core/reactivity/effect.mjs +0 -22
- package/esm2022/core/reflect/type-enum-decorator.mjs +0 -12
- package/esm2022/core/reflect/type-enum-metadata.mjs +0 -62
- package/esm2022/core/registry/registry.model.mjs +0 -2
- package/esm2022/core/registry/type-registry.mjs +0 -106
- package/esm2022/core/router/route-builder.mjs +0 -431
- package/esm2022/core/router/router.model.mjs +0 -2
- package/esm2022/core/router/routes-builder.mjs +0 -52
- package/esm2022/core/rxjs/map-data-list-result-operator.mjs +0 -22
- package/esm2022/core/security/permission-helpers.mjs +0 -14
- package/esm2022/core/security/permission.guard.mjs +0 -15
- package/esm2022/core/security/permission.service.mjs +0 -101
- package/esm2022/core/security/permissions.model.mjs +0 -93
- package/esm2022/core/services/commons-configuration.service.mjs +0 -189
- package/esm2022/core/services/commons-init.service.mjs +0 -111
- package/esm2022/core/services/commons-router.service.mjs +0 -181
- package/esm2022/core/services/commons-storage.service.mjs +0 -31
- package/esm2022/core/services/commons.service.mjs +0 -324
- package/esm2022/core/services/providers/commons-init.provider.mjs +0 -4
- package/esm2022/core/services/tokens/browser-storage.token.mjs +0 -3
- package/esm2022/core/services/tokens/commons-init.token.mjs +0 -3
- package/esm2022/core/services/tokens/log-publisher.token.mjs +0 -3
- package/esm2022/core/services/tokens/module-config.token.mjs +0 -3
- package/esm2022/core/styles/style-constants.mjs +0 -11
- package/esm2022/core/styles/style.model.mjs +0 -20
- package/esm2022/filter/descriptors/filter-generic.descriptor.mjs +0 -31
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +0 -168
- package/esm2022/filter/descriptors/filter.descriptor.mjs +0 -421
- package/esm2022/filter/index.mjs +0 -8
- package/esm2022/filter/mediusinc-mng-commons-filter.mjs +0 -5
- package/esm2022/filter/models/filter-generic-property.model.mjs +0 -2
- package/esm2022/filter/models/filter.model.mjs +0 -20
- package/esm2022/form/api/data-providers/lookup-data-provider.factory.mjs +0 -15
- package/esm2022/form/api/data-providers/lookup.data-provider.mjs +0 -15
- package/esm2022/form/api/descriptors/action-button.descriptor.mjs +0 -56
- package/esm2022/form/api/descriptors/button-style.builder.mjs +0 -153
- package/esm2022/form/api/index.mjs +0 -10
- package/esm2022/form/api/mediusinc-mng-commons-form-api.mjs +0 -5
- package/esm2022/form/api/models/button.model.mjs +0 -2
- package/esm2022/form/api/models/trim.model.mjs +0 -2
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +0 -436
- package/esm2022/form/components/date-range/date-range.component.mjs +0 -147
- package/esm2022/form/components/dropdown/dropdown.component.mjs +0 -372
- package/esm2022/form/components/number-range/number-range.component.mjs +0 -123
- package/esm2022/form/directives/input-trim.directive.mjs +0 -50
- package/esm2022/form/index.mjs +0 -8
- package/esm2022/form/mediusinc-mng-commons-form.mjs +0 -5
- package/esm2022/index.mjs +0 -2
- package/esm2022/mediusinc-mng-commons.mjs +0 -5
- package/esm2022/model/class/data-providers/base-from-class-data-provider.factory.mjs +0 -5
- package/esm2022/model/class/descriptors/model-class.descriptor.mjs +0 -28
- package/esm2022/model/class/descriptors/type-class.descriptor.mjs +0 -6
- package/esm2022/model/class/helpers/model.mjs +0 -53
- package/esm2022/model/class/index.mjs +0 -8
- package/esm2022/model/class/mediusinc-mng-commons-model-class.mjs +0 -5
- package/esm2022/model/data-providers/base-from-type-data-provider.factory.mjs +0 -13
- package/esm2022/model/descriptors/enum.descriptor.mjs +0 -28
- package/esm2022/model/descriptors/model.descriptor.mjs +0 -53
- package/esm2022/model/descriptors/type.descriptor.mjs +0 -7
- package/esm2022/model/helpers/i18n.mjs +0 -47
- package/esm2022/model/index.mjs +0 -9
- package/esm2022/model/mediusinc-mng-commons-model.mjs +0 -5
- package/esm2022/provide.mjs +0 -6
- package/esm2022/table/api/class/class-table-attribute-converter.mjs +0 -80
- package/esm2022/table/api/class/class-table-attribute.model.mjs +0 -2
- package/esm2022/table/api/class/class-table-data-provider.factory.mjs +0 -5
- package/esm2022/table/api/class/class-table-descriptor-helpers.mjs +0 -99
- package/esm2022/table/api/class/class-table-descriptor.factory.mjs +0 -21
- package/esm2022/table/api/class/index.mjs +0 -6
- package/esm2022/table/api/class/mediusinc-mng-commons-table-api-class.mjs +0 -5
- package/esm2022/table/api/data-providers/table-data-provider.factory.mjs +0 -15
- package/esm2022/table/api/data-providers/table.data-provider.mjs +0 -33
- package/esm2022/table/api/descriptors/column.descriptor.mjs +0 -475
- package/esm2022/table/api/descriptors/sort.descriptor.mjs +0 -67
- package/esm2022/table/api/descriptors/table-descriptor.factory.mjs +0 -22
- package/esm2022/table/api/descriptors/table.descriptor.mjs +0 -1116
- package/esm2022/table/api/helpers/column-converter.mjs +0 -25
- package/esm2022/table/api/helpers/table-data-provider-descriptor-convert.mjs +0 -7
- package/esm2022/table/api/index.mjs +0 -19
- package/esm2022/table/api/mediusinc-mng-commons-table-api.mjs +0 -5
- package/esm2022/table/api/models/column-value.model.mjs +0 -2
- package/esm2022/table/api/models/column.model.mjs +0 -21
- package/esm2022/table/api/models/row-expandable-component.model.mjs +0 -2
- package/esm2022/table/api/models/table-columns.model.mjs +0 -2
- package/esm2022/table/api/models/table-event.model.mjs +0 -2
- package/esm2022/table/api/models/table.model.mjs +0 -21
- package/esm2022/table/components/column-filter/column-filter.component.mjs +0 -389
- package/esm2022/table/components/column-value/column-value.component.mjs +0 -78
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +0 -55
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +0 -226
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +0 -219
- package/esm2022/table/components/table/table.component.mjs +0 -319
- package/esm2022/table/helpers/filters.mjs +0 -312
- package/esm2022/table/helpers/notification.mjs +0 -21
- package/esm2022/table/helpers/table-layout-prefs.mjs +0 -10
- package/esm2022/table/helpers/table.mjs +0 -24
- package/esm2022/table/index.mjs +0 -24
- package/esm2022/table/mediusinc-mng-commons-table.mjs +0 -5
- package/esm2022/table/models/column-preferences.model.mjs +0 -2
- package/esm2022/table/models/filter.model.mjs +0 -2
- package/esm2022/table/pipes/filter-value.pipe.mjs +0 -77
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +0 -27
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +0 -25
- package/esm2022/table/provide.mjs +0 -19
- package/esm2022/table/services/table-data.service.mjs +0 -194
- package/esm2022/table/services/table-feature-config.token.mjs +0 -3
- package/esm2022/table/services/table-metadata.service.mjs +0 -136
- package/esm2022/table/services/table-preferences.service.mjs +0 -142
- package/esm2022/tableview/action/components/action/action.component.mjs +0 -277
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +0 -86
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +0 -428
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +0 -35
- package/esm2022/tableview/action/components/route/action-route.component.mjs +0 -146
- package/esm2022/tableview/action/components/table/action-table.component.mjs +0 -102
- package/esm2022/tableview/action/guards/unsaved-changes.guard.mjs +0 -4
- package/esm2022/tableview/action/helpers/action-execution.mjs +0 -25
- package/esm2022/tableview/action/helpers/i18n.mjs +0 -102
- package/esm2022/tableview/action/helpers/notification.mjs +0 -78
- package/esm2022/tableview/action/helpers/styles.mjs +0 -32
- package/esm2022/tableview/action/models/action-editor-dialog-data.model.mjs +0 -2
- package/esm2022/tableview/action/models/can-component-deactivate.model.mjs +0 -2
- package/esm2022/tableview/action/models/execution/action-context.model.mjs +0 -64
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +0 -169
- package/esm2022/tableview/action/services/action-error-mapper.service.mjs +0 -20
- package/esm2022/tableview/action/services/action-executor.service.mjs +0 -772
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +0 -19
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +0 -41
- package/esm2022/tableview/action/services/navigation.service.mjs +0 -53
- package/esm2022/tableview/action/services/providers/provide-action-executor.mjs +0 -9
- package/esm2022/tableview/action/services/providers/provide-view-container.mjs +0 -17
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +0 -18
- package/esm2022/tableview/action/services/tokens/action-editor.token.mjs +0 -3
- package/esm2022/tableview/action/services/view-container.service.mjs +0 -40
- package/esm2022/tableview/api/action/descriptors/action-descriptor.factory.mjs +0 -28
- package/esm2022/tableview/api/action/descriptors/action-editor-descriptor.factory.mjs +0 -30
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +0 -223
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +0 -32
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +0 -74
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +0 -302
- package/esm2022/tableview/api/action/descriptors/editor-action-descriptor.factory.mjs +0 -21
- package/esm2022/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.mjs +0 -21
- package/esm2022/tableview/api/action/descriptors/table-action-descriptor.factory.mjs +0 -37
- package/esm2022/tableview/api/action/descriptors/table-action-editor-descriptor.factory.mjs +0 -40
- package/esm2022/tableview/api/action/helpers/data-provider-executors.mjs +0 -100
- package/esm2022/tableview/api/action/models/action-component.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/action-confirmation.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +0 -2
- package/esm2022/tableview/api/action/models/action-editor.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/action-error.model.mjs +0 -14
- package/esm2022/tableview/api/action/models/action.type.mjs +0 -26
- package/esm2022/tableview/api/action/models/execution/action-context-validation.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/execution/action-context.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/execution/action-execution-error.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/execution/action-instance-state.model.mjs +0 -32
- package/esm2022/tableview/api/action/models/execution/action-instance.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/execution/view-container.model.mjs +0 -2
- package/esm2022/tableview/api/action/models/tableview-action-default-categories.model.mjs +0 -11
- package/esm2022/tableview/api/action/services/data-provider-executor.service.mjs +0 -28
- package/esm2022/tableview/api/action/services/tokens/data-language-dropdown.token.mjs +0 -3
- package/esm2022/tableview/api/class/editor/class-editor-attribute-converter.mjs +0 -85
- package/esm2022/tableview/api/class/editor/class-editor-attribute.model.mjs +0 -2
- package/esm2022/tableview/api/class/editor/class-editor-data-provider.factory.mjs +0 -5
- package/esm2022/tableview/api/class/editor/class-editor-descriptor-helpers.mjs +0 -95
- package/esm2022/tableview/api/class/editor/class-editor-descriptor.factory.mjs +0 -21
- package/esm2022/tableview/api/class/index.mjs +0 -13
- package/esm2022/tableview/api/class/mediusinc-mng-commons-tableview-api-class.mjs +0 -5
- package/esm2022/tableview/api/class/tableview/class-tableview-attribute-converter.mjs +0 -35
- package/esm2022/tableview/api/class/tableview/class-tableview-attribute.model.mjs +0 -2
- package/esm2022/tableview/api/class/tableview/class-tableview-data-provider.factory.mjs +0 -5
- package/esm2022/tableview/api/class/tableview/class-tableview-descriptor-helpers.mjs +0 -111
- package/esm2022/tableview/api/class/tableview/class-tableview-descriptor.factory.mjs +0 -26
- package/esm2022/tableview/api/editor/data-providers/editor-data-provider.factory.mjs +0 -15
- package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +0 -114
- package/esm2022/tableview/api/editor/descriptors/editor-descriptor.factory.mjs +0 -15
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +0 -437
- package/esm2022/tableview/api/editor/descriptors/field-action.descriptor.mjs +0 -51
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +0 -314
- package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +0 -103
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +0 -211
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +0 -142
- package/esm2022/tableview/api/editor/descriptors/field-validation.descriptor.mjs +0 -25
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +0 -402
- package/esm2022/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.mjs +0 -51
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +0 -2
- package/esm2022/tableview/api/editor/models/editor.model.mjs +0 -9
- package/esm2022/tableview/api/editor/models/field-action-context.model.mjs +0 -2
- package/esm2022/tableview/api/editor/models/field-image-preview.model.mjs +0 -2
- package/esm2022/tableview/api/editor/models/field-validation.model.mjs +0 -2
- package/esm2022/tableview/api/editor/models/field.model.mjs +0 -57
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +0 -28
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +0 -2
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +0 -70
- package/esm2022/tableview/api/editor/models/formly-field.model.mjs +0 -2
- package/esm2022/tableview/api/editor/models/formly-options.model.mjs +0 -2
- package/esm2022/tableview/api/editor/models/radio.model.mjs +0 -2
- package/esm2022/tableview/api/index.mjs +0 -76
- package/esm2022/tableview/api/mediusinc-mng-commons-tableview-api.mjs +0 -5
- package/esm2022/tableview/api/tableview/data-providers/tableview-data-provider.factory.mjs +0 -18
- package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +0 -84
- package/esm2022/tableview/api/tableview/descriptors/tableview-descriptor.factory.mjs +0 -34
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +0 -377
- package/esm2022/tableview/api/tableview/helpers/files-export.mjs +0 -34
- package/esm2022/tableview/api/tableview/helpers/tableview-create.mjs +0 -26
- package/esm2022/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.mjs +0 -7
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +0 -324
- package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +0 -319
- package/esm2022/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.mjs +0 -2
- package/esm2022/tableview/api/tableview/models/tableview-descriptor-helper.type.mjs +0 -2
- package/esm2022/tableview/api/tableview/models/tableview-input.model.mjs +0 -2
- package/esm2022/tableview/api/tableview/models/tableview-route.model.mjs +0 -2
- package/esm2022/tableview/editor/components/editor/auto-save-status/auto-save-status.component.mjs +0 -82
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +0 -480
- package/esm2022/tableview/editor/components/formly/constants.mjs +0 -2
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +0 -66
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +0 -47
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +0 -39
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +0 -165
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +0 -42
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +0 -34
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +0 -211
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +0 -23
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +0 -195
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +0 -239
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +0 -205
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +0 -28
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +0 -46
- package/esm2022/tableview/editor/components/formly/pipes/formly-field-label.pipe.mjs +0 -19
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +0 -33
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +0 -59
- package/esm2022/tableview/editor/helpers/editor-autosave.mjs +0 -49
- package/esm2022/tableview/editor/helpers/editor-field.mjs +0 -39
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +0 -388
- package/esm2022/tableview/editor/helpers/editor-validators.mjs +0 -25
- package/esm2022/tableview/editor/helpers/field-create.mjs +0 -21
- package/esm2022/tableview/editor/helpers/formly-config.mjs +0 -260
- package/esm2022/tableview/editor/helpers/notification.mjs +0 -11
- package/esm2022/tableview/editor/models/editor-auto-save-preview.model.mjs +0 -2
- package/esm2022/tableview/editor/models/formly-config.model.mjs +0 -2
- package/esm2022/tableview/editor/services/form-editor.service.mjs +0 -96
- package/esm2022/tableview/editor/services/formly-config.provider.mjs +0 -31
- package/esm2022/tableview/index.mjs +0 -67
- package/esm2022/tableview/mediusinc-mng-commons-tableview.mjs +0 -5
- package/esm2022/tableview/provide.mjs +0 -105
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +0 -15
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +0 -59
- package/esm2022/tableview/tableview/router/tableview-route-builder.mjs +0 -175
- package/esm2022/tableview/tableview/services/tableview-feature-config.token.mjs +0 -3
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import { AsyncPipe, JsonPipe, NgClass } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { forwardRef, inject, Injector, DestroyRef, input, booleanAttribute, output, viewChild, signal, computed, effect, Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, Directive } from '@angular/core';
|
|
2
|
+
import { forwardRef, inject, Injector, DestroyRef, input, booleanAttribute, output, viewChild, signal, computed, effect, Component, ChangeDetectionStrategy, ChangeDetectorRef, ViewEncapsulation, ElementRef, Renderer2, afterNextRender, Directive } from '@angular/core';
|
|
4
3
|
import { takeUntilDestroyed, toObservable as toObservable$1 } from '@angular/core/rxjs-interop';
|
|
5
|
-
import * as i1
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
6
5
|
import { NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS, FormBuilder, Validators, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import * as i1 from 'primeng/autocomplete';
|
|
10
|
-
import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
|
|
6
|
+
import { TranslateService, TranslatePipe } from '@ngx-translate/core';
|
|
7
|
+
import { AutoComplete } from 'primeng/autocomplete';
|
|
11
8
|
import { ReplaySubject, take, switchMap, of, merge, Subject, distinctUntilChanged, debounceTime, combineLatest, tap, map as map$1 } from 'rxjs';
|
|
12
9
|
import { map } from 'rxjs/operators';
|
|
13
10
|
import { LoggerService, CommonsInternalError, FilterMatchMode, fromSubscribeError, getErrorLogLevel, toObservable } from '@mediusinc/mng-commons/core';
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import * as i2$2 from 'primeng/multiselect';
|
|
19
|
-
import { MultiSelect, MultiSelectModule } from 'primeng/multiselect';
|
|
20
|
-
import * as i2$3 from 'primeng/inputnumber';
|
|
21
|
-
import { InputNumberModule } from 'primeng/inputnumber';
|
|
11
|
+
import { DatePicker } from 'primeng/datepicker';
|
|
12
|
+
import { MultiSelect } from 'primeng/multiselect';
|
|
13
|
+
import { Select } from 'primeng/select';
|
|
14
|
+
import { InputNumber } from 'primeng/inputnumber';
|
|
22
15
|
|
|
23
16
|
const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
24
17
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -51,6 +44,7 @@ class AutocompleteComponent {
|
|
|
51
44
|
this.searchTrim = input(undefined);
|
|
52
45
|
this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
|
|
53
46
|
this.valueChange = output();
|
|
47
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
54
48
|
this.blur = output();
|
|
55
49
|
this.primeAutocomplete = viewChild(AutoComplete);
|
|
56
50
|
this.isInited = false;
|
|
@@ -325,7 +319,7 @@ class AutocompleteComponent {
|
|
|
325
319
|
if (translatedItems.length === 0) {
|
|
326
320
|
return of([]);
|
|
327
321
|
}
|
|
328
|
-
return this.translate.stream(translatedItems).pipe(map(translations => this.i18nPopulateItems(items, translations)));
|
|
322
|
+
return this.translate.stream(translatedItems).pipe(map((translations) => this.i18nPopulateItems(items, translations)));
|
|
329
323
|
}
|
|
330
324
|
else {
|
|
331
325
|
return of(items);
|
|
@@ -435,12 +429,12 @@ class AutocompleteComponent {
|
|
|
435
429
|
return value;
|
|
436
430
|
}
|
|
437
431
|
}
|
|
438
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
439
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
432
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
433
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.7", type: AutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: true, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInit: { classPropertyName: "optionsValuePropertyInit", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirst: { classPropertyName: "selectFirst", publicName: "selectFirst", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true, isSignal: true }], ngImport: i0, template: "<p-autoComplete\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dropdown]=\"true\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [suggestions]=\"suggestions()\"\n [multiple]=\"multiselect()\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [minLength]=\"openOnFocus() ? 0 : 1\"\n [showClear]=\"showClear()\"\n [forceSelection]=\"autoClear()\"\n [disabled]=\"disabled()\"\n [completeOnFocus]=\"openOnFocus()\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onUnselect)=\"onUnselect($event)\"\n (onFocus)=\"onFocus($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
440
434
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
442
436
|
type: Component,
|
|
443
|
-
args: [{
|
|
437
|
+
args: [{ selector: 'mng-autocomplete', providers: [AUTOCOMPLETE_VALUE_ACCESSOR], imports: [TranslatePipe, FormsModule, AutoComplete], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dropdown]=\"true\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [suggestions]=\"suggestions()\"\n [multiple]=\"multiselect()\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [minLength]=\"openOnFocus() ? 0 : 1\"\n [showClear]=\"showClear()\"\n [forceSelection]=\"autoClear()\"\n [disabled]=\"disabled()\"\n [completeOnFocus]=\"openOnFocus()\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onUnselect)=\"onUnselect($event)\"\n (onFocus)=\"onFocus($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
444
438
|
}], ctorParameters: () => [] });
|
|
445
439
|
|
|
446
440
|
const DATE_RANGE_VALUE_ACCESSOR = {
|
|
@@ -460,14 +454,15 @@ class DateRangeComponent {
|
|
|
460
454
|
this.destroyRef = inject(DestroyRef);
|
|
461
455
|
this.cdr = inject(ChangeDetectorRef);
|
|
462
456
|
this.placeholder = input();
|
|
463
|
-
this.showTime = input(false);
|
|
464
|
-
this.showSeconds = input(false);
|
|
457
|
+
this.showTime = input(false, { transform: booleanAttribute });
|
|
458
|
+
this.showSeconds = input(false, { transform: booleanAttribute });
|
|
465
459
|
this.dateFormat = input();
|
|
466
460
|
this.className = input();
|
|
467
461
|
this.required = input(false, { transform: booleanAttribute });
|
|
468
462
|
this.disabled = input(false, {
|
|
469
463
|
transform: booleanAttribute
|
|
470
464
|
});
|
|
465
|
+
this.vertical = input(false, { transform: booleanAttribute });
|
|
471
466
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
472
467
|
this.onChangeFn = () => { };
|
|
473
468
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -572,14 +567,14 @@ class DateRangeComponent {
|
|
|
572
567
|
this.onChangeFn(date);
|
|
573
568
|
}
|
|
574
569
|
}
|
|
575
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
576
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: DateRangeComponent, isStandalone: true, selector: "mng-date-range", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, providers: [DATE_RANGE_VALUE_ACCESSOR, DATE_RANGE_VALIDATOR], ngImport: i0, template: "@if (showTime()) {\n <div class=\"flex gap-1\" [class.flex-col]=\"vertical()\">\n <p-date-picker\n appendTo=\"body\"\n [formControl]=\"fromCtrl\"\n [maxDate]=\"toCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-date-picker>\n <p-date-picker\n appendTo=\"body\"\n [formControl]=\"toCtrl\"\n [minDate]=\"fromCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-date-picker>\n </div>\n} @else {\n <p-date-picker\n appendTo=\"body\"\n [formControl]=\"dateRangeCtrl\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n selectionMode=\"range\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-date-picker>\n}\n", styles: ["mng-date-range.ng-dirty.ng-invalid p-date-picker>.p-datepicker>.p-inputtext{border-color:var(--p-inputtext-invalid-border-color, #f87171)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
577
572
|
}
|
|
578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DateRangeComponent, decorators: [{
|
|
579
574
|
type: Component,
|
|
580
|
-
args: [{
|
|
575
|
+
args: [{ selector: 'mng-date-range', providers: [DATE_RANGE_VALUE_ACCESSOR, DATE_RANGE_VALIDATOR], imports: [FormsModule, ReactiveFormsModule, DatePicker], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
581
576
|
'[class]': 'className()'
|
|
582
|
-
}, template: "@if (showTime()) {\n <div class=\"flex gap-
|
|
577
|
+
}, template: "@if (showTime()) {\n <div class=\"flex gap-1\" [class.flex-col]=\"vertical()\">\n <p-date-picker\n appendTo=\"body\"\n [formControl]=\"fromCtrl\"\n [maxDate]=\"toCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-date-picker>\n <p-date-picker\n appendTo=\"body\"\n [formControl]=\"toCtrl\"\n [minDate]=\"fromCtrl.value\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n [showTime]=\"true\"\n [showSeconds]=\"showSeconds()\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-date-picker>\n </div>\n} @else {\n <p-date-picker\n appendTo=\"body\"\n [formControl]=\"dateRangeCtrl\"\n [placeholder]=\"placeholder()\"\n [dateFormat]=\"dateFormat()\"\n selectionMode=\"range\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onBlur)=\"onBlur()\"></p-date-picker>\n}\n", styles: ["mng-date-range.ng-dirty.ng-invalid p-date-picker>.p-datepicker>.p-inputtext{border-color:var(--p-inputtext-invalid-border-color, #f87171)}\n"] }]
|
|
583
578
|
}] });
|
|
584
579
|
|
|
585
580
|
const DROPDOWN_VALUE_ACCESSOR = {
|
|
@@ -617,8 +612,9 @@ class DropdownComponent {
|
|
|
617
612
|
this.inlineSearch = input(false, { transform: booleanAttribute });
|
|
618
613
|
this.searchTrim = input(undefined);
|
|
619
614
|
this.valueChange = output();
|
|
615
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
620
616
|
this.blur = output();
|
|
621
|
-
this.
|
|
617
|
+
this.primeSelect = viewChild(Select);
|
|
622
618
|
this.primeMultiselect = viewChild(MultiSelect);
|
|
623
619
|
this.ngModelValue = signal(undefined);
|
|
624
620
|
this._loading = signal(false);
|
|
@@ -710,7 +706,7 @@ class DropdownComponent {
|
|
|
710
706
|
// ignore this blur event
|
|
711
707
|
return;
|
|
712
708
|
}
|
|
713
|
-
const primeDropdown = this.
|
|
709
|
+
const primeDropdown = this.primeSelect();
|
|
714
710
|
if (this.changeValueOnBlur() && primeDropdown) {
|
|
715
711
|
this.propagateValueChange(primeDropdown.value);
|
|
716
712
|
}
|
|
@@ -861,7 +857,7 @@ class DropdownComponent {
|
|
|
861
857
|
if (translationKeys.length === 0) {
|
|
862
858
|
return of([]);
|
|
863
859
|
}
|
|
864
|
-
return this.translate.stream(translationKeys).pipe(map$1(translations => items.map(item => {
|
|
860
|
+
return this.translate.stream(translationKeys).pipe(map$1((translations) => items.map(item => {
|
|
865
861
|
if (typeof item === 'object' && this.optionsLabelPropertyInit()) {
|
|
866
862
|
const label = item[this.optionsLabelPropertyInit()];
|
|
867
863
|
const translation = translations[label];
|
|
@@ -932,12 +928,12 @@ class DropdownComponent {
|
|
|
932
928
|
return value;
|
|
933
929
|
}
|
|
934
930
|
}
|
|
935
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
936
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
932
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: DropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInput: { classPropertyName: "optionsValuePropertyInput", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsDisabledProperty: { classPropertyName: "optionsDisabledProperty", publicName: "optionsDisabledProperty", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirstItemInput: { classPropertyName: "selectFirstItemInput", publicName: "selectFirstItem", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, changeValueOnBlur: { classPropertyName: "changeValueOnBlur", publicName: "changeValueOnBlur", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeSelect", first: true, predicate: Select, descendants: true, isSignal: true }, { propertyName: "primeMultiselect", first: true, predicate: MultiSelect, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!multiselect()) {\n <p-select\n [(ngModel)]=\"ngModelValue\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [editable]=\"allowInput()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n [filter]=\"inlineSearch() && !allowInput()\"\n [filterBy]=\"optionsLabelProperty()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n [appendTo]=\"appendTo()\">\n </p-select>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n", dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
937
933
|
}
|
|
938
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
939
935
|
type: Component,
|
|
940
|
-
args: [{
|
|
936
|
+
args: [{ selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [TranslatePipe, FormsModule, Select, MultiSelect], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!multiselect()) {\n <p-select\n [(ngModel)]=\"ngModelValue\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [editable]=\"allowInput()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n [filter]=\"inlineSearch() && !allowInput()\"\n [filterBy]=\"optionsLabelProperty()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n [appendTo]=\"appendTo()\">\n </p-select>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n" }]
|
|
941
937
|
}], ctorParameters: () => [] });
|
|
942
938
|
|
|
943
939
|
const NUMBER_RANGE_VALUE_ACCESSOR = {
|
|
@@ -961,13 +957,14 @@ class NumberRangeComponent {
|
|
|
961
957
|
this.formBuilder = inject(FormBuilder);
|
|
962
958
|
this.cdr = inject(ChangeDetectorRef);
|
|
963
959
|
this.placeholder = input();
|
|
964
|
-
this.useGrouping = input(true);
|
|
960
|
+
this.useGrouping = input(true, { transform: booleanAttribute });
|
|
965
961
|
this.minFractionDigits = input();
|
|
966
962
|
this.maxFractionDigits = input();
|
|
967
963
|
this.required = input(false, { transform: booleanAttribute });
|
|
968
964
|
this.disabled = input(false, {
|
|
969
965
|
transform: booleanAttribute
|
|
970
966
|
});
|
|
967
|
+
this.vertical = input(false, { transform: booleanAttribute });
|
|
971
968
|
this.keyDown = output();
|
|
972
969
|
this.fromToFormControl = this.formBuilder.group({
|
|
973
970
|
from: [null, Validators.required],
|
|
@@ -1046,37 +1043,141 @@ class NumberRangeComponent {
|
|
|
1046
1043
|
const toDate = this.toCtrl.value;
|
|
1047
1044
|
this.onChangeFn([fromDate, toDate]);
|
|
1048
1045
|
}
|
|
1049
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1050
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1046
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NumberRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1047
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.7", type: NumberRangeComponent, isStandalone: true, selector: "mng-number-range", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keyDown: "keyDown" }, providers: [NUMBER_RANGE_VALUE_ACCESSOR, NUMBER_RANGE_VALIDATOR], ngImport: i0, template: "<div class=\"flex gap-1\" [class.flex-col]=\"vertical()\">\n <p-inputNumber\n [formControl]=\"fromCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [max]=\"toCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n <p-inputNumber\n [formControl]=\"toCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [min]=\"fromCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n</div>\n", styles: ["mng-number-range.ng-dirty.ng-invalid>div>p-inputnumber .p-inputtext{border-color:var(--p-inputtext-invalid-border-color, #f87171)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1051
1048
|
}
|
|
1052
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NumberRangeComponent, decorators: [{
|
|
1053
1050
|
type: Component,
|
|
1054
|
-
args: [{
|
|
1051
|
+
args: [{ selector: 'mng-number-range', providers: [NUMBER_RANGE_VALUE_ACCESSOR, NUMBER_RANGE_VALIDATOR], imports: [FormsModule, ReactiveFormsModule, InputNumber], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex gap-1\" [class.flex-col]=\"vertical()\">\n <p-inputNumber\n [formControl]=\"fromCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [max]=\"toCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n <p-inputNumber\n [formControl]=\"toCtrl\"\n [placeholder]=\"placeholder()\"\n [useGrouping]=\"useGrouping()\"\n [minFractionDigits]=\"minFractionDigits()\"\n [maxFractionDigits]=\"maxFractionDigits()\"\n [min]=\"fromCtrl.value\"\n (onKeyDown)=\"onKeyDown($event)\"\n (onBlur)=\"onBlur()\" />\n</div>\n", styles: ["mng-number-range.ng-dirty.ng-invalid>div>p-inputnumber .p-inputtext{border-color:var(--p-inputtext-invalid-border-color, #f87171)}\n"] }]
|
|
1055
1052
|
}], ctorParameters: () => [] });
|
|
1056
1053
|
|
|
1054
|
+
/**
|
|
1055
|
+
* Directive that converts empty string values to undefined or null when the input loses focus.
|
|
1056
|
+
* Can also be configured to leave empty strings as is.
|
|
1057
|
+
*
|
|
1058
|
+
* Usage:
|
|
1059
|
+
* ```html
|
|
1060
|
+
* <input mngInputEmptyValue="undefined" />
|
|
1061
|
+
* ```
|
|
1062
|
+
*
|
|
1063
|
+
* @example
|
|
1064
|
+
* // Convert empty strings to undefined (default behavior)
|
|
1065
|
+
* <input mngInputEmptyValue />
|
|
1066
|
+
*
|
|
1067
|
+
* @example
|
|
1068
|
+
* // Convert empty strings to null
|
|
1069
|
+
* <input mngInputEmptyValue="null" />
|
|
1070
|
+
*
|
|
1071
|
+
* @example
|
|
1072
|
+
* // Leave empty strings as is (no conversion)
|
|
1073
|
+
* <input mngInputEmptyValue="none" />
|
|
1074
|
+
*/
|
|
1075
|
+
class InputEmptyValueDirective {
|
|
1076
|
+
constructor() {
|
|
1077
|
+
/**
|
|
1078
|
+
* Input property that specifies how empty string values should be handled.
|
|
1079
|
+
*
|
|
1080
|
+
* @default 'undefined'
|
|
1081
|
+
*/
|
|
1082
|
+
this.mngInputEmptyValue = input('undefined');
|
|
1083
|
+
this.#el = inject(ElementRef);
|
|
1084
|
+
this.#ngControl = inject(NgControl, { optional: true });
|
|
1085
|
+
this.#renderer = inject(Renderer2);
|
|
1086
|
+
this.#afterNextRenderRef = afterNextRender(() => {
|
|
1087
|
+
const nativeElement = this.#el.nativeElement;
|
|
1088
|
+
const inputChildElement = nativeElement.querySelector('input');
|
|
1089
|
+
if (inputChildElement) {
|
|
1090
|
+
this.#renderer.listen(inputChildElement, 'blur', () => this.onBlur());
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
#el;
|
|
1095
|
+
#ngControl;
|
|
1096
|
+
#renderer;
|
|
1097
|
+
#afterNextRenderRef;
|
|
1098
|
+
/**
|
|
1099
|
+
* Handler for the blur event.
|
|
1100
|
+
* Checks if the input value is an empty string and converts it to undefined, null, or leaves it as is
|
|
1101
|
+
* based on the configuration.
|
|
1102
|
+
*/
|
|
1103
|
+
onBlur() {
|
|
1104
|
+
if (!this.#ngControl?.control) {
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
const value = this.#ngControl?.control.value;
|
|
1108
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
1109
|
+
const emptyValue = this.#getEmptyValue();
|
|
1110
|
+
// Only update the value if we're not using 'none' option (which would return '')
|
|
1111
|
+
if (emptyValue !== '') {
|
|
1112
|
+
this.#ngControl.control.setValue(emptyValue, { emitEvent: false });
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Returns the appropriate empty value based on the configuration.
|
|
1118
|
+
*
|
|
1119
|
+
* @returns undefined, null, or empty string based on the mngInputEmptyValue configuration
|
|
1120
|
+
*/
|
|
1121
|
+
#getEmptyValue() {
|
|
1122
|
+
switch (this.mngInputEmptyValue()) {
|
|
1123
|
+
case 'null':
|
|
1124
|
+
return null;
|
|
1125
|
+
case 'none':
|
|
1126
|
+
return '';
|
|
1127
|
+
case 'undefined':
|
|
1128
|
+
default:
|
|
1129
|
+
return undefined;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputEmptyValueDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1133
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.7", type: InputEmptyValueDirective, isStandalone: true, selector: "[mngInputEmptyValue]", inputs: { mngInputEmptyValue: { classPropertyName: "mngInputEmptyValue", publicName: "mngInputEmptyValue", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()" } }, ngImport: i0 }); }
|
|
1134
|
+
}
|
|
1135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputEmptyValueDirective, decorators: [{
|
|
1136
|
+
type: Directive,
|
|
1137
|
+
args: [{
|
|
1138
|
+
selector: '[mngInputEmptyValue]',
|
|
1139
|
+
host: { '(blur)': 'onBlur()' }
|
|
1140
|
+
}]
|
|
1141
|
+
}] });
|
|
1142
|
+
|
|
1057
1143
|
class InputTrimDirective {
|
|
1058
1144
|
constructor() {
|
|
1059
1145
|
this.mngInputTrim = input();
|
|
1060
|
-
this
|
|
1061
|
-
this
|
|
1146
|
+
this.#el = inject(ElementRef);
|
|
1147
|
+
this.#ngControl = inject(NgControl, { optional: true });
|
|
1148
|
+
this.#renderer = inject(Renderer2);
|
|
1149
|
+
this.#inputEl = this.#el.nativeElement;
|
|
1150
|
+
this.#afterNextRenderRef = afterNextRender(() => {
|
|
1151
|
+
const nativeElement = this.#el.nativeElement;
|
|
1152
|
+
const inputChildElement = nativeElement.querySelector('input');
|
|
1153
|
+
if (inputChildElement) {
|
|
1154
|
+
this.#inputEl = inputChildElement;
|
|
1155
|
+
this.#renderer.listen(inputChildElement, 'blur', () => this.onBlur());
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
1062
1158
|
}
|
|
1159
|
+
#el;
|
|
1160
|
+
#ngControl;
|
|
1161
|
+
#renderer;
|
|
1162
|
+
#inputEl;
|
|
1163
|
+
#afterNextRenderRef;
|
|
1063
1164
|
onBlur() {
|
|
1064
|
-
const control = this
|
|
1065
|
-
const value = control ? control.value : this.
|
|
1165
|
+
const control = this.#ngControl?.control;
|
|
1166
|
+
const value = control ? control.value : this.#inputEl.value;
|
|
1066
1167
|
let trimmedValue;
|
|
1067
1168
|
if (typeof value === 'string') {
|
|
1068
|
-
trimmedValue = this
|
|
1169
|
+
trimmedValue = this.#getTrimmedValue(value);
|
|
1069
1170
|
if (trimmedValue != value) {
|
|
1070
1171
|
if (control) {
|
|
1071
1172
|
control.setValue(trimmedValue, { emitEvent: false });
|
|
1072
1173
|
}
|
|
1073
1174
|
else {
|
|
1074
|
-
this.
|
|
1175
|
+
this.#inputEl.value = trimmedValue;
|
|
1075
1176
|
}
|
|
1076
1177
|
}
|
|
1077
1178
|
}
|
|
1078
1179
|
}
|
|
1079
|
-
getTrimmedValue(value) {
|
|
1180
|
+
#getTrimmedValue(value) {
|
|
1080
1181
|
switch (this.mngInputTrim()) {
|
|
1081
1182
|
case 'both':
|
|
1082
1183
|
return value.trim();
|
|
@@ -1088,15 +1189,13 @@ class InputTrimDirective {
|
|
|
1088
1189
|
return value;
|
|
1089
1190
|
}
|
|
1090
1191
|
}
|
|
1091
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1092
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputTrimDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1193
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.7", type: InputTrimDirective, isStandalone: true, selector: "[mngInputTrim]", inputs: { mngInputTrim: { classPropertyName: "mngInputTrim", publicName: "mngInputTrim", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()" } }, ngImport: i0 }); }
|
|
1093
1194
|
}
|
|
1094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputTrimDirective, decorators: [{
|
|
1095
1196
|
type: Directive,
|
|
1096
1197
|
args: [{
|
|
1097
|
-
standalone: true,
|
|
1098
1198
|
selector: '[mngInputTrim]',
|
|
1099
|
-
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
|
1100
1199
|
host: { '(blur)': 'onBlur()' }
|
|
1101
1200
|
}]
|
|
1102
1201
|
}] });
|
|
@@ -1107,5 +1206,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
1107
1206
|
* Generated bundle index. Do not edit.
|
|
1108
1207
|
*/
|
|
1109
1208
|
|
|
1110
|
-
export { AUTOCOMPLETE_VALUE_ACCESSOR, AutocompleteComponent, DATE_RANGE_VALIDATOR, DATE_RANGE_VALUE_ACCESSOR, DROPDOWN_VALUE_ACCESSOR, DateRangeComponent, DropdownComponent, InputTrimDirective, NUMBER_RANGE_VALIDATOR, NUMBER_RANGE_VALUE_ACCESSOR, NumberRangeComponent };
|
|
1209
|
+
export { AUTOCOMPLETE_VALUE_ACCESSOR, AutocompleteComponent, DATE_RANGE_VALIDATOR, DATE_RANGE_VALUE_ACCESSOR, DROPDOWN_VALUE_ACCESSOR, DateRangeComponent, DropdownComponent, InputEmptyValueDirective, InputTrimDirective, NUMBER_RANGE_VALIDATOR, NUMBER_RANGE_VALUE_ACCESSOR, NumberRangeComponent };
|
|
1111
1210
|
//# sourceMappingURL=mediusinc-mng-commons-form.mjs.map
|