@mediusinc/mng-commons 5.5.0 → 6.0.0-rc.3
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/notification.d.ts +17 -1
- package/core/helpers/route.d.ts +0 -1
- package/core/helpers/type-helpers.d.ts +8 -0
- package/core/i18n/i18n-error.d.ts +2 -3
- package/core/index.d.ts +0 -3
- package/core/models/menu.model.d.ts +0 -4
- package/core/router/route-builder.d.ts +1 -1
- 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/notification.mjs +19 -4
- package/esm2022/core/helpers/type-helpers.mjs +1 -1
- package/esm2022/core/i18n/i18n-error.mjs +10 -8
- package/esm2022/core/index.mjs +1 -4
- package/esm2022/core/models/menu.model.mjs +1 -1
- package/esm2022/core/router/route-builder.mjs +2 -2
- 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/form/api/descriptors/action-button.descriptor.mjs +5 -17
- package/esm2022/form/api/descriptors/button-style.builder.mjs +80 -101
- package/esm2022/form/api/index.mjs +2 -1
- package/esm2022/form/api/models/button.model.mjs +2 -0
- 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/helpers/i18n.mjs +14 -9
- 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 +7 -5
- 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 +17 -18
- package/esm2022/table/helpers/notification.mjs +19 -13
- package/esm2022/tableview/action/components/action/action.component.mjs +41 -37
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +22 -13
- package/esm2022/tableview/action/helpers/action-execution.mjs +1 -1
- package/esm2022/tableview/action/helpers/i18n.mjs +50 -30
- package/esm2022/tableview/action/helpers/notification.mjs +73 -12
- package/esm2022/tableview/action/helpers/styles.mjs +2 -2
- 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 +92 -75
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +18 -3
- 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 +35 -82
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +20 -33
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +54 -95
- 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-confirmation.model.mjs +2 -0
- 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-action.descriptor.mjs +14 -8
- 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/editor/models/formly-custom-field.model.mjs +1 -1
- package/esm2022/tableview/api/index.mjs +9 -9
- 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 +154 -106
- 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/editor/form-editor.component.mjs +5 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +7 -5
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +34 -23
- 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/provide.mjs +44 -1
- 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 +715 -792
- 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 +144 -203
- 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 +35 -144
- 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 +45 -38
- 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 +850 -1483
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +421 -220
- 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/form/api/descriptors/action-button.descriptor.d.ts +11 -13
- package/form/api/descriptors/button-style.builder.d.ts +30 -44
- package/form/api/index.d.ts +1 -0
- package/form/api/models/button.model.d.ts +19 -0
- package/i18n/sl.json +56 -6
- 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/helpers/i18n.d.ts +8 -3
- 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 +2 -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 -10
- package/table/helpers/notification.d.ts +10 -1
- package/tableview/action/components/action/action.component.d.ts +10 -13
- 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/helpers/i18n.d.ts +36 -11
- package/tableview/action/helpers/notification.d.ts +37 -3
- 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-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 +39 -47
- 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 +49 -60
- 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-confirmation.model.d.ts +14 -0
- package/tableview/api/action/models/action-descriptor.types.d.ts +6 -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-action.descriptor.d.ts +5 -5
- 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 +8 -7
- 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/provide.d.ts +7 -0
- 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 +6 -6
- 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/action/descriptors/action-confirmation.descriptor.mjs +0 -88
- 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
- package/tableview/api/action/descriptors/action-confirmation.descriptor.d.ts +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Params, QueryParamsHandling } from '@angular/router';
|
|
2
2
|
import { ActionDescriptorConstructorOptsType, ActionDescriptorInst } from './action.descriptor';
|
|
3
3
|
export type ActionLinkDescriptorConstructorOpts<Model> = Omit<ActionDescriptorConstructorOptsType<Model, undefined>, 'serviceType' | 'dataProvider'>;
|
|
4
|
-
export declare class ActionLinkDescriptorInst<
|
|
4
|
+
export declare class ActionLinkDescriptorInst<Item, ValidationInputItem = Item> extends ActionDescriptorInst<Item, undefined, undefined, undefined, ValidationInputItem> {
|
|
5
5
|
private _url;
|
|
6
6
|
private _pathSegments;
|
|
7
7
|
private _queryParams?;
|
|
@@ -9,7 +9,7 @@ export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorIns
|
|
|
9
9
|
private _replaceUrl;
|
|
10
10
|
private _target;
|
|
11
11
|
private _isStyleLink;
|
|
12
|
-
constructor(actionName?: string, cfg?: ActionLinkDescriptorConstructorOpts<
|
|
12
|
+
constructor(actionName?: string, cfg?: ActionLinkDescriptorConstructorOpts<Item>);
|
|
13
13
|
get url(): string;
|
|
14
14
|
get pathSegments(): string[];
|
|
15
15
|
get queryParams(): Params | undefined;
|
|
@@ -23,5 +23,5 @@ export declare class ActionLinkDescriptorInst<Model> extends ActionDescriptorIns
|
|
|
23
23
|
withReplaceUrl(replaceUrl?: boolean): this;
|
|
24
24
|
withTarget(target?: '_self' | '_blank'): this;
|
|
25
25
|
withStyleLink(isStyleLink: boolean): this;
|
|
26
|
-
copy(): ActionLinkDescriptorInst<
|
|
26
|
+
copy(): ActionLinkDescriptorInst<Item, ValidationInputItem>;
|
|
27
27
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { InjectionToken, Type } from '@angular/core';
|
|
2
2
|
import { APermissions, ClassType, IActionDescriptor, IDataProvider, ServiceClassType, StyleLevelEnum } from '@mediusinc/mng-commons/core';
|
|
3
|
-
import {
|
|
3
|
+
import { IActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
|
|
4
4
|
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
5
5
|
import { IActionComponent } from '../models/action-component.model';
|
|
6
|
-
import {
|
|
6
|
+
import { ActionConfirmation } from '../models/action-confirmation.model';
|
|
7
|
+
import { ActionNotificationType, ActionRunFnType, ActionValidationFnType } from '../models/action-descriptor.types';
|
|
7
8
|
import { ActionActivationTriggerEnum, ActionPositionEnum, ActionTypeEnum } from '../models/action.type';
|
|
8
9
|
import { IActionContext } from '../models/execution/action-context.model';
|
|
9
|
-
import { ActionConfirmationDescriptor } from './action-confirmation.descriptor';
|
|
10
10
|
export type ActionDescriptorCreateOptsProviderType<Item, Service> = {
|
|
11
11
|
serviceType?: ServiceClassType<Service>;
|
|
12
12
|
dataProvider?: IDataProvider<Item, Service>;
|
|
@@ -18,7 +18,9 @@ export type ActionDescriptorCreateOptsParentType = {
|
|
|
18
18
|
export type ActionDescriptorConstructorOptsType<Item, Service> = ActionDescriptorCreateOptsParentType & ActionDescriptorCreateOptsProviderType<Item, Service> & {
|
|
19
19
|
model?: ModelDescriptor<Item>;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type AfterRunActionType<RunReturnItem> = ActionDescriptorInst<any, any, RunReturnItem, any, undefined>;
|
|
22
|
+
type OnErrorActionType<RunInputItem> = ActionDescriptorInst<any, any, RunInputItem, any, undefined>;
|
|
23
|
+
export declare class ActionDescriptorInst<Item, Service = any, RunInputItem = Item, RunReturnItem = Item, ValidationInputItem = RunInputItem> implements IActionDescriptor<Item, Service> {
|
|
22
24
|
protected readonly _model?: ModelDescriptor<Item>;
|
|
23
25
|
protected readonly _actionName: string;
|
|
24
26
|
protected readonly _actionNameLong: string;
|
|
@@ -33,97 +35,84 @@ export declare class ActionDescriptorInst<Item, Service = any, ReturnItem = Item
|
|
|
33
35
|
private _positionTableviewCategories?;
|
|
34
36
|
protected _tableviewCategory?: string;
|
|
35
37
|
protected _routeUrl: string | null;
|
|
36
|
-
protected _runFunction?: ActionRunFnType<Item, Service,
|
|
37
|
-
protected _isVisibleFunction?: ActionValidationFnType<
|
|
38
|
-
protected _isEnabledFunction?: ActionValidationFnType<
|
|
39
|
-
protected
|
|
40
|
-
protected
|
|
41
|
-
protected
|
|
42
|
-
protected
|
|
43
|
-
protected
|
|
44
|
-
protected _runNotificationErrorTitle?: string;
|
|
45
|
-
protected _runNotificationErrorMessage?: string;
|
|
46
|
-
protected _afterRunAction?: ActionDescriptorInst<any> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<any>);
|
|
47
|
-
protected _onRunErrorAction?: ActionDescriptorInst<Item> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<Item>);
|
|
38
|
+
protected _runFunction?: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>;
|
|
39
|
+
protected _isVisibleFunction?: ActionValidationFnType<ValidationInputItem, Service>;
|
|
40
|
+
protected _isEnabledFunction?: ActionValidationFnType<ValidationInputItem, Service>;
|
|
41
|
+
protected _runConfirmation?: ActionConfirmation<RunInputItem>;
|
|
42
|
+
protected _runNotificationOnSuccess?: ActionNotificationType | boolean;
|
|
43
|
+
protected _runNotificationOnError?: ActionNotificationType | boolean;
|
|
44
|
+
protected _afterRunAction?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>);
|
|
45
|
+
protected _onRunErrorAction?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>);
|
|
48
46
|
protected _permissions?: APermissions;
|
|
49
|
-
protected _button
|
|
47
|
+
protected _button?: IActionButtonDescriptor;
|
|
50
48
|
protected _hasItemsSelection: boolean;
|
|
51
49
|
protected _component?: Type<IActionComponent<Item>>;
|
|
52
50
|
protected _componentFromDi?: InjectionToken<Type<any>>;
|
|
53
51
|
protected _subactionsAsMenu: boolean;
|
|
54
|
-
protected _subactions: Array<ActionDescriptorInst<Item>>;
|
|
52
|
+
protected _subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>>;
|
|
55
53
|
constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<Item, Service>);
|
|
56
|
-
get model(): ModelDescriptor<Item
|
|
57
|
-
get parentModel(): ModelDescriptor<any
|
|
54
|
+
get model(): ModelDescriptor<Item> | undefined;
|
|
55
|
+
get parentModel(): ModelDescriptor<any> | undefined;
|
|
58
56
|
get parentProperty(): string | undefined;
|
|
59
57
|
get i18nModelActionBaseKey(): string | undefined;
|
|
60
58
|
get type(): ActionTypeEnum;
|
|
61
59
|
get activationTrigger(): ActionActivationTriggerEnum;
|
|
62
60
|
get position(): ActionPositionEnum;
|
|
63
|
-
get level(): StyleLevelEnum;
|
|
64
61
|
get routeUrl(): string | null;
|
|
65
62
|
get dataProvider(): IDataProvider<Item, Service> | undefined;
|
|
66
63
|
get hasRunFunction(): boolean;
|
|
67
|
-
get runFunction(): ActionRunFnType<Item, Service,
|
|
68
|
-
get isVisibleFunction(): ActionValidationFnType<
|
|
69
|
-
get isEnabledFunction(): ActionValidationFnType<
|
|
64
|
+
get runFunction(): ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>;
|
|
65
|
+
get isVisibleFunction(): ActionValidationFnType<ValidationInputItem, Service> | undefined;
|
|
66
|
+
get isEnabledFunction(): ActionValidationFnType<ValidationInputItem, Service> | undefined;
|
|
70
67
|
get actionName(): string;
|
|
71
68
|
get actionNameLong(): string;
|
|
72
|
-
get
|
|
73
|
-
get
|
|
74
|
-
get
|
|
75
|
-
get
|
|
76
|
-
get
|
|
77
|
-
get runNotificationSuccessMessage(): string | undefined;
|
|
78
|
-
get hasRunNotificationError(): boolean;
|
|
79
|
-
get runNotificationErrorTitle(): string | undefined;
|
|
80
|
-
get runNotificationErrorMessage(): string | undefined;
|
|
81
|
-
get afterRunAction(): ActionDescriptorInst<any, any, any> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<any>) | undefined;
|
|
82
|
-
get onRunErrorAction(): ActionDescriptorInst<Item, any, Item> | ((ctx: IActionContext<Item, any>) => ActionDescriptorInst<Item>) | undefined;
|
|
69
|
+
get runConfirmation(): ActionConfirmation<RunInputItem> | undefined;
|
|
70
|
+
get runNotificationOnSuccess(): boolean | ActionNotificationType | undefined;
|
|
71
|
+
get runNotificationOnError(): boolean | ActionNotificationType | undefined;
|
|
72
|
+
get afterRunAction(): AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>) | undefined;
|
|
73
|
+
get onRunErrorAction(): OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>) | undefined;
|
|
83
74
|
get permissions(): APermissions | undefined;
|
|
84
75
|
get tableviewCategory(): string | undefined;
|
|
85
76
|
get hasItemsSelection(): boolean;
|
|
86
|
-
get button():
|
|
77
|
+
get button(): IActionButtonDescriptor | undefined;
|
|
87
78
|
get component(): Type<IActionComponent<Item, undefined>> | undefined;
|
|
88
79
|
get componentFromDi(): InjectionToken<Type<any>> | undefined;
|
|
89
80
|
get positionTableviewCategories(): string[] | undefined;
|
|
90
81
|
get subactionsAsMenu(): boolean;
|
|
91
|
-
get subactions(): ActionDescriptorInst<Item, any,
|
|
82
|
+
get subactions(): ActionDescriptorInst<Item, any, RunInputItem, any, RunInputItem>[];
|
|
92
83
|
protected setI18nModelActionBaseKey(base?: string): void;
|
|
93
|
-
withRunFunction(fn: ActionRunFnType<Item, Service,
|
|
94
|
-
withIsVisibleFunction(fn?: ActionValidationFnType<
|
|
95
|
-
withIsEnabledFunction(fn?: ActionValidationFnType<
|
|
84
|
+
withRunFunction(fn: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>): this;
|
|
85
|
+
withIsVisibleFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this;
|
|
86
|
+
withIsEnabledFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this;
|
|
96
87
|
withRouteTrigger(routeUrl: string): this;
|
|
97
88
|
withPosition(position: ActionPositionEnum): this;
|
|
98
89
|
/**
|
|
99
|
-
*
|
|
90
|
+
* Creates confirmation action with default style based on action descriptor
|
|
100
91
|
*/
|
|
101
|
-
withRunConfirmation():
|
|
92
|
+
withRunConfirmation(opts?: boolean | ActionConfirmation<RunInputItem>): this;
|
|
102
93
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
94
|
+
* Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.
|
|
95
|
+
*
|
|
96
|
+
* @param opts Provide config for texts or on/off flag for run success/error notifications.
|
|
105
97
|
*/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
98
|
+
withNotifications(opts?: {
|
|
99
|
+
runOnSuccess?: ActionNotificationType | boolean;
|
|
100
|
+
runOnError?: ActionNotificationType | boolean;
|
|
101
|
+
} | boolean): this;
|
|
102
|
+
withAfterRunAction(action?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => AfterRunActionType<RunReturnItem>)): this;
|
|
103
|
+
withOnRunErrorAction(action?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any>) => OnErrorActionType<RunInputItem>)): this;
|
|
111
104
|
withPermissions(permissions: APermissions): this;
|
|
112
|
-
withTableviewCategory(
|
|
113
|
-
|
|
114
|
-
withButton(label?: string | null, icon?: string | null,
|
|
105
|
+
withTableviewCategory(category: string): this;
|
|
106
|
+
withButtonOpts(button?: IActionButtonDescriptor): this;
|
|
107
|
+
withButton(label?: string | null, icon?: string | null, level?: StyleLevelEnum): this;
|
|
115
108
|
withItemsSelection(hasSelection?: boolean): this;
|
|
116
109
|
withComponent(component: Type<IActionComponent<Item>>): this;
|
|
117
110
|
withComponentFromDi(injectionToken: InjectionToken<Type<any>>): this;
|
|
118
111
|
withPositionTableviewCategories(positionTableviewCategories: string[]): this;
|
|
119
112
|
withI18nBase(base: ClassType<unknown> | string): this;
|
|
120
113
|
withSubactionsAsMenu(subactionsAsMenu?: boolean): this;
|
|
121
|
-
withSubactions(...subactions: Array<ActionDescriptorInst<Item>>): this;
|
|
122
|
-
copyFieldsTo(descriptor: ActionDescriptorInst<Item, Service,
|
|
123
|
-
copy(): ActionDescriptorInst<Item, Service,
|
|
124
|
-
}
|
|
125
|
-
export declare class ActionDeleteDescriptorInst<Item, Service = any> extends ActionDescriptorInst<Item, Service> {
|
|
126
|
-
static readonly ACTION_NAME = "delete";
|
|
127
|
-
constructor(model: ModelDescriptor<Item>, cfg?: ActionDescriptorCreateOptsProviderType<Item, Service>);
|
|
128
|
-
copy(): ActionDeleteDescriptorInst<Item, Service>;
|
|
114
|
+
withSubactions(...subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>>): this;
|
|
115
|
+
copyFieldsTo(descriptor: ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>;
|
|
116
|
+
copy(): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>;
|
|
129
117
|
}
|
|
118
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
2
|
+
import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
|
|
3
|
+
import { ActionPositionEnum } from '../models/action.type';
|
|
4
|
+
import { ActionProviderType } from './action-descriptor.factory';
|
|
5
|
+
import { ActionDescriptorInst } from './action.descriptor';
|
|
6
|
+
/**
|
|
7
|
+
* Defines an action to be positioned on a specified editor with editor-specific execution context.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} actionName - The name identifying the action to be performed.
|
|
10
|
+
* @param {EditorDescriptorInst<EditorModel>} editor - The descriptor of the editor on which the action will be placed and executed.
|
|
11
|
+
* @param {Object} [opts] - Options for configuring the action behavior.
|
|
12
|
+
* @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.
|
|
13
|
+
* @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.
|
|
14
|
+
* @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The position of action on editor.
|
|
15
|
+
* @return {ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>} - An instance representing the configured action descriptor for the specified editor and model.
|
|
16
|
+
*/
|
|
17
|
+
export declare function actionOnEditor<Model, EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel>, opts?: {
|
|
18
|
+
model?: ModelDescriptor<Model>;
|
|
19
|
+
serviceProvider?: ActionProviderType<Model, Service>;
|
|
20
|
+
position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;
|
|
21
|
+
}): ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
2
|
+
import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
|
|
3
|
+
import { ActionPositionEnum } from '../models/action.type';
|
|
4
|
+
import { ActionEditorProviderType } from './action-editor-descriptor.factory';
|
|
5
|
+
import { ActionEditorDescriptorInst } from './action-editor.descriptor';
|
|
6
|
+
/**
|
|
7
|
+
* Creates and returns an instance of `ActionEditorDescriptorInst` when positioned on another (parent) editor.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} actionName - The name of the action associated with the editor.
|
|
10
|
+
* @param {EditorDescriptorInst<EditorModel, ParentEditor>} editor - The editor descriptor defining editor on action.
|
|
11
|
+
* @param {Object} [opts] - Optional parameters for configuring the action editor.
|
|
12
|
+
* @param {ModelDescriptor<Model>} [opts.model] - The descriptor for the model associated with the action.
|
|
13
|
+
* @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for the action editor.
|
|
14
|
+
* @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The desired position of action on the editor.
|
|
15
|
+
* @return {ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>} A configured instance of `ActionEditorDescriptorInst` representing the action editor.
|
|
16
|
+
*/
|
|
17
|
+
export declare function actionEditorOnEditor<EditorModel, ParentEditor, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, ParentEditor>, opts?: {
|
|
18
|
+
model?: ModelDescriptor<Model>;
|
|
19
|
+
serviceProvider?: ActionEditorProviderType<Model, Service>;
|
|
20
|
+
position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;
|
|
21
|
+
}): ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
2
|
+
import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
3
|
+
import { ActionPositionEnum } from '../models/action.type';
|
|
4
|
+
import { ActionProviderType } from './action-descriptor.factory';
|
|
5
|
+
import { ActionDescriptorInst } from './action.descriptor';
|
|
6
|
+
/**
|
|
7
|
+
* Defines an action to be positioned on a specified table with table row execution context.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} actionName - The name identifying the action to be performed.
|
|
10
|
+
* @param {TableDescriptorInst<TableModel, any, any>} table - The descriptor of the table on which the action will be placed and executed.
|
|
11
|
+
* @param {Object} [opts] - Options for configuring the action behavior.
|
|
12
|
+
* @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.
|
|
13
|
+
* @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.
|
|
14
|
+
* @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position of action on table.
|
|
15
|
+
* @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table row and model.
|
|
16
|
+
*/
|
|
17
|
+
export declare function actionOnTableRow<Model, TableModel, Service = undefined>(actionName: string, table: TableDescriptorInst<TableModel, any, any>, opts?: {
|
|
18
|
+
model?: ModelDescriptor<Model>;
|
|
19
|
+
serviceProvider?: ActionProviderType<Model, Service>;
|
|
20
|
+
position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;
|
|
21
|
+
}): ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>;
|
|
22
|
+
/**
|
|
23
|
+
* Defines an action to be positioned on a specified table with table header or footer execution context.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} actionName - The name identifying the action to be performed.
|
|
26
|
+
* @param {Object} [opts] - Options for configuring the action behavior.
|
|
27
|
+
* @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.
|
|
28
|
+
* @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.
|
|
29
|
+
* @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of action on table.
|
|
30
|
+
* @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table top and model.
|
|
31
|
+
*/
|
|
32
|
+
export declare function actionOnTableTop<Model, Service = undefined>(actionName: string, opts?: {
|
|
33
|
+
model?: ModelDescriptor<Model>;
|
|
34
|
+
serviceProvider?: ActionProviderType<Model, Service>;
|
|
35
|
+
position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;
|
|
36
|
+
}): ActionDescriptorInst<Model, Service, undefined, Model, undefined>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ModelDescriptor } from '@mediusinc/mng-commons/model';
|
|
2
|
+
import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
3
|
+
import { EditorDescriptorInst } from '../../editor/descriptors/editor.descriptor';
|
|
4
|
+
import { ActionPositionEnum } from '../models/action.type';
|
|
5
|
+
import { ActionEditorProviderType } from './action-editor-descriptor.factory';
|
|
6
|
+
import { ActionEditorDescriptorInst } from './action-editor.descriptor';
|
|
7
|
+
/**
|
|
8
|
+
* Creates and returns an ActionEditorDescriptorInst for displaying editor action on table row.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} actionName - The name of the action.
|
|
11
|
+
* @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.
|
|
12
|
+
* @param {TableDescriptorInst<TableModel, any, any>} table - The table descriptor instance representing the table on which the action is positioned.
|
|
13
|
+
* @param {Object} [opts] - Optional configurations for the action editor.
|
|
14
|
+
* @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.
|
|
15
|
+
* @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.
|
|
16
|
+
* @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position where the action should be displayed on the table row.
|
|
17
|
+
* @return {ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>} The configured action editor descriptor instance.
|
|
18
|
+
*/
|
|
19
|
+
export declare function actionEditorOnTableRow<EditorModel, TableModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, any>, table: TableDescriptorInst<TableModel, any, any>, opts?: {
|
|
20
|
+
model?: ModelDescriptor<Model>;
|
|
21
|
+
serviceProvider?: ActionEditorProviderType<Model, Service>;
|
|
22
|
+
position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;
|
|
23
|
+
}): ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>;
|
|
24
|
+
/**
|
|
25
|
+
* Creates and returns an action editor descriptor configured with the given parameters.
|
|
26
|
+
* This is used to define an action editor positioned relative to a table.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} actionName - The name of the action.
|
|
29
|
+
* @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.
|
|
30
|
+
* @param {Object} [opts] - Optional configurations for the action editor.
|
|
31
|
+
* @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.
|
|
32
|
+
* @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.
|
|
33
|
+
* @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of the action on the table.
|
|
34
|
+
* @return {ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>} The configured action editor descriptor instance.
|
|
35
|
+
*/
|
|
36
|
+
export declare function actionEditorOnTableTop<EditorModel, Model = EditorModel, Service = undefined>(actionName: string, editor: EditorDescriptorInst<EditorModel, any>, opts?: {
|
|
37
|
+
model?: ModelDescriptor<Model>;
|
|
38
|
+
serviceProvider?: ActionEditorProviderType<Model, Service>;
|
|
39
|
+
position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;
|
|
40
|
+
}): ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { DataListResult, IDataProvider } from '@mediusinc/mng-commons/core';
|
|
3
|
+
import { DataListResult, IDataProvider, Nullable } from '@mediusinc/mng-commons/core';
|
|
4
4
|
import { IActionContext } from '../models/execution/action-context.model';
|
|
5
|
-
export declare function runFnFromDataProviderOrFallback<Item, Service, Return, FallbackReturn = Return>(ctx: IActionContext<Item, Service>, fn: (ctx: IActionContext<Item, Service>) => Observable<Return> | null, fallback: Observable<FallbackReturn>): Observable<Return | FallbackReturn>;
|
|
6
|
-
export declare function runFnFromDataProviderOrFail<Item, Service, Return>(ctx: IActionContext<Item, Service>, fn: (ctx: IActionContext<Item, Service>) => Observable<Return> | null): Observable<Return>;
|
|
7
|
-
export declare function runGetAllFromDataProvider<Item, Service>(ctx: IActionContext<Item, Service>): Observable<DataListResult<Item>> | null;
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export declare function runFnFromDataProviderOrFallback<Item, ParameterItem, Service, Return, FallbackReturn = Return>(ctx: IActionContext<Item, ParameterItem, Service>, fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null, fallback: Observable<FallbackReturn>): Observable<Return | FallbackReturn>;
|
|
6
|
+
export declare function runFnFromDataProviderOrFail<Item, ParameterItem, Service, Return>(ctx: IActionContext<Item, ParameterItem, Service>, fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null): Observable<Return>;
|
|
7
|
+
export declare function runGetAllFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null;
|
|
8
|
+
export type RunFetchFromDataProviderOptsType = {
|
|
9
|
+
strict?: boolean;
|
|
10
|
+
reason?: RunFetchFromDataProviderReasonType;
|
|
11
|
+
};
|
|
12
|
+
export type RunFetchFromDataProviderReasonType = 'create' | 'update' | 'fetch';
|
|
13
|
+
export declare function runFetchFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, opts?: RunFetchFromDataProviderOptsType): Observable<Item> | null;
|
|
14
|
+
export declare function runCreateFromDataProvider<Item, ParameterItem, Service>(ctx: IActionContext<Item, ParameterItem, Service>): Observable<Nullable<Item>> | null;
|
|
15
|
+
export declare function runUpdateFromDataProvider<Item, ParameterItem, service>(ctx: IActionContext<Item, ParameterItem, service>): Observable<Nullable<Item>> | null;
|
|
16
|
+
export declare function runDeleteFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null;
|
|
12
17
|
/**
|
|
13
18
|
* Gets service instance of data provider.
|
|
14
19
|
*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Confirmation } from 'primeng/api';
|
|
2
|
+
import { IActionButtonDescriptor } from '@mediusinc/mng-commons/form/api';
|
|
3
|
+
import { IActionContext } from './execution/action-context.model';
|
|
4
|
+
export interface ActionConfirmation<Model> {
|
|
5
|
+
icon?: string | null;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
message?: string | null;
|
|
8
|
+
acceptButton?: IActionButtonDescriptor;
|
|
9
|
+
rejectButton?: IActionButtonDescriptor | false;
|
|
10
|
+
closeOnEscape?: boolean;
|
|
11
|
+
closable?: boolean;
|
|
12
|
+
configMapFn?: ConfigurationConfigMapFn<Model>;
|
|
13
|
+
}
|
|
14
|
+
export type ConfigurationConfigMapFn<Item> = (ctx: IActionContext<any, Item, any>, confirmConfig: Confirmation) => Confirmation;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ItemOrObservable, Nullable } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { ActionContextValidation } from './execution/action-context-validation.model';
|
|
3
3
|
import { IActionContext } from './execution/action-context.model';
|
|
4
|
-
export type ActionRunFnType<Item, Service = undefined, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionContext<Item, Service>) => Return;
|
|
5
|
-
export type ActionValidationFnType<Item, Service = undefined, Return = ItemOrObservable<boolean>> = (ctx: ActionContextValidation<Item, Service>) => Return;
|
|
4
|
+
export type ActionRunFnType<Item, Service = undefined, InputItem = Item, ReturnItem = Item, Return = ItemOrObservable<Nullable<ReturnItem>>> = (ctx: IActionContext<Item, InputItem, Service>) => Return;
|
|
5
|
+
export type ActionValidationFnType<Item, Service = undefined, InputItem = Item, Return = ItemOrObservable<boolean>> = (ctx: ActionContextValidation<Item, InputItem, Service>) => Return;
|
|
6
|
+
export type ActionNotificationType = {
|
|
7
|
+
title?: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
};
|
|
@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
|
|
|
2
2
|
import { ACommonsErrorBase, CommonsErrorBaseOptions, ICommonsActionError } from '@mediusinc/mng-commons/core';
|
|
3
3
|
import { IActionContext } from './execution/action-context.model';
|
|
4
4
|
export interface CommonsActionErrorOptions extends CommonsErrorBaseOptions {
|
|
5
|
-
actionContext?: IActionContext<any, any>;
|
|
5
|
+
actionContext?: IActionContext<any, any, any>;
|
|
6
6
|
httpError?: HttpErrorResponse;
|
|
7
7
|
}
|
|
8
8
|
export declare class CommonsActionError extends ACommonsErrorBase implements ICommonsActionError {
|
|
@@ -3,9 +3,9 @@ import { ActionDescriptorInst } from '../../descriptors/action.descriptor';
|
|
|
3
3
|
/**
|
|
4
4
|
* Class containing all main data for action validations (enabled/visible) to be executed in validation states.
|
|
5
5
|
*/
|
|
6
|
-
export interface ActionContextValidation<Item, Service = undefined> {
|
|
6
|
+
export interface ActionContextValidation<Item, ParametersItem, Service = undefined> {
|
|
7
7
|
descriptor: ActionDescriptorInst<Item, Service>;
|
|
8
|
-
parameters: ActionParameters<
|
|
8
|
+
parameters: ActionParameters<ParametersItem>;
|
|
9
9
|
serviceInstance: Service;
|
|
10
10
|
dataProvider?: IDataProvider<Item, Service>;
|
|
11
11
|
}
|
|
@@ -7,10 +7,10 @@ import { IViewContainer } from './view-container.model';
|
|
|
7
7
|
/**
|
|
8
8
|
* Class containing all main data for action to be executed in run/fetch/submit states.
|
|
9
9
|
*/
|
|
10
|
-
export interface IActionContext<Item, Service = undefined, Instance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>, ViewContainer extends IViewContainer<Item, Service, Instance> = IViewContainer<Item, Service, Instance>> {
|
|
10
|
+
export interface IActionContext<Item, ParametersItem, Service = undefined, Instance extends IActionInstance<Item, Service> = IActionInstance<Item, Service>, ViewContainer extends IViewContainer<Item, Service, Instance> = IViewContainer<Item, Service, Instance>> {
|
|
11
11
|
contextLongName: string;
|
|
12
12
|
instance: Instance;
|
|
13
|
-
parameters: ActionParameters<
|
|
13
|
+
parameters: ActionParameters<ParametersItem>;
|
|
14
14
|
functionName: 'run' | 'fetch' | 'submit';
|
|
15
15
|
serviceInstance: Service;
|
|
16
16
|
dataProvider?: IDataProvider<Item, Service>;
|
|
@@ -8,7 +8,7 @@ import { ActionInstanceStateEnum } from './action-instance-state.model';
|
|
|
8
8
|
export interface IActionInstance<Item, Service> {
|
|
9
9
|
instanceId: string;
|
|
10
10
|
instanceLongName: string;
|
|
11
|
-
action: ActionDescriptorInst<Item>;
|
|
11
|
+
action: ActionDescriptorInst<Item, any, any, any, any>;
|
|
12
12
|
createdDate: Date;
|
|
13
13
|
triggerParameters?: ActionParameters<Item>;
|
|
14
14
|
activationParameters?: ActionParameters<Item>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Default categories for tableview actions
|
|
3
3
|
*/
|
|
4
4
|
export declare class TableviewActionDefaultCategories {
|
|
5
|
-
static readonly READ = "
|
|
6
|
-
static readonly ADD = "
|
|
7
|
-
static readonly EDIT = "
|
|
8
|
-
static readonly DELETE = "
|
|
9
|
-
static readonly DETAILS = "
|
|
5
|
+
static readonly READ = "_defaultTwRead";
|
|
6
|
+
static readonly ADD = "_defaultTwAdd";
|
|
7
|
+
static readonly EDIT = "_defaultTwEdit";
|
|
8
|
+
static readonly DELETE = "_defaultTwDelete";
|
|
9
|
+
static readonly DETAILS = "_defaultTwDetails";
|
|
10
10
|
}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { DataListResult, IDataProvider, Nullable } from '@mediusinc/mng-commons/core';
|
|
4
|
+
import { RunFetchFromDataProviderReasonType } from '../helpers/data-provider-executors';
|
|
4
5
|
import { IActionContext } from '../models/execution/action-context.model';
|
|
5
6
|
export declare abstract class DataProviderExecutor {
|
|
6
|
-
runGetAllOrFail<Item, Service>(ctx: IActionContext<Item, Service>): Observable<DataListResult<Item>>;
|
|
7
|
-
abstract runGetAll<Item, Service>(ctx: IActionContext<Item, Service>): Observable<DataListResult<Item>> | null;
|
|
8
|
-
abstract runGetAll<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<DataListResult<Item>>): Observable<DataListResult<Item>>;
|
|
9
|
-
abstract runGetAll<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<DataListResult<Item>> | null;
|
|
10
|
-
abstract runGetAll<Item, Service>(ctx: IActionContext<Item, Service>, fallback?: Observable<DataListResult<Item>>): Observable<DataListResult<Item>> | null;
|
|
11
|
-
runFetchOrFail<Item, Service>(ctx: IActionContext<Item, Service
|
|
12
|
-
abstract runFetch<Item, Service>(ctx: IActionContext<Item, Service
|
|
13
|
-
abstract runFetch<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
14
|
-
abstract runFetch<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
15
|
-
abstract runFetch<Item, Service>(ctx: IActionContext<Item, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
16
|
-
runCreateOrFail<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item>;
|
|
17
|
-
abstract runCreate<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
|
|
18
|
-
abstract runCreate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
19
|
-
abstract runCreate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
20
|
-
abstract runCreate<Item, Service>(ctx: IActionContext<Item, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
21
|
-
runUpdateOrFail<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item>;
|
|
22
|
-
abstract runUpdate<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item> | null;
|
|
23
|
-
abstract runUpdate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
24
|
-
abstract runUpdate<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
25
|
-
abstract runUpdate<Item, Service>(ctx: IActionContext<Item, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
26
|
-
runDeleteOrFail<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Item | null>;
|
|
27
|
-
abstract runDelete<Item, Service>(ctx: IActionContext<Item, Service>): Observable<Nullable<Item>> | null;
|
|
28
|
-
abstract runDelete<Item, Service>(ctx: IActionContext<Item, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
29
|
-
abstract runDelete<Item, Service>(ctx: IActionContext<Item, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
30
|
-
abstract runDelete<Item, Service>(ctx: IActionContext<Item, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
7
|
+
runGetAllOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>>;
|
|
8
|
+
abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null;
|
|
9
|
+
abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<DataListResult<Item>>): Observable<DataListResult<Item>>;
|
|
10
|
+
abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<DataListResult<Item>> | null;
|
|
11
|
+
abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback?: Observable<DataListResult<Item>>): Observable<DataListResult<Item>> | null;
|
|
12
|
+
runFetchOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason?: RunFetchFromDataProviderReasonType): Observable<Item>;
|
|
13
|
+
abstract runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason?: RunFetchFromDataProviderReasonType): Observable<Item> | null;
|
|
14
|
+
abstract runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason: RunFetchFromDataProviderReasonType | undefined, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
15
|
+
abstract runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason: RunFetchFromDataProviderReasonType | undefined, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
16
|
+
abstract runFetch<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason: RunFetchFromDataProviderReasonType | undefined, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
17
|
+
runCreateOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item>;
|
|
18
|
+
abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;
|
|
19
|
+
abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
20
|
+
abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
21
|
+
abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
22
|
+
runUpdateOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item>;
|
|
23
|
+
abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;
|
|
24
|
+
abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
25
|
+
abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
26
|
+
abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
27
|
+
runDeleteOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item | null>;
|
|
28
|
+
abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null;
|
|
29
|
+
abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;
|
|
30
|
+
abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;
|
|
31
|
+
abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback?: Observable<Nullable<Item>>): Observable<Nullable<Item>> | null;
|
|
31
32
|
/**
|
|
32
33
|
* Gets service instance of data provider.
|
|
33
34
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @mediusinc/mng-commons/tableview/api
|
|
2
|
+
|
|
3
|
+
Secondary entry point of `@mediusinc/mng-commons`. It can be used by importing from `@mediusinc/mng-commons/tableview/api/class`.
|
|
4
|
+
|
|
5
|
+
## Dependencies within commons
|
|
6
|
+
|
|
7
|
+
- `@mediusinc/mng-commons/core`
|
|
8
|
+
- `@mediusinc/mng-commons/model`
|
|
9
|
+
- `@mediusinc/mng-commons/model/class`
|
|
10
|
+
- `@mediusinc/mng-commons/filter`
|
|
11
|
+
- `@mediusinc/mng-commons/form/api`
|
|
12
|
+
- `@mediusinc/mng-commons/table/api`
|
|
13
|
+
- `@mediusinc/mng-commons/tableview/api`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClassAttributeDef, ClassType } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { ColumnDisplayTypeEnum, ColumnTypeEnum } from '@mediusinc/mng-commons/table/api';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { FieldInputTypeEnum } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
+
import { EditorClassAttributeDef } from './class-editor-attribute.model';
|
|
5
5
|
/**
|
|
6
6
|
* converts string type to type enum, default is text
|
|
7
7
|
* @param attributeType
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClassAttributeDef, ClassType, EnumType } from '@mediusinc/mng-commons/core';
|
|
2
|
-
import { FieldInputTypeEnum } from '
|
|
2
|
+
import { FieldInputTypeEnum } from '@mediusinc/mng-commons/tableview/api';
|
|
3
3
|
export interface EditorClassAttributeDef extends ClassAttributeDef {
|
|
4
4
|
classType?: ClassType<any>;
|
|
5
5
|
fieldType?: FieldInputTypeEnum;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ClassType, ServiceClassType } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { EditorDataProviderInst } from '@mediusinc/mng-commons/tableview/api';
|
|
3
|
+
export declare function editorDataProviderFromClass<Model>(type: ClassType<Model>): EditorDataProviderInst<Model, undefined, undefined>;
|
|
4
|
+
export declare function editorDataProviderFromClass<Model, Service = any>(type: ClassType<Model>, serviceType: ServiceClassType<Service>): EditorDataProviderInst<Model, Service, ServiceClassType<Service>>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { ILookupDataProvider } from '@mediusinc/mng-commons/core';
|
|
2
2
|
import { EnumDescriptor } from '@mediusinc/mng-commons/model';
|
|
3
|
-
import { EditorDescriptorInst } from '
|
|
4
|
-
import {
|
|
5
|
-
import { FieldLookupDescriptor } from '../descriptors/field-lookup.descriptor';
|
|
6
|
-
import { EditorClassAttributeDef } from '../models/class-tableview-attribute.model';
|
|
7
|
-
import { FieldInputTypeEnum } from '../models/field.model';
|
|
3
|
+
import { AFieldDescriptor, EditorDescriptorInst, FieldInputTypeEnum, FieldLookupDescriptor } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
+
import { EditorClassAttributeDef } from './class-editor-attribute.model';
|
|
8
5
|
/**
|
|
9
6
|
* Generates field based on attribute definition, used for auto model
|
|
10
7
|
* @param descriptor Editor descriptor instance.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClassType } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { EditorDescriptorCreateOptsType, EditorDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
3
|
+
import { EditorClassAttributeDef } from './class-editor-attribute.model';
|
|
4
|
+
export declare function editorDescriptorFromClass<EditorModel, ParentEditorModel = undefined>(type: ClassType<EditorModel>, opts?: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>): EditorDescriptorInst<EditorModel, ParentEditorModel>;
|
|
5
|
+
/**
|
|
6
|
+
* Generates descriptor based on type attribute definition
|
|
7
|
+
* @param type class type
|
|
8
|
+
* @param attributes
|
|
9
|
+
* @param opts
|
|
10
|
+
*/
|
|
11
|
+
export declare function editorDescriptorFromClassAttrsDef<EditorModel, ParentEditorModel = undefined>(type: ClassType<EditorModel>, attributes?: EditorClassAttributeDef[], opts?: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>): EditorDescriptorInst<EditorModel, ParentEditorModel>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './editor/class-editor-attribute.model';
|
|
2
|
+
export * from './editor/class-editor-attribute-converter';
|
|
3
|
+
export * from './editor/class-editor-data-provider.factory';
|
|
4
|
+
export * from './editor/class-editor-descriptor.factory';
|
|
5
|
+
export * from './editor/class-editor-descriptor-helpers';
|
|
6
|
+
export * from './tableview/class-tableview-attribute.model';
|
|
7
|
+
export * from './tableview/class-tableview-attribute-converter';
|
|
8
|
+
export * from './tableview/class-tableview-descriptor.factory';
|
|
9
|
+
export * from './tableview/class-tableview-descriptor-helpers';
|
|
10
|
+
export * from './tableview/class-tableview-data-provider.factory';
|