@mediusinc/mng-commons 3.6.0 → 3.7.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/README.md +6 -5
- package/esm2022/index.mjs +6 -3
- package/esm2022/lib/api/models/filter-param.model.mjs +1 -1
- package/esm2022/lib/api/models/index.mjs +1 -3
- package/esm2022/lib/api/models/query-param.model.mjs +1 -1
- package/esm2022/lib/api/models/query-result.model.mjs +12 -1
- package/esm2022/lib/api/services/api.abstract.service.mjs +2 -2
- package/esm2022/lib/api/services/get-all-api.abstract.service.mjs +1 -1
- package/esm2022/lib/api/utils/index.mjs +2 -2
- package/esm2022/lib/api/utils/object-serializer.util.mjs +53 -137
- package/esm2022/lib/components/action/action.component.mjs +17 -16
- package/esm2022/lib/components/action/editor/action-editor.component.mjs +12 -12
- package/esm2022/lib/components/action/localization/data-language-dropdown.component.mjs +7 -7
- package/esm2022/lib/components/action/models/action-component.model.mjs +1 -1
- package/esm2022/lib/components/action/models/action-confirmation-service.model.mjs +1 -1
- package/esm2022/lib/components/action/models/action-execution.model.mjs +5 -5
- package/esm2022/lib/components/action/route/action-route.component.mjs +6 -6
- package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +74 -65
- package/esm2022/lib/components/form/date-range/date-range.component.mjs +6 -7
- package/esm2022/lib/components/form/dropdown/dropdown.component.mjs +39 -39
- package/esm2022/lib/components/form/editor/form-editor.component.mjs +14 -16
- package/esm2022/lib/components/form/formly/fields/formly-field-action/formly-field-action.component.mjs +6 -6
- package/esm2022/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +5 -5
- package/esm2022/lib/components/form/formly/fields/formly-field-custom/formly-custom-field-base.model.mjs +3 -3
- package/esm2022/lib/components/form/formly/fields/formly-field-custom/formly-field-custom.component.mjs +3 -3
- package/esm2022/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +5 -5
- package/esm2022/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +5 -6
- package/esm2022/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +10 -13
- package/esm2022/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.mjs +3 -3
- package/esm2022/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +13 -13
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +26 -15
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +14 -14
- package/esm2022/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +5 -6
- package/esm2022/lib/components/form/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +5 -6
- package/esm2022/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +39 -18
- package/esm2022/lib/components/layout/breadcrumb.component.mjs +4 -4
- package/esm2022/lib/components/layout/footer.component.mjs +4 -4
- package/esm2022/lib/components/layout/main-layout.component.mjs +8 -8
- package/esm2022/lib/components/layout/menu-item.component.mjs +8 -8
- package/esm2022/lib/components/layout/menu.component.mjs +7 -7
- package/esm2022/lib/components/layout/services/main-layout.component.service.mjs +4 -4
- package/esm2022/lib/components/layout/topbar-user.component.mjs +9 -9
- package/esm2022/lib/components/layout/topbar.component.mjs +8 -8
- package/esm2022/lib/components/layout/version.component.mjs +11 -11
- package/esm2022/lib/components/layoutV2/breadcrumb.component.mjs +6 -6
- package/esm2022/lib/components/layoutV2/footer.component.mjs +3 -3
- package/esm2022/lib/components/layoutV2/main-layout.component.mjs +14 -11
- package/esm2022/lib/components/layoutV2/menu-item.component.mjs +12 -9
- package/esm2022/lib/components/layoutV2/menu.component.mjs +5 -6
- package/esm2022/lib/components/layoutV2/model/layout-state.model.mjs +1 -1
- package/esm2022/lib/components/layoutV2/services/main-layout.component.service.mjs +30 -21
- package/esm2022/lib/components/layoutV2/services/menu.service.mjs +3 -3
- package/esm2022/lib/components/layoutV2/sidebar.component.mjs +18 -9
- package/esm2022/lib/components/layoutV2/topbar-user.component.mjs +6 -6
- package/esm2022/lib/components/layoutV2/topbar.component.mjs +6 -7
- package/esm2022/lib/components/layoutV2/version.component.mjs +11 -11
- package/esm2022/lib/components/pages/error/error.page.component.mjs +4 -4
- package/esm2022/lib/components/pages/not-found/not-found.page.component.mjs +4 -4
- package/esm2022/lib/components/tableview/index.mjs +1 -2
- package/esm2022/lib/components/tableview/models/table.event.mjs +1 -1
- package/esm2022/lib/components/tableview/route/tableview-route.abstract.component.mjs +18 -18
- package/esm2022/lib/components/tableview/route/tableview-route.component.mjs +5 -5
- package/esm2022/lib/components/tableview/table/column-filter-full/column-filter-full.component.mjs +8 -12
- package/esm2022/lib/components/tableview/table/column-value/column-value.component.mjs +9 -32
- package/esm2022/lib/components/tableview/table/table.component.mjs +20 -25
- package/esm2022/lib/components/tableview/tableview.component.mjs +8 -10
- package/esm2022/lib/data-providers/base.data-provider.mjs +43 -12
- package/esm2022/lib/data-providers/editor.data-provider.mjs +82 -14
- package/esm2022/lib/data-providers/lookup.data-provider.mjs +38 -9
- package/esm2022/lib/data-providers/table.data-provider.mjs +41 -14
- package/esm2022/lib/data-providers/tableview-crud.data-provider.mjs +14 -6
- package/esm2022/lib/data-providers/tableview.data-provider.mjs +89 -29
- package/esm2022/lib/descriptors/action/action-confirmation.descriptor.mjs +2 -2
- package/esm2022/lib/descriptors/action/action-editor.descriptor.mjs +262 -0
- package/esm2022/lib/descriptors/action/action-link.descriptor.mjs +90 -0
- package/esm2022/lib/descriptors/action/action.descriptor.mjs +91 -352
- package/esm2022/lib/descriptors/action/index.mjs +3 -1
- package/esm2022/lib/descriptors/editor/editor.descriptor.mjs +215 -102
- package/esm2022/lib/descriptors/editor/field-action.descriptor.mjs +50 -0
- package/esm2022/lib/descriptors/editor/field-base.descriptor.mjs +293 -0
- package/esm2022/lib/descriptors/editor/field-group.descriptor.mjs +97 -0
- package/esm2022/lib/descriptors/editor/field-lookup.descriptor.mjs +211 -0
- package/esm2022/lib/descriptors/editor/field-many.descriptor.mjs +153 -0
- package/esm2022/lib/descriptors/editor/field.descriptor.mjs +81 -852
- package/esm2022/lib/descriptors/editor/index.mjs +6 -1
- package/esm2022/lib/descriptors/editor/internal/editor-fields.model.mjs +2 -0
- package/esm2022/lib/descriptors/editor/internal/editor.model.mjs +2 -0
- package/esm2022/lib/descriptors/filter/filter-lookup.descriptor.mjs +210 -0
- package/esm2022/lib/descriptors/filter/filter.descriptor.mjs +2 -208
- package/esm2022/lib/descriptors/filter/index.mjs +2 -1
- package/esm2022/lib/descriptors/interfaces/lookup-descriptor.interface.mjs +1 -1
- package/esm2022/lib/descriptors/model/index.mjs +2 -0
- package/esm2022/lib/descriptors/model/model.descriptor.mjs +70 -0
- package/esm2022/lib/descriptors/table/column.descriptor.mjs +38 -49
- package/esm2022/lib/descriptors/table/internal/table-columns.model.mjs +2 -0
- package/esm2022/lib/descriptors/table/internal/table.model.mjs +2 -0
- package/esm2022/lib/descriptors/table/table.descriptor.mjs +143 -124
- package/esm2022/lib/descriptors/tableview/internal/tableview.model.mjs +2 -0
- package/esm2022/lib/descriptors/tableview/tableview.descriptor.mjs +240 -131
- package/esm2022/lib/directives/component.directive.mjs +11 -11
- package/esm2022/lib/directives/dialog-keydown-handler.directive.mjs +3 -3
- package/esm2022/lib/directives/template.directive.mjs +9 -9
- package/esm2022/lib/helpers/coercion.mjs +45 -0
- package/esm2022/lib/models/class.model.mjs +2 -0
- package/esm2022/lib/models/enum.model.mjs +1 -1
- package/esm2022/lib/models/index.mjs +4 -1
- package/esm2022/lib/models/radio.model.mjs +2 -0
- package/esm2022/lib/models/tableview-attr.model.mjs +1 -1
- package/esm2022/lib/models/type-registry.model.mjs +2 -0
- package/esm2022/lib/models/view-container.model.mjs +1 -1
- package/esm2022/lib/pipes/boolean.pipe.mjs +3 -3
- package/esm2022/lib/pipes/class-map.pipe.mjs +3 -3
- package/esm2022/lib/pipes/enum.pipe.mjs +6 -6
- package/esm2022/lib/pipes/enumerate-async.pipe.mjs +5 -5
- package/esm2022/lib/pipes/enumerate.pipe.mjs +5 -5
- package/esm2022/lib/pipes/getter.pipe.mjs +5 -5
- package/esm2022/lib/pipes/i18n-property.pipe.mjs +4 -4
- package/esm2022/lib/pipes/json-path.pipe.mjs +3 -3
- package/esm2022/lib/pipes/locale-default-row-class.pipe.mjs +5 -5
- package/esm2022/lib/pipes/parametrize.pipe.mjs +3 -3
- package/esm2022/lib/pipes/template.pipe.mjs +4 -4
- package/esm2022/lib/provide-commons.mjs +4 -4
- package/esm2022/lib/registry/type.registry.mjs +114 -0
- package/esm2022/lib/router/models/router.model.mjs +1 -1
- package/esm2022/lib/router/tableview-route-builder.mjs +5 -5
- package/esm2022/lib/security/authorization.service.mjs +9 -11
- package/esm2022/lib/services/action-executor.service.mjs +14 -12
- package/esm2022/lib/services/commons-init.service.mjs +3 -3
- package/esm2022/lib/services/commons.service.mjs +6 -5
- package/esm2022/lib/services/mng-localstorage-config.service.mjs +4 -4
- package/esm2022/lib/services/navigation.service.mjs +5 -5
- package/esm2022/lib/services/router.service.mjs +4 -4
- package/esm2022/lib/services/version.service.mjs +5 -5
- package/esm2022/lib/services/view-container.component.service.mjs +5 -5
- package/esm2022/lib/styles/styles.util.mjs +1 -1
- package/esm2022/lib/types/action-descriptor.types.mjs +2 -0
- package/esm2022/lib/types/data-provider.types.mjs +2 -0
- package/esm2022/lib/types/getter.type.mjs +2 -0
- package/esm2022/lib/types/index.mjs +5 -2
- package/esm2022/lib/types/localstorage-config-value.type.mjs +2 -0
- package/esm2022/lib/types/type.decorator.mjs +4 -14
- package/esm2022/lib/types/type.model.mjs +1 -1
- package/esm2022/lib/utils/action-data-provider.util.mjs +14 -8
- package/esm2022/lib/utils/decorator-metadata.util.mjs +61 -0
- package/esm2022/lib/utils/editor-formly.util.mjs +6 -5
- package/esm2022/lib/utils/enum.util.mjs +1 -1
- package/esm2022/lib/utils/export.util.mjs +5 -4
- package/esm2022/lib/utils/i18n.util.mjs +22 -22
- package/esm2022/lib/utils/index.mjs +2 -3
- package/esm2022/lib/utils/model.util.mjs +40 -36
- package/esm2022/lib/utils/notification.util.mjs +1 -1
- package/esm2022/lib/utils/tableview.util.mjs +17 -17
- package/fesm2022/mediusinc-mng-commons.mjs +11491 -11384
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/index.d.ts +3 -2
- package/lib/api/models/filter-param.model.d.ts +3 -3
- package/lib/api/models/index.d.ts +0 -2
- package/lib/api/models/query-param.model.d.ts +3 -3
- package/lib/api/models/query-result.model.d.ts +3 -3
- package/lib/api/services/api.abstract.service.d.ts +1 -1
- package/lib/api/utils/index.d.ts +1 -1
- package/lib/api/utils/object-serializer.util.d.ts +3 -19
- package/lib/components/action/action.component.d.ts +5 -5
- package/lib/components/action/editor/action-editor.component.d.ts +7 -7
- package/lib/components/action/localization/data-language-dropdown.component.d.ts +6 -6
- package/lib/components/action/models/action-component.model.d.ts +4 -4
- package/lib/components/action/models/action-confirmation-service.model.d.ts +2 -2
- package/lib/components/action/models/action-execution.model.d.ts +14 -14
- package/lib/components/action/route/action-route.component.d.ts +2 -2
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +15 -18
- package/lib/components/form/dropdown/dropdown.component.d.ts +9 -9
- package/lib/components/form/editor/form-editor.component.d.ts +8 -11
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +4 -0
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +4 -4
- package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +3 -2
- package/lib/components/layout/topbar-user.component.d.ts +2 -2
- package/lib/components/layout/version.component.d.ts +2 -2
- package/lib/components/layoutV2/model/layout-state.model.d.ts +8 -9
- package/lib/components/layoutV2/services/main-layout.component.service.d.ts +1 -1
- package/lib/components/layoutV2/version.component.d.ts +2 -2
- package/lib/components/tableview/index.d.ts +0 -1
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +20 -20
- package/lib/components/tableview/route/tableview-route.component.d.ts +7 -7
- package/lib/components/tableview/table/table.component.d.ts +9 -9
- package/lib/components/tableview/tableview.component.d.ts +8 -8
- package/lib/data-providers/base.data-provider.d.ts +30 -12
- package/lib/data-providers/editor.data-provider.d.ts +86 -23
- package/lib/data-providers/lookup.data-provider.d.ts +24 -11
- package/lib/data-providers/table.data-provider.d.ts +30 -17
- package/lib/data-providers/tableview-crud.data-provider.d.ts +8 -4
- package/lib/data-providers/tableview.data-provider.d.ts +41 -29
- package/lib/descriptors/action/action-confirmation.descriptor.d.ts +3 -3
- package/lib/descriptors/action/action-editor.descriptor.d.ts +115 -0
- package/lib/descriptors/action/action-link.descriptor.d.ts +34 -0
- package/lib/descriptors/action/action.descriptor.d.ts +74 -160
- package/lib/descriptors/action/index.d.ts +2 -0
- package/lib/descriptors/editor/editor.descriptor.d.ts +131 -79
- package/lib/descriptors/editor/field-action.descriptor.d.ts +23 -0
- package/lib/descriptors/editor/field-base.descriptor.d.ts +126 -0
- package/lib/descriptors/editor/field-group.descriptor.d.ts +42 -0
- package/lib/descriptors/editor/field-lookup.descriptor.d.ts +80 -0
- package/lib/descriptors/editor/field-many.descriptor.d.ts +63 -0
- package/lib/descriptors/editor/field.descriptor.d.ts +100 -326
- package/lib/descriptors/editor/index.d.ts +5 -0
- package/lib/descriptors/editor/internal/editor-fields.model.d.ts +32 -0
- package/lib/descriptors/editor/internal/editor.model.d.ts +15 -0
- package/lib/descriptors/filter/filter-lookup.descriptor.d.ts +69 -0
- package/lib/descriptors/filter/filter.descriptor.d.ts +9 -67
- package/lib/descriptors/filter/index.d.ts +1 -0
- package/lib/descriptors/interfaces/lookup-descriptor.interface.d.ts +11 -16
- package/lib/descriptors/model/model.descriptor.d.ts +22 -0
- package/lib/descriptors/table/column.descriptor.d.ts +45 -33
- package/lib/descriptors/table/internal/table-columns.model.d.ts +11 -0
- package/lib/descriptors/table/internal/table.model.d.ts +9 -0
- package/lib/descriptors/table/table.descriptor.d.ts +82 -71
- package/lib/descriptors/tableview/internal/tableview.model.d.ts +11 -0
- package/lib/descriptors/tableview/tableview.descriptor.d.ts +106 -74
- package/lib/directives/component.directive.d.ts +5 -6
- package/lib/directives/template.directive.d.ts +2 -3
- package/lib/helpers/coercion.d.ts +9 -0
- package/lib/models/class.model.d.ts +6 -0
- package/lib/models/enum.model.d.ts +3 -2
- package/lib/models/index.d.ts +3 -0
- package/lib/models/radio.model.d.ts +6 -0
- package/lib/models/tableview-attr.model.d.ts +2 -2
- package/lib/models/type-registry.model.d.ts +7 -0
- package/lib/models/view-container.model.d.ts +6 -6
- package/lib/pipes/getter.pipe.d.ts +2 -1
- package/lib/pipes/i18n-property.pipe.d.ts +1 -1
- package/lib/pipes/locale-default-row-class.pipe.d.ts +2 -2
- package/lib/registry/type.registry.d.ts +25 -0
- package/lib/router/models/router.model.d.ts +5 -5
- package/lib/router/tableview-route-builder.d.ts +6 -6
- package/lib/security/authorization.service.d.ts +4 -7
- package/lib/services/action-executor.service.d.ts +7 -7
- package/lib/services/mng-localstorage-config.service.d.ts +3 -3
- package/lib/services/view-container.component.service.d.ts +3 -3
- package/lib/styles/styles.util.d.ts +5 -5
- package/lib/types/action-descriptor.types.d.ts +4 -0
- package/lib/types/data-provider.types.d.ts +3 -0
- package/lib/types/getter.type.d.ts +2 -0
- package/lib/types/index.d.ts +4 -1
- package/lib/types/localstorage-config-value.type.d.ts +1 -0
- package/lib/types/type.decorator.d.ts +0 -2
- package/lib/types/type.model.d.ts +12 -2
- package/lib/utils/action-data-provider.util.d.ts +6 -5
- package/lib/utils/{type.util.d.ts → decorator-metadata.util.d.ts} +2 -26
- package/lib/utils/editor-formly.util.d.ts +2 -2
- package/lib/utils/enum.util.d.ts +2 -2
- package/lib/utils/export.util.d.ts +2 -2
- package/lib/utils/i18n.util.d.ts +10 -11
- package/lib/utils/index.d.ts +1 -2
- package/lib/utils/model.util.d.ts +5 -3
- package/lib/utils/notification.util.d.ts +4 -4
- package/lib/utils/tableview.util.d.ts +6 -6
- package/openapi/templates/model.mustache +15 -2
- package/openapi/templates/models.mustache +0 -44
- package/package.json +10 -10
- package/scss/mng-commons-dark-v2.scss +2 -2
- package/scss/mng-commons-light-v2.scss +1 -1
- package/scss/v2/theme/{theme-base/components/data → extensions}/_fullcalendar.scss +14 -15
- package/scss/v2/theme/theme-base/_colors.scss +11 -12
- package/scss/v2/theme/theme-base/_common.scss +8 -5
- package/scss/v2/theme/theme-base/_components.scss +93 -89
- package/scss/v2/theme/theme-base/_mixins.scss +205 -71
- package/scss/v2/theme/theme-base/components/button/_button.scss +80 -68
- package/scss/v2/theme/theme-base/components/button/_speeddial.scss +11 -1
- package/scss/v2/theme/theme-base/components/button/_splitbutton.scss +128 -161
- package/scss/v2/theme/theme-base/components/data/_carousel.scss +1 -1
- package/scss/v2/theme/theme-base/components/data/_datatable.scss +3 -3
- package/scss/v2/theme/theme-base/components/data/_dataview.scss +0 -9
- package/scss/v2/theme/theme-base/components/data/_filter.scss +5 -6
- package/scss/v2/theme/theme-base/components/data/_orderlist.scss +15 -4
- package/scss/v2/theme/theme-base/components/data/_organizationchart.scss +1 -1
- package/scss/v2/theme/theme-base/components/data/_picklist.scss +14 -3
- package/scss/v2/theme/theme-base/components/data/_timeline.scss +3 -6
- package/scss/v2/theme/theme-base/components/data/_tree.scss +7 -6
- package/scss/v2/theme/theme-base/components/data/_treetable.scss +3 -4
- package/scss/v2/theme/theme-base/components/file/_fileupload.scss +6 -0
- package/scss/v2/theme/theme-base/components/input/_autocomplete.scss +43 -24
- package/scss/v2/theme/theme-base/components/input/_calendar.scss +9 -5
- package/scss/v2/theme/theme-base/components/input/_cascadeselect.scss +25 -20
- package/scss/v2/theme/theme-base/components/input/_checkbox.scss +9 -5
- package/scss/v2/theme/theme-base/components/input/_chips.scss +24 -13
- package/scss/v2/theme/theme-base/components/input/_dropdown.scss +29 -13
- package/scss/v2/theme/theme-base/components/input/_editor.scss +7 -7
- package/scss/v2/theme/theme-base/components/input/_inputgroup.scss +1 -2
- package/scss/v2/theme/theme-base/components/input/_inputmask.scss +2 -2
- package/scss/v2/theme/theme-base/components/input/_inputnumber.scss +7 -7
- package/scss/v2/theme/theme-base/components/input/_inputswitch.scss +3 -3
- package/scss/v2/theme/theme-base/components/input/_inputtext.scss +4 -3
- package/scss/v2/theme/theme-base/components/input/_listbox.scss +23 -8
- package/scss/v2/theme/theme-base/components/input/_multiselect.scss +31 -27
- package/scss/v2/theme/theme-base/components/input/_radiobutton.scss +2 -2
- package/scss/v2/theme/theme-base/components/input/_rating.scss +33 -28
- package/scss/v2/theme/theme-base/components/input/_treeselect.scss +6 -6
- package/scss/v2/theme/theme-base/components/menu/_breadcrumb.scss +3 -3
- package/scss/v2/theme/theme-base/components/menu/_contextmenu.scss +8 -30
- package/scss/v2/theme/theme-base/components/menu/_dock.scss +11 -2
- package/scss/v2/theme/theme-base/components/menu/_megamenu.scss +14 -65
- package/scss/v2/theme/theme-base/components/menu/_menu.scss +5 -13
- package/scss/v2/theme/theme-base/components/menu/_menubar.scss +32 -80
- package/scss/v2/theme/theme-base/components/menu/_panelmenu.scss +52 -39
- package/scss/v2/theme/theme-base/components/menu/_slidemenu.scss +15 -20
- package/scss/v2/theme/theme-base/components/menu/_steps.scss +2 -2
- package/scss/v2/theme/theme-base/components/menu/_tabmenu.scss +1 -2
- package/scss/v2/theme/theme-base/components/menu/_tieredmenu.scss +10 -32
- package/scss/v2/theme/theme-base/components/messages/_message.scss +2 -2
- package/scss/v2/theme/theme-base/components/messages/_toast.scss +2 -3
- package/scss/v2/theme/theme-base/components/misc/_chip.scss +7 -3
- package/scss/v2/theme/theme-base/components/misc/_inplace.scss +0 -1
- package/scss/v2/theme/theme-base/components/misc/_terminal.scss +9 -8
- package/scss/v2/theme/theme-base/components/multimedia/_galleria.scss +6 -0
- package/scss/v2/theme/theme-base/components/overlay/_confirmpopup.scss +3 -5
- package/scss/v2/theme/theme-base/components/panel/_accordion.scss +4 -4
- package/scss/v2/theme/theme-base/components/panel/_fieldset.scss +1 -1
- package/scss/v2/theme/theme-base/components/panel/_panel.scss +10 -5
- package/scss/v2/theme/theme-base/components/panel/_tabview.scss +6 -2
- package/scss/v2/theme/theme-dark/_variables.scss +756 -765
- package/scss/v2/theme/theme-dark/blue/theme.scss +1 -0
- package/scss/v2/theme/theme-light/_variables.scss +81 -94
- package/scss/v2/theme/theme-light/blue/theme.scss +1 -0
- package/esm2022/lib/api/models/mappers.mjs +0 -13
- package/esm2022/lib/api/models/serialization.model.mjs +0 -2
- package/esm2022/lib/components/tableview/table/column-filter/column-filter.component.mjs +0 -121
- package/esm2022/lib/descriptors/index.mjs +0 -2
- package/esm2022/lib/descriptors/model.descriptor.mjs +0 -45
- package/esm2022/lib/mng-commons.module.mjs +0 -472
- package/esm2022/lib/types/mng-localstorage-config-value.type.mjs +0 -2
- package/esm2022/lib/utils/coercion.util.mjs +0 -6
- package/esm2022/lib/utils/type.util.mjs +0 -94
- package/lib/api/models/mappers.d.ts +0 -6
- package/lib/api/models/serialization.model.d.ts +0 -9
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +0 -37
- package/lib/descriptors/model.descriptor.d.ts +0 -18
- package/lib/mng-commons.module.d.ts +0 -105
- package/lib/types/mng-localstorage-config-value.type.d.ts +0 -1
- package/lib/utils/coercion.util.d.ts +0 -2
- package/openapi/templates/serializer-registration/model.mustache +0 -97
- package/openapi/templates/serializer-registration/models.mustache +0 -6
- /package/lib/descriptors/{index.d.ts → model/index.d.ts} +0 -0
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export
|
|
1
|
+
import { MediusQueryParam } from '../api/models';
|
|
2
|
+
import { ClassOptType, ClassType, ServiceClassOptType, ServiceClassType } from '../types';
|
|
3
|
+
import { DataProviderInst } from './base.data-provider';
|
|
4
|
+
import { EditorDataProviderCreateFnType, EditorDataProviderDeleteFnType, EditorDataProviderFetchFnType, EditorDataProviderInst, EditorDataProviderUpdateFnType, IEditorDataProvider } from './editor.data-provider';
|
|
5
|
+
import { ITableDataProvider, TableDataProviderGetAllEagerFnType, TableDataProviderGetAllFnType, TableDataProviderInst } from './table.data-provider';
|
|
6
|
+
export type ITableviewDataProvider<Model = any, Service = any, ModelClass = ClassOptType<Model>, ServiceClass = ServiceClassOptType<Service>> = IEditorDataProvider<Model, Service, ModelClass, ServiceClass> & ITableDataProvider<Model, Service, ModelClass, ServiceClass>;
|
|
7
|
+
export declare class TableviewDataProviderInst<Model, Service = any, ModelClass = ClassOptType<Model>, ServiceClass = ServiceClassOptType<Service>> extends DataProviderInst<Model, Service, ModelClass, ServiceClass> implements ITableviewDataProvider<Model, Service, ModelClass, ServiceClass> {
|
|
8
|
+
protected readonly editorDataProvider: EditorDataProviderInst<Model, Service, ModelClass, ServiceClass>;
|
|
9
|
+
protected readonly tableDataProvider: TableDataProviderInst<Model, Service, ModelClass, ServiceClass>;
|
|
10
|
+
protected constructor(type: ModelClass, serviceType: ServiceClass);
|
|
8
11
|
get isLazy(): boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
get getAllReload$(): import("rxjs").Observable<MediusQueryParam | undefined>;
|
|
13
|
+
get getAll(): TableDataProviderGetAllFnType<Model, Service, import("../types").ItemOrObservable<import("../api/models").MediusQueryResult<Model>>>;
|
|
14
|
+
get fetch(): EditorDataProviderFetchFnType<Model, Service, import("../types").IdType, import("../types").ItemOrObservable<Model>>;
|
|
15
|
+
get create(): EditorDataProviderCreateFnType<Model, Service, Model | undefined, import("../types").ItemOrObservable<Model>> | undefined;
|
|
16
|
+
get update(): EditorDataProviderUpdateFnType<Model, Service, import("../types").IdType, Model | undefined, import("../types").ItemOrObservable<Model>> | undefined;
|
|
17
|
+
get delete(): EditorDataProviderDeleteFnType<Model, Service, import("../types").IdType, Model | undefined, import("../types").ItemOrObservable<Model | null>> | undefined;
|
|
18
|
+
getAllReload(queryParam?: MediusQueryParam | undefined): void;
|
|
19
|
+
withGetAll(fn: TableDataProviderGetAllFnType<Model, Service>): this;
|
|
20
|
+
withGetAllEagerly(fn: TableDataProviderGetAllEagerFnType<Model, Service>): this;
|
|
21
|
+
withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this;
|
|
22
|
+
withCreate(fn?: EditorDataProviderCreateFnType<Model, Service>): this;
|
|
23
|
+
withUpdate(fn?: EditorDataProviderUpdateFnType<Model, Service>): this;
|
|
24
|
+
withDelete(fn?: EditorDataProviderDeleteFnType<Model, Service>): this;
|
|
12
25
|
}
|
|
13
|
-
export declare class TableviewDataProvider
|
|
14
|
-
protected
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
getAllReload(queryParam?: MediusQueryParam): void;
|
|
26
|
+
export declare class TableviewDataProvider extends TableviewDataProviderInst<any> {
|
|
27
|
+
protected constructor();
|
|
28
|
+
static create<Model>(): TableviewDataProviderInst<Model, undefined, undefined, undefined>;
|
|
29
|
+
static fromClass<Model>(type: ClassType<Model>): TableviewDataProviderInst<Model, undefined, ClassType<Model>, undefined>;
|
|
30
|
+
static fromClassWithService<Model, Service>(type: ClassType<Model>, serviceType: ServiceClassType<Service>): TableviewDataProviderInst<Model, Service, ClassType<Model>, ServiceClassType<Service>>;
|
|
31
|
+
static fromService<Service, Model>(serviceType: ServiceClassType<Service>): TableviewDataProviderInst<Model, Service, undefined, ServiceClassType<Service>>;
|
|
32
|
+
static fromAnyParam<Model>(): TableviewDataProviderInst<Model, undefined, undefined, undefined>;
|
|
33
|
+
static fromAnyParam<Model>(type: ClassType<Model>): TableviewDataProviderInst<Model, undefined, ClassType<Model>, undefined>;
|
|
34
|
+
static fromAnyParam<Model, Service = any>(type: undefined, serviceType: ServiceClassType<Service>): TableviewDataProviderInst<Model, Service, undefined, ServiceClassType<Service>>;
|
|
35
|
+
static fromAnyParam<Model, Service = any>(type: ClassType<Model>, serviceType: ServiceClassType<Service>): TableviewDataProviderInst<Model, Service, ClassType<Model>, ServiceClassType<Service>>;
|
|
36
|
+
static fromAnyParam<Model, Service, ModelClass = ClassType<Model>, ServiceClass = ServiceClassType<Service>>(type?: ModelClass, serviceType?: ServiceClass): TableviewDataProviderInst<Model, Service, ModelClass, ServiceClass>;
|
|
37
|
+
}
|
|
38
|
+
export declare class DynamicTableviewDataProviderInst<Service = any, ServiceClass = ServiceClassOptType<Service>> extends TableviewDataProviderInst<any, Service, undefined, ServiceClass> {
|
|
39
|
+
protected constructor(serviceType: ServiceClass);
|
|
28
40
|
}
|
|
29
|
-
export declare class DynamicTableviewDataProvider extends
|
|
30
|
-
protected
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
export declare class DynamicTableviewDataProvider extends DynamicTableviewDataProviderInst {
|
|
42
|
+
protected constructor();
|
|
43
|
+
static create(): DynamicTableviewDataProviderInst<undefined>;
|
|
44
|
+
static fromService<Service>(serviceType: ServiceClassType<Service>): DynamicTableviewDataProviderInst<Service, ServiceClassType<Service>>;
|
|
33
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Confirmation } from 'primeng/api';
|
|
2
2
|
import { ActionContext } from '../../components/action/models';
|
|
3
3
|
import { ActionButtonDescriptor } from './action-button.descriptor';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class ActionConfirmationDescriptor<Model> {
|
|
5
5
|
private _icon?;
|
|
6
6
|
private _title?;
|
|
7
7
|
private _message?;
|
|
@@ -23,13 +23,13 @@ export declare class ActionConfirmationDialogDescriptor<T> {
|
|
|
23
23
|
*/
|
|
24
24
|
withCloseOnEscape(closeOnEscape: boolean): this;
|
|
25
25
|
withClosable(closable: boolean): this;
|
|
26
|
-
withRunConfirmationConfigMapFn(runConfirmationConfigMapFn?: ConfigurationConfigMapFn<
|
|
26
|
+
withRunConfirmationConfigMapFn(runConfirmationConfigMapFn?: ConfigurationConfigMapFn<Model>): this;
|
|
27
27
|
get icon(): string | undefined;
|
|
28
28
|
get title(): string | null | undefined;
|
|
29
29
|
get message(): string | null | undefined;
|
|
30
30
|
get closeOnEscape(): boolean;
|
|
31
31
|
get closable(): boolean;
|
|
32
|
-
get runConfirmationConfigMapFn(): ConfigurationConfigMapFn<
|
|
32
|
+
get runConfirmationConfigMapFn(): ConfigurationConfigMapFn<Model> | undefined;
|
|
33
33
|
get acceptButton(): ActionButtonDescriptor;
|
|
34
34
|
get rejectButton(): ActionButtonDescriptor | undefined;
|
|
35
35
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ActionContext } from '../../components/action/models';
|
|
4
|
+
import { IEditorDataProvider } from '../../data-providers';
|
|
5
|
+
import { StyleSizeEnum } from '../../styles/models';
|
|
6
|
+
import { ServiceClassType } from '../../types';
|
|
7
|
+
import { EditorDescriptorInst } from '../editor';
|
|
8
|
+
import { ModelDescriptor } from '../model';
|
|
9
|
+
import { ActionEditorSubmitTypeEnum } from '../types';
|
|
10
|
+
import { ActionDescriptorCreateOptsParentType, ActionDescriptorInst } from './action.descriptor';
|
|
11
|
+
export type ActionEditorDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType & ActionEditorDescriptorCreateOptsProviderType<Model, Service> & {
|
|
12
|
+
model?: ModelDescriptor<Model>;
|
|
13
|
+
};
|
|
14
|
+
export type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {
|
|
15
|
+
serviceType?: ServiceClassType<Service>;
|
|
16
|
+
dataProvider?: IEditorDataProvider<Model, Service>;
|
|
17
|
+
};
|
|
18
|
+
export type ActionEditorProviderType<Model, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service>;
|
|
19
|
+
export declare const actionEditorGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service> | undefined) => ActionEditorDescriptorCreateOptsProviderType<Model, Service>;
|
|
20
|
+
export declare class ActionEditorDescriptorInst<Model, Service = any> extends ActionDescriptorInst<Model, Service> {
|
|
21
|
+
private readonly _editorDescriptor;
|
|
22
|
+
protected readonly _dataProvider?: IEditorDataProvider<Model, any>;
|
|
23
|
+
protected _editorActions: ActionDescriptorInst<Model>[];
|
|
24
|
+
protected _editorTitle?: string | null;
|
|
25
|
+
protected _editorTitleParams?: any;
|
|
26
|
+
protected _hasFetchNotificationSuccess: boolean;
|
|
27
|
+
protected _fetchNotificationSuccessTitle?: string;
|
|
28
|
+
protected _fetchNotificationSuccessMessage?: string;
|
|
29
|
+
protected _dialogSize: StyleSizeEnum;
|
|
30
|
+
protected _dialogClassName?: string;
|
|
31
|
+
protected _fetchFunction?: (ctx: ActionContext<Model, any>) => Observable<Model>;
|
|
32
|
+
protected _submitFunction?: (ctx: ActionContext<Model, any>) => Observable<Model>;
|
|
33
|
+
protected _editorComponent?: Type<any>;
|
|
34
|
+
protected _resubmitEnabled?: boolean;
|
|
35
|
+
protected _resubmitRefetch: boolean;
|
|
36
|
+
protected _unsavedChangesConfirmation: boolean;
|
|
37
|
+
constructor(editorDescriptor: EditorDescriptorInst<Model>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Model, Service>);
|
|
38
|
+
get editorTitle(): string | null | undefined;
|
|
39
|
+
get editorTitleParams(): any;
|
|
40
|
+
get editorDescriptor(): EditorDescriptorInst<Model>;
|
|
41
|
+
get dialogSize(): StyleSizeEnum;
|
|
42
|
+
get dialogClassName(): string | undefined;
|
|
43
|
+
get hasFetchNotificationSuccess(): boolean;
|
|
44
|
+
get fetchNotificationSuccessTitle(): string | undefined;
|
|
45
|
+
get fetchNotificationSuccessMessage(): string | undefined;
|
|
46
|
+
get dataProvider(): IEditorDataProvider<Model, any> | undefined;
|
|
47
|
+
get runFunction(): (ctx: ActionContext<Model, unknown>) => Observable<Model>;
|
|
48
|
+
get fetchFunction(): ((ctx: ActionContext<Model, any>) => Observable<Model>) | undefined;
|
|
49
|
+
get submitFunction(): ((ctx: ActionContext<Model, any>) => Observable<Model>) | undefined;
|
|
50
|
+
get editorActions(): ActionDescriptorInst<Model, any>[];
|
|
51
|
+
get editorComponent(): Type<any> | undefined;
|
|
52
|
+
get resubmitEnabled(): boolean | undefined;
|
|
53
|
+
get resubmitRefetch(): boolean;
|
|
54
|
+
get unsavedChangesConfirmation(): boolean;
|
|
55
|
+
withEditorTitle(title: string | null, params?: any): this;
|
|
56
|
+
withDialogSize(size?: StyleSizeEnum): this;
|
|
57
|
+
withDialogClassName(className: string): this;
|
|
58
|
+
withRunFunction(fn: (ctx: ActionContext<Model, Service>) => Observable<Model>): this;
|
|
59
|
+
withFetchFunction(fn: (ctx: ActionContext<Model, Service>) => Observable<Model>): this;
|
|
60
|
+
withSubmitFunction(fn: (ctx: ActionContext<Model, Service>) => Observable<Model>): this;
|
|
61
|
+
withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
|
|
62
|
+
withEditorAction(action: ActionDescriptorInst<Model>): this;
|
|
63
|
+
withEditorActions(actions: ActionDescriptorInst<Model>[]): this;
|
|
64
|
+
withEditorComponent(editorComponent: Type<any>): this;
|
|
65
|
+
withResubmit(enabled?: boolean, refetch?: boolean): this;
|
|
66
|
+
withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
|
|
67
|
+
}
|
|
68
|
+
export declare class ActionEditorDescriptor {
|
|
69
|
+
static create<Model>(editor: EditorDescriptorInst<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionEditorDescriptorInst<Model, undefined>;
|
|
70
|
+
static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model>, serviceProvider: ActionEditorProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionEditorDescriptorInst<Model, Service>;
|
|
71
|
+
}
|
|
72
|
+
export declare class ActionEditorSubmitDescriptorInst<Model> extends ActionDescriptorInst<Model> {
|
|
73
|
+
private readonly _editorAction;
|
|
74
|
+
private readonly _submitType;
|
|
75
|
+
constructor(editorAction: ActionEditorDescriptorInst<Model>, submitType?: ActionEditorSubmitTypeEnum);
|
|
76
|
+
get submitType(): ActionEditorSubmitTypeEnum;
|
|
77
|
+
}
|
|
78
|
+
export declare class ActionEditorSubmitDescriptor {
|
|
79
|
+
/**
|
|
80
|
+
* creates primary action with primary button style
|
|
81
|
+
* @param editorAction
|
|
82
|
+
* @param submitType
|
|
83
|
+
*/
|
|
84
|
+
static forPrimary<Model>(editorAction: ActionEditorDescriptorInst<Model>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model>;
|
|
85
|
+
/**
|
|
86
|
+
* creates secondary button with text button style
|
|
87
|
+
* @param editorAction
|
|
88
|
+
* @param submitType
|
|
89
|
+
*/
|
|
90
|
+
static forSecondary<Model>(editorAction: ActionEditorDescriptorInst<Model>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptorInst<Model>;
|
|
91
|
+
}
|
|
92
|
+
export declare class ActionEditorDetailsDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
|
|
93
|
+
static readonly ACTION_NAME = "details";
|
|
94
|
+
constructor(editorDescriptor: EditorDescriptorInst<Model>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
|
|
95
|
+
}
|
|
96
|
+
export declare class ActionEditorDetailsDescriptor {
|
|
97
|
+
static create<Model>(editor: EditorDescriptorInst<Model>): ActionEditorDetailsDescriptorInst<Model, undefined>;
|
|
98
|
+
static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorDetailsDescriptorInst<Model, Service>;
|
|
99
|
+
}
|
|
100
|
+
export declare class ActionEditorAddDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
|
|
101
|
+
static readonly ACTION_NAME = "add";
|
|
102
|
+
constructor(editorDescriptor: EditorDescriptorInst<Model>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
|
|
103
|
+
}
|
|
104
|
+
export declare class ActionEditorAddDescriptor {
|
|
105
|
+
static create<Model>(editor: EditorDescriptorInst<Model>): ActionEditorAddDescriptorInst<Model, undefined>;
|
|
106
|
+
static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorAddDescriptorInst<Model, Service>;
|
|
107
|
+
}
|
|
108
|
+
export declare class ActionEditorEditDescriptorInst<Model, Service = any> extends ActionEditorDescriptorInst<Model, Service> {
|
|
109
|
+
static readonly ACTION_NAME = "edit";
|
|
110
|
+
constructor(editorDescriptor: EditorDescriptorInst<Model>, cfg?: ActionEditorDescriptorCreateOptsProviderType<Model, Service>);
|
|
111
|
+
}
|
|
112
|
+
export declare class ActionEditorEditDescriptor {
|
|
113
|
+
static create<Model>(editor: EditorDescriptorInst<Model>): ActionEditorEditDescriptorInst<Model, undefined>;
|
|
114
|
+
static createWithProvider<Model, Service>(editor: EditorDescriptorInst<Model>, serviceProvider: ActionEditorProviderType<Model, Service>): ActionEditorEditDescriptorInst<Model, Service>;
|
|
115
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Params, QueryParamsHandling } from '@angular/router';
|
|
2
|
+
import { ClassType } from '../../types';
|
|
3
|
+
import { ModelDescriptor } from '../model';
|
|
4
|
+
import { ActionDescriptorConstructorOptsType, ActionDescriptorCreateFromClassOpts, ActionDescriptorCreateOptsParentType, ActionDescriptorInst } from './action.descriptor';
|
|
5
|
+
export type ActionLinkDescriptorConstructorOpts<Model> = Omit<ActionDescriptorConstructorOptsType<Model, undefined>, 'serviceType' | 'dataProvider'>;
|
|
6
|
+
export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorInst<Model, undefined> {
|
|
7
|
+
private _url;
|
|
8
|
+
private _pathSegments;
|
|
9
|
+
private _queryParams?;
|
|
10
|
+
private _queryParamsHandling?;
|
|
11
|
+
private _replaceUrl;
|
|
12
|
+
private _target;
|
|
13
|
+
private _isStyleLink;
|
|
14
|
+
constructor(actionName?: string, cfg?: ActionLinkDescriptorConstructorOpts<Model>);
|
|
15
|
+
get url(): string;
|
|
16
|
+
get pathSegments(): string[];
|
|
17
|
+
get queryParams(): Params | undefined;
|
|
18
|
+
get queryParamsHandling(): QueryParamsHandling | undefined;
|
|
19
|
+
get replaceUrl(): boolean;
|
|
20
|
+
get target(): string;
|
|
21
|
+
get isStyleLink(): boolean;
|
|
22
|
+
withHref(url: string): this;
|
|
23
|
+
withRouterLink(...pathSegments: string[]): this;
|
|
24
|
+
withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this;
|
|
25
|
+
withReplaceUrl(replaceUrl?: boolean): this;
|
|
26
|
+
withTarget(target?: '_self' | '_blank'): this;
|
|
27
|
+
withStyleLink(isStyleLink: boolean): this;
|
|
28
|
+
}
|
|
29
|
+
export declare class ActionLinkDescriptor {
|
|
30
|
+
static create<Model = any>(actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionLinkDescriptorInst<Model>;
|
|
31
|
+
static fromModel<Model>(model: ModelDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionLinkDescriptorInst<Model>;
|
|
32
|
+
static fromClass<Model>(type: ClassType<Model>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionLinkDescriptorInst<Model>;
|
|
33
|
+
static fromAction<Model>(action: ActionDescriptorInst<Model>): ActionLinkDescriptorInst<Model>;
|
|
34
|
+
}
|
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ModelDescriptor } from '../';
|
|
5
|
-
import { ActionContext, ActionContextValidation, IActionComponent } from '../../components/action/models';
|
|
6
|
-
import { IDataProvider, IEditorDataProvider } from '../../data-providers';
|
|
2
|
+
import { ActionContext, IActionComponent } from '../../components/action/models';
|
|
3
|
+
import { IDataProvider } from '../../data-providers';
|
|
7
4
|
import { APermissions } from '../../security/model';
|
|
8
|
-
import { StyleLevelEnum
|
|
9
|
-
import { ClassType,
|
|
10
|
-
import {
|
|
11
|
-
import { ActionActivationTriggerEnum,
|
|
5
|
+
import { StyleLevelEnum } from '../../styles/models';
|
|
6
|
+
import { ActionRunFnType, ActionValidationFnType, ClassType, ServiceClassType } from '../../types';
|
|
7
|
+
import { ModelDescriptor } from '../model';
|
|
8
|
+
import { ActionActivationTriggerEnum, ActionPositionEnum, ActionTypeEnum } from '../types';
|
|
12
9
|
import { ActionButtonDescriptor } from './action-button.descriptor';
|
|
13
|
-
import {
|
|
14
|
-
export
|
|
15
|
-
|
|
10
|
+
import { ActionConfirmationDescriptor } from './action-confirmation.descriptor';
|
|
11
|
+
export type ActionDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType & ActionDescriptorCreateOptsProviderType<Model, Service> & {
|
|
12
|
+
model?: ModelDescriptor<Model>;
|
|
13
|
+
};
|
|
14
|
+
export type ActionDescriptorCreateFromClassOpts<Model> = ActionDescriptorCreateOptsModel<Model> & ActionDescriptorCreateOptsI18nType & ActionDescriptorCreateOptsParentType;
|
|
15
|
+
export type ActionDescriptorCreateOptsProviderType<Model, Service> = {
|
|
16
|
+
serviceType?: ServiceClassType<Service>;
|
|
17
|
+
dataProvider?: IDataProvider<Model, Service>;
|
|
18
|
+
};
|
|
19
|
+
export type ActionDescriptorCreateOptsI18nType = {
|
|
20
|
+
i18nBaseKey?: string | ClassType<any>;
|
|
21
|
+
};
|
|
22
|
+
export type ActionDescriptorCreateOptsModel<Model> = {
|
|
23
|
+
idProperty?: keyof Model;
|
|
24
|
+
titleProperty?: keyof Model;
|
|
25
|
+
};
|
|
26
|
+
export type ActionDescriptorCreateOptsParentType = {
|
|
27
|
+
parentType?: ClassType<unknown>;
|
|
28
|
+
parentProperty?: string;
|
|
29
|
+
};
|
|
30
|
+
export type ActionProviderType<Model, Service> = ServiceClassType<Service> | IDataProvider<Model, Service>;
|
|
31
|
+
export declare const actionGetProviderCfgObj: <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service> | undefined) => ActionDescriptorCreateOptsProviderType<Model, Service>;
|
|
32
|
+
export declare class ActionDescriptorInst<Model, Service = any> {
|
|
33
|
+
protected readonly _model?: ModelDescriptor<Model>;
|
|
16
34
|
protected readonly _actionName: string;
|
|
17
35
|
protected readonly _actionNameLong: string;
|
|
18
36
|
protected readonly _parentType?: ClassType<unknown>;
|
|
19
37
|
protected readonly _parentTypeName?: string;
|
|
20
38
|
protected readonly _parentProperty?: string;
|
|
39
|
+
protected readonly _dataProvider?: IDataProvider<Model, Service>;
|
|
21
40
|
protected _i18nModelActionBaseKey?: string;
|
|
22
41
|
protected _type: ActionTypeEnum;
|
|
23
42
|
protected _activationTrigger: ActionActivationTriggerEnum;
|
|
@@ -26,27 +45,26 @@ export declare class ActionDescriptor<T> {
|
|
|
26
45
|
private _positionTableviewCategories?;
|
|
27
46
|
protected _tableviewCategory?: string;
|
|
28
47
|
protected _routeUrl: string | null;
|
|
29
|
-
protected
|
|
30
|
-
protected
|
|
31
|
-
protected
|
|
32
|
-
protected
|
|
33
|
-
protected _runConfirmationDialogDescriptor?: ActionConfirmationDialogDescriptor<T>;
|
|
48
|
+
protected _runFunction?: ActionRunFnType<Model, Service>;
|
|
49
|
+
protected _isVisibleFunction?: ActionValidationFnType<Model, Service>;
|
|
50
|
+
protected _isEnabledFunction?: ActionValidationFnType<Model, Service>;
|
|
51
|
+
protected _runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<Model>;
|
|
34
52
|
protected _hasRunNotificationSuccess: boolean;
|
|
35
53
|
protected _runNotificationSuccessTitle?: string;
|
|
36
54
|
protected _runNotificationSuccessMessage?: string;
|
|
37
55
|
protected _hasRunNotificationError: boolean;
|
|
38
56
|
protected _runNotificationErrorTitle?: string;
|
|
39
57
|
protected _runNotificationErrorMessage?: string;
|
|
40
|
-
protected _afterRunAction?:
|
|
41
|
-
protected _onRunErrorAction?:
|
|
58
|
+
protected _afterRunAction?: ActionDescriptorInst<any> | ((ctx: ActionContext<Model, any>) => ActionDescriptorInst<any>);
|
|
59
|
+
protected _onRunErrorAction?: ActionDescriptorInst<Model> | ((ctx: ActionContext<Model, any>) => ActionDescriptorInst<Model>);
|
|
42
60
|
protected _permissions?: APermissions;
|
|
43
61
|
protected _button: ActionButtonDescriptor;
|
|
44
62
|
protected _hasItemsSelection: boolean;
|
|
45
|
-
protected _component?: Type<IActionComponent<
|
|
63
|
+
protected _component?: Type<IActionComponent<Model>>;
|
|
46
64
|
protected _subactionsAsMenu: boolean;
|
|
47
|
-
protected _subactions: Array<
|
|
48
|
-
constructor(
|
|
49
|
-
get model(): ModelDescriptor<
|
|
65
|
+
protected _subactions: Array<ActionDescriptorInst<Model>>;
|
|
66
|
+
protected constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<Model, Service>);
|
|
67
|
+
get model(): ModelDescriptor<Model, import("../../types").ClassOptType<Model>> | undefined;
|
|
50
68
|
get parentTypeName(): string | undefined;
|
|
51
69
|
get parentProperty(): string | undefined;
|
|
52
70
|
get i18nModelActionBaseKey(): string | undefined;
|
|
@@ -55,15 +73,15 @@ export declare class ActionDescriptor<T> {
|
|
|
55
73
|
get position(): ActionPositionEnum;
|
|
56
74
|
get level(): StyleLevelEnum;
|
|
57
75
|
get routeUrl(): string | null;
|
|
58
|
-
get dataProvider(): IDataProvider<
|
|
76
|
+
get dataProvider(): IDataProvider<Model, Service> | undefined;
|
|
59
77
|
get hasRunFunction(): boolean;
|
|
60
|
-
get runFunction():
|
|
61
|
-
get isVisibleFunction():
|
|
62
|
-
get isEnabledFunction():
|
|
78
|
+
get runFunction(): ActionRunFnType<Model, Service>;
|
|
79
|
+
get isVisibleFunction(): ActionValidationFnType<Model, Service> | undefined;
|
|
80
|
+
get isEnabledFunction(): ActionValidationFnType<Model, Service> | undefined;
|
|
63
81
|
get actionName(): string;
|
|
64
82
|
get actionNameLong(): string;
|
|
65
83
|
get className(): string | undefined;
|
|
66
|
-
get runConfirmationDialogDescriptor():
|
|
84
|
+
get runConfirmationDialogDescriptor(): ActionConfirmationDescriptor<Model> | undefined;
|
|
67
85
|
get hasRunConfirmation(): boolean;
|
|
68
86
|
get hasRunNotificationSuccess(): boolean;
|
|
69
87
|
get runNotificationSuccessTitle(): string | undefined;
|
|
@@ -71,165 +89,61 @@ export declare class ActionDescriptor<T> {
|
|
|
71
89
|
get hasRunNotificationError(): boolean;
|
|
72
90
|
get runNotificationErrorTitle(): string | undefined;
|
|
73
91
|
get runNotificationErrorMessage(): string | undefined;
|
|
74
|
-
get afterRunAction():
|
|
75
|
-
get onRunErrorAction():
|
|
92
|
+
get afterRunAction(): ActionDescriptorInst<any, any> | ((ctx: ActionContext<Model, any>) => ActionDescriptorInst<any, any>) | undefined;
|
|
93
|
+
get onRunErrorAction(): ActionDescriptorInst<Model, any> | ((ctx: ActionContext<Model, any>) => ActionDescriptorInst<Model, any>) | undefined;
|
|
76
94
|
get permissions(): APermissions | undefined;
|
|
77
95
|
get tableviewCategory(): string | undefined;
|
|
78
96
|
get hasItemsSelection(): boolean;
|
|
79
97
|
get button(): ActionButtonDescriptor;
|
|
80
|
-
get component(): Type<IActionComponent<
|
|
98
|
+
get component(): Type<IActionComponent<Model, undefined>> | undefined;
|
|
81
99
|
get positionTableviewCategories(): string[] | undefined;
|
|
82
100
|
get subactionsAsMenu(): boolean;
|
|
83
|
-
get subactions():
|
|
101
|
+
get subactions(): ActionDescriptorInst<Model, any>[];
|
|
84
102
|
protected setI18nModelActionBaseKey(base?: string): void;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
withIsVisibleFunction<S>(fn: (ctx: ActionContextValidation<T, S>) => Observable<boolean>): this;
|
|
89
|
-
withIsEnabledFunction<S>(fn: (ctx: ActionContextValidation<T, S>) => Observable<boolean>): this;
|
|
103
|
+
withRunFunction(fn: ActionRunFnType<Model, Service>): this;
|
|
104
|
+
withIsVisibleFunction(fn?: ActionValidationFnType<Model, Service>): this;
|
|
105
|
+
withIsEnabledFunction(fn?: ActionValidationFnType<Model, Service>): this;
|
|
90
106
|
withRouteTrigger(routeUrl: string): this;
|
|
91
107
|
withPosition(position: ActionPositionEnum): this;
|
|
92
108
|
/**
|
|
93
109
|
* creates confirmation action with default style based on action descriptor
|
|
94
110
|
*/
|
|
95
|
-
withRunConfirmation():
|
|
111
|
+
withRunConfirmation(): ActionConfirmationDescriptor<Model>;
|
|
96
112
|
/**
|
|
97
113
|
* Add a configuration dialogue to action using ActionConfigurationDescriptor
|
|
98
114
|
* @param runConfirmationDialogDescriptor descriptor with customizable information for dialog
|
|
99
115
|
*/
|
|
100
|
-
withRunConfirmationDescriptor(runConfirmationDialogDescriptor
|
|
116
|
+
withRunConfirmationDescriptor(runConfirmationDialogDescriptor?: ActionConfirmationDescriptor<Model>): this;
|
|
101
117
|
withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): this;
|
|
102
118
|
withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
|
|
103
|
-
withAfterRunAction<
|
|
104
|
-
withOnRunErrorAction<S = any>(action
|
|
119
|
+
withAfterRunAction<Return, Service = any>(action?: ActionDescriptorInst<Return> | ((ctx: ActionContext<Model, Service>) => ActionDescriptorInst<Return>)): this;
|
|
120
|
+
withOnRunErrorAction<S = any>(action?: ActionDescriptorInst<Model> | ((ctx: ActionContext<Model, S>) => ActionDescriptorInst<Model>)): this;
|
|
105
121
|
withPermissions(permissions: APermissions): this;
|
|
106
122
|
withTableviewCategory(permissionsRouteType: string): this;
|
|
107
123
|
withButtonDescriptor(button: ActionButtonDescriptor): this;
|
|
108
124
|
withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
|
|
109
125
|
withItemsSelection(hasSelection?: boolean): this;
|
|
110
|
-
withComponent(component: Type<IActionComponent<
|
|
126
|
+
withComponent(component: Type<IActionComponent<Model>>): this;
|
|
111
127
|
withPositionTableviewCategories(positionTableviewCategories: string[]): this;
|
|
112
128
|
withI18nBase(base: ClassType<unknown> | string): this;
|
|
113
|
-
withSubactionsAsMenu(): this;
|
|
114
|
-
withSubactions(...subactions: Array<
|
|
115
|
-
copyTo(descriptor:
|
|
129
|
+
withSubactionsAsMenu(subactionsAsMenu?: boolean): this;
|
|
130
|
+
withSubactions(...subactions: Array<ActionDescriptorInst<Model>>): this;
|
|
131
|
+
copyTo(descriptor: ActionDescriptorInst<Model, Service>): ActionDescriptorInst<Model, Service>;
|
|
116
132
|
}
|
|
117
|
-
export declare class
|
|
118
|
-
constructor(
|
|
133
|
+
export declare class ActionDescriptor extends ActionDescriptorInst<any> {
|
|
134
|
+
protected constructor();
|
|
135
|
+
static create<Model>(actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
|
|
136
|
+
static createWithProvider<Service, Model>(serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
|
|
137
|
+
static fromModel<Model>(model: ModelDescriptor<Model>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, undefined>;
|
|
138
|
+
static fromModelWithProvider<Model, Service>(model: ModelDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateOptsParentType): ActionDescriptorInst<Model, Service>;
|
|
139
|
+
static fromClass<Model>(type: ClassType<Model>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionDescriptorInst<Model, undefined>;
|
|
140
|
+
static fromClassWithProvider<Model, Service>(classType: ClassType<Model>, serviceProvider: ActionProviderType<Model, Service>, actionName: string, cfg?: ActionDescriptorCreateFromClassOpts<Model>): ActionDescriptorInst<Model, Service>;
|
|
119
141
|
}
|
|
120
|
-
export declare class
|
|
121
|
-
private readonly _editorDescriptor;
|
|
122
|
-
protected _editorActions: ActionDescriptor<T>[];
|
|
123
|
-
protected _editorTitle?: string | null;
|
|
124
|
-
protected _editorTitleParams?: any;
|
|
125
|
-
protected _hasFetchNotificationSuccess: boolean;
|
|
126
|
-
protected _fetchNotificationSuccessTitle?: string;
|
|
127
|
-
protected _fetchNotificationSuccessMessage?: string;
|
|
128
|
-
protected _dialogSize: StyleSizeEnum;
|
|
129
|
-
protected _dialogClassName?: string;
|
|
130
|
-
protected _dataProvider?: IEditorDataProvider<T, any>;
|
|
131
|
-
protected _fetchFunction?: (ctx: ActionContext<T, any>) => Observable<T>;
|
|
132
|
-
protected _submitFunction?: (ctx: ActionContext<T, any>) => Observable<T>;
|
|
133
|
-
protected _editorComponent?: Type<any>;
|
|
134
|
-
protected _resubmitEnabled?: boolean;
|
|
135
|
-
protected _resubmitRefetch: boolean;
|
|
136
|
-
protected _unsavedChangesConfirmation: boolean;
|
|
137
|
-
constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<unknown>, parentProperty?: string);
|
|
138
|
-
get editorTitle(): string | null | undefined;
|
|
139
|
-
get editorTitleParams(): any;
|
|
140
|
-
get editorDescriptor(): EditorDescriptor<T>;
|
|
141
|
-
get dialogSize(): StyleSizeEnum;
|
|
142
|
-
get dialogClassName(): string | undefined;
|
|
143
|
-
get hasFetchNotificationSuccess(): boolean;
|
|
144
|
-
get fetchNotificationSuccessTitle(): string | undefined;
|
|
145
|
-
get fetchNotificationSuccessMessage(): string | undefined;
|
|
146
|
-
get dataProvider(): IEditorDataProvider<T, any> | undefined;
|
|
147
|
-
get runFunction(): (ctx: ActionContext<T, unknown>) => Observable<T>;
|
|
148
|
-
get fetchFunction(): ((ctx: ActionContext<T, any>) => Observable<T>) | undefined;
|
|
149
|
-
get submitFunction(): ((ctx: ActionContext<T, any>) => Observable<T>) | undefined;
|
|
150
|
-
get editorActions(): ActionDescriptor<T>[];
|
|
151
|
-
get editorComponent(): Type<any> | undefined;
|
|
152
|
-
get resubmitEnabled(): boolean | undefined;
|
|
153
|
-
get resubmitRefetch(): boolean;
|
|
154
|
-
get unsavedChangesConfirmation(): boolean;
|
|
155
|
-
withEditorTitle(title: string | null, params?: any): this;
|
|
156
|
-
withDataProvider(dataProvider: IEditorDataProvider<T, any>): this;
|
|
157
|
-
withServiceType<S>(serviceType: Type<S>): this;
|
|
158
|
-
withDialogSize(size?: StyleSizeEnum): this;
|
|
159
|
-
withDialogClassName(className: string): this;
|
|
160
|
-
withRunFunction<S>(fn: (ctx: ActionContext<T, S>) => Observable<T>): this;
|
|
161
|
-
withFetchFunction<S>(fn: (ctx: ActionContext<T, S>) => Observable<T>): this;
|
|
162
|
-
withSubmitFunction<S>(fn: (ctx: ActionContext<T, S>) => Observable<T>): this;
|
|
163
|
-
withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
|
|
164
|
-
withEditorAction(action: ActionDescriptor<T>): this;
|
|
165
|
-
withEditorActions(actions: ActionDescriptor<T>[]): this;
|
|
166
|
-
withEditorComponent(editorComponent: Type<any>): this;
|
|
167
|
-
withResubmit(enabled?: boolean, refetch?: boolean): this;
|
|
168
|
-
withUnsavedChangesConfirmation(unsavedChangesConfirmation?: boolean): this;
|
|
169
|
-
}
|
|
170
|
-
export declare class ActionEditorSubmitDescriptor<T> extends ActionDescriptor<T> {
|
|
171
|
-
private readonly _editorAction;
|
|
172
|
-
private readonly _submitType;
|
|
173
|
-
constructor(editorAction: ActionEditorDescriptor<T>, submitType?: ActionEditorSubmitTypeEnum);
|
|
174
|
-
/**
|
|
175
|
-
* creates primary action with primary button style
|
|
176
|
-
* @param editorAction
|
|
177
|
-
* @param submitType
|
|
178
|
-
*/
|
|
179
|
-
static forPrimary<T>(editorAction: ActionEditorDescriptor<T>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptor<T>;
|
|
180
|
-
/**
|
|
181
|
-
* creates secondary button with text button style
|
|
182
|
-
* @param editorAction
|
|
183
|
-
* @param submitType
|
|
184
|
-
*/
|
|
185
|
-
static forSecondary<T>(editorAction: ActionEditorDescriptor<T>, submitType?: ActionEditorSubmitTypeEnum): ActionEditorSubmitDescriptor<T>;
|
|
186
|
-
get submitType(): ActionEditorSubmitTypeEnum;
|
|
187
|
-
}
|
|
188
|
-
export declare class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
189
|
-
static readonly ACTION_NAME = "details";
|
|
190
|
-
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
191
|
-
withServiceType<S>(serviceType: Type<S>): this;
|
|
192
|
-
withServiceFetchFunction<S>(serviceType: Type<S>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
|
|
193
|
-
}
|
|
194
|
-
export declare class ActionEditorAddDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
195
|
-
static readonly ACTION_NAME = "add";
|
|
196
|
-
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
197
|
-
withServiceType<S>(serviceType: Type<S>): this;
|
|
198
|
-
withServiceSubmitFunction<S>(serviceType: Type<S>, createFn?: (item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
|
|
199
|
-
}
|
|
200
|
-
export declare class ActionEditorEditDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
201
|
-
static readonly ACTION_NAME = "edit";
|
|
202
|
-
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
203
|
-
withServiceType<S>(serviceType: Type<S>): this;
|
|
204
|
-
withServiceSubmitFunction<S>(serviceType: Type<S>, updateFn?: (id: IdType, item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this;
|
|
205
|
-
}
|
|
206
|
-
export declare class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {
|
|
142
|
+
export declare class ActionDeleteDescriptorInst<Model, Service = any> extends ActionDescriptorInst<Model, Service> {
|
|
207
143
|
static readonly ACTION_NAME = "delete";
|
|
208
|
-
constructor(model: ModelDescriptor<
|
|
209
|
-
withServiceType<S>(serviceType: Type<S>): this;
|
|
210
|
-
withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this;
|
|
144
|
+
constructor(model: ModelDescriptor<Model>, cfg?: ActionDescriptorCreateOptsProviderType<Model, Service>);
|
|
211
145
|
}
|
|
212
|
-
export declare class
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
private _queryParams?;
|
|
216
|
-
private _queryParamsHandling?;
|
|
217
|
-
private _replaceUrl;
|
|
218
|
-
private _target;
|
|
219
|
-
private _isStyleLink;
|
|
220
|
-
constructor(model?: ModelDescriptor<T> | null, actionName?: string);
|
|
221
|
-
static fromActionDescriptor<T>(actionDescriptor: ActionDescriptor<T>): ActionLinkDescriptor<T>;
|
|
222
|
-
get url(): string;
|
|
223
|
-
get pathSegments(): string[];
|
|
224
|
-
get queryParams(): Params | undefined;
|
|
225
|
-
get queryParamsHandling(): QueryParamsHandling | undefined;
|
|
226
|
-
get replaceUrl(): boolean;
|
|
227
|
-
get target(): string;
|
|
228
|
-
get isStyleLink(): boolean;
|
|
229
|
-
withHref(url: string): this;
|
|
230
|
-
withRouterLink(...pathSegments: string[]): this;
|
|
231
|
-
withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this;
|
|
232
|
-
withReplaceUrl(replaceUrl?: boolean): this;
|
|
233
|
-
withTarget(target?: '_self' | '_blank'): this;
|
|
234
|
-
withStyleLink(isStyleLink: boolean): this;
|
|
146
|
+
export declare class ActionDeleteDescriptor {
|
|
147
|
+
static create<Model>(model: ModelDescriptor<Model>): ActionDeleteDescriptorInst<Model, undefined>;
|
|
148
|
+
static createWithProvider<Model, Service>(model: ModelDescriptor<Model>, serviceProvider: ActionProviderType<Model, Service>): ActionDeleteDescriptorInst<Model, Service>;
|
|
235
149
|
}
|