@mediusinc/mng-commons 6.2.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 +6 -6
- 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
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EnumType } from '../helpers/type-helpers';
|
|
2
|
-
import { ClassAttributeDef } from '../models/class-attribute.model';
|
|
3
|
-
import { ClassType } from '../models/class-service.model';
|
|
4
|
-
import { RegistryEnumMap, RegistryTypeMap } from './registry.model';
|
|
5
|
-
export declare class TypeRegistry {
|
|
6
|
-
private static _instance;
|
|
7
|
-
private readonly _logCategory;
|
|
8
|
-
private readonly _typeMap;
|
|
9
|
-
private readonly _enumMap;
|
|
10
|
-
get typeMap(): RegistryTypeMap;
|
|
11
|
-
get enumMap(): RegistryEnumMap;
|
|
12
|
-
/**
|
|
13
|
-
* Only use one instance of object (out of Angular context)
|
|
14
|
-
*/
|
|
15
|
-
static get(): TypeRegistry;
|
|
16
|
-
findAttributeDefinitionByClassType(type: ClassType<any>, attributeName: string): ClassAttributeDef | null;
|
|
17
|
-
findAttributeDefinition(typeName: string, attributeName: string): ClassAttributeDef | null;
|
|
18
|
-
findAttributesDefinitionByClassType(type: ClassType<any>): Array<ClassAttributeDef> | null;
|
|
19
|
-
findAttributesDefinition(typeName: string): Array<ClassAttributeDef> | null;
|
|
20
|
-
findByClassType(type: ClassType<any>): any;
|
|
21
|
-
findType(typeName: string): any;
|
|
22
|
-
findEnum(enumName: string): any;
|
|
23
|
-
registerTypes(types: RegistryTypeMap): void;
|
|
24
|
-
registerType(type: ClassType<any>, optTypeName?: string): void;
|
|
25
|
-
registerEnums(enums: RegistryEnumMap): void;
|
|
26
|
-
registerEnum(enumType: EnumType, enumName: string): void;
|
|
27
|
-
}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, Provider, Type } from '@angular/core';
|
|
2
|
-
import { CanActivateFn, CanDeactivateFn, DefaultExport, LoadChildren, ResolveFn, Route } from '@angular/router';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { CommonsMenuItem } from '../models/menu.model';
|
|
5
|
-
import { APermissions } from '../security/permissions.model';
|
|
6
|
-
import { BreadcrumbType, CommonsRouteData } from './router.model';
|
|
7
|
-
import { RoutesBuilder } from './routes-builder';
|
|
8
|
-
export type RouteBuilderAdjustFnType = (builder: RouteBuilder) => void;
|
|
9
|
-
export declare class RouteBuilder {
|
|
10
|
-
protected readonly route: Route;
|
|
11
|
-
private routePath;
|
|
12
|
-
protected routeData: CommonsRouteData;
|
|
13
|
-
private root?;
|
|
14
|
-
private parent?;
|
|
15
|
-
private children;
|
|
16
|
-
private menuItem?;
|
|
17
|
-
private menuItemChildren;
|
|
18
|
-
private menuItemChildrenAfter;
|
|
19
|
-
private permissions?;
|
|
20
|
-
constructor(route: Route);
|
|
21
|
-
/**
|
|
22
|
-
* Sets the link to root Routes builder.
|
|
23
|
-
*
|
|
24
|
-
* @param {RoutesBuilder} routesBuilder - The routes builder to set as the root.
|
|
25
|
-
*/
|
|
26
|
-
withRoot(routesBuilder: RoutesBuilder): this;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the link to parent Route builder.
|
|
29
|
-
*
|
|
30
|
-
* @param {RouteBuilder} parent - The parent route builder.
|
|
31
|
-
*/
|
|
32
|
-
withParent(parent: RouteBuilder): this;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the breadcrumb.
|
|
35
|
-
*
|
|
36
|
-
* @param {BreadcrumbType} breadcrumb - Breadcrumb configuration.
|
|
37
|
-
*/
|
|
38
|
-
withBreadcrumb(breadcrumb: BreadcrumbType): this;
|
|
39
|
-
/**
|
|
40
|
-
* Sets the page title for the current route.
|
|
41
|
-
*
|
|
42
|
-
* @param {string} pageTitle - The title of the page.
|
|
43
|
-
*/
|
|
44
|
-
withPageTitle(pageTitle: string): this;
|
|
45
|
-
/**
|
|
46
|
-
* Sets the page title and the breadcrumb.
|
|
47
|
-
*
|
|
48
|
-
* @param {string} title - The title of the page and breadcrumb.
|
|
49
|
-
*/
|
|
50
|
-
withTitle(title: string): this;
|
|
51
|
-
/**
|
|
52
|
-
* Adds a can activate guard to route.
|
|
53
|
-
*
|
|
54
|
-
* @param {CanActivateFn} fn - The CanActivate function to be added.
|
|
55
|
-
*/
|
|
56
|
-
withCanActivate(fn: CanActivateFn): this;
|
|
57
|
-
/**
|
|
58
|
-
* Adds a can deactivate guard to route.
|
|
59
|
-
*
|
|
60
|
-
* @param {CanDeactivateFn} fn - The CanActivate function to be added.
|
|
61
|
-
*/
|
|
62
|
-
withCanDeactivate(fn: CanDeactivateFn<any>): this;
|
|
63
|
-
/**
|
|
64
|
-
* Adds a resolver to route.
|
|
65
|
-
*
|
|
66
|
-
* @param {string} name - Name of the resolver.
|
|
67
|
-
* @param {CanDeactivateFn} fn - The CanActivate function to be added.
|
|
68
|
-
*/
|
|
69
|
-
withResolver(name: string, fn: ResolveFn<any>): this;
|
|
70
|
-
/**
|
|
71
|
-
* Adds a provider to the route.
|
|
72
|
-
*
|
|
73
|
-
* @param {Provider | EnvironmentProviders} provider - The provider to add.
|
|
74
|
-
*/
|
|
75
|
-
withProvider(provider: Provider | EnvironmentProviders): this;
|
|
76
|
-
/**
|
|
77
|
-
* Sets the data for the route.
|
|
78
|
-
*
|
|
79
|
-
* @param {CommonsRouteData} data - The data to set for the route.
|
|
80
|
-
* @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.
|
|
81
|
-
*/
|
|
82
|
-
withData(data: CommonsRouteData, merge?: boolean): this;
|
|
83
|
-
/**
|
|
84
|
-
* Updates the menu item of route. Merging with current configuration (set with {withMenuItem}) takes place.
|
|
85
|
-
*
|
|
86
|
-
* @param {CommonsMenuItem} opts - The opts properties to be merged on existing menu item for route.
|
|
87
|
-
*/
|
|
88
|
-
withMenuItemOpts(opts: CommonsMenuItem): this;
|
|
89
|
-
/**
|
|
90
|
-
* Sets the menu item (basic). For more options, see the {withMenuItemFromOpts}.
|
|
91
|
-
*
|
|
92
|
-
* @param {string} [icon] - The icon for the menu item.
|
|
93
|
-
* @param {string} [label] - The label for the menu item.
|
|
94
|
-
* @param {Array<string>} [routerLink] - The router link for the menu item.
|
|
95
|
-
* @param {boolean} [breadcrumb=false] - Indicates whether to display breadcrumb for the menu item.
|
|
96
|
-
*/
|
|
97
|
-
withMenuItem(icon?: string, label?: string, routerLink?: Array<string>, breadcrumb?: boolean): this;
|
|
98
|
-
/**
|
|
99
|
-
* 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.
|
|
100
|
-
*
|
|
101
|
-
* @param {string} [icon] - The icon for the menu item.
|
|
102
|
-
* @param {string} [label] - The label for the menu item.
|
|
103
|
-
* @param {Array<string>} [routerLink] - The router link for the menu item.
|
|
104
|
-
* @param {boolean} [afterRouteChildren=false] If false, menu item child will be appended before route's children menu items, at the end otherwise.
|
|
105
|
-
*/
|
|
106
|
-
withMenuItemChild(icon?: string, label?: string, routerLink?: Array<string>, afterRouteChildren?: boolean): this;
|
|
107
|
-
/**
|
|
108
|
-
* 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.
|
|
109
|
-
*
|
|
110
|
-
* @param {CommonsMenuItem} opts - The opts properties to be merged on existing menu item for route.
|
|
111
|
-
* @param {boolean} [afterRouteChildren=false] If false, menu item child will be appended before route's children menu items, at the end otherwise.
|
|
112
|
-
*/
|
|
113
|
-
withMenuItemChildFromOpts(opts: CommonsMenuItem, afterRouteChildren?: boolean): this;
|
|
114
|
-
/**
|
|
115
|
-
* Sets the menu item's children to be generated lazily from route's lazy loaded routes after the chunk is loaded to runtime.
|
|
116
|
-
*/
|
|
117
|
-
withMenuItemLazyChildren(): this;
|
|
118
|
-
/**
|
|
119
|
-
* Sets the permissions on the route.
|
|
120
|
-
*
|
|
121
|
-
* @param {APermissions} permissions - The permissions to be set on the route.
|
|
122
|
-
*/
|
|
123
|
-
withPermissions(permissions: APermissions): this;
|
|
124
|
-
/**
|
|
125
|
-
* Adds a child route to the current route.
|
|
126
|
-
*
|
|
127
|
-
* @param {string} path - The path of the child route.
|
|
128
|
-
* @param {Type<any>} component - The component associated with the child route.
|
|
129
|
-
* @param {RouteBuilderAdjustFnType} [adjustFn] - An optional function to adjust the child route builder.
|
|
130
|
-
*/
|
|
131
|
-
addChild(path: string, component: Type<any>, adjustFn?: RouteBuilderAdjustFnType): this;
|
|
132
|
-
/**
|
|
133
|
-
* Adds a child builder to the current route.
|
|
134
|
-
*
|
|
135
|
-
* @param {RouteBuilder} builder - The child builder to be added.
|
|
136
|
-
* @return {this} - The current builder with the added child builder.
|
|
137
|
-
*/
|
|
138
|
-
addChildBuilder(builder: RouteBuilder): this;
|
|
139
|
-
/**
|
|
140
|
-
* Builds an Angular route based on configurations.
|
|
141
|
-
*
|
|
142
|
-
* @returns {Route} The built Angular route.
|
|
143
|
-
*/
|
|
144
|
-
build(): Route;
|
|
145
|
-
/**
|
|
146
|
-
* Builds the menu items.
|
|
147
|
-
*
|
|
148
|
-
* @returns {Array<CommonsMenuItem>} - The built menu items.
|
|
149
|
-
*/
|
|
150
|
-
private buildMenu;
|
|
151
|
-
protected findMenuItemPermissions(): APermissions | undefined;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Creates a new instance of RouteBuilder with the given path and component.
|
|
155
|
-
*
|
|
156
|
-
* @param {string} path - The path for the route.
|
|
157
|
-
* @param {Type<any>} component - The component for the route.
|
|
158
|
-
* @return {RouteBuilder} - A new instance of RouteBuilder.
|
|
159
|
-
*/
|
|
160
|
-
export declare function createRoute(path: string, component: Type<any>): RouteBuilder;
|
|
161
|
-
/**
|
|
162
|
-
* Creates a redirect route for the given path.
|
|
163
|
-
*
|
|
164
|
-
* @param {string} path - The path to match against.
|
|
165
|
-
* @param {string} redirectTo - The URL path to redirect to.
|
|
166
|
-
* @param {'full' | 'prefix'} [pathMatch='prefix'] - The path matching strategy ('full' or 'prefix').
|
|
167
|
-
* @return {RouteBuilder} - A new instance of the RouteBuilder class with the redirect route configuration.
|
|
168
|
-
*/
|
|
169
|
-
export declare function createRouteRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): RouteBuilder;
|
|
170
|
-
/**
|
|
171
|
-
* Creates a lazy route module (or routes).
|
|
172
|
-
*
|
|
173
|
-
* @param {string} path - The path for the route.
|
|
174
|
-
* @param {LoadChildren} loadChildren - The function that loads the lazy module (or routes).
|
|
175
|
-
* @param {Array<any>} [canMatch] - An optional array of objects that can match the route.
|
|
176
|
-
* @returns {RouteBuilder} - A new instance of RouteBuilder class.
|
|
177
|
-
*/
|
|
178
|
-
export declare function createChildrenLazyRoute(path: string, loadChildren: LoadChildren, canMatch?: Array<any>): RouteBuilder;
|
|
179
|
-
/**
|
|
180
|
-
* Creates a lazy route component.
|
|
181
|
-
*
|
|
182
|
-
* @param {string} path - The path for the route.
|
|
183
|
-
* @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.
|
|
184
|
-
* @param {Array<any>} [canMatch] - The array of values that determine if the route can match.
|
|
185
|
-
* @returns {RouteBuilder} - An instance of RouteBuilder with the created route.
|
|
186
|
-
*/
|
|
187
|
-
export declare function createLazyRoute(path: string, loadComponent: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>, canMatch?: Array<any>): RouteBuilder;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, Data } from '@angular/router';
|
|
2
|
-
import { CommonsMenuItem } from '../models/menu.model';
|
|
3
|
-
import { APermissions } from '../security/permissions.model';
|
|
4
|
-
export type BreadcrumbType = string | string[] | BreadcrumbMenuItem | BreadcrumbMenuItem[] | ((routeUrl: string, route: ActivatedRouteSnapshot) => BreadcrumbMenuItem[]);
|
|
5
|
-
export interface BreadcrumbMenuItem extends CommonsMenuItem {
|
|
6
|
-
isHome?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface CommonsRouteData extends Data {
|
|
9
|
-
breadcrumb?: BreadcrumbType | null;
|
|
10
|
-
pageTitle?: string;
|
|
11
|
-
menuItems?: Array<CommonsMenuItem>;
|
|
12
|
-
permissions?: APermissions;
|
|
13
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Route, Routes } from '@angular/router';
|
|
2
|
-
import { RouteBuilder, RouteBuilderAdjustFnType } from './route-builder';
|
|
3
|
-
export declare class RoutesBuilder {
|
|
4
|
-
private routes;
|
|
5
|
-
/**
|
|
6
|
-
* Adds an Angular route to the current route configuration.
|
|
7
|
-
*
|
|
8
|
-
* @param {Route} route - The Angular route object to be added.
|
|
9
|
-
* @param {RouteBuilderAdjustFnType} [builderAdjustFn] - Optional function to adjust the route builder before adding.
|
|
10
|
-
*/
|
|
11
|
-
addFromNgRoute(route: Route, builderAdjustFn?: RouteBuilderAdjustFnType): this;
|
|
12
|
-
/**
|
|
13
|
-
* Adds a route redirect to the Angular route.
|
|
14
|
-
*
|
|
15
|
-
* @param {string} path - The path for the redirect.
|
|
16
|
-
* @param {string} redirectTo - The target route to redirect.
|
|
17
|
-
* @param {'full' | 'prefix'} pathMatch - The matching strategy for the redirect. Default is 'prefix'.
|
|
18
|
-
*/
|
|
19
|
-
addRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): this;
|
|
20
|
-
/**
|
|
21
|
-
* Adds a route to the routes.
|
|
22
|
-
*
|
|
23
|
-
* @param {RouteBuilder} routeBuilder - The route builder object representing the route to be added.
|
|
24
|
-
*/
|
|
25
|
-
add(routeBuilder: RouteBuilder): this;
|
|
26
|
-
build(): Routes;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Creates a new instance of the RoutesBuilder class.
|
|
30
|
-
*
|
|
31
|
-
* @return {RoutesBuilder} A new instance of the RoutesBuilder class.
|
|
32
|
-
*/
|
|
33
|
-
export declare function createRoutes(): RoutesBuilder;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OperatorFunction } from 'rxjs';
|
|
2
|
-
import { DataListResult } from '../data-list/data-list.model';
|
|
3
|
-
/**
|
|
4
|
-
* 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.
|
|
5
|
-
*/
|
|
6
|
-
export declare function mapToDataList<Item>(): OperatorFunction<{
|
|
7
|
-
data?: Item[];
|
|
8
|
-
totalCount?: number;
|
|
9
|
-
}, DataListResult<Item>>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { CommonsMenuItem } from '../models/menu.model';
|
|
4
|
-
import { APermissions, IActionContextValidation } from './permissions.model';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class PermissionService {
|
|
7
|
-
private readonly injector;
|
|
8
|
-
private readonly commons;
|
|
9
|
-
private readonly logger;
|
|
10
|
-
private userRoles$;
|
|
11
|
-
canActivateRoute(permissions: APermissions, route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
12
|
-
private canActivateRouteAll;
|
|
13
|
-
private canActivateRouteAny;
|
|
14
|
-
private canActivateRouteService;
|
|
15
|
-
isMenuItemVisible(permissions: APermissions, menuItem: CommonsMenuItem): Observable<boolean>;
|
|
16
|
-
private isMenuItemVisibleAll;
|
|
17
|
-
private isMenuItemVisibleAny;
|
|
18
|
-
private isMenuItemVisibleService;
|
|
19
|
-
isActionVisible(permissions: APermissions, actionCtx?: IActionContextValidation<any, any>, route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
20
|
-
private isActionVisibleAll;
|
|
21
|
-
private isActionVisibleAny;
|
|
22
|
-
private isActionVisibleService;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PermissionService, never>;
|
|
24
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PermissionService>;
|
|
25
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { ActionParameters } from '../action/action-parameters.model';
|
|
5
|
-
import { IDataProvider } from '../data-providers/base.data-provider';
|
|
6
|
-
import { IActionDescriptor } from '../descriptors/action.descriptor';
|
|
7
|
-
import { CommonsMenuItem } from '../models/menu.model';
|
|
8
|
-
export declare enum PermissionTypeEnum {
|
|
9
|
-
All = "ALL",
|
|
10
|
-
Any = "ANY",
|
|
11
|
-
Rbac = "ROLE_BASED_ACCESS_CONTROL",
|
|
12
|
-
Service = "SERVICE"
|
|
13
|
-
}
|
|
14
|
-
export interface IActionContextValidation<Item, Service = undefined> {
|
|
15
|
-
descriptor: IActionDescriptor<Item, Service>;
|
|
16
|
-
parameters: ActionParameters<Item>;
|
|
17
|
-
serviceInstance: Service;
|
|
18
|
-
dataProvider?: IDataProvider<Item, Service>;
|
|
19
|
-
}
|
|
20
|
-
export interface IPermissionService {
|
|
21
|
-
/**
|
|
22
|
-
* Determines whether a route can be activated.
|
|
23
|
-
*
|
|
24
|
-
* @param {ActivatedRouteSnapshot} route - The route snapshot object representing the current route for activation.
|
|
25
|
-
* @param {RouterStateSnapshot} state - The router state snapshot
|
|
26
|
-
*
|
|
27
|
-
* @returns {Observable<boolean>} - An observable that emits a boolean value indicating whether the route can be activated.
|
|
28
|
-
*/
|
|
29
|
-
canActivateRoute(route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
30
|
-
/**
|
|
31
|
-
* Determines the visibility of menu item.
|
|
32
|
-
*
|
|
33
|
-
* @param {CommonsMenuItem} menuItem - The menu item to check.
|
|
34
|
-
* @return {Observable<boolean>} - An observable that emits a boolean indicating
|
|
35
|
-
* whether the menu item is visible or not.
|
|
36
|
-
*/
|
|
37
|
-
isMenuitemVisible(menuItem: CommonsMenuItem): Observable<boolean>;
|
|
38
|
-
/**
|
|
39
|
-
* Determines if the specified action is visible based on the action context and route.
|
|
40
|
-
*
|
|
41
|
-
* @param {IActionContextValidation<any, any>} [actionCtx] - The action context object containing the necessary information for validation.
|
|
42
|
-
* @param {ActivatedRouteSnapshot} [route] - The current route snapshot containing the necessary information for validation.
|
|
43
|
-
* @param {RouterStateSnapshot} state - The router state snapshot
|
|
44
|
-
*
|
|
45
|
-
* @return {Observable<boolean>} - An Observable that emits the visibility status of the action.
|
|
46
|
-
*/
|
|
47
|
-
isActionVisible(actionCtx?: IActionContextValidation<any, any>, route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Observable<boolean>;
|
|
48
|
-
}
|
|
49
|
-
export declare abstract class APermissions {
|
|
50
|
-
private readonly _authorizationType;
|
|
51
|
-
constructor(type: PermissionTypeEnum);
|
|
52
|
-
get authorizationType(): PermissionTypeEnum;
|
|
53
|
-
}
|
|
54
|
-
export declare namespace Permissions {
|
|
55
|
-
class All extends APermissions {
|
|
56
|
-
private _permissions;
|
|
57
|
-
private constructor();
|
|
58
|
-
static of(...permissions: Array<APermissions>): All;
|
|
59
|
-
get permissions(): APermissions[];
|
|
60
|
-
and(...permissions: Array<APermissions>): this;
|
|
61
|
-
}
|
|
62
|
-
class Any extends APermissions {
|
|
63
|
-
private _permissions;
|
|
64
|
-
private constructor();
|
|
65
|
-
static of(...permissions: Array<APermissions>): Any;
|
|
66
|
-
get permissions(): APermissions[];
|
|
67
|
-
or(...permissions: Array<APermissions>): this;
|
|
68
|
-
}
|
|
69
|
-
class Roles extends APermissions {
|
|
70
|
-
private _roles;
|
|
71
|
-
private constructor();
|
|
72
|
-
static of(...roles: Array<string>): Roles;
|
|
73
|
-
get roles(): string[][];
|
|
74
|
-
and(...roles: Array<string>): this;
|
|
75
|
-
or(...roles: Array<string>): this;
|
|
76
|
-
}
|
|
77
|
-
class Service extends APermissions {
|
|
78
|
-
readonly service: Type<IPermissionService>;
|
|
79
|
-
private constructor();
|
|
80
|
-
static of(service: Type<IPermissionService>): Service;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ILoggerService } from '../log/log.model';
|
|
4
|
-
import { CommonsModuleConfig } from './tokens/module-config.token';
|
|
5
|
-
export declare class CommonsConfigurationService {
|
|
6
|
-
private static _instance;
|
|
7
|
-
static get(): CommonsConfigurationService;
|
|
8
|
-
private logger?;
|
|
9
|
-
private http?;
|
|
10
|
-
private moduleConfig?;
|
|
11
|
-
private projectEnvironment?;
|
|
12
|
-
private jsonSources;
|
|
13
|
-
private objectSources;
|
|
14
|
-
private configuration;
|
|
15
|
-
private constructor();
|
|
16
|
-
init(httpClient: HttpClient, logger?: ILoggerService): this;
|
|
17
|
-
/**
|
|
18
|
-
* Add commons module config.
|
|
19
|
-
* @param config Module config.
|
|
20
|
-
*/
|
|
21
|
-
addModuleConfigSource(config?: CommonsModuleConfig): void;
|
|
22
|
-
/**
|
|
23
|
-
* Add project environment source.
|
|
24
|
-
* @param environment Environment.
|
|
25
|
-
*/
|
|
26
|
-
addEnvironmentSource(environment: any): void;
|
|
27
|
-
/**
|
|
28
|
-
* Adds new config source from JSON file loaded from HTTP.
|
|
29
|
-
* @param config Config for JSON file.
|
|
30
|
-
* @param loadImmediately Load is by default triggered on app initialization. If immediate load is required, pass true.
|
|
31
|
-
*/
|
|
32
|
-
addJsonSource(config?: {
|
|
33
|
-
url?: string;
|
|
34
|
-
enableEnvProd?: boolean;
|
|
35
|
-
}, loadImmediately?: boolean): Observable<boolean>;
|
|
36
|
-
/**
|
|
37
|
-
* Adds new config object from any object.
|
|
38
|
-
* @param config Config object.
|
|
39
|
-
*/
|
|
40
|
-
addObjectSource(config: any): void;
|
|
41
|
-
/**
|
|
42
|
-
* returns true if there is no jsonSources
|
|
43
|
-
*/
|
|
44
|
-
private skipJsonConfigsLoading;
|
|
45
|
-
/**
|
|
46
|
-
* loads json sources or skips them returning true in both cases
|
|
47
|
-
* used for `skipJsonSourceInit` configuration parameter
|
|
48
|
-
*/
|
|
49
|
-
loadJsonConfigurations: () => Observable<boolean>;
|
|
50
|
-
private loadJsonSources;
|
|
51
|
-
/**
|
|
52
|
-
* Get configuration.
|
|
53
|
-
*/
|
|
54
|
-
getConfig(): any;
|
|
55
|
-
/**
|
|
56
|
-
* Get configuration value for key.
|
|
57
|
-
* @param key Configuration key.
|
|
58
|
-
*/
|
|
59
|
-
getConfigValue<T = any>(key: string): T | null;
|
|
60
|
-
/**
|
|
61
|
-
* Gets the configuration value for the given key. If the value is not found,
|
|
62
|
-
* it throws an error with a custom error message.
|
|
63
|
-
*
|
|
64
|
-
* @param {string} key - The configuration key.
|
|
65
|
-
* @param {string} [errorMessage] - Custom error message to be thrown if the value is not found.
|
|
66
|
-
*
|
|
67
|
-
* @returns {T} - The configuration value.
|
|
68
|
-
*
|
|
69
|
-
* @throws {CommonsInternalError} - If the value is not found or a custom error message is provided.
|
|
70
|
-
*/
|
|
71
|
-
getConfigValueOrThrow<T = any>(key: string, errorMessage?: string): T;
|
|
72
|
-
/**
|
|
73
|
-
* Has configuration for key.
|
|
74
|
-
* @param key Configuration key.
|
|
75
|
-
*/
|
|
76
|
-
hasConfigKey(key: string): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Merges configuration from multiple sources with
|
|
79
|
-
*/
|
|
80
|
-
private mergeConfigs;
|
|
81
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { HttpBackend } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare enum CommonsInitEventEnum {
|
|
5
|
-
CommonsInitStart = 0,
|
|
6
|
-
ConfigSourceModuleLoaded = 1,
|
|
7
|
-
ConfigSourceProjectEnvLoaded = 2,
|
|
8
|
-
ConfigSourceJsonAdded = 3,
|
|
9
|
-
ConfigSourceJsonLoaded = 4,
|
|
10
|
-
CommonsInitEnd = 5,
|
|
11
|
-
CommonsInitError = 6
|
|
12
|
-
}
|
|
13
|
-
export declare class CommonsInitService {
|
|
14
|
-
private readonly logger;
|
|
15
|
-
private readonly logPublishers;
|
|
16
|
-
private readonly config;
|
|
17
|
-
private readonly commons;
|
|
18
|
-
private readonly commonsRouter;
|
|
19
|
-
private readonly moduleConfig;
|
|
20
|
-
private readonly commonsInitializers;
|
|
21
|
-
private isInitialized;
|
|
22
|
-
private httpClient;
|
|
23
|
-
private isInitializedSubject;
|
|
24
|
-
private commonsInitServiceEvents;
|
|
25
|
-
get events$(): Observable<CommonsInitEventEnum>;
|
|
26
|
-
get isInitialized$(): Observable<boolean>;
|
|
27
|
-
initialize(handler: HttpBackend): Observable<void>;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsInitService, never>;
|
|
29
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsInitService>;
|
|
30
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Routes } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CommonsRouterService {
|
|
5
|
-
private readonly router;
|
|
6
|
-
private readonly logger;
|
|
7
|
-
private readonly routesLoadedPropKey;
|
|
8
|
-
private currentNavigationPath?;
|
|
9
|
-
private currentNavigationModuleKeys;
|
|
10
|
-
private lazyLoadedRoutesConfig;
|
|
11
|
-
constructor();
|
|
12
|
-
getRouteLoadedChildren(path: string | Array<string>): Routes | undefined;
|
|
13
|
-
getRouteLoadedChildren$(path: string | Array<string>): Observable<Routes>;
|
|
14
|
-
initialize(): void;
|
|
15
|
-
private startNavigation;
|
|
16
|
-
private finishNavigation;
|
|
17
|
-
private markNavigationConfigLoad;
|
|
18
|
-
private getLoadedRoutesFromRoute;
|
|
19
|
-
/**
|
|
20
|
-
* Search for route config by module path by recursive scanning of router config tree.
|
|
21
|
-
* @param modulePath Path of module that is searched.
|
|
22
|
-
* @param routes Routes to be scanned. If not provided, it starts on root router config.
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
private findRouteInRouteConfig;
|
|
26
|
-
/**
|
|
27
|
-
* Finds longest path match of source to match string. If match is '', it is considered as a match in Angular routing.
|
|
28
|
-
* @param source Source string from on which comparison is based.
|
|
29
|
-
* @param match Match string to which the source is matched to.
|
|
30
|
-
* @private
|
|
31
|
-
*/
|
|
32
|
-
private findLongestPathMatch;
|
|
33
|
-
private getOrCreateRouteForModule;
|
|
34
|
-
private getModulePathFromRouterLink;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsRouterService, never>;
|
|
36
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsRouterService>;
|
|
37
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export type LocalstorageConfigValueType = string | number | Date | object | boolean;
|
|
3
|
-
export declare class CommonsStorageService {
|
|
4
|
-
private readonly localStorage;
|
|
5
|
-
private readonly _configKey;
|
|
6
|
-
private buildLocalStorageKey;
|
|
7
|
-
getItem<T = LocalstorageConfigValueType>(type: string, key: string): T | undefined;
|
|
8
|
-
setItem<T = LocalstorageConfigValueType>(type: string, key: string, value: T): void;
|
|
9
|
-
removeItem(type: string, key: string): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsStorageService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsStorageService>;
|
|
12
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { CommonsMenuItem } from '../models/menu.model';
|
|
2
|
-
import { IUser } from '../models/user.model';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CommonsService {
|
|
5
|
-
private readonly logger;
|
|
6
|
-
private readonly router;
|
|
7
|
-
private readonly primengConfig;
|
|
8
|
-
private readonly translate;
|
|
9
|
-
private readonly titleService;
|
|
10
|
-
private readonly moduleConfig;
|
|
11
|
-
private readonly localStorage;
|
|
12
|
-
private readonly destroyRef;
|
|
13
|
-
readonly breadcrumbHome: import("@angular/core").WritableSignal<CommonsMenuItem | null>;
|
|
14
|
-
readonly breadcrumbs: import("@angular/core").WritableSignal<CommonsMenuItem[]>;
|
|
15
|
-
private breadcrumbsTranslateSubscription?;
|
|
16
|
-
private breadcrumbHomeTranslateSubscription?;
|
|
17
|
-
user: import("@angular/core").WritableSignal<IUser | undefined>;
|
|
18
|
-
userRoles: import("@angular/core").WritableSignal<string[]>;
|
|
19
|
-
appName: import("@angular/core").WritableSignal<string>;
|
|
20
|
-
appOwner: import("@angular/core").WritableSignal<string>;
|
|
21
|
-
getDefaultLocale(): string;
|
|
22
|
-
appLocales: import("@angular/core").WritableSignal<string[]>;
|
|
23
|
-
private _appLocale;
|
|
24
|
-
appLocale: import("@angular/core").Signal<string>;
|
|
25
|
-
private initAppLocale;
|
|
26
|
-
setAppLocale(language: string): void;
|
|
27
|
-
clearAppLocale(): void;
|
|
28
|
-
appDataLocales: import("@angular/core").WritableSignal<string[]>;
|
|
29
|
-
private _appDataLocale;
|
|
30
|
-
appDataLocale: import("@angular/core").Signal<string>;
|
|
31
|
-
private initAppDataLocale;
|
|
32
|
-
setAppDataLocale(dataLocale: string): void;
|
|
33
|
-
clearAppDataLocale(): void;
|
|
34
|
-
appVersion: import("@angular/core").WritableSignal<import("@mediusinc/mng-commons/core").VersionConfigType>;
|
|
35
|
-
constructor();
|
|
36
|
-
initialize(): void;
|
|
37
|
-
findBreadcrumbItem(item: CommonsMenuItem): CommonsMenuItem | null;
|
|
38
|
-
updateBreadcrumbItem(item: CommonsMenuItem): boolean;
|
|
39
|
-
private updateBreadcrumbs;
|
|
40
|
-
private generateHomeBreadcrumb;
|
|
41
|
-
private generateBreadcrumbs;
|
|
42
|
-
private createBreadcrumb;
|
|
43
|
-
setPageTitle(title?: string): void;
|
|
44
|
-
private formatPageTitle;
|
|
45
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsService, never>;
|
|
46
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsService>;
|
|
47
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { HttpBackend } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { CommonsInitService } from '../commons-init.service';
|
|
4
|
-
export declare function commonsInitializerProvider(handler: HttpBackend, commonsInit: CommonsInitService): () => Observable<void>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { LogConfig } from '../../log/log.model';
|
|
3
|
-
import { VersionConfigType } from '../../models/version.model';
|
|
4
|
-
export type ColorScheme = 'light' | 'dark' | 'auto';
|
|
5
|
-
export interface CommonsModuleConfig {
|
|
6
|
-
app?: {
|
|
7
|
-
name?: string;
|
|
8
|
-
owner?: string;
|
|
9
|
-
locales?: string[];
|
|
10
|
-
dataLocales?: string[];
|
|
11
|
-
version?: VersionConfigType;
|
|
12
|
-
};
|
|
13
|
-
configuration?: {
|
|
14
|
-
projectEnvironment?: any;
|
|
15
|
-
jsonSource?: string | Array<string>;
|
|
16
|
-
skipJsonSourceInit?: boolean;
|
|
17
|
-
jsonSourceEnableEnvProd?: boolean;
|
|
18
|
-
};
|
|
19
|
-
serialization?: CommonsSerializationConfig;
|
|
20
|
-
log?: LogConfig;
|
|
21
|
-
}
|
|
22
|
-
export interface CommonsSerializationConfig {
|
|
23
|
-
dateTimeInUtc?: boolean;
|
|
24
|
-
dateTimeWithTimezone?: boolean;
|
|
25
|
-
dateTimeWithMillis?: boolean;
|
|
26
|
-
filtersDateOnlyDisabled?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare const COMMONS_MODULE_CONFIG_IT: InjectionToken<CommonsModuleConfig>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class Styles {
|
|
2
|
-
static readonly BUTTON_ROUNDED_WIDTH_XS = 28;
|
|
3
|
-
static readonly BUTTON_ROUNDED_WIDTH_SM = 31.5;
|
|
4
|
-
static readonly BUTTON_ROUNDED_WIDTH = 35;
|
|
5
|
-
static readonly BUTTON_ROUNDED_WIDTH_LG = 38.5;
|
|
6
|
-
static readonly BUTTON_ROUNDED_WIDTH_XL = 42;
|
|
7
|
-
static readonly ACTION_BUTTON_MARGIN_X = 2.1;
|
|
8
|
-
static readonly TABLE_CELL_PADDING_X_SM = 7;
|
|
9
|
-
static readonly TABLE_CELL_PADDING_X = 14;
|
|
10
|
-
static readonly TABLE_CELL_PADDING_X_LG = 17.5;
|
|
11
|
-
}
|