@mediusinc/mng-commons 5.5.0-rc.4 → 6.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/action/action-parameters.model.d.ts +4 -4
- package/core/data-providers/base.data-provider.d.ts +4 -7
- package/core/data-providers/lookup.data-provider.d.ts +2 -2
- package/core/descriptors/model.descriptor.d.ts +1 -7
- package/core/descriptors/tableview.descriptor.d.ts +5 -5
- package/core/helpers/route.d.ts +0 -1
- package/core/helpers/type-helpers.d.ts +8 -0
- package/core/index.d.ts +0 -3
- package/core/models/menu.model.d.ts +0 -4
- package/core/services/commons.service.d.ts +0 -32
- package/core/services/tokens/module-config.token.d.ts +0 -28
- package/esm2022/core/action/action-parameters.model.mjs +1 -1
- package/esm2022/core/data-providers/base.data-provider.mjs +2 -4
- package/esm2022/core/data-providers/lookup.data-provider.mjs +1 -1
- package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/tableview.descriptor.mjs +1 -1
- package/esm2022/core/helpers/type-helpers.mjs +1 -1
- package/esm2022/core/index.mjs +1 -4
- package/esm2022/core/models/menu.model.mjs +1 -1
- package/esm2022/core/services/commons.service.mjs +1 -34
- package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +5 -86
- package/esm2022/filter/descriptors/filter.descriptor.mjs +7 -29
- package/esm2022/form/api/data-providers/lookup-data-provider.factory.mjs +14 -41
- package/esm2022/form/api/data-providers/lookup.data-provider.mjs +3 -3
- package/esm2022/model/class/data-providers/base-from-class-data-provider.factory.mjs +5 -0
- package/esm2022/model/class/descriptors/model-class.descriptor.mjs +28 -0
- package/esm2022/model/class/descriptors/type-class.descriptor.mjs +6 -0
- package/esm2022/model/class/helpers/model.mjs +53 -0
- package/esm2022/model/class/index.mjs +8 -0
- package/esm2022/model/class/mediusinc-mng-commons-model-class.mjs +5 -0
- package/esm2022/model/data-providers/base-from-type-data-provider.factory.mjs +11 -6
- package/esm2022/model/descriptors/model.descriptor.mjs +11 -54
- package/esm2022/model/descriptors/type.descriptor.mjs +2 -10
- package/esm2022/model/index.mjs +1 -2
- package/esm2022/table/api/class/class-table-attribute-converter.mjs +80 -0
- package/esm2022/table/api/class/class-table-attribute.model.mjs +2 -0
- package/esm2022/table/api/class/class-table-data-provider.factory.mjs +5 -0
- package/esm2022/table/api/class/class-table-descriptor-helpers.mjs +99 -0
- package/esm2022/table/api/class/class-table-descriptor.factory.mjs +21 -0
- package/esm2022/table/api/class/index.mjs +6 -0
- package/esm2022/table/api/class/mediusinc-mng-commons-table-api-class.mjs +5 -0
- package/esm2022/table/api/data-providers/table-data-provider.factory.mjs +14 -41
- package/esm2022/table/api/data-providers/table.data-provider.mjs +3 -9
- package/esm2022/table/api/descriptors/column.descriptor.mjs +8 -3
- package/esm2022/table/api/descriptors/table-descriptor.factory.mjs +10 -77
- package/esm2022/table/api/descriptors/table.descriptor.mjs +3 -3
- package/esm2022/table/api/helpers/column-converter.mjs +25 -0
- package/esm2022/table/api/helpers/table-data-provider-descriptor-convert.mjs +4 -4
- package/esm2022/table/api/index.mjs +2 -4
- package/esm2022/table/api/models/table-columns.model.mjs +1 -1
- package/esm2022/table/components/column-value/column-value.component.mjs +4 -3
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +3 -3
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +5 -5
- package/esm2022/table/components/table/table.component.mjs +6 -8
- package/esm2022/tableview/action/components/action/action.component.mjs +1 -1
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +10 -6
- package/esm2022/tableview/action/helpers/action-execution.mjs +1 -1
- package/esm2022/tableview/action/models/execution/action-context.model.mjs +1 -1
- package/esm2022/tableview/action/models/execution/action-instance.model.mjs +1 -1
- package/esm2022/tableview/action/services/action-executor.service.mjs +11 -11
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +18 -3
- package/esm2022/tableview/api/action/descriptors/action-confirmation.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/descriptors/action-descriptor.factory.mjs +13 -104
- package/esm2022/tableview/api/action/descriptors/action-editor-descriptor.factory.mjs +15 -62
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +3 -63
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +17 -30
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +6 -29
- package/esm2022/tableview/api/action/descriptors/editor-action-descriptor.factory.mjs +21 -0
- package/esm2022/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.mjs +21 -0
- package/esm2022/tableview/api/action/descriptors/table-action-descriptor.factory.mjs +37 -0
- package/esm2022/tableview/api/action/descriptors/table-action-editor-descriptor.factory.mjs +40 -0
- package/esm2022/tableview/api/action/helpers/data-provider-executors.mjs +25 -5
- package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +1 -1
- package/esm2022/tableview/api/action/models/action-error.model.mjs +1 -1
- package/esm2022/tableview/api/action/models/execution/action-context-validation.model.mjs +1 -1
- package/esm2022/tableview/api/action/models/execution/action-context.model.mjs +1 -1
- package/esm2022/tableview/api/action/models/execution/action-instance.model.mjs +1 -1
- package/esm2022/tableview/api/action/models/tableview-action-default-categories.model.mjs +6 -6
- package/esm2022/tableview/api/action/services/data-provider-executor.service.mjs +3 -3
- package/esm2022/tableview/api/class/editor/class-editor-attribute-converter.mjs +85 -0
- package/esm2022/tableview/api/class/editor/class-editor-attribute.model.mjs +2 -0
- package/esm2022/tableview/api/class/editor/class-editor-data-provider.factory.mjs +5 -0
- package/esm2022/tableview/api/class/editor/class-editor-descriptor-helpers.mjs +95 -0
- package/esm2022/tableview/api/class/editor/class-editor-descriptor.factory.mjs +21 -0
- package/esm2022/tableview/api/class/index.mjs +13 -0
- package/esm2022/tableview/api/class/mediusinc-mng-commons-tableview-api-class.mjs +5 -0
- package/esm2022/tableview/api/class/tableview/class-tableview-attribute-converter.mjs +35 -0
- package/esm2022/tableview/api/class/tableview/class-tableview-attribute.model.mjs +2 -0
- package/esm2022/tableview/api/class/tableview/class-tableview-data-provider.factory.mjs +5 -0
- package/esm2022/tableview/api/class/tableview/class-tableview-descriptor-helpers.mjs +111 -0
- package/esm2022/tableview/api/class/tableview/class-tableview-descriptor.factory.mjs +26 -0
- package/esm2022/tableview/api/editor/data-providers/editor-data-provider.factory.mjs +14 -32
- package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +40 -7
- package/esm2022/tableview/api/editor/descriptors/editor-descriptor.factory.mjs +7 -73
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +49 -134
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +11 -2
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +3 -5
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +2 -18
- package/esm2022/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.mjs +51 -0
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
- package/esm2022/tableview/api/index.mjs +8 -8
- package/esm2022/tableview/api/tableview/data-providers/tableview-data-provider.factory.mjs +13 -51
- package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +19 -11
- package/esm2022/tableview/api/tableview/descriptors/tableview-descriptor.factory.mjs +19 -96
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +29 -182
- package/esm2022/tableview/api/tableview/helpers/tableview-create.mjs +8 -6
- package/esm2022/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.mjs +4 -4
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +117 -99
- package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +164 -7
- package/esm2022/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.mjs +2 -0
- package/esm2022/tableview/api/tableview/models/tableview-descriptor-helper.type.mjs +2 -0
- package/esm2022/tableview/api/tableview/models/tableview-input.model.mjs +1 -1
- package/esm2022/tableview/api/tableview/models/tableview-route.model.mjs +1 -1
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +6 -6
- package/esm2022/tableview/editor/helpers/editor-field.mjs +3 -3
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +4 -4
- package/esm2022/tableview/editor/helpers/field-create.mjs +21 -0
- package/esm2022/tableview/index.mjs +3 -2
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +1 -1
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +3 -1
- package/fesm2022/mediusinc-mng-commons-core.mjs +687 -781
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +10 -113
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +15 -42
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model-class.mjs +97 -0
- package/fesm2022/mediusinc-mng-commons-model-class.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-model.mjs +23 -137
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api-class.mjs +204 -0
- package/fesm2022/mediusinc-mng-commons-table-api-class.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +55 -319
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +14 -15
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs +367 -0
- package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +715 -1298
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +67 -27
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter-lookup.descriptor.d.ts +1 -26
- package/filter/descriptors/filter.descriptor.d.ts +5 -12
- package/form/api/data-providers/lookup-data-provider.factory.d.ts +17 -20
- package/form/api/data-providers/lookup.data-provider.d.ts +3 -3
- package/model/class/README.md +8 -0
- package/model/class/data-providers/base-from-class-data-provider.factory.d.ts +3 -0
- package/model/class/descriptors/model-class.descriptor.d.ts +12 -0
- package/model/class/descriptors/type-class.descriptor.d.ts +3 -0
- package/model/{helpers → class/helpers}/model.d.ts +1 -2
- package/model/class/index.d.ts +4 -0
- package/model/data-providers/base-from-type-data-provider.factory.d.ts +13 -6
- package/model/descriptors/model.descriptor.d.ts +12 -27
- package/model/descriptors/type.descriptor.d.ts +0 -5
- package/model/index.d.ts +0 -1
- package/package.json +25 -7
- package/table/api/class/README.md +10 -0
- package/table/api/{helpers/class-attribute-converter.d.ts → class/class-table-attribute-converter.d.ts} +2 -9
- package/table/api/{models → class}/class-table-attribute.model.d.ts +1 -1
- package/table/api/class/class-table-data-provider.factory.d.ts +4 -0
- package/table/api/{helpers/table-descriptor-helpers.d.ts → class/class-table-descriptor-helpers.d.ts} +2 -4
- package/table/api/class/class-table-descriptor.factory.d.ts +11 -0
- package/table/api/class/index.d.ts +5 -0
- package/table/api/data-providers/table-data-provider.factory.d.ts +17 -20
- package/table/api/data-providers/table.data-provider.d.ts +4 -12
- package/table/api/descriptors/column.descriptor.d.ts +5 -2
- package/table/api/descriptors/table-descriptor.factory.d.ts +3 -39
- package/table/api/descriptors/table.descriptor.d.ts +3 -3
- package/table/api/helpers/column-converter.d.ts +7 -0
- package/table/api/helpers/table-data-provider-descriptor-convert.d.ts +3 -3
- package/table/api/index.d.ts +1 -3
- package/table/api/models/table-columns.model.d.ts +2 -2
- package/table/components/column-value/column-value.component.d.ts +1 -0
- package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +1 -1
- package/table/components/filter/filter-form/filter-form.component.d.ts +1 -1
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +1 -1
- package/table/components/table/table.component.d.ts +0 -9
- package/tableview/action/components/action/action.component.d.ts +2 -2
- package/tableview/action/components/editor/action-editor.component.d.ts +1 -1
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +6 -5
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +3 -3
- package/tableview/action/components/table/action-table.component.d.ts +3 -3
- package/tableview/action/helpers/action-execution.d.ts +1 -1
- package/tableview/action/models/execution/action-context.model.d.ts +3 -3
- package/tableview/action/models/execution/action-instance.model.d.ts +5 -5
- package/tableview/action/services/action-executor.service.d.ts +7 -7
- package/tableview/action/services/data-provider-executor.service.d.ts +16 -16
- package/tableview/action/services/view-container.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +1 -1
- package/tableview/api/action/descriptors/action-descriptor.factory.d.ts +20 -31
- package/tableview/api/action/descriptors/action-editor-descriptor.factory.d.ts +18 -25
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +22 -40
- package/tableview/api/action/descriptors/action-link-descriptor.factory.d.ts +21 -13
- package/tableview/api/action/descriptors/action-link.descriptor.d.ts +3 -3
- package/tableview/api/action/descriptors/action.descriptor.d.ts +31 -33
- package/tableview/api/action/descriptors/editor-action-descriptor.factory.d.ts +21 -0
- package/tableview/api/action/descriptors/editor-action-editor-descriptor.factory.d.ts +21 -0
- package/tableview/api/action/descriptors/table-action-descriptor.factory.d.ts +36 -0
- package/tableview/api/action/descriptors/table-action-editor-descriptor.factory.d.ts +40 -0
- package/tableview/api/action/helpers/data-provider-executors.d.ts +13 -8
- package/tableview/api/action/models/action-descriptor.types.d.ts +2 -2
- package/tableview/api/action/models/action-error.model.d.ts +1 -1
- package/tableview/api/action/models/execution/action-context-validation.model.d.ts +2 -2
- package/tableview/api/action/models/execution/action-context.model.d.ts +2 -2
- package/tableview/api/action/models/execution/action-instance.model.d.ts +1 -1
- package/tableview/api/action/models/tableview-action-default-categories.model.d.ts +5 -5
- package/tableview/api/action/services/data-provider-executor.service.d.ts +26 -25
- package/tableview/api/class/README.md +13 -0
- package/tableview/api/{editor/helpers/class-attribute-converter.d.ts → class/editor/class-editor-attribute-converter.d.ts} +2 -2
- package/tableview/api/{editor/models/class-tableview-attribute.model.d.ts → class/editor/class-editor-attribute.model.d.ts} +1 -1
- package/tableview/api/class/editor/class-editor-data-provider.factory.d.ts +4 -0
- package/tableview/api/{editor/helpers/editor-descriptor-helpers.d.ts → class/editor/class-editor-descriptor-helpers.d.ts} +2 -5
- package/tableview/api/class/editor/class-editor-descriptor.factory.d.ts +11 -0
- package/tableview/api/class/index.d.ts +10 -0
- package/tableview/api/{tableview/helpers/class-attribute-converter.d.ts → class/tableview/class-tableview-attribute-converter.d.ts} +1 -1
- package/tableview/api/{tableview/models → class/tableview}/class-tableview-attribute.model.d.ts +2 -2
- package/tableview/api/class/tableview/class-tableview-data-provider.factory.d.ts +4 -0
- package/tableview/api/{tableview/helpers/tableview-descriptor-helpers.d.ts → class/tableview/class-tableview-descriptor-helpers.d.ts} +1 -2
- package/tableview/api/class/tableview/class-tableview-descriptor.factory.d.ts +12 -0
- package/tableview/api/editor/data-providers/editor-data-provider.factory.d.ts +17 -16
- package/tableview/api/editor/data-providers/editor.data-provider.d.ts +64 -29
- package/tableview/api/editor/descriptors/editor-descriptor.factory.d.ts +5 -38
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +48 -112
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +8 -1
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +2 -3
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +3 -11
- package/tableview/api/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.d.ts +25 -0
- package/tableview/api/editor/models/editor-fields.model.d.ts +25 -21
- package/tableview/api/editor/models/form-editor.event.d.ts +0 -4
- package/tableview/api/index.d.ts +7 -6
- package/tableview/api/tableview/data-providers/tableview-data-provider.factory.d.ts +20 -25
- package/tableview/api/tableview/data-providers/tableview.data-provider.d.ts +22 -22
- package/tableview/api/tableview/descriptors/tableview-descriptor.factory.d.ts +20 -50
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +69 -163
- package/tableview/api/tableview/helpers/tableview-create.d.ts +18 -5
- package/tableview/api/tableview/helpers/tableview-data-provider-descriptor-convert.d.ts +2 -2
- package/tableview/api/tableview/helpers/tableview-default-actions.d.ts +73 -20
- package/tableview/api/tableview/helpers/tableview-input-builder.d.ts +87 -9
- package/tableview/api/tableview/models/tableview-descriptor-fields-manage-helper.type.d.ts +9 -0
- package/tableview/api/tableview/models/tableview-descriptor-helper.type.d.ts +2 -0
- package/tableview/api/tableview/models/tableview-input.model.d.ts +1 -1
- package/tableview/api/tableview/models/tableview-route.model.d.ts +1 -1
- package/tableview/editor/helpers/field-create.d.ts +9 -0
- package/tableview/index.d.ts +2 -1
- package/tableview/tableview/components/route/tableview-route.component.d.ts +1 -1
- package/tableview/tableview/components/tableview/tableview.component.d.ts +6 -6
- package/version-info.json +5 -5
- package/core/components/pages/error/error.page.component.d.ts +0 -11
- package/core/components/pages/not-found/not-found.page.component.d.ts +0 -11
- package/core/data-providers/base-data-provider.factory.d.ts +0 -13
- package/esm2022/core/components/pages/error/error.page.component.mjs +0 -24
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +0 -24
- package/esm2022/core/data-providers/base-data-provider.factory.mjs +0 -28
- package/esm2022/model/helpers/model.mjs +0 -71
- package/esm2022/table/api/helpers/class-attribute-converter.mjs +0 -104
- package/esm2022/table/api/helpers/table-descriptor-helpers.mjs +0 -98
- package/esm2022/table/api/models/class-table-attribute.model.mjs +0 -2
- package/esm2022/tableview/api/editor/helpers/class-attribute-converter.mjs +0 -85
- package/esm2022/tableview/api/editor/helpers/editor-descriptor-helpers.mjs +0 -95
- package/esm2022/tableview/api/editor/models/class-tableview-attribute.model.mjs +0 -2
- package/esm2022/tableview/api/tableview/helpers/class-attribute-converter.mjs +0 -34
- package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +0 -110
- package/esm2022/tableview/api/tableview/models/class-tableview-attribute.model.mjs +0 -2
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { CommonsInternalError, TypeRegistry } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { ColumnTypeEnum, ColumnDisplayTypeEnum } from '@mediusinc/mng-commons/table/api';
|
|
3
|
+
import { FieldInputTypeEnum, EditorDataProviderInst, FieldInputDescriptor, EditorDescriptorInst, TableviewDescriptorInst, TableviewEditorTypeEnum, TableviewDataProviderInst } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
+
import { ModelClassDescriptor, modelClass, findClassTitleAttribute } from '@mediusinc/mng-commons/model/class';
|
|
5
|
+
import { enumModelGeneric } from '@mediusinc/mng-commons/model';
|
|
6
|
+
import { getColumnTypeFromClassAttributeDefType, getColumnDisplayTypeFromColumnType, tableDescriptorFromClassAttrsDef, modifyTableClassAttributeColumnTypeUnsafe, tableDescriptorModifyEnumColumnUnsafe, modifyTableColumnFilterLookupUnsafe } from '@mediusinc/mng-commons/table/api/class';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* converts string type to type enum, default is text
|
|
10
|
+
* @param attributeType
|
|
11
|
+
*/
|
|
12
|
+
function getFieldInputTypeFromClassAttributeDefType(attributeType) {
|
|
13
|
+
switch (attributeType) {
|
|
14
|
+
case 'hidden':
|
|
15
|
+
return FieldInputTypeEnum.Hidden;
|
|
16
|
+
case 'label':
|
|
17
|
+
return FieldInputTypeEnum.Label;
|
|
18
|
+
case 'textarea':
|
|
19
|
+
return FieldInputTypeEnum.Textarea;
|
|
20
|
+
case 'number':
|
|
21
|
+
return FieldInputTypeEnum.Number;
|
|
22
|
+
case 'currency':
|
|
23
|
+
return FieldInputTypeEnum.Currency;
|
|
24
|
+
case 'switch':
|
|
25
|
+
case 'boolean':
|
|
26
|
+
return FieldInputTypeEnum.Switch;
|
|
27
|
+
case 'radio':
|
|
28
|
+
return FieldInputTypeEnum.Radio;
|
|
29
|
+
case 'datepicker':
|
|
30
|
+
return FieldInputTypeEnum.Datepicker;
|
|
31
|
+
case 'mask':
|
|
32
|
+
return FieldInputTypeEnum.Mask;
|
|
33
|
+
case 'file':
|
|
34
|
+
return FieldInputTypeEnum.File;
|
|
35
|
+
case 'custom':
|
|
36
|
+
return FieldInputTypeEnum.Custom;
|
|
37
|
+
case 'text':
|
|
38
|
+
default:
|
|
39
|
+
return FieldInputTypeEnum.Text;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* convert column type to equivalent field input type
|
|
44
|
+
* @param type column type
|
|
45
|
+
* @param displayType column display type
|
|
46
|
+
*/
|
|
47
|
+
function getFieldInputTypeFromColumnType(type, displayType) {
|
|
48
|
+
switch (type) {
|
|
49
|
+
case ColumnTypeEnum.Number:
|
|
50
|
+
return displayType === ColumnDisplayTypeEnum.Currency ? FieldInputTypeEnum.Currency : FieldInputTypeEnum.Number;
|
|
51
|
+
case ColumnTypeEnum.Boolean:
|
|
52
|
+
return FieldInputTypeEnum.Switch;
|
|
53
|
+
case ColumnTypeEnum.Date:
|
|
54
|
+
return FieldInputTypeEnum.Datepicker;
|
|
55
|
+
case ColumnTypeEnum.Custom:
|
|
56
|
+
return FieldInputTypeEnum.Custom;
|
|
57
|
+
case ColumnTypeEnum.String:
|
|
58
|
+
case ColumnTypeEnum.Enum:
|
|
59
|
+
default:
|
|
60
|
+
return FieldInputTypeEnum.Text;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function expandClassAttributeDefWithEditorDef(attributes) {
|
|
64
|
+
if (!attributes) {
|
|
65
|
+
throw new CommonsInternalError('Class attribute definition is null, problem with TypeRegistry::findAttributesDefinitionByClassType?', { name: 'TableviewUtilsError' });
|
|
66
|
+
}
|
|
67
|
+
const typeRegistry = TypeRegistry.get();
|
|
68
|
+
const editorClassAttributeDef = [];
|
|
69
|
+
for (const attribute of attributes) {
|
|
70
|
+
editorClassAttributeDef.push({
|
|
71
|
+
name: attribute.name,
|
|
72
|
+
baseName: attribute.baseName,
|
|
73
|
+
type: attribute.type,
|
|
74
|
+
subtype: attribute.subtype,
|
|
75
|
+
fieldType: getFieldInputTypeFromClassAttributeDefType(attribute.type),
|
|
76
|
+
classType: typeRegistry.findType(attribute.type),
|
|
77
|
+
enumType: typeRegistry.findEnum(attribute.type)
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return editorClassAttributeDef;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* returns attributes from class type and extends to typed def with column and field enum type
|
|
84
|
+
* @param type class type
|
|
85
|
+
*/
|
|
86
|
+
function getEditorClassAttributeDef(type) {
|
|
87
|
+
return expandClassAttributeDefWithEditorDef(TypeRegistry.get().findAttributesDefinitionByClassType(type));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function editorDataProviderFromClass(type, serviceType) {
|
|
91
|
+
return new EditorDataProviderInst(serviceType);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Generates field based on attribute definition, used for auto model
|
|
96
|
+
* @param descriptor Editor descriptor instance.
|
|
97
|
+
* @param attribute Attribute definition.
|
|
98
|
+
* @param field Optional, if defined will be replaced, otherwise new will be generated.
|
|
99
|
+
* @param args Optional additional arguments mapped to filed type. Arguments depend on possible arguments on fields.
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
function upsertEditorFieldFromAttributeDef(descriptor, attribute, field, ...args) {
|
|
103
|
+
if (field == null) {
|
|
104
|
+
field = descriptor.addFieldUnsafe(attribute.name);
|
|
105
|
+
}
|
|
106
|
+
if (field instanceof FieldInputDescriptor) {
|
|
107
|
+
if (attribute.enumType) {
|
|
108
|
+
return field.asRadioFromEnum(enumModelGeneric(attribute.enumType));
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const tableColumnType = getColumnTypeFromClassAttributeDefType(attribute.type);
|
|
112
|
+
const tableColumnDisplayType = getColumnDisplayTypeFromColumnType(tableColumnType, attribute.type);
|
|
113
|
+
return field.asType(attribute.fieldType ?? getFieldInputTypeFromColumnType(tableColumnType, tableColumnDisplayType), ...args);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return field;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Modifies selected field by field property. For enums use {withFieldModifiedEnum} instead.
|
|
120
|
+
* @param descriptor Editor descriptor.
|
|
121
|
+
* @param property Model's property name.
|
|
122
|
+
* @param fieldType new field type for selected field
|
|
123
|
+
* @param args additional parameters for field
|
|
124
|
+
*/
|
|
125
|
+
function modifyEditorClassAttributeFieldType(descriptor, property, fieldType, ...args) {
|
|
126
|
+
return modifyEditorClassAttributeFieldTypeUnsafe(descriptor, property, fieldType, ...args);
|
|
127
|
+
}
|
|
128
|
+
function modifyEditorClassAttributeFieldTypeUnsafe(descriptor, property, fieldType, ...args) {
|
|
129
|
+
if (!(descriptor.model instanceof ModelClassDescriptor)) {
|
|
130
|
+
throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);
|
|
131
|
+
}
|
|
132
|
+
const attribute = getEditorClassAttributeDef(descriptor.model.classType).find(attribute => attribute.name === property);
|
|
133
|
+
if (attribute) {
|
|
134
|
+
attribute.fieldType = fieldType;
|
|
135
|
+
return upsertEditorFieldFromAttributeDef(descriptor, attribute, descriptor.fields.find(fi => fi.property === property), ...args);
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Modifies selected field with enum type.
|
|
141
|
+
* @param descriptor Editor descriptor.
|
|
142
|
+
* @param property Model's property name.
|
|
143
|
+
* @param enumModel Enum descriptor.
|
|
144
|
+
* @param values
|
|
145
|
+
*/
|
|
146
|
+
function modifyEditorClassAttributeFieldEnum(descriptor, property, enumModel, values) {
|
|
147
|
+
return modifyEditorClassAttributeFieldEnumUnsafe(descriptor, property, enumModel, values);
|
|
148
|
+
}
|
|
149
|
+
function modifyEditorClassAttributeFieldEnumUnsafe(descriptor, property, enumDesc, values) {
|
|
150
|
+
if (!(descriptor.model instanceof ModelClassDescriptor)) {
|
|
151
|
+
throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);
|
|
152
|
+
}
|
|
153
|
+
const attribute = getEditorClassAttributeDef(descriptor.model.classType).find(a => a.name === property);
|
|
154
|
+
if (attribute) {
|
|
155
|
+
attribute.fieldType = FieldInputTypeEnum.Radio;
|
|
156
|
+
const field = descriptor.fields.find(f => f.property === property);
|
|
157
|
+
if (field && field instanceof FieldInputDescriptor) {
|
|
158
|
+
field.asRadioFromEnum(enumDesc ?? enumModelGeneric(TypeRegistry.get().findEnum(attribute.type)), values);
|
|
159
|
+
}
|
|
160
|
+
return field ?? null;
|
|
161
|
+
}
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Modifies selected field with lookup field.
|
|
166
|
+
* @param descriptor Editor descriptor.
|
|
167
|
+
* @param property Model's property name.
|
|
168
|
+
* @param lookupProvider provider to be added to field
|
|
169
|
+
* @param titleProperty
|
|
170
|
+
*/
|
|
171
|
+
function modifyEditorFieldLookup(descriptor, property, lookupProvider, titleProperty) {
|
|
172
|
+
return modifyEditorFieldLookupUnsafe(descriptor, property, lookupProvider, titleProperty);
|
|
173
|
+
}
|
|
174
|
+
function modifyEditorFieldLookupUnsafe(descriptor, property, lookupProvider, titleProperty) {
|
|
175
|
+
descriptor.removeFieldUnsafe(property);
|
|
176
|
+
const field = descriptor.addFieldLookupUnsafe(property, { serviceProvider: lookupProvider }).asAutocomplete();
|
|
177
|
+
if (titleProperty) {
|
|
178
|
+
field.withOptionsLabelPropertyUnsafe(titleProperty);
|
|
179
|
+
}
|
|
180
|
+
return field;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function editorDescriptorFromClass(type, opts) {
|
|
184
|
+
return new EditorDescriptorInst(modelClass(type, opts), opts?.tableviewEditorType);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Generates descriptor based on type attribute definition
|
|
188
|
+
* @param type class type
|
|
189
|
+
* @param attributes
|
|
190
|
+
* @param opts
|
|
191
|
+
*/
|
|
192
|
+
function editorDescriptorFromClassAttrsDef(type, attributes, opts) {
|
|
193
|
+
const descriptor = new EditorDescriptorInst(modelClass(type, opts), opts?.tableviewEditorType);
|
|
194
|
+
(attributes ?? getEditorClassAttributeDef(type))
|
|
195
|
+
.filter(attr => !attr.type.includes('Set') && !attr.type.includes('Array'))
|
|
196
|
+
.forEach(attr => upsertEditorFieldFromAttributeDef(descriptor, attr));
|
|
197
|
+
return descriptor;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function expandClassAttributeDefWithTableviewDef(attributes) {
|
|
201
|
+
if (!attributes) {
|
|
202
|
+
throw new CommonsInternalError('Class attribute definition is null, problem with TypeRegistry::findAttributesDefinitionByClassType?', { name: 'TableviewUtilsError' });
|
|
203
|
+
}
|
|
204
|
+
const typeRegistry = TypeRegistry.get();
|
|
205
|
+
const tableClassAttributeDef = [];
|
|
206
|
+
for (const attribute of attributes) {
|
|
207
|
+
const enumType = typeRegistry.findEnum(attribute.type);
|
|
208
|
+
const columnType = enumType ? ColumnTypeEnum.Enum : getColumnTypeFromClassAttributeDefType(attribute.type);
|
|
209
|
+
tableClassAttributeDef.push({
|
|
210
|
+
name: attribute.name,
|
|
211
|
+
baseName: attribute.baseName,
|
|
212
|
+
type: attribute.type,
|
|
213
|
+
subtype: attribute.subtype,
|
|
214
|
+
columnType: enumType ? ColumnTypeEnum.Enum : getColumnTypeFromClassAttributeDefType(attribute.type),
|
|
215
|
+
columnDisplayType: getColumnDisplayTypeFromColumnType(columnType, attribute.type),
|
|
216
|
+
fieldType: getFieldInputTypeFromClassAttributeDefType(attribute.type),
|
|
217
|
+
enumType: typeRegistry.findEnum(attribute.type),
|
|
218
|
+
classType: typeRegistry.findType(attribute.type)
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return tableClassAttributeDef;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* returns attributes from class type and extends to typed def with column and field enum type
|
|
225
|
+
* @param type class type
|
|
226
|
+
*/
|
|
227
|
+
function getTableviewClassAttributeDef(type) {
|
|
228
|
+
return expandClassAttributeDefWithTableviewDef(TypeRegistry.get().findAttributesDefinitionByClassType(type));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function tableviewDescriptorFromClass(type, opts) {
|
|
232
|
+
return new TableviewDescriptorInst(modelClass(type, opts));
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* generates descriptor based on type attribute definition
|
|
236
|
+
* @param type class type
|
|
237
|
+
* @param columnAttributes
|
|
238
|
+
* @param fieldAttributes
|
|
239
|
+
* @param opts
|
|
240
|
+
*/
|
|
241
|
+
function tableviewDescriptorFromClassAttrsDef(type, columnAttributes, fieldAttributes, opts) {
|
|
242
|
+
const model = modelClass(type, opts);
|
|
243
|
+
const descriptor = new TableviewDescriptorInst(model);
|
|
244
|
+
descriptor.withTableDescriptor(tableDescriptorFromClassAttrsDef(type, columnAttributes, opts));
|
|
245
|
+
if (fieldAttributes !== null) {
|
|
246
|
+
descriptor.withEditDescriptor(editorDescriptorFromClassAttrsDef(type, fieldAttributes ?? columnAttributes, { ...opts, tableviewEditorType: TableviewEditorTypeEnum.Edit }));
|
|
247
|
+
descriptor.withDetailsDescriptor(editorDescriptorFromClassAttrsDef(type, fieldAttributes ?? columnAttributes, { ...opts, tableviewEditorType: TableviewEditorTypeEnum.Details }).withDisabled());
|
|
248
|
+
descriptor.withAddDescriptor(editorDescriptorFromClassAttrsDef(type, fieldAttributes ?? columnAttributes, { ...opts, tableviewEditorType: TableviewEditorTypeEnum.Add }));
|
|
249
|
+
}
|
|
250
|
+
return descriptor;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* creates column and field with custom type, for example currency
|
|
255
|
+
* if field exists, it is replaced
|
|
256
|
+
* DO NOT USE WITH TYPES WHERE ARGS ARE REQUIRED - ERROR WILL BE THROWN
|
|
257
|
+
* for enum use withEnumType
|
|
258
|
+
* for custom class use withClassType
|
|
259
|
+
* @param descriptor Tableview descriptor
|
|
260
|
+
* @param property name of field
|
|
261
|
+
* @param columnType required column type
|
|
262
|
+
* @param fieldType optional, if not provided it is converted from column type
|
|
263
|
+
* @param columnDisplayType optional
|
|
264
|
+
*/
|
|
265
|
+
function modifyTableviewClassAttributeType(descriptor, property, columnType, fieldType, columnDisplayType) {
|
|
266
|
+
return modifyTableviewClassAttributeTypeUnsafe(descriptor, property, columnType, fieldType, columnDisplayType);
|
|
267
|
+
}
|
|
268
|
+
function modifyTableviewClassAttributeTypeUnsafe(descriptor, property, columnType, fieldType, columnDisplayType) {
|
|
269
|
+
if (!(descriptor.model instanceof ModelClassDescriptor)) {
|
|
270
|
+
throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);
|
|
271
|
+
}
|
|
272
|
+
if (columnType === ColumnTypeEnum.Enum) {
|
|
273
|
+
throw new CommonsInternalError('Do not use with types where args are required', { name: 'TableviewDescriptorError' });
|
|
274
|
+
}
|
|
275
|
+
const attributeDef = getTableviewClassAttributeDef(descriptor.model.classType).find(attr => attr.name === property);
|
|
276
|
+
if (attributeDef != null) {
|
|
277
|
+
fieldType ??= getFieldInputTypeFromColumnType(columnType, columnDisplayType);
|
|
278
|
+
attributeDef.fieldType = fieldType;
|
|
279
|
+
modifyTableClassAttributeColumnTypeUnsafe(descriptor.table, property, columnType, columnDisplayType);
|
|
280
|
+
modifyEditorClassAttributeFieldTypeUnsafe(descriptor.editEditor, property, fieldType);
|
|
281
|
+
modifyEditorClassAttributeFieldTypeUnsafe(descriptor.addEditor, property, fieldType);
|
|
282
|
+
modifyEditorClassAttributeFieldTypeUnsafe(descriptor.detailsEditor, property, fieldType);
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* creates column with enum type
|
|
289
|
+
* if fields exists, it is replaced
|
|
290
|
+
* @param descriptor Tableview descriptor
|
|
291
|
+
* @param property property name
|
|
292
|
+
* @param enumDesc type of enum
|
|
293
|
+
* @param fieldType type of field, optional, default is Text
|
|
294
|
+
*/
|
|
295
|
+
function modifyTableviewClassAttributeEnum(descriptor, property, enumDesc, fieldType) {
|
|
296
|
+
return modifyTableviewClassAttributeEnumUnsafe(descriptor, property, enumDesc, fieldType);
|
|
297
|
+
}
|
|
298
|
+
function modifyTableviewClassAttributeEnumUnsafe(descriptor, property, enumDesc, fieldType) {
|
|
299
|
+
if (!(descriptor.model instanceof ModelClassDescriptor)) {
|
|
300
|
+
throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);
|
|
301
|
+
}
|
|
302
|
+
const attributeDef = getTableviewClassAttributeDef(descriptor.model.classType).find(attr => attr.name === property);
|
|
303
|
+
if (attributeDef != null) {
|
|
304
|
+
attributeDef.fieldType = fieldType ?? FieldInputTypeEnum.Text;
|
|
305
|
+
tableDescriptorModifyEnumColumnUnsafe(descriptor.table, property, enumDesc);
|
|
306
|
+
modifyEditorClassAttributeFieldEnumUnsafe(descriptor.editEditor, property, enumDesc);
|
|
307
|
+
modifyEditorClassAttributeFieldEnumUnsafe(descriptor.addEditor, property, enumDesc);
|
|
308
|
+
modifyEditorClassAttributeFieldEnumUnsafe(descriptor.detailsEditor, property, enumDesc);
|
|
309
|
+
return true;
|
|
310
|
+
}
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* generates column with custom class type
|
|
315
|
+
* field is generated only if lookupProvider is provided
|
|
316
|
+
* @param descriptor Tableview descriptor
|
|
317
|
+
* @param property property name
|
|
318
|
+
* @param type class type of object
|
|
319
|
+
* @param titleProperty
|
|
320
|
+
* @param lookupProvider
|
|
321
|
+
* @param optionsLabelProperty
|
|
322
|
+
* @param filterProperty
|
|
323
|
+
*/
|
|
324
|
+
function modifyTableviewLookup(descriptor, property, type, lookupProvider, titleProperty, optionsLabelProperty, filterProperty) {
|
|
325
|
+
return modifyTableviewLookupUnsafe(descriptor, property, type, lookupProvider, titleProperty, optionsLabelProperty, filterProperty);
|
|
326
|
+
}
|
|
327
|
+
function modifyTableviewLookupUnsafe(descriptor, property, type, lookupProvider, titleProperty, optionsLabelProperty, filterProperty) {
|
|
328
|
+
if (!(descriptor.model instanceof ModelClassDescriptor)) {
|
|
329
|
+
throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);
|
|
330
|
+
}
|
|
331
|
+
const attributeDef = getTableviewClassAttributeDef(descriptor.model.classType).find(attr => attr.name === property);
|
|
332
|
+
if (attributeDef != null) {
|
|
333
|
+
type ??= attributeDef.classType ?? TypeRegistry.get().findType(attributeDef.type);
|
|
334
|
+
titleProperty ??= type ? (findClassTitleAttribute(type) ?? undefined) : undefined;
|
|
335
|
+
optionsLabelProperty ??= titleProperty;
|
|
336
|
+
attributeDef.columnType = ColumnTypeEnum.String;
|
|
337
|
+
attributeDef.fieldType = FieldInputTypeEnum.Text;
|
|
338
|
+
if (lookupProvider != null) {
|
|
339
|
+
modifyTableColumnFilterLookupUnsafe(descriptor.table, property, lookupProvider, optionsLabelProperty, filterProperty);
|
|
340
|
+
modifyEditorFieldLookupUnsafe(descriptor.addEditor, property, lookupProvider, optionsLabelProperty);
|
|
341
|
+
modifyEditorFieldLookupUnsafe(descriptor.detailsEditor, property, lookupProvider, optionsLabelProperty);
|
|
342
|
+
modifyEditorFieldLookupUnsafe(descriptor.editEditor, property, lookupProvider, optionsLabelProperty);
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
const column = descriptor.table.getColumnUnsafe(property) ?? descriptor.addColumnUnsafe(property);
|
|
347
|
+
if (titleProperty) {
|
|
348
|
+
column.withGetter(value => value?.[titleProperty]);
|
|
349
|
+
}
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function tableviewDataProviderFromClass(type, serviceType) {
|
|
357
|
+
return new TableviewDataProviderInst(serviceType);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// editor
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Generated bundle index. Do not edit.
|
|
364
|
+
*/
|
|
365
|
+
|
|
366
|
+
export { editorDataProviderFromClass, editorDescriptorFromClass, editorDescriptorFromClassAttrsDef, expandClassAttributeDefWithEditorDef, expandClassAttributeDefWithTableviewDef, getEditorClassAttributeDef, getFieldInputTypeFromClassAttributeDefType, getFieldInputTypeFromColumnType, getTableviewClassAttributeDef, modifyEditorClassAttributeFieldEnum, modifyEditorClassAttributeFieldEnumUnsafe, modifyEditorClassAttributeFieldType, modifyEditorClassAttributeFieldTypeUnsafe, modifyEditorFieldLookup, modifyEditorFieldLookupUnsafe, modifyTableviewClassAttributeEnum, modifyTableviewClassAttributeEnumUnsafe, modifyTableviewClassAttributeType, modifyTableviewClassAttributeTypeUnsafe, modifyTableviewLookup, modifyTableviewLookupUnsafe, tableviewDataProviderFromClass, tableviewDescriptorFromClass, tableviewDescriptorFromClassAttrsDef, upsertEditorFieldFromAttributeDef };
|
|
367
|
+
//# sourceMappingURL=mediusinc-mng-commons-tableview-api-class.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediusinc-mng-commons-tableview-api-class.mjs","sources":["../../tableview/api/class/src/editor/class-editor-attribute-converter.ts","../../tableview/api/class/src/editor/class-editor-data-provider.factory.ts","../../tableview/api/class/src/editor/class-editor-descriptor-helpers.ts","../../tableview/api/class/src/editor/class-editor-descriptor.factory.ts","../../tableview/api/class/src/tableview/class-tableview-attribute-converter.ts","../../tableview/api/class/src/tableview/class-tableview-descriptor.factory.ts","../../tableview/api/class/src/tableview/class-tableview-descriptor-helpers.ts","../../tableview/api/class/src/tableview/class-tableview-data-provider.factory.ts","../../tableview/api/class/src/index.ts","../../tableview/api/class/src/mediusinc-mng-commons-tableview-api-class.ts"],"sourcesContent":["import {ClassAttributeDef, ClassType, CommonsInternalError, EnumType, TypeRegistry} from '@mediusinc/mng-commons/core';\nimport {ColumnDisplayTypeEnum, ColumnTypeEnum} from '@mediusinc/mng-commons/table/api';\nimport {FieldInputTypeEnum} from '@mediusinc/mng-commons/tableview/api';\n\nimport {EditorClassAttributeDef} from './class-editor-attribute.model';\n\n/**\n * converts string type to type enum, default is text\n * @param attributeType\n */\nexport function getFieldInputTypeFromClassAttributeDefType(attributeType: string): FieldInputTypeEnum {\n switch (attributeType) {\n case 'hidden':\n return FieldInputTypeEnum.Hidden;\n case 'label':\n return FieldInputTypeEnum.Label;\n case 'textarea':\n return FieldInputTypeEnum.Textarea;\n case 'number':\n return FieldInputTypeEnum.Number;\n case 'currency':\n return FieldInputTypeEnum.Currency;\n case 'switch':\n case 'boolean':\n return FieldInputTypeEnum.Switch;\n case 'radio':\n return FieldInputTypeEnum.Radio;\n case 'datepicker':\n return FieldInputTypeEnum.Datepicker;\n case 'mask':\n return FieldInputTypeEnum.Mask;\n case 'file':\n return FieldInputTypeEnum.File;\n case 'custom':\n return FieldInputTypeEnum.Custom;\n case 'text':\n default:\n return FieldInputTypeEnum.Text;\n }\n}\n\n/**\n * convert column type to equivalent field input type\n * @param type column type\n * @param displayType column display type\n */\nexport function getFieldInputTypeFromColumnType(type: ColumnTypeEnum, displayType?: ColumnDisplayTypeEnum): FieldInputTypeEnum {\n switch (type) {\n case ColumnTypeEnum.Number:\n return displayType === ColumnDisplayTypeEnum.Currency ? FieldInputTypeEnum.Currency : FieldInputTypeEnum.Number;\n case ColumnTypeEnum.Boolean:\n return FieldInputTypeEnum.Switch;\n case ColumnTypeEnum.Date:\n return FieldInputTypeEnum.Datepicker;\n case ColumnTypeEnum.Custom:\n return FieldInputTypeEnum.Custom;\n case ColumnTypeEnum.String:\n case ColumnTypeEnum.Enum:\n default:\n return FieldInputTypeEnum.Text;\n }\n}\n\nexport function expandClassAttributeDefWithEditorDef(attributes?: Array<ClassAttributeDef> | null): EditorClassAttributeDef[] {\n if (!attributes) {\n throw new CommonsInternalError('Class attribute definition is null, problem with TypeRegistry::findAttributesDefinitionByClassType?', {name: 'TableviewUtilsError'});\n }\n\n const typeRegistry = TypeRegistry.get();\n const editorClassAttributeDef: EditorClassAttributeDef[] = [];\n for (const attribute of attributes) {\n editorClassAttributeDef.push({\n name: attribute.name,\n baseName: attribute.baseName,\n type: attribute.type,\n subtype: attribute.subtype,\n fieldType: getFieldInputTypeFromClassAttributeDefType(attribute.type),\n classType: typeRegistry.findType(attribute.type) as ClassType<any>,\n enumType: typeRegistry.findEnum(attribute.type) as EnumType\n });\n }\n\n return editorClassAttributeDef;\n}\n\n/**\n * returns attributes from class type and extends to typed def with column and field enum type\n * @param type class type\n */\nexport function getEditorClassAttributeDef<T>(type: ClassType<T>): EditorClassAttributeDef[] {\n return expandClassAttributeDefWithEditorDef(TypeRegistry.get().findAttributesDefinitionByClassType(type));\n}\n","import {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {EditorDataProviderInst} from '@mediusinc/mng-commons/tableview/api';\n\nexport function editorDataProviderFromClass<Model>(type: ClassType<Model>): EditorDataProviderInst<Model, undefined, undefined>;\nexport function editorDataProviderFromClass<Model, Service = any>(\n type: ClassType<Model>,\n serviceType: ServiceClassType<Service>\n): EditorDataProviderInst<Model, Service, ServiceClassType<Service>>;\nexport function editorDataProviderFromClass<Model, Service = any, ServiceClass = ServiceClassType<Service>>(type: ClassType<Model>, serviceType?: ServiceClass) {\n return new EditorDataProviderInst<Model, Service, ServiceClass>(serviceType as ServiceClass);\n}\n","import {CommonsInternalError, EnumType, ILookupDataProvider, TypeRegistry} from '@mediusinc/mng-commons/core';\nimport {EnumDescriptor, enumModelGeneric} from '@mediusinc/mng-commons/model';\nimport {ModelClassDescriptor} from '@mediusinc/mng-commons/model/class';\nimport {getColumnDisplayTypeFromColumnType, getColumnTypeFromClassAttributeDefType} from '@mediusinc/mng-commons/table/api/class';\nimport {AFieldDescriptor, EditorDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor} from '@mediusinc/mng-commons/tableview/api';\n\nimport {getEditorClassAttributeDef, getFieldInputTypeFromColumnType} from './class-editor-attribute-converter';\nimport {EditorClassAttributeDef} from './class-editor-attribute.model';\n\n/**\n * Generates field based on attribute definition, used for auto model\n * @param descriptor Editor descriptor instance.\n * @param attribute Attribute definition.\n * @param field Optional, if defined will be replaced, otherwise new will be generated.\n * @param args Optional additional arguments mapped to filed type. Arguments depend on possible arguments on fields.\n * @internal\n */\nexport function upsertEditorFieldFromAttributeDef<T>(\n descriptor: EditorDescriptorInst<T, any>,\n attribute: EditorClassAttributeDef,\n field?: AFieldDescriptor<any, T>,\n ...args: any[]\n): AFieldDescriptor<any, T> {\n if (field == null) {\n field = descriptor.addFieldUnsafe(attribute.name);\n }\n\n if (field instanceof FieldInputDescriptor) {\n if (attribute.enumType) {\n return field.asRadioFromEnum(enumModelGeneric(attribute.enumType));\n } else {\n const tableColumnType = getColumnTypeFromClassAttributeDefType(attribute.type);\n const tableColumnDisplayType = getColumnDisplayTypeFromColumnType(tableColumnType, attribute.type);\n return field.asType(attribute.fieldType ?? getFieldInputTypeFromColumnType(tableColumnType, tableColumnDisplayType), ...args);\n }\n }\n\n return field;\n}\n\n/**\n * Modifies selected field by field property. For enums use {withFieldModifiedEnum} instead.\n * @param descriptor Editor descriptor.\n * @param property Model's property name.\n * @param fieldType new field type for selected field\n * @param args additional parameters for field\n */\nexport function modifyEditorClassAttributeFieldType<\n EditorModel,\n Property extends keyof EditorModel,\n FieldModel = NonNullable<EditorModel[Property]>,\n FieldValue = EditorModel[Property]\n>(\n descriptor: EditorDescriptorInst<EditorModel, any>,\n property: Property,\n fieldType: FieldInputTypeEnum,\n ...args: any[]\n): AFieldDescriptor<FieldModel, EditorModel, FieldValue> | null {\n return modifyEditorClassAttributeFieldTypeUnsafe<EditorModel, FieldModel, FieldValue>(descriptor, property as string, fieldType, ...args);\n}\n\nexport function modifyEditorClassAttributeFieldTypeUnsafe<EditorModel, FieldModel = any, FieldValue = FieldModel>(\n descriptor: EditorDescriptorInst<EditorModel, any>,\n property: string,\n fieldType: FieldInputTypeEnum,\n ...args: any[]\n): AFieldDescriptor<FieldModel, EditorModel, FieldValue> | null {\n if (!(descriptor.model instanceof ModelClassDescriptor)) {\n throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);\n }\n\n const attribute = getEditorClassAttributeDef(descriptor.model.classType).find(attribute => attribute.name === property);\n if (attribute) {\n attribute.fieldType = fieldType;\n return upsertEditorFieldFromAttributeDef(\n descriptor,\n attribute,\n descriptor.fields.find(fi => fi.property === property),\n ...args\n );\n }\n\n return null;\n}\n\n/**\n * Modifies selected field with enum type.\n * @param descriptor Editor descriptor.\n * @param property Model's property name.\n * @param enumModel Enum descriptor.\n * @param values\n */\nexport function modifyEditorClassAttributeFieldEnum<\n EditorModel,\n Property extends keyof EditorModel,\n Enum extends NonNullable<EditorModel[Property]>,\n FieldModel = NonNullable<EditorModel[Property]>,\n FieldValue = EditorModel[Property]\n>(\n descriptor: EditorDescriptorInst<EditorModel, any>,\n property: Property,\n enumModel?: EnumDescriptor<Enum>,\n values?: Array<Enum>\n): AFieldDescriptor<FieldModel, EditorModel, FieldValue> | null {\n return modifyEditorClassAttributeFieldEnumUnsafe<EditorModel, Enum, FieldModel, FieldValue>(descriptor, property as string, enumModel, values);\n}\n\nexport function modifyEditorClassAttributeFieldEnumUnsafe<EditorModel, Enum = any, FieldModel = any, FieldValue = FieldModel>(\n descriptor: EditorDescriptorInst<EditorModel, any>,\n property: string,\n enumDesc?: EnumDescriptor<Enum>,\n values?: Array<Enum>\n): AFieldDescriptor<FieldModel, EditorModel, FieldValue> | null {\n if (!(descriptor.model instanceof ModelClassDescriptor)) {\n throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);\n }\n\n const attribute = getEditorClassAttributeDef(descriptor.model.classType).find(a => a.name === property);\n if (attribute) {\n attribute.fieldType = FieldInputTypeEnum.Radio;\n const field = descriptor.fields.find(f => f.property === property);\n if (field && field instanceof FieldInputDescriptor) {\n field.asRadioFromEnum(enumDesc ?? enumModelGeneric(TypeRegistry.get().findEnum(attribute.type) as EnumType), values);\n }\n return field ?? null;\n }\n\n return null;\n}\n\n/**\n * Modifies selected field with lookup field.\n * @param descriptor Editor descriptor.\n * @param property Model's property name.\n * @param lookupProvider provider to be added to field\n * @param titleProperty\n */\nexport function modifyEditorFieldLookup<\n EditorModel,\n Property extends keyof EditorModel,\n Service,\n FieldModel = NonNullable<EditorModel[Property]>,\n FieldValue = EditorModel[Property]\n>(\n descriptor: EditorDescriptorInst<EditorModel, any>,\n property: Property,\n lookupProvider: ILookupDataProvider<FieldModel, Service>,\n titleProperty?: keyof FieldModel\n): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue> {\n return modifyEditorFieldLookupUnsafe<EditorModel, Service, FieldModel, FieldValue>(descriptor, property as string, lookupProvider, titleProperty as string);\n}\n\nexport function modifyEditorFieldLookupUnsafe<EditorModel, Service, FieldModel = any, FieldValue = FieldModel>(\n descriptor: EditorDescriptorInst<EditorModel, any>,\n property: string,\n lookupProvider: ILookupDataProvider<FieldModel, Service>,\n titleProperty?: string\n): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue> {\n descriptor.removeFieldUnsafe(property);\n const field = descriptor.addFieldLookupUnsafe<FieldModel, Service, FieldValue>(property, {serviceProvider: lookupProvider}).asAutocomplete();\n\n if (titleProperty) {\n field.withOptionsLabelPropertyUnsafe(titleProperty);\n }\n\n return field;\n}\n","import {ClassType} from '@mediusinc/mng-commons/core';\nimport {modelClass} from '@mediusinc/mng-commons/model/class';\nimport {EditorDescriptorCreateOptsType, EditorDescriptorInst} from '@mediusinc/mng-commons/tableview/api';\n\nimport {getEditorClassAttributeDef} from './class-editor-attribute-converter';\nimport {EditorClassAttributeDef} from './class-editor-attribute.model';\nimport {upsertEditorFieldFromAttributeDef} from './class-editor-descriptor-helpers';\n\nexport function editorDescriptorFromClass<EditorModel, ParentEditorModel = undefined>(\n type: ClassType<EditorModel>,\n opts?: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>\n): EditorDescriptorInst<EditorModel, ParentEditorModel> {\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(modelClass<EditorModel>(type as ClassType<EditorModel>, opts), opts?.tableviewEditorType);\n}\n\n/**\n * Generates descriptor based on type attribute definition\n * @param type class type\n * @param attributes\n * @param opts\n */\nexport function editorDescriptorFromClassAttrsDef<EditorModel, ParentEditorModel = undefined>(\n type: ClassType<EditorModel>,\n attributes?: EditorClassAttributeDef[],\n opts?: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>\n): EditorDescriptorInst<EditorModel, ParentEditorModel> {\n const descriptor = new EditorDescriptorInst<EditorModel, ParentEditorModel>(modelClass(type, opts), opts?.tableviewEditorType);\n (attributes ?? getEditorClassAttributeDef(type))\n .filter(attr => !attr.type.includes('Set') && !attr.type.includes('Array'))\n .forEach(attr => upsertEditorFieldFromAttributeDef(descriptor, attr));\n return descriptor;\n}\n","import {ClassAttributeDef, ClassType, CommonsInternalError, EnumType, TypeRegistry} from '@mediusinc/mng-commons/core';\nimport {ColumnTypeEnum} from '@mediusinc/mng-commons/table/api';\nimport {getColumnDisplayTypeFromColumnType, getColumnTypeFromClassAttributeDefType} from '@mediusinc/mng-commons/table/api/class';\n\nimport {getFieldInputTypeFromClassAttributeDefType} from '../editor/class-editor-attribute-converter';\nimport {TableviewClassAttributeDef} from './class-tableview-attribute.model';\n\nexport function expandClassAttributeDefWithTableviewDef(attributes?: Array<ClassAttributeDef> | null): TableviewClassAttributeDef[] {\n if (!attributes) {\n throw new CommonsInternalError('Class attribute definition is null, problem with TypeRegistry::findAttributesDefinitionByClassType?', {name: 'TableviewUtilsError'});\n }\n\n const typeRegistry = TypeRegistry.get();\n const tableClassAttributeDef: TableviewClassAttributeDef[] = [];\n for (const attribute of attributes) {\n const enumType = typeRegistry.findEnum(attribute.type);\n const columnType = enumType ? ColumnTypeEnum.Enum : getColumnTypeFromClassAttributeDefType(attribute.type);\n tableClassAttributeDef.push({\n name: attribute.name,\n baseName: attribute.baseName,\n type: attribute.type,\n subtype: attribute.subtype,\n columnType: enumType ? ColumnTypeEnum.Enum : getColumnTypeFromClassAttributeDefType(attribute.type),\n columnDisplayType: getColumnDisplayTypeFromColumnType(columnType, attribute.type),\n fieldType: getFieldInputTypeFromClassAttributeDefType(attribute.type),\n enumType: typeRegistry.findEnum(attribute.type) as EnumType,\n classType: typeRegistry.findType(attribute.type) as ClassType<any>\n });\n }\n\n return tableClassAttributeDef;\n}\n\n/**\n * returns attributes from class type and extends to typed def with column and field enum type\n * @param type class type\n */\nexport function getTableviewClassAttributeDef<T>(type: ClassType<T>): TableviewClassAttributeDef[] {\n return expandClassAttributeDefWithTableviewDef(TypeRegistry.get().findAttributesDefinitionByClassType(type));\n}\n","import {ClassType} from '@mediusinc/mng-commons/core';\nimport {modelClass} from '@mediusinc/mng-commons/model/class';\nimport {tableDescriptorFromClassAttrsDef} from '@mediusinc/mng-commons/table/api/class';\nimport {TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType, TableviewDescriptorInst, TableviewEditorTypeEnum} from '@mediusinc/mng-commons/tableview/api';\n\nimport {editorDescriptorFromClassAttrsDef} from '../editor/class-editor-descriptor.factory';\nimport {TableviewClassAttributeDef} from './class-tableview-attribute.model';\n\nexport function tableviewDescriptorFromClass<TableviewModel, Sorts = keyof TableviewModel, Filters = keyof TableviewModel, ParentEditorModel = undefined>(\n type: ClassType<TableviewModel>,\n opts?: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<TableviewModel>\n): TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel> {\n return new TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel>(modelClass<TableviewModel>(type as ClassType<TableviewModel>, opts));\n}\n\n/**\n * generates descriptor based on type attribute definition\n * @param type class type\n * @param columnAttributes\n * @param fieldAttributes\n * @param opts\n */\nexport function tableviewDescriptorFromClassAttrsDef<TableviewModel, Sorts = keyof TableviewModel, Filters = keyof TableviewModel>(\n type: ClassType<TableviewModel>,\n columnAttributes?: TableviewClassAttributeDef[],\n fieldAttributes?: TableviewClassAttributeDef[] | null,\n opts?: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<TableviewModel>\n): TableviewDescriptorInst<TableviewModel, Sorts, Filters> {\n const model = modelClass(type, opts);\n const descriptor = new TableviewDescriptorInst<TableviewModel, Sorts, Filters>(model);\n descriptor.withTableDescriptor(tableDescriptorFromClassAttrsDef<TableviewModel, Sorts, Filters>(type, columnAttributes, opts));\n\n if (fieldAttributes !== null) {\n descriptor.withEditDescriptor(editorDescriptorFromClassAttrsDef(type, fieldAttributes ?? columnAttributes, {...opts, tableviewEditorType: TableviewEditorTypeEnum.Edit}));\n descriptor.withDetailsDescriptor(\n editorDescriptorFromClassAttrsDef(type, fieldAttributes ?? columnAttributes, {...opts, tableviewEditorType: TableviewEditorTypeEnum.Details}).withDisabled()\n );\n descriptor.withAddDescriptor(editorDescriptorFromClassAttrsDef(type, fieldAttributes ?? columnAttributes, {...opts, tableviewEditorType: TableviewEditorTypeEnum.Add}));\n }\n\n return descriptor;\n}\n","import {ClassType, CommonsInternalError, ILookupDataProvider, TypeRegistry} from '@mediusinc/mng-commons/core';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\nimport {ModelClassDescriptor, findClassTitleAttribute} from '@mediusinc/mng-commons/model/class';\nimport {ColumnDisplayTypeEnum, ColumnTypeEnum} from '@mediusinc/mng-commons/table/api';\nimport {modifyTableClassAttributeColumnTypeUnsafe, modifyTableColumnFilterLookupUnsafe, tableDescriptorModifyEnumColumnUnsafe} from '@mediusinc/mng-commons/table/api/class';\nimport {FieldInputTypeEnum, TableviewDescriptorInst} from '@mediusinc/mng-commons/tableview/api';\n\nimport {getFieldInputTypeFromColumnType} from '../editor/class-editor-attribute-converter';\nimport {modifyEditorClassAttributeFieldEnumUnsafe, modifyEditorClassAttributeFieldTypeUnsafe, modifyEditorFieldLookupUnsafe} from '../editor/class-editor-descriptor-helpers';\nimport {getTableviewClassAttributeDef} from './class-tableview-attribute-converter';\n\n/**\n * creates column and field with custom type, for example currency\n * if field exists, it is replaced\n * DO NOT USE WITH TYPES WHERE ARGS ARE REQUIRED - ERROR WILL BE THROWN\n * for enum use withEnumType\n * for custom class use withClassType\n * @param descriptor Tableview descriptor\n * @param property name of field\n * @param columnType required column type\n * @param fieldType optional, if not provided it is converted from column type\n * @param columnDisplayType optional\n */\nexport function modifyTableviewClassAttributeType<TableviewModel>(\n descriptor: TableviewDescriptorInst<TableviewModel, any, any>,\n property: keyof TableviewModel,\n columnType: ColumnTypeEnum,\n fieldType?: FieldInputTypeEnum,\n columnDisplayType?: ColumnDisplayTypeEnum\n): boolean {\n return modifyTableviewClassAttributeTypeUnsafe(descriptor, property as string, columnType, fieldType, columnDisplayType);\n}\n\nexport function modifyTableviewClassAttributeTypeUnsafe<TableviewModel>(\n descriptor: TableviewDescriptorInst<TableviewModel, any, any>,\n property: string,\n columnType: ColumnTypeEnum,\n fieldType?: FieldInputTypeEnum,\n columnDisplayType?: ColumnDisplayTypeEnum\n): boolean {\n if (!(descriptor.model instanceof ModelClassDescriptor)) {\n throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);\n }\n if (columnType === ColumnTypeEnum.Enum) {\n throw new CommonsInternalError('Do not use with types where args are required', {name: 'TableviewDescriptorError'});\n }\n\n const attributeDef = getTableviewClassAttributeDef(descriptor.model.classType).find(attr => attr.name === property);\n\n if (attributeDef != null) {\n fieldType ??= getFieldInputTypeFromColumnType(columnType, columnDisplayType);\n attributeDef.fieldType = fieldType;\n modifyTableClassAttributeColumnTypeUnsafe(descriptor.table, property, columnType, columnDisplayType);\n modifyEditorClassAttributeFieldTypeUnsafe(descriptor.editEditor, property, fieldType);\n modifyEditorClassAttributeFieldTypeUnsafe(descriptor.addEditor, property, fieldType);\n modifyEditorClassAttributeFieldTypeUnsafe(descriptor.detailsEditor, property, fieldType);\n return true;\n }\n\n return false;\n}\n\n/**\n * creates column with enum type\n * if fields exists, it is replaced\n * @param descriptor Tableview descriptor\n * @param property property name\n * @param enumDesc type of enum\n * @param fieldType type of field, optional, default is Text\n */\nexport function modifyTableviewClassAttributeEnum<TableviewModel, Property extends keyof TableviewModel, Enum extends NonNullable<TableviewModel[Property]>>(\n descriptor: TableviewDescriptorInst<TableviewModel, any, any>,\n property: Property,\n enumDesc?: EnumDescriptor<Enum>,\n fieldType?: FieldInputTypeEnum\n): boolean {\n return modifyTableviewClassAttributeEnumUnsafe<TableviewModel, Enum>(descriptor, property as string, enumDesc, fieldType);\n}\n\nexport function modifyTableviewClassAttributeEnumUnsafe<TableviewModel, Enum = any>(\n descriptor: TableviewDescriptorInst<TableviewModel, any, any>,\n property: string,\n enumDesc?: EnumDescriptor<Enum>,\n fieldType?: FieldInputTypeEnum\n): boolean {\n if (!(descriptor.model instanceof ModelClassDescriptor)) {\n throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);\n }\n const attributeDef = getTableviewClassAttributeDef(descriptor.model.classType).find(attr => attr.name === property);\n\n if (attributeDef != null) {\n attributeDef.fieldType = fieldType ?? FieldInputTypeEnum.Text;\n tableDescriptorModifyEnumColumnUnsafe(descriptor.table, property, enumDesc);\n modifyEditorClassAttributeFieldEnumUnsafe(descriptor.editEditor, property, enumDesc);\n modifyEditorClassAttributeFieldEnumUnsafe(descriptor.addEditor, property, enumDesc);\n modifyEditorClassAttributeFieldEnumUnsafe(descriptor.detailsEditor, property, enumDesc);\n return true;\n }\n\n return false;\n}\n\n/**\n * generates column with custom class type\n * field is generated only if lookupProvider is provided\n * @param descriptor Tableview descriptor\n * @param property property name\n * @param type class type of object\n * @param titleProperty\n * @param lookupProvider\n * @param optionsLabelProperty\n * @param filterProperty\n */\nexport function modifyTableviewLookup<TableviewModel, Property extends keyof TableviewModel, LookupModel = NonNullable<TableviewModel[Property]>>(\n descriptor: TableviewDescriptorInst<TableviewModel, any, any>,\n property: Property,\n type?: ClassType<LookupModel>,\n lookupProvider?: ILookupDataProvider<LookupModel>,\n titleProperty?: keyof LookupModel,\n optionsLabelProperty?: keyof LookupModel,\n filterProperty?: keyof LookupModel\n): boolean {\n return modifyTableviewLookupUnsafe(descriptor, property as string, type, lookupProvider, titleProperty as string, optionsLabelProperty as string, filterProperty as string);\n}\n\nexport function modifyTableviewLookupUnsafe<TableviewModel, LookupModel>(\n descriptor: TableviewDescriptorInst<TableviewModel, any, any>,\n property: string,\n type?: ClassType<LookupModel>,\n lookupProvider?: ILookupDataProvider<LookupModel>,\n titleProperty?: string,\n optionsLabelProperty?: string,\n filterProperty?: string\n): boolean {\n if (!(descriptor.model instanceof ModelClassDescriptor)) {\n throw new CommonsInternalError(`withFieldModifiedType cannot be executed for property ${property}: Model descriptor is not of type 'ModelClassDescriptor' is not defined.`);\n }\n\n const attributeDef = getTableviewClassAttributeDef(descriptor.model.classType).find(attr => attr.name === property);\n\n if (attributeDef != null) {\n type ??= attributeDef.classType ?? TypeRegistry.get().findType(attributeDef.type);\n titleProperty ??= type ? (findClassTitleAttribute(type) ?? undefined) : undefined;\n optionsLabelProperty ??= titleProperty;\n attributeDef.columnType = ColumnTypeEnum.String;\n attributeDef.fieldType = FieldInputTypeEnum.Text;\n\n if (lookupProvider != null) {\n modifyTableColumnFilterLookupUnsafe(descriptor.table, property, lookupProvider, optionsLabelProperty, filterProperty);\n modifyEditorFieldLookupUnsafe(descriptor.addEditor, property, lookupProvider, optionsLabelProperty);\n modifyEditorFieldLookupUnsafe(descriptor.detailsEditor, property, lookupProvider, optionsLabelProperty);\n modifyEditorFieldLookupUnsafe(descriptor.editEditor, property, lookupProvider, optionsLabelProperty);\n return true;\n } else {\n const column = descriptor.table.getColumnUnsafe(property) ?? descriptor.addColumnUnsafe(property);\n if (titleProperty) {\n column.withGetter(value => value?.[titleProperty as keyof object]);\n }\n return true;\n }\n }\n\n return false;\n}\n","import {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {TableviewDataProviderInst} from '@mediusinc/mng-commons/tableview/api';\n\nexport function tableviewDataProviderFromClass<Model, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>\n): TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined>;\nexport function tableviewDataProviderFromClass<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n type: ClassType<Model>,\n serviceType: ServiceClassType<Service>\n): TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassType<Service>>;\nexport function tableviewDataProviderFromClass<Model, Service = any, Sorts = keyof Model, Filters extends keyof any = keyof Model, ServiceClass = ServiceClassType<Service>>(\n type: ClassType<Model>,\n serviceType?: ServiceClass\n) {\n return new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass>(serviceType as ServiceClass);\n}\n","// editor\nexport * from './editor/class-editor-attribute.model';\nexport * from './editor/class-editor-attribute-converter';\nexport * from './editor/class-editor-data-provider.factory';\nexport * from './editor/class-editor-descriptor.factory';\nexport * from './editor/class-editor-descriptor-helpers';\n\n// tableview\nexport * from './tableview/class-tableview-attribute.model';\nexport * from './tableview/class-tableview-attribute-converter';\nexport * from './tableview/class-tableview-descriptor.factory';\nexport * from './tableview/class-tableview-descriptor-helpers';\nexport * from './tableview/class-tableview-data-provider.factory';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA;;;AAGG;AACG,SAAU,0CAA0C,CAAC,aAAqB,EAAA;IAC5E,QAAQ,aAAa;AACjB,QAAA,KAAK,QAAQ;YACT,OAAO,kBAAkB,CAAC,MAAM;AACpC,QAAA,KAAK,OAAO;YACR,OAAO,kBAAkB,CAAC,KAAK;AACnC,QAAA,KAAK,UAAU;YACX,OAAO,kBAAkB,CAAC,QAAQ;AACtC,QAAA,KAAK,QAAQ;YACT,OAAO,kBAAkB,CAAC,MAAM;AACpC,QAAA,KAAK,UAAU;YACX,OAAO,kBAAkB,CAAC,QAAQ;AACtC,QAAA,KAAK,QAAQ;AACb,QAAA,KAAK,SAAS;YACV,OAAO,kBAAkB,CAAC,MAAM;AACpC,QAAA,KAAK,OAAO;YACR,OAAO,kBAAkB,CAAC,KAAK;AACnC,QAAA,KAAK,YAAY;YACb,OAAO,kBAAkB,CAAC,UAAU;AACxC,QAAA,KAAK,MAAM;YACP,OAAO,kBAAkB,CAAC,IAAI;AAClC,QAAA,KAAK,MAAM;YACP,OAAO,kBAAkB,CAAC,IAAI;AAClC,QAAA,KAAK,QAAQ;YACT,OAAO,kBAAkB,CAAC,MAAM;AACpC,QAAA,KAAK,MAAM;AACX,QAAA;YACI,OAAO,kBAAkB,CAAC,IAAI;;AAE1C;AAEA;;;;AAIG;AACa,SAAA,+BAA+B,CAAC,IAAoB,EAAE,WAAmC,EAAA;IACrG,QAAQ,IAAI;QACR,KAAK,cAAc,CAAC,MAAM;AACtB,YAAA,OAAO,WAAW,KAAK,qBAAqB,CAAC,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,GAAG,kBAAkB,CAAC,MAAM;QACnH,KAAK,cAAc,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