@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
package/src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.html
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<ng-container [ngSwitch]="to.type">
|
|
2
|
-
<p-inputNumber *ngSwitchCase="'number'"
|
|
3
|
-
[id]="$any(key)"
|
|
4
|
-
[formControl]="iFormControl"
|
|
5
|
-
[formlyAttributes]="field"
|
|
6
|
-
[min]="$any(descriptor.numberMin)"
|
|
7
|
-
[max]="$any(descriptor.numberMax)"
|
|
8
|
-
[step]="$any(descriptor.numberStep)"
|
|
9
|
-
[minFractionDigits]="descriptor.numberMinFractionDigits || 0"
|
|
10
|
-
[maxFractionDigits]="descriptor.numberMaxFractionDigits || 0">
|
|
11
|
-
</p-inputNumber>
|
|
12
|
-
|
|
13
|
-
<div *ngSwitchCase="'switch'" class="flex flex-column">
|
|
14
|
-
<label [for]="key">{{ to?.label! | translate }} <span *ngIf="to.required && to['hideRequiredMarker'] !== true">*</span></label>
|
|
15
|
-
<p-inputSwitch [id]="$any(key)"
|
|
16
|
-
[formControl]="iFormControl"
|
|
17
|
-
[formlyAttributes]="field">
|
|
18
|
-
</p-inputSwitch>
|
|
19
|
-
<small *ngIf="showError" class="p-error">
|
|
20
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
21
|
-
</small>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<ng-container *ngSwitchCase="'radio'">
|
|
25
|
-
<div *ngFor="let category of descriptor.radioOptions" [id]="$any(key)" class="p-field-radiobutton">
|
|
26
|
-
<p-radioButton [value]="category" [formControl]="iFormControl" [formlyAttributes]="field"></p-radioButton>
|
|
27
|
-
<label [for]="category" class="mng-radio-button-label">{{category}}</label>
|
|
28
|
-
</div>
|
|
29
|
-
</ng-container>
|
|
30
|
-
|
|
31
|
-
<textarea *ngSwitchCase="'textarea'"
|
|
32
|
-
[id]="$any(key)"
|
|
33
|
-
[formControl]="iFormControl"
|
|
34
|
-
[formlyAttributes]="field"
|
|
35
|
-
[rows]="descriptor.rows ?? 3"
|
|
36
|
-
pInputTextarea>
|
|
37
|
-
</textarea>
|
|
38
|
-
|
|
39
|
-
<p-calendar *ngSwitchCase="'datepicker'"
|
|
40
|
-
[formControl]="iFormControl"
|
|
41
|
-
[formlyAttributes]="field"
|
|
42
|
-
[dateFormat]="$any(descriptor.datePickerFormat)"
|
|
43
|
-
[minDate]="$any(descriptor.datePickerMin)"
|
|
44
|
-
[maxDate]="$any(descriptor.datePickerMax)"
|
|
45
|
-
[showTime]="descriptor.datePickerShowTime"
|
|
46
|
-
[showIcon]="true">
|
|
47
|
-
</p-calendar>
|
|
48
|
-
|
|
49
|
-
<input *ngSwitchDefault
|
|
50
|
-
pInputText
|
|
51
|
-
[id]="$any(key)"
|
|
52
|
-
[type]="to.type || 'text'"
|
|
53
|
-
[formControl]="iFormControl"
|
|
54
|
-
[formlyAttributes]="field"
|
|
55
|
-
/>
|
|
56
|
-
</ng-container>
|
package/src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {Component, ChangeDetectionStrategy, OnInit} from '@angular/core';
|
|
2
|
-
import {FormControl} from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
import { FieldType } from '@ngx-formly/core';
|
|
5
|
-
|
|
6
|
-
import {FieldInputDescriptor} from '../../../../../descriptors';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'mng-formly-field-input',
|
|
10
|
-
templateUrl: './formly-field-input.component.html',
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
})
|
|
13
|
-
export class MngFormlyFieldInputComponent extends FieldType implements OnInit {
|
|
14
|
-
|
|
15
|
-
public iFormControl!: FormControl;
|
|
16
|
-
public descriptor!: FieldInputDescriptor<any>;
|
|
17
|
-
|
|
18
|
-
ngOnInit(): void {
|
|
19
|
-
this.iFormControl = this.formControl as FormControl;
|
|
20
|
-
this.descriptor = this.to['descriptor'];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<mng-table [descriptor]="descriptor.tableDescriptor" [items]="items$">
|
|
2
|
-
<ng-template mngTemplate="caption">
|
|
3
|
-
<div class="flex flex-column md:flex-row md:justify-content-end table-header">
|
|
4
|
-
<label class="mng-datatable-form-label p-m-0" [for]="key">{{ to?.label! | translate }} <span *ngIf="to.required && to['hideRequiredMarker'] !== true">*</span></label>
|
|
5
|
-
<mng-action *ngFor="let action of toolbarActions" [action]="action"></mng-action>
|
|
6
|
-
</div>
|
|
7
|
-
</ng-template>
|
|
8
|
-
<ng-template mngTemplate="columnAction" let-item="rowItem" let-idx="rowIndex">
|
|
9
|
-
<mng-action *ngFor="let action of rowActions"
|
|
10
|
-
[action]="action" [item]="item" [itemId]="descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined" [actionData]="{ itemIndex: idx }">
|
|
11
|
-
</mng-action>
|
|
12
|
-
</ng-template>
|
|
13
|
-
</mng-table>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {FieldType} from '@ngx-formly/core';
|
|
4
|
-
import {Observable, of, ReplaySubject, Subject, Subscription} from 'rxjs';
|
|
5
|
-
import {startWith} from 'rxjs/operators';
|
|
6
|
-
|
|
7
|
-
import {FieldManyEditorDescriptor, ActionDescriptor, ActionEditorDescriptor, ActionLevelEnum} from '../../../../../descriptors';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'mng-formly-table-dialog-form-field',
|
|
11
|
-
templateUrl: './formly-field-table-dialog-form.component.html',
|
|
12
|
-
styleUrls: ['./formly-field-table-dialog-form.component.scss'],
|
|
13
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
14
|
-
})
|
|
15
|
-
export class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType implements OnInit, OnDestroy {
|
|
16
|
-
|
|
17
|
-
public descriptor!: FieldManyEditorDescriptor<T, ET>;
|
|
18
|
-
|
|
19
|
-
public itemsSubject: Subject<Array<T>> = new ReplaySubject(1);
|
|
20
|
-
public items$: Observable<Array<T>> = this.itemsSubject.asObservable();
|
|
21
|
-
|
|
22
|
-
public toolbarActions: Array<ActionDescriptor<T>> = [];
|
|
23
|
-
public rowActions: Array<ActionDescriptor<T>> = [];
|
|
24
|
-
|
|
25
|
-
private subscriptions: Subscription[] = [];
|
|
26
|
-
|
|
27
|
-
public ngOnInit() {
|
|
28
|
-
|
|
29
|
-
this.descriptor = this.to['descriptor'];
|
|
30
|
-
const hasAddAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);
|
|
31
|
-
const hasEditAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);
|
|
32
|
-
const hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);
|
|
33
|
-
|
|
34
|
-
if (hasAddAction) {
|
|
35
|
-
console.log(this.descriptor.tableviewDescriptor.addEditor);
|
|
36
|
-
const addAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.addEditor, 'add', this.descriptor.editor.model.type, this.descriptor.property)
|
|
37
|
-
.withTitle(null)
|
|
38
|
-
.withIcon('pi pi-plus')
|
|
39
|
-
.withClassName('mng-formly-field-table-form-dialog')
|
|
40
|
-
.withSubmitFunction(ctx => {
|
|
41
|
-
if (!ctx.data?.item) {
|
|
42
|
-
throw new Error(`No item was provided in context, edit cannot be done.`);
|
|
43
|
-
}
|
|
44
|
-
this.formState.submittedOn = Date.now();
|
|
45
|
-
let value = this.formControl.value;
|
|
46
|
-
value = [...value, ctx.data.item];
|
|
47
|
-
this.formControl.patchValue(value);
|
|
48
|
-
return of(ctx.data.item);
|
|
49
|
-
})
|
|
50
|
-
.withIsVisibleFunction(ctx => of(!this.options?.formState.disabled));
|
|
51
|
-
this.toolbarActions.push(addAction as ActionDescriptor<T>);
|
|
52
|
-
}
|
|
53
|
-
if (hasEditAction) {
|
|
54
|
-
const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)
|
|
55
|
-
.withTitle(null)
|
|
56
|
-
.withIcon('pi pi-pencil')
|
|
57
|
-
.withClassName('mng-formly-field-table-form-dialog')
|
|
58
|
-
.withSubmitFunction(ctx => {
|
|
59
|
-
if (!ctx.data?.item) {
|
|
60
|
-
throw new Error(`No item was provided in context, edit cannot be done.`);
|
|
61
|
-
}
|
|
62
|
-
this.formState.submittedOn = Date.now();
|
|
63
|
-
let formControlValue = this.formControl.value;
|
|
64
|
-
formControlValue[ctx.data.actionData?.['itemIndex']] = ctx.data.item;
|
|
65
|
-
this.formControl.patchValue(formControlValue);
|
|
66
|
-
return of(ctx.data.item);
|
|
67
|
-
})
|
|
68
|
-
.withIsVisibleFunction(ctx => of(!this.options?.formState.disabled));
|
|
69
|
-
this.rowActions.push(editAction as ActionDescriptor<T>);
|
|
70
|
-
}
|
|
71
|
-
if (hasDeleteAction) {
|
|
72
|
-
const deleteAction = new ActionDescriptor(this.descriptor.tableviewDescriptor.model, 'delete', this.descriptor.editor.model.type, this.descriptor.property)
|
|
73
|
-
.withLevel(ActionLevelEnum.Danger)
|
|
74
|
-
.withTitle(null)
|
|
75
|
-
.withIcon('pi pi-trash')
|
|
76
|
-
.withRunFunction(ctx => {
|
|
77
|
-
if (!ctx.data?.item) {
|
|
78
|
-
throw new Error(`No item was provided in context, delete cannot be done.`);
|
|
79
|
-
}
|
|
80
|
-
let formControlValue = this.formControl.value;
|
|
81
|
-
const compareProperty = this.descriptor.tableDescriptor.dataKeyProperty ? this.descriptor.tableDescriptor.dataKeyProperty : this.descriptor.tableDescriptor.model.idPropertyName;
|
|
82
|
-
if (!compareProperty) {
|
|
83
|
-
throw new Error('Cannot compare items, please provide main table data key property or model id property.');
|
|
84
|
-
}
|
|
85
|
-
const ctxItem: any = ctx.data.item;
|
|
86
|
-
if (!ctxItem?.[compareProperty]) {
|
|
87
|
-
return formControlValue;
|
|
88
|
-
}
|
|
89
|
-
formControlValue = formControlValue.filter((i: any) => i[compareProperty] !== ctxItem[compareProperty]);
|
|
90
|
-
this.formControl.patchValue(formControlValue);
|
|
91
|
-
return of(ctx.data.item);
|
|
92
|
-
})
|
|
93
|
-
.withIsVisibleFunction(ctx => of(!this.options?.formState.disabled));
|
|
94
|
-
this.rowActions.push(deleteAction);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// init values
|
|
98
|
-
if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
|
|
99
|
-
this.formControl.patchValue([]);
|
|
100
|
-
}
|
|
101
|
-
const subscription = this.formControl.valueChanges
|
|
102
|
-
.pipe(
|
|
103
|
-
startWith(this.formControl.value)
|
|
104
|
-
)
|
|
105
|
-
.subscribe(v => {
|
|
106
|
-
this.itemsSubject.next(v);
|
|
107
|
-
});
|
|
108
|
-
this.subscriptions.push(subscription);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
public ngOnDestroy() {
|
|
112
|
-
this.subscriptions.forEach(s => s.unsubscribe());
|
|
113
|
-
}
|
|
114
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<mng-table [descriptor]="descriptor.mainTableDescriptor" [items]="itemsAsync">
|
|
2
|
-
<ng-template mngTemplate="caption">
|
|
3
|
-
<div class="flex flex-column md:flex-row md:justify-content-end table-header">
|
|
4
|
-
<label class="mng-datatable-form-label p-m-0" [for]="key">{{ to?.label! | translate }} <span *ngIf="to.required && to['hideRequiredMarker'] !== true">*</span></label>
|
|
5
|
-
<button *ngIf="hasAddAction && !formControl.disabled" pButton pRipple type="button" icon="pi pi-plus" class="p-button-rounded p-button-success"
|
|
6
|
-
(click)="openAddDialog()">
|
|
7
|
-
</button>
|
|
8
|
-
</div>
|
|
9
|
-
</ng-template>
|
|
10
|
-
<ng-template mngTemplate="columnAction" let-item="rowItem">
|
|
11
|
-
<button *ngIf="hasDeleteAction && !formControl.disabled" pButton pRipple type="button" icon="pi pi-trash" class="p-button-rounded p-button-danger"
|
|
12
|
-
(click)="removeItem(item)">
|
|
13
|
-
</button>
|
|
14
|
-
</ng-template>
|
|
15
|
-
</mng-table>
|
|
16
|
-
|
|
17
|
-
<p-dialog *ngIf="hasAddAction" [(visible)]="isDialogVisible"
|
|
18
|
-
[draggable]="false"
|
|
19
|
-
[header]="'general.addItem' | translate: {item: to?.label!}"
|
|
20
|
-
[modal]="true"
|
|
21
|
-
appendTo="body"
|
|
22
|
-
styleClass="p-fluid mng-formly-field-table-multiselect-dialog">
|
|
23
|
-
<ng-template pTemplate="content">
|
|
24
|
-
<mng-table [descriptor]="descriptor.mainTableDescriptor"
|
|
25
|
-
[queryResult]="addItemsAsync"
|
|
26
|
-
[selectionEnabled]="true"
|
|
27
|
-
[loading]="dialogIsLoading$"
|
|
28
|
-
(onSelectionChange)="onSelectionChange($event)">
|
|
29
|
-
</mng-table>
|
|
30
|
-
<p-messages [value]="dialogMessages"></p-messages>
|
|
31
|
-
</ng-template>
|
|
32
|
-
|
|
33
|
-
<ng-template pTemplate="footer">
|
|
34
|
-
<button pButton pRipple type="button" [label]="'general.cancel' | translate" icon="pi pi-times" class="p-button-text" (click)="hideDialog()"></button>
|
|
35
|
-
<button pButton pRipple type="button" [label]="'general.add' | translate" icon="pi pi-check" class="p-button-text" (click)="addItems()" [loading]="(dialogIsLoading$ | async) ?? false" [disabled]="form.disabled"></button>
|
|
36
|
-
</ng-template>
|
|
37
|
-
</p-dialog>
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component, Injector, OnDestroy, OnInit} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {FieldType} from '@ngx-formly/core';
|
|
4
|
-
import {Message} from 'primeng/api';
|
|
5
|
-
import {finalize, first, startWith} from 'rxjs/operators';
|
|
6
|
-
import {Observable, ReplaySubject, Subject, Subscription} from 'rxjs';
|
|
7
|
-
|
|
8
|
-
import {MediusFilterMatchType, MediusQueryParamBuilder, MediusQueryResult} from '../../../../../api/models';
|
|
9
|
-
import {FieldManyToManyEditorDescriptor} from '../../../../../descriptors';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'mng-formly-table-multiselect-add-field',
|
|
13
|
-
templateUrl: './formly-field-table-dialog-multiselect.component.html',
|
|
14
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
15
|
-
})
|
|
16
|
-
export class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType implements OnInit, OnDestroy {
|
|
17
|
-
|
|
18
|
-
public descriptor!: FieldManyToManyEditorDescriptor<T, ET>;
|
|
19
|
-
|
|
20
|
-
public itemsSubject: Subject<Array<T>> = new ReplaySubject(1);
|
|
21
|
-
public itemsAsync: Observable<Array<T>> = this.itemsSubject.asObservable();
|
|
22
|
-
public addItemsSubject: Subject<MediusQueryResult<T>> = new ReplaySubject(1);
|
|
23
|
-
public addItemsAsync: Observable<MediusQueryResult<T>> = this.addItemsSubject.asObservable();
|
|
24
|
-
|
|
25
|
-
public dialogUseDataProvider: boolean = false;
|
|
26
|
-
private dialogDataProviderService: any = null;
|
|
27
|
-
private dialogIsLoadingSubject = new ReplaySubject<boolean>(1);
|
|
28
|
-
|
|
29
|
-
public isDialogVisible = false;
|
|
30
|
-
public dialogAreItemsLoaded = false;
|
|
31
|
-
public dialogSelectedAddItems: Array<any> = [];
|
|
32
|
-
public dialogMessages: Message[] = [];
|
|
33
|
-
public dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();
|
|
34
|
-
|
|
35
|
-
public hasAddAction: boolean = false;
|
|
36
|
-
public hasDeleteAction: boolean = false;
|
|
37
|
-
|
|
38
|
-
private subscriptions: Subscription[] = [];
|
|
39
|
-
|
|
40
|
-
constructor(private injector: Injector) {
|
|
41
|
-
super();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public ngOnInit() {
|
|
45
|
-
|
|
46
|
-
this.descriptor = this.to['descriptor'];
|
|
47
|
-
if (this.descriptor.lookupTableDataProvider?.serviceType) {
|
|
48
|
-
this.dialogUseDataProvider = true;
|
|
49
|
-
this.dialogDataProviderService = this.injector.get<any>(this.descriptor.lookupTableDataProvider.serviceType);
|
|
50
|
-
}
|
|
51
|
-
this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorDescriptor.ActionEnum.Add);
|
|
52
|
-
this.hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorDescriptor.ActionEnum.Delete);
|
|
53
|
-
|
|
54
|
-
// init values
|
|
55
|
-
if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
|
|
56
|
-
this.formControl.patchValue([]);
|
|
57
|
-
}
|
|
58
|
-
const subscription = this.formControl.valueChanges
|
|
59
|
-
.pipe(
|
|
60
|
-
startWith(this.formControl.value)
|
|
61
|
-
)
|
|
62
|
-
.subscribe(v => {
|
|
63
|
-
this.itemsSubject.next(v);
|
|
64
|
-
});
|
|
65
|
-
this.subscriptions.push(subscription);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public ngOnDestroy() {
|
|
69
|
-
this.subscriptions.forEach(s => s.unsubscribe());
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
openAddDialog() {
|
|
73
|
-
if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {
|
|
74
|
-
this.dialogIsLoadingSubject.next(true);
|
|
75
|
-
const queryParamBuilder = MediusQueryParamBuilder.create(50);
|
|
76
|
-
if (this.descriptor.lookupTableDescriptor.hasDefaultSort) {
|
|
77
|
-
this.descriptor.lookupTableDescriptor.defaultSortProperty.forEach((p, idx) => queryParamBuilder.withSort(p, this.descriptor.lookupTableDescriptor.defaultSortAsc[idx]));
|
|
78
|
-
}
|
|
79
|
-
if (this.descriptor.hasLookupExcludeValues) {
|
|
80
|
-
const filterValues = this.formControl.value.map((i: any) => i[this.descriptor.excludeValueProperty])
|
|
81
|
-
queryParamBuilder.withFilter(this.descriptor.excludeFilterProperty, filterValues, undefined, MediusFilterMatchType.NotIn);
|
|
82
|
-
}
|
|
83
|
-
this.descriptor.lookupTableDataProvider?.getAll(queryParamBuilder.build(), this.dialogDataProviderService)
|
|
84
|
-
.pipe(
|
|
85
|
-
first(),
|
|
86
|
-
finalize(() => this.dialogIsLoadingSubject.next(false))
|
|
87
|
-
)
|
|
88
|
-
.subscribe(res => {
|
|
89
|
-
this.addItemsSubject.next(res);
|
|
90
|
-
this.dialogAreItemsLoaded = true;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
this.dialogSelectedAddItems = [];
|
|
94
|
-
this.isDialogVisible = true;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
onSelectionChange(items: Array<any>) {
|
|
98
|
-
this.dialogSelectedAddItems = items;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
hideDialog() {
|
|
102
|
-
this.isDialogVisible = false;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
addItems() {
|
|
106
|
-
let value = this.formControl.value;
|
|
107
|
-
if (Array.isArray(value)) {
|
|
108
|
-
value = [...value, ...this.dialogSelectedAddItems];
|
|
109
|
-
this.formControl.patchValue(value);
|
|
110
|
-
this.dialogSelectedAddItems = [];
|
|
111
|
-
this.dialogAreItemsLoaded = false;
|
|
112
|
-
this.hideDialog();
|
|
113
|
-
} else {
|
|
114
|
-
console.error("Values are not an valid array, cannot add selected items to array");
|
|
115
|
-
this.dialogMessages = [{ severity: 'error', summary: 'Error', detail: 'Selected items could not be added' }];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
removeItem(item: any) {
|
|
120
|
-
let value = this.formControl.value;
|
|
121
|
-
if (Array.isArray(value)) {
|
|
122
|
-
const compareProperty = this.descriptor.mainTableDescriptor.dataKeyProperty ? this.descriptor.mainTableDescriptor.dataKeyProperty : this.descriptor.mainTableDescriptor.model.idPropertyName;
|
|
123
|
-
if (!compareProperty) {
|
|
124
|
-
throw new Error('Cannot compare items, please provide main table data key property or model id property.');
|
|
125
|
-
}
|
|
126
|
-
value = value.filter(i => i[compareProperty] !== item[compareProperty]);
|
|
127
|
-
this.formControl.patchValue(value);
|
|
128
|
-
this.dialogAreItemsLoaded = false;
|
|
129
|
-
} else {
|
|
130
|
-
console.error("Values are not an valid array, cannot delete selected item from array");
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
package/src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.html
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<p-tabView>
|
|
2
|
-
<p-tabPanel *ngFor="let tab of field.fieldGroup; let i = index; let last = last;"
|
|
3
|
-
[header]="tab.templateOptions?.label!"
|
|
4
|
-
[headerStyleClass]="formControl.valid ? 'p-tabview-title' : 'bla'">
|
|
5
|
-
<ng-template pTemplate="header">
|
|
6
|
-
<span class="p-tabview-title" [class.p-tabview-title-error]="formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']">{{ tab.templateOptions?.label! | translate }}</span>
|
|
7
|
-
</ng-template>
|
|
8
|
-
<formly-field [field]="tab"></formly-field>
|
|
9
|
-
</p-tabPanel>
|
|
10
|
-
</p-tabView>
|
package/src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {Component, ChangeDetectionStrategy} from '@angular/core';
|
|
2
|
-
import { FieldType } from '@ngx-formly/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'mng-formly-field-tabs',
|
|
6
|
-
templateUrl: './formly-field-tabs.component.html',
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
-
})
|
|
9
|
-
export class MngFormlyFieldTabsComponent extends FieldType {
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<div class="field">
|
|
2
|
-
<label [for]="key">{{ $any(to?.label) | translate }} <span *ngIf="to.required && to['hideRequiredMarker'] !== true">*</span></label>
|
|
3
|
-
<ng-container #fieldComponent></ng-container>
|
|
4
|
-
<small *ngIf="showError" class="p-error">
|
|
5
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
6
|
-
</small>
|
|
7
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
|
2
|
-
import { FieldWrapper } from '@ngx-formly/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'mng-formly-field-wrapper',
|
|
6
|
-
templateUrl: './formly-field-wrapper.component.html',
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8
|
-
})
|
|
9
|
-
export class MngFormlyFieldWrapperComponent extends FieldWrapper implements OnInit {
|
|
10
|
-
|
|
11
|
-
public ngOnInit() {
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
|
2
|
-
import { FieldWrapper } from '@ngx-formly/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'mng-formly-table-wrapper',
|
|
6
|
-
templateUrl: './formly-table-wrapper.component.html',
|
|
7
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8
|
-
})
|
|
9
|
-
export class MngFormlyTableWrapperComponent extends FieldWrapper implements OnInit {
|
|
10
|
-
|
|
11
|
-
public ngOnInit() {
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {MngCommonsService} from '../../services';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'mng-breadcrumb',
|
|
7
|
-
templateUrl: './breadcrumb.component.html',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
-
})
|
|
10
|
-
export class MngBreadcrumbComponent {
|
|
11
|
-
constructor(public mngCommons: MngCommonsService) {}
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<div class="layout-footer">
|
|
2
|
-
<div class="footer-logo-container">
|
|
3
|
-
<img id="footer-logo" [src]="mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight" alt="atlantis-layout"/>
|
|
4
|
-
<span class="app-name">{{ mngCommons.appName | translate }}</span>
|
|
5
|
-
</div>
|
|
6
|
-
<span class="copyright">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>
|
|
7
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {MngCommonsService} from '../../services';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'mng-footer',
|
|
7
|
-
templateUrl: './footer.component.html',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
-
})
|
|
10
|
-
export class MngFooterComponent {
|
|
11
|
-
|
|
12
|
-
public currentYear = new Date().getFullYear();
|
|
13
|
-
|
|
14
|
-
constructor(public mngCommons: MngCommonsService) {}
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<div class="layout-wrapper" (click)="mainLayoutService.onLayoutClick()"
|
|
2
|
-
[ngClass]="{'layout-static': mngCommons.menuModeIsStatic$ | async,
|
|
3
|
-
'layout-overlay': mngCommons.menuModeIsOverlay$ | async,
|
|
4
|
-
'layout-slim': mngCommons.menuModeIsSlim$ | async,
|
|
5
|
-
'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,
|
|
6
|
-
'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),
|
|
7
|
-
'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,
|
|
8
|
-
'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,
|
|
9
|
-
'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async) }">
|
|
10
|
-
|
|
11
|
-
<div class="layout-main">
|
|
12
|
-
|
|
13
|
-
<ng-container [mngComponent]="footerComponent"></ng-container>
|
|
14
|
-
|
|
15
|
-
<ng-container *ngIf="!(mainLayoutService.isMobile$ | async) && ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))"
|
|
16
|
-
[mngComponent]="menuComponent">
|
|
17
|
-
</ng-container>
|
|
18
|
-
|
|
19
|
-
<div class="layout-main-content">
|
|
20
|
-
<router-outlet></router-outlet>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<ng-container [mngComponent]="footerComponent"></ng-container>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
</div>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {AfterViewInit, ChangeDetectionStrategy, Component, HostListener, QueryList, Type, ViewChildren} from '@angular/core';
|
|
2
|
-
import {ActivatedRoute} from '@angular/router';
|
|
3
|
-
|
|
4
|
-
import {MngCommonsService} from '../../services';
|
|
5
|
-
import {MngMainLayoutComponentService} from './services';
|
|
6
|
-
import {MngTemplateDirective} from '../../directives';
|
|
7
|
-
import {MngRouterData} from '../../models';
|
|
8
|
-
import {MngFooterComponent} from './footer.component';
|
|
9
|
-
import {MngMenuComponent} from './menu.component';
|
|
10
|
-
import {MngTopbarComponent} from './topbar.component';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'mng-main-layout',
|
|
14
|
-
templateUrl: './main-layout.component.html',
|
|
15
|
-
providers: [MngMainLayoutComponentService],
|
|
16
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
17
|
-
})
|
|
18
|
-
export class MngMainLayoutComponent implements AfterViewInit {
|
|
19
|
-
|
|
20
|
-
@ViewChildren(MngTemplateDirective) templates!: QueryList<MngTemplateDirective>;
|
|
21
|
-
|
|
22
|
-
public topbarComponent: Type<any> = MngTopbarComponent;
|
|
23
|
-
public menuComponent: Type<any> = MngMenuComponent;
|
|
24
|
-
public footerComponent: Type<any> = MngFooterComponent;
|
|
25
|
-
|
|
26
|
-
constructor(
|
|
27
|
-
private route: ActivatedRoute,
|
|
28
|
-
public mngCommons: MngCommonsService,
|
|
29
|
-
public mainLayoutService: MngMainLayoutComponentService
|
|
30
|
-
) {}
|
|
31
|
-
|
|
32
|
-
ngOnInit() {
|
|
33
|
-
const routeData = this.route.snapshot.data as MngRouterData;
|
|
34
|
-
if (routeData?.topbarComponent) {
|
|
35
|
-
this.topbarComponent = routeData.topbarComponent;
|
|
36
|
-
}
|
|
37
|
-
if (routeData?.menuComponent) {
|
|
38
|
-
this.menuComponent = routeData.menuComponent;
|
|
39
|
-
}
|
|
40
|
-
if (routeData?.footerComponent) {
|
|
41
|
-
this.footerComponent = routeData.footerComponent;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
ngAfterViewInit(): void {
|
|
46
|
-
this.mainLayoutService.innerWidth = window.innerWidth;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@HostListener('window:resize', ['$event'])
|
|
50
|
-
onWindowResize(event: UIEvent) {
|
|
51
|
-
const target: any = event.target;
|
|
52
|
-
this.mainLayoutService.innerWidth = target?.innerWidth ?? window.innerWidth;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<ng-container>
|
|
2
|
-
<div *ngIf="root && item.visible !== false" class="layout-menuitem-root-text">{{ item.label | translate }}</div>
|
|
3
|
-
<a *ngIf="(!item.routerLink || item.items) && item.visible !== false"
|
|
4
|
-
[attr.href]="item.url"
|
|
5
|
-
(click)="itemClick($event)"
|
|
6
|
-
(mouseenter)="onMouseEnter()"
|
|
7
|
-
(keydown.enter)="itemClick($event)"
|
|
8
|
-
[attr.target]="item.target"
|
|
9
|
-
[attr.tabindex]="0"
|
|
10
|
-
[ngClass]="item.class"
|
|
11
|
-
pRipple>
|
|
12
|
-
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
13
|
-
<span class="layout-menuitem-text">{{ item.label | translate }}</span>
|
|
14
|
-
<i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
|
|
15
|
-
<span class="menuitem-badge" *ngIf="item.badge">{{ item.badge }}</span>
|
|
16
|
-
</a>
|
|
17
|
-
<a *ngIf="(item.routerLink && !item.items) && item.visible !== false"
|
|
18
|
-
(click)="itemClick($event)"
|
|
19
|
-
(mouseenter)="hover=true"
|
|
20
|
-
(mouseleave)="hover=false"
|
|
21
|
-
[routerLink]="item.routerLink"
|
|
22
|
-
routerLinkActive="active-menuitem-routerlink"
|
|
23
|
-
[routerLinkActiveOptions]="{ exact: true }"
|
|
24
|
-
[attr.target]="item.target"
|
|
25
|
-
[attr.tabindex]="0"
|
|
26
|
-
[ngClass]="item.class"
|
|
27
|
-
pRipple>
|
|
28
|
-
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
29
|
-
<span class="layout-menuitem-text">{{ item.label | translate }}</span>
|
|
30
|
-
<i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
|
|
31
|
-
<span class="menuitem-badge" *ngIf="item.badge">{{ item.badge }}</span>
|
|
32
|
-
</a>
|
|
33
|
-
<ul *ngIf="((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false"
|
|
34
|
-
[@children]="((mngCommons.menuModeIsSlim$ | async) && !(mainLayoutService.isMobile$ | async) && root)
|
|
35
|
-
? (active ? 'visible' : 'hidden')
|
|
36
|
-
: ((mngCommons.menuModeIsStatic$ | async) && root && !(mainLayoutService.isMobile$ | async) ? 'visible' : (active ? 'visibleAnimated' : 'hiddenAnimated'))">
|
|
37
|
-
<ng-template ngFor let-child let-i="index" [ngForOf]="item.items">
|
|
38
|
-
<li mng-menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child.badgeClass"></li>
|
|
39
|
-
</ng-template>
|
|
40
|
-
</ul>
|
|
41
|
-
</ng-container>
|