@mediusinc/mng-commons 0.2.0 → 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/karma.conf.js +51 -0
- package/ng-package.json +14 -0
- package/package.json +3 -24
- 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/filter-match-type.model.d.ts → src/lib/api/models/query-mode.model.ts} +18 -23
- 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/{lib/api/services/index.d.ts → src/lib/api/services/index.ts} +1 -1
- 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/{lib/components/action/models/action-confirmation-service.model.d.ts → src/lib/components/action/models/action-confirmation-service.model.ts} +7 -6
- package/src/lib/components/action/models/action-execution.model.ts +81 -0
- package/{lib/components/action/models/index.d.ts → src/lib/components/action/models/index.ts} +2 -2
- 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/{lib/components/form/index.d.ts → src/lib/components/form/index.ts} +3 -3
- package/src/lib/components/form/models/form-editor.event.ts +7 -0
- package/{lib/components/form/models/index.d.ts → src/lib/components/form/models/index.ts} +1 -1
- 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/{lib/components/layout/index.d.ts → src/lib/components/layout/index.ts} +6 -6
- 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/{lib/components/layout/services/index.d.ts → src/lib/components/layout/services/index.ts} +1 -1
- 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 -5
- package/{lib/components/tableview/models/index.d.ts → src/lib/components/tableview/models/index.ts} +1 -1
- 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/{lib/components/tableview/services/index.d.ts → src/lib/components/tableview/services/index.ts} +1 -1
- 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/config/models/index.d.ts → src/lib/config/models/index.ts} +1 -1
- package/{lib/config/models/mng-config.model.d.ts → src/lib/config/models/mng-config.model.ts} +35 -34
- package/src/lib/data-providers/base.data-provider.ts +42 -0
- package/src/lib/data-providers/editor.data-provider.ts +60 -0
- package/{lib/data-providers/index.d.ts → src/lib/data-providers/index.ts} +5 -5
- package/src/lib/data-providers/lookup.data-provider.ts +29 -0
- package/{lib/data-providers/table.data-provider.d.ts → src/lib/data-providers/table.data-provider.ts} +8 -6
- 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/{lib/descriptors/index.d.ts → src/lib/descriptors/index.ts} +7 -7
- package/{lib/descriptors/lookup.descriptor.d.ts → src/lib/descriptors/lookup.descriptor.ts} +20 -17
- 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/{lib/directives/index.d.ts → src/lib/directives/index.ts} +2 -2
- package/src/lib/directives/template.directive.ts +24 -0
- package/src/lib/mng-commons.module.ts +240 -0
- package/{lib/models/index.d.ts → src/lib/models/index.ts} +2 -2
- package/src/lib/models/router.model.ts +16 -0
- package/{lib/models/user.model.d.ts → src/lib/models/user.model.ts} +9 -8
- package/src/lib/pipes/boolean.pipe.ts +17 -0
- package/{lib/pipes/index.d.ts → src/lib/pipes/index.ts} +2 -2
- 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 -4
- 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 -3
- package/src/lib/services/tokens/browser-storage.token.ts +9 -0
- package/{lib/services/tokens/index.d.ts → src/lib/services/tokens/index.ts} +2 -2
- package/src/lib/services/tokens/module-config.token.ts +5 -0
- package/{lib/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 -5
- 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 -25
- 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 -48
- package/esm2020/lib/api/models/filter-match-type.model.mjs +0 -26
- 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/crud-api.abstract.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 -122
- package/esm2020/lib/api/utils/object-serializer.util.mjs +0 -226
- package/esm2020/lib/components/action/action.component.mjs +0 -65
- 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/models/action-confirmation-service.model.mjs +0 -2
- package/esm2020/lib/components/action/models/action-execution.model.mjs +0 -58
- package/esm2020/lib/components/action/models/index.mjs +0 -3
- package/esm2020/lib/components/action/route/action-route.component.mjs +0 -144
- package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +0 -114
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +0 -113
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +0 -141
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +0 -19
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +0 -19
- 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 -109
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +0 -122
- 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 -4
- package/esm2020/lib/components/form/models/form-editor.event.mjs +0 -7
- package/esm2020/lib/components/form/models/index.mjs +0 -2
- package/esm2020/lib/components/layout/breadcrumb.component.mjs +0 -17
- package/esm2020/lib/components/layout/footer.component.mjs +0 -17
- package/esm2020/lib/components/layout/index.mjs +0 -7
- package/esm2020/lib/components/layout/main-layout.component.mjs +0 -54
- package/esm2020/lib/components/layout/menu-item.component.mjs +0 -173
- package/esm2020/lib/components/layout/menu.component.mjs +0 -20
- package/esm2020/lib/components/layout/services/index.mjs +0 -2
- package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +0 -190
- package/esm2020/lib/components/layout/topbar.component.mjs +0 -59
- package/esm2020/lib/components/tableview/index.mjs +0 -6
- package/esm2020/lib/components/tableview/models/index.mjs +0 -2
- package/esm2020/lib/components/tableview/models/table.event.mjs +0 -16
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +0 -24
- package/esm2020/lib/components/tableview/services/index.mjs +0 -2
- package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +0 -17
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +0 -74
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +0 -25
- package/esm2020/lib/components/tableview/table/table.component.mjs +0 -307
- package/esm2020/lib/components/tableview/tableview.component.mjs +0 -82
- package/esm2020/lib/config/formly.config.mjs +0 -136
- package/esm2020/lib/config/index.mjs +0 -2
- package/esm2020/lib/config/models/index.mjs +0 -2
- package/esm2020/lib/config/models/mng-config.model.mjs +0 -2
- package/esm2020/lib/data-providers/base.data-provider.mjs +0 -24
- package/esm2020/lib/data-providers/editor.data-provider.mjs +0 -37
- package/esm2020/lib/data-providers/index.mjs +0 -6
- package/esm2020/lib/data-providers/lookup.data-provider.mjs +0 -16
- package/esm2020/lib/data-providers/table.data-provider.mjs +0 -2
- package/esm2020/lib/data-providers/tableview.data-provider.mjs +0 -17
- package/esm2020/lib/descriptors/action.descriptor.mjs +0 -332
- package/esm2020/lib/descriptors/editor.descriptor.mjs +0 -670
- package/esm2020/lib/descriptors/field.validator.mjs +0 -21
- package/esm2020/lib/descriptors/index.mjs +0 -8
- package/esm2020/lib/descriptors/lookup.descriptor.mjs +0 -2
- package/esm2020/lib/descriptors/model.descriptor.mjs +0 -34
- package/esm2020/lib/descriptors/table.descriptor.mjs +0 -401
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +0 -131
- package/esm2020/lib/directives/component.directive.mjs +0 -23
- package/esm2020/lib/directives/index.mjs +0 -3
- package/esm2020/lib/directives/template.directive.mjs +0 -29
- package/esm2020/lib/mng-commons.module.mjs +0 -410
- package/esm2020/lib/models/index.mjs +0 -3
- package/esm2020/lib/models/router.model.mjs +0 -2
- package/esm2020/lib/models/user.model.mjs +0 -2
- package/esm2020/lib/pipes/boolean.pipe.mjs +0 -22
- package/esm2020/lib/pipes/index.mjs +0 -3
- package/esm2020/lib/pipes/property-path.pipe.mjs +0 -36
- package/esm2020/lib/services/action.service.mjs +0 -269
- package/esm2020/lib/services/commons.service.mjs +0 -353
- package/esm2020/lib/services/configuration.service.mjs +0 -78
- package/esm2020/lib/services/index.mjs +0 -5
- package/esm2020/lib/services/navigation.service.mjs +0 -48
- package/esm2020/lib/services/providers/commons-init.provider.mjs +0 -4
- package/esm2020/lib/services/providers/config-service.provider.mjs +0 -20
- package/esm2020/lib/services/providers/formly-config.provider.mjs +0 -31
- package/esm2020/lib/services/providers/index.mjs +0 -4
- package/esm2020/lib/services/tokens/browser-storage.token.mjs +0 -6
- package/esm2020/lib/services/tokens/index.mjs +0 -3
- package/esm2020/lib/services/tokens/module-config.token.mjs +0 -3
- package/esm2020/lib/types/index.mjs +0 -3
- package/esm2020/lib/types/type.decorator.mjs +0 -7
- package/esm2020/lib/types/type.model.mjs +0 -2
- package/esm2020/lib/utils/editor-formly.util.mjs +0 -176
- package/esm2020/lib/utils/i18n.util.mjs +0 -125
- package/esm2020/lib/utils/index.mjs +0 -6
- package/esm2020/lib/utils/model.util.mjs +0 -57
- package/esm2020/lib/utils/toast.util.mjs +0 -39
- package/esm2020/lib/utils/type.util.mjs +0 -39
- package/esm2020/mediusinc-mng-commons.mjs +0 -5
- package/esm2020/public-api.mjs +0 -36
- package/fesm2015/mediusinc-mng-commons.mjs +0 -6250
- package/fesm2015/mediusinc-mng-commons.mjs.map +0 -1
- package/fesm2020/mediusinc-mng-commons.mjs +0 -6176
- 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-param.model.d.ts +0 -23
- package/lib/api/models/mappers.d.ts +0 -6
- package/lib/api/models/query-mode.model.d.ts +0 -16
- 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/crud-api.abstract.service.d.ts +0 -23
- package/lib/api/utils/medius-rest.util.d.ts +0 -12
- 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 -46
- package/lib/components/action/models/action-execution.model.d.ts +0 -53
- package/lib/components/action/route/action-route.component.d.ts +0 -32
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +0 -36
- package/lib/components/form/dropdown/dropdown.component.d.ts +0 -34
- package/lib/components/form/editor/form-editor.component.d.ts +0 -39
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +0 -11
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +0 -11
- 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/models/form-editor.event.d.ts +0 -5
- package/lib/components/layout/breadcrumb.component.d.ts +0 -8
- package/lib/components/layout/footer.component.d.ts +0 -9
- package/lib/components/layout/main-layout.component.d.ts +0 -21
- package/lib/components/layout/menu-item.component.d.ts +0 -29
- package/lib/components/layout/menu.component.d.ts +0 -10
- package/lib/components/layout/services/main-layout.component.service.d.ts +0 -65
- package/lib/components/layout/topbar.component.d.ts +0 -25
- package/lib/components/tableview/models/table.event.d.ts +0 -17
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +0 -14
- package/lib/components/tableview/services/tableview.component.service.d.ts +0 -13
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +0 -22
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +0 -12
- package/lib/components/tableview/table/table.component.d.ts +0 -79
- package/lib/components/tableview/tableview.component.d.ts +0 -35
- package/lib/config/formly.config.d.ts +0 -14
- package/lib/data-providers/base.data-provider.d.ts +0 -17
- package/lib/data-providers/editor.data-provider.d.ts +0 -25
- package/lib/data-providers/lookup.data-provider.d.ts +0 -14
- package/lib/data-providers/tableview.data-provider.d.ts +0 -15
- package/lib/descriptors/action.descriptor.d.ts +0 -148
- package/lib/descriptors/editor.descriptor.d.ts +0 -255
- package/lib/descriptors/field.validator.d.ts +0 -18
- package/lib/descriptors/model.descriptor.d.ts +0 -15
- package/lib/descriptors/table.descriptor.d.ts +0 -164
- package/lib/descriptors/tableview.descriptor.d.ts +0 -39
- package/lib/directives/component.directive.d.ts +0 -11
- package/lib/directives/template.directive.d.ts +0 -13
- package/lib/mng-commons.module.d.ts +0 -79
- package/lib/models/router.model.d.ts +0 -14
- package/lib/pipes/boolean.pipe.d.ts +0 -7
- package/lib/pipes/property-path.pipe.d.ts +0 -7
- package/lib/services/action.service.d.ts +0 -92
- package/lib/services/commons.service.d.ts +0 -72
- package/lib/services/configuration.service.d.ts +0 -35
- package/lib/services/navigation.service.d.ts +0 -14
- package/lib/services/providers/commons-init.provider.d.ts +0 -2
- 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/tokens/browser-storage.token.d.ts +0 -2
- package/lib/services/tokens/module-config.token.d.ts +0 -3
- package/lib/types/type.decorator.d.ts +0 -2
- package/lib/types/type.model.d.ts +0 -10
- package/lib/utils/editor-formly.util.d.ts +0 -9
- package/lib/utils/i18n.util.d.ts +0 -18
- package/lib/utils/model.util.d.ts +0 -7
- package/lib/utils/toast.util.d.ts +0 -13
- package/lib/utils/type.util.d.ts +0 -15
- package/mediusinc-mng-commons-0.2.0.tgz +0 -0
- package/mediusinc-mng-commons.d.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './formly-field-autocomplete/formly-field-autocomplete.component';
|
|
2
|
-
export * from './formly-field-input/formly-field-input.component';
|
|
3
|
-
export * from './formly-field-dropdown/formly-field-dropdown.component';
|
|
4
|
-
export * from './formly-field-table-dialog-form/formly-field-table-dialog-form.component';
|
|
5
|
-
export * from './formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component';
|
|
6
|
-
export * from './formly-field-tabs/formly-field-tabs.component';
|
|
7
|
-
export * from './formly-field-fieldset/formly-field-fieldset.component';
|
|
1
|
+
export * from './formly-field-autocomplete/formly-field-autocomplete.component';
|
|
2
|
+
export * from './formly-field-input/formly-field-input.component';
|
|
3
|
+
export * from './formly-field-dropdown/formly-field-dropdown.component';
|
|
4
|
+
export * from './formly-field-table-dialog-form/formly-field-table-dialog-form.component';
|
|
5
|
+
export * from './formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component';
|
|
6
|
+
export * from './formly-field-tabs/formly-field-tabs.component';
|
|
7
|
+
export * from './formly-field-fieldset/formly-field-fieldset.component';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<div class="field">
|
|
2
|
+
<label [for]="key">{{ $any(to?.label) | translate }} <span *ngIf="to.required && to['hideRequiredMarker'] !== true">*</span></label>
|
|
3
|
+
<ng-container #fieldComponent></ng-container>
|
|
4
|
+
<small *ngIf="showError" class="p-error">
|
|
5
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
6
|
+
</small>
|
|
7
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
|
2
|
+
import { FieldWrapper } from '@ngx-formly/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mng-formly-field-wrapper',
|
|
6
|
+
templateUrl: './formly-field-wrapper.component.html',
|
|
7
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8
|
+
})
|
|
9
|
+
export class MngFormlyFieldWrapperComponent extends FieldWrapper implements OnInit {
|
|
10
|
+
|
|
11
|
+
public ngOnInit() {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
|
2
|
+
import { FieldWrapper } from '@ngx-formly/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'mng-formly-table-wrapper',
|
|
6
|
+
templateUrl: './formly-table-wrapper.component.html',
|
|
7
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8
|
+
})
|
|
9
|
+
export class MngFormlyTableWrapperComponent extends FieldWrapper implements OnInit {
|
|
10
|
+
|
|
11
|
+
public ngOnInit() {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './formly-field-wrapper/formly-field-wrapper.component';
|
|
2
|
-
export * from './formly-table-wrapper/formly-table-wrapper.component';
|
|
1
|
+
export * from './formly-field-wrapper/formly-field-wrapper.component';
|
|
2
|
+
export * from './formly-table-wrapper/formly-table-wrapper.component';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './editor/form-editor.component';
|
|
2
|
-
export * from './autocomplete/autocomplete.component';
|
|
3
|
-
export * from './dropdown/dropdown.component';
|
|
1
|
+
export * from './editor/form-editor.component';
|
|
2
|
+
export * from './autocomplete/autocomplete.component';
|
|
3
|
+
export * from './dropdown/dropdown.component';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './form-editor.event';
|
|
1
|
+
export * from './form-editor.event';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import {MngCommonsService} from '../../services';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'mng-breadcrumb',
|
|
7
|
+
templateUrl: './breadcrumb.component.html',
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
+
})
|
|
10
|
+
export class MngBreadcrumbComponent {
|
|
11
|
+
constructor(public mngCommons: MngCommonsService) {}
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<div class="layout-footer">
|
|
2
|
+
<div class="footer-logo-container">
|
|
3
|
+
<img id="footer-logo" [src]="mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight" alt="atlantis-layout"/>
|
|
4
|
+
<span class="app-name">{{ mngCommons.appName | translate }}</span>
|
|
5
|
+
</div>
|
|
6
|
+
<span class="copyright">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>
|
|
7
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import {MngCommonsService} from '../../services';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'mng-footer',
|
|
7
|
+
templateUrl: './footer.component.html',
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
+
})
|
|
10
|
+
export class MngFooterComponent {
|
|
11
|
+
|
|
12
|
+
public currentYear = new Date().getFullYear();
|
|
13
|
+
|
|
14
|
+
constructor(public mngCommons: MngCommonsService) {}
|
|
15
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './breadcrumb.component';
|
|
2
|
-
export * from './footer.component';
|
|
3
|
-
export * from './main-layout.component';
|
|
4
|
-
export * from './menu.component';
|
|
5
|
-
export * from './menu-item.component';
|
|
6
|
-
export * from './topbar.component';
|
|
1
|
+
export * from './breadcrumb.component';
|
|
2
|
+
export * from './footer.component';
|
|
3
|
+
export * from './main-layout.component';
|
|
4
|
+
export * from './menu.component';
|
|
5
|
+
export * from './menu-item.component';
|
|
6
|
+
export * from './topbar.component';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div class="layout-wrapper" (click)="mainLayoutService.onLayoutClick()"
|
|
2
|
+
[ngClass]="{'layout-static': mngCommons.menuModeIsStatic$ | async,
|
|
3
|
+
'layout-overlay': mngCommons.menuModeIsOverlay$ | async,
|
|
4
|
+
'layout-slim': mngCommons.menuModeIsSlim$ | async,
|
|
5
|
+
'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,
|
|
6
|
+
'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),
|
|
7
|
+
'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,
|
|
8
|
+
'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,
|
|
9
|
+
'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async) }">
|
|
10
|
+
|
|
11
|
+
<div class="layout-main">
|
|
12
|
+
|
|
13
|
+
<ng-container [mngComponent]="footerComponent"></ng-container>
|
|
14
|
+
|
|
15
|
+
<ng-container *ngIf="!(mainLayoutService.isMobile$ | async) && ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))"
|
|
16
|
+
[mngComponent]="menuComponent">
|
|
17
|
+
</ng-container>
|
|
18
|
+
|
|
19
|
+
<div class="layout-main-content">
|
|
20
|
+
<router-outlet></router-outlet>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<ng-container [mngComponent]="footerComponent"></ng-container>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {AfterViewInit, ChangeDetectionStrategy, Component, HostListener, QueryList, Type, ViewChildren} from '@angular/core';
|
|
2
|
+
import {ActivatedRoute} from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import {MngCommonsService} from '../../services';
|
|
5
|
+
import {MngMainLayoutComponentService} from './services';
|
|
6
|
+
import {MngTemplateDirective} from '../../directives';
|
|
7
|
+
import {MngRouterData} from '../../models';
|
|
8
|
+
import {MngFooterComponent} from './footer.component';
|
|
9
|
+
import {MngMenuComponent} from './menu.component';
|
|
10
|
+
import {MngTopbarComponent} from './topbar.component';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'mng-main-layout',
|
|
14
|
+
templateUrl: './main-layout.component.html',
|
|
15
|
+
providers: [MngMainLayoutComponentService],
|
|
16
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
17
|
+
})
|
|
18
|
+
export class MngMainLayoutComponent implements AfterViewInit {
|
|
19
|
+
|
|
20
|
+
@ViewChildren(MngTemplateDirective) templates!: QueryList<MngTemplateDirective>;
|
|
21
|
+
|
|
22
|
+
public topbarComponent: Type<any> = MngTopbarComponent;
|
|
23
|
+
public menuComponent: Type<any> = MngMenuComponent;
|
|
24
|
+
public footerComponent: Type<any> = MngFooterComponent;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
private route: ActivatedRoute,
|
|
28
|
+
public mngCommons: MngCommonsService,
|
|
29
|
+
public mainLayoutService: MngMainLayoutComponentService
|
|
30
|
+
) {}
|
|
31
|
+
|
|
32
|
+
ngOnInit() {
|
|
33
|
+
const routeData = this.route.snapshot.data as MngRouterData;
|
|
34
|
+
if (routeData?.topbarComponent) {
|
|
35
|
+
this.topbarComponent = routeData.topbarComponent;
|
|
36
|
+
}
|
|
37
|
+
if (routeData?.menuComponent) {
|
|
38
|
+
this.menuComponent = routeData.menuComponent;
|
|
39
|
+
}
|
|
40
|
+
if (routeData?.footerComponent) {
|
|
41
|
+
this.footerComponent = routeData.footerComponent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ngAfterViewInit(): void {
|
|
46
|
+
this.mainLayoutService.innerWidth = window.innerWidth;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@HostListener('window:resize', ['$event'])
|
|
50
|
+
onWindowResize(event: UIEvent) {
|
|
51
|
+
const target: any = event.target;
|
|
52
|
+
this.mainLayoutService.innerWidth = target?.innerWidth ?? window.innerWidth;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<ng-container>
|
|
2
|
+
<div *ngIf="root && item.visible !== false" class="layout-menuitem-root-text">{{ item.label | translate }}</div>
|
|
3
|
+
<a *ngIf="(!item.routerLink || item.items) && item.visible !== false"
|
|
4
|
+
[attr.href]="item.url"
|
|
5
|
+
(click)="itemClick($event)"
|
|
6
|
+
(mouseenter)="onMouseEnter()"
|
|
7
|
+
(keydown.enter)="itemClick($event)"
|
|
8
|
+
[attr.target]="item.target"
|
|
9
|
+
[attr.tabindex]="0"
|
|
10
|
+
[ngClass]="item.class"
|
|
11
|
+
pRipple>
|
|
12
|
+
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
13
|
+
<span class="layout-menuitem-text">{{ item.label | translate }}</span>
|
|
14
|
+
<i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
|
|
15
|
+
<span class="menuitem-badge" *ngIf="item.badge">{{ item.badge }}</span>
|
|
16
|
+
</a>
|
|
17
|
+
<a *ngIf="(item.routerLink && !item.items) && item.visible !== false"
|
|
18
|
+
(click)="itemClick($event)"
|
|
19
|
+
(mouseenter)="hover=true"
|
|
20
|
+
(mouseleave)="hover=false"
|
|
21
|
+
[routerLink]="item.routerLink"
|
|
22
|
+
routerLinkActive="active-menuitem-routerlink"
|
|
23
|
+
[routerLinkActiveOptions]="{ exact: true }"
|
|
24
|
+
[attr.target]="item.target"
|
|
25
|
+
[attr.tabindex]="0"
|
|
26
|
+
[ngClass]="item.class"
|
|
27
|
+
pRipple>
|
|
28
|
+
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
29
|
+
<span class="layout-menuitem-text">{{ item.label | translate }}</span>
|
|
30
|
+
<i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
|
|
31
|
+
<span class="menuitem-badge" *ngIf="item.badge">{{ item.badge }}</span>
|
|
32
|
+
</a>
|
|
33
|
+
<ul *ngIf="((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false"
|
|
34
|
+
[@children]="((mngCommons.menuModeIsSlim$ | async) && !(mainLayoutService.isMobile$ | async) && root)
|
|
35
|
+
? (active ? 'visible' : 'hidden')
|
|
36
|
+
: ((mngCommons.menuModeIsStatic$ | async) && root && !(mainLayoutService.isMobile$ | async) ? 'visible' : (active ? 'visibleAnimated' : 'hiddenAnimated'))">
|
|
37
|
+
<ng-template ngFor let-child let-i="index" [ngForOf]="item.items">
|
|
38
|
+
<li mng-menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child.badgeClass"></li>
|
|
39
|
+
</ng-template>
|
|
40
|
+
</ul>
|
|
41
|
+
</ng-container>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {Component, Input, OnInit, ChangeDetectorRef, OnDestroy, ChangeDetectionStrategy} from '@angular/core';
|
|
2
|
+
import {Router, NavigationEnd} from '@angular/router';
|
|
3
|
+
import {trigger, state, style, transition, animate} from '@angular/animations';
|
|
4
|
+
|
|
5
|
+
import {Subscription} from 'rxjs';
|
|
6
|
+
import {filter} from 'rxjs/operators';
|
|
7
|
+
|
|
8
|
+
import {MngCommonsService} from '../../services';
|
|
9
|
+
import {MngMainLayoutComponentService} from './services';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
/* tslint:disable:component-selector */
|
|
13
|
+
selector: '[mng-menuitem]',
|
|
14
|
+
/* tslint:enable:component-selector */
|
|
15
|
+
templateUrl: './menu-item.component.html',
|
|
16
|
+
host: {
|
|
17
|
+
'[class.layout-root-menuitem]': 'root',
|
|
18
|
+
'[class.active-menuitem]': 'active'
|
|
19
|
+
},
|
|
20
|
+
animations: [
|
|
21
|
+
trigger('children', [
|
|
22
|
+
state('void', style({
|
|
23
|
+
height: '0px'
|
|
24
|
+
})),
|
|
25
|
+
state('hiddenAnimated', style({
|
|
26
|
+
height: '0px'
|
|
27
|
+
})),
|
|
28
|
+
state('visibleAnimated', style({
|
|
29
|
+
height: '*'
|
|
30
|
+
})),
|
|
31
|
+
state('visible', style({
|
|
32
|
+
height: '*',
|
|
33
|
+
'z-index': 100
|
|
34
|
+
})),
|
|
35
|
+
state('hidden', style({
|
|
36
|
+
height: '0px',
|
|
37
|
+
'z-index': '*'
|
|
38
|
+
})),
|
|
39
|
+
transition('visibleAnimated => hiddenAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
|
40
|
+
transition('hiddenAnimated => visibleAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
|
41
|
+
transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
42
|
+
])
|
|
43
|
+
],
|
|
44
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
45
|
+
})
|
|
46
|
+
export class MngMenuItemComponent implements OnInit, OnDestroy {
|
|
47
|
+
|
|
48
|
+
@Input() item: any;
|
|
49
|
+
|
|
50
|
+
@Input() index: number = 0;
|
|
51
|
+
|
|
52
|
+
@Input() root: boolean = false;
|
|
53
|
+
|
|
54
|
+
@Input() parentKey: string|null = null;
|
|
55
|
+
|
|
56
|
+
active = false;
|
|
57
|
+
|
|
58
|
+
hover: boolean = false;
|
|
59
|
+
|
|
60
|
+
menuSourceSubscription: Subscription;
|
|
61
|
+
|
|
62
|
+
menuResetSubscription: Subscription;
|
|
63
|
+
|
|
64
|
+
key: string = '';
|
|
65
|
+
|
|
66
|
+
constructor(
|
|
67
|
+
public router: Router,
|
|
68
|
+
private cd: ChangeDetectorRef,
|
|
69
|
+
public mngCommons: MngCommonsService,
|
|
70
|
+
public mainLayoutService: MngMainLayoutComponentService
|
|
71
|
+
) {
|
|
72
|
+
this.menuSourceSubscription = this.mngCommons.menuActiveKey$.subscribe(key => {
|
|
73
|
+
// deactivate current active menu
|
|
74
|
+
if (this.active && this.key !== key && key.indexOf(this.key) !== 0) {
|
|
75
|
+
this.active = false;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
this.menuResetSubscription = this.mngCommons.menuReset$.subscribe(() => {
|
|
80
|
+
this.active = false;
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
this.router.events
|
|
84
|
+
.pipe(filter(event => event instanceof NavigationEnd))
|
|
85
|
+
.subscribe(params => {
|
|
86
|
+
if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()) {
|
|
87
|
+
this.active = false;
|
|
88
|
+
} else {
|
|
89
|
+
if (this.item.routerLink) {
|
|
90
|
+
this.updateActiveStateFromRoute();
|
|
91
|
+
} else {
|
|
92
|
+
this.active = false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
ngOnInit() {
|
|
99
|
+
if (!this.mngCommons.menuModeIsSlim && this.item.routerLink) {
|
|
100
|
+
this.updateActiveStateFromRoute();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
updateActiveStateFromRoute() {
|
|
107
|
+
this.active = this.router.isActive(this.item.routerLink[0], this.item.items ? false : true);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
itemClick(event: Event) {
|
|
111
|
+
// avoid processing disabled items
|
|
112
|
+
if (this.item.disabled) {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// navigate with hover in horizontal mode
|
|
118
|
+
if (this.root) {
|
|
119
|
+
this.mainLayoutService.menuHoverActive = !this.mainLayoutService.menuHoverActive;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// notify other items
|
|
123
|
+
this.mngCommons.menuChangeActiveKey(this.key);
|
|
124
|
+
|
|
125
|
+
// execute command
|
|
126
|
+
if (this.item.command) {
|
|
127
|
+
this.item.command({originalEvent: event, item: this.item});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// toggle active state
|
|
131
|
+
if (this.item.items) {
|
|
132
|
+
this.active = !this.active;
|
|
133
|
+
} else {
|
|
134
|
+
// activate item
|
|
135
|
+
this.active = true;
|
|
136
|
+
|
|
137
|
+
if (this.mainLayoutService.isMobile()) {
|
|
138
|
+
this.mainLayoutService.staticMenuMobileActive = false;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (this.mngCommons.menuModeIsOverlay) {
|
|
142
|
+
this.mainLayoutService.overlayMenuActive = false;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// reset horizontal menu
|
|
146
|
+
if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()){
|
|
147
|
+
this.mngCommons.menuReset();
|
|
148
|
+
this.mainLayoutService.menuHoverActive = false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
onMouseEnter() {
|
|
154
|
+
// activate item on hover
|
|
155
|
+
if (this.root && this.mainLayoutService.menuHoverActive && (this.mngCommons.menuModeIsSlim) && this.mainLayoutService.isDesktop()) {
|
|
156
|
+
this.mngCommons.menuChangeActiveKey(this.key);
|
|
157
|
+
this.active = true;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
ngOnDestroy() {
|
|
162
|
+
if (this.menuSourceSubscription) {
|
|
163
|
+
this.menuSourceSubscription.unsubscribe();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (this.menuResetSubscription) {
|
|
167
|
+
this.menuResetSubscription.unsubscribe();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<div class="layout-menu-wrapper" [ngClass]="{ 'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async) }"
|
|
2
|
+
(click)="mainLayoutService.onSidebarClick($event)" (mouseover)="mainLayoutService.onSidebarMouseOver($event)" (mouseleave)="mainLayoutService.onSidebarMouseLeave($event)">
|
|
3
|
+
<div class="menu-logo">
|
|
4
|
+
|
|
5
|
+
<a routerLink="/" class="logo">
|
|
6
|
+
<img [src]="mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight" />
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
<a routerLink="/" class="app-name" *ngIf="!(mngCommons.menuModeIsSlim$ | async) || (mainLayoutService.isMobile$ | async)">
|
|
10
|
+
<img [src]="mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight" />
|
|
11
|
+
</a>
|
|
12
|
+
<a *ngIf="mngCommons.menuPinEnabled" class="menu-pin" (click)="mainLayoutService.onToggleMenu($event)">
|
|
13
|
+
<span *ngIf="mngCommons.menuModeIsOverlay$ | async" class="pi pi-times"></span>
|
|
14
|
+
<span *ngIf="(mngCommons.menuModeIsSidebar$ | async) && !(mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)" class="pi pi-unlock"></span>
|
|
15
|
+
<span *ngIf="(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)" class="pi pi-lock"></span>
|
|
16
|
+
</a>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="layout-menu-container">
|
|
20
|
+
<ul class="layout-menu">
|
|
21
|
+
<ng-container *ngFor="let item of (mngCommons.menuItems); let i = index;">
|
|
22
|
+
<li mng-menuitem *ngIf="!item.separator" [item]="item" [index]="i" [root]="true"></li>
|
|
23
|
+
<li *ngIf="item.separator" class="menu-separator"></li>
|
|
24
|
+
</ng-container>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import {MngCommonsService} from '../../services';
|
|
4
|
+
import {MngMainLayoutComponentService} from './services';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'mng-menu',
|
|
8
|
+
templateUrl: './menu.component.html',
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
+
})
|
|
11
|
+
export class MngMenuComponent {
|
|
12
|
+
|
|
13
|
+
constructor(
|
|
14
|
+
public mngCommons: MngCommonsService,
|
|
15
|
+
public mainLayoutService: MngMainLayoutComponentService
|
|
16
|
+
) {}
|
|
17
|
+
}
|
package/{lib/components/layout/services/index.d.ts → src/lib/components/layout/services/index.ts}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './main-layout.component.service';
|
|
1
|
+
export * from './main-layout.component.service';
|