@mediusinc/mng-commons 3.6.0-rc.3 → 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,70 +1,54 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { MediusQueryParam } from '../../api/models';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
4
3
|
import { MngFieldEventData, MngFormEvent, MngFormEventTypeEnum } from '../../components/form/models';
|
|
5
|
-
import { ILookupDataProvider } from '../../data-providers';
|
|
4
|
+
import { ILookupDataProvider, ITableDataProvider } from '../../data-providers';
|
|
6
5
|
import { TableviewAttributeDef } from '../../models';
|
|
7
|
-
import { ClassType, EnumConstantType, EnumType, MngFieldValidationMessage, MngFieldValidator } from '../../types';
|
|
8
|
-
import { ModelDescriptor } from '../model
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { ArrayItemType, ClassType, EnumConstantType, EnumType, IdType, MngFieldValidationMessage, MngFieldValidator, Nullable } from '../../types';
|
|
7
|
+
import { ModelDescriptor } from '../model';
|
|
8
|
+
import { TableDescriptorInst } from '../table';
|
|
9
|
+
import { TableviewDescriptorInst } from '../tableview';
|
|
11
10
|
import { FieldInputTypeEnum, TableviewEditorTypeEnum } from '../types';
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { FieldActionDescriptor } from './field-action.descriptor';
|
|
12
|
+
import { AFieldDescriptor } from './field-base.descriptor';
|
|
13
|
+
import { FieldGroupDescriptor, FieldTabGroupDescriptor } from './field-group.descriptor';
|
|
14
|
+
import { FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupProviderType } from './field-lookup.descriptor';
|
|
15
|
+
import { FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor } from './field-many.descriptor';
|
|
16
|
+
import { FieldInputDescriptor, FieldInputDescriptorType } from './field.descriptor';
|
|
17
|
+
import { IFieldsManageInterface } from './internal/editor-fields.model';
|
|
18
|
+
import { IEditorDescriptorInternal } from './internal/editor.model';
|
|
19
|
+
export declare class EditorDescriptorInst<EditorModel> implements IEditorDescriptorInternal<EditorModel>, IFieldsManageInterface<EditorModel> {
|
|
14
20
|
static readonly defaultGroupName = "_default";
|
|
15
|
-
/** @ignore */ protected readonly _model: ModelDescriptor<
|
|
16
|
-
/** @ignore */ protected readonly _modelType: ClassType<T>;
|
|
21
|
+
/** @ignore */ protected readonly _model: ModelDescriptor<EditorModel>;
|
|
17
22
|
/** @ignore */ protected readonly _tableviewEditorType: TableviewEditorTypeEnum;
|
|
18
|
-
/** @ignore */ protected readonly _tabs: Array<FieldTabGroupDescriptor<
|
|
19
|
-
/** @ignore */ protected readonly _groups: Array<FieldGroupDescriptor<
|
|
20
|
-
/** @ignore */ protected _fields: Array<AFieldDescriptor<any,
|
|
21
|
-
/** @ignore */ protected _currentTabGroup?: FieldTabGroupDescriptor<
|
|
22
|
-
/** @ignore */ protected _currentGroup?: FieldGroupDescriptor<
|
|
23
|
+
/** @ignore */ protected readonly _tabs: Array<FieldTabGroupDescriptor<EditorModel>>;
|
|
24
|
+
/** @ignore */ protected readonly _groups: Array<FieldGroupDescriptor<EditorModel>>;
|
|
25
|
+
/** @ignore */ protected _fields: Array<AFieldDescriptor<any, EditorModel>>;
|
|
26
|
+
/** @ignore */ protected _currentTabGroup?: FieldTabGroupDescriptor<EditorModel>;
|
|
27
|
+
/** @ignore */ protected _currentGroup?: FieldGroupDescriptor<EditorModel>;
|
|
23
28
|
/** @ignore */ protected _disabled: boolean;
|
|
24
29
|
/** @ignore */ protected _isLocalized: boolean;
|
|
25
30
|
/** @ignore */ protected _localizationLocaleProperty?: string;
|
|
31
|
+
/** @ignore */ protected _localizationModel?: ModelDescriptor<any>;
|
|
26
32
|
/** @ignore */ protected _localizationLocalizationProperty?: string;
|
|
27
|
-
/** @ignore */ protected
|
|
28
|
-
/** @ignore */ protected _localeLookup?: (queryParam?: MediusQueryParam, service?: any, search?: string) => Observable<Array<string>>;
|
|
29
|
-
/** @ignore */ protected readonly _eventsSubject: Subject<MngFormEvent<T>>;
|
|
33
|
+
/** @ignore */ protected readonly _eventsSubject: Subject<MngFormEvent<EditorModel>>;
|
|
30
34
|
/**
|
|
31
35
|
* Creates new instance of editor descriptor.
|
|
32
|
-
* @param
|
|
33
|
-
* @param idProperty Id property representing model (optional).
|
|
34
|
-
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
36
|
+
* @param model Model descriptor.
|
|
35
37
|
* @param tableviewEditorType Type of editor in tableview (add, edit, view or none).
|
|
36
|
-
* @param i18nBaseKey Base key for translations.
|
|
37
|
-
*/
|
|
38
|
-
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType?: TableviewEditorTypeEnum, i18nBaseKey?: string | ClassType<unknown>);
|
|
39
|
-
/**
|
|
40
|
-
* Creates editor descriptor automatically based on openapi model's attributes definition which is automatically extracted. All fields will be included.
|
|
41
|
-
* @param modelType Model's class.
|
|
42
|
-
* @param idProperty Id property representing model (optional).
|
|
43
|
-
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
44
|
-
* @param tableEditorType Type of editor in tableview (add, edit, view or none).
|
|
45
38
|
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Creates editor descriptor automatically based on openapi model's attributes definition provided in parameters. Only fields for provided attributes will be included.
|
|
49
|
-
* @param modelType Model's class.
|
|
50
|
-
* @param attributes List of attribute definitions from which fields should be created.
|
|
51
|
-
* @param idProperty Id property representing model (optional).
|
|
52
|
-
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
53
|
-
* @param tableEditorType Type of editor in tableview (add, edit, view or none).
|
|
54
|
-
*/
|
|
55
|
-
static fromModelWithAttributes<T>(modelType: ClassType<T>, attributes: TableviewAttributeDef[], idProperty?: string, titleProperty?: string, tableEditorType?: TableviewEditorTypeEnum): EditorDescriptor<T>;
|
|
39
|
+
protected constructor(model: ModelDescriptor<EditorModel>, tableviewEditorType?: TableviewEditorTypeEnum);
|
|
56
40
|
/**
|
|
57
41
|
* Model descriptor for editor.
|
|
58
42
|
*/
|
|
59
|
-
get model(): ModelDescriptor<
|
|
43
|
+
get model(): ModelDescriptor<EditorModel, import("../../types").ClassOptType<EditorModel>>;
|
|
60
44
|
/**
|
|
61
45
|
* Editor's tabs.
|
|
62
46
|
*/
|
|
63
|
-
get tabs(): FieldTabGroupDescriptor<
|
|
47
|
+
get tabs(): FieldTabGroupDescriptor<EditorModel>[];
|
|
64
48
|
/**
|
|
65
49
|
* Editor's fields.
|
|
66
50
|
*/
|
|
67
|
-
get fields(): AFieldDescriptor<any,
|
|
51
|
+
get fields(): AFieldDescriptor<any, EditorModel, any>[];
|
|
68
52
|
/**
|
|
69
53
|
* Type of editor for tableview.
|
|
70
54
|
*/
|
|
@@ -76,69 +60,110 @@ export declare class EditorDescriptor<T> {
|
|
|
76
60
|
get isLocalized(): boolean;
|
|
77
61
|
get localizationLocaleProperty(): string | undefined;
|
|
78
62
|
get localizationLocalizationProperty(): string | undefined;
|
|
79
|
-
get
|
|
80
|
-
get localeLookup(): ((queryParam?: MediusQueryParam | undefined, service?: any, search?: string | undefined) => Observable<string[]>) | undefined;
|
|
63
|
+
get localizationModel(): ModelDescriptor<any, import("../../types").ClassOptType<any>> | undefined;
|
|
81
64
|
/**
|
|
82
65
|
* Creates new tab group. Next added fields are added to newly created tab group.
|
|
83
66
|
* @param name Name of the group.
|
|
84
67
|
* @param title Title key for the tab.
|
|
85
68
|
*/
|
|
86
|
-
createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<
|
|
69
|
+
createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<EditorModel>;
|
|
87
70
|
/**
|
|
88
71
|
* Creates new field group. Next added fields are added to newly created field group.
|
|
89
72
|
* @param name Name of the group.
|
|
90
73
|
* @param title Title key for the group.
|
|
91
74
|
*/
|
|
92
|
-
createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<
|
|
75
|
+
createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<EditorModel>;
|
|
76
|
+
/**
|
|
77
|
+
* Gets field by the model property name.
|
|
78
|
+
* @param property Model property name.
|
|
79
|
+
*/
|
|
80
|
+
getField(property: keyof EditorModel): AFieldDescriptor<any, EditorModel, any> | null;
|
|
81
|
+
/**
|
|
82
|
+
* Gets field by the model property name (UNSAFE).
|
|
83
|
+
* @param property Model property name.
|
|
84
|
+
*/
|
|
85
|
+
getFieldUnsafe(property: string): AFieldDescriptor<any, EditorModel> | null;
|
|
86
|
+
/**
|
|
87
|
+
* Removes field by the model property name.
|
|
88
|
+
* @param property Model property name.
|
|
89
|
+
*/
|
|
90
|
+
removeField(property: keyof EditorModel): void;
|
|
91
|
+
/**
|
|
92
|
+
* Removes field by the model property name (UNSAFE).
|
|
93
|
+
* @param property Model property name.
|
|
94
|
+
*/
|
|
95
|
+
removeFieldUnsafe(property: string): void;
|
|
93
96
|
/**
|
|
94
97
|
* Adds field by the descriptor.
|
|
95
98
|
* @param field Field descriptor.
|
|
96
99
|
*/
|
|
97
|
-
addFieldDescriptor<
|
|
100
|
+
addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, EditorModel, FieldValue>): this;
|
|
98
101
|
/**
|
|
99
102
|
* Adds field by the model property name.
|
|
100
103
|
* @param property Model property name.
|
|
101
104
|
*/
|
|
102
|
-
addField(property:
|
|
105
|
+
addField<Property extends keyof EditorModel, FieldModel = NonNullable<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property): FieldInputDescriptor<EditorModel, FieldModel, FieldValue>;
|
|
103
106
|
/**
|
|
104
|
-
*
|
|
107
|
+
* Adds field by the model property name (UNSAFE). Property is not checked on editor model.
|
|
108
|
+
* Use {addField} for safe usage.
|
|
105
109
|
* @param property Model property name.
|
|
106
110
|
*/
|
|
107
|
-
|
|
111
|
+
addFieldUnsafe<FieldModel = FieldInputDescriptorType, FieldValue = FieldModel>(property: string): FieldInputDescriptor<EditorModel, FieldModel, FieldValue>;
|
|
112
|
+
addFields(...properties: (keyof EditorModel)[]): this;
|
|
113
|
+
addFieldAction(actionName: string): FieldActionDescriptor<EditorModel>;
|
|
108
114
|
/**
|
|
109
|
-
*
|
|
115
|
+
* Adds lookup field.
|
|
110
116
|
* @param property Model property name.
|
|
117
|
+
* @param type Model's class type.
|
|
111
118
|
*/
|
|
112
|
-
|
|
113
|
-
addFieldAction(actionName: string): FieldActionDescriptor<T>;
|
|
119
|
+
addFieldLookup<K extends keyof EditorModel, FieldModel = NonNullable<EditorModel[K]>, FieldValue = EditorModel[K]>(property: K, type?: ClassType<FieldModel>): FieldLookupDescriptor<FieldModel, EditorModel, undefined, FieldValue, string>;
|
|
114
120
|
/**
|
|
115
|
-
* Adds lookup field.
|
|
121
|
+
* Adds lookup field (UNSAFE).
|
|
116
122
|
* @param property Model property name.
|
|
117
|
-
* @param
|
|
123
|
+
* @param type Model's class type.
|
|
118
124
|
*/
|
|
119
|
-
|
|
125
|
+
addFieldLookupUnsafe<FieldModel, FieldValue = FieldModel>(property: string, type?: ClassType<FieldModel>): FieldLookupDescriptor<FieldModel, EditorModel, undefined, FieldValue, string>;
|
|
126
|
+
addFieldLookupWithPropertyAsValueUnsafe<FieldModel, FieldValue = Nullable<IdType>>(property: string, optionsValueProperty: string): FieldLookupDescriptor<FieldModel, EditorModel, undefined, FieldValue, string>;
|
|
127
|
+
addFieldLookupWithProvider<Service, Property extends keyof EditorModel, FieldModel = NonNullable<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, provider: FieldLookupProviderType<FieldModel, Service>, type?: ClassType<FieldModel>): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue, string>;
|
|
128
|
+
addFieldLookupWithProviderUnsafe<Service, FieldModel, FieldValue = FieldModel>(property: string, provider: FieldLookupProviderType<FieldModel, Service>, type?: ClassType<FieldModel>): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue, string>;
|
|
129
|
+
addFieldLookupEnum(property: keyof EditorModel, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<EditorModel>;
|
|
120
130
|
/**
|
|
121
131
|
* Adds enum lookup field.
|
|
122
132
|
* @param property Model's property name.
|
|
123
|
-
* @param enumType Type of enum
|
|
133
|
+
* @param enumType Type of enum.
|
|
124
134
|
* @param options Provides subset of enum's available constants.
|
|
125
135
|
* @param nameAsValue If constant's name should be used as final value of the enum. Primarily, constant's value will be used.
|
|
126
136
|
* @param optionsTitlePath Title key path from where translations are provided. If null, the enum's values won't be translated.
|
|
127
137
|
*/
|
|
128
|
-
|
|
138
|
+
addFieldLookupEnumUnsafe(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null): FieldLookupEnumDescriptor<EditorModel>;
|
|
129
139
|
/**
|
|
130
140
|
* Adds table/details/add/edit field for one-to-many (1:n) relations.
|
|
131
141
|
* @param property Model's property name.
|
|
132
142
|
* @param tableviewDescriptor Tableview descriptor for related model.
|
|
133
143
|
*/
|
|
134
|
-
addFieldManyEditor<
|
|
144
|
+
addFieldManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, tableviewDescriptor: TableviewDescriptorInst<FieldModel>): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue>;
|
|
145
|
+
/**
|
|
146
|
+
* Adds table/details/add/edit field for one-to-many (1:n) relations (UNSAFE).
|
|
147
|
+
* @param property Model's property name.
|
|
148
|
+
* @param tableviewDescriptor Tableview descriptor for related model.
|
|
149
|
+
*/
|
|
150
|
+
addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel>): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue>;
|
|
135
151
|
/**
|
|
136
152
|
* Adds tables for many-to-many (m:n) relations.
|
|
137
153
|
* @param property Model's property name.
|
|
138
154
|
* @param mainTableDescriptor Main table descriptor for displaying items added to main model's property.
|
|
139
155
|
* @param lookupTableDescriptor Lookup table descriptor for displaying items to be added to main model's property.
|
|
140
156
|
*/
|
|
141
|
-
addFieldManyToManyEditor<
|
|
157
|
+
addFieldManyToManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, undefined, FieldValue>;
|
|
158
|
+
/**
|
|
159
|
+
* Adds tables for many-to-many (m:n) relations (UNSAFE).
|
|
160
|
+
* @param property Model's property name.
|
|
161
|
+
* @param mainTableDescriptor Main table descriptor for displaying items added to main model's property.
|
|
162
|
+
* @param lookupTableDescriptor Lookup table descriptor for displaying items to be added to main model's property.
|
|
163
|
+
*/
|
|
164
|
+
addFieldManyToManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, undefined, FieldValue>;
|
|
165
|
+
addFieldManyToManyEditorWithProvider<Property extends keyof EditorModel, ServiceType, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue>;
|
|
166
|
+
addFieldManyToManyEditorWithProviderUnsafe<FieldModel, ServiceType, FieldValue = FieldModel[]>(property: string, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue>;
|
|
142
167
|
/**
|
|
143
168
|
* Disables field on editor.
|
|
144
169
|
* @param disabled
|
|
@@ -154,19 +179,19 @@ export declare class EditorDescriptor<T> {
|
|
|
154
179
|
/**
|
|
155
180
|
* Creates a copy of editor descriptor object.
|
|
156
181
|
*/
|
|
157
|
-
copy():
|
|
182
|
+
copy(): EditorDescriptorInst<EditorModel>;
|
|
158
183
|
/**
|
|
159
184
|
* Created group from field group descriptor.
|
|
160
185
|
* @param fieldGroup Field group descriptor.
|
|
161
186
|
* @internal
|
|
162
187
|
*/
|
|
163
|
-
createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<
|
|
188
|
+
createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<EditorModel>): this;
|
|
164
189
|
/**
|
|
165
190
|
* Creates tab group from tab group descriptor.
|
|
166
191
|
* @param tabGroup Tab group descriptor.
|
|
167
192
|
* @internal
|
|
168
193
|
*/
|
|
169
|
-
protected createTabGroupDescriptor(tabGroup: FieldTabGroupDescriptor<
|
|
194
|
+
protected createTabGroupDescriptor(tabGroup: FieldTabGroupDescriptor<EditorModel>): this;
|
|
170
195
|
/**
|
|
171
196
|
* Creates default field group.
|
|
172
197
|
* @internal
|
|
@@ -183,40 +208,67 @@ export declare class EditorDescriptor<T> {
|
|
|
183
208
|
* @param fieldType new field type for selected field
|
|
184
209
|
* @param args additional parameters for field
|
|
185
210
|
*/
|
|
186
|
-
withFieldModifiedType(property:
|
|
211
|
+
withFieldModifiedType(property: keyof EditorModel, fieldType: FieldInputTypeEnum, ...args: any[]): this;
|
|
212
|
+
withFieldModifiedTypeUnsafe(property: string, fieldType: FieldInputTypeEnum, ...args: any[]): this;
|
|
187
213
|
/**
|
|
188
214
|
* Modifies selected field with enum type.
|
|
189
215
|
* @param property Model's property name.
|
|
190
216
|
* @param enumType type of enum for new field
|
|
191
217
|
* @param optionsTitlePath
|
|
192
218
|
* @param values
|
|
219
|
+
* @param nameAsValue
|
|
193
220
|
*/
|
|
194
|
-
withFieldModifiedEnum(property:
|
|
221
|
+
withFieldModifiedEnum(property: keyof EditorModel, enumType?: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue?: boolean): this;
|
|
222
|
+
withFieldModifiedEnumUnsafe(property: string, enumType?: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue?: boolean): this;
|
|
195
223
|
/**
|
|
196
224
|
* Modifies selected field with lookup field.
|
|
197
225
|
* @param property Model's property name.
|
|
198
|
-
* @param modelType model type of field
|
|
199
226
|
* @param lookupProvider provider to be added to field
|
|
200
227
|
* @param titleProperty
|
|
201
228
|
*/
|
|
202
|
-
|
|
229
|
+
withFieldModifiedLookupWithProvider<ServiceType, FieldModel>(property: keyof EditorModel, lookupProvider: ILookupDataProvider<FieldModel, ServiceType>, titleProperty?: keyof FieldModel): this;
|
|
230
|
+
withFieldModifiedLookupWithProviderUnsafe<ServiceType, FieldModel>(property: string, lookupProvider: ILookupDataProvider<FieldModel, ServiceType>, titleProperty?: string): this;
|
|
231
|
+
/**
|
|
232
|
+
* This method takes care of displaying correct/localized data in the editor
|
|
233
|
+
* @param property property that tells us where on the model are localizations accessible
|
|
234
|
+
* @param model Model for localizations
|
|
235
|
+
* @param localeProperty property by which we find the locale
|
|
236
|
+
*/
|
|
237
|
+
localized<Property extends keyof EditorModel, LocalizationModel = ArrayItemType<EditorModel[Property]>>(property: Property, model: ModelDescriptor<LocalizationModel>, localeProperty: keyof LocalizationModel): this;
|
|
238
|
+
localizedUnsafe<LocalizationType>(property: string, model: ModelDescriptor<LocalizationType>, localeProperty: string): this;
|
|
239
|
+
nextEvent(type: MngFormEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFieldEventData<EditorModel>): void;
|
|
240
|
+
completeEvents(): void;
|
|
241
|
+
get events$(): import("rxjs").Observable<MngFormEvent<EditorModel>>;
|
|
203
242
|
/**
|
|
204
243
|
* Generates field based on attribute definition, used for auto model
|
|
244
|
+
* @param descriptor Editor descriptor instance.
|
|
205
245
|
* @param attribute Attribute definition.
|
|
206
246
|
* @param field Optional, if defined will be replaced, otherwise new will be generated.
|
|
207
247
|
* @param args Optional additional arguments mapped to filed type. Arguments depend on possible arguments on fields.
|
|
208
248
|
* @internal
|
|
209
249
|
*/
|
|
210
|
-
|
|
250
|
+
protected static upsertFieldFromAttributeDef<T>(descriptor: EditorDescriptorInst<T>, attribute: TableviewAttributeDef, field?: AFieldDescriptor<any, T>, ...args: any[]): AFieldDescriptor<any, T>;
|
|
251
|
+
}
|
|
252
|
+
export declare class EditorDescriptor extends EditorDescriptorInst<any> {
|
|
253
|
+
protected constructor();
|
|
254
|
+
static create<EditorModel>(idProperty: keyof EditorModel, titleProperty: keyof EditorModel, i18nBaseKey: string | ClassType<unknown>, tableviewEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
255
|
+
static fromClass<EditorModel>(type: ClassType<EditorModel>, idProperty?: keyof EditorModel, titleProperty?: keyof EditorModel, i18nBaseKey?: ClassType<unknown> | string, tableviewEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
256
|
+
static fromModel<EditorModel>(model: ModelDescriptor<EditorModel>, tableviewEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
211
257
|
/**
|
|
212
|
-
*
|
|
213
|
-
* @param
|
|
214
|
-
* @param
|
|
215
|
-
* @param
|
|
216
|
-
* @param
|
|
258
|
+
* Creates editor descriptor automatically based on openapi model's attributes definition which is automatically extracted. All fields will be included.
|
|
259
|
+
* @param type Model's class.
|
|
260
|
+
* @param idProperty Id property representing model (optional).
|
|
261
|
+
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
262
|
+
* @param tableEditorType Type of editor in tableview (add, edit, view or none).
|
|
217
263
|
*/
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
264
|
+
static fromClassWithAutoAttrsDef<EditorModel>(type: ClassType<EditorModel>, idProperty?: keyof EditorModel, titleProperty?: keyof EditorModel, tableEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
265
|
+
/**
|
|
266
|
+
* Creates editor descriptor automatically based on openapi model's attributes definition provided in parameters. Only fields for provided attributes will be included.
|
|
267
|
+
* @param type Model's class.
|
|
268
|
+
* @param attributes List of attribute definitions from which fields should be created.
|
|
269
|
+
* @param idProperty Id property representing model (optional).
|
|
270
|
+
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
271
|
+
* @param tableEditorType Type of editor in tableview (add, edit, view or none).
|
|
272
|
+
*/
|
|
273
|
+
static fromClassWithCustomAttrsDef<EditorModel>(type: ClassType<EditorModel>, attributes: TableviewAttributeDef[], idProperty?: keyof EditorModel, titleProperty?: keyof EditorModel, tableEditorType?: TableviewEditorTypeEnum): EditorDescriptorInst<EditorModel>;
|
|
222
274
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { FieldActionContext, FieldActionResult } from '../../components/form/models';
|
|
3
|
+
import { StyleLevelEnum } from '../../styles/models';
|
|
4
|
+
import { ActionButtonDescriptor } from '../action';
|
|
5
|
+
import { AFieldDescriptor } from './field-base.descriptor';
|
|
6
|
+
import { IEditorDescriptorInternal } from './internal/editor.model';
|
|
7
|
+
export type FieldActionRunFnType<EditorModel> = (ctx: FieldActionContext<EditorModel>) => void | FieldActionResult | Observable<FieldActionResult>;
|
|
8
|
+
export declare class FieldActionDescriptor<EditorModel> extends AFieldDescriptor<void, EditorModel> {
|
|
9
|
+
protected readonly _fieldActionName: string;
|
|
10
|
+
protected readonly _fieldActionNameLong: string;
|
|
11
|
+
protected _button: ActionButtonDescriptor;
|
|
12
|
+
protected _runFunction?: FieldActionRunFnType<EditorModel>;
|
|
13
|
+
private _wrappers;
|
|
14
|
+
constructor(editor: IEditorDescriptorInternal<EditorModel>, property: string);
|
|
15
|
+
get button(): ActionButtonDescriptor;
|
|
16
|
+
get runFunction(): FieldActionRunFnType<EditorModel> | undefined;
|
|
17
|
+
get wrappers(): string[];
|
|
18
|
+
withButtonDescriptor(button: ActionButtonDescriptor): this;
|
|
19
|
+
withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
|
|
20
|
+
withRunFunction(fn: FieldActionRunFnType<EditorModel>): this;
|
|
21
|
+
withWrappers(wrappers: string[]): this;
|
|
22
|
+
copy(): FieldActionDescriptor<EditorModel>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
|
+
import { Observable, Subject } from 'rxjs';
|
|
4
|
+
import { MngFormlyFieldConfig, MngFormlyHookFn } from '../../components/form/formly/models';
|
|
5
|
+
import { MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum } from '../../components/form/models';
|
|
6
|
+
import { GetterFn, MngFieldAsyncValidator, MngFieldValidationMessage, MngFieldValidator } from '../../types';
|
|
7
|
+
import { FieldConfig } from '../interfaces';
|
|
8
|
+
import { ITableviewDescriptorInternal } from '../tableview/internal/tableview.model';
|
|
9
|
+
import { FieldSizeEnum } from '../types';
|
|
10
|
+
import { FieldValidationDescriptor } from './field-validation.descriptor';
|
|
11
|
+
import { IEditorDescriptorInternal } from './internal/editor.model';
|
|
12
|
+
export declare abstract class AGenericFieldDescriptor<EditorModel> {
|
|
13
|
+
protected readonly _editor: IEditorDescriptorInternal<EditorModel>;
|
|
14
|
+
protected _config: FieldConfig;
|
|
15
|
+
protected constructor(editor: IEditorDescriptorInternal<EditorModel>);
|
|
16
|
+
get editor(): IEditorDescriptorInternal<EditorModel>;
|
|
17
|
+
get config(): FieldConfig;
|
|
18
|
+
withConfig(config: FieldConfig): this;
|
|
19
|
+
/**
|
|
20
|
+
* Override toJSON implementation to prevent overflow with circular dependency.
|
|
21
|
+
* @ignore
|
|
22
|
+
*/
|
|
23
|
+
protected toJSON(): string;
|
|
24
|
+
}
|
|
25
|
+
export declare abstract class AFieldDescriptor<FieldModel, EditorModel, FieldValue = FieldModel> extends AGenericFieldDescriptor<EditorModel> {
|
|
26
|
+
/** @ignore */ protected readonly _property: string;
|
|
27
|
+
/** @ignore */ protected _label?: string | null;
|
|
28
|
+
/** @ignore */ protected _placeholder?: string;
|
|
29
|
+
/** @ignore */ protected _helpText?: string;
|
|
30
|
+
/** @ignore */ protected _required: boolean;
|
|
31
|
+
/** @ignore */ protected _requiredHideLabelMarker: boolean;
|
|
32
|
+
/** @ignore */ protected _disabled: boolean;
|
|
33
|
+
/** @ignore */ protected _defaultValue?: FieldValue;
|
|
34
|
+
/** @ignore */ protected _getter?: GetterFn<FieldValue, EditorModel>;
|
|
35
|
+
/** @ignore */ protected _setter?: (item: EditorModel, value: FieldValue) => void;
|
|
36
|
+
/** @ignore */ protected _validations: Array<FieldValidationDescriptor>;
|
|
37
|
+
/** @ignore */ protected _asyncValidations: Array<FieldValidationDescriptor>;
|
|
38
|
+
/** @ignore */ protected _requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
|
|
39
|
+
/** @ignore */ protected _disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
|
|
40
|
+
/** @ignore */ protected _hiddenExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;
|
|
41
|
+
/** @ignore */ protected _updateOn: 'change' | 'blur' | 'submit';
|
|
42
|
+
/** @ignore */ protected _onInit?: MngFormlyHookFn;
|
|
43
|
+
/** @ignore */ protected _onChanges?: MngFormlyHookFn;
|
|
44
|
+
/** @ignore */ protected _afterContentInit?: MngFormlyHookFn;
|
|
45
|
+
/** @ignore */ protected _afterViewInit?: MngFormlyHookFn;
|
|
46
|
+
/** @ignore */ protected _onDestroy?: MngFormlyHookFn;
|
|
47
|
+
/** @ignore */ protected _onValueChange?: (field: MngFormlyFieldConfig, value: any) => void;
|
|
48
|
+
/** @ignore */ protected _className: string;
|
|
49
|
+
/** @ignore */ protected _fieldClassName?: string;
|
|
50
|
+
/** @ignore */ protected _labelClassName: string;
|
|
51
|
+
/** @ignore */ protected _inputClassName: string;
|
|
52
|
+
/** @ignore */ protected _size: FieldSizeEnum;
|
|
53
|
+
/** @ignore */ protected _isLocalized: boolean;
|
|
54
|
+
/** @ignore */ protected _localizationTableview?: ITableviewDescriptorInternal<any>;
|
|
55
|
+
/** @ignore */ protected readonly _eventsSubject: Subject<MngFormFieldEvent<FieldModel, EditorModel>>;
|
|
56
|
+
protected constructor(editor: IEditorDescriptorInternal<EditorModel>, property: string);
|
|
57
|
+
get property(): string;
|
|
58
|
+
get label(): string | null | undefined;
|
|
59
|
+
get placeholder(): string | undefined;
|
|
60
|
+
get helpText(): string | undefined;
|
|
61
|
+
get required(): boolean;
|
|
62
|
+
get requiredHideLabelMarker(): boolean;
|
|
63
|
+
get disabled(): boolean;
|
|
64
|
+
get defaultValue(): FieldValue | undefined;
|
|
65
|
+
get getter(): GetterFn<FieldValue, EditorModel> | undefined;
|
|
66
|
+
get setter(): ((item: EditorModel, value: FieldValue) => void) | undefined;
|
|
67
|
+
get validations(): FieldValidationDescriptor[];
|
|
68
|
+
get asyncValidations(): FieldValidationDescriptor[];
|
|
69
|
+
get requiredExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
70
|
+
[additionalProperties: string]: any;
|
|
71
|
+
}> | undefined) => boolean) | undefined;
|
|
72
|
+
get disabledExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
73
|
+
[additionalProperties: string]: any;
|
|
74
|
+
}> | undefined) => boolean) | undefined;
|
|
75
|
+
get hiddenExpression(): string | Observable<boolean> | ((field?: FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
|
|
76
|
+
[additionalProperties: string]: any;
|
|
77
|
+
}> | undefined) => boolean) | undefined;
|
|
78
|
+
get updateOn(): "submit" | "change" | "blur";
|
|
79
|
+
get onInit(): MngFormlyHookFn | undefined;
|
|
80
|
+
get onChanges(): MngFormlyHookFn | undefined;
|
|
81
|
+
get afterContentInit(): MngFormlyHookFn | undefined;
|
|
82
|
+
get afterViewInit(): MngFormlyHookFn | undefined;
|
|
83
|
+
get onDestroy(): MngFormlyHookFn | undefined;
|
|
84
|
+
get onValueChange(): ((field: MngFormlyFieldConfig<import("../../components/form/formly/models").MngFormlyFieldProps>, value: any) => void) | undefined;
|
|
85
|
+
get className(): string;
|
|
86
|
+
get fieldClassName(): string | undefined;
|
|
87
|
+
get labelClassName(): string;
|
|
88
|
+
get inputClassName(): string;
|
|
89
|
+
get size(): FieldSizeEnum;
|
|
90
|
+
get localizationTableview(): ITableviewDescriptorInternal<any> | undefined;
|
|
91
|
+
get isSizeSmall(): boolean;
|
|
92
|
+
get isSizeLarge(): boolean;
|
|
93
|
+
get isLocalized(): boolean;
|
|
94
|
+
abstract copy(): AFieldDescriptor<FieldModel, EditorModel, FieldValue>;
|
|
95
|
+
withLabel(label: string | null): this;
|
|
96
|
+
withPlaceholder(placeholder: string): this;
|
|
97
|
+
withHelpText(helpText: string): this;
|
|
98
|
+
withRequired(required?: boolean, requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, hideLabelMarker?: boolean): this;
|
|
99
|
+
withDisabled(disabled?: boolean, disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
|
|
100
|
+
withHidden(hiddenExpression: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this;
|
|
101
|
+
withUpdateOn(updateOn: 'change' | 'blur' | 'submit'): this;
|
|
102
|
+
withOnInit(onInit?: MngFormlyHookFn): this;
|
|
103
|
+
withOnChanges(onChanges?: MngFormlyHookFn): this;
|
|
104
|
+
withAfterContentInit(afterContentInit?: MngFormlyHookFn): this;
|
|
105
|
+
withAfterViewInit(afterViewInit?: MngFormlyHookFn): this;
|
|
106
|
+
withOnDestroy(onDestroy?: MngFormlyHookFn): this;
|
|
107
|
+
withOnValueChange(onValueChange?: (field: MngFormlyFieldConfig, value: any) => void): this;
|
|
108
|
+
withDefaultValue(defaultValue: FieldValue): this;
|
|
109
|
+
withGetter(fn?: GetterFn<FieldValue, EditorModel>): this;
|
|
110
|
+
withSetter(fn?: (item: EditorModel, value: FieldValue) => void): this;
|
|
111
|
+
withValidation(name: string, validator?: MngFieldValidator, message?: MngFieldValidationMessage): this;
|
|
112
|
+
removeValidation(name: string): this;
|
|
113
|
+
withAsyncValidation(name: string, asyncValidator?: MngFieldAsyncValidator, message?: MngFieldValidationMessage): this;
|
|
114
|
+
removeAsyncValidation(name: string): this;
|
|
115
|
+
withClassName(className: string, labelClassName?: string, inputClassName?: string, fieldClassName?: string): this;
|
|
116
|
+
withSize(size?: FieldSizeEnum): this;
|
|
117
|
+
/**
|
|
118
|
+
* This method adds an icon with text Show all translations above the field and after clicking on it, it displays a new dialog with tableview.
|
|
119
|
+
* This new table view shows all available translations for specific property and allows editing it.
|
|
120
|
+
* @param tableview with lookup provider for locales
|
|
121
|
+
*/
|
|
122
|
+
localized<LocalizationModel = any>(tableview?: ITableviewDescriptorInternal<LocalizationModel>): this;
|
|
123
|
+
nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<FieldModel, EditorModel>): void;
|
|
124
|
+
get events$(): Observable<MngFormFieldEvent<FieldModel, EditorModel>>;
|
|
125
|
+
protected copyFieldsTo(obj: AFieldDescriptor<FieldModel, EditorModel, FieldValue>): void;
|
|
126
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { MngFieldValidationMessage, MngFieldValidator } from '../../types';
|
|
2
|
+
import { FieldGroupTypeEnum } from '../types';
|
|
3
|
+
import { AFieldDescriptor, AGenericFieldDescriptor } from './field-base.descriptor';
|
|
4
|
+
import { FieldValidationDescriptor } from './field-validation.descriptor';
|
|
5
|
+
import { IEditorDescriptorInternal } from './internal/editor.model';
|
|
6
|
+
export declare abstract class AFieldGroupDescriptor<EditorModel> extends AGenericFieldDescriptor<EditorModel> {
|
|
7
|
+
protected readonly _name: string;
|
|
8
|
+
protected readonly _default: boolean;
|
|
9
|
+
protected _title?: string;
|
|
10
|
+
protected _fields: AGenericFieldDescriptor<EditorModel>[];
|
|
11
|
+
protected _validations: Array<FieldValidationDescriptor>;
|
|
12
|
+
protected constructor(editor: IEditorDescriptorInternal<EditorModel>, name: string);
|
|
13
|
+
removeField(property: string, filterFunction: (fields: AGenericFieldDescriptor<EditorModel>[]) => AGenericFieldDescriptor<EditorModel>[]): AGenericFieldDescriptor<EditorModel>[];
|
|
14
|
+
get title(): string | undefined;
|
|
15
|
+
abstract get fields(): AGenericFieldDescriptor<EditorModel>[];
|
|
16
|
+
get validations(): FieldValidationDescriptor[];
|
|
17
|
+
get baseName(): string;
|
|
18
|
+
get name(): string;
|
|
19
|
+
get default(): boolean;
|
|
20
|
+
abstract groupName(): string;
|
|
21
|
+
abstract addField(field: AGenericFieldDescriptor<EditorModel>): this;
|
|
22
|
+
abstract copy(): AFieldGroupDescriptor<EditorModel>;
|
|
23
|
+
withTitle(title: string): this;
|
|
24
|
+
withValidation(name: string, validator?: MngFieldValidator, message?: MngFieldValidationMessage): this;
|
|
25
|
+
}
|
|
26
|
+
export declare class FieldTabGroupDescriptor<EditorModel> extends AFieldGroupDescriptor<EditorModel> {
|
|
27
|
+
constructor(editor: IEditorDescriptorInternal<EditorModel>, name: string);
|
|
28
|
+
get fields(): Array<FieldGroupDescriptor<EditorModel>>;
|
|
29
|
+
groupName(): string;
|
|
30
|
+
addField(field: FieldGroupDescriptor<EditorModel>): this;
|
|
31
|
+
copy(): FieldTabGroupDescriptor<EditorModel>;
|
|
32
|
+
}
|
|
33
|
+
export declare class FieldGroupDescriptor<EditorModel> extends AFieldGroupDescriptor<EditorModel> {
|
|
34
|
+
private _type;
|
|
35
|
+
constructor(editor: IEditorDescriptorInternal<EditorModel>, name: string);
|
|
36
|
+
get type(): FieldGroupTypeEnum;
|
|
37
|
+
get fields(): Array<AFieldDescriptor<any, EditorModel>>;
|
|
38
|
+
groupName(): string;
|
|
39
|
+
addField(field: AFieldDescriptor<any, EditorModel>): this;
|
|
40
|
+
asLogical(): this;
|
|
41
|
+
copy(): FieldGroupDescriptor<EditorModel>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ILookupDataProvider, ITableDataProvider, LookupDataProviderLookupFnType } from '../../data-providers';
|
|
2
|
+
import { EnumValue } from '../../models';
|
|
3
|
+
import { ClassType, EnumConstantType, EnumType, ServiceClassType } from '../../types';
|
|
4
|
+
import { FieldLookupConfig, ILookupDescriptor } from '../interfaces';
|
|
5
|
+
import { TableDescriptorInst } from '../table';
|
|
6
|
+
import { FieldLookupTypeEnum } from '../types';
|
|
7
|
+
import { AFieldDescriptor } from './field-base.descriptor';
|
|
8
|
+
import { IEditorDescriptorInternal } from './internal/editor.model';
|
|
9
|
+
export type FieldLookupDescriptorConstructorOptsType<EditorModel, Service> = FieldLookupDescriptorCreateOptsProviderType<EditorModel, Service> & {
|
|
10
|
+
type?: ClassType<EditorModel>;
|
|
11
|
+
optionsValueProperty?: string;
|
|
12
|
+
};
|
|
13
|
+
export type FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service> = {
|
|
14
|
+
serviceType?: ServiceClassType<Service>;
|
|
15
|
+
dataProvider?: ILookupDataProvider<FieldModel, Service>;
|
|
16
|
+
};
|
|
17
|
+
export type FieldLookupProviderType<FieldModel, Service> = ServiceClassType<Service> | ILookupDataProvider<FieldModel, Service>;
|
|
18
|
+
export type FieldLookupAutocompleteOptsType = {
|
|
19
|
+
openOnFocus?: boolean;
|
|
20
|
+
inlineSearch?: boolean;
|
|
21
|
+
selectFirst?: boolean;
|
|
22
|
+
autoClear?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const fieldLookupGetProviderCfgObj: <FieldModel, Service>(serviceOrDataProvider?: FieldLookupProviderType<FieldModel, Service> | undefined) => FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service>;
|
|
25
|
+
export declare class FieldLookupDescriptor<FieldModel, EditorModel, Service = any, FieldValue = FieldModel, Property = string> extends AFieldDescriptor<FieldModel, EditorModel, FieldValue> implements ILookupDescriptor<FieldModel, Service> {
|
|
26
|
+
protected readonly _dataProvider: ILookupDataProvider<FieldModel, Service>;
|
|
27
|
+
protected readonly _optionsValueProperty?: string;
|
|
28
|
+
protected _lookupType: FieldLookupTypeEnum;
|
|
29
|
+
protected _optionsLabelProperty?: string;
|
|
30
|
+
protected _optionsLabelTranslate: boolean;
|
|
31
|
+
protected _optionsDisabledProperty?: string;
|
|
32
|
+
protected _optionsTrackProperty?: string;
|
|
33
|
+
protected _dropdownClassName: string;
|
|
34
|
+
protected _autocompleteOpenOnFocus?: boolean;
|
|
35
|
+
protected _autocompleteInlineSearch?: boolean;
|
|
36
|
+
protected _autocompleteAutoClear?: boolean;
|
|
37
|
+
protected _autocompleteSelectFirst?: boolean;
|
|
38
|
+
protected _dialogTableDescriptor?: TableDescriptorInst<FieldModel>;
|
|
39
|
+
protected _dialogTableDataProvider?: ITableDataProvider<FieldModel, any>;
|
|
40
|
+
protected _customComponentName?: string;
|
|
41
|
+
constructor(editor: IEditorDescriptorInternal<EditorModel>, property: Property, cfg?: FieldLookupDescriptorConstructorOptsType<FieldModel, Service>);
|
|
42
|
+
get lookupType(): FieldLookupTypeEnum;
|
|
43
|
+
get optionsLabelProperty(): string | undefined;
|
|
44
|
+
get optionsLabelTranslate(): boolean;
|
|
45
|
+
get optionsValueProperty(): string | undefined;
|
|
46
|
+
get optionsDisabledProperty(): string | undefined;
|
|
47
|
+
get optionsTrackProperty(): string | undefined;
|
|
48
|
+
get dataProvider(): ILookupDataProvider<FieldModel, Service>;
|
|
49
|
+
get autocompleteOpenOnFocus(): boolean | undefined;
|
|
50
|
+
get autocompleteInlineSearch(): boolean | undefined;
|
|
51
|
+
get autocompleteAutoClear(): boolean | undefined;
|
|
52
|
+
get autocompleteSelectFirst(): boolean | undefined;
|
|
53
|
+
get dropdownClassName(): string;
|
|
54
|
+
get dialogTableDescriptor(): TableDescriptorInst<FieldModel> | undefined;
|
|
55
|
+
get dialogTableDataProvider(): ITableDataProvider<FieldModel, any> | undefined;
|
|
56
|
+
get customComponentName(): string | undefined;
|
|
57
|
+
withOptionsLabelProperty(property: keyof FieldModel, translate?: boolean): this;
|
|
58
|
+
withOptionsLabelPropertyUnsafe(property: string, translate?: boolean): this;
|
|
59
|
+
withOptionsDisabledProperty(property: keyof FieldModel): this;
|
|
60
|
+
withOptionsDisabledPropertyUnsafe(property: string): this;
|
|
61
|
+
withOptionsTrackProperty(property: keyof FieldModel): this;
|
|
62
|
+
withOptionsTrackPropertyUnsafe(property: string): this;
|
|
63
|
+
withLookup(lookup?: LookupDataProviderLookupFnType<FieldModel, Service>): this;
|
|
64
|
+
withConfig(config: FieldLookupConfig): this;
|
|
65
|
+
asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this;
|
|
66
|
+
asDialog(lookupTableDescriptor: TableDescriptorInst<FieldModel>, tableDataProvider?: ITableDataProvider<FieldModel, any>): this;
|
|
67
|
+
asCustomComponent(customComponentName: string): this;
|
|
68
|
+
copy(): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue>;
|
|
69
|
+
}
|
|
70
|
+
export declare class FieldLookupEnumDescriptor<EditorModel> extends FieldLookupDescriptor<EnumValue, EditorModel, undefined, EnumConstantType> {
|
|
71
|
+
private readonly _enumType;
|
|
72
|
+
private readonly _optionEnumValues;
|
|
73
|
+
private readonly _nameAsValue;
|
|
74
|
+
constructor(editor: IEditorDescriptorInternal<EditorModel>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue?: boolean, optionsTitlePath?: string | null);
|
|
75
|
+
get enumType(): EnumType<EnumConstantType>;
|
|
76
|
+
withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this;
|
|
77
|
+
withDefaultValueEnum(defaultValue: EnumConstantType): this;
|
|
78
|
+
asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this;
|
|
79
|
+
copy(): FieldLookupEnumDescriptor<EditorModel>;
|
|
80
|
+
}
|