@mediusinc/mng-commons 0.0.1-rc.3 → 0.2.1-rc
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/.browserslistrc +16 -0
- package/README.md +96 -1
- package/assets/i18n/en.json +156 -0
- package/assets/i18n/sl.json +156 -0
- package/assets/images/effect-ondark.png +0 -0
- package/assets/images/effect-ondark.svg +38 -0
- package/assets/images/effect-ondark@2x.png +0 -0
- package/assets/images/effect-onlight.png +0 -0
- package/assets/images/effect-onlight.svg +38 -0
- package/assets/images/effect-onlight@2x.png +0 -0
- package/assets/images/pages/exception-ondark.png +0 -0
- package/assets/images/pages/exception-onlight.png +0 -0
- package/assets/images/pages/login-ondark.png +0 -0
- package/assets/images/pages/login-onlight.png +0 -0
- package/assets/templates/tableview-route.component.html +5 -0
- package/karma.conf.js +51 -0
- package/ng-package.json +14 -0
- package/package.json +3 -24
- package/scss/common/layout/_breadcrumb.scss +96 -0
- package/scss/common/layout/_config.scss +101 -0
- package/scss/common/layout/_dashboard.scss +16 -0
- package/scss/common/layout/_exception.scss +131 -0
- package/scss/common/layout/_footer.scss +29 -0
- package/scss/common/layout/_help.scss +157 -0
- package/scss/common/layout/_inlinemenu.scss +55 -0
- package/scss/common/layout/_invoice.scss +176 -0
- package/scss/common/layout/_landing.scss +639 -0
- package/scss/common/layout/_layout_dark.scss +23 -0
- package/scss/common/layout/_layout_light.scss +23 -0
- package/scss/common/layout/_loader.scss +18 -0
- package/scss/common/layout/_login.scss +106 -0
- package/scss/common/layout/_main.scss +45 -0
- package/scss/common/layout/_mixins.scss +214 -0
- package/scss/common/layout/_rightmenu.scss +125 -0
- package/scss/common/layout/_topbar.scss +189 -0
- package/scss/common/layout/_typography.scss +63 -0
- package/scss/common/layout/_utils.scss +96 -0
- package/scss/common/layout/_widgets.scss +391 -0
- package/scss/common/layout/menu/_menu.scss +7 -0
- package/scss/common/layout/menu/_menu_common.scss +183 -0
- package/scss/common/layout/menu/_menu_overlay.scss +52 -0
- package/scss/common/layout/menu/_menu_sidebar.scss +232 -0
- package/scss/common/layout/menu/_menu_slim.scss +138 -0
- package/scss/common/layout/menu/_menu_static.scss +70 -0
- package/scss/common/layout/menu/_menu_theme.scss +365 -0
- package/scss/common/theme/_theme_dark.scss +5 -0
- package/scss/common/theme/_theme_light.scss +5 -0
- package/scss/common/theme/designer/_colors.scss +18 -0
- package/scss/common/theme/designer/_common.scss +40 -0
- package/scss/common/theme/designer/_components.scss +101 -0
- package/scss/common/theme/designer/_mixins.scss +174 -0
- package/scss/common/theme/designer/components/button/_button.scss +560 -0
- package/scss/common/theme/designer/components/button/_speeddial.scss +79 -0
- package/scss/common/theme/designer/components/button/_splitbutton.scss +1 -0
- package/scss/common/theme/designer/components/data/_carousel.scss +37 -0
- package/scss/common/theme/designer/components/data/_datatable.scss +266 -0
- package/scss/common/theme/designer/components/data/_dataview.scss +55 -0
- package/scss/common/theme/designer/components/data/_filter.scss +138 -0
- package/scss/common/theme/designer/components/data/_fullcalendar.scss +324 -0
- package/scss/common/theme/designer/components/data/_orderlist.scss +91 -0
- package/scss/common/theme/designer/components/data/_organizationchart.scss +50 -0
- package/scss/common/theme/designer/components/data/_paginator.scss +83 -0
- package/scss/common/theme/designer/components/data/_picklist.scss +91 -0
- package/scss/common/theme/designer/components/data/_timeline.scss +38 -0
- package/scss/common/theme/designer/components/data/_tree.scss +144 -0
- package/scss/common/theme/designer/components/data/_treetable.scss +242 -0
- package/scss/common/theme/designer/components/data/_virtualscroller.scss +28 -0
- package/scss/common/theme/designer/components/file/_fileupload.scss +58 -0
- package/scss/common/theme/designer/components/input/_autocomplete.scss +103 -0
- package/scss/common/theme/designer/components/input/_calendar.scss +212 -0
- package/scss/common/theme/designer/components/input/_cascadeselect.scss +98 -0
- package/scss/common/theme/designer/components/input/_checkbox.scss +85 -0
- package/scss/common/theme/designer/components/input/_chips.scss +41 -0
- package/scss/common/theme/designer/components/input/_colorpicker.scss +19 -0
- package/scss/common/theme/designer/components/input/_dropdown.scss +136 -0
- package/scss/common/theme/designer/components/input/_editor.scss +122 -0
- package/scss/common/theme/designer/components/input/_inputgroup.scss +69 -0
- package/scss/common/theme/designer/components/input/_inputmask.scss +3 -0
- package/scss/common/theme/designer/components/input/_inputnumber.scss +3 -0
- package/scss/common/theme/designer/components/input/_inputswitch.scss +58 -0
- package/scss/common/theme/designer/components/input/_inputtext.scss +97 -0
- package/scss/common/theme/designer/components/input/_listbox.scss +82 -0
- package/scss/common/theme/designer/components/input/_multiselect.scss +164 -0
- package/scss/common/theme/designer/components/input/_password.scss +33 -0
- package/scss/common/theme/designer/components/input/_radiobutton.scss +78 -0
- package/scss/common/theme/designer/components/input/_rating.scss +48 -0
- package/scss/common/theme/designer/components/input/_selectbutton.scss +50 -0
- package/scss/common/theme/designer/components/input/_slider.scss +69 -0
- package/scss/common/theme/designer/components/input/_togglebutton.scss +48 -0
- package/scss/common/theme/designer/components/input/_treeselect.scss +89 -0
- package/scss/common/theme/designer/components/menu/_breadcrumb.scss +42 -0
- package/scss/common/theme/designer/components/menu/_contextmenu.scss +50 -0
- package/scss/common/theme/designer/components/menu/_dock.scss +51 -0
- package/scss/common/theme/designer/components/menu/_megamenu.scss +102 -0
- package/scss/common/theme/designer/components/menu/_menu.scss +41 -0
- package/scss/common/theme/designer/components/menu/_menubar.scss +179 -0
- package/scss/common/theme/designer/components/menu/_panelmenu.scss +137 -0
- package/scss/common/theme/designer/components/menu/_slidemenu.scss +55 -0
- package/scss/common/theme/designer/components/menu/_steps.scss +55 -0
- package/scss/common/theme/designer/components/menu/_tabmenu.scss +49 -0
- package/scss/common/theme/designer/components/menu/_tieredmenu.scss +56 -0
- package/scss/common/theme/designer/components/messages/_inlinemessage.scss +64 -0
- package/scss/common/theme/designer/components/messages/_message.scss +102 -0
- package/scss/common/theme/designer/components/messages/_toast.scss +95 -0
- package/scss/common/theme/designer/components/misc/_avatar.scss +30 -0
- package/scss/common/theme/designer/components/misc/_badge.scss +48 -0
- package/scss/common/theme/designer/components/misc/_blockui.scss +3 -0
- package/scss/common/theme/designer/components/misc/_chip.scss +36 -0
- package/scss/common/theme/designer/components/misc/_inplace.scss +17 -0
- package/scss/common/theme/designer/components/misc/_progressbar.scss +17 -0
- package/scss/common/theme/designer/components/misc/_scrolltop.scss +20 -0
- package/scss/common/theme/designer/components/misc/_skeleton.scss +8 -0
- package/scss/common/theme/designer/components/misc/_tag.scss +33 -0
- package/scss/common/theme/designer/components/misc/_terminal.scss +11 -0
- package/scss/common/theme/designer/components/multimedia/_galleria.scss +141 -0
- package/scss/common/theme/designer/components/overlay/_confirmpopup.scss +67 -0
- package/scss/common/theme/designer/components/overlay/_dialog.scss +63 -0
- package/scss/common/theme/designer/components/overlay/_overlaypanel.scss +62 -0
- package/scss/common/theme/designer/components/overlay/_sidebar.scss +27 -0
- package/scss/common/theme/designer/components/overlay/_tooltip.scss +33 -0
- package/scss/common/theme/designer/components/panel/_accordion.scss +119 -0
- package/scss/common/theme/designer/components/panel/_card.scss +30 -0
- package/scss/common/theme/designer/components/panel/_divider.scss +31 -0
- package/scss/common/theme/designer/components/panel/_fieldset.scss +47 -0
- package/scss/common/theme/designer/components/panel/_panel.scss +42 -0
- package/scss/common/theme/designer/components/panel/_scrollpanel.scss +6 -0
- package/scss/common/theme/designer/components/panel/_splitter.scss +19 -0
- package/scss/common/theme/designer/components/panel/_tabview.scss +66 -0
- package/scss/common/theme/designer/components/panel/_toolbar.scss +10 -0
- package/scss/common/theme/extensions/_button.scss +99 -0
- package/scss/common/theme/extensions/_calendar.scss +18 -0
- package/scss/common/theme/extensions/_card.scss +6 -0
- package/scss/common/theme/extensions/_carousel.scss +13 -0
- package/scss/common/theme/extensions/_checkbox.scss +10 -0
- package/scss/common/theme/extensions/_contextmenu.scss +16 -0
- package/scss/common/theme/extensions/_datatable.scss +83 -0
- package/scss/common/theme/extensions/_dialog.scss +14 -0
- package/scss/common/theme/extensions/_fieldset.scss +6 -0
- package/scss/common/theme/extensions/_galleria.scss +25 -0
- package/scss/common/theme/extensions/_megamenu.scss +18 -0
- package/scss/common/theme/extensions/_menu.scss +14 -0
- package/scss/common/theme/extensions/_menubar.scss +14 -0
- package/scss/common/theme/extensions/_orderlist.scss +38 -0
- package/scss/common/theme/extensions/_paginator.scss +19 -0
- package/scss/common/theme/extensions/_panelmenu.scss +20 -0
- package/scss/common/theme/extensions/_password.scss +5 -0
- package/scss/common/theme/extensions/_picklist.scss +38 -0
- package/scss/common/theme/extensions/_radiobutton.scss +8 -0
- package/scss/common/theme/extensions/_sidebar.scss +19 -0
- package/scss/common/theme/extensions/_slidemenu.scss +10 -0
- package/scss/common/theme/extensions/_slider.scss +6 -0
- package/scss/common/theme/extensions/_steps.scss +50 -0
- package/scss/common/theme/extensions/_tieredmenu.scss +14 -0
- package/scss/common/theme/extensions/_toast.scss +6 -0
- package/scss/common/theme/extensions/_tree.scss +36 -0
- package/scss/common/theme/extensions/_treetable.scss +35 -0
- package/scss/common/theme/extensions/_vendor_extensions.scss +27 -0
- package/scss/common/variables/layout/_common.scss +12 -0
- package/scss/common/variables/layout/_layout_dark.scss +71 -0
- package/scss/common/variables/layout/_layout_light.scss +71 -0
- package/scss/common/variables/theme/_theme_dark.scss +897 -0
- package/scss/common/variables/theme/_theme_light.scss +885 -0
- package/scss/layout/default/_mng-variables-layout-dark.scss +2 -0
- package/scss/layout/default/_mng-variables-layout-light.scss +2 -0
- package/scss/layout/default/layout-dark.scss +2 -0
- package/scss/layout/default/layout-light.scss +2 -0
- package/scss/mng-commons-dark.scss +5 -0
- package/scss/mng-commons-light.scss +5 -0
- package/scss/mng-overrides/_layout_action.scss +3 -0
- package/scss/mng-overrides/_layout_dialog.scss +34 -0
- package/scss/mng-overrides/_layout_forms.scss +31 -0
- package/scss/mng-overrides/_layout_radio.scss +3 -0
- package/scss/mng-overrides/_layout_styles.scss +4 -0
- package/scss/mng-overrides/_theme_datatable.scss +9 -0
- package/scss/mng-overrides/_theme_dialog.scss +9 -0
- package/scss/mng-overrides/_theme_dropdown.scss +6 -0
- package/scss/mng-overrides/_theme_styles.scss +9 -0
- package/scss/mng-overrides/_theme_tableview.scss +94 -0
- package/scss/theme/default/_mng-variables-theme-dark.scss +8 -0
- package/scss/theme/default/_mng-variables-theme-light.scss +8 -0
- package/scss/theme/default/theme-dark.scss +2 -0
- package/scss/theme/default/theme-light.scss +2 -0
- package/src/lib/api/models/builders/query-param.builder.ts +54 -0
- package/src/lib/api/models/filter-match-type.model.ts +25 -0
- package/src/lib/api/models/filter-param.model.ts +59 -0
- package/{lib/api/models/index.d.ts → src/lib/api/models/index.ts} +10 -8
- package/src/lib/api/models/mappers.ts +18 -0
- package/{lib/api/models/query-mode.model.d.ts → src/lib/api/models/query-mode.model.ts} +18 -16
- package/src/lib/api/models/query-param.model.ts +99 -0
- package/src/lib/api/models/query-result.model.ts +77 -0
- package/{lib/api/models/serialization.model.d.ts → src/lib/api/models/serialization.model.ts} +9 -8
- package/src/lib/api/services/crud-api.abstract.service.ts +113 -0
- package/src/lib/api/services/index.ts +1 -0
- package/{lib/api/utils/index.d.ts → src/lib/api/utils/index.ts} +2 -2
- package/src/lib/api/utils/medius-rest.util.ts +146 -0
- package/src/lib/api/utils/object-serializer.util.ts +227 -0
- package/src/lib/components/action/action.component.html +30 -0
- package/src/lib/components/action/action.component.ts +77 -0
- package/src/lib/components/action/dialog/action-dialog.component.html +26 -0
- package/src/lib/components/action/dialog/action-dialog.component.ts +171 -0
- package/{lib/components/action/index.d.ts → src/lib/components/action/index.ts} +3 -3
- package/src/lib/components/action/models/action-confirmation-service.model.ts +7 -0
- package/src/lib/components/action/models/action-execution.model.ts +81 -0
- package/src/lib/components/action/models/index.ts +2 -0
- package/src/lib/components/action/route/action-route.component.html +1 -0
- package/src/lib/components/action/route/action-route.component.ts +159 -0
- package/src/lib/components/form/autocomplete/autocomplete.component.html +16 -0
- package/src/lib/components/form/autocomplete/autocomplete.component.ts +113 -0
- package/src/lib/components/form/dropdown/dropdown.component.html +29 -0
- package/src/lib/components/form/dropdown/dropdown.component.ts +109 -0
- package/src/lib/components/form/editor/form-editor.component.html +5 -0
- package/src/lib/components/form/editor/form-editor.component.ts +149 -0
- package/src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.html +7 -0
- package/src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.ts +21 -0
- package/src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.html +9 -0
- package/src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.ts +22 -0
- package/src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.html +8 -0
- package/src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.ts +10 -0
- package/src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.html +56 -0
- package/src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.ts +22 -0
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.html +13 -0
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.scss +4 -0
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.ts +114 -0
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.html +37 -0
- package/src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.ts +133 -0
- package/src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.html +10 -0
- package/src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.ts +10 -0
- package/{lib/components/form/formly/fields/index.d.ts → src/lib/components/form/formly/fields/index.ts} +7 -7
- package/src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.html +7 -0
- package/src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.ts +13 -0
- package/src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.html +6 -0
- package/src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.ts +13 -0
- package/{lib/components/form/formly/wrappers/index.d.ts → src/lib/components/form/formly/wrappers/index.ts} +2 -2
- package/src/lib/components/form/index.ts +3 -0
- package/src/lib/components/form/models/form-editor.event.ts +7 -0
- package/src/lib/components/form/models/index.ts +1 -0
- package/src/lib/components/layout/breadcrumb.component.html +5 -0
- package/src/lib/components/layout/breadcrumb.component.ts +12 -0
- package/src/lib/components/layout/footer.component.html +7 -0
- package/src/lib/components/layout/footer.component.ts +15 -0
- package/src/lib/components/layout/index.ts +6 -0
- package/src/lib/components/layout/main-layout.component.html +26 -0
- package/src/lib/components/layout/main-layout.component.ts +54 -0
- package/src/lib/components/layout/menu-item.component.html +41 -0
- package/src/lib/components/layout/menu-item.component.ts +170 -0
- package/src/lib/components/layout/menu.component.html +27 -0
- package/src/lib/components/layout/menu.component.ts +17 -0
- package/src/lib/components/layout/services/index.ts +1 -0
- package/src/lib/components/layout/services/main-layout.component.service.ts +231 -0
- package/src/lib/components/layout/topbar.component.html +38 -0
- package/src/lib/components/layout/topbar.component.ts +62 -0
- package/{lib/components/tableview/index.d.ts → src/lib/components/tableview/index.ts} +5 -3
- package/src/lib/components/tableview/models/index.ts +1 -0
- package/src/lib/components/tableview/models/table.event.ts +22 -0
- package/src/lib/components/tableview/route/tableview-route.abstract.component.ts +31 -0
- package/src/lib/components/tableview/services/index.ts +1 -0
- package/src/lib/components/tableview/services/tableview.component.service.ts +22 -0
- package/src/lib/components/tableview/table/column-filter/column-filter.component.html +36 -0
- package/src/lib/components/tableview/table/column-filter/column-filter.component.ts +70 -0
- package/src/lib/components/tableview/table/column-value/column-value.component.html +14 -0
- package/src/lib/components/tableview/table/column-value/column-value.component.ts +19 -0
- package/src/lib/components/tableview/table/table.component.html +110 -0
- package/src/lib/components/tableview/table/table.component.ts +327 -0
- package/src/lib/components/tableview/tableview.component.html +37 -0
- package/src/lib/components/tableview/tableview.component.ts +78 -0
- package/src/lib/config/formly.config.ts +154 -0
- package/{lib/config/index.d.ts → src/lib/config/index.ts} +1 -1
- package/{lib/models/config/index.d.ts → src/lib/config/models/index.ts} +1 -1
- package/src/lib/config/models/mng-config.model.ts +35 -0
- package/src/lib/data-providers/base.data-provider.ts +42 -0
- package/src/lib/data-providers/editor.data-provider.ts +60 -0
- package/src/lib/data-providers/index.ts +5 -0
- package/src/lib/data-providers/lookup.data-provider.ts +29 -0
- package/src/lib/data-providers/table.data-provider.ts +8 -0
- package/src/lib/data-providers/tableview.data-provider.ts +29 -0
- package/src/lib/descriptors/action.descriptor.ts +439 -0
- package/src/lib/descriptors/editor.descriptor.ts +880 -0
- package/src/lib/descriptors/field.validator.ts +35 -0
- package/src/lib/descriptors/index.ts +7 -0
- package/src/lib/descriptors/lookup.descriptor.ts +20 -0
- package/src/lib/descriptors/model.descriptor.ts +47 -0
- package/src/lib/descriptors/table.descriptor.ts +514 -0
- package/src/lib/descriptors/tableview.descriptor.ts +180 -0
- package/src/lib/directives/component.directive.ts +18 -0
- package/src/lib/directives/index.ts +2 -0
- package/src/lib/directives/template.directive.ts +24 -0
- package/src/lib/mng-commons.module.ts +240 -0
- package/src/lib/models/index.ts +2 -0
- package/src/lib/models/router.model.ts +16 -0
- package/src/lib/models/user.model.ts +9 -0
- package/src/lib/pipes/boolean.pipe.ts +17 -0
- package/{lib/pipes/index.d.ts → src/lib/pipes/index.ts} +2 -1
- package/src/lib/pipes/property-path.pipe.ts +30 -0
- package/src/lib/services/action.service.ts +310 -0
- package/src/lib/services/commons.service.ts +407 -0
- package/src/lib/services/configuration.service.ts +98 -0
- package/{lib/services/index.d.ts → src/lib/services/index.ts} +4 -6
- package/src/lib/services/navigation.service.ts +42 -0
- package/src/lib/services/providers/commons-init.provider.ts +5 -0
- package/src/lib/services/providers/config-service.provider.ts +22 -0
- package/src/lib/services/providers/formly-config.provider.ts +39 -0
- package/{lib/services/providers/index.d.ts → src/lib/services/providers/index.ts} +3 -2
- package/src/lib/services/tokens/browser-storage.token.ts +9 -0
- package/src/lib/services/tokens/index.ts +2 -0
- package/src/lib/services/tokens/module-config.token.ts +5 -0
- package/{lib/models/types/index.d.ts → src/lib/types/index.ts} +2 -2
- package/src/lib/types/type.decorator.ts +7 -0
- package/src/lib/types/type.model.ts +12 -0
- package/src/lib/utils/editor-formly.util.ts +193 -0
- package/src/lib/utils/i18n.util.ts +148 -0
- package/{lib/utils/index.d.ts → src/lib/utils/index.ts} +5 -4
- package/src/lib/utils/model.util.ts +66 -0
- package/src/lib/utils/toast.util.ts +49 -0
- package/src/lib/utils/type.util.ts +44 -0
- package/{public-api.d.ts → src/public-api.ts} +42 -22
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2020/lib/api/models/builders/query-param.builder.mjs +0 -49
- package/esm2020/lib/api/models/filter-match-type.model.mjs +0 -24
- package/esm2020/lib/api/models/filter-param.model.mjs +0 -46
- package/esm2020/lib/api/models/index.mjs +0 -9
- package/esm2020/lib/api/models/mappers.mjs +0 -17
- package/esm2020/lib/api/models/query-mode.model.mjs +0 -19
- package/esm2020/lib/api/models/query-param.model.mjs +0 -69
- package/esm2020/lib/api/models/query-result.model.mjs +0 -45
- package/esm2020/lib/api/models/serialization.model.mjs +0 -2
- package/esm2020/lib/api/services/abstract-crud-api.service.mjs +0 -72
- package/esm2020/lib/api/services/index.mjs +0 -2
- package/esm2020/lib/api/utils/index.mjs +0 -3
- package/esm2020/lib/api/utils/medius-rest.util.mjs +0 -70
- package/esm2020/lib/api/utils/object-serializer.util.mjs +0 -226
- package/esm2020/lib/components/action/action.component.mjs +0 -63
- package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +0 -148
- package/esm2020/lib/components/action/index.mjs +0 -4
- package/esm2020/lib/components/action/route/action-route.component.mjs +0 -144
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +0 -140
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +0 -58
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +0 -51
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +0 -16
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +0 -26
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +0 -94
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +0 -124
- package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +0 -17
- package/esm2020/lib/components/form/formly/fields/index.mjs +0 -8
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +0 -17
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +0 -16
- package/esm2020/lib/components/form/formly/wrappers/index.mjs +0 -3
- package/esm2020/lib/components/form/index.mjs +0 -2
- package/esm2020/lib/components/layout/app.breadcrumb.component.mjs +0 -27
- package/esm2020/lib/components/layout/app.footer.component.mjs +0 -35
- package/esm2020/lib/components/layout/app.main.component.mjs +0 -25
- package/esm2020/lib/components/layout/app.main.component.service.mjs +0 -133
- package/esm2020/lib/components/layout/app.menu.component.mjs +0 -38
- package/esm2020/lib/components/layout/app.menuitem.component.mjs +0 -243
- package/esm2020/lib/components/layout/app.topbar.component.mjs +0 -135
- package/esm2020/lib/components/layout/index.mjs +0 -7
- package/esm2020/lib/components/tableview/index.mjs +0 -4
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +0 -31
- package/esm2020/lib/components/tableview/table/table.component.mjs +0 -173
- package/esm2020/lib/components/tableview/tableview.component.mjs +0 -82
- package/esm2020/lib/components/tableview/tableview.component.service.mjs +0 -18
- package/esm2020/lib/config/formly.config.mjs +0 -165
- package/esm2020/lib/config/index.mjs +0 -2
- package/esm2020/lib/directives/index.mjs +0 -2
- package/esm2020/lib/directives/template.directive.mjs +0 -25
- package/esm2020/lib/mng-commons.module.mjs +0 -338
- package/esm2020/lib/models/action/action.model.mjs +0 -58
- package/esm2020/lib/models/action/index.mjs +0 -2
- package/esm2020/lib/models/config/index.mjs +0 -2
- package/esm2020/lib/models/config/mng-config.model.mjs +0 -3
- package/esm2020/lib/models/descriptors/action-descriptor.model.mjs +0 -283
- package/esm2020/lib/models/descriptors/editor-descriptor.model.mjs +0 -647
- package/esm2020/lib/models/descriptors/index.mjs +0 -6
- package/esm2020/lib/models/descriptors/model-descriptor.model.mjs +0 -34
- package/esm2020/lib/models/descriptors/table-descriptor.model.mjs +0 -123
- package/esm2020/lib/models/descriptors/tableview-descriptor.model.mjs +0 -124
- package/esm2020/lib/models/events/editor-event.model.mjs +0 -14
- package/esm2020/lib/models/events/index.mjs +0 -3
- package/esm2020/lib/models/events/table-event.model.mjs +0 -16
- package/esm2020/lib/models/interfaces/confirmation-service.model.mjs +0 -2
- package/esm2020/lib/models/interfaces/index.mjs +0 -2
- package/esm2020/lib/models/providers/data-provider.model.mjs +0 -86
- package/esm2020/lib/models/providers/index.mjs +0 -2
- package/esm2020/lib/models/types/index.mjs +0 -3
- package/esm2020/lib/models/types/type.decorator.mjs +0 -8
- package/esm2020/lib/models/types/type.model.mjs +0 -2
- package/esm2020/lib/models/validators/field.validator.mjs +0 -21
- package/esm2020/lib/models/validators/index.mjs +0 -2
- package/esm2020/lib/pipes/index.mjs +0 -2
- package/esm2020/lib/pipes/property-path.pipe.mjs +0 -36
- package/esm2020/lib/services/action.service.mjs +0 -239
- package/esm2020/lib/services/breadcrumb.service.mjs +0 -21
- package/esm2020/lib/services/configuration.service.mjs +0 -77
- package/esm2020/lib/services/index.mjs +0 -7
- package/esm2020/lib/services/menu.service.mjs +0 -26
- package/esm2020/lib/services/navigation.service.mjs +0 -49
- package/esm2020/lib/services/providers/config-service.provider.mjs +0 -12
- package/esm2020/lib/services/providers/formly-config.provider.mjs +0 -31
- package/esm2020/lib/services/providers/index.mjs +0 -3
- package/esm2020/lib/services/settings.service.mjs +0 -40
- package/esm2020/lib/utils/editor-formly.util.mjs +0 -165
- package/esm2020/lib/utils/i18n.util.mjs +0 -75
- package/esm2020/lib/utils/index.mjs +0 -5
- package/esm2020/lib/utils/model.util.mjs +0 -38
- package/esm2020/lib/utils/type.util.mjs +0 -43
- package/esm2020/mediusinc-mng-commons.mjs +0 -5
- package/esm2020/public-api.mjs +0 -33
- package/fesm2015/mediusinc-mng-commons.mjs +0 -5056
- package/fesm2015/mediusinc-mng-commons.mjs.map +0 -1
- package/fesm2020/mediusinc-mng-commons.mjs +0 -5012
- package/fesm2020/mediusinc-mng-commons.mjs.map +0 -1
- package/lib/api/models/builders/query-param.builder.d.ts +0 -11
- package/lib/api/models/filter-match-type.model.d.ts +0 -21
- package/lib/api/models/filter-param.model.d.ts +0 -23
- package/lib/api/models/mappers.d.ts +0 -6
- package/lib/api/models/query-param.model.d.ts +0 -31
- package/lib/api/models/query-result.model.d.ts +0 -36
- package/lib/api/services/abstract-crud-api.service.d.ts +0 -23
- package/lib/api/services/index.d.ts +0 -1
- package/lib/api/utils/medius-rest.util.d.ts +0 -6
- package/lib/api/utils/object-serializer.util.d.ts +0 -30
- package/lib/components/action/action.component.d.ts +0 -36
- package/lib/components/action/dialog/action-dialog.component.d.ts +0 -48
- package/lib/components/action/route/action-route.component.d.ts +0 -32
- package/lib/components/form/editor/form-editor.component.d.ts +0 -37
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +0 -21
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +0 -19
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +0 -6
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +0 -12
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +0 -17
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +0 -36
- package/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +0 -6
- package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +0 -8
- package/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.d.ts +0 -8
- package/lib/components/form/index.d.ts +0 -1
- package/lib/components/layout/app.breadcrumb.component.d.ts +0 -16
- package/lib/components/layout/app.footer.component.d.ts +0 -8
- package/lib/components/layout/app.main.component.d.ts +0 -12
- package/lib/components/layout/app.main.component.service.d.ts +0 -40
- package/lib/components/layout/app.menu.component.d.ts +0 -14
- package/lib/components/layout/app.menuitem.component.d.ts +0 -31
- package/lib/components/layout/app.topbar.component.d.ts +0 -16
- package/lib/components/layout/index.d.ts +0 -6
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +0 -15
- package/lib/components/tableview/table/table.component.d.ts +0 -47
- package/lib/components/tableview/tableview.component.d.ts +0 -36
- package/lib/components/tableview/tableview.component.service.d.ts +0 -11
- package/lib/config/formly.config.d.ts +0 -8
- package/lib/directives/index.d.ts +0 -1
- package/lib/directives/template.directive.d.ts +0 -11
- package/lib/mng-commons.module.d.ts +0 -74
- package/lib/models/action/action.model.d.ts +0 -53
- package/lib/models/action/index.d.ts +0 -1
- package/lib/models/config/mng-config.model.d.ts +0 -19
- package/lib/models/descriptors/action-descriptor.model.d.ts +0 -124
- package/lib/models/descriptors/editor-descriptor.model.d.ts +0 -248
- package/lib/models/descriptors/index.d.ts +0 -5
- package/lib/models/descriptors/model-descriptor.model.d.ts +0 -15
- package/lib/models/descriptors/table-descriptor.model.d.ts +0 -45
- package/lib/models/descriptors/tableview-descriptor.model.d.ts +0 -38
- package/lib/models/events/editor-event.model.d.ts +0 -11
- package/lib/models/events/index.d.ts +0 -2
- package/lib/models/events/table-event.model.d.ts +0 -17
- package/lib/models/interfaces/confirmation-service.model.d.ts +0 -6
- package/lib/models/interfaces/index.d.ts +0 -1
- package/lib/models/providers/data-provider.model.d.ts +0 -62
- package/lib/models/providers/index.d.ts +0 -1
- package/lib/models/types/type.decorator.d.ts +0 -2
- package/lib/models/types/type.model.d.ts +0 -10
- package/lib/models/validators/field.validator.d.ts +0 -18
- package/lib/models/validators/index.d.ts +0 -1
- package/lib/pipes/property-path.pipe.d.ts +0 -7
- package/lib/services/action.service.d.ts +0 -92
- package/lib/services/breadcrumb.service.d.ts +0 -9
- package/lib/services/configuration.service.d.ts +0 -35
- package/lib/services/menu.service.d.ts +0 -11
- package/lib/services/navigation.service.d.ts +0 -14
- package/lib/services/providers/config-service.provider.d.ts +0 -5
- package/lib/services/providers/formly-config.provider.d.ts +0 -4
- package/lib/services/settings.service.d.ts +0 -18
- package/lib/utils/editor-formly.util.d.ts +0 -9
- package/lib/utils/i18n.util.d.ts +0 -14
- package/lib/utils/model.util.d.ts +0 -5
- package/lib/utils/type.util.d.ts +0 -15
- package/mediusinc-mng-commons-0.0.1-rc.3.tgz +0 -0
- package/mediusinc-mng-commons.d.ts +0 -5
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import {AbstractControl} from '@angular/forms';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ModelDescriptor,
|
|
5
|
+
AFieldDescriptor,
|
|
6
|
+
EditorDescriptor,
|
|
7
|
+
FieldInputDescriptor,
|
|
8
|
+
FieldLookupDescriptor,
|
|
9
|
+
FieldLookupEnumDescriptor,
|
|
10
|
+
FieldManyEditorDescriptor,
|
|
11
|
+
FieldManyToManyEditorDescriptor,
|
|
12
|
+
ColumnDescriptor,
|
|
13
|
+
TableDescriptor
|
|
14
|
+
} from './';
|
|
15
|
+
import {ClassType, EnumMemberType} from '../types';
|
|
16
|
+
|
|
17
|
+
export class TableviewDescriptor<T> {
|
|
18
|
+
|
|
19
|
+
private readonly _model: ModelDescriptor<T>;
|
|
20
|
+
private _table: TableDescriptor<T>;
|
|
21
|
+
private _viewEditor: EditorDescriptor<T>;
|
|
22
|
+
private _addEditor: EditorDescriptor<T>;
|
|
23
|
+
private _editEditor: EditorDescriptor<T>;
|
|
24
|
+
private _tableTitle: string;
|
|
25
|
+
|
|
26
|
+
constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {
|
|
27
|
+
this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);
|
|
28
|
+
this._table = new TableDescriptor<T>(modelType, idProperty, titleProperty);
|
|
29
|
+
this._viewEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty);
|
|
30
|
+
this._viewEditor.withDisabled();
|
|
31
|
+
this._addEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty);
|
|
32
|
+
this._editEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty);
|
|
33
|
+
this._tableTitle = `${this._model.typeName}.name`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public get model() {
|
|
37
|
+
return this._model;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public get table() {
|
|
41
|
+
return this._table;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public get viewEditor() {
|
|
45
|
+
return this._viewEditor;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public get addEditor() {
|
|
49
|
+
return this._addEditor;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public get editEditor() {
|
|
53
|
+
return this._editEditor;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public get tableTitle() {
|
|
57
|
+
return this._tableTitle;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public withTableDescriptor(descriptor: TableDescriptor<T>): this {
|
|
61
|
+
this._table = descriptor;
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public withViewDescriptor(descriptor: EditorDescriptor<T>): this {
|
|
66
|
+
this._viewEditor = descriptor;
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public withAddDescriptor(descriptor: EditorDescriptor<T>): this {
|
|
71
|
+
this._addEditor = descriptor;
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public withEditDescriptor(descriptor: EditorDescriptor<T>): this {
|
|
76
|
+
this._editEditor = descriptor;
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public withTableTitle(title: string): this {
|
|
81
|
+
this._tableTitle = title;
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public withValidator(name: string, expression: (control: AbstractControl) => boolean): this {
|
|
86
|
+
this._viewEditor.addValidator(name, expression);
|
|
87
|
+
this._addEditor.addValidator(name, expression);
|
|
88
|
+
this._editEditor.addValidator(name, expression);
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T> {
|
|
93
|
+
return this._table.addColumnDescriptor<CT>(column);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public addColumn(property: string): ColumnDescriptor<string, T> {
|
|
97
|
+
return this._table.addColumn(property);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T> {
|
|
101
|
+
return this._table.addColumnNumber(property, displayFormat);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T> {
|
|
105
|
+
return this._table.addColumnDate(property, displayFormat);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public addColumnBoolean(property: string): ColumnDescriptor<boolean, T> {
|
|
109
|
+
return this._table.addColumnBoolean(property);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public addColumnObject<CT>(property: string, modelType: ClassType<CT>, displayProperty: string): ColumnDescriptor<CT, T> {
|
|
113
|
+
return this._table.addColumnObject(property, modelType, displayProperty);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public createTabGroup(name: string, title?: string): this {
|
|
117
|
+
this._viewEditor.createTabGroup(name, title);
|
|
118
|
+
this._addEditor.createTabGroup(name, title);
|
|
119
|
+
this._editEditor.createTabGroup(name, title);
|
|
120
|
+
return this;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public createFieldGroup(name: string, title?: string): this {
|
|
124
|
+
this._viewEditor.createFieldGroup(name, title);
|
|
125
|
+
this._addEditor.createFieldGroup(name, title);
|
|
126
|
+
this._editEditor.createFieldGroup(name, title);
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
public addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this {
|
|
131
|
+
this._viewEditor.addFieldDescriptor(field);
|
|
132
|
+
this._addEditor.addFieldDescriptor(field);
|
|
133
|
+
this._editEditor.addFieldDescriptor(field);
|
|
134
|
+
return this;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
public addField(property: string): FieldInputDescriptor<T> {
|
|
138
|
+
const field = this._viewEditor.addField(property);
|
|
139
|
+
this._addEditor.addFieldDescriptor(field);
|
|
140
|
+
this._editEditor.addFieldDescriptor(field);
|
|
141
|
+
return field;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
public addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T> {
|
|
145
|
+
const field = this._viewEditor.addFieldLookup(property, modelType);
|
|
146
|
+
this._addEditor.addFieldDescriptor(field);
|
|
147
|
+
this._editEditor.addFieldDescriptor(field);
|
|
148
|
+
return field;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
public addFieldLookupEnum(property: string, options: Array<EnumMemberType>): FieldLookupEnumDescriptor<T> {
|
|
152
|
+
const field = this._viewEditor.addFieldLookupEnum(property, options);
|
|
153
|
+
this._addEditor.addFieldDescriptor(field);
|
|
154
|
+
this._editEditor.addFieldDescriptor(field);
|
|
155
|
+
return field;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public addFieldManyEditor<FT>(property: string, type: ClassType<FT>, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T> {
|
|
159
|
+
const field = this._viewEditor.addFieldManyEditor(property, type, tableviewDescriptor);
|
|
160
|
+
this._addEditor.addFieldDescriptor(field);
|
|
161
|
+
this._editEditor.addFieldDescriptor(field);
|
|
162
|
+
return field;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
public addFieldManyToManyEditor<FT>(property: string, type: ClassType<FT>, mainTableDescriptor: TableDescriptor<FT>, lookupTableDescriptor: TableDescriptor<FT>): FieldManyToManyEditorDescriptor<FT, T> {
|
|
166
|
+
const field = this._viewEditor.addFieldManyToManyEditor(property, type, mainTableDescriptor, lookupTableDescriptor);
|
|
167
|
+
this._addEditor.addFieldDescriptor(field);
|
|
168
|
+
this._editEditor.addFieldDescriptor(field);
|
|
169
|
+
return field;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
public copy(): TableviewDescriptor<T> {
|
|
173
|
+
const tableview = new TableviewDescriptor(this._model.type, this._model.idPropertyName, this._model.titlePropertyName);
|
|
174
|
+
tableview._table = this._table.copy();
|
|
175
|
+
tableview._viewEditor = this._viewEditor.copy();
|
|
176
|
+
tableview._addEditor = this._addEditor.copy();
|
|
177
|
+
tableview._editEditor = this._editEditor.copy();
|
|
178
|
+
return tableview;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {ComponentRef, Directive, Input, OnInit, Type, ViewContainerRef} from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[mngComponent]',
|
|
5
|
+
})
|
|
6
|
+
export class MngComponentDirective<T> implements OnInit {
|
|
7
|
+
|
|
8
|
+
@Input('mngComponent') component!: Type<T>;
|
|
9
|
+
|
|
10
|
+
public componentRef!: ComponentRef<T>;
|
|
11
|
+
|
|
12
|
+
constructor(public viewContainerRef: ViewContainerRef) {}
|
|
13
|
+
|
|
14
|
+
ngOnInit() {
|
|
15
|
+
this.viewContainerRef.clear();
|
|
16
|
+
this.componentRef = this.viewContainerRef.createComponent<T>(this.component);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[mngTemplate]',
|
|
5
|
+
host: {}
|
|
6
|
+
})
|
|
7
|
+
export class MngTemplateDirective {
|
|
8
|
+
|
|
9
|
+
@Input() type!: string;
|
|
10
|
+
@Input('mngTemplate') name!: string;
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
public template: TemplateRef<any>,
|
|
14
|
+
private viewContainerRef: ViewContainerRef
|
|
15
|
+
) {}
|
|
16
|
+
|
|
17
|
+
public getType(): string {
|
|
18
|
+
return this.name;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public getViewContainerRef(): ViewContainerRef {
|
|
22
|
+
return this.viewContainerRef;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import {APP_INITIALIZER, ModuleWithProviders, NgModule} from '@angular/core';
|
|
2
|
+
import {CommonModule} from '@angular/common';
|
|
3
|
+
import {ReactiveFormsModule} from '@angular/forms';
|
|
4
|
+
import {RouterModule} from '@angular/router';
|
|
5
|
+
import {HttpClient, HttpClientModule} from '@angular/common/http';
|
|
6
|
+
|
|
7
|
+
import {FORMLY_CONFIG, FormlyModule} from '@ngx-formly/core';
|
|
8
|
+
import {TranslateModule, TranslateService} from '@ngx-translate/core';
|
|
9
|
+
|
|
10
|
+
// primeng modules
|
|
11
|
+
import {ConfirmationService, MessageService} from 'primeng/api';
|
|
12
|
+
import {AutoCompleteModule} from 'primeng/autocomplete';
|
|
13
|
+
import {BreadcrumbModule} from 'primeng/breadcrumb';
|
|
14
|
+
import {ButtonModule} from 'primeng/button';
|
|
15
|
+
import {CardModule} from 'primeng/card';
|
|
16
|
+
import {CheckboxModule} from 'primeng/checkbox';
|
|
17
|
+
import {ChipModule} from 'primeng/chip';
|
|
18
|
+
import {ConfirmDialogModule} from 'primeng/confirmdialog';
|
|
19
|
+
import {ConfirmPopupModule} from 'primeng/confirmpopup';
|
|
20
|
+
import {DialogModule} from 'primeng/dialog';
|
|
21
|
+
import {DialogService, DynamicDialogModule} from 'primeng/dynamicdialog';
|
|
22
|
+
import {DropdownModule} from 'primeng/dropdown';
|
|
23
|
+
import {InputNumberModule} from 'primeng/inputnumber';
|
|
24
|
+
import {InputMaskModule} from 'primeng/inputmask';
|
|
25
|
+
import {InputSwitchModule} from 'primeng/inputswitch';
|
|
26
|
+
import {InputTextModule} from 'primeng/inputtext';
|
|
27
|
+
import {InputTextareaModule} from 'primeng/inputtextarea';
|
|
28
|
+
import {PaginatorModule} from 'primeng/paginator';
|
|
29
|
+
import {RadioButtonModule} from 'primeng/radiobutton';
|
|
30
|
+
import {RippleModule} from 'primeng/ripple';
|
|
31
|
+
import {SelectButtonModule} from 'primeng/selectbutton';
|
|
32
|
+
import {TableModule} from 'primeng/table';
|
|
33
|
+
import {TagModule} from 'primeng/tag';
|
|
34
|
+
import {ToastModule} from 'primeng/toast';
|
|
35
|
+
import {ToggleButtonModule} from 'primeng/togglebutton';
|
|
36
|
+
import {ToolbarModule} from 'primeng/toolbar';
|
|
37
|
+
import {TooltipModule} from 'primeng/tooltip';
|
|
38
|
+
import {MessagesModule} from 'primeng/messages';
|
|
39
|
+
import {ProgressSpinnerModule} from 'primeng/progressspinner';
|
|
40
|
+
import {TabViewModule} from 'primeng/tabview';
|
|
41
|
+
import {FieldsetModule} from 'primeng/fieldset';
|
|
42
|
+
import {CalendarModule} from 'primeng/calendar';
|
|
43
|
+
import {MultiSelectModule} from 'primeng/multiselect';
|
|
44
|
+
import {SkeletonModule} from 'primeng/skeleton';
|
|
45
|
+
|
|
46
|
+
// directives
|
|
47
|
+
import {MngComponentDirective, MngTemplateDirective} from './directives';
|
|
48
|
+
|
|
49
|
+
// pipes
|
|
50
|
+
import {MngPropertyPathPipe, MngBooleanPipe} from './pipes';
|
|
51
|
+
|
|
52
|
+
// components
|
|
53
|
+
// editor components
|
|
54
|
+
import {MngFormEditorComponent, MngAutocompleteComponent, MngDropdownComponent} from './components/form';
|
|
55
|
+
|
|
56
|
+
// layout components
|
|
57
|
+
import {MngBreadcrumbComponent, MngFooterComponent, MngMainLayoutComponent, MngMenuComponent, MngMenuItemComponent, MngTopbarComponent} from './components/layout';
|
|
58
|
+
|
|
59
|
+
// formly components
|
|
60
|
+
import {MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent} from './components/form/formly/wrappers';
|
|
61
|
+
import {MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent} from './components/form/formly/fields';
|
|
62
|
+
|
|
63
|
+
// table components
|
|
64
|
+
import {MngTableComponent, MngTableviewComponent, MngTableColumnFilterComponent, MngTableColumnValueComponent} from './components/tableview';
|
|
65
|
+
import {MngActionComponent, MngActionDialogComponent, MngActionRouteComponent} from './components/action';
|
|
66
|
+
|
|
67
|
+
// services
|
|
68
|
+
import {ObjectSerializer} from './api/utils';
|
|
69
|
+
import {MngActionService, MngCommonsService, MngConfigurationService, MngNavigationService} from './services';
|
|
70
|
+
import {mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider} from './services/providers';
|
|
71
|
+
|
|
72
|
+
// component services
|
|
73
|
+
import {TableviewComponentService} from './components/tableview/services';
|
|
74
|
+
import {MngMainLayoutComponentService} from './components/layout/services';
|
|
75
|
+
|
|
76
|
+
// module config
|
|
77
|
+
import {MngModuleConfig} from './config/models';
|
|
78
|
+
import {mngCommonsInitializerProvider} from './services/providers';
|
|
79
|
+
import {MNG_MODULE_CONFIG_IT} from './services/tokens';
|
|
80
|
+
|
|
81
|
+
// primeng modules
|
|
82
|
+
export const primeNgModules = [
|
|
83
|
+
AutoCompleteModule,
|
|
84
|
+
BreadcrumbModule,
|
|
85
|
+
ButtonModule,
|
|
86
|
+
CalendarModule,
|
|
87
|
+
CardModule,
|
|
88
|
+
CheckboxModule,
|
|
89
|
+
ChipModule,
|
|
90
|
+
ConfirmDialogModule,
|
|
91
|
+
ConfirmPopupModule,
|
|
92
|
+
DialogModule,
|
|
93
|
+
DynamicDialogModule,
|
|
94
|
+
DropdownModule,
|
|
95
|
+
InputNumberModule,
|
|
96
|
+
InputMaskModule,
|
|
97
|
+
InputSwitchModule,
|
|
98
|
+
InputTextModule,
|
|
99
|
+
InputTextareaModule,
|
|
100
|
+
PaginatorModule,
|
|
101
|
+
RadioButtonModule,
|
|
102
|
+
RippleModule,
|
|
103
|
+
SelectButtonModule,
|
|
104
|
+
TableModule,
|
|
105
|
+
TagModule,
|
|
106
|
+
ToastModule,
|
|
107
|
+
ToggleButtonModule,
|
|
108
|
+
ToolbarModule,
|
|
109
|
+
TooltipModule,
|
|
110
|
+
MessagesModule,
|
|
111
|
+
ProgressSpinnerModule,
|
|
112
|
+
TabViewModule,
|
|
113
|
+
FieldsetModule,
|
|
114
|
+
MultiSelectModule,
|
|
115
|
+
SkeletonModule
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
const declarations = [
|
|
119
|
+
// directives
|
|
120
|
+
MngComponentDirective,
|
|
121
|
+
MngTemplateDirective,
|
|
122
|
+
|
|
123
|
+
// pipes
|
|
124
|
+
MngPropertyPathPipe,
|
|
125
|
+
MngBooleanPipe,
|
|
126
|
+
|
|
127
|
+
// layout components
|
|
128
|
+
MngBreadcrumbComponent,
|
|
129
|
+
MngFooterComponent,
|
|
130
|
+
MngMainLayoutComponent,
|
|
131
|
+
MngMenuComponent,
|
|
132
|
+
MngMenuItemComponent,
|
|
133
|
+
MngTopbarComponent,
|
|
134
|
+
|
|
135
|
+
// mng fields
|
|
136
|
+
MngAutocompleteComponent,
|
|
137
|
+
MngDropdownComponent,
|
|
138
|
+
|
|
139
|
+
// formly wrappers
|
|
140
|
+
MngFormlyFieldWrapperComponent,
|
|
141
|
+
MngFormlyTableWrapperComponent,
|
|
142
|
+
|
|
143
|
+
// formly fields
|
|
144
|
+
MngFormlyFieldInputComponent,
|
|
145
|
+
MngFormlyFieldDropdownComponent,
|
|
146
|
+
MngFormlyFieldAutocompleteComponent,
|
|
147
|
+
MngFormlyFieldTableDialogMultiselectComponent,
|
|
148
|
+
MngFormlyFieldTableDialogFormComponent,
|
|
149
|
+
MngFormlyFieldTabsComponent,
|
|
150
|
+
MngFormlyFieldFieldsetComponent,
|
|
151
|
+
|
|
152
|
+
// table components
|
|
153
|
+
MngTableComponent,
|
|
154
|
+
MngTableviewComponent,
|
|
155
|
+
MngTableColumnValueComponent,
|
|
156
|
+
MngTableColumnFilterComponent,
|
|
157
|
+
|
|
158
|
+
// editor components
|
|
159
|
+
MngFormEditorComponent,
|
|
160
|
+
MngActionComponent,
|
|
161
|
+
MngActionDialogComponent,
|
|
162
|
+
MngActionRouteComponent
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
@NgModule({
|
|
166
|
+
imports: [
|
|
167
|
+
// angular modules
|
|
168
|
+
CommonModule,
|
|
169
|
+
RouterModule,
|
|
170
|
+
HttpClientModule,
|
|
171
|
+
ReactiveFormsModule,
|
|
172
|
+
|
|
173
|
+
// other modules
|
|
174
|
+
TranslateModule.forChild({
|
|
175
|
+
extend: true
|
|
176
|
+
}),
|
|
177
|
+
FormlyModule.forChild(),
|
|
178
|
+
...primeNgModules
|
|
179
|
+
],
|
|
180
|
+
declarations: [
|
|
181
|
+
...declarations
|
|
182
|
+
],
|
|
183
|
+
exports: [
|
|
184
|
+
...primeNgModules,
|
|
185
|
+
...declarations
|
|
186
|
+
]
|
|
187
|
+
})
|
|
188
|
+
export class MngCommonsModule {
|
|
189
|
+
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule> {
|
|
190
|
+
return {
|
|
191
|
+
ngModule: MngCommonsModule,
|
|
192
|
+
providers: [
|
|
193
|
+
// primeng services
|
|
194
|
+
DialogService,
|
|
195
|
+
MessageService,
|
|
196
|
+
ConfirmationService,
|
|
197
|
+
|
|
198
|
+
MngActionService,
|
|
199
|
+
MngNavigationService,
|
|
200
|
+
MngCommonsService,
|
|
201
|
+
|
|
202
|
+
// component service
|
|
203
|
+
MngMainLayoutComponentService,
|
|
204
|
+
TableviewComponentService,
|
|
205
|
+
|
|
206
|
+
{
|
|
207
|
+
provide: MNG_MODULE_CONFIG_IT,
|
|
208
|
+
useValue: config
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
provide: ObjectSerializer,
|
|
212
|
+
useFactory: () => ObjectSerializer.get()
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
provide: MngConfigurationService,
|
|
216
|
+
useFactory: mngConfigurationServiceProvider,
|
|
217
|
+
deps: [HttpClient, MNG_MODULE_CONFIG_IT]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
provide: APP_INITIALIZER,
|
|
221
|
+
useFactory: mngConfigJsonAppInitializerProvider,
|
|
222
|
+
deps: [MngConfigurationService, MNG_MODULE_CONFIG_IT],
|
|
223
|
+
multi: true
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
provide: APP_INITIALIZER,
|
|
227
|
+
useFactory: mngCommonsInitializerProvider,
|
|
228
|
+
deps: [MngCommonsService],
|
|
229
|
+
multi: true
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
provide: FORMLY_CONFIG,
|
|
233
|
+
multi: true,
|
|
234
|
+
useFactory: mngFormlyConfigProvider,
|
|
235
|
+
deps: [TranslateService, MNG_MODULE_CONFIG_IT]
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {ActivatedRouteSnapshot, Data} from '@angular/router';
|
|
2
|
+
import {MenuItem} from 'primeng/api';
|
|
3
|
+
import {Type} from '@angular/core';
|
|
4
|
+
|
|
5
|
+
export interface MngBreadcrumbMenuItem extends MenuItem {
|
|
6
|
+
isHome?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface MngRouterData extends Data {
|
|
10
|
+
breadcrumb?: string|string[]|MngBreadcrumbMenuItem|MngBreadcrumbMenuItem[]|((routeUrl: string, route: ActivatedRouteSnapshot) => MngBreadcrumbMenuItem[]);
|
|
11
|
+
pageTitle?: string;
|
|
12
|
+
topbarComponent?: Type<any>;
|
|
13
|
+
breadcrumbComponent?: Type<any>;
|
|
14
|
+
menuComponent?: Type<any>;
|
|
15
|
+
footerComponent?: Type<any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'boolean',
|
|
5
|
+
pure: true
|
|
6
|
+
})
|
|
7
|
+
export class MngBooleanPipe implements PipeTransform {
|
|
8
|
+
|
|
9
|
+
transform(value: any): any {
|
|
10
|
+
|
|
11
|
+
if (typeof value === 'boolean') {
|
|
12
|
+
return value ? 'general.yes' : 'general.no';
|
|
13
|
+
} else {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './boolean.pipe';
|
|
2
|
+
export * from './property-path.pipe';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'propertyPath',
|
|
5
|
+
pure: true
|
|
6
|
+
})
|
|
7
|
+
export class MngPropertyPathPipe implements PipeTransform {
|
|
8
|
+
|
|
9
|
+
transform(value: any, path: string = ''): any {
|
|
10
|
+
|
|
11
|
+
if (path.indexOf('.') >= 0) {
|
|
12
|
+
const pathSplit = path.split('.');
|
|
13
|
+
let currValue = value;
|
|
14
|
+
for (const p of pathSplit) {
|
|
15
|
+
if (typeof currValue === 'undefined' || currValue === null) {
|
|
16
|
+
return currValue;
|
|
17
|
+
}
|
|
18
|
+
else if (typeof currValue === 'object') {
|
|
19
|
+
currValue = currValue[p];
|
|
20
|
+
} else {
|
|
21
|
+
console.warn(`Path ${path} is not valid for object`, value);
|
|
22
|
+
return currValue;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return currValue;
|
|
26
|
+
} else {
|
|
27
|
+
return typeof value === 'object' ? value[path] : value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|