@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,11 @@
|
|
|
1
|
+
import { ComponentRef, OnInit, Type, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MngComponentDirective<T> implements OnInit {
|
|
4
|
+
viewContainerRef: ViewContainerRef;
|
|
5
|
+
component: Type<T>;
|
|
6
|
+
componentRef: ComponentRef<T>;
|
|
7
|
+
constructor(viewContainerRef: ViewContainerRef);
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngComponentDirective<any>, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MngComponentDirective<any>, "[mngComponent]", never, { "component": "mngComponent"; }, {}, never>;
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MngTemplateDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
private viewContainerRef;
|
|
6
|
+
type: string;
|
|
7
|
+
name: string;
|
|
8
|
+
constructor(template: TemplateRef<any>, viewContainerRef: ViewContainerRef);
|
|
9
|
+
getType(): string;
|
|
10
|
+
getViewContainerRef(): ViewContainerRef;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngTemplateDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MngTemplateDirective, "[mngTemplate]", never, { "type": "type"; "name": "mngTemplate"; }, {}, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
3
|
+
import { MngModuleConfig } from './config/models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./directives/component.directive";
|
|
6
|
+
import * as i2 from "./directives/template.directive";
|
|
7
|
+
import * as i3 from "./pipes/property-path.pipe";
|
|
8
|
+
import * as i4 from "./pipes/boolean.pipe";
|
|
9
|
+
import * as i5 from "./components/layout/breadcrumb.component";
|
|
10
|
+
import * as i6 from "./components/layout/footer.component";
|
|
11
|
+
import * as i7 from "./components/layout/main-layout.component";
|
|
12
|
+
import * as i8 from "./components/layout/menu.component";
|
|
13
|
+
import * as i9 from "./components/layout/menu-item.component";
|
|
14
|
+
import * as i10 from "./components/layout/topbar.component";
|
|
15
|
+
import * as i11 from "./components/form/autocomplete/autocomplete.component";
|
|
16
|
+
import * as i12 from "./components/form/dropdown/dropdown.component";
|
|
17
|
+
import * as i13 from "./components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component";
|
|
18
|
+
import * as i14 from "./components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component";
|
|
19
|
+
import * as i15 from "./components/form/formly/fields/formly-field-input/formly-field-input.component";
|
|
20
|
+
import * as i16 from "./components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component";
|
|
21
|
+
import * as i17 from "./components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component";
|
|
22
|
+
import * as i18 from "./components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component";
|
|
23
|
+
import * as i19 from "./components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component";
|
|
24
|
+
import * as i20 from "./components/form/formly/fields/formly-field-tabs/formly-field-tabs.component";
|
|
25
|
+
import * as i21 from "./components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component";
|
|
26
|
+
import * as i22 from "./components/tableview/table/table.component";
|
|
27
|
+
import * as i23 from "./components/tableview/tableview.component";
|
|
28
|
+
import * as i24 from "./components/tableview/table/column-value/column-value.component";
|
|
29
|
+
import * as i25 from "./components/tableview/table/column-filter/column-filter.component";
|
|
30
|
+
import * as i26 from "./components/form/editor/form-editor.component";
|
|
31
|
+
import * as i27 from "./components/action/action.component";
|
|
32
|
+
import * as i28 from "./components/action/dialog/action-dialog.component";
|
|
33
|
+
import * as i29 from "./components/action/route/action-route.component";
|
|
34
|
+
import * as i30 from "@angular/common";
|
|
35
|
+
import * as i31 from "@angular/router";
|
|
36
|
+
import * as i32 from "@angular/common/http";
|
|
37
|
+
import * as i33 from "@angular/forms";
|
|
38
|
+
import * as i34 from "@ngx-translate/core";
|
|
39
|
+
import * as i35 from "@ngx-formly/core";
|
|
40
|
+
import * as i36 from "primeng/autocomplete";
|
|
41
|
+
import * as i37 from "primeng/breadcrumb";
|
|
42
|
+
import * as i38 from "primeng/button";
|
|
43
|
+
import * as i39 from "primeng/calendar";
|
|
44
|
+
import * as i40 from "primeng/card";
|
|
45
|
+
import * as i41 from "primeng/checkbox";
|
|
46
|
+
import * as i42 from "primeng/chip";
|
|
47
|
+
import * as i43 from "primeng/confirmdialog";
|
|
48
|
+
import * as i44 from "primeng/confirmpopup";
|
|
49
|
+
import * as i45 from "primeng/dialog";
|
|
50
|
+
import * as i46 from "primeng/dynamicdialog";
|
|
51
|
+
import * as i47 from "primeng/dropdown";
|
|
52
|
+
import * as i48 from "primeng/inputnumber";
|
|
53
|
+
import * as i49 from "primeng/inputmask";
|
|
54
|
+
import * as i50 from "primeng/inputswitch";
|
|
55
|
+
import * as i51 from "primeng/inputtext";
|
|
56
|
+
import * as i52 from "primeng/inputtextarea";
|
|
57
|
+
import * as i53 from "primeng/paginator";
|
|
58
|
+
import * as i54 from "primeng/radiobutton";
|
|
59
|
+
import * as i55 from "primeng/ripple";
|
|
60
|
+
import * as i56 from "primeng/selectbutton";
|
|
61
|
+
import * as i57 from "primeng/table";
|
|
62
|
+
import * as i58 from "primeng/tag";
|
|
63
|
+
import * as i59 from "primeng/toast";
|
|
64
|
+
import * as i60 from "primeng/togglebutton";
|
|
65
|
+
import * as i61 from "primeng/toolbar";
|
|
66
|
+
import * as i62 from "primeng/tooltip";
|
|
67
|
+
import * as i63 from "primeng/messages";
|
|
68
|
+
import * as i64 from "primeng/progressspinner";
|
|
69
|
+
import * as i65 from "primeng/tabview";
|
|
70
|
+
import * as i66 from "primeng/fieldset";
|
|
71
|
+
import * as i67 from "primeng/multiselect";
|
|
72
|
+
import * as i68 from "primeng/skeleton";
|
|
73
|
+
export declare const primeNgModules: (typeof InputTextModule)[];
|
|
74
|
+
export declare class MngCommonsModule {
|
|
75
|
+
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
|
|
77
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngFormEditorComponent, typeof i27.MngActionComponent, typeof i28.MngActionDialogComponent, typeof i29.MngActionRouteComponent], [typeof i30.CommonModule, typeof i31.RouterModule, typeof i32.HttpClientModule, typeof i33.ReactiveFormsModule, typeof i34.TranslateModule, typeof i35.FormlyModule, typeof i36.AutoCompleteModule, typeof i37.BreadcrumbModule, typeof i38.ButtonModule, typeof i39.CalendarModule, typeof i40.CardModule, typeof i41.CheckboxModule, typeof i42.ChipModule, typeof i43.ConfirmDialogModule, typeof i44.ConfirmPopupModule, typeof i45.DialogModule, typeof i46.DynamicDialogModule, typeof i47.DropdownModule, typeof i48.InputNumberModule, typeof i49.InputMaskModule, typeof i50.InputSwitchModule, typeof i51.InputTextModule, typeof i52.InputTextareaModule, typeof i53.PaginatorModule, typeof i54.RadioButtonModule, typeof i55.RippleModule, typeof i56.SelectButtonModule, typeof i57.TableModule, typeof i58.TagModule, typeof i59.ToastModule, typeof i60.ToggleButtonModule, typeof i61.ToolbarModule, typeof i62.TooltipModule, typeof i63.MessagesModule, typeof i64.ProgressSpinnerModule, typeof i65.TabViewModule, typeof i66.FieldsetModule, typeof i67.MultiSelectModule, typeof i68.SkeletonModule], [typeof i36.AutoCompleteModule, typeof i37.BreadcrumbModule, typeof i38.ButtonModule, typeof i39.CalendarModule, typeof i40.CardModule, typeof i41.CheckboxModule, typeof i42.ChipModule, typeof i43.ConfirmDialogModule, typeof i44.ConfirmPopupModule, typeof i45.DialogModule, typeof i46.DynamicDialogModule, typeof i47.DropdownModule, typeof i48.InputNumberModule, typeof i49.InputMaskModule, typeof i50.InputSwitchModule, typeof i51.InputTextModule, typeof i52.InputTextareaModule, typeof i53.PaginatorModule, typeof i54.RadioButtonModule, typeof i55.RippleModule, typeof i56.SelectButtonModule, typeof i57.TableModule, typeof i58.TagModule, typeof i59.ToastModule, typeof i60.ToggleButtonModule, typeof i61.ToolbarModule, typeof i62.TooltipModule, typeof i63.MessagesModule, typeof i64.ProgressSpinnerModule, typeof i65.TabViewModule, typeof i66.FieldsetModule, typeof i67.MultiSelectModule, typeof i68.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngFormEditorComponent, typeof i27.MngActionComponent, typeof i28.MngActionDialogComponent, typeof i29.MngActionRouteComponent]>;
|
|
78
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
|
|
79
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActivatedRouteSnapshot, Data } from '@angular/router';
|
|
2
|
+
import { MenuItem } from 'primeng/api';
|
|
3
|
+
import { Type } from '@angular/core';
|
|
4
|
+
export interface MngBreadcrumbMenuItem extends MenuItem {
|
|
5
|
+
isHome?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MngRouterData extends Data {
|
|
8
|
+
breadcrumb?: string | string[] | MngBreadcrumbMenuItem | MngBreadcrumbMenuItem[] | ((routeUrl: string, route: ActivatedRouteSnapshot) => MngBreadcrumbMenuItem[]);
|
|
9
|
+
pageTitle?: string;
|
|
10
|
+
topbarComponent?: Type<any>;
|
|
11
|
+
breadcrumbComponent?: Type<any>;
|
|
12
|
+
menuComponent?: Type<any>;
|
|
13
|
+
footerComponent?: Type<any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MngBooleanPipe implements PipeTransform {
|
|
4
|
+
transform(value: any): any;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngBooleanPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MngBooleanPipe, "boolean">;
|
|
7
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MngPropertyPathPipe implements PipeTransform {
|
|
4
|
+
transform(value: any, path?: string): any;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngPropertyPathPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MngPropertyPathPipe, "propertyPath">;
|
|
7
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
4
|
+
import { ConfirmationService } from 'primeng/api';
|
|
5
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { ActionActivationResult, ActionData, ActionExecContext, ActionRunResult, ActionTriggerResult } from '../components/action/models';
|
|
8
|
+
import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
|
|
9
|
+
import { MngTableCellClickEvent } from '../components/tableview/models';
|
|
10
|
+
import { TableviewComponentService } from '../components/tableview/services';
|
|
11
|
+
import { IDataProvider, IEditorDataProvider } from '../data-providers';
|
|
12
|
+
import { IdType } from '../types';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export declare class MngActionService {
|
|
15
|
+
private injector;
|
|
16
|
+
private router;
|
|
17
|
+
private dialogService;
|
|
18
|
+
private confirmationService;
|
|
19
|
+
private translate;
|
|
20
|
+
constructor(injector: Injector, router: Router, dialogService: DialogService, confirmationService: ConfirmationService, translate: TranslateService);
|
|
21
|
+
getActionExecContext<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, tableview?: TableviewComponentService<T, S>, sourceComponent?: any, actionData?: ActionData): ActionExecContext<T, S, IDataProvider<T, S>>;
|
|
22
|
+
runAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, dataProvider?: IDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IDataProvider<T, S>>>;
|
|
23
|
+
/**
|
|
24
|
+
* Runs editor action save function usually triggered on form submit.
|
|
25
|
+
*
|
|
26
|
+
* @param action Action descriptor.
|
|
27
|
+
* @param itemId Item id (if exists).
|
|
28
|
+
* @param formItem Item instance (from form).
|
|
29
|
+
* @param dataProvider Data provider
|
|
30
|
+
* @param sourceComponent Source component from where the fetch function was called.
|
|
31
|
+
* @param tableview Tableview component.
|
|
32
|
+
* @param actionData Additional action data.
|
|
33
|
+
*/
|
|
34
|
+
runEditorSave<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, formItem?: T, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
|
|
35
|
+
/**
|
|
36
|
+
* Runs editor action fetch function.
|
|
37
|
+
*
|
|
38
|
+
* @param action Action descriptor.
|
|
39
|
+
* @param itemId Item id.
|
|
40
|
+
* @param dataProvider Data provider
|
|
41
|
+
* @param sourceComponent Source component from where the fetch function was called.
|
|
42
|
+
* @param tableview Tableview component.
|
|
43
|
+
* @param actionData Additional action data.
|
|
44
|
+
*/
|
|
45
|
+
runEditorFetch<T, S>(action: ActionEditorDescriptor<T>, itemId?: IdType, dataProvider?: IEditorDataProvider<T, S>, sourceComponent?: any, tableview?: TableviewComponentService<T, S>, actionData?: ActionData): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>>;
|
|
46
|
+
/**
|
|
47
|
+
* Prepares action run context for action of type editor.
|
|
48
|
+
*
|
|
49
|
+
* @param item Item instance (if exists).
|
|
50
|
+
* @param itemId Item id (if exists).
|
|
51
|
+
* @param dataProvider Data provider.
|
|
52
|
+
* @param sourceComponent Source component from where the context preparation was called.
|
|
53
|
+
* @param tableview Tableview component.
|
|
54
|
+
* @param actionData Additional action data.
|
|
55
|
+
*/
|
|
56
|
+
private prepareRunContextForEditor;
|
|
57
|
+
/**
|
|
58
|
+
* Gets service instance of data provider.
|
|
59
|
+
*
|
|
60
|
+
* @param dataProvider Data provider instance.
|
|
61
|
+
*/
|
|
62
|
+
private getDataProviderService;
|
|
63
|
+
/**
|
|
64
|
+
* Activates action.
|
|
65
|
+
*
|
|
66
|
+
* @param action Action descriptor.
|
|
67
|
+
* @param item Item instance (if exists).
|
|
68
|
+
* @param itemId Item id (if exists).
|
|
69
|
+
* @param actionData Optional additional action data.
|
|
70
|
+
* @param tableview Tableview component.
|
|
71
|
+
* @param sourceComponent Source activation component.
|
|
72
|
+
*/
|
|
73
|
+
activateAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, tableview?: TableviewComponentService<T, S>, sourceComponent?: any): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>>;
|
|
74
|
+
/**
|
|
75
|
+
* Triggers action from table row click position.
|
|
76
|
+
*
|
|
77
|
+
* @param action Action descriptor.
|
|
78
|
+
* @param event Target table click event.
|
|
79
|
+
* @param route Currently activate route.
|
|
80
|
+
*/
|
|
81
|
+
triggerRowClickAction<T>(action: ActionDescriptor<T>, event: MngTableCellClickEvent<T>, route: ActivatedRoute): Observable<ActionTriggerResult<T, unknown, IDataProvider<T, unknown>>>;
|
|
82
|
+
/**
|
|
83
|
+
* Triggers action with optional data (item, itemId, ...) and currently activated route.
|
|
84
|
+
*
|
|
85
|
+
* @param action Action.
|
|
86
|
+
* @param actionData Optional action data.
|
|
87
|
+
* @param route Optional activated route.
|
|
88
|
+
*/
|
|
89
|
+
triggerAction<T, S>(action: ActionDescriptor<T>, itemId?: IdType, item?: T, actionData?: ActionData, route?: ActivatedRoute, tableview?: TableviewComponentService<T, S>, sourceComponent?: any): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>>;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngActionService, never>;
|
|
91
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MngActionService>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { Title } from '@angular/platform-browser';
|
|
3
|
+
import { MenuItem, PrimeNGConfig } from 'primeng/api';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { MngConfigurationService } from './configuration.service';
|
|
7
|
+
import { MngModuleConfig } from '../config/models';
|
|
8
|
+
import { IUser } from '../models';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class MngCommonsService {
|
|
11
|
+
private router;
|
|
12
|
+
private primengConfig;
|
|
13
|
+
private translate;
|
|
14
|
+
private titleService;
|
|
15
|
+
private configurationService;
|
|
16
|
+
private moduleConfig;
|
|
17
|
+
private localStorage;
|
|
18
|
+
private _menuMode;
|
|
19
|
+
private _menuModeSubject;
|
|
20
|
+
private _menuItems;
|
|
21
|
+
private _menuPinEnabled;
|
|
22
|
+
private _menuActiveKeySubject;
|
|
23
|
+
private _menuResetSubject;
|
|
24
|
+
private readonly breadcrumbHomeSubject;
|
|
25
|
+
private readonly breadcrumbsSubject;
|
|
26
|
+
private breadcrumbsTranslateSubscription?;
|
|
27
|
+
private breadcrumbHomeTranslateSubscription?;
|
|
28
|
+
private _colorScheme;
|
|
29
|
+
private _user?;
|
|
30
|
+
private userSubject;
|
|
31
|
+
constructor(router: Router, primengConfig: PrimeNGConfig, translate: TranslateService, titleService: Title, configurationService: MngConfigurationService, moduleConfig: MngModuleConfig, localStorage: Storage);
|
|
32
|
+
get appName(): string;
|
|
33
|
+
get appOwner(): string;
|
|
34
|
+
get appLogoLight(): string;
|
|
35
|
+
get appLogoDark(): string;
|
|
36
|
+
get appLogoNameLight(): string;
|
|
37
|
+
get appLogoNameDark(): string;
|
|
38
|
+
get appLanguages(): string[];
|
|
39
|
+
get appLanguage(): string;
|
|
40
|
+
set appLanguage(language: string);
|
|
41
|
+
get menuModeIsStatic(): boolean;
|
|
42
|
+
get menuModeIsStatic$(): Observable<boolean>;
|
|
43
|
+
get menuModeIsOverlay(): boolean;
|
|
44
|
+
get menuModeIsOverlay$(): Observable<boolean>;
|
|
45
|
+
get menuModeIsSlim(): boolean;
|
|
46
|
+
get menuModeIsSlim$(): Observable<boolean>;
|
|
47
|
+
get menuModeIsSidebar(): boolean;
|
|
48
|
+
get menuModeIsSidebar$(): Observable<boolean>;
|
|
49
|
+
get menuActiveKey$(): Observable<string>;
|
|
50
|
+
get menuReset$(): Observable<any>;
|
|
51
|
+
get menuItems(): MenuItem[];
|
|
52
|
+
set menuItems(menuItems: MenuItem[]);
|
|
53
|
+
get menuPinEnabled(): boolean;
|
|
54
|
+
get breadcrumbHome$(): Observable<MenuItem | null>;
|
|
55
|
+
get breadcrumbs$(): Observable<MenuItem[]>;
|
|
56
|
+
get colorSchemeIsLight(): boolean;
|
|
57
|
+
get colorSchemeIsDark(): boolean;
|
|
58
|
+
get user(): IUser;
|
|
59
|
+
get user$(): Observable<IUser>;
|
|
60
|
+
set user(user: IUser);
|
|
61
|
+
initialize(): void;
|
|
62
|
+
menuChangeActiveKey(key: string): void;
|
|
63
|
+
menuReset(): void;
|
|
64
|
+
private updateBreadcrumbs;
|
|
65
|
+
private generateHomeBreadcrumb;
|
|
66
|
+
private generateBreadcrumbs;
|
|
67
|
+
private createBreadcrumb;
|
|
68
|
+
setPageTitle(title?: string): void;
|
|
69
|
+
private formatPageTitle;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsService, never>;
|
|
71
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MngCommonsService>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare class MngConfigurationService {
|
|
4
|
+
private http;
|
|
5
|
+
private static _instance;
|
|
6
|
+
static init(httpClient: HttpClient): MngConfigurationService;
|
|
7
|
+
static get(): MngConfigurationService;
|
|
8
|
+
private projectEnvironment?;
|
|
9
|
+
private jsonEnvironments;
|
|
10
|
+
private configuration;
|
|
11
|
+
private constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Add project environment source.
|
|
14
|
+
* @param environemnt Environment.
|
|
15
|
+
*/
|
|
16
|
+
addEnvironmentSource(environment: any): void;
|
|
17
|
+
/**
|
|
18
|
+
* Adds new config source from JSON file.
|
|
19
|
+
* @param url Url to JSON file.
|
|
20
|
+
*/
|
|
21
|
+
addJsonSource(url?: string): Observable<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Get configuration.
|
|
24
|
+
*/
|
|
25
|
+
getConfig(): any;
|
|
26
|
+
/**
|
|
27
|
+
* Get configuration value for key.
|
|
28
|
+
* @param key Configuration key.
|
|
29
|
+
*/
|
|
30
|
+
getConfigValue(key: string): any;
|
|
31
|
+
/**
|
|
32
|
+
* Merges configuration from multiple sources with
|
|
33
|
+
*/
|
|
34
|
+
private mergeConfigs;
|
|
35
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { Location } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MngNavigationService {
|
|
5
|
+
private router;
|
|
6
|
+
private location;
|
|
7
|
+
private history;
|
|
8
|
+
constructor(router: Router, location: Location);
|
|
9
|
+
getCurrentLocation(): string | null;
|
|
10
|
+
getPreviousLocation(): string | null;
|
|
11
|
+
back(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MngNavigationService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MngNavigationService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { MngModuleConfig } from '../../config/models';
|
|
3
|
+
import { MngConfigurationService } from '../configuration.service';
|
|
4
|
+
export declare const mngConfigurationServiceProvider: (httpClient: HttpClient, moduleConfig: MngModuleConfig) => MngConfigurationService;
|
|
5
|
+
export declare function mngConfigJsonAppInitializerProvider(configService: MngConfigurationService, moduleConfig: MngModuleConfig): () => import("rxjs").Observable<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { ConfigOption } from '@ngx-formly/core';
|
|
3
|
+
import { MngModuleConfig } from '../../config/models';
|
|
4
|
+
export declare function mngFormlyConfigProvider(translate: TranslateService, moduleConfig?: MngModuleConfig): ConfigOption;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ClassType<T> extends Function {
|
|
2
|
+
new (...args: any[]): T;
|
|
3
|
+
}
|
|
4
|
+
export interface EnumType {
|
|
5
|
+
[key: number]: EnumMemberType;
|
|
6
|
+
}
|
|
7
|
+
export declare type EnumMemberType = string | number;
|
|
8
|
+
export declare type IdType = number | string;
|
|
9
|
+
export declare type PrimitiveType = string | boolean | number;
|
|
10
|
+
export declare type PropertyType = PrimitiveType | Date | EnumType;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
+
import { EditorDescriptor, AFieldDescriptor, FieldTabGroupDescriptor, FieldGroupDescriptor } from '../descriptors';
|
|
3
|
+
export declare class EditorFormlyUtil {
|
|
4
|
+
static createFormlyConfigFromDescriptor(descriptor: EditorDescriptor<any>): FormlyFieldConfig[];
|
|
5
|
+
static createFormlyTabType(tabGroups: FieldTabGroupDescriptor<any>[]): FormlyFieldConfig[];
|
|
6
|
+
static createFormlyGroupType(groups: FieldGroupDescriptor<any>[]): FormlyFieldConfig[];
|
|
7
|
+
static createFormlyFields(descriptor: FieldGroupDescriptor<any>): FormlyFieldConfig[];
|
|
8
|
+
static createFormlyField(descriptor: AFieldDescriptor<any, any>): FormlyFieldConfig;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ActionDescriptor, ModelDescriptor } from '../descriptors';
|
|
4
|
+
export declare class I18nUtil {
|
|
5
|
+
static instantModelTranslation(translate: TranslateService, model: ModelDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, i18nParams?: any): string | null;
|
|
6
|
+
static instantActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, functionNameKey?: string, i18nParams?: any): string | null;
|
|
7
|
+
static streamActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string): Observable<string | null>;
|
|
8
|
+
static getActionTranslation(translate: TranslateService, action: ActionDescriptor<any>, keyPath: string, customKey?: string, item?: any, fallbackKey?: string, oneTime?: boolean): Observable<string | null>;
|
|
9
|
+
private static getModelKeysByPriority;
|
|
10
|
+
private static getActionKeysByPriority;
|
|
11
|
+
static getModelI18nParams(model: ModelDescriptor<any>, item: any, i18nModelName?: string, i18nParameters?: any): any;
|
|
12
|
+
static getActionI18nParams(action: ActionDescriptor<any>, item: any, i18nModelName?: string, i18nParameters?: any, functionTitle?: string): any;
|
|
13
|
+
static instantModelName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null;
|
|
14
|
+
static getModelName(translate: TranslateService, model: ModelDescriptor<any>, oneTime?: boolean, singular?: boolean): Observable<string | null>;
|
|
15
|
+
static getModelNameKeys(model: ModelDescriptor<any>, singular?: boolean): string[];
|
|
16
|
+
private static selectKeyByPriority;
|
|
17
|
+
private static getFunctionTitle;
|
|
18
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ClassType } from '../types';
|
|
2
|
+
import { ILookupDescriptor } from '../descriptors';
|
|
3
|
+
export declare class ModelUtil {
|
|
4
|
+
static findIdAttribute<T>(classType: ClassType<T>): string | null;
|
|
5
|
+
static findTitleAttribute<T>(classType: ClassType<T>): string | null;
|
|
6
|
+
static trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { ActionDescriptor, TableDescriptor } from '../descriptors';
|
|
3
|
+
import { TableviewComponentService } from '../components/tableview/services';
|
|
4
|
+
export declare class ToastUtil {
|
|
5
|
+
static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, tableview?: TableviewComponentService<any, any>): void;
|
|
6
|
+
static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
|
|
7
|
+
static actionNotificationError(translationService: TranslateService, action: ActionDescriptor<any>, error: any, functionName: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
|
|
8
|
+
static getFormEditorWarningMessage(translationService: TranslateService, title: string, message: string): {
|
|
9
|
+
severity: string;
|
|
10
|
+
summary: any;
|
|
11
|
+
detail: any;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { ClassType } from '../types';
|
|
3
|
+
export declare class TypeUtil {
|
|
4
|
+
static defineReflectTypeName(targetType: ClassType<any>, typeName?: string): void;
|
|
5
|
+
/**
|
|
6
|
+
* Gets type name from either decorator or reflect metadata.
|
|
7
|
+
* @param type Class.
|
|
8
|
+
*/
|
|
9
|
+
static findTypeName(type: ClassType<any>): string;
|
|
10
|
+
/**
|
|
11
|
+
* Get value from decorator defined property name
|
|
12
|
+
* @param type Class.
|
|
13
|
+
*/
|
|
14
|
+
static getDecoratorTypeName(type: Function): string | undefined;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/core": "^13.1.0",
|
|
6
5
|
"@angular/common": "^13.1.0",
|
|
6
|
+
"@angular/core": "^13.1.0",
|
|
7
7
|
"@angular/forms": "^13.1.0",
|
|
8
8
|
"@angular/router": "^13.1.0",
|
|
9
9
|
"@ngx-formly/core": "^6.0.0-next.6",
|
|
@@ -11,7 +11,28 @@
|
|
|
11
11
|
"primeng": "^13.0.0"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
}
|
|
17
|
-
|
|
14
|
+
"reflect-metadata": "^0.1.13",
|
|
15
|
+
"tslib": "^2.3.0"
|
|
16
|
+
},
|
|
17
|
+
"module": "fesm2015/mediusinc-mng-commons.mjs",
|
|
18
|
+
"es2020": "fesm2020/mediusinc-mng-commons.mjs",
|
|
19
|
+
"esm2020": "esm2020/mediusinc-mng-commons.mjs",
|
|
20
|
+
"fesm2020": "fesm2020/mediusinc-mng-commons.mjs",
|
|
21
|
+
"fesm2015": "fesm2015/mediusinc-mng-commons.mjs",
|
|
22
|
+
"typings": "mediusinc-mng-commons.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
"./package.json": {
|
|
25
|
+
"default": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./mediusinc-mng-commons.d.ts",
|
|
29
|
+
"esm2020": "./esm2020/mediusinc-mng-commons.mjs",
|
|
30
|
+
"es2020": "./fesm2020/mediusinc-mng-commons.mjs",
|
|
31
|
+
"es2015": "./fesm2015/mediusinc-mng-commons.mjs",
|
|
32
|
+
"node": "./fesm2015/mediusinc-mng-commons.mjs",
|
|
33
|
+
"default": "./fesm2020/mediusinc-mng-commons.mjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": false,
|
|
37
|
+
"readme": "# Angular Commons\n\nCommons knjižnica za izgradnjo uporabniškega vmesnika na ogrodju Angular.\n\n## Predhodne zahteve\n\n- Node.js (LTS v14) in npm\n- pnpm package manager (https://pnpm.io/), ki optimizira delovanje privzetega npm.\n- Zahtevane skupne odvisnosti (peer dependencies)\n - Angular (moduli `@angular/core`, `@angular/common`, `@angular/forms`, `@angular/router`) verzije `^13.1.0`\n - Ngx Formly (modul `@ngx-formly/core`) verzije `^6.0.0-next.6`\n - Ngx Translate (module `@ngx-translate/core`) verzije `^14.0.0`\n - PrimeNG (modul `primeng`) verzije `^13.0.0`\n\n## Namestitev\n\n```bash\npnpm i @mediusinc/mng-commons\n```\n\n## Lokalizacija (i18n)\n\nModul `ngx-translate` se konfigurira na končnem projektu in je na končnem projektu potrebno določiti način za load prevodov.\nPrimer konfiguracije za multi-module HTTP loader:\n\n- HTTP loader factory:\n```ts\nexport function i18nHttpLoaderFactory(http: HttpClient) {\n return new MultiTranslateHttpLoader(http, [\n {prefix: './assets/i18n/mng/', suffix: '.json'},\n {prefix: './assets/i18n/', suffix: '.json'}\n ]);\n}\n```\n\n- Konfiguracija v `AppModule`:\n```ts\nTranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useFactory: i18nHttpLoaderFactory,\n deps: [HttpClient]\n }\n})\n```\n\n- Definicijo jezikov podamo preko konfiguracije `MngCommonsModule`:\n```ts\nMngCommonsModule.forRoot({\n languages: ['en', 'sl']\n})\n```\n\nKnjižnica pakira tudi osnovne prevode, ki so del modula. Za vključitev na zgornji način je potrebno dodati naslednjo konfiguracijo v `angular.json` med `assets` nastavitve:\n```json\n{\n \"glob\": \"**/*\",\n \"input\": \"./node_modules/@mediusinc/mng-commons/assets/i18n\",\n \"output\": \"/assets/i18n/mng\"\n}\n```\n\n## Tema\n\nOpcijsko se vključi tudi tema MNG Commons, ki ima dve svetlo in temno varianto.\nZa vključitev se v stile na končnem projektu doda import v `style.scss`:\n\n```scss\n# Za svetlo temo:\n@import '~../node_modules/@mediusinc/mng-commons/scss/mng-commons-light';\n\n# Za temno temo:\n@import '~../node_modules/@mediusinc/mng-commons/scss/mng-commons-dark';\n```\n\n~~~~\nPrimarno se uporablja svetla tema!\n~~~~\n\nPri uporabi temne teme je potrebno dodatno nastaviti tudi `colorMode` v modulu:\n```ts\nMngCommonsModule.forRoot({\n app: {\n colorScheme: 'dark'\n }\n});\n```\n\nTema za svoje delovanje uporablja primeNG stile (za posamezne komponente) in PrimeFlex kot pomožno CSS knjižnico.\nDodatno se lahko na končnem projektu lahko uporabi še ikone PrimeIcons.\nGlede ne preference se opcijsko dodajo naslednji importi (**pred importom MNG commons teme!**):\n\n```scss\n@import '~../node_modules/primeng/resources/primeng.min.css';\n@import '~../node_modules/primeflex/primeflex.scss';\n@import '~../node_modules/primeicons/primeicons.css';\n```\n\nPri prvem importu ni potrebno namestiti dodatnih odvisnosti (je že vključeno z primeng), za drugi dve pa je potrebno namestiti:\n```bash\npnpm i primeflex\npnpm i primeicons\n```\n\nDodajanje MNG Commons slik v `assets` na končnem projektu se uredi z konfiguracijo v `assets` segmentu znotraj `angular.json`, kjer se doda:\n\n```json\n{\n \"glob\": \"**/*\",\n \"input\": \"./node_modules/@mediusinc/mng-commons/assets/images\",\n \"output\": \"/assets/images/mng\"\n}\n```\n\n"
|
|
38
|
+
}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of mng-commons
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// module
|
|
6
1
|
export * from './lib/mng-commons.module';
|
|
7
|
-
|
|
8
|
-
// services
|
|
9
2
|
export * from './lib/api/services';
|
|
10
3
|
export * from './lib/components/layout/services';
|
|
11
4
|
export * from './lib/components/tableview/services';
|
|
12
5
|
export * from './lib/services';
|
|
13
6
|
export * from './lib/services/providers';
|
|
14
|
-
|
|
15
|
-
// utils
|
|
16
7
|
export * from './lib/api/utils';
|
|
17
8
|
export * from './lib/utils';
|
|
18
|
-
|
|
19
|
-
// components
|
|
20
9
|
export * from './lib/components/action';
|
|
21
10
|
export * from './lib/components/form';
|
|
22
11
|
export * from './lib/components/form/formly/fields';
|
|
23
12
|
export * from './lib/components/form/formly/wrappers';
|
|
24
13
|
export * from './lib/components/layout';
|
|
25
14
|
export * from './lib/components/tableview';
|
|
26
|
-
|
|
27
|
-
// directives
|
|
28
15
|
export * from './lib/directives';
|
|
29
|
-
|
|
30
|
-
// pipes
|
|
31
16
|
export * from './lib/pipes';
|
|
32
|
-
|
|
33
|
-
// models&other
|
|
34
17
|
export * from './lib/api/models';
|
|
35
18
|
export * from './lib/components/action/models';
|
|
36
19
|
export * from './lib/components/form/models';
|
package/.browserslistrc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
-
# For additional information regarding the format and rule options, please see:
|
|
3
|
-
# https://github.com/browserslist/browserslist#queries
|
|
4
|
-
|
|
5
|
-
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
-
# https://angular.io/guide/browser-support
|
|
7
|
-
|
|
8
|
-
# You can see what browsers were selected by your queries by running:
|
|
9
|
-
# npx browserslist
|
|
10
|
-
|
|
11
|
-
last 1 Chrome version
|
|
12
|
-
last 1 Firefox version
|
|
13
|
-
last 2 Edge major versions
|
|
14
|
-
# last 2 Safari major versions
|
|
15
|
-
last 2 iOS major versions
|
|
16
|
-
Firefox ESR
|