@mediusinc/mng-commons 0.2.1-rc → 0.2.4
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/esm2020/lib/api/models/builders/query-param.builder.mjs +48 -0
- package/esm2020/lib/api/models/filter-match-type.model.mjs +26 -0
- package/esm2020/lib/api/models/filter-param.model.mjs +46 -0
- package/esm2020/lib/api/models/index.mjs +9 -0
- package/esm2020/lib/api/models/mappers.mjs +17 -0
- package/esm2020/lib/api/models/query-mode.model.mjs +19 -0
- package/esm2020/lib/api/models/query-param.model.mjs +69 -0
- package/esm2020/lib/api/models/query-result.model.mjs +45 -0
- package/esm2020/lib/api/models/serialization.model.mjs +2 -0
- package/esm2020/lib/api/services/crud-api.abstract.service.mjs +72 -0
- package/esm2020/lib/api/services/index.mjs +2 -0
- package/esm2020/lib/api/utils/index.mjs +3 -0
- package/esm2020/lib/api/utils/medius-rest.util.mjs +122 -0
- package/esm2020/lib/api/utils/object-serializer.util.mjs +226 -0
- package/esm2020/lib/components/action/action.component.mjs +65 -0
- package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +148 -0
- package/esm2020/lib/components/action/index.mjs +4 -0
- package/esm2020/lib/components/action/models/action-confirmation-service.model.mjs +2 -0
- package/esm2020/lib/components/action/models/action-execution.model.mjs +58 -0
- package/esm2020/lib/components/action/models/index.mjs +3 -0
- package/esm2020/lib/components/action/route/action-route.component.mjs +144 -0
- package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +114 -0
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +113 -0
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +141 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +19 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +19 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +16 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +26 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +109 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +122 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +17 -0
- package/esm2020/lib/components/form/formly/fields/index.mjs +8 -0
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +17 -0
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +16 -0
- package/esm2020/lib/components/form/formly/wrappers/index.mjs +3 -0
- package/esm2020/lib/components/form/index.mjs +4 -0
- package/esm2020/lib/components/form/models/form-editor.event.mjs +7 -0
- package/esm2020/lib/components/form/models/index.mjs +2 -0
- package/esm2020/lib/components/layout/breadcrumb.component.mjs +17 -0
- package/esm2020/lib/components/layout/footer.component.mjs +17 -0
- package/esm2020/lib/components/layout/index.mjs +7 -0
- package/esm2020/lib/components/layout/main-layout.component.mjs +54 -0
- package/esm2020/lib/components/layout/menu-item.component.mjs +173 -0
- package/esm2020/lib/components/layout/menu.component.mjs +20 -0
- package/esm2020/lib/components/layout/services/index.mjs +2 -0
- package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +190 -0
- package/esm2020/lib/components/layout/topbar.component.mjs +59 -0
- package/esm2020/lib/components/tableview/index.mjs +6 -0
- package/esm2020/lib/components/tableview/models/index.mjs +2 -0
- package/esm2020/lib/components/tableview/models/table.event.mjs +16 -0
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +24 -0
- package/esm2020/lib/components/tableview/services/index.mjs +2 -0
- package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +17 -0
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +74 -0
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +25 -0
- package/esm2020/lib/components/tableview/table/table.component.mjs +307 -0
- package/esm2020/lib/components/tableview/tableview.component.mjs +82 -0
- package/esm2020/lib/config/formly.config.mjs +136 -0
- package/esm2020/lib/config/index.mjs +2 -0
- package/esm2020/lib/config/models/index.mjs +2 -0
- package/esm2020/lib/config/models/mng-config.model.mjs +2 -0
- package/esm2020/lib/data-providers/base.data-provider.mjs +24 -0
- package/esm2020/lib/data-providers/editor.data-provider.mjs +37 -0
- package/esm2020/lib/data-providers/index.mjs +6 -0
- package/esm2020/lib/data-providers/lookup.data-provider.mjs +16 -0
- package/esm2020/lib/data-providers/table.data-provider.mjs +2 -0
- package/esm2020/lib/data-providers/tableview.data-provider.mjs +17 -0
- package/esm2020/lib/descriptors/action.descriptor.mjs +332 -0
- package/esm2020/lib/descriptors/editor.descriptor.mjs +670 -0
- package/esm2020/lib/descriptors/field.validator.mjs +21 -0
- package/esm2020/lib/descriptors/index.mjs +8 -0
- package/esm2020/lib/descriptors/lookup.descriptor.mjs +2 -0
- package/esm2020/lib/descriptors/model.descriptor.mjs +34 -0
- package/esm2020/lib/descriptors/table.descriptor.mjs +401 -0
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +131 -0
- package/esm2020/lib/directives/component.directive.mjs +23 -0
- package/esm2020/lib/directives/index.mjs +3 -0
- package/esm2020/lib/directives/template.directive.mjs +29 -0
- package/esm2020/lib/mng-commons.module.mjs +410 -0
- package/esm2020/lib/models/index.mjs +3 -0
- package/esm2020/lib/models/router.model.mjs +2 -0
- package/esm2020/lib/models/user.model.mjs +2 -0
- package/esm2020/lib/pipes/boolean.pipe.mjs +22 -0
- package/esm2020/lib/pipes/index.mjs +3 -0
- package/esm2020/lib/pipes/property-path.pipe.mjs +36 -0
- package/esm2020/lib/services/action.service.mjs +269 -0
- package/esm2020/lib/services/commons.service.mjs +354 -0
- package/esm2020/lib/services/configuration.service.mjs +78 -0
- package/esm2020/lib/services/index.mjs +5 -0
- package/esm2020/lib/services/navigation.service.mjs +48 -0
- package/esm2020/lib/services/providers/commons-init.provider.mjs +4 -0
- package/esm2020/lib/services/providers/config-service.provider.mjs +20 -0
- package/esm2020/lib/services/providers/formly-config.provider.mjs +31 -0
- package/esm2020/lib/services/providers/index.mjs +4 -0
- package/esm2020/lib/services/tokens/browser-storage.token.mjs +6 -0
- package/esm2020/lib/services/tokens/index.mjs +3 -0
- package/esm2020/lib/services/tokens/module-config.token.mjs +3 -0
- package/esm2020/lib/types/index.mjs +3 -0
- package/esm2020/lib/types/type.decorator.mjs +7 -0
- package/esm2020/lib/types/type.model.mjs +2 -0
- package/esm2020/lib/utils/editor-formly.util.mjs +176 -0
- package/esm2020/lib/utils/i18n.util.mjs +125 -0
- package/esm2020/lib/utils/index.mjs +6 -0
- package/esm2020/lib/utils/model.util.mjs +57 -0
- package/esm2020/lib/utils/toast.util.mjs +39 -0
- package/esm2020/lib/utils/type.util.mjs +39 -0
- package/esm2020/mediusinc-mng-commons.mjs +5 -0
- package/esm2020/public-api.mjs +36 -0
- package/fesm2015/mediusinc-mng-commons.mjs +6252 -0
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -0
- package/fesm2020/mediusinc-mng-commons.mjs +6177 -0
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -0
- package/lib/api/models/builders/query-param.builder.d.ts +11 -0
- package/{src/lib/api/models/query-mode.model.ts → lib/api/models/filter-match-type.model.d.ts} +11 -6
- package/lib/api/models/filter-param.model.d.ts +23 -0
- package/{src/lib/api/models/index.ts → lib/api/models/index.d.ts} +0 -2
- package/lib/api/models/mappers.d.ts +6 -0
- package/lib/api/models/query-mode.model.d.ts +16 -0
- package/lib/api/models/query-param.model.d.ts +31 -0
- package/lib/api/models/query-result.model.d.ts +36 -0
- package/{src/lib/api/models/serialization.model.ts → lib/api/models/serialization.model.d.ts} +0 -1
- package/lib/api/services/crud-api.abstract.service.d.ts +23 -0
- package/{src/lib/api/services/index.ts → lib/api/services/index.d.ts} +0 -0
- package/{src/lib/api/utils/index.ts → lib/api/utils/index.d.ts} +0 -0
- package/lib/api/utils/medius-rest.util.d.ts +12 -0
- package/lib/api/utils/object-serializer.util.d.ts +30 -0
- package/lib/components/action/action.component.d.ts +36 -0
- package/lib/components/action/dialog/action-dialog.component.d.ts +46 -0
- package/{src/lib/components/action/index.ts → lib/components/action/index.d.ts} +0 -0
- package/{src/lib/components/action/models/action-confirmation-service.model.ts → lib/components/action/models/action-confirmation-service.model.d.ts} +2 -3
- package/lib/components/action/models/action-execution.model.d.ts +53 -0
- package/{src/lib/components/action/models/index.ts → lib/components/action/models/index.d.ts} +0 -0
- package/lib/components/action/route/action-route.component.d.ts +32 -0
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +36 -0
- package/lib/components/form/dropdown/dropdown.component.d.ts +34 -0
- package/lib/components/form/editor/form-editor.component.d.ts +39 -0
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +11 -0
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +11 -0
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +6 -0
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +12 -0
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +17 -0
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +36 -0
- package/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +6 -0
- package/{src/lib/components/form/formly/fields/index.ts → lib/components/form/formly/fields/index.d.ts} +0 -0
- package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +8 -0
- package/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.d.ts +8 -0
- package/{src/lib/components/form/formly/wrappers/index.ts → lib/components/form/formly/wrappers/index.d.ts} +0 -0
- package/{src/lib/components/form/index.ts → lib/components/form/index.d.ts} +0 -0
- package/lib/components/form/models/form-editor.event.d.ts +5 -0
- package/{src/lib/components/form/models/index.ts → lib/components/form/models/index.d.ts} +0 -0
- package/lib/components/layout/breadcrumb.component.d.ts +8 -0
- package/lib/components/layout/footer.component.d.ts +9 -0
- package/{src/lib/components/layout/index.ts → lib/components/layout/index.d.ts} +0 -0
- package/lib/components/layout/main-layout.component.d.ts +21 -0
- package/lib/components/layout/menu-item.component.d.ts +29 -0
- package/lib/components/layout/menu.component.d.ts +10 -0
- package/{src/lib/components/layout/services/index.ts → lib/components/layout/services/index.d.ts} +0 -0
- package/lib/components/layout/services/main-layout.component.service.d.ts +65 -0
- package/lib/components/layout/topbar.component.d.ts +25 -0
- package/{src/lib/components/tableview/index.ts → lib/components/tableview/index.d.ts} +0 -0
- package/{src/lib/components/tableview/models/index.ts → lib/components/tableview/models/index.d.ts} +0 -0
- package/lib/components/tableview/models/table.event.d.ts +17 -0
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +14 -0
- package/{src/lib/components/tableview/services/index.ts → lib/components/tableview/services/index.d.ts} +0 -0
- package/lib/components/tableview/services/tableview.component.service.d.ts +13 -0
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +22 -0
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +12 -0
- package/lib/components/tableview/table/table.component.d.ts +79 -0
- package/lib/components/tableview/tableview.component.d.ts +35 -0
- package/lib/config/formly.config.d.ts +14 -0
- package/{src/lib/config/index.ts → lib/config/index.d.ts} +0 -0
- package/{src/lib/config/models/index.ts → lib/config/models/index.d.ts} +0 -0
- package/{src/lib/config/models/mng-config.model.ts → lib/config/models/mng-config.model.d.ts} +8 -9
- package/lib/data-providers/base.data-provider.d.ts +17 -0
- package/lib/data-providers/editor.data-provider.d.ts +25 -0
- package/{src/lib/data-providers/index.ts → lib/data-providers/index.d.ts} +0 -0
- package/lib/data-providers/lookup.data-provider.d.ts +14 -0
- package/{src/lib/data-providers/table.data-provider.ts → lib/data-providers/table.data-provider.d.ts} +3 -5
- package/lib/data-providers/tableview.data-provider.d.ts +15 -0
- package/lib/descriptors/action.descriptor.d.ts +148 -0
- package/lib/descriptors/editor.descriptor.d.ts +255 -0
- package/lib/descriptors/field.validator.d.ts +18 -0
- package/{src/lib/descriptors/index.ts → lib/descriptors/index.d.ts} +0 -0
- package/{src/lib/descriptors/lookup.descriptor.ts → lib/descriptors/lookup.descriptor.d.ts} +6 -9
- package/lib/descriptors/model.descriptor.d.ts +15 -0
- package/lib/descriptors/table.descriptor.d.ts +164 -0
- package/lib/descriptors/tableview.descriptor.d.ts +39 -0
- package/lib/directives/component.directive.d.ts +11 -0
- package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +0 -0
- package/lib/directives/template.directive.d.ts +13 -0
- package/lib/mng-commons.module.d.ts +79 -0
- package/{src/lib/models/index.ts → lib/models/index.d.ts} +0 -0
- package/lib/models/router.model.d.ts +14 -0
- package/{src/lib/models/user.model.ts → lib/models/user.model.d.ts} +2 -3
- package/lib/pipes/boolean.pipe.d.ts +7 -0
- package/{src/lib/pipes/index.ts → lib/pipes/index.d.ts} +0 -0
- package/lib/pipes/property-path.pipe.d.ts +7 -0
- package/lib/services/action.service.d.ts +92 -0
- package/lib/services/commons.service.d.ts +72 -0
- package/lib/services/configuration.service.d.ts +35 -0
- package/{src/lib/services/index.ts → lib/services/index.d.ts} +0 -0
- package/lib/services/navigation.service.d.ts +14 -0
- package/lib/services/providers/commons-init.provider.d.ts +2 -0
- package/lib/services/providers/config-service.provider.d.ts +5 -0
- package/lib/services/providers/formly-config.provider.d.ts +4 -0
- package/{src/lib/services/providers/index.ts → lib/services/providers/index.d.ts} +0 -0
- package/lib/services/tokens/browser-storage.token.d.ts +2 -0
- package/{src/lib/services/tokens/index.ts → lib/services/tokens/index.d.ts} +0 -0
- package/lib/services/tokens/module-config.token.d.ts +3 -0
- package/{src/lib/types/index.ts → lib/types/index.d.ts} +0 -0
- package/lib/types/type.decorator.d.ts +2 -0
- package/lib/types/type.model.d.ts +10 -0
- package/lib/utils/editor-formly.util.d.ts +9 -0
- package/lib/utils/i18n.util.d.ts +18 -0
- package/{src/lib/utils/index.ts → lib/utils/index.d.ts} +0 -0
- package/lib/utils/model.util.d.ts +7 -0
- package/lib/utils/toast.util.d.ts +13 -0
- package/lib/utils/type.util.d.ts +15 -0
- package/mediusinc-mng-commons.d.ts +5 -0
- package/package.json +27 -6
- package/{src/public-api.ts → public-api.d.ts} +0 -17
- package/.browserslistrc +0 -16
- package/karma.conf.js +0 -51
- package/ng-package.json +0 -14
- package/src/lib/api/models/builders/query-param.builder.ts +0 -54
- package/src/lib/api/models/filter-match-type.model.ts +0 -25
- package/src/lib/api/models/filter-param.model.ts +0 -59
- package/src/lib/api/models/mappers.ts +0 -18
- package/src/lib/api/models/query-param.model.ts +0 -99
- package/src/lib/api/models/query-result.model.ts +0 -77
- package/src/lib/api/services/crud-api.abstract.service.ts +0 -113
- package/src/lib/api/utils/medius-rest.util.ts +0 -146
- package/src/lib/api/utils/object-serializer.util.ts +0 -227
- package/src/lib/components/action/action.component.html +0 -30
- package/src/lib/components/action/action.component.ts +0 -77
- package/src/lib/components/action/dialog/action-dialog.component.html +0 -26
- package/src/lib/components/action/dialog/action-dialog.component.ts +0 -171
- package/src/lib/components/action/models/action-execution.model.ts +0 -81
- package/src/lib/components/action/route/action-route.component.html +0 -1
- package/src/lib/components/action/route/action-route.component.ts +0 -159
- package/src/lib/components/form/autocomplete/autocomplete.component.html +0 -16
- package/src/lib/components/form/autocomplete/autocomplete.component.ts +0 -113
- package/src/lib/components/form/dropdown/dropdown.component.html +0 -29
- package/src/lib/components/form/dropdown/dropdown.component.ts +0 -109
- package/src/lib/components/form/editor/form-editor.component.html +0 -5
- package/src/lib/components/form/editor/form-editor.component.ts +0 -149
- package/src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.html +0 -7
- package/src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.ts +0 -21
- package/src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.html +0 -9
- package/src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.ts +0 -22
- package/src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.html +0 -8
- package/src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.ts +0 -10
- package/src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.html +0 -56
- package/src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.ts +0 -22
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.html +0 -13
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.scss +0 -4
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.ts +0 -114
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.html +0 -37
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.ts +0 -133
- package/src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.html +0 -10
- package/src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.ts +0 -10
- package/src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.html +0 -7
- package/src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.ts +0 -13
- package/src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.html +0 -6
- package/src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.ts +0 -13
- package/src/lib/components/form/models/form-editor.event.ts +0 -7
- package/src/lib/components/layout/breadcrumb.component.html +0 -5
- package/src/lib/components/layout/breadcrumb.component.ts +0 -12
- package/src/lib/components/layout/footer.component.html +0 -7
- package/src/lib/components/layout/footer.component.ts +0 -15
- package/src/lib/components/layout/main-layout.component.html +0 -26
- package/src/lib/components/layout/main-layout.component.ts +0 -54
- package/src/lib/components/layout/menu-item.component.html +0 -41
- package/src/lib/components/layout/menu-item.component.ts +0 -170
- package/src/lib/components/layout/menu.component.html +0 -27
- package/src/lib/components/layout/menu.component.ts +0 -17
- package/src/lib/components/layout/services/main-layout.component.service.ts +0 -231
- package/src/lib/components/layout/topbar.component.html +0 -38
- package/src/lib/components/layout/topbar.component.ts +0 -62
- package/src/lib/components/tableview/models/table.event.ts +0 -22
- package/src/lib/components/tableview/route/tableview-route.abstract.component.ts +0 -31
- package/src/lib/components/tableview/services/tableview.component.service.ts +0 -22
- package/src/lib/components/tableview/table/column-filter/column-filter.component.html +0 -36
- package/src/lib/components/tableview/table/column-filter/column-filter.component.ts +0 -70
- package/src/lib/components/tableview/table/column-value/column-value.component.html +0 -14
- package/src/lib/components/tableview/table/column-value/column-value.component.ts +0 -19
- package/src/lib/components/tableview/table/table.component.html +0 -110
- package/src/lib/components/tableview/table/table.component.ts +0 -327
- package/src/lib/components/tableview/tableview.component.html +0 -37
- package/src/lib/components/tableview/tableview.component.ts +0 -78
- package/src/lib/config/formly.config.ts +0 -154
- package/src/lib/data-providers/base.data-provider.ts +0 -42
- package/src/lib/data-providers/editor.data-provider.ts +0 -60
- package/src/lib/data-providers/lookup.data-provider.ts +0 -29
- package/src/lib/data-providers/tableview.data-provider.ts +0 -29
- package/src/lib/descriptors/action.descriptor.ts +0 -439
- package/src/lib/descriptors/editor.descriptor.ts +0 -880
- package/src/lib/descriptors/field.validator.ts +0 -35
- package/src/lib/descriptors/model.descriptor.ts +0 -47
- package/src/lib/descriptors/table.descriptor.ts +0 -514
- package/src/lib/descriptors/tableview.descriptor.ts +0 -180
- package/src/lib/directives/component.directive.ts +0 -18
- package/src/lib/directives/template.directive.ts +0 -24
- package/src/lib/mng-commons.module.ts +0 -240
- package/src/lib/models/router.model.ts +0 -16
- package/src/lib/pipes/boolean.pipe.ts +0 -17
- package/src/lib/pipes/property-path.pipe.ts +0 -30
- package/src/lib/services/action.service.ts +0 -310
- package/src/lib/services/commons.service.ts +0 -407
- package/src/lib/services/configuration.service.ts +0 -98
- package/src/lib/services/navigation.service.ts +0 -42
- package/src/lib/services/providers/commons-init.provider.ts +0 -5
- package/src/lib/services/providers/config-service.provider.ts +0 -22
- package/src/lib/services/providers/formly-config.provider.ts +0 -39
- package/src/lib/services/tokens/browser-storage.token.ts +0 -9
- package/src/lib/services/tokens/module-config.token.ts +0 -5
- package/src/lib/types/type.decorator.ts +0 -7
- package/src/lib/types/type.model.ts +0 -12
- package/src/lib/utils/editor-formly.util.ts +0 -193
- package/src/lib/utils/i18n.util.ts +0 -148
- package/src/lib/utils/model.util.ts +0 -66
- package/src/lib/utils/toast.util.ts +0 -49
- package/src/lib/utils/type.util.ts +0 -44
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ClassType } from '../types';
|
|
3
|
+
import { EditorDescriptor, ModelDescriptor } from './';
|
|
4
|
+
import { IDataProvider, IEditorDataProvider } from '../data-providers';
|
|
5
|
+
import { ActionExecContext } from '../components/action/models';
|
|
6
|
+
export declare class ActionDescriptor<T> {
|
|
7
|
+
protected readonly _model: ModelDescriptor<T>;
|
|
8
|
+
protected readonly _actionName: string;
|
|
9
|
+
protected readonly _parentType?: ClassType<any>;
|
|
10
|
+
protected readonly _parentTypeName?: string;
|
|
11
|
+
protected readonly _parentProperty?: string;
|
|
12
|
+
protected readonly _i18nModelActionBaseKey: string;
|
|
13
|
+
protected _type: ActionTypeEnum;
|
|
14
|
+
protected _activationTrigger: ActionActivationTriggerEnum;
|
|
15
|
+
protected _position: ActionPositionEnum;
|
|
16
|
+
protected _level: ActionLevelEnum;
|
|
17
|
+
protected _routeUrl: string | null;
|
|
18
|
+
protected _title?: string | null;
|
|
19
|
+
protected _icon?: string;
|
|
20
|
+
protected _className: string;
|
|
21
|
+
protected _tooltip?: string | null;
|
|
22
|
+
protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
|
|
23
|
+
protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
|
|
24
|
+
protected _isEnabledFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;
|
|
25
|
+
private _hasRunConfirmation;
|
|
26
|
+
private _runConfirmationIcon?;
|
|
27
|
+
private _runConfirmationTitle?;
|
|
28
|
+
private _runConfirmationMessage?;
|
|
29
|
+
private _runConfirmationAcceptTitle?;
|
|
30
|
+
private _runConfirmationRejectTitle?;
|
|
31
|
+
protected _hasRunNotificationSuccess: boolean;
|
|
32
|
+
private _runNotificationSuccessTitle?;
|
|
33
|
+
private _runNotificationSuccessMessage?;
|
|
34
|
+
private _hasRunNotificationError;
|
|
35
|
+
private _runNotificationErrorTitle?;
|
|
36
|
+
private _runNotificationErrorMessage?;
|
|
37
|
+
constructor(model: ModelDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
|
|
38
|
+
get model(): ModelDescriptor<T>;
|
|
39
|
+
get parentTypeName(): string | undefined;
|
|
40
|
+
get parentProperty(): string | undefined;
|
|
41
|
+
get i18nModelActionBaseKey(): string;
|
|
42
|
+
get type(): ActionTypeEnum;
|
|
43
|
+
get activationTrigger(): ActionActivationTriggerEnum;
|
|
44
|
+
get position(): ActionPositionEnum;
|
|
45
|
+
get level(): ActionLevelEnum;
|
|
46
|
+
get routeUrl(): string | null;
|
|
47
|
+
get title(): string | null | undefined;
|
|
48
|
+
get icon(): string | undefined;
|
|
49
|
+
get tooltip(): string | null | undefined;
|
|
50
|
+
get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
|
|
51
|
+
get isVisibleFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
|
|
52
|
+
get isEnabledFunction(): ((ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>) | undefined;
|
|
53
|
+
get actionName(): string;
|
|
54
|
+
get className(): string;
|
|
55
|
+
get hasRunConfirmation(): boolean;
|
|
56
|
+
get runConfirmationIcon(): string | undefined;
|
|
57
|
+
get runConfirmationTitle(): string | undefined;
|
|
58
|
+
get runConfirmationMessage(): string | undefined;
|
|
59
|
+
get runConfirmationAcceptTitle(): string | undefined;
|
|
60
|
+
get runConfirmationRejectTitle(): string | undefined;
|
|
61
|
+
get hasRunNotificationSuccess(): boolean;
|
|
62
|
+
get runNotificationSuccessTitle(): string | undefined;
|
|
63
|
+
get runNotificationSuccessMessage(): string | undefined;
|
|
64
|
+
get hasRunNotificationError(): boolean;
|
|
65
|
+
get runNotificationErrorTitle(): string | undefined;
|
|
66
|
+
get runNotificationErrorMessage(): string | undefined;
|
|
67
|
+
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
|
|
68
|
+
withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
|
|
69
|
+
withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this;
|
|
70
|
+
withRouteTrigger(routeUrl: string): this;
|
|
71
|
+
withLevel(level: ActionLevelEnum): this;
|
|
72
|
+
/**
|
|
73
|
+
* Overrides default title key with model action key (${model.typeName}.actions.${actionName}). Not relevant if parentType name is provided.
|
|
74
|
+
*/
|
|
75
|
+
withModelTitle(): this;
|
|
76
|
+
/**
|
|
77
|
+
* Overrides default title key (${actionName}.title). If null, no title will be shown.
|
|
78
|
+
* @param title Title i18n key or title.
|
|
79
|
+
*/
|
|
80
|
+
withTitle(title: string | null): this;
|
|
81
|
+
withIcon(icon: string): this;
|
|
82
|
+
withTooltip(tooltip: string | null): this;
|
|
83
|
+
withClassName(className: string): this;
|
|
84
|
+
withPosition(position: ActionPositionEnum): this;
|
|
85
|
+
withRunConfirmation(icon?: string, title?: string, message?: string, acceptTitle?: string, rejectTitle?: string): this;
|
|
86
|
+
withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): void;
|
|
87
|
+
withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
|
|
88
|
+
}
|
|
89
|
+
export declare class ActionEditorDescriptor<T> extends ActionDescriptor<T> {
|
|
90
|
+
private readonly _editorDescriptor;
|
|
91
|
+
protected _editorTitle?: string;
|
|
92
|
+
private _hasFetchNotificationSuccess;
|
|
93
|
+
private _fetchNotificationSuccessTitle?;
|
|
94
|
+
private _fetchNotificationSuccessMessage?;
|
|
95
|
+
protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
96
|
+
protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
97
|
+
constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string);
|
|
98
|
+
get editorTitle(): string | undefined;
|
|
99
|
+
get editorDescriptor(): EditorDescriptor<T>;
|
|
100
|
+
get hasFetchNotificationSuccess(): boolean;
|
|
101
|
+
get fetchNotificationSuccessTitle(): string | undefined;
|
|
102
|
+
get fetchNotificationSuccessMessage(): string | undefined;
|
|
103
|
+
get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T>;
|
|
104
|
+
get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;
|
|
105
|
+
get submitFunction(): ((ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>) | undefined;
|
|
106
|
+
withEditorTitle(title: string): this;
|
|
107
|
+
withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this;
|
|
108
|
+
withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
|
|
109
|
+
withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this;
|
|
110
|
+
withFetchNotificationError(title?: string, message?: string, hasNotification?: boolean): void;
|
|
111
|
+
}
|
|
112
|
+
export declare class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
113
|
+
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
114
|
+
}
|
|
115
|
+
export declare class ActionEditorAddDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
116
|
+
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
117
|
+
}
|
|
118
|
+
export declare class ActionEditorEditDescriptor<T> extends ActionEditorDescriptor<T> {
|
|
119
|
+
constructor(editorDescriptor: EditorDescriptor<T>);
|
|
120
|
+
}
|
|
121
|
+
export declare class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {
|
|
122
|
+
constructor(model: ModelDescriptor<T>);
|
|
123
|
+
}
|
|
124
|
+
export declare enum ActionPositionEnum {
|
|
125
|
+
ToolbarLeft = 0,
|
|
126
|
+
ToolbarRight = 1,
|
|
127
|
+
TableHeader = 2,
|
|
128
|
+
RowInline = 3,
|
|
129
|
+
RowClick = 4
|
|
130
|
+
}
|
|
131
|
+
export declare enum ActionActivationTriggerEnum {
|
|
132
|
+
OnClick = 0,
|
|
133
|
+
OnRoute = 1
|
|
134
|
+
}
|
|
135
|
+
export declare enum ActionTypeEnum {
|
|
136
|
+
Direct = 0,
|
|
137
|
+
Editor = 1
|
|
138
|
+
}
|
|
139
|
+
export declare enum ActionLevelEnum {
|
|
140
|
+
Default = 0,
|
|
141
|
+
Primary = 1,
|
|
142
|
+
Secondary = 2,
|
|
143
|
+
Info = 3,
|
|
144
|
+
Help = 4,
|
|
145
|
+
Success = 5,
|
|
146
|
+
Warning = 6,
|
|
147
|
+
Danger = 7
|
|
148
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { ClassType, EnumMemberType } from '../types';
|
|
6
|
+
import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
|
|
7
|
+
import { ModelDescriptor, TableDescriptor, TableviewDescriptor, FieldValidator, ILookupDescriptor } from './';
|
|
8
|
+
import { MediusQueryParam, MediusQueryResult } from '../api/models';
|
|
9
|
+
export declare class EditorDescriptor<T> {
|
|
10
|
+
static readonly defaultGroupName = "_default";
|
|
11
|
+
private readonly _model;
|
|
12
|
+
private readonly _tabs;
|
|
13
|
+
private readonly _groups;
|
|
14
|
+
private readonly _fields;
|
|
15
|
+
private _currentTabGroup?;
|
|
16
|
+
private _currentGroup?;
|
|
17
|
+
private _disabled;
|
|
18
|
+
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
|
|
19
|
+
get model(): ModelDescriptor<T>;
|
|
20
|
+
get tabs(): FieldTabGroupDescriptor<T>[];
|
|
21
|
+
get disabled(): boolean;
|
|
22
|
+
get fields(): AFieldDescriptor<any, T>[];
|
|
23
|
+
createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T>;
|
|
24
|
+
createFieldGroup(name: string, title?: string): FieldGroupDescriptor<T>;
|
|
25
|
+
addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
|
|
26
|
+
addField(property: string): FieldInputDescriptor<T>;
|
|
27
|
+
removeField(property: string): this;
|
|
28
|
+
getField(property: string): AFieldDescriptor<any, T> | null;
|
|
29
|
+
addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
|
|
30
|
+
addFieldLookupEnum(property: string, options: Array<EnumMemberType>): FieldLookupEnumDescriptor<T>;
|
|
31
|
+
addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
|
|
32
|
+
addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
|
|
33
|
+
withDisabled(disabled?: boolean): this;
|
|
34
|
+
addValidator(name: string, expression: (control: AbstractControl) => boolean): void;
|
|
35
|
+
copy(): EditorDescriptor<T>;
|
|
36
|
+
private createTabGroupDescriptor;
|
|
37
|
+
createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<T>): this;
|
|
38
|
+
private createDefaultGroup;
|
|
39
|
+
private createDefaultTabGroup;
|
|
40
|
+
}
|
|
41
|
+
export declare abstract class AGenericFieldDescriptor<ET> {
|
|
42
|
+
protected readonly _editor: EditorDescriptor<ET>;
|
|
43
|
+
protected constructor(editor: EditorDescriptor<ET>);
|
|
44
|
+
get editor(): EditorDescriptor<ET>;
|
|
45
|
+
}
|
|
46
|
+
export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescriptor<ET> {
|
|
47
|
+
protected readonly _property: string;
|
|
48
|
+
protected _group?: AFieldGroupDescriptor<ET>;
|
|
49
|
+
protected _label?: string;
|
|
50
|
+
protected _placeholder?: string;
|
|
51
|
+
protected _required: boolean;
|
|
52
|
+
protected _disabled: boolean;
|
|
53
|
+
protected _className: string;
|
|
54
|
+
protected _getter?: (item: ET) => T;
|
|
55
|
+
protected _setter?: (item: ET, value: T) => void;
|
|
56
|
+
protected _validators: Array<FieldValidator>;
|
|
57
|
+
protected constructor(editor: EditorDescriptor<ET>, property: string);
|
|
58
|
+
abstract copy(): AFieldDescriptor<T, ET>;
|
|
59
|
+
get property(): string;
|
|
60
|
+
get group(): AFieldGroupDescriptor<ET> | undefined;
|
|
61
|
+
get label(): string | undefined;
|
|
62
|
+
get placeholder(): string | undefined;
|
|
63
|
+
get required(): boolean;
|
|
64
|
+
get disabled(): boolean;
|
|
65
|
+
get className(): string;
|
|
66
|
+
get getter(): ((item: ET) => T) | undefined;
|
|
67
|
+
get setter(): ((item: ET, value: T) => void) | undefined;
|
|
68
|
+
get validators(): FieldValidator[];
|
|
69
|
+
withLabel(label: string): this;
|
|
70
|
+
withPlaceholder(placeholder: string): this;
|
|
71
|
+
withRequired(required?: boolean): this;
|
|
72
|
+
withDisabled(disabled?: boolean): this;
|
|
73
|
+
withClassName(className: string): this;
|
|
74
|
+
withGetter(getter: (item: ET) => T): this;
|
|
75
|
+
withSetter(setter: (item: ET, value: T) => void): this;
|
|
76
|
+
withValidator(name: string, expression: (control: AbstractControl) => boolean, message: (err: any, field: FormlyFieldConfig) => string): this;
|
|
77
|
+
protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
|
|
78
|
+
}
|
|
79
|
+
export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {
|
|
80
|
+
private _fieldType;
|
|
81
|
+
private _rows?;
|
|
82
|
+
private _numberMin?;
|
|
83
|
+
private _numberMax?;
|
|
84
|
+
private _numberStep?;
|
|
85
|
+
private _numberMinFractionDigits?;
|
|
86
|
+
private _numberMaxFractionDigits?;
|
|
87
|
+
private _radioOptions;
|
|
88
|
+
private _datePickerFormat?;
|
|
89
|
+
private _datePickerMin?;
|
|
90
|
+
private _datePickerMax?;
|
|
91
|
+
private _datePickerShowTime;
|
|
92
|
+
private _maxLength?;
|
|
93
|
+
private _minLength?;
|
|
94
|
+
private _pattern?;
|
|
95
|
+
constructor(editor: EditorDescriptor<ET>, property: string);
|
|
96
|
+
get fieldType(): FieldInputDescriptor.TypeEnum;
|
|
97
|
+
get numberStep(): number | undefined;
|
|
98
|
+
get numberMin(): number | undefined;
|
|
99
|
+
get numberMax(): number | undefined;
|
|
100
|
+
get rows(): number | undefined;
|
|
101
|
+
get numberMinFractionDigits(): number | undefined;
|
|
102
|
+
get numberMaxFractionDigits(): number | undefined;
|
|
103
|
+
get radioOptions(): string[];
|
|
104
|
+
get datePickerFormat(): string | undefined;
|
|
105
|
+
get datePickerMin(): Date | undefined;
|
|
106
|
+
get datePickerMax(): Date | undefined;
|
|
107
|
+
get datePickerShowTime(): boolean;
|
|
108
|
+
get maxLength(): number | undefined;
|
|
109
|
+
get minLength(): number | undefined;
|
|
110
|
+
get pattern(): string | RegExp | undefined;
|
|
111
|
+
asText(minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
|
|
112
|
+
asTextarea(rows?: number): this;
|
|
113
|
+
asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number): this;
|
|
114
|
+
asSwitch(): this;
|
|
115
|
+
asRadio(options: Array<string>): this;
|
|
116
|
+
asDatePicker(format?: string, min?: Date, max?: Date, showTime?: boolean): this;
|
|
117
|
+
copy(): FieldInputDescriptor<ET>;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace FieldInputDescriptor {
|
|
120
|
+
enum TypeEnum {
|
|
121
|
+
Text = 0,
|
|
122
|
+
Textarea = 1,
|
|
123
|
+
Number = 2,
|
|
124
|
+
Switch = 3,
|
|
125
|
+
Radio = 4,
|
|
126
|
+
Datepicker = 5
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
export declare class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET> implements ILookupDescriptor<T> {
|
|
130
|
+
protected readonly _modelType: ClassType<T> | null;
|
|
131
|
+
protected _lookupType: FieldLookupDescriptor.LookupTypeEnum;
|
|
132
|
+
protected _itemsLabelProperty?: string;
|
|
133
|
+
protected _itemsValueProperty?: string;
|
|
134
|
+
protected _dataKeyProperty?: string;
|
|
135
|
+
protected _dataProvider?: ILookupDataProvider<T, any>;
|
|
136
|
+
constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null);
|
|
137
|
+
get modelType(): ClassType<T> | null;
|
|
138
|
+
get lookupType(): FieldLookupDescriptor.LookupTypeEnum;
|
|
139
|
+
get itemsLabelProperty(): string | undefined;
|
|
140
|
+
get itemsValueProperty(): string | undefined;
|
|
141
|
+
get dataKeyProperty(): string | undefined;
|
|
142
|
+
get dataProvider(): ILookupDataProvider<T, any> | undefined;
|
|
143
|
+
withItemsLabelProperty(itemsLabelProperty: string): this;
|
|
144
|
+
withItemsValueProperty(itemsValueProperty: string): this;
|
|
145
|
+
withDataKeyProperty(property: string): this;
|
|
146
|
+
withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
|
|
147
|
+
withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
|
|
148
|
+
asAutocomplete(): this;
|
|
149
|
+
copy(): FieldLookupDescriptor<T, ET>;
|
|
150
|
+
}
|
|
151
|
+
export declare namespace FieldLookupDescriptor {
|
|
152
|
+
enum LookupTypeEnum {
|
|
153
|
+
Dropdown = 0,
|
|
154
|
+
Autocomplete = 1
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export declare class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumMemberType, ET> {
|
|
158
|
+
private readonly _enumName;
|
|
159
|
+
constructor(editor: EditorDescriptor<ET>, property: string, enumName: string, options: Array<EnumMemberType>);
|
|
160
|
+
get enumName(): string;
|
|
161
|
+
copy(): FieldLookupEnumDescriptor<ET>;
|
|
162
|
+
}
|
|
163
|
+
export declare class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
|
|
164
|
+
private readonly _model;
|
|
165
|
+
private readonly _mainTableDescriptor;
|
|
166
|
+
private readonly _lookupTableDescriptor;
|
|
167
|
+
private _fieldType;
|
|
168
|
+
private _lookupTableDataProvider;
|
|
169
|
+
private _actions;
|
|
170
|
+
private _hasLookupExcludeValues;
|
|
171
|
+
private _excludeFilterProperty;
|
|
172
|
+
private _excludeValueProperty;
|
|
173
|
+
constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, mainTableDescriptor: TableDescriptor<T>, lookupTableDescriptor: TableDescriptor<T>);
|
|
174
|
+
get mainTableDescriptor(): TableDescriptor<T>;
|
|
175
|
+
get lookupTableDescriptor(): TableDescriptor<T>;
|
|
176
|
+
get lookupTableDataProvider(): ITableDataProvider<T, any> | null;
|
|
177
|
+
get actions(): FieldManyToManyEditorDescriptor.ActionEnum[];
|
|
178
|
+
get fieldType(): FieldManyToManyEditorDescriptor.TypeEnum;
|
|
179
|
+
get hasLookupExcludeValues(): boolean;
|
|
180
|
+
get excludeFilterProperty(): string;
|
|
181
|
+
get excludeValueProperty(): string;
|
|
182
|
+
withLookup<S>(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>, serviceType?: Type<S>): this;
|
|
183
|
+
withLookupDataProvider(dataProvider: ITableDataProvider<T, any>): this;
|
|
184
|
+
withActions(actions?: Array<FieldManyToManyEditorDescriptor.ActionEnum>): this;
|
|
185
|
+
withLookupExclude(filterProperty: string, valueProperty: string, hasLookupExclude?: boolean): this;
|
|
186
|
+
copy(): FieldManyToManyEditorDescriptor<T, ET>;
|
|
187
|
+
}
|
|
188
|
+
export declare namespace FieldManyToManyEditorDescriptor {
|
|
189
|
+
enum TypeEnum {
|
|
190
|
+
DialogTableMultiselect = 0
|
|
191
|
+
}
|
|
192
|
+
enum ActionEnum {
|
|
193
|
+
Add = 0,
|
|
194
|
+
Delete = 1
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
export declare class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {
|
|
198
|
+
private readonly _modelType;
|
|
199
|
+
private readonly _tableviewDescriptor;
|
|
200
|
+
private _fieldType;
|
|
201
|
+
private _actions;
|
|
202
|
+
constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T>, tableviewDescriptor: TableviewDescriptor<T>);
|
|
203
|
+
get tableviewDescriptor(): TableviewDescriptor<T>;
|
|
204
|
+
get tableDescriptor(): TableDescriptor<T>;
|
|
205
|
+
get editorForCreate(): EditorDescriptor<T>;
|
|
206
|
+
get editorForRead(): EditorDescriptor<T>;
|
|
207
|
+
get editorForUpdate(): EditorDescriptor<T>;
|
|
208
|
+
get fieldType(): FieldManyEditorDescriptor.TypeEnum;
|
|
209
|
+
get actions(): FieldManyEditorDescriptor.ActionEnum[];
|
|
210
|
+
withActions(actions?: Array<FieldManyToManyEditorDescriptor.ActionEnum>): this;
|
|
211
|
+
copy(): FieldManyEditorDescriptor<T, ET>;
|
|
212
|
+
}
|
|
213
|
+
export declare namespace FieldManyEditorDescriptor {
|
|
214
|
+
enum TypeEnum {
|
|
215
|
+
DialogEditor = 0
|
|
216
|
+
}
|
|
217
|
+
enum ActionEnum {
|
|
218
|
+
Add = 0,
|
|
219
|
+
Edit = 1,
|
|
220
|
+
Delete = 2
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
export declare abstract class AFieldGroupDescriptor<ET> extends AGenericFieldDescriptor<ET> {
|
|
224
|
+
protected readonly _name: string;
|
|
225
|
+
protected readonly _default: boolean;
|
|
226
|
+
protected _title?: string;
|
|
227
|
+
protected _fields: AGenericFieldDescriptor<ET>[];
|
|
228
|
+
protected _validators: Array<FieldValidator>;
|
|
229
|
+
protected constructor(editor: EditorDescriptor<ET>, name: string);
|
|
230
|
+
abstract get fields(): AGenericFieldDescriptor<ET>[];
|
|
231
|
+
abstract groupName(): string;
|
|
232
|
+
abstract addField(field: AGenericFieldDescriptor<ET>): this;
|
|
233
|
+
abstract copy(): AFieldGroupDescriptor<ET>;
|
|
234
|
+
get baseName(): string;
|
|
235
|
+
get name(): string;
|
|
236
|
+
get default(): boolean;
|
|
237
|
+
get title(): string | undefined;
|
|
238
|
+
get validators(): FieldValidator[];
|
|
239
|
+
withTitle(title: string): this;
|
|
240
|
+
withValidator(name: string, expression: (control: AbstractControl) => boolean): this;
|
|
241
|
+
}
|
|
242
|
+
export declare class FieldTabGroupDescriptor<ET> extends AFieldGroupDescriptor<ET> {
|
|
243
|
+
constructor(editor: EditorDescriptor<ET>, name: string);
|
|
244
|
+
get fields(): Array<FieldGroupDescriptor<ET>>;
|
|
245
|
+
groupName(): string;
|
|
246
|
+
addField(field: FieldGroupDescriptor<ET>): this;
|
|
247
|
+
copy(): FieldTabGroupDescriptor<ET>;
|
|
248
|
+
}
|
|
249
|
+
export declare class FieldGroupDescriptor<ET> extends AFieldGroupDescriptor<ET> {
|
|
250
|
+
constructor(editor: EditorDescriptor<ET>, name: string);
|
|
251
|
+
get fields(): Array<AFieldDescriptor<any, ET>>;
|
|
252
|
+
groupName(): string;
|
|
253
|
+
addField(field: AFieldDescriptor<any, ET>): this;
|
|
254
|
+
copy(): FieldGroupDescriptor<ET>;
|
|
255
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare class FieldValidator {
|
|
5
|
+
private readonly _name;
|
|
6
|
+
private readonly _expression?;
|
|
7
|
+
private readonly _message?;
|
|
8
|
+
private readonly _options?;
|
|
9
|
+
constructor(name: string, expression?: (control: AbstractControl) => boolean, message?: (err: any, field: FormlyFieldConfig) => string | Observable<string>, options?: {
|
|
10
|
+
errorPath: string;
|
|
11
|
+
});
|
|
12
|
+
get name(): string;
|
|
13
|
+
get expression(): ((control: AbstractControl) => boolean) | undefined;
|
|
14
|
+
get message(): ((err: any, field: FormlyFieldConfig) => string | Observable<string>) | undefined;
|
|
15
|
+
get options(): {
|
|
16
|
+
errorPath: string;
|
|
17
|
+
} | undefined;
|
|
18
|
+
}
|
|
File without changes
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {Type} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {ClassType} from '../types';
|
|
7
|
-
import {MediusQueryParam} from '../api/models';
|
|
8
|
-
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ILookupDataProvider } from '../data-providers';
|
|
4
|
+
import { ClassType } from '../types';
|
|
5
|
+
import { MediusQueryParam } from '../api/models';
|
|
9
6
|
export interface ILookupDescriptor<T> {
|
|
10
|
-
modelType: ClassType<T
|
|
7
|
+
modelType: ClassType<T> | null;
|
|
11
8
|
itemsLabelProperty?: string;
|
|
12
9
|
itemsValueProperty?: string;
|
|
13
10
|
dataKeyProperty?: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ClassType } from '../types';
|
|
2
|
+
export declare class ModelDescriptor<T> {
|
|
3
|
+
private readonly _type;
|
|
4
|
+
private readonly _typeName;
|
|
5
|
+
private _idPropertyName?;
|
|
6
|
+
private _titlePropertyName?;
|
|
7
|
+
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
|
|
8
|
+
get type(): ClassType<T>;
|
|
9
|
+
get typeName(): string;
|
|
10
|
+
get idPropertyName(): string | undefined;
|
|
11
|
+
get titlePropertyName(): string | undefined;
|
|
12
|
+
withIdPropertyName(idProperty: string): this;
|
|
13
|
+
withTitlePropertyName(titleProperty: string): this;
|
|
14
|
+
copy(): ModelDescriptor<T>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ModelDescriptor } from './model.descriptor';
|
|
4
|
+
import { ILookupDescriptor } from './lookup.descriptor';
|
|
5
|
+
import { ClassType } from '../types';
|
|
6
|
+
import { ILookupDataProvider } from '../data-providers';
|
|
7
|
+
import { MediusQueryParam } from '../api/models';
|
|
8
|
+
export declare class TableDescriptor<T> {
|
|
9
|
+
private readonly _model;
|
|
10
|
+
private _filterDisplay;
|
|
11
|
+
private _paginationMode;
|
|
12
|
+
private _columns;
|
|
13
|
+
private _title?;
|
|
14
|
+
private _dataKeyProperty?;
|
|
15
|
+
private _hasDefaultSort;
|
|
16
|
+
private _defaultSortProperty;
|
|
17
|
+
private _defaultSortAsc;
|
|
18
|
+
private _rowHeight;
|
|
19
|
+
private _tableFullHeightOffset;
|
|
20
|
+
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
|
|
21
|
+
get model(): ModelDescriptor<T>;
|
|
22
|
+
get filterDisplay(): TableDescriptor.FilterDisplayEnum;
|
|
23
|
+
get paginationMode(): TableDescriptor.PaginationModeEnum;
|
|
24
|
+
get columns(): ColumnDescriptor<any, T>[];
|
|
25
|
+
get title(): string | undefined;
|
|
26
|
+
get dataKeyProperty(): string | undefined;
|
|
27
|
+
get hasDefaultSort(): boolean;
|
|
28
|
+
get defaultSortProperty(): string[];
|
|
29
|
+
get defaultSortAsc(): boolean[];
|
|
30
|
+
get rowHeight(): number;
|
|
31
|
+
get tableFullHeightOffset(): number;
|
|
32
|
+
addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T>;
|
|
33
|
+
addColumn(property: string): ColumnDescriptor<string, T>;
|
|
34
|
+
addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
|
|
35
|
+
addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
|
|
36
|
+
addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
|
|
37
|
+
addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
|
|
38
|
+
withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this;
|
|
39
|
+
withPaginationMode(paginationMode: TableDescriptor.PaginationModeEnum): this;
|
|
40
|
+
withTitle(title: string): TableDescriptor<T>;
|
|
41
|
+
withDataKeyProperty(property: string): TableDescriptor<T>;
|
|
42
|
+
withDefaultSort(property: string, asc?: boolean): TableDescriptor<T>;
|
|
43
|
+
withRowHeight(rowHeight: number): TableDescriptor<T>;
|
|
44
|
+
withTableFullHeightOffset(tableFullHeightOffset: number): TableDescriptor<T>;
|
|
45
|
+
private setDataKeyFromColumn;
|
|
46
|
+
copy(): TableDescriptor<T>;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace TableDescriptor {
|
|
49
|
+
enum PaginationModeEnum {
|
|
50
|
+
Pagination = 0,
|
|
51
|
+
InfiniteScroll = 1
|
|
52
|
+
}
|
|
53
|
+
enum FilterDisplayEnum {
|
|
54
|
+
Row = 0,
|
|
55
|
+
Menu = 1
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export declare class ColumnDescriptor<T, TT> {
|
|
59
|
+
private readonly _table;
|
|
60
|
+
private readonly _property;
|
|
61
|
+
private _modelType;
|
|
62
|
+
private _columnType;
|
|
63
|
+
private _title?;
|
|
64
|
+
private _displayPropertyPath?;
|
|
65
|
+
private _isSortEnabled;
|
|
66
|
+
private _filterDescriptor?;
|
|
67
|
+
private _displayFormat?;
|
|
68
|
+
constructor(table: TableDescriptor<TT>, property: string);
|
|
69
|
+
get table(): TableDescriptor<TT>;
|
|
70
|
+
get property(): string;
|
|
71
|
+
get modelType(): ClassType<T> | null;
|
|
72
|
+
get displayPropertyPath(): string | undefined;
|
|
73
|
+
get title(): string | undefined;
|
|
74
|
+
get isSortEnabled(): boolean;
|
|
75
|
+
get columnType(): ColumnDescriptor.TypeEnum;
|
|
76
|
+
get filterDescriptor(): FilterDescriptor<T> | undefined;
|
|
77
|
+
get displayFormat(): string | undefined;
|
|
78
|
+
asType(type?: ColumnDescriptor.TypeEnum): this;
|
|
79
|
+
asNumber(displayFormat?: string): this;
|
|
80
|
+
asDate(displayFormat?: string): this;
|
|
81
|
+
asBoolean(): this;
|
|
82
|
+
withModelType(modelType: ClassType<T>): this;
|
|
83
|
+
withTitle(title: string): this;
|
|
84
|
+
withDisplayPropertyPath(displayPropertyPath: string): this;
|
|
85
|
+
withFilter(): FilterDescriptor<T>;
|
|
86
|
+
withFilterLookup(): FilterLookupDescriptor<T>;
|
|
87
|
+
withSort(isEnabled?: boolean): this;
|
|
88
|
+
copy(): ColumnDescriptor<T, TT>;
|
|
89
|
+
}
|
|
90
|
+
export declare namespace ColumnDescriptor {
|
|
91
|
+
enum TypeEnum {
|
|
92
|
+
String = 0,
|
|
93
|
+
Number = 1,
|
|
94
|
+
Boolean = 2,
|
|
95
|
+
Date = 3
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export declare class FilterDescriptor<T> {
|
|
99
|
+
protected readonly _property: string;
|
|
100
|
+
protected _filterType: FilterDescriptor.TypeEnum;
|
|
101
|
+
protected _filterProperty?: string;
|
|
102
|
+
protected _placeholder?: string;
|
|
103
|
+
protected _className: string;
|
|
104
|
+
constructor(property: string);
|
|
105
|
+
get property(): string;
|
|
106
|
+
get filterType(): FilterDescriptor.TypeEnum;
|
|
107
|
+
get filterProperty(): string | undefined;
|
|
108
|
+
get placeholder(): string | undefined;
|
|
109
|
+
get className(): string;
|
|
110
|
+
asFilterType(filterType: ColumnDescriptor.TypeEnum): this;
|
|
111
|
+
/**
|
|
112
|
+
* Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.
|
|
113
|
+
* @param filterProperty
|
|
114
|
+
*/
|
|
115
|
+
withFilterProperty(filterProperty: string): this;
|
|
116
|
+
withPlaceholder(placeholder: string): this;
|
|
117
|
+
withClassName(className: string): this;
|
|
118
|
+
protected copyFieldsTo(descriptor: FilterDescriptor<T>): void;
|
|
119
|
+
copy(): FilterDescriptor<T>;
|
|
120
|
+
}
|
|
121
|
+
export declare namespace FilterDescriptor {
|
|
122
|
+
enum TypeEnum {
|
|
123
|
+
String = 0,
|
|
124
|
+
Number = 1,
|
|
125
|
+
Boolean = 2,
|
|
126
|
+
Date = 3,
|
|
127
|
+
Lookup = 4
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> implements ILookupDescriptor<T> {
|
|
131
|
+
private readonly _modelType;
|
|
132
|
+
private _lookupType?;
|
|
133
|
+
private _dataProvider?;
|
|
134
|
+
private _itemsLabelProperty?;
|
|
135
|
+
private _itemsValueProperty?;
|
|
136
|
+
private _dataKeyProperty?;
|
|
137
|
+
private _multiselect;
|
|
138
|
+
protected _dropdownClassName: string;
|
|
139
|
+
constructor(property: string, modelType: ClassType<T> | null);
|
|
140
|
+
get modelType(): ClassType<T> | null;
|
|
141
|
+
get lookupType(): FilterLookupDescriptor.LookupTypeEnum | undefined;
|
|
142
|
+
get itemsLabelProperty(): string | undefined;
|
|
143
|
+
get itemsValueProperty(): string | undefined;
|
|
144
|
+
get dataKeyProperty(): string | undefined;
|
|
145
|
+
get dataProvider(): ILookupDataProvider<T, any> | undefined;
|
|
146
|
+
get multiselect(): boolean;
|
|
147
|
+
withItemsLabelProperty(itemsLabelProperty: string): this;
|
|
148
|
+
withItemsValueProperty(itemsValueProperty: string): this;
|
|
149
|
+
withDataKeyProperty(dataKeyProperty: string): this;
|
|
150
|
+
get dropdownClassName(): string;
|
|
151
|
+
withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this;
|
|
152
|
+
withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this;
|
|
153
|
+
withMultiselect(multiselect?: boolean): this;
|
|
154
|
+
withDropdownClassName(dropdownClassName: string): this;
|
|
155
|
+
asAutocomplete(): this;
|
|
156
|
+
protected copyFieldsTo(descriptor: FilterLookupDescriptor<T>): void;
|
|
157
|
+
copy(): FilterLookupDescriptor<T>;
|
|
158
|
+
}
|
|
159
|
+
export declare namespace FilterLookupDescriptor {
|
|
160
|
+
enum LookupTypeEnum {
|
|
161
|
+
Dropdown = 0,
|
|
162
|
+
Autocomplete = 1
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { ModelDescriptor, AFieldDescriptor, EditorDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, ColumnDescriptor, TableDescriptor } from './';
|
|
3
|
+
import { ClassType, EnumMemberType } from '../types';
|
|
4
|
+
export declare class TableviewDescriptor<T> {
|
|
5
|
+
private readonly _model;
|
|
6
|
+
private _table;
|
|
7
|
+
private _viewEditor;
|
|
8
|
+
private _addEditor;
|
|
9
|
+
private _editEditor;
|
|
10
|
+
private _tableTitle;
|
|
11
|
+
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string);
|
|
12
|
+
get model(): ModelDescriptor<T>;
|
|
13
|
+
get table(): TableDescriptor<T>;
|
|
14
|
+
get viewEditor(): EditorDescriptor<T>;
|
|
15
|
+
get addEditor(): EditorDescriptor<T>;
|
|
16
|
+
get editEditor(): EditorDescriptor<T>;
|
|
17
|
+
get tableTitle(): string;
|
|
18
|
+
withTableDescriptor(descriptor: TableDescriptor<T>): this;
|
|
19
|
+
withViewDescriptor(descriptor: EditorDescriptor<T>): this;
|
|
20
|
+
withAddDescriptor(descriptor: EditorDescriptor<T>): this;
|
|
21
|
+
withEditDescriptor(descriptor: EditorDescriptor<T>): this;
|
|
22
|
+
withTableTitle(title: string): this;
|
|
23
|
+
withValidator(name: string, expression: (control: AbstractControl) => boolean): this;
|
|
24
|
+
addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T>;
|
|
25
|
+
addColumn(property: string): ColumnDescriptor<string, T>;
|
|
26
|
+
addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
|
|
27
|
+
addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
|
|
28
|
+
addColumnBoolean(property: string): ColumnDescriptor<boolean, T>;
|
|
29
|
+
addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T>;
|
|
30
|
+
createTabGroup(name: string, title?: string): this;
|
|
31
|
+
createFieldGroup(name: string, title?: string): this;
|
|
32
|
+
addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
|
|
33
|
+
addField(property: string): FieldInputDescriptor<T>;
|
|
34
|
+
addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T>;
|
|
35
|
+
addFieldLookupEnum(property: string, options: Array<EnumMemberType>): FieldLookupEnumDescriptor<T>;
|
|
36
|
+
addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T>;
|
|
37
|
+
addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T>;
|
|
38
|
+
copy(): TableviewDescriptor<T>;
|
|
39
|
+
}
|