@mediusinc/mng-commons 6.2.0-rc.0 → 7.0.0-rc.0
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/index.d.ts +1743 -84
- package/fesm2022/mediusinc-mng-commons-core.mjs +104 -87
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +97 -97
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model-class.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api-class.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-Dvenjj9n.mjs +30 -0
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-Dvenjj9n.mjs.map +1 -0
- package/fesm2022/{mediusinc-mng-commons-table-mediusinc-mng-commons-table-8TdW6NCC.mjs → mediusinc-mng-commons-table-mediusinc-mng-commons-table-DFcdSUCN.mjs} +183 -186
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-DFcdSUCN.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +3 -3
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +305 -289
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/filter/index.d.ts +398 -5
- package/form/api/index.d.ts +134 -7
- package/form/index.d.ts +301 -6
- package/index.d.ts +11 -1
- package/model/class/index.d.ts +25 -4
- package/model/index.d.ts +71 -5
- package/package.json +10 -10
- package/table/api/class/index.d.ts +77 -5
- package/table/api/index.d.ts +1161 -14
- package/table/index.d.ts +545 -17
- package/tableview/api/class/index.d.ts +141 -10
- package/tableview/api/index.d.ts +2542 -63
- package/tableview/index.d.ts +1274 -54
- package/version-info.json +5 -5
- package/core/action/action-data.model.d.ts +0 -3
- package/core/action/action-parameters.model.d.ts +0 -44
- package/core/components/notification/notification-wrapper.component.d.ts +0 -14
- package/core/data-list/data-list-params-helpers.d.ts +0 -93
- package/core/data-list/data-list.model.d.ts +0 -28
- package/core/data-list/filter-match.model.d.ts +0 -36
- package/core/data-list/filter-metadata.model.d.ts +0 -20
- package/core/data-providers/base.data-provider.d.ts +0 -17
- package/core/data-providers/lookup.data-provider.d.ts +0 -10
- package/core/descriptors/action.descriptor.d.ts +0 -12
- package/core/descriptors/column.descriptor.d.ts +0 -3
- package/core/descriptors/editor.descriptor.d.ts +0 -11
- package/core/descriptors/enum.descriptor.d.ts +0 -6
- package/core/descriptors/filter.descriptor.d.ts +0 -3
- package/core/descriptors/lookup.descriptor.d.ts +0 -12
- package/core/descriptors/model.descriptor.d.ts +0 -5
- package/core/descriptors/table.descriptor.d.ts +0 -11
- package/core/descriptors/tableview.descriptor.d.ts +0 -11
- package/core/directives/component.directive.d.ts +0 -18
- package/core/directives/rerender.directive.d.ts +0 -9
- package/core/directives/template.directive.d.ts +0 -8
- package/core/enum/enum-helpers.d.ts +0 -54
- package/core/enum/enum.model.d.ts +0 -8
- package/core/error/error-handler.d.ts +0 -6
- package/core/error/error-helpers.d.ts +0 -136
- package/core/error/error.model.d.ts +0 -53
- package/core/helpers/coercion.d.ts +0 -10
- package/core/helpers/date.d.ts +0 -14
- package/core/helpers/notification.d.ts +0 -18
- package/core/helpers/number.d.ts +0 -5
- package/core/helpers/object.d.ts +0 -27
- package/core/helpers/route.d.ts +0 -34
- package/core/helpers/string.d.ts +0 -7
- package/core/helpers/templates.d.ts +0 -3
- package/core/helpers/type-helpers.d.ts +0 -37
- package/core/i18n/i18n-common.d.ts +0 -6
- package/core/i18n/i18n-error.d.ts +0 -3
- package/core/i18n/i18n-type.d.ts +0 -11
- package/core/log/log-publisher-console.service.d.ts +0 -4
- package/core/log/log.model.d.ts +0 -40
- package/core/log/logger.service.d.ts +0 -33
- package/core/models/class-attribute.model.d.ts +0 -6
- package/core/models/class-service.model.d.ts +0 -7
- package/core/models/getter.model.d.ts +0 -2
- package/core/models/i18n.model.d.ts +0 -1
- package/core/models/menu.model.d.ts +0 -42
- package/core/models/user.model.d.ts +0 -8
- package/core/models/version.model.d.ts +0 -31
- package/core/pipes/boolean.pipe.d.ts +0 -7
- package/core/pipes/class-map.pipe.d.ts +0 -7
- package/core/pipes/enum.pipe.d.ts +0 -8
- package/core/pipes/enumerate-async.pipe.d.ts +0 -9
- package/core/pipes/enumerate.pipe.d.ts +0 -16
- package/core/pipes/getter.pipe.d.ts +0 -8
- package/core/pipes/i18n-property.pipe.d.ts +0 -8
- package/core/pipes/json-path.pipe.d.ts +0 -13
- package/core/pipes/parametrize.pipe.d.ts +0 -16
- package/core/pipes/template.pipe.d.ts +0 -8
- package/core/provide.d.ts +0 -13
- package/core/reactivity/effect.d.ts +0 -16
- package/core/reflect/type-enum-decorator.d.ts +0 -2
- package/core/reflect/type-enum-metadata.d.ts +0 -32
- package/core/registry/registry.model.d.ts +0 -8
- package/core/registry/type-registry.d.ts +0 -27
- package/core/router/route-builder.d.ts +0 -187
- package/core/router/router.model.d.ts +0 -13
- package/core/router/routes-builder.d.ts +0 -33
- package/core/rxjs/map-data-list-result-operator.d.ts +0 -9
- package/core/security/permission-helpers.d.ts +0 -3
- package/core/security/permission.guard.d.ts +0 -2
- package/core/security/permission.service.d.ts +0 -25
- package/core/security/permissions.model.d.ts +0 -82
- package/core/services/commons-configuration.service.d.ts +0 -81
- package/core/services/commons-init.service.d.ts +0 -30
- package/core/services/commons-router.service.d.ts +0 -37
- package/core/services/commons-storage.service.d.ts +0 -12
- package/core/services/commons.service.d.ts +0 -47
- package/core/services/providers/commons-init.provider.d.ts +0 -4
- package/core/services/tokens/browser-storage.token.d.ts +0 -2
- package/core/services/tokens/commons-init.token.d.ts +0 -3
- package/core/services/tokens/log-publisher.token.d.ts +0 -3
- package/core/services/tokens/module-config.token.d.ts +0 -28
- package/core/styles/style-constants.d.ts +0 -11
- package/core/styles/style.model.d.ts +0 -18
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-CCyGSxaD.mjs +0 -30
- package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-CCyGSxaD.mjs.map +0 -1
- package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-8TdW6NCC.mjs.map +0 -1
- package/filter/descriptors/filter-generic.descriptor.d.ts +0 -14
- package/filter/descriptors/filter-lookup.descriptor.d.ts +0 -97
- package/filter/descriptors/filter.descriptor.d.ts +0 -264
- package/filter/models/filter-generic-property.model.d.ts +0 -7
- package/filter/models/filter.model.d.ts +0 -16
- package/form/api/data-providers/lookup-data-provider.factory.d.ts +0 -19
- package/form/api/data-providers/lookup.data-provider.d.ts +0 -7
- package/form/api/descriptors/action-button.descriptor.d.ts +0 -23
- package/form/api/descriptors/button-style.builder.d.ts +0 -54
- package/form/api/models/button.model.d.ts +0 -19
- package/form/api/models/empty-value.model.d.ts +0 -7
- package/form/api/models/trim.model.d.ts +0 -1
- package/form/components/autocomplete/autocomplete.component.d.ts +0 -99
- package/form/components/date-range/date-range.component.d.ts +0 -37
- package/form/components/dropdown/dropdown.component.d.ts +0 -89
- package/form/components/number-range/number-range.component.d.ts +0 -35
- package/form/directives/input-empty-value.directive.d.ts +0 -40
- package/form/directives/input-trim.directive.d.ts +0 -9
- package/model/class/data-providers/base-from-class-data-provider.factory.d.ts +0 -3
- package/model/class/descriptors/model-class.descriptor.d.ts +0 -12
- package/model/class/descriptors/type-class.descriptor.d.ts +0 -3
- package/model/class/helpers/model.d.ts +0 -4
- package/model/data-providers/base-from-type-data-provider.factory.d.ts +0 -15
- package/model/descriptors/enum.descriptor.d.ts +0 -13
- package/model/descriptors/model.descriptor.d.ts +0 -25
- package/model/descriptors/type.descriptor.d.ts +0 -3
- package/model/helpers/i18n.d.ts +0 -13
- package/provide.d.ts +0 -7
- package/table/api/class/class-table-attribute-converter.d.ts +0 -15
- package/table/api/class/class-table-attribute.model.d.ts +0 -8
- package/table/api/class/class-table-data-provider.factory.d.ts +0 -4
- package/table/api/class/class-table-descriptor-helpers.d.ts +0 -42
- package/table/api/class/class-table-descriptor.factory.d.ts +0 -11
- package/table/api/data-providers/table-data-provider.factory.d.ts +0 -19
- package/table/api/data-providers/table.data-provider.d.ts +0 -27
- package/table/api/descriptors/column.descriptor.d.ts +0 -269
- package/table/api/descriptors/sort.descriptor.d.ts +0 -39
- package/table/api/descriptors/table-descriptor.factory.d.ts +0 -12
- package/table/api/descriptors/table.descriptor.d.ts +0 -672
- package/table/api/helpers/column-converter.d.ts +0 -7
- package/table/api/helpers/table-data-provider-descriptor-convert.d.ts +0 -20
- package/table/api/models/column-value.model.d.ts +0 -7
- package/table/api/models/column.model.d.ts +0 -18
- package/table/api/models/row-expandable-component.model.d.ts +0 -4
- package/table/api/models/table-columns.model.d.ts +0 -42
- package/table/api/models/table-event.model.d.ts +0 -18
- package/table/api/models/table.model.d.ts +0 -22
- package/table/components/column-filter/column-filter.component.d.ts +0 -81
- package/table/components/column-toggle/column-toggle.component.d.ts +0 -12
- package/table/components/column-value/column-value.component.d.ts +0 -33
- package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +0 -20
- package/table/components/filter/filter-form/filter-form.component.d.ts +0 -56
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +0 -54
- package/table/components/table/table.component.d.ts +0 -83
- package/table/helpers/filters.d.ts +0 -37
- package/table/helpers/notification.d.ts +0 -13
- package/table/helpers/table-layout-prefs.d.ts +0 -7
- package/table/helpers/table.d.ts +0 -6
- package/table/models/column-preferences.model.d.ts +0 -12
- package/table/models/filter.model.d.ts +0 -36
- package/table/pipes/filter-value.pipe.d.ts +0 -19
- package/table/pipes/locale-default-row-class.pipe.d.ts +0 -10
- package/table/pipes/table-column-filter-class.pipe.d.ts +0 -8
- package/table/provide.d.ts +0 -15
- package/table/services/table-data.service.d.ts +0 -37
- package/table/services/table-feature-config.token.d.ts +0 -7
- package/table/services/table-metadata.service.d.ts +0 -31
- package/table/services/table-preferences.service.d.ts +0 -25
- package/tableview/action/components/action/action.component.d.ts +0 -63
- package/tableview/action/components/editor/action-editor.component.d.ts +0 -32
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +0 -79
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +0 -19
- package/tableview/action/components/route/action-route.component.d.ts +0 -26
- package/tableview/action/components/table/action-table.component.d.ts +0 -50
- package/tableview/action/guards/unsaved-changes.guard.d.ts +0 -3
- package/tableview/action/helpers/action-execution.d.ts +0 -7
- package/tableview/action/helpers/i18n.d.ts +0 -47
- package/tableview/action/helpers/inject.d.ts +0 -39
- package/tableview/action/helpers/notification.d.ts +0 -40
- package/tableview/action/helpers/styles.d.ts +0 -5
- package/tableview/action/models/action-editor-dialog-data.model.d.ts +0 -11
- package/tableview/action/models/can-component-deactivate.model.d.ts +0 -4
- package/tableview/action/models/execution/action-context.model.d.ts +0 -43
- package/tableview/action/models/execution/action-instance.model.d.ts +0 -56
- package/tableview/action/services/action-error-mapper.service.d.ts +0 -18
- package/tableview/action/services/action-executor.service.d.ts +0 -174
- package/tableview/action/services/component-action-executor.service.d.ts +0 -9
- package/tableview/action/services/data-provider-executor.service.d.ts +0 -23
- package/tableview/action/services/navigation.service.d.ts +0 -15
- package/tableview/action/services/providers/provide-action-executor.d.ts +0 -2
- package/tableview/action/services/providers/provide-view-container.d.ts +0 -2
- package/tableview/action/services/root-action-executor.service.d.ts +0 -9
- package/tableview/action/services/tokens/action-editor.token.d.ts +0 -2
- package/tableview/action/services/view-container.service.d.ts +0 -25
- package/tableview/api/action/descriptors/action-descriptor.factory.d.ts +0 -25
- package/tableview/api/action/descriptors/action-editor-descriptor.factory.d.ts +0 -24
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +0 -105
- package/tableview/api/action/descriptors/action-link-descriptor.factory.d.ts +0 -23
- package/tableview/api/action/descriptors/action-link.descriptor.d.ts +0 -27
- package/tableview/api/action/descriptors/action.descriptor.d.ts +0 -118
- package/tableview/api/action/descriptors/editor-action-descriptor.factory.d.ts +0 -21
- package/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.d.ts +0 -21
- package/tableview/api/action/descriptors/table-action-descriptor.factory.d.ts +0 -36
- package/tableview/api/action/descriptors/table-action-editor-descriptor.factory.d.ts +0 -40
- package/tableview/api/action/helpers/data-provider-executors.d.ts +0 -23
- package/tableview/api/action/models/action-component.model.d.ts +0 -12
- package/tableview/api/action/models/action-confirmation.model.d.ts +0 -16
- package/tableview/api/action/models/action-descriptor.types.d.ts +0 -10
- package/tableview/api/action/models/action-editor.model.d.ts +0 -4
- package/tableview/api/action/models/action-error.model.d.ts +0 -14
- package/tableview/api/action/models/action.type.d.ts +0 -21
- package/tableview/api/action/models/execution/action-context-validation.model.d.ts +0 -11
- package/tableview/api/action/models/execution/action-context.model.d.ts +0 -25
- package/tableview/api/action/models/execution/action-execution-error.model.d.ts +0 -4
- package/tableview/api/action/models/execution/action-instance-state.model.d.ts +0 -30
- package/tableview/api/action/models/execution/action-instance.model.d.ts +0 -32
- package/tableview/api/action/models/execution/view-container.model.d.ts +0 -22
- package/tableview/api/action/models/tableview-action-default-categories.model.d.ts +0 -10
- package/tableview/api/action/services/data-provider-executor.service.d.ts +0 -39
- package/tableview/api/action/services/tokens/data-language-dropdown.token.d.ts +0 -2
- package/tableview/api/class/editor/class-editor-attribute-converter.d.ts +0 -21
- package/tableview/api/class/editor/class-editor-attribute.model.d.ts +0 -7
- package/tableview/api/class/editor/class-editor-data-provider.factory.d.ts +0 -4
- package/tableview/api/class/editor/class-editor-descriptor-helpers.d.ts +0 -40
- package/tableview/api/class/editor/class-editor-descriptor.factory.d.ts +0 -11
- package/tableview/api/class/tableview/class-tableview-attribute-converter.d.ts +0 -8
- package/tableview/api/class/tableview/class-tableview-attribute.model.d.ts +0 -3
- package/tableview/api/class/tableview/class-tableview-data-provider.factory.d.ts +0 -4
- package/tableview/api/class/tableview/class-tableview-descriptor-helpers.d.ts +0 -41
- package/tableview/api/class/tableview/class-tableview-descriptor.factory.d.ts +0 -12
- package/tableview/api/editor/data-providers/editor-data-provider.factory.d.ts +0 -19
- package/tableview/api/editor/data-providers/editor.data-provider.d.ts +0 -119
- package/tableview/api/editor/descriptors/editor-descriptor.factory.d.ts +0 -11
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +0 -254
- package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +0 -21
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +0 -147
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +0 -58
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +0 -80
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +0 -56
- package/tableview/api/editor/descriptors/field-validation.descriptor.d.ts +0 -16
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +0 -239
- package/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.d.ts +0 -25
- package/tableview/api/editor/models/editor-fields.model.d.ts +0 -42
- package/tableview/api/editor/models/editor.model.d.ts +0 -7
- package/tableview/api/editor/models/field-action-context.model.d.ts +0 -26
- package/tableview/api/editor/models/field-image-preview.model.d.ts +0 -4
- package/tableview/api/editor/models/field-validation.model.d.ts +0 -26
- package/tableview/api/editor/models/field.model.d.ts +0 -56
- package/tableview/api/editor/models/form-editor.event.d.ts +0 -74
- package/tableview/api/editor/models/form-editor.interface.d.ts +0 -53
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +0 -30
- package/tableview/api/editor/models/formly-field.model.d.ts +0 -42
- package/tableview/api/editor/models/formly-options.model.d.ts +0 -15
- package/tableview/api/editor/models/radio.model.d.ts +0 -6
- package/tableview/api/tableview/data-providers/tableview-data-provider.factory.d.ts +0 -24
- package/tableview/api/tableview/data-providers/tableview.data-provider.d.ts +0 -33
- package/tableview/api/tableview/descriptors/tableview-descriptor.factory.d.ts +0 -23
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +0 -153
- package/tableview/api/tableview/helpers/files-export.d.ts +0 -4
- package/tableview/api/tableview/helpers/tableview-create.d.ts +0 -29
- package/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.d.ts +0 -20
- package/tableview/api/tableview/helpers/tableview-default-actions.d.ts +0 -93
- package/tableview/api/tableview/helpers/tableview-input-builder.d.ts +0 -192
- package/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.d.ts +0 -9
- package/tableview/api/tableview/models/tableview-descriptor-helper.type.d.ts +0 -2
- package/tableview/api/tableview/models/tableview-input.model.d.ts +0 -8
- package/tableview/api/tableview/models/tableview-route.model.d.ts +0 -20
- package/tableview/editor/components/editor/auto-save-status/auto-save-status.component.d.ts +0 -10
- package/tableview/editor/components/editor/form-editor.component.d.ts +0 -117
- package/tableview/editor/components/formly/constants.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.d.ts +0 -15
- package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +0 -11
- package/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.d.ts +0 -10
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +0 -24
- package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +0 -10
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +0 -12
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +0 -33
- package/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.d.ts +0 -10
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +0 -36
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +0 -22
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +0 -37
- package/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +0 -10
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +0 -11
- package/tableview/editor/components/formly/fields/formly-group-type.abstract.component.d.ts +0 -7
- package/tableview/editor/components/formly/fields/formly-type.abstract.component.d.ts +0 -20
- package/tableview/editor/components/formly/pipes/formly-field-label.pipe.d.ts +0 -8
- package/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.d.ts +0 -18
- package/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +0 -16
- package/tableview/editor/helpers/editor-autosave.d.ts +0 -17
- package/tableview/editor/helpers/editor-field.d.ts +0 -2
- package/tableview/editor/helpers/editor-formly.d.ts +0 -11
- package/tableview/editor/helpers/editor-validators.d.ts +0 -7
- package/tableview/editor/helpers/field-create.d.ts +0 -9
- package/tableview/editor/helpers/formly-config.d.ts +0 -18
- package/tableview/editor/helpers/notification.d.ts +0 -4
- package/tableview/editor/models/editor-auto-save-preview.model.d.ts +0 -10
- package/tableview/editor/models/formly-config.model.d.ts +0 -14
- package/tableview/editor/models/formly.model.d.ts +0 -23
- package/tableview/editor/services/form-editor.service.d.ts +0 -39
- package/tableview/editor/services/formly-config.provider.d.ts +0 -5
- package/tableview/provide.d.ts +0 -15
- package/tableview/tableview/components/route/tableview-route.component.d.ts +0 -7
- package/tableview/tableview/components/tableview/tableview.component.d.ts +0 -29
- package/tableview/tableview/router/tableview-route-builder.d.ts +0 -43
- package/tableview/tableview/services/tableview-feature-config.token.d.ts +0 -18
package/core/index.d.ts
CHANGED
|
@@ -1,84 +1,1743 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
import * as _angular_router from '@angular/router';
|
|
2
|
+
import { ActivatedRoute, Params, ActivatedRouteSnapshot, RouterStateSnapshot, QueryParamsHandling, Data, Route, Routes, CanActivateFn, CanDeactivateFn, ResolveFn, LoadChildren, DefaultExport } from '@angular/router';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
import { Observable, OperatorFunction } from 'rxjs';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Type, InjectionToken, Injector, ComponentRef, TemplateRef, ErrorHandler, WritableSignal, Signal, PipeTransform, EffectRef, Provider, EnvironmentProviders } from '@angular/core';
|
|
7
|
+
import { ToastMessageOptions, FilterMetadata, MessageService, MenuItem } from 'primeng/api';
|
|
8
|
+
import { TableLazyLoadEvent } from 'primeng/table';
|
|
9
|
+
import { HttpErrorResponse, HttpClient, HttpBackend } from '@angular/common/http';
|
|
10
|
+
import * as _mediusinc_mng_commons_core from '@mediusinc/mng-commons/core';
|
|
11
|
+
import { TranslateService, Translation, StrictTranslation } from '@ngx-translate/core';
|
|
12
|
+
|
|
13
|
+
type ActionData = {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type FilterMatchModeType = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'in' | 'notIn' | 'startsWith' | 'endsWith' | 'lessThan' | 'lessThanOrEqualTo' | 'greaterThan' | 'greaterThanOrEqualTo' | 'between' | 'exists' | 'doesNotExist';
|
|
18
|
+
type FilterMatchModeExtendedType = FilterMatchModeType | string;
|
|
19
|
+
declare class FilterMatchMode {
|
|
20
|
+
static Equals: FilterMatchModeType;
|
|
21
|
+
static EqualsAbbr: string;
|
|
22
|
+
static NotEquals: FilterMatchModeType;
|
|
23
|
+
static NotEqualsAbbr: string;
|
|
24
|
+
static Contains: FilterMatchModeType;
|
|
25
|
+
static ContainsAbbr: string;
|
|
26
|
+
static NotContains: FilterMatchModeType;
|
|
27
|
+
static NotContainsAbbr: string;
|
|
28
|
+
static In: FilterMatchModeType;
|
|
29
|
+
static InAbbr: string;
|
|
30
|
+
static NotIn: FilterMatchModeType;
|
|
31
|
+
static NotInAbbr: string;
|
|
32
|
+
static StartsWith: FilterMatchModeType;
|
|
33
|
+
static StartsWithAbbr: string;
|
|
34
|
+
static EndsWith: FilterMatchModeType;
|
|
35
|
+
static EndsWithAbbr: string;
|
|
36
|
+
static LessThan: FilterMatchModeType;
|
|
37
|
+
static LessThanAbbr: string;
|
|
38
|
+
static LessThanOrEqualTo: FilterMatchModeType;
|
|
39
|
+
static LessThanOrEqualToAbbr: string;
|
|
40
|
+
static GreaterThan: FilterMatchModeType;
|
|
41
|
+
static GreaterThanAbbr: string;
|
|
42
|
+
static GreaterThanOrEqualTo: FilterMatchModeType;
|
|
43
|
+
static GreaterThanOrEqualToAbbr: string;
|
|
44
|
+
static Between: FilterMatchModeType;
|
|
45
|
+
static BetweenAbbr: string;
|
|
46
|
+
static Exists: FilterMatchModeType;
|
|
47
|
+
static ExistsAbbr: string;
|
|
48
|
+
static DoesNotExist: FilterMatchModeType;
|
|
49
|
+
static DoesNotExistAbbr: string;
|
|
50
|
+
static getAbbreviation(mode: string): string | null;
|
|
51
|
+
static fromAbbreviation(abbr: string): string | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface DataListParams<Sorts = string, Filters extends keyof any = string> {
|
|
55
|
+
offset?: number;
|
|
56
|
+
limit?: number;
|
|
57
|
+
sort?: DataListSort<Sorts>[];
|
|
58
|
+
search?: string;
|
|
59
|
+
searchCaseSensitive?: boolean;
|
|
60
|
+
filters?: Partial<DataListFiltersType<Filters>>;
|
|
61
|
+
}
|
|
62
|
+
interface DataListSort<Property = string> {
|
|
63
|
+
property: Property;
|
|
64
|
+
ascending?: boolean;
|
|
65
|
+
}
|
|
66
|
+
type DataListFilterBaseValueType = string | number | boolean | Date | undefined | null;
|
|
67
|
+
type DataListFilterValueType = DataListFilterBaseValueType | DataListFilterBaseValueType[] | undefined | null;
|
|
68
|
+
type DataListFilterFromUrlValueType = string | string[] | undefined | null;
|
|
69
|
+
type DataListFiltersType<Filters extends keyof any = string> = {
|
|
70
|
+
[Prop in Filters]: DataListFilter;
|
|
71
|
+
};
|
|
72
|
+
interface DataListFilter<Value = DataListFilterValueType> {
|
|
73
|
+
value?: Value;
|
|
74
|
+
matchMode?: FilterMatchModeExtendedType;
|
|
75
|
+
caseSensitive?: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface DataListResult<Item = any> {
|
|
78
|
+
data: Item[];
|
|
79
|
+
totalCount?: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
type KeyOfType = string | number | symbol;
|
|
83
|
+
type Nullable<T> = T | null | undefined;
|
|
84
|
+
type Undefined<T> = T | undefined;
|
|
85
|
+
type ObjectOptPropType<OT, P extends keyof OT, PT> = P extends keyof OT ? (OT[P] extends Nullable<PT> ? P : never) : never;
|
|
86
|
+
type KeyofAndOfType<Type, PropertyType> = {
|
|
87
|
+
[K in keyof Type]: NonNullable<Type[K]> extends NonNullable<PropertyType> ? K : never;
|
|
88
|
+
}[keyof Type];
|
|
89
|
+
type ArrayItemType<T> = NonNullable<T> extends Array<infer U> ? U : T;
|
|
90
|
+
type SingleOrArrayType<T> = T | Array<T>;
|
|
91
|
+
type IdType = number | string;
|
|
92
|
+
type PrimitiveType = string | boolean | number;
|
|
93
|
+
type PropertyType = PrimitiveType | Date | EnumType;
|
|
94
|
+
type ItemOrObservable<T> = T | Observable<T>;
|
|
95
|
+
type EnumConstantType = string | number;
|
|
96
|
+
interface EnumType<V = EnumConstantType> {
|
|
97
|
+
[key: string]: V;
|
|
98
|
+
}
|
|
99
|
+
type ClassFunctionKeysType<Clazz> = {
|
|
100
|
+
[K in keyof Clazz]: Clazz[K] extends (...args: any[]) => any ? K : never;
|
|
101
|
+
}[keyof Clazz];
|
|
102
|
+
type ClassFunctionKeysWithReturnType<Clazz, Return> = {
|
|
103
|
+
[K in keyof Clazz]: Clazz[K] extends () => Return ? K : never;
|
|
104
|
+
}[keyof Clazz];
|
|
105
|
+
type ClassFunctionKeysWithAnyArgsAndReturnType<Clazz, Return> = {
|
|
106
|
+
[K in keyof Clazz]: Clazz[K] extends (...args: any[]) => Return ? K : never;
|
|
107
|
+
}[keyof Clazz];
|
|
108
|
+
type ClassFunctionKeysWithParamAndReturnType<Clazz, Param, Return> = {
|
|
109
|
+
[K in keyof Clazz]: Clazz[K] extends (param: Param, ...args: any[]) => Return ? K : never;
|
|
110
|
+
}[keyof Clazz];
|
|
111
|
+
type ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, FnKey extends keyof Service, Param1Target = unknown> = Service[FnKey] extends (...args: infer Params) => any ? Params[0] extends object ? {
|
|
112
|
+
[Key in keyof Params[0]]: Param1Target extends Params[0][Key] ? Key : never;
|
|
113
|
+
}[keyof Params[0]] : never : never;
|
|
114
|
+
type CommonKeyof3<T, U, V> = keyof T & keyof U & keyof V;
|
|
115
|
+
type CommonPropsObjType3<T, U, V> = {
|
|
116
|
+
[K in CommonKeyof3<T, U, V>]: T[K];
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
interface ActionParameters<Item, TableItem = Item, FormItem = Item, SubmitResultItem = Item> {
|
|
120
|
+
/**
|
|
121
|
+
* Identificator of an item.
|
|
122
|
+
*/
|
|
123
|
+
itemId?: IdType;
|
|
124
|
+
/**
|
|
125
|
+
* Item value.
|
|
126
|
+
*/
|
|
127
|
+
item?: Item;
|
|
128
|
+
/**
|
|
129
|
+
* Additional action data.
|
|
130
|
+
*/
|
|
131
|
+
actionData?: ActionData;
|
|
132
|
+
/**
|
|
133
|
+
* Data list params when action is activated from table.
|
|
134
|
+
*/
|
|
135
|
+
dataListParams?: DataListParams<any, any>;
|
|
136
|
+
/**
|
|
137
|
+
* Represents the component where which activates the action.
|
|
138
|
+
*/
|
|
139
|
+
sourceComponent?: any;
|
|
140
|
+
/**
|
|
141
|
+
* Represents the component where the action is hosted or placed (activation button).
|
|
142
|
+
*/
|
|
143
|
+
hostComponent?: unknown;
|
|
144
|
+
route?: ActivatedRoute;
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated Selected items should accessed using `getActionParentTable`.
|
|
147
|
+
*/
|
|
148
|
+
selectedItems?: TableItem[];
|
|
149
|
+
locale?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Used on fetch fn to provide the form item of previous submit.
|
|
152
|
+
*/
|
|
153
|
+
formItem?: FormItem | null;
|
|
154
|
+
/**
|
|
155
|
+
* Used on fetch fn to provide the result of previous submit (return of submit fn).
|
|
156
|
+
*/
|
|
157
|
+
submitResult?: SubmitResultItem | null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class NotificationWrapperComponent {
|
|
161
|
+
readonly notificationCutoff = 70;
|
|
162
|
+
isDialogNotificationVisible: i0.Signal<boolean>;
|
|
163
|
+
dialogNotification: i0.WritableSignal<ToastMessageOptions | null>;
|
|
164
|
+
dialogNotificationIconClass: i0.Signal<string>;
|
|
165
|
+
getMessageIcon(message: Nullable<ToastMessageOptions>): string;
|
|
166
|
+
onShowNotificationInDialog(message: ToastMessageOptions): void;
|
|
167
|
+
onDialogNotificationVisibilityChange(visible: boolean): void;
|
|
168
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationWrapperComponent, never>;
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationWrapperComponent, "mng-notification-wrapper", never, {}, {}, never, ["*"], true, never>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Converts a TableLazyLoadEvent to DataListParams.
|
|
174
|
+
*
|
|
175
|
+
* @param {TableLazyLoadEvent} event - The event containing the data to convert.
|
|
176
|
+
* @return {DataListParams} - The converted DataListParams object.
|
|
177
|
+
*/
|
|
178
|
+
declare function fromTableLoadToDataListParams(event: TableLazyLoadEvent): DataListParams;
|
|
179
|
+
/**
|
|
180
|
+
* Converts the given parameters to URL query parameters.
|
|
181
|
+
* Sorts are formatted in Medius data API sort query language: `asc:prop1,desc:prop2`, ...
|
|
182
|
+
* Filter keys are "flattened" in the new object, values are formatted in Medius data API filter query language: `cs:eq:asd`, `in:asd,qwe`, `ex`, ...
|
|
183
|
+
*
|
|
184
|
+
* @param {DataListParams} params - The parameters to convert.
|
|
185
|
+
* @param {DataListParams|null} defaults - The default parameters used if no matching property in params is available. Defaults to { limit: 25, offset: 0 } if not provided.
|
|
186
|
+
* @param opts - Options in converting to url query:
|
|
187
|
+
* - prependFilterName Prepends filter key with provided string
|
|
188
|
+
* @returns {Params} - The URL query parameters object.
|
|
189
|
+
*/
|
|
190
|
+
declare function dataListParamsToUrlQuery(params: DataListParams<any, any>, defaults?: DataListParams<any, any> | null, opts?: {
|
|
191
|
+
prependFilterName?: string;
|
|
192
|
+
skipPresetDefaultsLimit?: boolean;
|
|
193
|
+
}): Params;
|
|
194
|
+
/**
|
|
195
|
+
* Merges the provided parameters with default values and returns the merged object.
|
|
196
|
+
*
|
|
197
|
+
* @param {DataListParams} params - The parameters to merge with defaults.
|
|
198
|
+
* @param {DataListParams} defaults - The default values to merge with params (optional, default is { limit: 25, offset: 0 }).
|
|
199
|
+
* @returns {DataListParams} - The merged parameters object.
|
|
200
|
+
*/
|
|
201
|
+
declare function mergeDataListParamsWithDefaults<Sorts = any, Filters extends keyof any = any>(params: DataListParams<Sorts, Filters>, defaults?: DataListParams<Sorts, Filters>): DataListParams<Sorts, Filters>;
|
|
202
|
+
/**
|
|
203
|
+
* Converts an object of parameters to a URL query string for sorting.
|
|
204
|
+
* Sorts are formatted in Medius data API sort query language: `asc:prop1,desc:prop2`, ...
|
|
205
|
+
*
|
|
206
|
+
* @param {DataListParams} params - An optional object containing sort parameters.
|
|
207
|
+
* @returns A string representing the URL query or undefined if no sort parameters are provided.
|
|
208
|
+
*/
|
|
209
|
+
declare function dataListParamsSortToUrlQuery(params?: DataListParams<any, any>): string | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* Converts a specific filter parameter (by key) from DataListParams object to a URL query string.
|
|
212
|
+
* Filter keys are "flattened" in the new object, values are formatted in Medius data API filter query language: `cs:eq:asd`, `in:asd,qwe`, `ex`, ...
|
|
213
|
+
*
|
|
214
|
+
* @param {DataListParams<any, Filters> | undefined} params - The DataListParams object containing the filters.
|
|
215
|
+
* @param {Filters} key - The key of the filter to convert.
|
|
216
|
+
* @param {boolean} [allowNull=false] - Indicates whether to allow null values in the query string.
|
|
217
|
+
* @return {string | undefined} - The URL query string representing the specified filter, or undefined if the filter is not found.
|
|
218
|
+
*/
|
|
219
|
+
declare function dataListParamsFiltersToUrlQuery<Filters extends keyof any = string>(params: DataListParams<any, Filters> | undefined, key: Filters, allowNull?: boolean): string | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* Converts a filter to a URL query string.
|
|
222
|
+
* Filter keys are "flattened" in the new object, values are formatted in Medius data API filter query language: `cs:eq:asd`, `in:asd,qwe`, `ex`, ...
|
|
223
|
+
*
|
|
224
|
+
* @param {DataListFilter} paramFilter - The filter object to be converted.
|
|
225
|
+
* @param {boolean} [allowNull=false] - Indicates whether to allow null values in the filter.
|
|
226
|
+
* @returns {string|undefined} - The filter converted to a URL query string, or undefined if no filter is provided or the filter has empty or invalid values.
|
|
227
|
+
* @throws {CommonsInternalError} - If the filter has invalid values.
|
|
228
|
+
*/
|
|
229
|
+
declare function dataListParamsFilterToUrlQuery(paramFilter?: DataListFilter, allowNull?: boolean): string | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* Converts URL query parameters to a DataListParams object.
|
|
232
|
+
* Sorts are formatted from Medius data API sort query language: `asc:prop1,desc:prop2`, ...
|
|
233
|
+
* Filter keys are all keys in Params object that are not matched elsewhere, values are formatted from Medius data API filter query language: `cs:eq:asd`, `in:asd,qwe`, `ex`, ...
|
|
234
|
+
*
|
|
235
|
+
* @param {Params} urlParams - The URL query parameters.
|
|
236
|
+
* @param opts Additional options for conversion:
|
|
237
|
+
* - searchAsGlobal - The URL query parameters.
|
|
238
|
+
* - prependFilterName - Filter names are prepended with provided string.
|
|
239
|
+
* @return {DataListParams} - The converted DataListParams object.
|
|
240
|
+
*/
|
|
241
|
+
declare function fromUrlQueryToDataListParams(urlParams: Params, opts?: {
|
|
242
|
+
searchAsGlobal?: boolean;
|
|
243
|
+
prependFilterName?: string;
|
|
244
|
+
}): DataListParams;
|
|
245
|
+
/**
|
|
246
|
+
* Makes a copy of the given DataListParams object.
|
|
247
|
+
*
|
|
248
|
+
* @param {DataListParams<Sorts, Filters>} params - The DataListParams object to be copied.
|
|
249
|
+
* @returns {DataListParams<Sorts, Filters>} - Returns a new copy of the DataListParams object.
|
|
250
|
+
*/
|
|
251
|
+
declare function copyDataListParams<Sorts = string, Filters extends keyof any = string>(params: DataListParams<Sorts, Filters>): DataListParams<Sorts, Filters>;
|
|
252
|
+
/**
|
|
253
|
+
* Converts a value to a URL query param string representation.
|
|
254
|
+
*
|
|
255
|
+
* @param {unknown} value - The value to be converted.
|
|
256
|
+
* @param {boolean} [allowNull=false] - Indicates whether null values are allowed.
|
|
257
|
+
* @returns {string} The URL parameter representation of the value.
|
|
258
|
+
* @throws {CommonsInternalError} If an undefined value is passed without allowNull set to true.
|
|
259
|
+
* @throws {CommonsInternalError} If the value is an object (excluding Date).
|
|
260
|
+
*/
|
|
261
|
+
declare function dataListParamsFilterValueToUrlString(value: unknown, allowNull?: boolean): string;
|
|
262
|
+
|
|
263
|
+
interface CommonsFilterMetadata extends Omit<FilterMetadata, 'matchMode'> {
|
|
264
|
+
/**
|
|
265
|
+
* The value used for display.
|
|
266
|
+
*/
|
|
267
|
+
displayValue?: any;
|
|
268
|
+
/**
|
|
269
|
+
* The match mode for display.
|
|
270
|
+
*/
|
|
271
|
+
displayMatchMode?: FilterMatchModeExtendedType;
|
|
272
|
+
/**
|
|
273
|
+
* Overridden PrimeNg FilterMetadata to have more specific type.
|
|
274
|
+
*/
|
|
275
|
+
matchMode?: FilterMatchModeExtendedType;
|
|
276
|
+
/**
|
|
277
|
+
* Case sensitive filter flag.
|
|
278
|
+
*/
|
|
279
|
+
caseSensitive?: boolean;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
type ServiceClassType<S> = Type<S>;
|
|
283
|
+
type ServiceClassOptType<S> = ServiceClassType<S> | undefined;
|
|
284
|
+
interface ClassType<T> extends Function {
|
|
285
|
+
new (...args: any[]): T;
|
|
286
|
+
}
|
|
287
|
+
type ClassOptType<T> = ClassType<T> | undefined;
|
|
288
|
+
|
|
289
|
+
type IDataProvider<ModelType = any, ServiceType = any, ST = ServiceClassOptType<ServiceType>> = {
|
|
290
|
+
serviceType: ST;
|
|
291
|
+
isDataProvider: boolean;
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* A base data provider class used for handling data operations.
|
|
295
|
+
*
|
|
296
|
+
* @tparam Model - The type of data this data provider will handle.
|
|
297
|
+
* @tparam Service - The type of service used by this data provider (optional).
|
|
298
|
+
* @tparam ServiceClass - The service type for the data provider (optional).
|
|
299
|
+
*/
|
|
300
|
+
declare class DataProviderInst<Model, Service = any, ServiceClass = ServiceClassOptType<Service>> implements IDataProvider<Model, Service, ServiceClass> {
|
|
301
|
+
readonly serviceType: ServiceClass;
|
|
302
|
+
constructor(serviceType: ServiceClass);
|
|
303
|
+
get isDataProvider(): boolean;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
type LookupDataProviderLookupFnType<Model = any, Service = undefined, Sorts = keyof Model, Filters extends keyof any = keyof Model, ReturnType = ItemOrObservable<Array<Model>>> = (params: DataListParams<Sorts, Filters> | undefined, service: Service, search?: string) => ReturnType;
|
|
307
|
+
interface ILookupDataProviderLookup<Model, Service, Sorts = keyof Model, Filters extends keyof any = keyof Model> {
|
|
308
|
+
lookup: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>;
|
|
309
|
+
withLookup(fn?: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>): this;
|
|
310
|
+
}
|
|
311
|
+
type ILookupDataProvider<Model = any, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassOptType<Service>> = IDataProvider<Model, Service, ServiceClass> & ILookupDataProviderLookup<Model, Service, Sorts, Filters>;
|
|
312
|
+
|
|
313
|
+
interface IModelDescriptor<Model> {
|
|
314
|
+
i18nBaseKey: string;
|
|
315
|
+
idProperty?: string;
|
|
316
|
+
titleProperty?: string | ((item: Model) => string);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
interface IActionDescriptor<Model, Service = any> {
|
|
320
|
+
model?: IModelDescriptor<Model>;
|
|
321
|
+
actionName: string;
|
|
322
|
+
actionNameLong: string;
|
|
323
|
+
parentType?: ClassType<unknown>;
|
|
324
|
+
parentTypeName?: string;
|
|
325
|
+
parentProperty?: string;
|
|
326
|
+
dataProvider?: IDataProvider<Model, Service>;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
interface IColumnDescriptor<ColumnModel, TableModel, ColumnValue> {
|
|
330
|
+
property: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
interface IEditorDescriptor<EditorModel, ParentEditorModel = undefined> {
|
|
334
|
+
model: IModelDescriptor<EditorModel>;
|
|
335
|
+
isLocalized: boolean;
|
|
336
|
+
localizationLocaleProperty?: string;
|
|
337
|
+
localizationModel?: IModelDescriptor<any>;
|
|
338
|
+
localizationLocalizationProperty?: string;
|
|
339
|
+
localized<K extends keyof EditorModel, LocalizationModel = ArrayItemType<EditorModel[K]>>(property: K, model: IModelDescriptor<LocalizationModel>, localeProperty: keyof LocalizationModel): this;
|
|
340
|
+
localizedUnsafe<LocalizationModel>(property: string, model: IModelDescriptor<LocalizationModel>, localeProperty: string): this;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
interface IEnumDescriptor {
|
|
344
|
+
type: EnumType;
|
|
345
|
+
nameAsValue: boolean;
|
|
346
|
+
i18nBaseKey: string | null;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
interface IFilterDescriptor<FilterModel, TableModel> {
|
|
350
|
+
property: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface ILookupDescriptor<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model> {
|
|
354
|
+
optionsLabelProperty?: string;
|
|
355
|
+
optionsValueProperty?: string;
|
|
356
|
+
optionsTrackProperty?: string;
|
|
357
|
+
dataProvider: ILookupDataProvider<Model, Service, Sorts, Filters>;
|
|
358
|
+
withOptionsLabelProperty(property: keyof Model): this;
|
|
359
|
+
withOptionsLabelPropertyUnsafe(property: string): this;
|
|
360
|
+
withOptionsTrackProperty(property: keyof Model): this;
|
|
361
|
+
withOptionsTrackPropertyUnsafe(property: string): this;
|
|
362
|
+
withLookup(lookup: LookupDataProviderLookupFnType<Model, Service, Sorts, Filters>): this;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
interface ITableDescriptor<TableModel, Sorts, Filters> {
|
|
366
|
+
model: IModelDescriptor<TableModel>;
|
|
367
|
+
withDefaultSortUnsafe(property: string, ascending?: boolean, enabled?: boolean): this;
|
|
368
|
+
withSortUnsafe(property: string, isDefault: boolean, ascending?: boolean): this;
|
|
369
|
+
withDefaultSorts(...properties: Sorts[]): this;
|
|
370
|
+
withoutDefaultSorts(): this;
|
|
371
|
+
addFilterFromColumnDescriptorUnsafe<FilterModel>(column: IColumnDescriptor<FilterModel, TableModel, any>, forceSimple: boolean): IFilterDescriptor<any, TableModel>;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
interface ITableviewDescriptor<TableviewModel, SortProperty, FilterProperty, ParentEditorModel = undefined, TableModel = TableviewModel, AddModel = TableviewModel, EditModel = TableviewModel> {
|
|
375
|
+
model: IModelDescriptor<TableviewModel>;
|
|
376
|
+
table: ITableDescriptor<TableModel, SortProperty, FilterProperty>;
|
|
377
|
+
detailsEditor: IEditorDescriptor<TableviewModel, ParentEditorModel>;
|
|
378
|
+
addEditor: IEditorDescriptor<AddModel, ParentEditorModel>;
|
|
379
|
+
editEditor: IEditorDescriptor<EditModel, ParentEditorModel>;
|
|
380
|
+
copy(): ITableviewDescriptor<TableviewModel, SortProperty, FilterProperty, ParentEditorModel, TableModel, AddModel, EditModel>;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
declare class ComponentDirective<C> {
|
|
384
|
+
private readonly injector;
|
|
385
|
+
private readonly elementRef;
|
|
386
|
+
private readonly applicationRef;
|
|
387
|
+
private readonly viewContainerRef;
|
|
388
|
+
readonly component: i0.InputSignal<Type<C> | undefined>;
|
|
389
|
+
readonly componentIt: i0.InputSignal<InjectionToken<Type<C>> | undefined>;
|
|
390
|
+
readonly inputs: i0.InputSignal<Record<string, any> | undefined>;
|
|
391
|
+
readonly attachToHost: i0.InputSignalWithTransform<boolean, unknown>;
|
|
392
|
+
readonly parentInjector: i0.InputSignal<Injector | undefined>;
|
|
393
|
+
readonly instanceCreated: i0.OutputEmitterRef<C>;
|
|
394
|
+
componentRef?: ComponentRef<C>;
|
|
395
|
+
constructor();
|
|
396
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentDirective<any>, never>;
|
|
397
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentDirective<any>, "[mngComponent]", never, { "component": { "alias": "mngComponent"; "required": false; "isSignal": true; }; "componentIt": { "alias": "injectionToken"; "required": false; "isSignal": true; }; "inputs": { "alias": "inputs"; "required": false; "isSignal": true; }; "attachToHost": { "alias": "attachToHost"; "required": false; "isSignal": true; }; "parentInjector": { "alias": "parentInjector"; "required": false; "isSignal": true; }; }, { "instanceCreated": "instanceCreated"; }, never, never, true, never>;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
declare class RerenderDirective {
|
|
401
|
+
private readonly templateRef;
|
|
402
|
+
private readonly viewContainerRef;
|
|
403
|
+
readonly mngRerender: i0.InputSignal<unknown>;
|
|
404
|
+
constructor();
|
|
405
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RerenderDirective, never>;
|
|
406
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RerenderDirective, "[mngRerender]", never, { "mngRerender": { "alias": "mngRerender"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
declare class TemplateDirective {
|
|
410
|
+
readonly template: TemplateRef<any>;
|
|
411
|
+
readonly name: i0.InputSignal<string>;
|
|
412
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateDirective, never>;
|
|
413
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplateDirective, "[mngTemplate]", never, { "name": { "alias": "mngTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
interface EnumValue {
|
|
417
|
+
name?: string;
|
|
418
|
+
value: EnumConstantType;
|
|
419
|
+
title: string;
|
|
420
|
+
disabled?: boolean;
|
|
421
|
+
}
|
|
422
|
+
type EnumFromProperty<Type, Property extends keyof Type> = Type[Property] extends EnumType | undefined | null ? NonNullable<Type[Property]> : never;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Returns array of names for constants in enum.
|
|
426
|
+
* @param enumType Enum object.
|
|
427
|
+
*/
|
|
428
|
+
declare function getEnumConstantNames(enumType: EnumType): Array<string>;
|
|
429
|
+
/**
|
|
430
|
+
* Returns array of names for constants in enum.
|
|
431
|
+
* @param enumObj Enum object.
|
|
432
|
+
*/
|
|
433
|
+
declare function getEnumConstantNamesFromObject(enumObj: object): Array<string>;
|
|
434
|
+
/**
|
|
435
|
+
* Returns array of values for constants in enum.
|
|
436
|
+
* @param enumType Enum object.
|
|
437
|
+
*/
|
|
438
|
+
declare function getEnumConstantValues(enumType: EnumType): Array<EnumConstantType>;
|
|
439
|
+
/**
|
|
440
|
+
* Returns array of string values for constants in enum.
|
|
441
|
+
* @param enumType Enum object.
|
|
442
|
+
*/
|
|
443
|
+
declare function getEnumConstantValuesAsString(enumType: EnumType): Array<string>;
|
|
444
|
+
/**
|
|
445
|
+
* Returns array of number values for constants in enum.
|
|
446
|
+
* @param enumType Enum object.
|
|
447
|
+
*/
|
|
448
|
+
declare function getEnumConstantValuesAsNumber(enumType: EnumType): Array<number>;
|
|
449
|
+
/**
|
|
450
|
+
* Returns array of type EnumValue for all constants in enum.
|
|
451
|
+
* @param enumType Enum object.
|
|
452
|
+
* @param nameAsValue If use name of constant as value (optional, default: false).
|
|
453
|
+
* @param titlePath Base path for title to use as translation (optional).
|
|
454
|
+
*/
|
|
455
|
+
declare function fromEnumConstantsAsValueArray(enumType: EnumType, nameAsValue?: boolean, titlePath?: string): EnumValue[];
|
|
456
|
+
/**
|
|
457
|
+
* Returns array of type EnumValue for provided values in enum.
|
|
458
|
+
* @param enumType Enum object.
|
|
459
|
+
* @param values Enum values (constants).
|
|
460
|
+
* @param nameAsValue If use name of constant as value (optional, default: false).
|
|
461
|
+
* @param titlePath Base path for title to use as translation (optional).
|
|
462
|
+
*/
|
|
463
|
+
declare function fromEnumValuesAsValueArray<EnumConstant = EnumConstantType>(enumType: EnumType, values: Array<EnumConstant>, nameAsValue?: boolean, titlePath?: string): EnumValue[];
|
|
464
|
+
/**
|
|
465
|
+
* Gets constant name for value.
|
|
466
|
+
* @param enumType Enum object.
|
|
467
|
+
* @param value Value of enum constant.
|
|
468
|
+
*/
|
|
469
|
+
declare function getEnumConstantName<EnumConstant = EnumConstantType>(enumType: EnumType, value: EnumConstant): string | null;
|
|
470
|
+
/**
|
|
471
|
+
* Gets constant name for value.
|
|
472
|
+
* @param enumObj Enum object.
|
|
473
|
+
* @param value Value of enum constant.
|
|
474
|
+
*/
|
|
475
|
+
declare function getEnumConstantNameFromObject<EnumConstant = EnumConstantType>(enumObj: object, value: EnumConstant): string | null;
|
|
476
|
+
|
|
477
|
+
type ErrorTypes = 'CommonsInternalError' | 'CommonsActionError' | 'CommonsHttpError';
|
|
478
|
+
/**
|
|
479
|
+
* Main use for commons error from action execution.
|
|
480
|
+
* If http error is thrown, add it in cause.
|
|
481
|
+
*/
|
|
482
|
+
interface ICommonsError extends Error {
|
|
483
|
+
type: ErrorTypes;
|
|
484
|
+
messageCode?: number | string;
|
|
485
|
+
message: string;
|
|
486
|
+
details?: any;
|
|
487
|
+
stack?: string;
|
|
488
|
+
cause?: Error | unknown;
|
|
489
|
+
notification?: ToastMessageOptions;
|
|
490
|
+
notificationEmitSource?: string;
|
|
491
|
+
}
|
|
492
|
+
interface CommonsErrorBaseOptions {
|
|
493
|
+
name?: string;
|
|
494
|
+
messageCode?: number | string;
|
|
495
|
+
details?: any;
|
|
496
|
+
cause?: Error;
|
|
497
|
+
stack?: string;
|
|
498
|
+
location?: string;
|
|
499
|
+
notification?: ToastMessageOptions;
|
|
500
|
+
}
|
|
501
|
+
declare abstract class ACommonsErrorBase extends Error implements ICommonsError {
|
|
502
|
+
abstract readonly type: ErrorTypes;
|
|
503
|
+
readonly messageCode?: number | string;
|
|
504
|
+
readonly location?: string;
|
|
505
|
+
readonly details?: any;
|
|
506
|
+
readonly notification?: ToastMessageOptions;
|
|
507
|
+
readonly notificationEmitSource?: string;
|
|
508
|
+
protected constructor(message: string, options?: CommonsErrorBaseOptions);
|
|
509
|
+
}
|
|
510
|
+
declare class CommonsInternalError extends ACommonsErrorBase implements ICommonsError {
|
|
511
|
+
readonly type = "CommonsInternalError";
|
|
512
|
+
constructor(message: string, options?: CommonsErrorBaseOptions);
|
|
513
|
+
}
|
|
514
|
+
declare class CommonsHttpError extends ACommonsErrorBase implements ICommonsError {
|
|
515
|
+
readonly type = "CommonsHttpError";
|
|
516
|
+
readonly httpError: HttpErrorResponse;
|
|
517
|
+
constructor(message: string, httpError: HttpErrorResponse, options?: CommonsErrorBaseOptions);
|
|
518
|
+
}
|
|
519
|
+
interface ICommonsActionError extends ICommonsError {
|
|
520
|
+
type: 'CommonsActionError';
|
|
521
|
+
httpError?: HttpErrorResponse;
|
|
522
|
+
actionContext?: ICommonsActionErrorContext;
|
|
523
|
+
}
|
|
524
|
+
interface ICommonsActionErrorContext {
|
|
525
|
+
parameters: ActionParameters<any>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
declare class CommonsErrorHandler implements ErrorHandler {
|
|
529
|
+
private static readonly logCategory;
|
|
530
|
+
private readonly logger;
|
|
531
|
+
handleError(error: Error): void;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
declare enum LogLevelEnum {
|
|
535
|
+
Trace = 0,
|
|
536
|
+
Debug = 1,
|
|
537
|
+
Log = 2,
|
|
538
|
+
Info = 3,
|
|
539
|
+
Warning = 4,
|
|
540
|
+
Error = 5
|
|
541
|
+
}
|
|
542
|
+
interface LogEntry {
|
|
543
|
+
level: LogLevelEnum;
|
|
544
|
+
message: string;
|
|
545
|
+
messageDetails?: string;
|
|
546
|
+
timestamp: Date;
|
|
547
|
+
timestampFormatted?: string;
|
|
548
|
+
category?: string;
|
|
549
|
+
error?: Error;
|
|
550
|
+
data?: any[];
|
|
551
|
+
}
|
|
552
|
+
interface LogConfig {
|
|
553
|
+
level?: LogLevelEnum;
|
|
554
|
+
timestampFormat?: string;
|
|
555
|
+
category?: {
|
|
556
|
+
[category: string]: {
|
|
557
|
+
level?: LogLevelEnum;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
interface ILoggerService {
|
|
562
|
+
create(context: string): ILoggerService;
|
|
563
|
+
trace(msgOrError: string | Error, ...data: any[]): void;
|
|
564
|
+
debug(msgOrError: string | Error, ...data: any[]): void;
|
|
565
|
+
log(msgOrError: string | Error, logLevel: LogLevelEnum, category: string | undefined, ...data: any[]): void;
|
|
566
|
+
logEntry(logEntry: Partial<LogEntry>): void;
|
|
567
|
+
info(msgOrError: string | Error, ...data: any[]): void;
|
|
568
|
+
warn(msgOrError: string | Error, ...data: any[]): void;
|
|
569
|
+
error(msgOrError: string | Error, ...data: any[]): void;
|
|
570
|
+
}
|
|
571
|
+
interface ILogPublisher {
|
|
572
|
+
addEntry(entry: LogEntry): void;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Converts RxJS subscription error to CommonsError.
|
|
577
|
+
* @param error Error.
|
|
578
|
+
* @param name Optional name to write in commons error.
|
|
579
|
+
* @param details Optional details of error.
|
|
580
|
+
*/
|
|
581
|
+
declare function fromSubscribeError(error: any, name?: string, details?: any): ACommonsErrorBase;
|
|
582
|
+
/**
|
|
583
|
+
* Checks if error is Http error (Angular or Commons).
|
|
584
|
+
* @param error
|
|
585
|
+
*/
|
|
586
|
+
declare function isHttpErrorResponse(error: any): boolean;
|
|
587
|
+
/**
|
|
588
|
+
* Gets HttpErrorResponse from error (Angular or Commons).
|
|
589
|
+
* @param error Error.
|
|
590
|
+
*/
|
|
591
|
+
declare function getHttpErrorResponse(error: any): HttpErrorResponse | null;
|
|
592
|
+
/**
|
|
593
|
+
* Gets HttpErrorResponse status from error (Angular or Commons).
|
|
594
|
+
* @param error Error.
|
|
595
|
+
*/
|
|
596
|
+
declare function getHttpErrorResponseStatus(error: any): number | null;
|
|
597
|
+
/**
|
|
598
|
+
* Gets HttpErrorResponse status text from error (Angular or Commons).
|
|
599
|
+
* @param error Error.
|
|
600
|
+
*/
|
|
601
|
+
declare function getHttpErrorResponseStatusText(error: any): string | null;
|
|
602
|
+
/**
|
|
603
|
+
* Get error log level. All is error, except if error is http error with status >=400 and <500.
|
|
604
|
+
* @param error Error.
|
|
605
|
+
*/
|
|
606
|
+
declare function getErrorLogLevel(error: any): LogLevelEnum;
|
|
607
|
+
/**
|
|
608
|
+
* Get error name (prototype name or type from commons error if name is not provided).
|
|
609
|
+
* @param error Error.
|
|
610
|
+
*/
|
|
611
|
+
declare function getErrorName(error: any): string;
|
|
612
|
+
/**
|
|
613
|
+
* Writes http error to string with all headers and body.
|
|
614
|
+
* @param error Http response error.
|
|
615
|
+
* @param opts Options for hiding parts of error:
|
|
616
|
+
* - hideMessage Hides message of error (message include url, status and status text!).
|
|
617
|
+
* - hideHeaders Hides headers.
|
|
618
|
+
* - hideBody Hides JSON representation of body.
|
|
619
|
+
*/
|
|
620
|
+
declare function httpErrorResponseToString(error: HttpErrorResponse, opts?: HttpErrorResponseToStringOptionsType): string;
|
|
621
|
+
/**
|
|
622
|
+
* Error to string.
|
|
623
|
+
* @param error Error.
|
|
624
|
+
* @param opts Options for hiding parts of error:
|
|
625
|
+
* - hideMessage Hides message of error.
|
|
626
|
+
* - hideName Hides error name.
|
|
627
|
+
* - hideCause Hides cause of an error (if present, see @link(errorCauseToString) for other options).
|
|
628
|
+
* - hideStack Hides stack of an error (if present).
|
|
629
|
+
* - hideDetails Hides JSON detail's representation of error (if present).
|
|
630
|
+
* - hideLocation Hides location (URL) where error was thrown.
|
|
631
|
+
* - hideHttp Hides http error portion of error if http error response (see @link(httpErrorResponseToString) for other options).
|
|
632
|
+
*/
|
|
633
|
+
declare function errorToString(error: Error, opts?: ErrorToStringOptionsType): string;
|
|
634
|
+
/**
|
|
635
|
+
* Commons error to string.
|
|
636
|
+
* @param error Commons error.
|
|
637
|
+
* @param opts Options for hiding parts of error:
|
|
638
|
+
* - hideMessage Hides message of error.
|
|
639
|
+
* - hideName Hides error name.
|
|
640
|
+
* - hideCause Hides cause of an error (if present, see @link(errorCauseToString) for other options).
|
|
641
|
+
* - hideStack Hides stack of an error (if present).
|
|
642
|
+
* - hideDetails Hides JSON detail's representation of error (if present).
|
|
643
|
+
* - hideLocation Hides location (URL) where error was thrown.
|
|
644
|
+
* - hideHttp Hides http error portion of error if http error response (see @link(httpErrorResponseToString) for other options).
|
|
645
|
+
* - hideItems Hides all item information (http body, action context data).
|
|
646
|
+
* - hideActionData See @link(commonsActionErrorContextToString) for additional info.
|
|
647
|
+
* - hideQueryParams See @link(commonsActionErrorContextToString) for additional info.
|
|
648
|
+
*/
|
|
649
|
+
declare function commonsErrorToString(error: ACommonsErrorBase, opts?: ErrorToStringOptionsType): string;
|
|
650
|
+
/**
|
|
651
|
+
* Writes commons action error info from context as string.
|
|
652
|
+
* @param error Commons action error.
|
|
653
|
+
* @param opts Options for hiding parts of error:
|
|
654
|
+
* - hideItems Hides all item related information (item, form item, submit item, ...).
|
|
655
|
+
* - hideActionData Hides action data.
|
|
656
|
+
* - hideQueryParams Hides query params.
|
|
657
|
+
*/
|
|
658
|
+
declare function commonsActionErrorContextToString(error: ICommonsActionError, opts?: ActionErrorContextToStringOptionsType): string;
|
|
659
|
+
/**
|
|
660
|
+
* Writes cause of an error as string.
|
|
661
|
+
* @param error Error.
|
|
662
|
+
* @param opts Options for hiding parts of error:
|
|
663
|
+
* - causeOnErrorOnly Prints only if cause is instance of error.
|
|
664
|
+
* - causeAsJson Print error cause as a JSON (by default, if error only message and name will be printed).
|
|
665
|
+
*/
|
|
666
|
+
declare function errorCauseToString(error: Error, opts?: ErrorCauseToStringOptionsType): string;
|
|
667
|
+
/**
|
|
668
|
+
* Throws an error with the provided error message.
|
|
669
|
+
* The intended usage is for in-line throwing of an error with TS type narrowing.
|
|
670
|
+
* <br>
|
|
671
|
+
* <i>Example</i>:
|
|
672
|
+
* <pre>
|
|
673
|
+
* const value: string | null = getValue("");
|
|
674
|
+
* const nonNullValue: string = getValue("") ?? throwError("value missing");
|
|
675
|
+
* </pre>
|
|
676
|
+
*
|
|
677
|
+
* @param {string} errorMessage - The error message to be thrown.
|
|
678
|
+
* @param {CommonsErrorBaseOptions} [options] - Additional options for the thrown error.
|
|
679
|
+
* @throws {Error} - The error object with the provided error message.
|
|
680
|
+
* @returns {never} - This function does not return a value.
|
|
681
|
+
* @see CommonsErrorBaseOptions
|
|
682
|
+
*/
|
|
683
|
+
declare function throwError(errorMessage: string, options?: CommonsErrorBaseOptions): never;
|
|
684
|
+
type ErrorToStringOptionsType = ErrorToStringOptionsBaseType & HttpErrorResponseToStringOptionsType & ActionErrorContextToStringOptionsType & ErrorCauseToStringOptionsType & {
|
|
685
|
+
hideDetails?: boolean;
|
|
686
|
+
hideLocation?: boolean;
|
|
687
|
+
};
|
|
688
|
+
interface ErrorToStringOptionsBaseType {
|
|
689
|
+
hideName?: boolean;
|
|
690
|
+
hideStack?: boolean;
|
|
691
|
+
hideCause?: boolean;
|
|
692
|
+
hideHttp?: boolean;
|
|
693
|
+
}
|
|
694
|
+
interface HttpErrorResponseToStringOptionsType {
|
|
695
|
+
hideMessage?: boolean;
|
|
696
|
+
hideHeaders?: boolean;
|
|
697
|
+
hideBody?: boolean;
|
|
698
|
+
}
|
|
699
|
+
interface ActionErrorContextToStringOptionsType {
|
|
700
|
+
hideItems?: boolean;
|
|
701
|
+
hideActionData?: boolean;
|
|
702
|
+
hideQueryParams?: boolean;
|
|
703
|
+
}
|
|
704
|
+
interface ErrorCauseToStringOptionsType {
|
|
705
|
+
causeOnErrorOnly?: boolean;
|
|
706
|
+
causeAsJson?: boolean;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
declare function boolean$Attribute(value: unknown): Observable<boolean>;
|
|
710
|
+
declare function booleanOrUndefinedAttribute(value: unknown): boolean | undefined;
|
|
711
|
+
declare function number$Attribute(value: unknown): Observable<number>;
|
|
712
|
+
declare const toObservable: <T>(value: T | Observable<T>) => Observable<T>;
|
|
713
|
+
declare const itemIdToNumber: (value?: IdType) => number;
|
|
714
|
+
declare const itemIdToString: (value?: IdType) => string;
|
|
715
|
+
declare const itemIdToDefined: (value?: IdType) => IdType;
|
|
716
|
+
declare const valueToDefined: <T>(value: Nullable<T>) => T;
|
|
717
|
+
|
|
718
|
+
type toIsoStringTypeOptType = 'date' | 'date-time' | 'dateTime';
|
|
719
|
+
type toIsoStringDateTimeOptsType = {
|
|
720
|
+
utc?: boolean;
|
|
721
|
+
noTimezone?: boolean;
|
|
722
|
+
noMillis?: boolean;
|
|
723
|
+
};
|
|
724
|
+
declare function dateToIsoString(value: string | number | Date, type?: 'date'): string;
|
|
725
|
+
declare function dateToIsoString(value: string | number | Date, type: 'date-time' | 'dateTime', dateTimeOpts?: toIsoStringDateTimeOptsType): string;
|
|
726
|
+
declare function dateToIsoString(value: undefined | null | unknown, type?: 'date'): null;
|
|
727
|
+
declare function dateToIsoString(value: undefined | null | unknown, type: 'date-time' | 'dateTime', dateTimeOpts?: toIsoStringDateTimeOptsType): null;
|
|
728
|
+
declare function dateToIsoString(value: unknown, type?: toIsoStringTypeOptType, dateTimeOpts?: toIsoStringDateTimeOptsType): string | null;
|
|
729
|
+
declare function fromAngularDateFormatToPrime(ngDateFormat: string): string;
|
|
730
|
+
declare function angularDateFormatHasTime(ngDateFormat: string): boolean;
|
|
731
|
+
declare function angularDateFormatHasSeconds(ngDateFormat: string): boolean;
|
|
732
|
+
|
|
733
|
+
type ToastMessageOptsType = {
|
|
734
|
+
messageService?: MessageService;
|
|
735
|
+
title?: string;
|
|
736
|
+
sticky?: boolean;
|
|
737
|
+
closable?: boolean;
|
|
738
|
+
icon?: string;
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* Displays a toast notification message with a specified severity level and optional customization. Presets the life of message and requires message.
|
|
742
|
+
*
|
|
743
|
+
* @param {string} message - The content of the toast message to be displayed.
|
|
744
|
+
* @param {'success' | 'warn' | 'warning' | 'error'} [severity='success'] - The severity level of the message.
|
|
745
|
+
* @param {ToastMessageOptsType} [opts] - Optional configuration for the toast message, which can include a title, icon, and message service for displaying the notification. If message service is provided, the message will be automatically added.
|
|
746
|
+
* @return {Message} - The notification message object created for the toast.
|
|
747
|
+
*/
|
|
748
|
+
declare function toastMessage(message: string, severity?: 'success' | 'warn' | 'warning' | 'error', opts?: ToastMessageOptsType): ToastMessageOptions;
|
|
749
|
+
|
|
750
|
+
declare function fromAngularNumberFormatToFractions(format: string): {
|
|
751
|
+
integer: number;
|
|
752
|
+
fractionsMin: number;
|
|
753
|
+
fractionsMax: number;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
interface DeepCopyPropsOptions {
|
|
757
|
+
mapGettersToProperties?: boolean;
|
|
758
|
+
}
|
|
759
|
+
interface DeepCopyOptions<P = object> extends DeepCopyPropsOptions {
|
|
760
|
+
objectPrototype?: ClassType<P>;
|
|
761
|
+
}
|
|
762
|
+
declare function objectDeepCopy<T = object, P = object>(obj: T, options: DeepCopyOptions<P> & {
|
|
763
|
+
mapGettersToProperties: true;
|
|
764
|
+
}): T | Record<string, any>;
|
|
765
|
+
declare function objectDeepCopy<T = object, P = object>(obj: T, options: DeepCopyOptions<P> & {
|
|
766
|
+
objectPrototype: ClassType<P>;
|
|
767
|
+
} & {
|
|
768
|
+
mapGettersToProperties?: false;
|
|
769
|
+
}): P;
|
|
770
|
+
declare function objectDeepCopy<T = object, P = object>(obj: T, options: DeepCopyOptions<P> & {
|
|
771
|
+
objectPrototype: ClassType<P>;
|
|
772
|
+
} & {
|
|
773
|
+
mapGettersToProperties: true;
|
|
774
|
+
}): P | Record<string, any>;
|
|
775
|
+
declare function objectDeepCopy<T = object, P = object>(obj: T, options?: DeepCopyOptions<P>): T;
|
|
776
|
+
declare function objectDeepMerge(target: Record<string, any>, source: Record<string, any>): Record<string, any>;
|
|
777
|
+
declare function getObjectProperties(obj: object): string[];
|
|
778
|
+
declare function getObjectGetters(obj: any): string[];
|
|
779
|
+
declare function getObjectPropertyByPath(value: any, path: string): any | undefined;
|
|
780
|
+
declare function flattenObjectKeys(objectModel: any): string[];
|
|
781
|
+
|
|
782
|
+
declare enum PermissionTypeEnum {
|
|
783
|
+
All = "ALL",
|
|
784
|
+
Any = "ANY",
|
|
785
|
+
Rbac = "ROLE_BASED_ACCESS_CONTROL",
|
|
786
|
+
Service = "SERVICE"
|
|
787
|
+
}
|
|
788
|
+
interface IActionContextValidation<Item, Service = undefined> {
|
|
789
|
+
descriptor: IActionDescriptor<Item, Service>;
|
|
790
|
+
parameters: ActionParameters<Item>;
|
|
791
|
+
serviceInstance: Service;
|
|
792
|
+
dataProvider?: IDataProvider<Item, Service>;
|
|
793
|
+
}
|
|
794
|
+
interface IPermissionService {
|
|
795
|
+
/**
|
|
796
|
+
* Determines whether a route can be activated.
|
|
797
|
+
*
|
|
798
|
+
* @param {ActivatedRouteSnapshot} route - The route snapshot object representing the current route for activation.
|
|
799
|
+
* @param {RouterStateSnapshot} state - The router state snapshot
|
|
800
|
+
*
|
|
801
|
+
* @returns {Observable<boolean>} - An observable that emits a boolean value indicating whether the route can be activated.
|
|
802
|
+
*/
|
|
803
|
+
canActivateRoute(route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
804
|
+
/**
|
|
805
|
+
* Determines the visibility of menu item.
|
|
806
|
+
*
|
|
807
|
+
* @param {CommonsMenuItem} menuItem - The menu item to check.
|
|
808
|
+
* @return {Observable<boolean>} - An observable that emits a boolean indicating
|
|
809
|
+
* whether the menu item is visible or not.
|
|
810
|
+
*/
|
|
811
|
+
isMenuitemVisible(menuItem: CommonsMenuItem): Observable<boolean>;
|
|
812
|
+
/**
|
|
813
|
+
* Determines if the specified action is visible based on the action context and route.
|
|
814
|
+
*
|
|
815
|
+
* @param {IActionContextValidation<any, any>} [actionCtx] - The action context object containing the necessary information for validation.
|
|
816
|
+
* @param {ActivatedRouteSnapshot} [route] - The current route snapshot containing the necessary information for validation.
|
|
817
|
+
* @param {RouterStateSnapshot} state - The router state snapshot
|
|
818
|
+
*
|
|
819
|
+
* @return {Observable<boolean>} - An Observable that emits the visibility status of the action.
|
|
820
|
+
*/
|
|
821
|
+
isActionVisible(actionCtx?: IActionContextValidation<any, any>, route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
822
|
+
}
|
|
823
|
+
declare abstract class APermissions {
|
|
824
|
+
private readonly _authorizationType;
|
|
825
|
+
constructor(type: PermissionTypeEnum);
|
|
826
|
+
get authorizationType(): PermissionTypeEnum;
|
|
827
|
+
}
|
|
828
|
+
declare namespace Permissions {
|
|
829
|
+
class All extends APermissions {
|
|
830
|
+
private _permissions;
|
|
831
|
+
private constructor();
|
|
832
|
+
static of(...permissions: Array<APermissions>): All;
|
|
833
|
+
get permissions(): APermissions[];
|
|
834
|
+
and(...permissions: Array<APermissions>): this;
|
|
835
|
+
}
|
|
836
|
+
class Any extends APermissions {
|
|
837
|
+
private _permissions;
|
|
838
|
+
private constructor();
|
|
839
|
+
static of(...permissions: Array<APermissions>): Any;
|
|
840
|
+
get permissions(): APermissions[];
|
|
841
|
+
or(...permissions: Array<APermissions>): this;
|
|
842
|
+
}
|
|
843
|
+
class Roles extends APermissions {
|
|
844
|
+
private _roles;
|
|
845
|
+
private constructor();
|
|
846
|
+
static of(...roles: Array<string>): Roles;
|
|
847
|
+
get roles(): string[][];
|
|
848
|
+
and(...roles: Array<string>): this;
|
|
849
|
+
or(...roles: Array<string>): this;
|
|
850
|
+
}
|
|
851
|
+
class Service extends APermissions {
|
|
852
|
+
readonly service: Type<IPermissionService>;
|
|
853
|
+
private constructor();
|
|
854
|
+
static of(service: Type<IPermissionService>): Service;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
interface CommonsMenuItem {
|
|
859
|
+
index?: number;
|
|
860
|
+
id?: string;
|
|
861
|
+
positionIndex?: number;
|
|
862
|
+
label?: string;
|
|
863
|
+
icon?: string;
|
|
864
|
+
items?: Array<CommonsMenuItem>;
|
|
865
|
+
permissions?: APermissions;
|
|
866
|
+
separator?: boolean;
|
|
867
|
+
className?: string;
|
|
868
|
+
badge?: string;
|
|
869
|
+
badgeClassName?: string;
|
|
870
|
+
isVisible?: ((menuItem: CommonsMenuItem) => Observable<boolean> | boolean) | boolean;
|
|
871
|
+
disabled?: boolean;
|
|
872
|
+
routerLink?: string | Array<string> | null;
|
|
873
|
+
href?: string;
|
|
874
|
+
hrefExternalIcon?: string | null;
|
|
875
|
+
target?: string;
|
|
876
|
+
queryParams?: {
|
|
877
|
+
[k: string]: any;
|
|
878
|
+
};
|
|
879
|
+
fragment?: string;
|
|
880
|
+
queryParamsHandling?: QueryParamsHandling;
|
|
881
|
+
preserveFragment?: boolean;
|
|
882
|
+
skipLocationChange?: boolean;
|
|
883
|
+
replaceUrl?: boolean;
|
|
884
|
+
updated?: boolean;
|
|
885
|
+
lazyChildren?: boolean;
|
|
886
|
+
}
|
|
887
|
+
type InternalCommonsMenuItem = Omit<CommonsMenuItem, 'key' | 'items' | 'lazyChildren' | 'visible'> & {
|
|
888
|
+
key: string;
|
|
889
|
+
config: CommonsMenuItem;
|
|
890
|
+
items: WritableSignal<InternalCommonsMenuItem[]>;
|
|
891
|
+
hasItems: Signal<boolean>;
|
|
892
|
+
itemsVisibility: WritableSignal<WritableSignal<boolean>[]>;
|
|
893
|
+
lazyChildren: WritableSignal<boolean>;
|
|
894
|
+
hasItemsOrLazyChildren: Signal<boolean>;
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
declare function removeRouteEmptyPathSegments(path: Array<string>): string[];
|
|
898
|
+
declare function appendRoutePathToBasePath(basePath: Array<string>, path: Array<string>): string[];
|
|
899
|
+
declare function doesUrlMatchRouterLink(link: Array<string> | string, url: Array<string> | string): boolean;
|
|
900
|
+
declare function adjustRouteMenuLazyChildrenRouterLinks(rootMenuItem: MenuItem | InternalCommonsMenuItem, lazyChildren: Array<CommonsMenuItem>): {
|
|
901
|
+
index?: number;
|
|
902
|
+
id?: string;
|
|
903
|
+
positionIndex?: number;
|
|
904
|
+
label?: string;
|
|
905
|
+
icon?: string;
|
|
906
|
+
items?: Array<CommonsMenuItem>;
|
|
907
|
+
permissions?: _mediusinc_mng_commons_core.APermissions;
|
|
908
|
+
separator?: boolean;
|
|
909
|
+
className?: string;
|
|
910
|
+
badge?: string;
|
|
911
|
+
badgeClassName?: string;
|
|
912
|
+
isVisible?: ((menuItem: CommonsMenuItem) => rxjs.Observable<boolean> | boolean) | boolean;
|
|
913
|
+
disabled?: boolean;
|
|
914
|
+
routerLink?: string | Array<string> | null;
|
|
915
|
+
href?: string;
|
|
916
|
+
hrefExternalIcon?: string | null;
|
|
917
|
+
target?: string;
|
|
918
|
+
queryParams?: {
|
|
919
|
+
[k: string]: any;
|
|
920
|
+
};
|
|
921
|
+
fragment?: string;
|
|
922
|
+
queryParamsHandling?: _angular_router.QueryParamsHandling;
|
|
923
|
+
preserveFragment?: boolean;
|
|
924
|
+
skipLocationChange?: boolean;
|
|
925
|
+
replaceUrl?: boolean;
|
|
926
|
+
updated?: boolean;
|
|
927
|
+
lazyChildren?: boolean;
|
|
928
|
+
}[];
|
|
929
|
+
|
|
930
|
+
declare function escapeHtml(value: string): any;
|
|
931
|
+
declare function escapeHtmlAny(value?: any): any;
|
|
932
|
+
/**
|
|
933
|
+
* Stringifies a value - primitives with toString, dates with dateUtil, objects with JSON.stringify.
|
|
934
|
+
* @param value Any value.
|
|
935
|
+
*/
|
|
936
|
+
declare function stringify(value: any): string;
|
|
937
|
+
|
|
938
|
+
declare function findTemplateByName(templates: TemplateDirective[], name: string): TemplateRef<any> | null;
|
|
939
|
+
|
|
940
|
+
declare function getI18nAsync(translate: TranslateService, params?: any, ...keys: Array<string>): Observable<string | null>;
|
|
941
|
+
declare function getI18n(translate: TranslateService, params?: any, ...keys: Array<string>): string | null;
|
|
942
|
+
declare function populateI18nParams(item?: any, params?: any): any;
|
|
943
|
+
declare function selectI18n(keys: string[], i18n: Translation): string | null;
|
|
944
|
+
declare function narrowI18nToTranslation(i18n: StrictTranslation, keyOrIdx?: string | number): string | undefined;
|
|
945
|
+
|
|
946
|
+
declare function getI18nForError(translate: TranslateService, error: Error, params?: any): string | null;
|
|
947
|
+
declare function getI18nErrorParams(error: Error, params?: any): any;
|
|
948
|
+
|
|
949
|
+
declare function getI18nTypeNameAsync(translate: TranslateService, typeName: string, singular?: boolean): Observable<string | null>;
|
|
950
|
+
declare function getI18nTypeName(translate: TranslateService, typeName: string, singular?: boolean): string | null;
|
|
951
|
+
declare function getI18nTypeTabKey(typeName: string, tab: string): string;
|
|
952
|
+
declare function getI18nTypeGroupKey(typeName: string, group: string): string;
|
|
953
|
+
declare function getI18nTypePropertyKey(typeName: string, property: string): string;
|
|
954
|
+
declare function getI18nTypeKeyBasePath(typeName: string, ...path: Array<string>): string;
|
|
955
|
+
declare function getI18nTypeParams(translate: TranslateService, typeName?: string, item?: any, params?: any): any;
|
|
956
|
+
declare function getI18nTypeParamsAsync(translate: TranslateService, typeName?: string, item?: any, params?: any): Observable<any>;
|
|
957
|
+
declare function populateI18nTypeParams(i18nTypeName?: string, item?: any, params?: any): any;
|
|
958
|
+
|
|
959
|
+
declare class LogPublisherConsoleService implements ILogPublisher {
|
|
960
|
+
addEntry(entry: LogEntry): void;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
type VersionConfigType = VersionConfig | VersionInfo | string | Array<VersionConfig> | undefined;
|
|
964
|
+
type VersionConfig = {
|
|
965
|
+
source: 'info' | 'httpResource' | 'config';
|
|
966
|
+
displayName?: string;
|
|
967
|
+
} & (VersionConfigFromInfo | VersionConfigFromHttpResource | VersionConfigFromConfiguration);
|
|
968
|
+
interface VersionConfigFromInfo {
|
|
969
|
+
source: 'info';
|
|
970
|
+
info: VersionInfo | string;
|
|
971
|
+
}
|
|
972
|
+
interface VersionConfigFromHttpResource {
|
|
973
|
+
source: 'httpResource';
|
|
974
|
+
urlPath: string;
|
|
975
|
+
urlBaseConfigKey?: string;
|
|
976
|
+
infoJsonPath?: string;
|
|
977
|
+
}
|
|
978
|
+
interface VersionConfigFromConfiguration {
|
|
979
|
+
source: 'config';
|
|
980
|
+
configKey: string;
|
|
981
|
+
}
|
|
982
|
+
interface VersionInfo {
|
|
983
|
+
source?: undefined;
|
|
984
|
+
name: string;
|
|
985
|
+
version: string | null;
|
|
986
|
+
tag: string | null;
|
|
987
|
+
distance: number | null;
|
|
988
|
+
hash: string | null;
|
|
989
|
+
dirty: boolean;
|
|
990
|
+
semver: string | null;
|
|
991
|
+
raw: string;
|
|
992
|
+
buildTimestamp: number | null;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
type ColorScheme = 'light' | 'dark' | 'auto';
|
|
996
|
+
interface CommonsModuleConfig {
|
|
997
|
+
app?: {
|
|
998
|
+
name?: string;
|
|
999
|
+
owner?: string;
|
|
1000
|
+
locales?: string[];
|
|
1001
|
+
dataLocales?: string[];
|
|
1002
|
+
version?: VersionConfigType;
|
|
1003
|
+
};
|
|
1004
|
+
configuration?: {
|
|
1005
|
+
projectEnvironment?: any;
|
|
1006
|
+
jsonSource?: string | Array<string>;
|
|
1007
|
+
skipJsonSourceInit?: boolean;
|
|
1008
|
+
jsonSourceEnableEnvProd?: boolean;
|
|
1009
|
+
};
|
|
1010
|
+
serialization?: CommonsSerializationConfig;
|
|
1011
|
+
log?: LogConfig;
|
|
1012
|
+
}
|
|
1013
|
+
interface CommonsSerializationConfig {
|
|
1014
|
+
dateTimeInUtc?: boolean;
|
|
1015
|
+
dateTimeWithTimezone?: boolean;
|
|
1016
|
+
dateTimeWithMillis?: boolean;
|
|
1017
|
+
filtersDateOnlyDisabled?: boolean;
|
|
1018
|
+
}
|
|
1019
|
+
declare const COMMONS_MODULE_CONFIG_IT: InjectionToken<CommonsModuleConfig>;
|
|
1020
|
+
|
|
1021
|
+
declare class CommonsConfigurationService {
|
|
1022
|
+
private static _instance;
|
|
1023
|
+
static get(): CommonsConfigurationService;
|
|
1024
|
+
private logger?;
|
|
1025
|
+
private http?;
|
|
1026
|
+
private moduleConfig?;
|
|
1027
|
+
private projectEnvironment?;
|
|
1028
|
+
private jsonSources;
|
|
1029
|
+
private objectSources;
|
|
1030
|
+
private configuration;
|
|
1031
|
+
private constructor();
|
|
1032
|
+
init(httpClient: HttpClient, logger?: ILoggerService): this;
|
|
1033
|
+
/**
|
|
1034
|
+
* Add commons module config.
|
|
1035
|
+
* @param config Module config.
|
|
1036
|
+
*/
|
|
1037
|
+
addModuleConfigSource(config?: CommonsModuleConfig): void;
|
|
1038
|
+
/**
|
|
1039
|
+
* Add project environment source.
|
|
1040
|
+
* @param environment Environment.
|
|
1041
|
+
*/
|
|
1042
|
+
addEnvironmentSource(environment: any): void;
|
|
1043
|
+
/**
|
|
1044
|
+
* Adds new config source from JSON file loaded from HTTP.
|
|
1045
|
+
* @param config Config for JSON file.
|
|
1046
|
+
* @param loadImmediately Load is by default triggered on app initialization. If immediate load is required, pass true.
|
|
1047
|
+
*/
|
|
1048
|
+
addJsonSource(config?: {
|
|
1049
|
+
url?: string;
|
|
1050
|
+
enableEnvProd?: boolean;
|
|
1051
|
+
}, loadImmediately?: boolean): Observable<boolean>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Adds new config object from any object.
|
|
1054
|
+
* @param config Config object.
|
|
1055
|
+
*/
|
|
1056
|
+
addObjectSource(config: any): void;
|
|
1057
|
+
/**
|
|
1058
|
+
* returns true if there is no jsonSources
|
|
1059
|
+
*/
|
|
1060
|
+
private skipJsonConfigsLoading;
|
|
1061
|
+
/**
|
|
1062
|
+
* loads json sources or skips them returning true in both cases
|
|
1063
|
+
* used for `skipJsonSourceInit` configuration parameter
|
|
1064
|
+
*/
|
|
1065
|
+
loadJsonConfigurations: () => Observable<boolean>;
|
|
1066
|
+
private loadJsonSources;
|
|
1067
|
+
/**
|
|
1068
|
+
* Get configuration.
|
|
1069
|
+
*/
|
|
1070
|
+
getConfig(): any;
|
|
1071
|
+
/**
|
|
1072
|
+
* Get configuration value for key.
|
|
1073
|
+
* @param key Configuration key.
|
|
1074
|
+
*/
|
|
1075
|
+
getConfigValue<T = any>(key: string): T | null;
|
|
1076
|
+
/**
|
|
1077
|
+
* Gets the configuration value for the given key. If the value is not found,
|
|
1078
|
+
* it throws an error with a custom error message.
|
|
1079
|
+
*
|
|
1080
|
+
* @param {string} key - The configuration key.
|
|
1081
|
+
* @param {string} [errorMessage] - Custom error message to be thrown if the value is not found.
|
|
1082
|
+
*
|
|
1083
|
+
* @returns {T} - The configuration value.
|
|
1084
|
+
*
|
|
1085
|
+
* @throws {CommonsInternalError} - If the value is not found or a custom error message is provided.
|
|
1086
|
+
*/
|
|
1087
|
+
getConfigValueOrThrow<T = any>(key: string, errorMessage?: string): T;
|
|
1088
|
+
/**
|
|
1089
|
+
* Has configuration for key.
|
|
1090
|
+
* @param key Configuration key.
|
|
1091
|
+
*/
|
|
1092
|
+
hasConfigKey(key: string): boolean;
|
|
1093
|
+
/**
|
|
1094
|
+
* Merges configuration from multiple sources with
|
|
1095
|
+
*/
|
|
1096
|
+
private mergeConfigs;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
declare class LoggerService implements ILoggerService {
|
|
1100
|
+
private static _instance;
|
|
1101
|
+
private static _isInit;
|
|
1102
|
+
private static _configurationService?;
|
|
1103
|
+
private static _publishers;
|
|
1104
|
+
private static _entriesBuffer;
|
|
1105
|
+
private static _categoryInstances;
|
|
1106
|
+
private static _timestampFormat;
|
|
1107
|
+
private category?;
|
|
1108
|
+
private readonly defaultLogLevel;
|
|
1109
|
+
private datePipe;
|
|
1110
|
+
private constructor();
|
|
1111
|
+
static get(): LoggerService;
|
|
1112
|
+
static configure(config: {
|
|
1113
|
+
timestampFormat?: string;
|
|
1114
|
+
}): void;
|
|
1115
|
+
static init(configurationService: CommonsConfigurationService, publishers: ILogPublisher[]): void;
|
|
1116
|
+
private static _flushBuffer;
|
|
1117
|
+
static create(category: string): LoggerService;
|
|
1118
|
+
create(category: string): LoggerService;
|
|
1119
|
+
private _processLog;
|
|
1120
|
+
private _getTimestamps;
|
|
1121
|
+
private _log;
|
|
1122
|
+
trace(msgOrError: string | Error, ...data: any[]): void;
|
|
1123
|
+
debug(msgOrError: string | Error, ...data: any[]): void;
|
|
1124
|
+
log(msgOrError: string | Error, logLevel?: LogLevelEnum, category?: string | undefined, ...data: any[]): void;
|
|
1125
|
+
logEntry<E extends Partial<LogEntry>>(logEntry: E): void;
|
|
1126
|
+
info(msgOrError: string | Error, ...data: any[]): void;
|
|
1127
|
+
warn(msgOrError: string | Error, ...data: any[]): void;
|
|
1128
|
+
error(msgOrError: string | Error, ...data: any[]): void;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
interface ClassAttributeDef {
|
|
1132
|
+
name: string;
|
|
1133
|
+
baseName: string;
|
|
1134
|
+
type: string;
|
|
1135
|
+
subtype?: string;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
type GetterFn<Value = Nullable<any>, Item = any, ReturnType = any> = (value: Value, item: Item) => ReturnType;
|
|
1139
|
+
|
|
1140
|
+
type I18nMissingTranslationStrategy = 'returnNull' | 'returnFallbackKey' | 'returnFirstKey';
|
|
1141
|
+
|
|
1142
|
+
interface IUser {
|
|
1143
|
+
id: IdType;
|
|
1144
|
+
username: string;
|
|
1145
|
+
displayName?: string;
|
|
1146
|
+
logout?: () => void;
|
|
1147
|
+
logoutUrl?: string;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
declare class BooleanPipe implements PipeTransform {
|
|
1151
|
+
transform(value: any, yes?: string, no?: string, icon?: boolean): any;
|
|
1152
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanPipe, never>;
|
|
1153
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<BooleanPipe, "mngBoolean", true>;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
declare class ClassMapPipe<T> implements PipeTransform {
|
|
1157
|
+
transform(className?: string, classNameMapFn?: (className?: string, item?: T) => string, item?: T): string;
|
|
1158
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClassMapPipe<any>, never>;
|
|
1159
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ClassMapPipe<any>, "mngClassMap", true>;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
declare class EnumPipe implements PipeTransform {
|
|
1163
|
+
transform(value: unknown, enumDesc?: IEnumDescriptor, i18nPath?: string | null): any;
|
|
1164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnumPipe, never>;
|
|
1165
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<EnumPipe, "mngEnum", true>;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
declare class EnumeratePipe implements PipeTransform {
|
|
1169
|
+
private readonly translate;
|
|
1170
|
+
transform<T>(value: Array<T> | Set<T>, jsonPath?: string, valueSeparator?: string, emptyValueReturn?: string, i18nBaseKey?: string): string;
|
|
1171
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnumeratePipe, never>;
|
|
1172
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<EnumeratePipe, "mngEnumerate", true>;
|
|
1173
|
+
}
|
|
1174
|
+
declare function getEnumerationI18nBaseKey(baseKey: string): string;
|
|
1175
|
+
declare function selectEnumerationI18n(value: EnumeratePipeI18nInternal, baseKey: string): string;
|
|
1176
|
+
declare function toEnumerationI18nEnumerate(value: unknown, jsonPath: string, baseKey: string): EnumeratePipeI18nInternal;
|
|
1177
|
+
interface EnumeratePipeI18nInternal {
|
|
1178
|
+
value: string;
|
|
1179
|
+
i18nKey: string;
|
|
1180
|
+
i18n: string;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
declare class EnumerateAsyncPipe implements PipeTransform {
|
|
1184
|
+
private readonly translate;
|
|
1185
|
+
transform(value: Observable<Array<unknown> | Set<unknown>>, jsonPath?: string, valueSeparator?: string, emptyValueReturn?: string, i18nBaseKey?: string): Observable<string>;
|
|
1186
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnumerateAsyncPipe, never>;
|
|
1187
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<EnumerateAsyncPipe, "mngEnumerateAsync", true>;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
declare class GetterPipe implements PipeTransform {
|
|
1191
|
+
transform(value: unknown, getterFn?: GetterFn, item?: unknown): any;
|
|
1192
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GetterPipe, never>;
|
|
1193
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<GetterPipe, "mngGetter", true>;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
declare class I18nPropertyPipe implements PipeTransform {
|
|
1197
|
+
transform(property: string, model: IModelDescriptor<any>): any;
|
|
1198
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<I18nPropertyPipe, never>;
|
|
1199
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<I18nPropertyPipe, "mngI18nProperty", true>;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Imitation of JSONPath Syntax. Supports:
|
|
1204
|
+
* - Root object notation with '$'
|
|
1205
|
+
* - Dot notation (e.g.: $.foo.bar), no bracket notation for properties
|
|
1206
|
+
* - Array notation (e.g.: [0])
|
|
1207
|
+
*/
|
|
1208
|
+
declare class JsonPathPipe implements PipeTransform {
|
|
1209
|
+
transform(value: any, path?: string): any;
|
|
1210
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonPathPipe, never>;
|
|
1211
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<JsonPathPipe, "mngJsonPath", true>;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
type TransformOptsType = {
|
|
1215
|
+
encodeParams?: boolean;
|
|
1216
|
+
};
|
|
1217
|
+
declare class ParametrizePipe implements PipeTransform {
|
|
1218
|
+
private jsonPath;
|
|
1219
|
+
transform(value: unknown, itemId?: IdType, item?: any, data?: Record<string, any>, opts?: TransformOptsType): any;
|
|
1220
|
+
private transformString;
|
|
1221
|
+
private parametrizeStringAsRouterLink;
|
|
1222
|
+
private parametrizeString;
|
|
1223
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ParametrizePipe, never>;
|
|
1224
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ParametrizePipe, "mngParametrize", true>;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
declare class TemplatePipe implements PipeTransform {
|
|
1228
|
+
private parametrizePipe;
|
|
1229
|
+
transform(value: unknown, template?: string): any;
|
|
1230
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TemplatePipe, never>;
|
|
1231
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TemplatePipe, "template", true>;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
type EffectWithDepsValues<T> = {
|
|
1235
|
+
[K in keyof T]: () => T[K];
|
|
1236
|
+
};
|
|
1237
|
+
/**
|
|
1238
|
+
* Effect function with explicit declaration of dependencies. Dependencies will be tracked, whereas the main execution will not be.
|
|
1239
|
+
*
|
|
1240
|
+
* @param deps Array of dependencies to be tracked.
|
|
1241
|
+
* @param fn Function where dependencies will no longer be tracked.
|
|
1242
|
+
* @param opts Additional options:
|
|
1243
|
+
* - firstOnly Executes effect only once, then destroy it.
|
|
1244
|
+
*/
|
|
1245
|
+
declare function effectWithDeps<Input extends readonly unknown[], Params = Input>(deps: readonly [...EffectWithDepsValues<Input>], fn: (deps: Params) => void, opts?: {
|
|
1246
|
+
firstOnly?: boolean;
|
|
1247
|
+
}): EffectRef;
|
|
1248
|
+
|
|
1249
|
+
declare function TypeName(typeName: string): ClassDecorator;
|
|
1250
|
+
declare function EnumName(typeName: string): ClassDecorator;
|
|
1251
|
+
|
|
1252
|
+
declare const reflectTypeNameKey = "typeName";
|
|
1253
|
+
declare const reflectEnumNameKey = "enumName";
|
|
1254
|
+
/**
|
|
1255
|
+
* Defines type name decorator.
|
|
1256
|
+
* @param targetType class.
|
|
1257
|
+
* @param typeName Name of the type.
|
|
1258
|
+
*/
|
|
1259
|
+
declare function defineReflectTypeName(targetType: ClassType<any>, typeName: string): void;
|
|
1260
|
+
/**
|
|
1261
|
+
* Defines enum name decorator.
|
|
1262
|
+
* @param targetType enum object.
|
|
1263
|
+
* @param enumName Name of the enum.
|
|
1264
|
+
*/
|
|
1265
|
+
declare function defineReflectEnumName(targetType: EnumType, enumName: string): void;
|
|
1266
|
+
/**
|
|
1267
|
+
* Gets type name from reflect metadata.
|
|
1268
|
+
* @param type Class.
|
|
1269
|
+
*/
|
|
1270
|
+
declare function findReflectTypeName<T>(type?: ClassType<T>): string | null;
|
|
1271
|
+
/**
|
|
1272
|
+
* Gets type name from either decorator or reflect metadata.
|
|
1273
|
+
* @param type Class.
|
|
1274
|
+
*/
|
|
1275
|
+
declare function reflectTypeNameExists(type: ClassType<any>): boolean;
|
|
1276
|
+
/**
|
|
1277
|
+
* Gets enum name from either decorator or reflect metadata.
|
|
1278
|
+
* @param enumType Class.
|
|
1279
|
+
*/
|
|
1280
|
+
declare function findReflectEnumName(enumType: EnumType): string | null;
|
|
1281
|
+
|
|
1282
|
+
interface RegistryTypeMap {
|
|
1283
|
+
[index: string]: ClassType<any>;
|
|
1284
|
+
}
|
|
1285
|
+
interface RegistryEnumMap {
|
|
1286
|
+
[index: string]: EnumType;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
declare class TypeRegistry {
|
|
1290
|
+
private static _instance;
|
|
1291
|
+
private readonly _logCategory;
|
|
1292
|
+
private readonly _typeMap;
|
|
1293
|
+
private readonly _enumMap;
|
|
1294
|
+
get typeMap(): RegistryTypeMap;
|
|
1295
|
+
get enumMap(): RegistryEnumMap;
|
|
1296
|
+
/**
|
|
1297
|
+
* Only use one instance of object (out of Angular context)
|
|
1298
|
+
*/
|
|
1299
|
+
static get(): TypeRegistry;
|
|
1300
|
+
findAttributeDefinitionByClassType(type: ClassType<any>, attributeName: string): ClassAttributeDef | null;
|
|
1301
|
+
findAttributeDefinition(typeName: string, attributeName: string): ClassAttributeDef | null;
|
|
1302
|
+
findAttributesDefinitionByClassType(type: ClassType<any>): Array<ClassAttributeDef> | null;
|
|
1303
|
+
findAttributesDefinition(typeName: string): Array<ClassAttributeDef> | null;
|
|
1304
|
+
findByClassType(type: ClassType<any>): any;
|
|
1305
|
+
findType(typeName: string): any;
|
|
1306
|
+
findEnum(enumName: string): any;
|
|
1307
|
+
registerTypes(types: RegistryTypeMap): void;
|
|
1308
|
+
registerType(type: ClassType<any>, optTypeName?: string): void;
|
|
1309
|
+
registerEnums(enums: RegistryEnumMap): void;
|
|
1310
|
+
registerEnum(enumType: EnumType, enumName: string): void;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
type BreadcrumbType = string | string[] | BreadcrumbMenuItem | BreadcrumbMenuItem[] | ((routeUrl: string, route: ActivatedRouteSnapshot) => BreadcrumbMenuItem[]);
|
|
1314
|
+
interface BreadcrumbMenuItem extends CommonsMenuItem {
|
|
1315
|
+
isHome?: boolean;
|
|
1316
|
+
}
|
|
1317
|
+
interface CommonsRouteData extends Data {
|
|
1318
|
+
breadcrumb?: BreadcrumbType | null;
|
|
1319
|
+
pageTitle?: string;
|
|
1320
|
+
menuItems?: Array<CommonsMenuItem>;
|
|
1321
|
+
permissions?: APermissions;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
declare class RoutesBuilder {
|
|
1325
|
+
private routes;
|
|
1326
|
+
/**
|
|
1327
|
+
* Adds an Angular route to the current route configuration.
|
|
1328
|
+
*
|
|
1329
|
+
* @param {Route} route - The Angular route object to be added.
|
|
1330
|
+
* @param {RouteBuilderAdjustFnType} [builderAdjustFn] - Optional function to adjust the route builder before adding.
|
|
1331
|
+
*/
|
|
1332
|
+
addFromNgRoute(route: Route, builderAdjustFn?: RouteBuilderAdjustFnType): this;
|
|
1333
|
+
/**
|
|
1334
|
+
* Adds a route redirect to the Angular route.
|
|
1335
|
+
*
|
|
1336
|
+
* @param {string} path - The path for the redirect.
|
|
1337
|
+
* @param {string} redirectTo - The target route to redirect.
|
|
1338
|
+
* @param {'full' | 'prefix'} pathMatch - The matching strategy for the redirect. Default is 'prefix'.
|
|
1339
|
+
*/
|
|
1340
|
+
addRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): this;
|
|
1341
|
+
/**
|
|
1342
|
+
* Adds a route to the routes.
|
|
1343
|
+
*
|
|
1344
|
+
* @param {RouteBuilder} routeBuilder - The route builder object representing the route to be added.
|
|
1345
|
+
*/
|
|
1346
|
+
add(routeBuilder: RouteBuilder): this;
|
|
1347
|
+
build(): Routes;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Creates a new instance of the RoutesBuilder class.
|
|
1351
|
+
*
|
|
1352
|
+
* @return {RoutesBuilder} A new instance of the RoutesBuilder class.
|
|
1353
|
+
*/
|
|
1354
|
+
declare function createRoutes(): RoutesBuilder;
|
|
1355
|
+
|
|
1356
|
+
type RouteBuilderAdjustFnType = (builder: RouteBuilder) => void;
|
|
1357
|
+
declare class RouteBuilder {
|
|
1358
|
+
protected readonly route: Route;
|
|
1359
|
+
private routePath;
|
|
1360
|
+
protected routeData: CommonsRouteData;
|
|
1361
|
+
private root?;
|
|
1362
|
+
private parent?;
|
|
1363
|
+
private children;
|
|
1364
|
+
private menuItem?;
|
|
1365
|
+
private menuItemChildren;
|
|
1366
|
+
private menuItemChildrenAfter;
|
|
1367
|
+
private permissions?;
|
|
1368
|
+
constructor(route: Route);
|
|
1369
|
+
/**
|
|
1370
|
+
* Sets the link to root Routes builder.
|
|
1371
|
+
*
|
|
1372
|
+
* @param {RoutesBuilder} routesBuilder - The routes builder to set as the root.
|
|
1373
|
+
*/
|
|
1374
|
+
withRoot(routesBuilder: RoutesBuilder): this;
|
|
1375
|
+
/**
|
|
1376
|
+
* Sets the link to parent Route builder.
|
|
1377
|
+
*
|
|
1378
|
+
* @param {RouteBuilder} parent - The parent route builder.
|
|
1379
|
+
*/
|
|
1380
|
+
withParent(parent: RouteBuilder): this;
|
|
1381
|
+
/**
|
|
1382
|
+
* Sets the breadcrumb.
|
|
1383
|
+
*
|
|
1384
|
+
* @param {BreadcrumbType} breadcrumb - Breadcrumb configuration.
|
|
1385
|
+
*/
|
|
1386
|
+
withBreadcrumb(breadcrumb: BreadcrumbType): this;
|
|
1387
|
+
/**
|
|
1388
|
+
* Sets the page title for the current route.
|
|
1389
|
+
*
|
|
1390
|
+
* @param {string} pageTitle - The title of the page.
|
|
1391
|
+
*/
|
|
1392
|
+
withPageTitle(pageTitle: string): this;
|
|
1393
|
+
/**
|
|
1394
|
+
* Sets the page title and the breadcrumb.
|
|
1395
|
+
*
|
|
1396
|
+
* @param {string} title - The title of the page and breadcrumb.
|
|
1397
|
+
*/
|
|
1398
|
+
withTitle(title: string): this;
|
|
1399
|
+
/**
|
|
1400
|
+
* Adds a can activate guard to route.
|
|
1401
|
+
*
|
|
1402
|
+
* @param {CanActivateFn} fn - The CanActivate function to be added.
|
|
1403
|
+
*/
|
|
1404
|
+
withCanActivate(fn: CanActivateFn): this;
|
|
1405
|
+
/**
|
|
1406
|
+
* Adds a can deactivate guard to route.
|
|
1407
|
+
*
|
|
1408
|
+
* @param {CanDeactivateFn} fn - The CanActivate function to be added.
|
|
1409
|
+
*/
|
|
1410
|
+
withCanDeactivate(fn: CanDeactivateFn<any>): this;
|
|
1411
|
+
/**
|
|
1412
|
+
* Adds a resolver to route.
|
|
1413
|
+
*
|
|
1414
|
+
* @param {string} name - Name of the resolver.
|
|
1415
|
+
* @param {CanDeactivateFn} fn - The CanActivate function to be added.
|
|
1416
|
+
*/
|
|
1417
|
+
withResolver(name: string, fn: ResolveFn<any>): this;
|
|
1418
|
+
/**
|
|
1419
|
+
* Adds a provider to the route.
|
|
1420
|
+
*
|
|
1421
|
+
* @param {Provider | EnvironmentProviders} provider - The provider to add.
|
|
1422
|
+
*/
|
|
1423
|
+
withProvider(provider: Provider | EnvironmentProviders): this;
|
|
1424
|
+
/**
|
|
1425
|
+
* Sets the data for the route.
|
|
1426
|
+
*
|
|
1427
|
+
* @param {CommonsRouteData} data - The data to set for the route.
|
|
1428
|
+
* @param {boolean} [merge=true] - If the data should be merged with current data setup (true by default) - page title and breadcrumb config are carried over.
|
|
1429
|
+
*/
|
|
1430
|
+
withData(data: CommonsRouteData, merge?: boolean): this;
|
|
1431
|
+
/**
|
|
1432
|
+
* Updates the menu item of route. Merging with current configuration (set with {withMenuItem}) takes place.
|
|
1433
|
+
*
|
|
1434
|
+
* @param {CommonsMenuItem} opts - The opts properties to be merged on existing menu item for route.
|
|
1435
|
+
*/
|
|
1436
|
+
withMenuItemOpts(opts: CommonsMenuItem): this;
|
|
1437
|
+
/**
|
|
1438
|
+
* Sets the menu item (basic). For more options, see the {withMenuItemFromOpts}.
|
|
1439
|
+
*
|
|
1440
|
+
* @param {string} [icon] - The icon for the menu item.
|
|
1441
|
+
* @param {string} [label] - The label for the menu item.
|
|
1442
|
+
* @param {Array<string>} [routerLink] - The router link for the menu item.
|
|
1443
|
+
* @param {boolean} [breadcrumb=false] - Indicates whether to display breadcrumb for the menu item.
|
|
1444
|
+
*/
|
|
1445
|
+
withMenuItem(icon?: string, label?: string, routerLink?: Array<string>, breadcrumb?: boolean): this;
|
|
1446
|
+
/**
|
|
1447
|
+
* Adds menu item child to route's menu item. If no menu item is present, children will be appended directly to parent/root menu item.
|
|
1448
|
+
*
|
|
1449
|
+
* @param {string} [icon] - The icon for the menu item.
|
|
1450
|
+
* @param {string} [label] - The label for the menu item.
|
|
1451
|
+
* @param {Array<string>} [routerLink] - The router link for the menu item.
|
|
1452
|
+
* @param {boolean} [afterRouteChildren=false] If false, menu item child will be appended before route's children menu items, at the end otherwise.
|
|
1453
|
+
*/
|
|
1454
|
+
withMenuItemChild(icon?: string, label?: string, routerLink?: Array<string>, afterRouteChildren?: boolean): this;
|
|
1455
|
+
/**
|
|
1456
|
+
* Adds menu item child from opts to route's menu item. If no menu item is present, children will be appended directly to parent/root menu item.
|
|
1457
|
+
*
|
|
1458
|
+
* @param {CommonsMenuItem} opts - The opts properties to be merged on existing menu item for route.
|
|
1459
|
+
* @param {boolean} [afterRouteChildren=false] If false, menu item child will be appended before route's children menu items, at the end otherwise.
|
|
1460
|
+
*/
|
|
1461
|
+
withMenuItemChildFromOpts(opts: CommonsMenuItem, afterRouteChildren?: boolean): this;
|
|
1462
|
+
/**
|
|
1463
|
+
* Sets the menu item's children to be generated lazily from route's lazy loaded routes after the chunk is loaded to runtime.
|
|
1464
|
+
*/
|
|
1465
|
+
withMenuItemLazyChildren(): this;
|
|
1466
|
+
/**
|
|
1467
|
+
* Sets the permissions on the route.
|
|
1468
|
+
*
|
|
1469
|
+
* @param {APermissions} permissions - The permissions to be set on the route.
|
|
1470
|
+
*/
|
|
1471
|
+
withPermissions(permissions: APermissions): this;
|
|
1472
|
+
/**
|
|
1473
|
+
* Adds a child route to the current route.
|
|
1474
|
+
*
|
|
1475
|
+
* @param {string} path - The path of the child route.
|
|
1476
|
+
* @param {Type<any>} component - The component associated with the child route.
|
|
1477
|
+
* @param {RouteBuilderAdjustFnType} [adjustFn] - An optional function to adjust the child route builder.
|
|
1478
|
+
*/
|
|
1479
|
+
addChild(path: string, component: Type<any>, adjustFn?: RouteBuilderAdjustFnType): this;
|
|
1480
|
+
/**
|
|
1481
|
+
* Adds a child builder to the current route.
|
|
1482
|
+
*
|
|
1483
|
+
* @param {RouteBuilder} builder - The child builder to be added.
|
|
1484
|
+
* @return {this} - The current builder with the added child builder.
|
|
1485
|
+
*/
|
|
1486
|
+
addChildBuilder(builder: RouteBuilder): this;
|
|
1487
|
+
/**
|
|
1488
|
+
* Builds an Angular route based on configurations.
|
|
1489
|
+
*
|
|
1490
|
+
* @returns {Route} The built Angular route.
|
|
1491
|
+
*/
|
|
1492
|
+
build(): Route;
|
|
1493
|
+
/**
|
|
1494
|
+
* Builds the menu items.
|
|
1495
|
+
*
|
|
1496
|
+
* @returns {Array<CommonsMenuItem>} - The built menu items.
|
|
1497
|
+
*/
|
|
1498
|
+
private buildMenu;
|
|
1499
|
+
protected findMenuItemPermissions(): APermissions | undefined;
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Creates a new instance of RouteBuilder with the given path and component.
|
|
1503
|
+
*
|
|
1504
|
+
* @param {string} path - The path for the route.
|
|
1505
|
+
* @param {Type<any>} component - The component for the route.
|
|
1506
|
+
* @return {RouteBuilder} - A new instance of RouteBuilder.
|
|
1507
|
+
*/
|
|
1508
|
+
declare function createRoute(path: string, component: Type<any>): RouteBuilder;
|
|
1509
|
+
/**
|
|
1510
|
+
* Creates a redirect route for the given path.
|
|
1511
|
+
*
|
|
1512
|
+
* @param {string} path - The path to match against.
|
|
1513
|
+
* @param {string} redirectTo - The URL path to redirect to.
|
|
1514
|
+
* @param {'full' | 'prefix'} [pathMatch='prefix'] - The path matching strategy ('full' or 'prefix').
|
|
1515
|
+
* @return {RouteBuilder} - A new instance of the RouteBuilder class with the redirect route configuration.
|
|
1516
|
+
*/
|
|
1517
|
+
declare function createRouteRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): RouteBuilder;
|
|
1518
|
+
/**
|
|
1519
|
+
* Creates a lazy route module (or routes).
|
|
1520
|
+
*
|
|
1521
|
+
* @param {string} path - The path for the route.
|
|
1522
|
+
* @param {LoadChildren} loadChildren - The function that loads the lazy module (or routes).
|
|
1523
|
+
* @param {Array<any>} [canMatch] - An optional array of objects that can match the route.
|
|
1524
|
+
* @returns {RouteBuilder} - A new instance of RouteBuilder class.
|
|
1525
|
+
*/
|
|
1526
|
+
declare function createChildrenLazyRoute(path: string, loadChildren: LoadChildren, canMatch?: Array<any>): RouteBuilder;
|
|
1527
|
+
/**
|
|
1528
|
+
* Creates a lazy route component.
|
|
1529
|
+
*
|
|
1530
|
+
* @param {string} path - The path for the route.
|
|
1531
|
+
* @param {() => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>} loadComponent - The function that loads the component for the route.
|
|
1532
|
+
* @param {Array<any>} [canMatch] - The array of values that determine if the route can match.
|
|
1533
|
+
* @returns {RouteBuilder} - An instance of RouteBuilder with the created route.
|
|
1534
|
+
*/
|
|
1535
|
+
declare function createLazyRoute(path: string, loadComponent: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>, canMatch?: Array<any>): RouteBuilder;
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Maps an Observable of data with optional totalCount and data to a data list result object with provided defaults of empty array and count 0.
|
|
1539
|
+
*/
|
|
1540
|
+
declare function mapToDataList<Item>(): OperatorFunction<{
|
|
1541
|
+
data?: Item[];
|
|
1542
|
+
totalCount?: number;
|
|
1543
|
+
}, DataListResult<Item>>;
|
|
1544
|
+
|
|
1545
|
+
declare const permissionGuard: CanActivateFn;
|
|
1546
|
+
|
|
1547
|
+
declare class PermissionService {
|
|
1548
|
+
private readonly injector;
|
|
1549
|
+
private readonly commons;
|
|
1550
|
+
private readonly logger;
|
|
1551
|
+
private userRoles$;
|
|
1552
|
+
canActivateRoute(permissions: APermissions, route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
1553
|
+
private canActivateRouteAll;
|
|
1554
|
+
private canActivateRouteAny;
|
|
1555
|
+
private canActivateRouteService;
|
|
1556
|
+
isMenuItemVisible(permissions: APermissions, menuItem: CommonsMenuItem): Observable<boolean>;
|
|
1557
|
+
private isMenuItemVisibleAll;
|
|
1558
|
+
private isMenuItemVisibleAny;
|
|
1559
|
+
private isMenuItemVisibleService;
|
|
1560
|
+
isActionVisible(permissions: APermissions, actionCtx?: IActionContextValidation<any, any>, route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
1561
|
+
private isActionVisibleAll;
|
|
1562
|
+
private isActionVisibleAny;
|
|
1563
|
+
private isActionVisibleService;
|
|
1564
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PermissionService, never>;
|
|
1565
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PermissionService>;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
declare function isPermitted(permissions: APermissions, userRoles: Array<string>): boolean;
|
|
1569
|
+
declare function isRbacPermitted(permissions: Permissions.Roles, userRoles: Array<string>): boolean;
|
|
1570
|
+
|
|
1571
|
+
declare enum CommonsInitEventEnum {
|
|
1572
|
+
CommonsInitStart = 0,
|
|
1573
|
+
ConfigSourceModuleLoaded = 1,
|
|
1574
|
+
ConfigSourceProjectEnvLoaded = 2,
|
|
1575
|
+
ConfigSourceJsonAdded = 3,
|
|
1576
|
+
ConfigSourceJsonLoaded = 4,
|
|
1577
|
+
CommonsInitEnd = 5,
|
|
1578
|
+
CommonsInitError = 6
|
|
1579
|
+
}
|
|
1580
|
+
declare class CommonsInitService {
|
|
1581
|
+
private readonly logger;
|
|
1582
|
+
private readonly logPublishers;
|
|
1583
|
+
private readonly config;
|
|
1584
|
+
private readonly commons;
|
|
1585
|
+
private readonly commonsRouter;
|
|
1586
|
+
private readonly moduleConfig;
|
|
1587
|
+
private readonly commonsInitializers;
|
|
1588
|
+
private isInitialized;
|
|
1589
|
+
private httpClient;
|
|
1590
|
+
private isInitializedSubject;
|
|
1591
|
+
private commonsInitServiceEvents;
|
|
1592
|
+
get events$(): Observable<CommonsInitEventEnum>;
|
|
1593
|
+
get isInitialized$(): Observable<boolean>;
|
|
1594
|
+
initialize(handler: HttpBackend): Observable<void>;
|
|
1595
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsInitService, never>;
|
|
1596
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsInitService>;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
declare function commonsInitializerProvider(handler: HttpBackend, commonsInit: CommonsInitService): () => Observable<void>;
|
|
1600
|
+
|
|
1601
|
+
declare const BROWSER_STORAGE_IT: InjectionToken<Storage>;
|
|
1602
|
+
|
|
1603
|
+
declare const COMMONS_INITIALIZER_IT: InjectionToken<readonly (() => Observable<unknown>)[]>;
|
|
1604
|
+
|
|
1605
|
+
declare const LOG_PUBLISHERS: InjectionToken<ILogPublisher[]>;
|
|
1606
|
+
|
|
1607
|
+
declare class CommonsService {
|
|
1608
|
+
private readonly logger;
|
|
1609
|
+
private readonly router;
|
|
1610
|
+
private readonly primengConfig;
|
|
1611
|
+
private readonly translate;
|
|
1612
|
+
private readonly titleService;
|
|
1613
|
+
private readonly moduleConfig;
|
|
1614
|
+
private readonly localStorage;
|
|
1615
|
+
private readonly destroyRef;
|
|
1616
|
+
readonly breadcrumbHome: i0.WritableSignal<CommonsMenuItem | null>;
|
|
1617
|
+
readonly breadcrumbs: i0.WritableSignal<CommonsMenuItem[]>;
|
|
1618
|
+
private breadcrumbsTranslateSubscription?;
|
|
1619
|
+
private breadcrumbHomeTranslateSubscription?;
|
|
1620
|
+
user: i0.WritableSignal<IUser | undefined>;
|
|
1621
|
+
userRoles: i0.WritableSignal<string[]>;
|
|
1622
|
+
appName: i0.WritableSignal<string>;
|
|
1623
|
+
appOwner: i0.WritableSignal<string>;
|
|
1624
|
+
getDefaultLocale(): string;
|
|
1625
|
+
appLocales: i0.WritableSignal<string[]>;
|
|
1626
|
+
private _appLocale;
|
|
1627
|
+
appLocale: i0.Signal<string>;
|
|
1628
|
+
private initAppLocale;
|
|
1629
|
+
setAppLocale(language: string): void;
|
|
1630
|
+
clearAppLocale(): void;
|
|
1631
|
+
appDataLocales: i0.WritableSignal<string[]>;
|
|
1632
|
+
private _appDataLocale;
|
|
1633
|
+
appDataLocale: i0.Signal<string>;
|
|
1634
|
+
private initAppDataLocale;
|
|
1635
|
+
setAppDataLocale(dataLocale: string): void;
|
|
1636
|
+
clearAppDataLocale(): void;
|
|
1637
|
+
appVersion: i0.WritableSignal<_mediusinc_mng_commons_core.VersionConfigType>;
|
|
1638
|
+
constructor();
|
|
1639
|
+
initialize(): void;
|
|
1640
|
+
findBreadcrumbItem(item: CommonsMenuItem): CommonsMenuItem | null;
|
|
1641
|
+
updateBreadcrumbItem(item: CommonsMenuItem): boolean;
|
|
1642
|
+
private updateBreadcrumbs;
|
|
1643
|
+
private generateHomeBreadcrumb;
|
|
1644
|
+
private generateBreadcrumbs;
|
|
1645
|
+
private createBreadcrumb;
|
|
1646
|
+
setPageTitle(title?: string): void;
|
|
1647
|
+
private formatPageTitle;
|
|
1648
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsService, never>;
|
|
1649
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsService>;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
declare class CommonsRouterService {
|
|
1653
|
+
private readonly router;
|
|
1654
|
+
private readonly logger;
|
|
1655
|
+
private readonly routesLoadedPropKey;
|
|
1656
|
+
private currentNavigationPath?;
|
|
1657
|
+
private currentNavigationModuleKeys;
|
|
1658
|
+
private lazyLoadedRoutesConfig;
|
|
1659
|
+
constructor();
|
|
1660
|
+
getRouteLoadedChildren(path: string | Array<string>): Routes | undefined;
|
|
1661
|
+
getRouteLoadedChildren$(path: string | Array<string>): Observable<Routes>;
|
|
1662
|
+
initialize(): void;
|
|
1663
|
+
private startNavigation;
|
|
1664
|
+
private finishNavigation;
|
|
1665
|
+
private markNavigationConfigLoad;
|
|
1666
|
+
private getLoadedRoutesFromRoute;
|
|
1667
|
+
/**
|
|
1668
|
+
* Search for route config by module path by recursive scanning of router config tree.
|
|
1669
|
+
* @param modulePath Path of module that is searched.
|
|
1670
|
+
* @param routes Routes to be scanned. If not provided, it starts on root router config.
|
|
1671
|
+
* @private
|
|
1672
|
+
*/
|
|
1673
|
+
private findRouteInRouteConfig;
|
|
1674
|
+
/**
|
|
1675
|
+
* Finds longest path match of source to match string. If match is '', it is considered as a match in Angular routing.
|
|
1676
|
+
* @param source Source string from on which comparison is based.
|
|
1677
|
+
* @param match Match string to which the source is matched to.
|
|
1678
|
+
* @private
|
|
1679
|
+
*/
|
|
1680
|
+
private findLongestPathMatch;
|
|
1681
|
+
private getOrCreateRouteForModule;
|
|
1682
|
+
private getModulePathFromRouterLink;
|
|
1683
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsRouterService, never>;
|
|
1684
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsRouterService>;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
type LocalstorageConfigValueType = string | number | Date | object | boolean;
|
|
1688
|
+
declare class CommonsStorageService {
|
|
1689
|
+
private readonly localStorage;
|
|
1690
|
+
private readonly _configKey;
|
|
1691
|
+
private buildLocalStorageKey;
|
|
1692
|
+
getItem<T = LocalstorageConfigValueType>(type: string, key: string): T | undefined;
|
|
1693
|
+
setItem<T = LocalstorageConfigValueType>(type: string, key: string, value: T): void;
|
|
1694
|
+
removeItem(type: string, key: string): void;
|
|
1695
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsStorageService, never>;
|
|
1696
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsStorageService>;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
declare enum StyleSizeEnum {
|
|
1700
|
+
ExtraSmall = 0,
|
|
1701
|
+
Small = 1,
|
|
1702
|
+
Normal = 2,
|
|
1703
|
+
Large = 3,
|
|
1704
|
+
ExtraLarge = 4
|
|
1705
|
+
}
|
|
1706
|
+
declare enum StyleLevelEnum {
|
|
1707
|
+
Default = 0,
|
|
1708
|
+
Primary = 1,
|
|
1709
|
+
Secondary = 2,
|
|
1710
|
+
Info = 3,
|
|
1711
|
+
Help = 4,
|
|
1712
|
+
Success = 5,
|
|
1713
|
+
Warning = 6,
|
|
1714
|
+
Danger = 7,
|
|
1715
|
+
Contrast = 8
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
declare class Styles {
|
|
1719
|
+
static readonly BUTTON_ROUNDED_WIDTH_XS = 28;
|
|
1720
|
+
static readonly BUTTON_ROUNDED_WIDTH_SM = 31.5;
|
|
1721
|
+
static readonly BUTTON_ROUNDED_WIDTH = 35;
|
|
1722
|
+
static readonly BUTTON_ROUNDED_WIDTH_LG = 38.5;
|
|
1723
|
+
static readonly BUTTON_ROUNDED_WIDTH_XL = 42;
|
|
1724
|
+
static readonly ACTION_BUTTON_MARGIN_X = 2.1;
|
|
1725
|
+
static readonly TABLE_CELL_PADDING_X_SM = 7;
|
|
1726
|
+
static readonly TABLE_CELL_PADDING_X = 14;
|
|
1727
|
+
static readonly TABLE_CELL_PADDING_X_LG = 17.5;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
declare enum CommonsFeatureTypeEnum {
|
|
1731
|
+
Layout = 0,
|
|
1732
|
+
Table = 1,
|
|
1733
|
+
Tableview = 2,
|
|
1734
|
+
DataApiAsClassV1 = 3
|
|
1735
|
+
}
|
|
1736
|
+
interface CommonsFeature {
|
|
1737
|
+
type: CommonsFeatureTypeEnum;
|
|
1738
|
+
providers: (Provider | EnvironmentProviders)[];
|
|
1739
|
+
}
|
|
1740
|
+
declare function provideCommons(config?: CommonsModuleConfig, ...features: CommonsFeature[]): (Provider | EnvironmentProviders)[];
|
|
1741
|
+
|
|
1742
|
+
export { ACommonsErrorBase, APermissions, BROWSER_STORAGE_IT, BooleanPipe, COMMONS_INITIALIZER_IT, COMMONS_MODULE_CONFIG_IT, ClassMapPipe, CommonsConfigurationService, CommonsErrorHandler, CommonsFeatureTypeEnum, CommonsHttpError, CommonsInitEventEnum, CommonsInitService, CommonsInternalError, CommonsRouterService, CommonsService, CommonsStorageService, ComponentDirective, DataProviderInst, EnumName, EnumPipe, EnumerateAsyncPipe, EnumeratePipe, FilterMatchMode, GetterPipe, I18nPropertyPipe, JsonPathPipe, LOG_PUBLISHERS, LogLevelEnum, LogPublisherConsoleService, LoggerService, NotificationWrapperComponent, ParametrizePipe, PermissionService, PermissionTypeEnum, Permissions, RerenderDirective, RouteBuilder, RoutesBuilder, StyleLevelEnum, StyleSizeEnum, Styles, TemplateDirective, TemplatePipe, TypeName, TypeRegistry, adjustRouteMenuLazyChildrenRouterLinks, angularDateFormatHasSeconds, angularDateFormatHasTime, appendRoutePathToBasePath, boolean$Attribute, booleanOrUndefinedAttribute, commonsActionErrorContextToString, commonsErrorToString, commonsInitializerProvider, copyDataListParams, createChildrenLazyRoute, createLazyRoute, createRoute, createRouteRedirect, createRoutes, dataListParamsFilterToUrlQuery, dataListParamsFilterValueToUrlString, dataListParamsFiltersToUrlQuery, dataListParamsSortToUrlQuery, dataListParamsToUrlQuery, dateToIsoString, defineReflectEnumName, defineReflectTypeName, doesUrlMatchRouterLink, effectWithDeps, errorCauseToString, errorToString, escapeHtml, escapeHtmlAny, findReflectEnumName, findReflectTypeName, findTemplateByName, flattenObjectKeys, fromAngularDateFormatToPrime, fromAngularNumberFormatToFractions, fromEnumConstantsAsValueArray, fromEnumValuesAsValueArray, fromSubscribeError, fromTableLoadToDataListParams, fromUrlQueryToDataListParams, getEnumConstantName, getEnumConstantNameFromObject, getEnumConstantNames, getEnumConstantNamesFromObject, getEnumConstantValues, getEnumConstantValuesAsNumber, getEnumConstantValuesAsString, getEnumerationI18nBaseKey, getErrorLogLevel, getErrorName, getHttpErrorResponse, getHttpErrorResponseStatus, getHttpErrorResponseStatusText, getI18n, getI18nAsync, getI18nErrorParams, getI18nForError, getI18nTypeGroupKey, getI18nTypeKeyBasePath, getI18nTypeName, getI18nTypeNameAsync, getI18nTypeParams, getI18nTypeParamsAsync, getI18nTypePropertyKey, getI18nTypeTabKey, getObjectGetters, getObjectProperties, getObjectPropertyByPath, httpErrorResponseToString, isHttpErrorResponse, isPermitted, isRbacPermitted, itemIdToDefined, itemIdToNumber, itemIdToString, mapToDataList, mergeDataListParamsWithDefaults, narrowI18nToTranslation, number$Attribute, objectDeepCopy, objectDeepMerge, permissionGuard, populateI18nParams, populateI18nTypeParams, provideCommons, reflectEnumNameKey, reflectTypeNameExists, reflectTypeNameKey, removeRouteEmptyPathSegments, selectEnumerationI18n, selectI18n, stringify, throwError, toEnumerationI18nEnumerate, toObservable, toastMessage, valueToDefined };
|
|
1743
|
+
export type { ActionData, ActionErrorContextToStringOptionsType, ActionParameters, ArrayItemType, BreadcrumbMenuItem, BreadcrumbType, ClassAttributeDef, ClassFunctionKeyParam1ObjKeyExtendsOfTargetType, ClassFunctionKeysType, ClassFunctionKeysWithAnyArgsAndReturnType, ClassFunctionKeysWithParamAndReturnType, ClassFunctionKeysWithReturnType, ClassOptType, ClassType, ColorScheme, CommonKeyof3, CommonPropsObjType3, CommonsErrorBaseOptions, CommonsFeature, CommonsFilterMetadata, CommonsMenuItem, CommonsModuleConfig, CommonsRouteData, CommonsSerializationConfig, DataListFilter, DataListFilterBaseValueType, DataListFilterFromUrlValueType, DataListFilterValueType, DataListFiltersType, DataListParams, DataListResult, DataListSort, DeepCopyOptions, EnumConstantType, EnumFromProperty, EnumType, EnumValue, EnumeratePipeI18nInternal, ErrorCauseToStringOptionsType, ErrorToStringOptionsBaseType, ErrorToStringOptionsType, ErrorTypes, FilterMatchModeExtendedType, FilterMatchModeType, GetterFn, HttpErrorResponseToStringOptionsType, I18nMissingTranslationStrategy, IActionContextValidation, IActionDescriptor, IColumnDescriptor, ICommonsActionError, ICommonsActionErrorContext, ICommonsError, IDataProvider, IEditorDescriptor, IEnumDescriptor, IFilterDescriptor, ILogPublisher, ILoggerService, ILookupDataProvider, ILookupDataProviderLookup, ILookupDescriptor, IModelDescriptor, IPermissionService, ITableDescriptor, ITableviewDescriptor, IUser, IdType, InternalCommonsMenuItem, ItemOrObservable, KeyOfType, KeyofAndOfType, LocalstorageConfigValueType, LogConfig, LogEntry, LookupDataProviderLookupFnType, Nullable, ObjectOptPropType, PrimitiveType, PropertyType, RegistryEnumMap, RegistryTypeMap, RouteBuilderAdjustFnType, ServiceClassOptType, ServiceClassType, SingleOrArrayType, Undefined, VersionConfig, VersionConfigFromConfiguration, VersionConfigFromHttpResource, VersionConfigFromInfo, VersionConfigType, VersionInfo, toIsoStringDateTimeOptsType, toIsoStringTypeOptType };
|