@mediusinc/mng-commons 6.0.0-rc.4 → 6.0.0-rc.6
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/core/components/notification/notification-wrapper.component.d.ts +4 -4
- package/core/error/error.model.d.ts +4 -4
- package/core/helpers/notification.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 +91 -104
- 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 +149 -49
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-DTSBP9WQ.mjs +31 -0
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-DTSBP9WQ.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-JZpyiDIL.mjs +2118 -0
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-JZpyiDIL.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 +340 -309
- 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 +16 -42
- 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/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/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 -777
- 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
|
@@ -171,9 +171,6 @@ class ButtonStyleBuilder {
|
|
|
171
171
|
}
|
|
172
172
|
build(hasNoTitle = false) {
|
|
173
173
|
const styles = [this.levelToStyleClass(), this.sizeToStyleClass(), this._class];
|
|
174
|
-
if (hasNoTitle && this._rounded == null) {
|
|
175
|
-
styles.push(`p-button-rounded mng-action-button-icon`);
|
|
176
|
-
}
|
|
177
174
|
if (this._textButton) {
|
|
178
175
|
styles.push(`p-button-text`);
|
|
179
176
|
}
|
|
@@ -183,7 +180,7 @@ class ButtonStyleBuilder {
|
|
|
183
180
|
if (this._raised) {
|
|
184
181
|
styles.push(`p-button-raised`);
|
|
185
182
|
}
|
|
186
|
-
if (this._rounded) {
|
|
183
|
+
if ((hasNoTitle && this._rounded == null) || this._rounded) {
|
|
187
184
|
styles.push('p-button-rounded');
|
|
188
185
|
}
|
|
189
186
|
return styles.join(' ');
|
|
@@ -214,21 +211,23 @@ class ButtonStyleBuilder {
|
|
|
214
211
|
case StyleLevelEnum.Success:
|
|
215
212
|
return 'p-button-success';
|
|
216
213
|
case StyleLevelEnum.Warning:
|
|
217
|
-
return 'p-button-
|
|
214
|
+
return 'p-button-warn';
|
|
218
215
|
case StyleLevelEnum.Danger:
|
|
219
216
|
return 'p-button-danger';
|
|
217
|
+
case StyleLevelEnum.Contrast:
|
|
218
|
+
return 'p-button-contrast';
|
|
220
219
|
}
|
|
221
220
|
}
|
|
222
221
|
sizeToStyleClass() {
|
|
223
222
|
switch (this._size) {
|
|
224
223
|
case StyleSizeEnum.ExtraSmall:
|
|
225
|
-
return '
|
|
224
|
+
return 'mng-button-xs';
|
|
226
225
|
case StyleSizeEnum.Small:
|
|
227
|
-
return 'p-button-sm
|
|
226
|
+
return 'p-button-sm';
|
|
228
227
|
case StyleSizeEnum.Large:
|
|
229
|
-
return 'p-button-lg
|
|
228
|
+
return 'p-button-lg';
|
|
230
229
|
case StyleSizeEnum.ExtraLarge:
|
|
231
|
-
return '
|
|
230
|
+
return 'mng-button-xl';
|
|
232
231
|
case StyleSizeEnum.Normal:
|
|
233
232
|
default:
|
|
234
233
|
return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediusinc-mng-commons-form-api.mjs","sources":["../../form/api/src/data-providers/lookup.data-provider.ts","../../form/api/src/data-providers/lookup-data-provider.factory.ts","../../form/api/src/descriptors/action-button.descriptor.ts","../../form/api/src/descriptors/button-style.builder.ts","../../form/api/src/index.ts","../../form/api/src/mediusinc-mng-commons-form-api.ts"],"sourcesContent":["import {DataProviderInst, ILookupDataProvider, LookupDataProviderLookupFnType, ServiceClassOptType} from '@mediusinc/mng-commons/core';\n\nexport class LookupDataProviderInst<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassOptType<Service>>\n extends DataProviderInst<Model, Service, ServiceClass>\n implements ILookupDataProvider<Model, Service, Sorts, Filters, ServiceClass>\n{\n protected _lookup: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters> = () => [];\n\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n }\n\n get lookup() {\n return this._lookup;\n }\n\n withLookup(fn: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>): this {\n this._lookup = fn;\n return this;\n }\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {LookupDataProviderInst} from './lookup.data-provider';\n\n/**\n * Creates and returns an instance of `LookupDataProviderInst` with the specified options for managing lookup data.\n *\n * @param {Object} [opts] - The options object to configure the data provider.\n * @param {TypeDescriptor<Model> | ModelDescriptor<Model>} [opts.type] - The descriptor defining the type of model.\n * @param {ServiceClassType<Service>} [opts.service] - The service class type associated with the data provider.\n * @param {TypeDescriptor<CreateModel> | ModelDescriptor<CreateModel>} [opts.filtersType] - The descriptor defining the filters type.\n * @param {TypeDescriptor<UpdateModel> | ModelDescriptor<UpdateModel>} [opts.sortsType] - The descriptor defining the sorts type.\n * @return {LookupDataProviderInst<Model, Service, Sorts, Filters, ServiceClass>} An instance of `LookupDataProviderInst` configured according to the provided options.\n */\nexport function lookupDataProvider<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = Service extends undefined ? undefined : ServiceClassType<Service>\n>(opts?: {\n type?: TypeDescriptor<Model> | ModelDescriptor<Model>;\n service?: ServiceClassType<Service>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n}): LookupDataProviderInst<Model, Service, Sorts, Filters, ServiceClass> {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, ServiceClass>(opts?.service as ServiceClass);\n}\n","import {IActionButtonDescriptor, IButtonStyleDescriptor} from '../models/button.model';\n\nexport class ActionButtonDescriptor implements IActionButtonDescriptor {\n private _label?: string | null;\n\n private _icon?: string | null;\n private _iconPosition?: 'left' | 'right';\n\n private _styleClass?: IButtonStyleDescriptor;\n\n private _badge?: string;\n private _tooltip?: string | null;\n private _tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';\n\n public withLabel(label?: string | null): this {\n this._label = label;\n return this;\n }\n\n public withIcon(icon: string | null, iconPosition?: 'left' | 'right'): this {\n this._icon = icon;\n this._iconPosition = iconPosition;\n return this;\n }\n\n public withStyle(style?: IButtonStyleDescriptor): this {\n this._styleClass = style;\n return this;\n }\n\n public withBadge(badge: string): this {\n this._badge = badge;\n return this;\n }\n\n public withTooltip(tooltip: string | null, position?: 'top' | 'bottom' | 'left' | 'right'): this {\n this._tooltip = tooltip;\n this._tooltipPosition = position ?? 'top';\n return this;\n }\n\n public get label() {\n return this._label;\n }\n\n public get icon() {\n return this._icon;\n }\n\n public get iconPosition() {\n return this._iconPosition;\n }\n\n public get style() {\n return this._styleClass;\n }\n\n public get badge() {\n return this._badge;\n }\n\n public get tooltip() {\n return this._tooltip;\n }\n\n public get tooltipPosition() {\n return this._tooltipPosition;\n }\n\n public copy(): ActionButtonDescriptor {\n const descriptor = new ActionButtonDescriptor();\n descriptor._label = this._label;\n descriptor._icon = this._icon;\n descriptor._iconPosition = this._iconPosition;\n descriptor._styleClass = {...this._styleClass};\n descriptor._badge = this._badge;\n descriptor._tooltip = this._tooltip;\n return descriptor;\n }\n}\n","import {StyleLevelEnum, StyleSizeEnum} from '@mediusinc/mng-commons/core';\n\nimport {IButtonStyleDescriptor} from '../models/button.model';\n\nexport class ButtonStyleBuilder implements IButtonStyleDescriptor {\n private _level?: StyleLevelEnum;\n private _size?: StyleSizeEnum;\n private _textButton?: boolean;\n private _outlined?: boolean;\n private _raised?: boolean;\n private _rounded?: boolean;\n private _class?: string;\n\n public static from(opts?: IButtonStyleDescriptor): ButtonStyleBuilder {\n const builder = new ButtonStyleBuilder();\n builder._level = opts?.level;\n builder._size = opts?.size;\n builder._textButton = opts?.textButton;\n builder._outlined = opts?.outlined;\n builder._raised = opts?.raised;\n builder._rounded = opts?.rounded;\n builder._class = opts?.class;\n return builder;\n }\n\n public get level() {\n return this._level;\n }\n\n public get size() {\n return this._size;\n }\n\n public get textButton() {\n return this._textButton;\n }\n\n public get outlined() {\n return this._outlined;\n }\n\n public get raised() {\n return this._raised;\n }\n\n public get rounded() {\n return this._rounded;\n }\n\n public get class() {\n return this._class;\n }\n\n /**\n * sets custom action level and returns this object\n * @param level\n */\n public withLevel(level: StyleLevelEnum): ButtonStyleBuilder {\n this._level = level;\n return this;\n }\n\n /**\n * sets custom size and return this object\n * @param size\n */\n public withSize(size: StyleSizeEnum): ButtonStyleBuilder {\n this._size = size;\n return this;\n }\n\n /**\n * sets text button property\n * @param text default true\n */\n public withTextButton(text = true): ButtonStyleBuilder {\n this._textButton = text;\n return this;\n }\n\n /**\n * sets outline button property\n * @param outlined default true\n */\n public withOutlined(outlined = true): ButtonStyleBuilder {\n this._outlined = outlined;\n return this;\n }\n\n /**\n * sets raised button property\n * @param raised default true\n */\n public withRaised(raised = true): ButtonStyleBuilder {\n this._raised = raised;\n return this;\n }\n\n public withRounded(rounded = true): ButtonStyleBuilder {\n this._rounded = rounded;\n return this;\n }\n\n /**\n * sets custom style class\n * @param customClass\n */\n public withClass(customClass: string): ButtonStyleBuilder {\n this._class = customClass;\n return this;\n }\n\n public build(hasNoTitle = false): string {\n const styles = [this.levelToStyleClass(), this.sizeToStyleClass(), this._class];\n\n if (hasNoTitle && this._rounded == null) {\n styles.push(`p-button-rounded mng-action-button-icon`);\n }\n\n if (this._textButton) {\n styles.push(`p-button-text`);\n }\n\n if (this._outlined) {\n styles.push(`p-button-outlined`);\n }\n\n if (this._raised) {\n styles.push(`p-button-raised`);\n }\n\n if (this._rounded) {\n styles.push('p-button-rounded');\n }\n\n return styles.join(' ');\n }\n\n public copy(): ButtonStyleBuilder {\n const builder = new ButtonStyleBuilder();\n builder._level = this._level;\n builder._size = this._size;\n builder._textButton = this._textButton;\n builder._outlined = this._outlined;\n builder._raised = this._raised;\n builder._rounded = this._rounded;\n builder._class = this._class;\n return builder;\n }\n\n private levelToStyleClass(): string {\n switch (this._level) {\n case undefined:\n case StyleLevelEnum.Default:\n case StyleLevelEnum.Primary:\n return 'p-button-primary';\n case StyleLevelEnum.Secondary:\n return 'p-button-secondary';\n case StyleLevelEnum.Info:\n return 'p-button-info';\n case StyleLevelEnum.Help:\n return 'p-button-help';\n case StyleLevelEnum.Success:\n return 'p-button-success';\n case StyleLevelEnum.Warning:\n return 'p-button-warning';\n case StyleLevelEnum.Danger:\n return 'p-button-danger';\n }\n }\n\n private sizeToStyleClass(): string {\n switch (this._size) {\n case StyleSizeEnum.ExtraSmall:\n return 'p-button-sm mng-button-xs';\n case StyleSizeEnum.Small:\n return 'p-button-sm mng-button-sm';\n case StyleSizeEnum.Large:\n return 'p-button-lg mng-button-lg';\n case StyleSizeEnum.ExtraLarge:\n return 'p-button-lg mng-button-xl';\n case StyleSizeEnum.Normal:\n default:\n return '';\n }\n }\n}\n","// data providers\nexport * from './data-providers/lookup.data-provider';\nexport * from './data-providers/lookup-data-provider.factory';\n\n// descriptors\nexport * from './descriptors/action-button.descriptor';\nexport * from './descriptors/button-style.builder';\n\n// models\nexport * from './models/button.model';\nexport * from './models/trim.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEM,MAAO,sBACT,SAAQ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Q,GAAG,IAAI,CAAC,QAAQ;AAChC,QAAA,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;AAC5B,QAAA,OAAO,OAAO;;IAGV,iBAAiB,GAAA;AACrB,QAAA,QAAQ,IAAI,CAAC,MAAM;AACf,YAAA,KAAK,SAAS;YACd,KAAK,cAAc,CAAC,OAAO;YAC3B,KAAK,cAAc,CAAC,OAAO;AACvB,gBAAA,OAAO,kBAAkB;YAC7B,KAAK,cAAc,CAAC,SAAS;AACzB,gBAAA,OAAO,oBAAoB;YAC/B,KAAK,cAAc,CAAC,IAAI;AACpB,gBAAA,OAAO,eAAe;YAC1B,KAAK,cAAc,CAAC,IAAI;AACpB,gBAAA,OAAO,eAAe;YAC1B,KAAK,cAAc,CAAC,OAAO;AACvB,gBAAA,OAAO,kBAAkB;YAC7B,KAAK,cAAc,CAAC,OAAO;AACvB,gBAAA,OAAO,kBAAkB;YAC7B,KAAK,cAAc,CAAC,MAAM;AACtB,gBAAA,OAAO,iBAAiB;;;IAI5B,gBAAgB,GAAA;AACpB,QAAA,QAAQ,IAAI,CAAC,KAAK;YACd,KAAK,aAAa,CAAC,UAAU;AACzB,gBAAA,OAAO,2BAA2B;YACtC,KAAK,aAAa,CAAC,KAAK;AACpB,gBAAA,OAAO,2BAA2B;YACtC,KAAK,aAAa,CAAC,KAAK;AACpB,gBAAA,OAAO,2BAA2B;YACtC,KAAK,aAAa,CAAC,UAAU;AACzB,gBAAA,OAAO,2BAA2B;YACtC,KAAK,aAAa,CAAC,MAAM;AACzB,YAAA;AACI,gBAAA,OAAO,EAAE;;;AAGxB;;AC1LD;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mediusinc-mng-commons-form-api.mjs","sources":["../../form/api/src/data-providers/lookup.data-provider.ts","../../form/api/src/data-providers/lookup-data-provider.factory.ts","../../form/api/src/descriptors/action-button.descriptor.ts","../../form/api/src/descriptors/button-style.builder.ts","../../form/api/src/index.ts","../../form/api/src/mediusinc-mng-commons-form-api.ts"],"sourcesContent":["import {DataProviderInst, ILookupDataProvider, LookupDataProviderLookupFnType, ServiceClassOptType} from '@mediusinc/mng-commons/core';\n\nexport class LookupDataProviderInst<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassOptType<Service>>\n extends DataProviderInst<Model, Service, ServiceClass>\n implements ILookupDataProvider<Model, Service, Sorts, Filters, ServiceClass>\n{\n protected _lookup: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters> = () => [];\n\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n }\n\n get lookup() {\n return this._lookup;\n }\n\n withLookup(fn: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>): this {\n this._lookup = fn;\n return this;\n }\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {LookupDataProviderInst} from './lookup.data-provider';\n\n/**\n * Creates and returns an instance of `LookupDataProviderInst` with the specified options for managing lookup data.\n *\n * @param {Object} [opts] - The options object to configure the data provider.\n * @param {TypeDescriptor<Model> | ModelDescriptor<Model>} [opts.type] - The descriptor defining the type of model.\n * @param {ServiceClassType<Service>} [opts.service] - The service class type associated with the data provider.\n * @param {TypeDescriptor<CreateModel> | ModelDescriptor<CreateModel>} [opts.filtersType] - The descriptor defining the filters type.\n * @param {TypeDescriptor<UpdateModel> | ModelDescriptor<UpdateModel>} [opts.sortsType] - The descriptor defining the sorts type.\n * @return {LookupDataProviderInst<Model, Service, Sorts, Filters, ServiceClass>} An instance of `LookupDataProviderInst` configured according to the provided options.\n */\nexport function lookupDataProvider<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = Service extends undefined ? undefined : ServiceClassType<Service>\n>(opts?: {\n type?: TypeDescriptor<Model> | ModelDescriptor<Model>;\n service?: ServiceClassType<Service>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n}): LookupDataProviderInst<Model, Service, Sorts, Filters, ServiceClass> {\n return new LookupDataProviderInst<Model, Service, Sorts, Filters, ServiceClass>(opts?.service as ServiceClass);\n}\n","import {IActionButtonDescriptor, IButtonStyleDescriptor} from '../models/button.model';\n\nexport class ActionButtonDescriptor implements IActionButtonDescriptor {\n private _label?: string | null;\n\n private _icon?: string | null;\n private _iconPosition?: 'left' | 'right';\n\n private _styleClass?: IButtonStyleDescriptor;\n\n private _badge?: string;\n private _tooltip?: string | null;\n private _tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';\n\n public withLabel(label?: string | null): this {\n this._label = label;\n return this;\n }\n\n public withIcon(icon: string | null, iconPosition?: 'left' | 'right'): this {\n this._icon = icon;\n this._iconPosition = iconPosition;\n return this;\n }\n\n public withStyle(style?: IButtonStyleDescriptor): this {\n this._styleClass = style;\n return this;\n }\n\n public withBadge(badge: string): this {\n this._badge = badge;\n return this;\n }\n\n public withTooltip(tooltip: string | null, position?: 'top' | 'bottom' | 'left' | 'right'): this {\n this._tooltip = tooltip;\n this._tooltipPosition = position ?? 'top';\n return this;\n }\n\n public get label() {\n return this._label;\n }\n\n public get icon() {\n return this._icon;\n }\n\n public get iconPosition() {\n return this._iconPosition;\n }\n\n public get style() {\n return this._styleClass;\n }\n\n public get badge() {\n return this._badge;\n }\n\n public get tooltip() {\n return this._tooltip;\n }\n\n public get tooltipPosition() {\n return this._tooltipPosition;\n }\n\n public copy(): ActionButtonDescriptor {\n const descriptor = new ActionButtonDescriptor();\n descriptor._label = this._label;\n descriptor._icon = this._icon;\n descriptor._iconPosition = this._iconPosition;\n descriptor._styleClass = {...this._styleClass};\n descriptor._badge = this._badge;\n descriptor._tooltip = this._tooltip;\n return descriptor;\n }\n}\n","import {StyleLevelEnum, StyleSizeEnum} from '@mediusinc/mng-commons/core';\n\nimport {IButtonStyleDescriptor} from '../models/button.model';\n\nexport class ButtonStyleBuilder implements IButtonStyleDescriptor {\n private _level?: StyleLevelEnum;\n private _size?: StyleSizeEnum;\n private _textButton?: boolean;\n private _outlined?: boolean;\n private _raised?: boolean;\n private _rounded?: boolean;\n private _class?: string;\n\n public static from(opts?: IButtonStyleDescriptor): ButtonStyleBuilder {\n const builder = new ButtonStyleBuilder();\n builder._level = opts?.level;\n builder._size = opts?.size;\n builder._textButton = opts?.textButton;\n builder._outlined = opts?.outlined;\n builder._raised = opts?.raised;\n builder._rounded = opts?.rounded;\n builder._class = opts?.class;\n return builder;\n }\n\n public get level() {\n return this._level;\n }\n\n public get size() {\n return this._size;\n }\n\n public get textButton() {\n return this._textButton;\n }\n\n public get outlined() {\n return this._outlined;\n }\n\n public get raised() {\n return this._raised;\n }\n\n public get rounded() {\n return this._rounded;\n }\n\n public get class() {\n return this._class;\n }\n\n /**\n * sets custom action level and returns this object\n * @param level\n */\n public withLevel(level: StyleLevelEnum): ButtonStyleBuilder {\n this._level = level;\n return this;\n }\n\n /**\n * sets custom size and return this object\n * @param size\n */\n public withSize(size: StyleSizeEnum): ButtonStyleBuilder {\n this._size = size;\n return this;\n }\n\n /**\n * sets text button property\n * @param text default true\n */\n public withTextButton(text = true): ButtonStyleBuilder {\n this._textButton = text;\n return this;\n }\n\n /**\n * sets outline button property\n * @param outlined default true\n */\n public withOutlined(outlined = true): ButtonStyleBuilder {\n this._outlined = outlined;\n return this;\n }\n\n /**\n * sets raised button property\n * @param raised default true\n */\n public withRaised(raised = true): ButtonStyleBuilder {\n this._raised = raised;\n return this;\n }\n\n public withRounded(rounded = true): ButtonStyleBuilder {\n this._rounded = rounded;\n return this;\n }\n\n /**\n * sets custom style class\n * @param customClass\n */\n public withClass(customClass: string): ButtonStyleBuilder {\n this._class = customClass;\n return this;\n }\n\n public build(hasNoTitle = false): string {\n const styles = [this.levelToStyleClass(), this.sizeToStyleClass(), this._class];\n\n if (this._textButton) {\n styles.push(`p-button-text`);\n }\n\n if (this._outlined) {\n styles.push(`p-button-outlined`);\n }\n\n if (this._raised) {\n styles.push(`p-button-raised`);\n }\n\n if ((hasNoTitle && this._rounded == null) || this._rounded) {\n styles.push('p-button-rounded');\n }\n\n return styles.join(' ');\n }\n\n public copy(): ButtonStyleBuilder {\n const builder = new ButtonStyleBuilder();\n builder._level = this._level;\n builder._size = this._size;\n builder._textButton = this._textButton;\n builder._outlined = this._outlined;\n builder._raised = this._raised;\n builder._rounded = this._rounded;\n builder._class = this._class;\n return builder;\n }\n\n private levelToStyleClass(): string {\n switch (this._level) {\n case undefined:\n case StyleLevelEnum.Default:\n case StyleLevelEnum.Primary:\n return 'p-button-primary';\n case StyleLevelEnum.Secondary:\n return 'p-button-secondary';\n case StyleLevelEnum.Info:\n return 'p-button-info';\n case StyleLevelEnum.Help:\n return 'p-button-help';\n case StyleLevelEnum.Success:\n return 'p-button-success';\n case StyleLevelEnum.Warning:\n return 'p-button-warn';\n case StyleLevelEnum.Danger:\n return 'p-button-danger';\n case StyleLevelEnum.Contrast:\n return 'p-button-contrast';\n }\n }\n\n private sizeToStyleClass(): string {\n switch (this._size) {\n case StyleSizeEnum.ExtraSmall:\n return 'mng-button-xs';\n case StyleSizeEnum.Small:\n return 'p-button-sm';\n case StyleSizeEnum.Large:\n return 'p-button-lg';\n case StyleSizeEnum.ExtraLarge:\n return 'mng-button-xl';\n case StyleSizeEnum.Normal:\n default:\n return '';\n }\n }\n}\n","// data providers\nexport * from './data-providers/lookup.data-provider';\nexport * from './data-providers/lookup-data-provider.factory';\n\n// descriptors\nexport * from './descriptors/action-button.descriptor';\nexport * from './descriptors/button-style.builder';\n\n// models\nexport * from './models/button.model';\nexport * from './models/empty-value.model';\nexport * from './models/trim.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEM,MAAO,sBACT,SAAQ,gBAA8C,CAAA;AAKtD,IAAA,WAAA,CAAmB,WAAyB,EAAA;QACxC,KAAK,CAAC,WAAW,CAAC;AAHZ,QAAA,IAAA,CAAA,OAA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AAS;YACd,KAAK,cAAc,CAAC,OAAO;YAC3B,KAAK,cAAc,CAAC,OAAO;AACvB,gBAAA,OAAO,kBAAkB;YAC7B,KAAK,cAAc,CAAC,SAAS;AACzB,gBAAA,OAAO,oBAAoB;YAC/B,KAAK,cAAc,CAAC,IAAI;AACpB,gBAAA,OAAO,eAAe;YAC1B,KAAK,cAAc,CAAC,IAAI;AACpB,gBAAA,OAAO,eAAe;YAC1B,KAAK,cAAc,CAAC,OAAO;AACvB,gBAAA,OAAO,kBAAkB;YAC7B,KAAK,cAAc,CAAC,OAAO;AACvB,gBAAA,OAAO,eAAe;YAC1B,KAAK,cAAc,CAAC,MAAM;AACtB,gBAAA,OAAO,iBAAiB;YAC5B,KAAK,cAAc,CAAC,QAAQ;AACxB,gBAAA,OAAO,mBAAmB;;;IAI9B,gBAAgB,GAAA;AACpB,QAAA,QAAQ,IAAI,CAAC,KAAK;YACd,KAAK,aAAa,CAAC,UAAU;AACzB,gBAAA,OAAO,eAAe;YAC1B,KAAK,aAAa,CAAC,KAAK;AACpB,gBAAA,OAAO,aAAa;YACxB,KAAK,aAAa,CAAC,KAAK;AACpB,gBAAA,OAAO,aAAa;YACxB,KAAK,aAAa,CAAC,UAAU;AACzB,gBAAA,OAAO,eAAe;YAC1B,KAAK,aAAa,CAAC,MAAM;AACzB,YAAA;AACI,gBAAA,OAAO,EAAE;;;AAGxB;;ACxLD;;ACAA;;AAEG;;;;"}
|
|
@@ -1,24 +1,18 @@
|
|
|
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
|
|
4
|
+
import * as i2 from '@angular/forms';
|
|
6
5
|
import { NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS, FormBuilder, Validators, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
7
|
-
import * as
|
|
6
|
+
import * as i1 from '@ngx-translate/core';
|
|
8
7
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
9
|
-
import
|
|
10
|
-
import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
|
|
8
|
+
import { AutoComplete } from 'primeng/autocomplete';
|
|
11
9
|
import { ReplaySubject, take, switchMap, of, merge, Subject, distinctUntilChanged, debounceTime, combineLatest, tap, map as map$1 } from 'rxjs';
|
|
12
10
|
import { map } from 'rxjs/operators';
|
|
13
11
|
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';
|
|
12
|
+
import { DatePicker } from 'primeng/datepicker';
|
|
13
|
+
import { MultiSelect } from 'primeng/multiselect';
|
|
14
|
+
import { Select } from 'primeng/select';
|
|
15
|
+
import { InputNumber } from 'primeng/inputnumber';
|
|
22
16
|
|
|
23
17
|
const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
24
18
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -51,6 +45,7 @@ class AutocompleteComponent {
|
|
|
51
45
|
this.searchTrim = input(undefined);
|
|
52
46
|
this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
|
|
53
47
|
this.valueChange = output();
|
|
48
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
54
49
|
this.blur = output();
|
|
55
50
|
this.primeAutocomplete = viewChild(AutoComplete);
|
|
56
51
|
this.isInited = false;
|
|
@@ -435,12 +430,12 @@ class AutocompleteComponent {
|
|
|
435
430
|
return value;
|
|
436
431
|
}
|
|
437
432
|
}
|
|
438
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
439
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
433
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
434
|
+
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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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
435
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
442
437
|
type: Component,
|
|
443
|
-
args: [{
|
|
438
|
+
args: [{ selector: 'mng-autocomplete', providers: [AUTOCOMPLETE_VALUE_ACCESSOR], imports: [TranslateModule, 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
439
|
}], ctorParameters: () => [] });
|
|
445
440
|
|
|
446
441
|
const DATE_RANGE_VALUE_ACCESSOR = {
|
|
@@ -460,14 +455,15 @@ class DateRangeComponent {
|
|
|
460
455
|
this.destroyRef = inject(DestroyRef);
|
|
461
456
|
this.cdr = inject(ChangeDetectorRef);
|
|
462
457
|
this.placeholder = input();
|
|
463
|
-
this.showTime = input(false);
|
|
464
|
-
this.showSeconds = input(false);
|
|
458
|
+
this.showTime = input(false, { transform: booleanAttribute });
|
|
459
|
+
this.showSeconds = input(false, { transform: booleanAttribute });
|
|
465
460
|
this.dateFormat = input();
|
|
466
461
|
this.className = input();
|
|
467
462
|
this.required = input(false, { transform: booleanAttribute });
|
|
468
463
|
this.disabled = input(false, {
|
|
469
464
|
transform: booleanAttribute
|
|
470
465
|
});
|
|
466
|
+
this.vertical = input(false, { transform: booleanAttribute });
|
|
471
467
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
472
468
|
this.onChangeFn = () => { };
|
|
473
469
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -572,14 +568,14 @@ class DateRangeComponent {
|
|
|
572
568
|
this.onChangeFn(date);
|
|
573
569
|
}
|
|
574
570
|
}
|
|
575
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
576
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
572
|
+
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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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
573
|
}
|
|
578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DateRangeComponent, decorators: [{
|
|
579
575
|
type: Component,
|
|
580
|
-
args: [{
|
|
576
|
+
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
577
|
'[class]': 'className()'
|
|
582
|
-
}, template: "@if (showTime()) {\n <div class=\"flex gap-
|
|
578
|
+
}, 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
579
|
}] });
|
|
584
580
|
|
|
585
581
|
const DROPDOWN_VALUE_ACCESSOR = {
|
|
@@ -617,8 +613,9 @@ class DropdownComponent {
|
|
|
617
613
|
this.inlineSearch = input(false, { transform: booleanAttribute });
|
|
618
614
|
this.searchTrim = input(undefined);
|
|
619
615
|
this.valueChange = output();
|
|
616
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
620
617
|
this.blur = output();
|
|
621
|
-
this.
|
|
618
|
+
this.primeSelect = viewChild(Select);
|
|
622
619
|
this.primeMultiselect = viewChild(MultiSelect);
|
|
623
620
|
this.ngModelValue = signal(undefined);
|
|
624
621
|
this._loading = signal(false);
|
|
@@ -710,7 +707,7 @@ class DropdownComponent {
|
|
|
710
707
|
// ignore this blur event
|
|
711
708
|
return;
|
|
712
709
|
}
|
|
713
|
-
const primeDropdown = this.
|
|
710
|
+
const primeDropdown = this.primeSelect();
|
|
714
711
|
if (this.changeValueOnBlur() && primeDropdown) {
|
|
715
712
|
this.propagateValueChange(primeDropdown.value);
|
|
716
713
|
}
|
|
@@ -932,12 +929,12 @@ class DropdownComponent {
|
|
|
932
929
|
return value;
|
|
933
930
|
}
|
|
934
931
|
}
|
|
935
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
936
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
932
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
933
|
+
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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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
934
|
}
|
|
938
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
935
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
939
936
|
type: Component,
|
|
940
|
-
args: [{
|
|
937
|
+
args: [{ selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [TranslateModule, 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
938
|
}], ctorParameters: () => [] });
|
|
942
939
|
|
|
943
940
|
const NUMBER_RANGE_VALUE_ACCESSOR = {
|
|
@@ -961,13 +958,14 @@ class NumberRangeComponent {
|
|
|
961
958
|
this.formBuilder = inject(FormBuilder);
|
|
962
959
|
this.cdr = inject(ChangeDetectorRef);
|
|
963
960
|
this.placeholder = input();
|
|
964
|
-
this.useGrouping = input(true);
|
|
961
|
+
this.useGrouping = input(true, { transform: booleanAttribute });
|
|
965
962
|
this.minFractionDigits = input();
|
|
966
963
|
this.maxFractionDigits = input();
|
|
967
964
|
this.required = input(false, { transform: booleanAttribute });
|
|
968
965
|
this.disabled = input(false, {
|
|
969
966
|
transform: booleanAttribute
|
|
970
967
|
});
|
|
968
|
+
this.vertical = input(false, { transform: booleanAttribute });
|
|
971
969
|
this.keyDown = output();
|
|
972
970
|
this.fromToFormControl = this.formBuilder.group({
|
|
973
971
|
from: [null, Validators.required],
|
|
@@ -1046,37 +1044,141 @@ class NumberRangeComponent {
|
|
|
1046
1044
|
const toDate = this.toCtrl.value;
|
|
1047
1045
|
this.onChangeFn([fromDate, toDate]);
|
|
1048
1046
|
}
|
|
1049
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1050
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1047
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NumberRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1048
|
+
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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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
1049
|
}
|
|
1052
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NumberRangeComponent, decorators: [{
|
|
1053
1051
|
type: Component,
|
|
1054
|
-
args: [{
|
|
1052
|
+
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
1053
|
}], ctorParameters: () => [] });
|
|
1056
1054
|
|
|
1055
|
+
/**
|
|
1056
|
+
* Directive that converts empty string values to undefined or null when the input loses focus.
|
|
1057
|
+
* Can also be configured to leave empty strings as is.
|
|
1058
|
+
*
|
|
1059
|
+
* Usage:
|
|
1060
|
+
* ```html
|
|
1061
|
+
* <input mngInputEmptyValue="undefined" />
|
|
1062
|
+
* ```
|
|
1063
|
+
*
|
|
1064
|
+
* @example
|
|
1065
|
+
* // Convert empty strings to undefined (default behavior)
|
|
1066
|
+
* <input mngInputEmptyValue />
|
|
1067
|
+
*
|
|
1068
|
+
* @example
|
|
1069
|
+
* // Convert empty strings to null
|
|
1070
|
+
* <input mngInputEmptyValue="null" />
|
|
1071
|
+
*
|
|
1072
|
+
* @example
|
|
1073
|
+
* // Leave empty strings as is (no conversion)
|
|
1074
|
+
* <input mngInputEmptyValue="none" />
|
|
1075
|
+
*/
|
|
1076
|
+
class InputEmptyValueDirective {
|
|
1077
|
+
constructor() {
|
|
1078
|
+
/**
|
|
1079
|
+
* Input property that specifies how empty string values should be handled.
|
|
1080
|
+
*
|
|
1081
|
+
* @default 'undefined'
|
|
1082
|
+
*/
|
|
1083
|
+
this.mngInputEmptyValue = input('undefined');
|
|
1084
|
+
this.#el = inject(ElementRef);
|
|
1085
|
+
this.#ngControl = inject(NgControl, { optional: true });
|
|
1086
|
+
this.#renderer = inject(Renderer2);
|
|
1087
|
+
this.#afterNextRenderRef = afterNextRender(() => {
|
|
1088
|
+
const nativeElement = this.#el.nativeElement;
|
|
1089
|
+
const inputChildElement = nativeElement.querySelector('input');
|
|
1090
|
+
if (inputChildElement) {
|
|
1091
|
+
this.#renderer.listen(inputChildElement, 'blur', () => this.onBlur());
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
#el;
|
|
1096
|
+
#ngControl;
|
|
1097
|
+
#renderer;
|
|
1098
|
+
#afterNextRenderRef;
|
|
1099
|
+
/**
|
|
1100
|
+
* Handler for the blur event.
|
|
1101
|
+
* Checks if the input value is an empty string and converts it to undefined, null, or leaves it as is
|
|
1102
|
+
* based on the configuration.
|
|
1103
|
+
*/
|
|
1104
|
+
onBlur() {
|
|
1105
|
+
if (!this.#ngControl?.control) {
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
const value = this.#ngControl?.control.value;
|
|
1109
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
1110
|
+
const emptyValue = this.#getEmptyValue();
|
|
1111
|
+
// Only update the value if we're not using 'none' option (which would return '')
|
|
1112
|
+
if (emptyValue !== '') {
|
|
1113
|
+
this.#ngControl.control.setValue(emptyValue, { emitEvent: false });
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* Returns the appropriate empty value based on the configuration.
|
|
1119
|
+
*
|
|
1120
|
+
* @returns undefined, null, or empty string based on the mngInputEmptyValue configuration
|
|
1121
|
+
*/
|
|
1122
|
+
#getEmptyValue() {
|
|
1123
|
+
switch (this.mngInputEmptyValue()) {
|
|
1124
|
+
case 'null':
|
|
1125
|
+
return null;
|
|
1126
|
+
case 'none':
|
|
1127
|
+
return '';
|
|
1128
|
+
case 'undefined':
|
|
1129
|
+
default:
|
|
1130
|
+
return undefined;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputEmptyValueDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1134
|
+
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 }); }
|
|
1135
|
+
}
|
|
1136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputEmptyValueDirective, decorators: [{
|
|
1137
|
+
type: Directive,
|
|
1138
|
+
args: [{
|
|
1139
|
+
selector: '[mngInputEmptyValue]',
|
|
1140
|
+
host: { '(blur)': 'onBlur()' }
|
|
1141
|
+
}]
|
|
1142
|
+
}] });
|
|
1143
|
+
|
|
1057
1144
|
class InputTrimDirective {
|
|
1058
1145
|
constructor() {
|
|
1059
1146
|
this.mngInputTrim = input();
|
|
1060
|
-
this
|
|
1061
|
-
this
|
|
1147
|
+
this.#el = inject(ElementRef);
|
|
1148
|
+
this.#ngControl = inject(NgControl, { optional: true });
|
|
1149
|
+
this.#renderer = inject(Renderer2);
|
|
1150
|
+
this.#inputEl = this.#el.nativeElement;
|
|
1151
|
+
this.#afterNextRenderRef = afterNextRender(() => {
|
|
1152
|
+
const nativeElement = this.#el.nativeElement;
|
|
1153
|
+
const inputChildElement = nativeElement.querySelector('input');
|
|
1154
|
+
if (inputChildElement) {
|
|
1155
|
+
this.#inputEl = inputChildElement;
|
|
1156
|
+
this.#renderer.listen(inputChildElement, 'blur', () => this.onBlur());
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1062
1159
|
}
|
|
1160
|
+
#el;
|
|
1161
|
+
#ngControl;
|
|
1162
|
+
#renderer;
|
|
1163
|
+
#inputEl;
|
|
1164
|
+
#afterNextRenderRef;
|
|
1063
1165
|
onBlur() {
|
|
1064
|
-
const control = this
|
|
1065
|
-
const value = control ? control.value : this.
|
|
1166
|
+
const control = this.#ngControl?.control;
|
|
1167
|
+
const value = control ? control.value : this.#inputEl.value;
|
|
1066
1168
|
let trimmedValue;
|
|
1067
1169
|
if (typeof value === 'string') {
|
|
1068
|
-
trimmedValue = this
|
|
1170
|
+
trimmedValue = this.#getTrimmedValue(value);
|
|
1069
1171
|
if (trimmedValue != value) {
|
|
1070
1172
|
if (control) {
|
|
1071
1173
|
control.setValue(trimmedValue, { emitEvent: false });
|
|
1072
1174
|
}
|
|
1073
1175
|
else {
|
|
1074
|
-
this.
|
|
1176
|
+
this.#inputEl.value = trimmedValue;
|
|
1075
1177
|
}
|
|
1076
1178
|
}
|
|
1077
1179
|
}
|
|
1078
1180
|
}
|
|
1079
|
-
getTrimmedValue(value) {
|
|
1181
|
+
#getTrimmedValue(value) {
|
|
1080
1182
|
switch (this.mngInputTrim()) {
|
|
1081
1183
|
case 'both':
|
|
1082
1184
|
return value.trim();
|
|
@@ -1088,15 +1190,13 @@ class InputTrimDirective {
|
|
|
1088
1190
|
return value;
|
|
1089
1191
|
}
|
|
1090
1192
|
}
|
|
1091
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1092
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputTrimDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1194
|
+
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
1195
|
}
|
|
1094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: InputTrimDirective, decorators: [{
|
|
1095
1197
|
type: Directive,
|
|
1096
1198
|
args: [{
|
|
1097
|
-
standalone: true,
|
|
1098
1199
|
selector: '[mngInputTrim]',
|
|
1099
|
-
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
|
1100
1200
|
host: { '(blur)': 'onBlur()' }
|
|
1101
1201
|
}]
|
|
1102
1202
|
}] });
|
|
@@ -1107,5 +1207,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
|
|
|
1107
1207
|
* Generated bundle index. Do not edit.
|
|
1108
1208
|
*/
|
|
1109
1209
|
|
|
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 };
|
|
1210
|
+
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
1211
|
//# sourceMappingURL=mediusinc-mng-commons-form.mjs.map
|