@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,6 +1,9 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ClassFunctionKeyParam1ObjKeyExtendsOfTargetType, ClassFunctionKeysWithParamAndReturnType, IDataProvider, IdType, Nullable } from '@mediusinc/mng-commons/core';
|
|
4
|
+
import { ActionEditorDescriptorInst } from '../../action/descriptors/action-editor.descriptor';
|
|
3
5
|
import { ActionDescriptorInst } from '../../action/descriptors/action.descriptor';
|
|
6
|
+
import { EditorDataProviderFetchMapToFnType } from '../../editor/data-providers/editor.data-provider';
|
|
4
7
|
import { TableviewDescriptorInst } from '../descriptors/tableview.descriptor';
|
|
5
8
|
import { TableviewInput } from '../models/tableview-input.model';
|
|
6
9
|
import { TableviewDefaultActionsEnum } from './tableview-default-actions';
|
|
@@ -9,7 +12,7 @@ export type TvBuilderSetterParamsType<Descriptor, DataProvider> = {
|
|
|
9
12
|
dataProvider: DataProvider;
|
|
10
13
|
injector: Injector;
|
|
11
14
|
};
|
|
12
|
-
export type TvBuilderActionSetterFnType<ActionModel, ActionService, Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => Nullable<ActionDescriptorInst<ActionModel, ActionService>>;
|
|
15
|
+
export type TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ValidationInput, Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => Nullable<ActionDescriptorInst<ActionModel, ActionService, ActionInput, ActionResult, ValidationInput> | ActionEditorDescriptorInst<ActionModel, ActionService, any, ActionInput, ActionResult, ValidationInput>>;
|
|
13
16
|
export type TvBuilderDescriptorSetterFnType<Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => Descriptor;
|
|
14
17
|
export type TvBuilderDataProviderSetterFnType<Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => DataProvider;
|
|
15
18
|
/**
|
|
@@ -24,7 +27,7 @@ export type TvBuilderDataProviderSetterFnType<Descriptor, DataProvider> = (param
|
|
|
24
27
|
* @typeparam Sorts - The sort type representing available sort keys.
|
|
25
28
|
* @typeparam Filters - The filter type representing available filter keys.
|
|
26
29
|
*/
|
|
27
|
-
export declare class TableviewInputBuilder<Model, Service, Descriptor extends TableviewDescriptorInst<Model, Sorts, Filters>, DataProvider extends IDataProvider<Model, Service>, Sorts = keyof Model, Filters extends keyof any = keyof Model> {
|
|
30
|
+
export declare class TableviewInputBuilder<Model, Service, Descriptor extends TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>, DataProvider extends IDataProvider<Model, Service>, Sorts = keyof Model, Filters extends keyof any = keyof Model, TableModel = Model, AddModel = Model, EditModel = Model, FieldsModel = Model> {
|
|
28
31
|
private _descriptor;
|
|
29
32
|
private _dataProvider;
|
|
30
33
|
private readonly injector;
|
|
@@ -67,6 +70,41 @@ export declare class TableviewInputBuilder<Model, Service, Descriptor extends Ta
|
|
|
67
70
|
* @returns {this} - Returns the current instance of the builder.
|
|
68
71
|
*/
|
|
69
72
|
withAdjust(adjustFn: (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => void): this;
|
|
73
|
+
/**
|
|
74
|
+
* Associates a fetch function for a data provider API service with the specified parameters.
|
|
75
|
+
*
|
|
76
|
+
* @param {ServiceFn} serviceFn The function from the service class that performs the fetch API call.
|
|
77
|
+
* Must be a key of the service with a parameter and return an Observable.
|
|
78
|
+
* @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} fnItemIdParamName The parameter name for itemId used as the key within the request object of fetch function on API service.
|
|
79
|
+
*/
|
|
80
|
+
withDataServiceFetchFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<Model>>>(serviceFn: ServiceFn, itemIdParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>): this;
|
|
81
|
+
/**
|
|
82
|
+
* Associates a create function for a data provider API service with the specified parameters.
|
|
83
|
+
*
|
|
84
|
+
* @param {ServiceFn} serviceFn The function from the service class that performs the create API call.
|
|
85
|
+
* Must be a key of the service with a parameter and return an Observable.
|
|
86
|
+
* @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, Undefined<EditModel>>} serviceFnItemParamName The parameter name for item used as the key within the request object of create function on API service.
|
|
87
|
+
* @param {EditorDataProviderFetchMapToFnType<Model, AddModel>} [mapFetchItem] Map function to transform model from fetch to form's add model.
|
|
88
|
+
*/
|
|
89
|
+
withDataServiceCreateFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(serviceFn: ServiceFn, serviceFnItemParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, AddModel>, mapFetchItem?: EditorDataProviderFetchMapToFnType<Model, AddModel>): this;
|
|
90
|
+
/**
|
|
91
|
+
* Associates an update function for a data provider API service with the specified parameters.
|
|
92
|
+
*
|
|
93
|
+
* @param {ServiceFn} serviceFn The function from the service class that performs the update API call.
|
|
94
|
+
* Must be a key of the service with a parameter and return an Observable.
|
|
95
|
+
* @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, Undefined<EditModel>>} fnItemParamName The parameter name for item used as the key within the request object of update function on API service.
|
|
96
|
+
* @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} [fnItemIdParamName] The parameter name for itemId used as the key within the request object of update function on API service.
|
|
97
|
+
* @param {EditorDataProviderFetchMapToFnType<Model, EditModel>} [mapFetchItem] Map function to transform model from fetch to form' edit model.
|
|
98
|
+
*/
|
|
99
|
+
withDataServiceUpdateFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(serviceFn: ServiceFn, fnItemParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, EditModel>, fnItemIdParamName?: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>, mapFetchItem?: EditorDataProviderFetchMapToFnType<Model, EditModel>): this;
|
|
100
|
+
/**
|
|
101
|
+
* Associates a delete function for a data provider API service with the specified parameters.
|
|
102
|
+
*
|
|
103
|
+
* @param {ServiceFn} serviceFn The function from the service class that performs the delete API call.
|
|
104
|
+
* Must be a key of the service with a parameter and return an Observable.
|
|
105
|
+
* @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} fnItemIdParamName The parameter name for itemId used as the key within the request object of delete function on API service.
|
|
106
|
+
*/
|
|
107
|
+
withDataServiceDeleteFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(serviceFn: ServiceFn, fnItemIdParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>): this;
|
|
70
108
|
/**
|
|
71
109
|
* Removes all the default tableview actions.
|
|
72
110
|
*
|
|
@@ -91,24 +129,64 @@ export declare class TableviewInputBuilder<Model, Service, Descriptor extends Ta
|
|
|
91
129
|
* Overrides the default action.
|
|
92
130
|
*
|
|
93
131
|
* @param {TableviewDefaultActionsEnum} type - The default actions to override.
|
|
94
|
-
* @param {TvBuilderActionSetterFnType<Model, ActionService, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
132
|
+
* @param {TvBuilderActionSetterFnType<Model, ActionService , ActionRunInput, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
95
133
|
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
96
134
|
* @returns {this} - Returns the current instance of the builder.
|
|
97
135
|
*/
|
|
98
|
-
withDefaultActionOverride<ActionService = Service>(type: TableviewDefaultActionsEnum, fn: TvBuilderActionSetterFnType<Model, ActionService, Descriptor, DataProvider>): this;
|
|
136
|
+
withDefaultActionOverride<ActionService = Service, ActionRunInput = Model, ActionRunResult = Model, ValidationInput = Model>(type: TableviewDefaultActionsEnum, fn: TvBuilderActionSetterFnType<Model, ActionService, ActionRunInput, ActionRunResult, ValidationInput, Descriptor, DataProvider>): this;
|
|
99
137
|
/**
|
|
100
138
|
* Adds a custom action.
|
|
101
139
|
*
|
|
102
|
-
* @
|
|
140
|
+
* @deprecated Use on of {withActionOnTable}, {withActionOnDetailsEditor}, {withActionOnEditEditor} or {withActionOnAddEditor} instead.
|
|
141
|
+
*
|
|
142
|
+
* @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunInput, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
143
|
+
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
144
|
+
* @returns {this} - Returns the current instance of the builder.
|
|
145
|
+
*/
|
|
146
|
+
withAction<ActionModel = Model, ActionService = Service, ActionRunInput = Model, ActionRunResult = Model, ValidationInput = Model>(fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionRunInput, ActionRunResult, ValidationInput, Descriptor, DataProvider>): this;
|
|
147
|
+
/**
|
|
148
|
+
* Adds a custom action on table row or top (header or toolbar).
|
|
149
|
+
*
|
|
150
|
+
* @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
151
|
+
* @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
103
152
|
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
104
153
|
* @returns {this} - Returns the current instance of the builder.
|
|
105
154
|
*/
|
|
106
|
-
|
|
155
|
+
withActionOnTable<ActionModel = Model, ActionService = Service, ActionInput extends TableModel | undefined = TableModel, ActionRunResult = Model>(fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionRunResult, ActionInput, Descriptor, DataProvider>): this;
|
|
107
156
|
/**
|
|
157
|
+
* Adds a custom action on details editor.
|
|
158
|
+
*
|
|
159
|
+
* @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
160
|
+
* @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
161
|
+
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
162
|
+
* @returns {this} - Returns the current instance of the builder.
|
|
163
|
+
*/
|
|
164
|
+
withActionOnDetailsEditor<ActionModel = Model, ActionService = Service, ActionInput extends Model = Model, ActionResult = Model>(fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>): this;
|
|
165
|
+
/**
|
|
166
|
+
* Adds a custom action on edit editor.
|
|
167
|
+
*
|
|
168
|
+
* @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
169
|
+
* @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
170
|
+
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
171
|
+
* @returns {this} - Returns the current instance of the builder.
|
|
172
|
+
*/
|
|
173
|
+
withActionOnEditEditor<ActionModel = Model, ActionService = Service, ActionInput extends EditModel = EditModel, ActionResult = Model>(fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>): this;
|
|
174
|
+
/**
|
|
175
|
+
* Adds a custom action on add editor.
|
|
176
|
+
*
|
|
177
|
+
* @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
178
|
+
* @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.
|
|
179
|
+
* @typeParam ActionService - The service type (same as build `Service` by default).
|
|
180
|
+
* @returns {this} - Returns the current instance of the builder.
|
|
181
|
+
*/
|
|
182
|
+
withActionOnAddEditor<ActionModel = Model, ActionService = Service, ActionInput extends AddModel = AddModel, ActionResult = Model>(fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>): this;
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
*
|
|
108
186
|
* Builds and returns an instance of ITableview.
|
|
109
187
|
* DO NOT CALL this within tableview create callback function!
|
|
110
188
|
*
|
|
111
|
-
* @return {TableviewInput<Model, Service, Sorts, Filters, Descriptor, DataProvider>} - The built ITableview instance.
|
|
189
|
+
* @return {TableviewInput<Model, Service, Sorts, Filters, TableModel, AddModel, EditModel, Descriptor, DataProvider>} - The built ITableview instance.
|
|
112
190
|
*/
|
|
113
|
-
build(): TableviewInput<Model, Service, Sorts, Filters, Descriptor, DataProvider>;
|
|
191
|
+
build(): TableviewInput<Model, Service, Sorts, Filters, TableModel, AddModel, EditModel, Descriptor, DataProvider>;
|
|
114
192
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommonPropsObjType3 } from '@mediusinc/mng-commons/core';
|
|
2
|
+
/**
|
|
3
|
+
* Helper type for cases when you need to custom define FieldsManageModel on TableviewDescriptorInst from only one model (single model).
|
|
4
|
+
*/
|
|
5
|
+
export type TableviewDescriptorFieldsManageSingleType<TableviewModel> = CommonPropsObjType3<TableviewModel, TableviewModel, TableviewModel>;
|
|
6
|
+
/**
|
|
7
|
+
* Helper type for cases when you need to custom define FieldsManageModel on TableviewDescriptorInst from only 3 models (multi model).
|
|
8
|
+
*/
|
|
9
|
+
export type TableviewDescriptorFieldsManageMultiType<TableviewModel, AddModel, EditModel> = CommonPropsObjType3<TableviewModel, AddModel, EditModel>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TableviewDescriptorInst } from '../descriptors/tableview.descriptor';
|
|
2
|
+
export type TableviewDescriptorType<TableviewModel, Sorts = keyof TableviewModel, Filters = keyof TableviewModel, ParentEditorModel = undefined> = TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel, TableviewModel, TableviewModel, TableviewModel, TableviewModel>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionDescriptorInst } from '../../action/descriptors/action.descriptor';
|
|
2
2
|
import { ITableviewDataProvider } from '../data-providers/tableview.data-provider';
|
|
3
3
|
import { TableviewDescriptorInst } from '../descriptors/tableview.descriptor';
|
|
4
|
-
export interface TableviewInput<Model, Service, Sorts = keyof Model, Filters extends keyof any = keyof Model, Descriptor = TableviewDescriptorInst<Model, Sorts, Filters>, DataProvider = ITableviewDataProvider<Model, Service, Sorts, Filters>> {
|
|
4
|
+
export interface TableviewInput<Model, Service, Sorts = keyof Model, Filters extends keyof any = keyof Model, TableModel = Model, AddModel = Model, EditModel = Model, Descriptor = TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel>, DataProvider = ITableviewDataProvider<Model, Service, Sorts, Filters, any, TableModel, AddModel, EditModel>> {
|
|
5
5
|
descriptor: Descriptor;
|
|
6
6
|
dataProvider: DataProvider;
|
|
7
7
|
actions: ActionDescriptorInst<Model>[];
|
|
@@ -4,7 +4,7 @@ import { ITableviewDataProvider } from '../data-providers/tableview.data-provide
|
|
|
4
4
|
import { TableviewDescriptorInst } from '../descriptors/tableview.descriptor';
|
|
5
5
|
export interface TableviewRouteData extends CommonsRouteData {
|
|
6
6
|
tableview?: {
|
|
7
|
-
descriptor: TableviewDescriptorInst<any, any, any>;
|
|
7
|
+
descriptor: TableviewDescriptorInst<any, any, any, any>;
|
|
8
8
|
dataProvider: ITableviewDataProvider;
|
|
9
9
|
actions?: Array<ActionDescriptorInst<any>>;
|
|
10
10
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { KeyofAndOfType } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { TypeDescriptor } from '@mediusinc/mng-commons/model';
|
|
3
|
+
import { AFieldDescriptor, EditorDescriptorInst, EditorDescriptorNestedObjectWrapper, FieldLookupDescriptor, FieldLookupProviderType, TableviewDescriptorInst, TableviewDescriptorType } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
+
export declare function fieldProjectFieldToProperty<EditorModel, ParentEditorModel, ProjectedProp extends keyof EditorModel>(editor: EditorDescriptorInst<EditorModel, ParentEditorModel> | TableviewDescriptorType<EditorModel, any, any, ParentEditorModel> | TableviewDescriptorInst<any, any, any, ParentEditorModel, any, any, any, EditorModel>, field: AFieldDescriptor<NonNullable<EditorModel[ProjectedProp]>, EditorModel, EditorModel[ProjectedProp], ParentEditorModel>, property: ProjectedProp): AFieldDescriptor<NonNullable<EditorModel[ProjectedProp]>, EditorModel, EditorModel[ProjectedProp], ParentEditorModel>;
|
|
5
|
+
export declare function fieldProjectFieldToProperty<FieldModel, EditorModel, FieldValue, ParentEditorModel, ProjectedProp extends keyof EditorModel>(editor: EditorDescriptorInst<EditorModel, ParentEditorModel> | TableviewDescriptorType<EditorModel, any, any, ParentEditorModel> | TableviewDescriptorInst<any, any, any, ParentEditorModel, any, any, any, EditorModel>, field: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>, property: ProjectedProp, mapFn: (value: FieldValue) => EditorModel[ProjectedProp]): AFieldDescriptor<NonNullable<EditorModel[ProjectedProp]>, EditorModel, EditorModel[ProjectedProp], ParentEditorModel>;
|
|
6
|
+
export declare function fieldLookupWithOptionsValueProperty<Property extends keyof EditorModel, EditorModel, ParentEditorModel, Service, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, EditorModel[Property]>, FieldValue = EditorModel[Property]>(editor: EditorDescriptorInst<EditorModel, ParentEditorModel> | EditorDescriptorNestedObjectWrapper<any, ParentEditorModel, EditorModel> | TableviewDescriptorType<EditorModel, any, any, ParentEditorModel> | TableviewDescriptorInst<any, any, any, ParentEditorModel, any, any, any, EditorModel>, property: Property, opts: {
|
|
7
|
+
serviceProvider?: FieldLookupProviderType<LookupModel, Service>;
|
|
8
|
+
type?: TypeDescriptor<LookupModel>;
|
|
9
|
+
}, lookupOptionsValueProperty: LookupValueProperty): FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue, ParentEditorModel>;
|
package/tableview/index.d.ts
CHANGED
|
@@ -39,8 +39,9 @@ export * from './editor/components/formly/wrappers/formly-field-wrapper/formly-f
|
|
|
39
39
|
export * from './editor/helpers/editor-field';
|
|
40
40
|
export * from './editor/helpers/editor-formly';
|
|
41
41
|
export * from './editor/helpers/formly-config';
|
|
42
|
-
export * from './editor/helpers/notification';
|
|
43
42
|
export * from './editor/helpers/editor-validators';
|
|
43
|
+
export * from './editor/helpers/field-create';
|
|
44
|
+
export * from './editor/helpers/notification';
|
|
44
45
|
export * from './editor/models/editor-auto-save-preview.model';
|
|
45
46
|
export * from './editor/models/formly-config.model';
|
|
46
47
|
export * from './editor/services/form-editor.service';
|
package/tableview/provide.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
1
2
|
import { CommonsFeature } from '@mediusinc/mng-commons/core';
|
|
2
3
|
import { TableviewFeatureConfig } from './tableview/services/tableview-feature-config.token';
|
|
3
4
|
/**
|
|
@@ -6,3 +7,9 @@ import { TableviewFeatureConfig } from './tableview/services/tableview-feature-c
|
|
|
6
7
|
* @returns {CommonsFeature} The `CommonsFeature` object with the layout configuration.
|
|
7
8
|
*/
|
|
8
9
|
export declare function withTableview(config?: TableviewFeatureConfig): CommonsFeature;
|
|
10
|
+
/**
|
|
11
|
+
* Prepares providers for usage of the tableview functionalities.
|
|
12
|
+
*
|
|
13
|
+
* @returns {CommonsFeature} The `CommonsFeature` object with the layout configuration.
|
|
14
|
+
*/
|
|
15
|
+
export declare function provideTableviewChild(config?: TableviewFeatureConfig): Provider[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TableviewInput } from '@mediusinc/mng-commons/tableview/api';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class TableviewRouteComponent<Item, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> {
|
|
4
|
-
tableview: import("@angular/core").InputSignal<TableviewInput<Item, Service, Sorts, Filters,
|
|
4
|
+
tableview: import("@angular/core").InputSignal<TableviewInput<Item, Service, Sorts, Filters, any, any, any, any, any>>;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableviewRouteComponent<any, any, any, any>, never>;
|
|
6
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableviewRouteComponent<any, any, any, any>, "mng-tableview-route", never, { "tableview": { "alias": "tableview"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
7
|
}
|
|
@@ -6,12 +6,12 @@ import { ViewContainer } from '../../../action/services/view-container.service';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class TableviewComponent<Item = any, Service = undefined, Sorts = keyof Item, Filters extends keyof any = keyof Item> implements OnInit {
|
|
8
8
|
readonly viewContainer: ViewContainer<any, any> | null;
|
|
9
|
-
descriptor: import("@angular/core").InputSignal<TableviewDescriptorInst<Item, Sorts, Filters,
|
|
10
|
-
dataProvider: import("@angular/core").InputSignal<ITableviewDataProvider<Item, Service, Sorts, Filters> | undefined>;
|
|
11
|
-
actions: import("@angular/core").InputSignal<ActionDescriptorInst<any, any, any>[]>;
|
|
12
|
-
toolbarLeftActions: Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
13
|
-
toolbarRightActions: Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
14
|
-
tableActions: Signal<ActionDescriptorInst<Item, any, Item>[]>;
|
|
9
|
+
descriptor: import("@angular/core").InputSignal<TableviewDescriptorInst<Item, Sorts, Filters, any, any, any, any, any>>;
|
|
10
|
+
dataProvider: import("@angular/core").InputSignal<ITableviewDataProvider<Item, Service, Sorts, Filters, any, any, any, any> | undefined>;
|
|
11
|
+
actions: import("@angular/core").InputSignal<ActionDescriptorInst<any, any, any, any, any>[]>;
|
|
12
|
+
toolbarLeftActions: Signal<ActionDescriptorInst<Item, any, Item, Item, Item>[]>;
|
|
13
|
+
toolbarRightActions: Signal<ActionDescriptorInst<Item, any, Item, Item, Item>[]>;
|
|
14
|
+
tableActions: Signal<ActionDescriptorInst<Item, any, Item, Item, Item>[]>;
|
|
15
15
|
tableParams: import("@angular/core").WritableSignal<DataListParams<string, string> | undefined>;
|
|
16
16
|
hasItemSelectionAction: Signal<boolean>;
|
|
17
17
|
selectedItems: import("@angular/core").WritableSignal<Item[]>;
|
package/version-info.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "
|
|
4
|
-
"tag":
|
|
5
|
-
"distance":
|
|
6
|
-
"hash": "
|
|
3
|
+
"version": "6.0.0-rc.3",
|
|
4
|
+
"tag": null,
|
|
5
|
+
"distance": null,
|
|
6
|
+
"hash": "358b6fb",
|
|
7
7
|
"dirty": true,
|
|
8
|
-
"semver":
|
|
8
|
+
"semver": null,
|
|
9
9
|
"buildTimestamp": null,
|
|
10
|
-
"raw": "
|
|
10
|
+
"raw": "6.0.0-rc.3-358b6fb-dirty"
|
|
11
11
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CommonsService } from '../../../services/commons.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use ErrorPageComponent from layout instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ErrorPageComponent {
|
|
7
|
-
commons: CommonsService;
|
|
8
|
-
constructor(commons: CommonsService);
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorPageComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorPageComponent, "mng-error-page-deprecated", never, {}, {}, never, never, true, never>;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CommonsService } from '../../../services/commons.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use ErrorPageComponent from layout instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare class NotFoundPageComponent {
|
|
7
|
-
commons: CommonsService;
|
|
8
|
-
constructor(commons: CommonsService);
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotFoundPageComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NotFoundPageComponent, "mng-not-found-page-deprecated", never, {}, {}, never, never, true, never>;
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ClassType, ServiceClassType } from '../models/class-service.model';
|
|
2
|
-
import { DataProviderInst } from './base.data-provider';
|
|
3
|
-
export declare class DataProvider extends DataProviderInst<any> {
|
|
4
|
-
protected constructor();
|
|
5
|
-
static create<Model>(): DataProviderInst<Model>;
|
|
6
|
-
static fromClass<Model>(type: ClassType<Model>): DataProviderInst<Model, undefined, ClassType<Model>, undefined>;
|
|
7
|
-
static fromClassWithService<Model, Service>(type: ClassType<Model>, serviceType: ServiceClassType<Service>): DataProviderInst<Model, Service, ClassType<Model>, ServiceClassType<Service>>;
|
|
8
|
-
static fromService<Service, Model>(serviceType: ServiceClassType<Service>): DataProviderInst<Model, Service, undefined, ServiceClassType<Service>>;
|
|
9
|
-
}
|
|
10
|
-
export declare function dataProviderBase<Model>(): DataProviderInst<Model, undefined, undefined, undefined>;
|
|
11
|
-
export declare function dataProviderWithService<Service, Model>(serviceType: ServiceClassType<Service>): DataProviderInst<Model, Service, undefined, ServiceClassType<Service>>;
|
|
12
|
-
export declare function dataProviderFromClass<Model>(type: ClassType<Model>): DataProviderInst<Model, undefined, ClassType<Model>, undefined>;
|
|
13
|
-
export declare function dataProviderFromClass<Model, Service = any>(type: ClassType<Model>, serviceType: ServiceClassType<Service>): DataProviderInst<Model, Service, ClassType<Model>, ServiceClassType<Service>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { RouterLink } from '@angular/router';
|
|
3
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { ButtonModule } from 'primeng/button';
|
|
5
|
-
import { CommonsService } from '../../../services/commons.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "../../../services/commons.service";
|
|
8
|
-
import * as i2 from "primeng/button";
|
|
9
|
-
import * as i3 from "@ngx-translate/core";
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use ErrorPageComponent from layout instead.
|
|
12
|
-
*/
|
|
13
|
-
export class ErrorPageComponent {
|
|
14
|
-
constructor(commons) {
|
|
15
|
-
this.commons = commons;
|
|
16
|
-
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorPageComponent, deps: [{ token: i1.CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: ErrorPageComponent, isStandalone: true, selector: "mng-error-page-deprecated", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19
|
-
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorPageComponent, decorators: [{
|
|
21
|
-
type: Component,
|
|
22
|
-
args: [{ standalone: true, selector: 'mng-error-page-deprecated', imports: [ButtonModule, TranslateModule, RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
|
|
23
|
-
}], ctor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ICAgICAgICAgICAgPGltZyBbc3JjXT1cImNvbW1vbnMuYXBwTG9nb05hbWUoKVwiIGNsYXNzPVwiZXhjZXB0aW9uLWFwcG5hbWUgbWwtM1wiIGFsdD1cIkFwcCBuYW1lXCIgLz5cbiAgICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { RouterLink } from '@angular/router';
|
|
3
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { ButtonModule } from 'primeng/button';
|
|
5
|
-
import { CommonsService } from '../../../services/commons.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "../../../services/commons.service";
|
|
8
|
-
import * as i2 from "primeng/button";
|
|
9
|
-
import * as i3 from "@ngx-translate/core";
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use ErrorPageComponent from layout instead.
|
|
12
|
-
*/
|
|
13
|
-
export class NotFoundPageComponent {
|
|
14
|
-
constructor(commons) {
|
|
15
|
-
this.commons = commons;
|
|
16
|
-
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: NotFoundPageComponent, deps: [{ token: i1.CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: NotFoundPageComponent, isStandalone: true, selector: "mng-not-found-page-deprecated", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19
|
-
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: NotFoundPageComponent, decorators: [{
|
|
21
|
-
type: Component,
|
|
22
|
-
args: [{ standalone: true, selector: 'mng-not-found-page-deprecated', imports: [ButtonModule, RouterLink, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
|
|
23
|
-
}], ctorParameters: () => [{ type: i1.CommonsService }] });
|
|
24
|
-
//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109XCJjb21tb25zLmFwcExvZ28oKVwiIGNsYXNzPVwiZXhjZXB0aW9uLWxvZ29cIiBhbHQ9XCJBcHAgbG9nb1wiIC8+XG4gICAgICAgICAgICA8aW1nIFtzcmNdPVwiY29tbW9ucy5hcHBMb2dvTmFtZSgpXCIgY2xhc3M9XCJleGNlcHRpb24tYXBwbmFtZSBtbC0zXCIgYWx0PVwiQXBwIG5hbWVcIiAvPlxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { DataProviderInst } from './base.data-provider';
|
|
2
|
-
export class DataProvider extends DataProviderInst {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(undefined, undefined);
|
|
5
|
-
}
|
|
6
|
-
static create() {
|
|
7
|
-
return dataProviderBase();
|
|
8
|
-
}
|
|
9
|
-
static fromClass(type) {
|
|
10
|
-
return dataProviderFromClass(type);
|
|
11
|
-
}
|
|
12
|
-
static fromClassWithService(type, serviceType) {
|
|
13
|
-
return dataProviderFromClass(type, serviceType);
|
|
14
|
-
}
|
|
15
|
-
static fromService(serviceType) {
|
|
16
|
-
return dataProviderWithService(serviceType);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function dataProviderBase() {
|
|
20
|
-
return new DataProviderInst(undefined, undefined);
|
|
21
|
-
}
|
|
22
|
-
export function dataProviderWithService(serviceType) {
|
|
23
|
-
return new DataProviderInst(undefined, serviceType);
|
|
24
|
-
}
|
|
25
|
-
export function dataProviderFromClass(type, serviceType) {
|
|
26
|
-
return new DataProviderInst(type, serviceType);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1kYXRhLXByb3ZpZGVyLmZhY3RvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9jb3JlL3NyYy9kYXRhLXByb3ZpZGVyc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VkLCBTZXJ2aWNlQ2xhc3NUeXBlPFNlcnZpY2U+Pih1bmRlZmluZWQsIHNlcnZpY2VUeXBlKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGRhdGFQcm92aWRlckZyb21DbGFzczxNb2RlbD4odHlwZTogQ2xhc3NUeXBlPE1vZGVsPik6IERhdGFQcm92aWRlckluc3Q8TW9kZWwsIHVuZGVmaW5lZCwgQ2xhc3NUeXBlPE1vZGVsPiwgdW5kZWZpbmVkPjtcbmV4cG9ydCBmdW5jdGlvbiBkYXRhUHJvdmlkZXJGcm9tQ2xhc3M8TW9kZWwsIFNlcnZpY2UgPSBhbnk+KFxuICAgIHR5cGU6IENsYXNzVHlwZTxNb2RlbD4sXG4gICAgc2VydmljZVR5cGU6IFNlcnZpY2VDbGFzc1R5cGU8U2VydmljZT5cbik6IERhdGFQcm92aWRlckluc3Q8TW9kZWwsIFNlcnZpY2UsIENsYXNzVHlwZTxNb2RlbD4sIFNlcnZpY2VDbGFzc1R5cGU8U2VydmljZT4+O1xuZXhwb3J0IGZ1bmN0aW9uIGRhdGFQcm92aWRlckZyb21DbGFzczxNb2RlbCwgU2VydmljZSA9IGFueSwgU2VydmljZUNsYXNzID0gU2VydmljZUNsYXNzVHlwZTxTZXJ2aWNlPj4odHlwZTogQ2xhc3NUeXBlPE1vZGVsPiwgc2VydmljZVR5cGU/OiBTZXJ2aWNlQ2xhc3MpIHtcbiAgICByZXR1cm4gbmV3IERhdGFQcm92aWRlckluc3Q8TW9kZWwsIFNlcnZpY2UsIENsYXNzVHlwZTxNb2RlbD4sIFNlcnZpY2VDbGFzcz4odHlwZSwgc2VydmljZVR5cGUgYXMgU2VydmljZUNsYXNzKTtcbn1cbiJdfQ==
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { TypeRegistry } from '@mediusinc/mng-commons/core';
|
|
2
|
-
export function findClassIdAttribute(classType) {
|
|
3
|
-
if (!classType)
|
|
4
|
-
return null;
|
|
5
|
-
const attrDef = getClassAttributeDef(classType);
|
|
6
|
-
if (!attrDef) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
let idAttribute = findAttributeByTypeAndName(attrDef, ['string', 'number'], 'id', 'uuid', 'code', 'sifra');
|
|
10
|
-
if (!idAttribute) {
|
|
11
|
-
// if no id or code, take the first attribute
|
|
12
|
-
idAttribute = attrDef[0];
|
|
13
|
-
}
|
|
14
|
-
return idAttribute?.name ?? null;
|
|
15
|
-
}
|
|
16
|
-
export function findClassTitleAttribute(classType) {
|
|
17
|
-
if (!classType)
|
|
18
|
-
return null;
|
|
19
|
-
const attrDef = getClassAttributeDef(classType);
|
|
20
|
-
if (!attrDef) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
let titleAttribute = findAttributeByTypeAndName(attrDef, ['string'], 'name', 'ime', 'title', 'naziv');
|
|
24
|
-
if (!titleAttribute) {
|
|
25
|
-
// if no name or title, take the first attribute
|
|
26
|
-
titleAttribute = attrDef[0];
|
|
27
|
-
}
|
|
28
|
-
return titleAttribute?.name ?? null;
|
|
29
|
-
}
|
|
30
|
-
export function getClassAttributeDef(classType) {
|
|
31
|
-
if (!classType)
|
|
32
|
-
return null;
|
|
33
|
-
const attrDefByFn = classType.getAttributeTypeMap?.();
|
|
34
|
-
if (attrDefByFn)
|
|
35
|
-
return attrDefByFn;
|
|
36
|
-
const attrDefByProp = classType.attributeTypeMap;
|
|
37
|
-
if (attrDefByProp)
|
|
38
|
-
return attrDefByProp;
|
|
39
|
-
const attrByObjSer = TypeRegistry.get().findAttributesDefinitionByClassType(classType);
|
|
40
|
-
if (attrByObjSer)
|
|
41
|
-
return attrByObjSer;
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
function findAttributeByTypeAndName(attributes, types, ...names) {
|
|
45
|
-
for (const name of names) {
|
|
46
|
-
const attribute = attributes.find(a => types.some(t => t === a.type) && a.name === name);
|
|
47
|
-
if (attribute) {
|
|
48
|
-
return attribute;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
export function trySetLookupItemsProperties(lookup, idAsTrack = true) {
|
|
54
|
-
if (lookup.dataProvider.classType) {
|
|
55
|
-
if (!lookup.optionsValueProperty && !lookup.optionsTrackProperty) {
|
|
56
|
-
const idProperty = findClassIdAttribute(lookup.dataProvider.classType) ?? undefined;
|
|
57
|
-
if (idProperty && !lookup.optionsValueProperty && !lookup.optionsTrackProperty) {
|
|
58
|
-
if (idAsTrack) {
|
|
59
|
-
lookup.withOptionsTrackPropertyUnsafe(idProperty);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (!lookup.optionsLabelProperty) {
|
|
64
|
-
const labelProperty = findClassTitleAttribute(lookup.dataProvider.classType);
|
|
65
|
-
if (labelProperty) {
|
|
66
|
-
lookup.withOptionsLabelPropertyUnsafe(labelProperty);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9tb2RlbC9zcmMvaGVscGVycy9tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWtELFlBQVksRUFBQyxNQUFNLDZCQUE2QixDQUFDO0FBRTFHLE1BQU0sVUFBVSxvQkFBb0IsQ0FBSSxTQUF3QjtJQUM1RCxJQUFJLENBQUMsU0FBUztRQUFFLE9BQU8sSUFBSSxDQUFDO0lBRTVCLE1BQU0sT0FBTyxHQUFHLG9CQUFvQixDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQ2hELElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNYLE9BQU8sSUFBSSxDQUFDO0lBQ2hCLENBQUM7SUFFRCxJQUFJLFdBQVcsR0F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