@dflat-core/web 1.0.45 → 1.0.46
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/assets/variables.scss +3 -1
- package/fesm2022/dflat-core-web-core-data.mjs +416 -412
- package/fesm2022/dflat-core-web-core-data.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core-model.mjs +229 -218
- package/fesm2022/dflat-core-web-core-model.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core-services.mjs +1840 -1615
- package/fesm2022/dflat-core-web-core-services.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core-ux.mjs +21444 -16366
- package/fesm2022/dflat-core-web-core-ux.mjs.map +1 -1
- package/fesm2022/dflat-core-web-core.mjs +585 -728
- package/fesm2022/dflat-core-web-core.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-data.mjs +2813 -1300
- package/fesm2022/dflat-core-web-system-data.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-model.mjs +282 -260
- package/fesm2022/dflat-core-web-system-model.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-root.mjs +1994 -681
- package/fesm2022/dflat-core-web-system-root.mjs.map +1 -1
- package/fesm2022/dflat-core-web-system-ux.mjs +21157 -8829
- package/fesm2022/dflat-core-web-system-ux.mjs.map +1 -1
- package/fesm2022/dflat-core-web.mjs +11 -15
- package/fesm2022/dflat-core-web.mjs.map +1 -1
- package/package.json +35 -33
- package/scss/dflat-app.scss +8 -2
- package/types/dflat-core-web-core-data.d.ts +108 -0
- package/types/dflat-core-web-core-model.d.ts +491 -0
- package/types/dflat-core-web-core-services.d.ts +426 -0
- package/types/dflat-core-web-core-ux.d.ts +5867 -0
- package/types/dflat-core-web-core.d.ts +137 -0
- package/types/dflat-core-web-system-data.d.ts +545 -0
- package/types/dflat-core-web-system-model.d.ts +1605 -0
- package/types/dflat-core-web-system-root.d.ts +557 -0
- package/types/dflat-core-web-system-ux.d.ts +3250 -0
- package/{index.d.ts → types/dflat-core-web.d.ts} +1 -1
- package/core/index.d.ts +0 -6
- package/core/lib/array.function.d.ts +0 -8
- package/core/lib/core.module.d.ts +0 -9
- package/core/lib/global/EnvironmentBase.d.ts +0 -27
- package/core/lib/nameof.function.d.ts +0 -4
- package/core/lib/services/ensuremoduleloadedonceguard.d.ts +0 -3
- package/core/lib/services/utilities.service.d.ts +0 -87
- package/core-data/index.d.ts +0 -3
- package/core-data/lib/core-data.module.d.ts +0 -7
- package/core-data/lib/services/data-service.d.ts +0 -69
- package/core-data/lib/services/entity-data-service.d.ts +0 -37
- package/core-model/index.d.ts +0 -4
- package/core-model/lib/core-model.module.d.ts +0 -7
- package/core-model/lib/interface.d.ts +0 -140
- package/core-model/lib/model/interface.generated.d.ts +0 -309
- package/core-model/lib/model/model.d.ts +0 -38
- package/core-services/index.d.ts +0 -25
- package/core-services/lib/core-services.module.d.ts +0 -10
- package/core-services/lib/model/model.d.ts +0 -25
- package/core-services/lib/services/app-keys.d.ts +0 -15
- package/core-services/lib/services/appConfig.service.d.ts +0 -8
- package/core-services/lib/services/application-menu.service.d.ts +0 -22
- package/core-services/lib/services/auth-guard.service.d.ts +0 -18
- package/core-services/lib/services/auth.interceptor.d.ts +0 -15
- package/core-services/lib/services/auth.service.d.ts +0 -67
- package/core-services/lib/services/breadcrumb.service.d.ts +0 -14
- package/core-services/lib/services/busmessage.service.d.ts +0 -19
- package/core-services/lib/services/can-activate-guard.service.d.ts +0 -12
- package/core-services/lib/services/filter.service.d.ts +0 -15
- package/core-services/lib/services/geolocation.service.d.ts +0 -29
- package/core-services/lib/services/headers.service.d.ts +0 -15
- package/core-services/lib/services/hub.service.d.ts +0 -33
- package/core-services/lib/services/local-store-manager.service.d.ts +0 -50
- package/core-services/lib/services/menu.service.d.ts +0 -27
- package/core-services/lib/services/message.service.d.ts +0 -14
- package/core-services/lib/services/module-menu-services.token.d.ts +0 -8
- package/core-services/lib/services/notifications.service.d.ts +0 -14
- package/core-services/lib/services/permission.service.d.ts +0 -12
- package/core-services/lib/services/screen.service.d.ts +0 -14
- package/core-services/lib/services/server-url.d.ts +0 -12
- package/core-services/lib/services/string.function.d.ts +0 -1
- package/core-services/lib/services/user.service.d.ts +0 -22
- package/core-ux/index.d.ts +0 -145
- package/core-ux/lib/components/actions/actions-content.component.d.ts +0 -10
- package/core-ux/lib/components/actions/actions.component.d.ts +0 -57
- package/core-ux/lib/components/actions/extended-action/extended-action.component.d.ts +0 -34
- package/core-ux/lib/components/base-editor/base-editor.component.d.ts +0 -93
- package/core-ux/lib/components/base-item-list/base-item-list.component.d.ts +0 -21
- package/core-ux/lib/components/basefilter/basefilter.component.d.ts +0 -275
- package/core-ux/lib/components/breadcrumb/breadcrumb.component.d.ts +0 -12
- package/core-ux/lib/components/datagrid-custom/datagrid-cell/datagrid-cell.component.d.ts +0 -32
- package/core-ux/lib/components/datagrid-custom/datagrid-custom.component.d.ts +0 -159
- package/core-ux/lib/components/datagrid-custom/datagrid-sorter.component.d.ts +0 -15
- package/core-ux/lib/components/datapage/layout-page/page-layout.component.d.ts +0 -13
- package/core-ux/lib/components/datapage/old/old.datapage.component.d.ts +0 -10
- package/core-ux/lib/components/datapage/old-layout-handler.directive.d.ts +0 -31
- package/core-ux/lib/components/dynamic-components/dynamic-field/dynamic-field.component.d.ts +0 -41
- package/core-ux/lib/components/dynamic-components/dynamic-filter/dynamic-filter-extra.component.d.ts +0 -27
- package/core-ux/lib/components/dynamic-components/dynamic-filter/dynamic-filter-panel.component.d.ts +0 -8
- package/core-ux/lib/components/dynamic-components/dynamic-filter/dynamic-filter.component.d.ts +0 -54
- package/core-ux/lib/components/dynamic-components/dynamic-form/dynamic-form.component.d.ts +0 -122
- package/core-ux/lib/components/filtersummary/filtersummary.component.d.ts +0 -27
- package/core-ux/lib/components/form-password/form-password.component.d.ts +0 -9
- package/core-ux/lib/components/grid-row/grid-row.component.d.ts +0 -12
- package/core-ux/lib/components/image-display/image.component.d.ts +0 -20
- package/core-ux/lib/components/input-selector/input-selector.component.d.ts +0 -50
- package/core-ux/lib/components/input-tree-selector/input-tree-selector.component.d.ts +0 -25
- package/core-ux/lib/components/logs/logs.component.d.ts +0 -32
- package/core-ux/lib/components/menu/menu.component.d.ts +0 -39
- package/core-ux/lib/components/menu-dashboard/menu-dashboard.component.d.ts +0 -15
- package/core-ux/lib/components/paginator/paginator.component.d.ts +0 -17
- package/core-ux/lib/components/parameter-field/parameter-field.component.d.ts +0 -13
- package/core-ux/lib/components/parameter-field/parameter-types/base-array-parameter-type.component.d.ts +0 -16
- package/core-ux/lib/components/parameter-field/parameter-types/base-parameter-type.component.d.ts +0 -21
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-bool/parameter-type-bool.component.d.ts +0 -9
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-bool-array/parameter-type-bool-array.component.d.ts +0 -12
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-date/parameter-type-date.component.d.ts +0 -16
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-date-array/parameter-type-date-array.component.d.ts +0 -17
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-number/parameter-type-number.component.d.ts +0 -6
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-number-array/parameter-type-number-array.component.d.ts +0 -6
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-password/parameter-type-password.component.d.ts +0 -9
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-text/parameter-type-text.component.d.ts +0 -7
- package/core-ux/lib/components/parameter-field/parameter-types/parameter-type-text-array/parameter-type-text-array.component.d.ts +0 -6
- package/core-ux/lib/components/property-grid/property-grid.component.d.ts +0 -125
- package/core-ux/lib/components/search-results/search-results.component.d.ts +0 -7
- package/core-ux/lib/components/tab/tab.component.d.ts +0 -14
- package/core-ux/lib/components/tabset/tabset.component.d.ts +0 -15
- package/core-ux/lib/components/text-viewer/text-viewer.component.d.ts +0 -21
- package/core-ux/lib/components/time-picker/time-picker.component.d.ts +0 -27
- package/core-ux/lib/components/tree/tree.component.d.ts +0 -39
- package/core-ux/lib/components/validation-error/validation-error.component.d.ts +0 -8
- package/core-ux/lib/components/wizard/wizard-step/wizard-step.component.d.ts +0 -26
- package/core-ux/lib/components/wizard/wizard.component.d.ts +0 -29
- package/core-ux/lib/core-ux.module.d.ts +0 -102
- package/core-ux/lib/directives/addclass.directive.d.ts +0 -11
- package/core-ux/lib/directives/collapse.directive.d.ts +0 -34
- package/core-ux/lib/directives/draggable.directive.d.ts +0 -39
- package/core-ux/lib/directives/droppable.directive.d.ts +0 -55
- package/core-ux/lib/directives/editMode.directive.d.ts +0 -8
- package/core-ux/lib/directives/focusable.directive.d.ts +0 -16
- package/core-ux/lib/directives/insertion.directive.d.ts +0 -8
- package/core-ux/lib/directives/onEnter.directive.d.ts +0 -11
- package/core-ux/lib/directives/tab-heading.d.ts +0 -8
- package/core-ux/lib/directives/tab-transclude.d.ts +0 -11
- package/core-ux/lib/directives/tooltip.directive.d.ts +0 -16
- package/core-ux/lib/directives/validate-on-enter.directive.d.ts +0 -10
- package/core-ux/lib/directives/viewMode.directive.d.ts +0 -8
- package/core-ux/lib/layout/default/default-layout.d.ts +0 -36
- package/core-ux/lib/layout/login/login-layout.d.ts +0 -15
- package/core-ux/lib/log.service.d.ts +0 -8
- package/core-ux/lib/modals/confirm-modal/confirm-modal.component.d.ts +0 -17
- package/core-ux/lib/modals/dialog/dialog.component.d.ts +0 -57
- package/core-ux/lib/modals/dialog-component.tokens.d.ts +0 -3
- package/core-ux/lib/modals/export-data-modal/export-data-modal.component.d.ts +0 -11
- package/core-ux/lib/modals/track-record-modal/track-record-modal.component.d.ts +0 -21
- package/core-ux/lib/modals/validation-modal/validation-modal.component.d.ts +0 -24
- package/core-ux/lib/model/datagrid.d.ts +0 -194
- package/core-ux/lib/model/model.d.ts +0 -222
- package/core-ux/lib/model/tree.d.ts +0 -12
- package/core-ux/lib/pipes/euro.pipe.d.ts +0 -9
- package/core-ux/lib/pipes/todefine.pipe.d.ts +0 -8
- package/core-ux/lib/pipes/tofixedsizeinteger.pipe.d.ts +0 -8
- package/core-ux/lib/services/action.service.d.ts +0 -42
- package/core-ux/lib/services/alert.service.d.ts +0 -51
- package/core-ux/lib/services/application.service.d.ts +0 -73
- package/core-ux/lib/services/can-deactivate-guard.d.ts +0 -12
- package/core-ux/lib/services/drag.service.d.ts +0 -54
- package/core-ux/lib/services/entity-selectors.d.ts +0 -37
- package/core-ux/lib/services/fire-authentication.service.d.ts +0 -13
- package/core-ux/lib/services/image.service.d.ts +0 -15
- package/core-ux/lib/services/modal-state.service.d.ts +0 -26
- package/core-ux/lib/services/modal.service.d.ts +0 -30
- package/core-ux/lib/services/presentation-profile.token.d.ts +0 -40
- package/core-ux/lib/services/selectorMapperBase.service.d.ts +0 -42
- package/core-ux/lib/v2/components/actions-panel/action-panel.component.d.ts +0 -48
- package/core-ux/lib/v2/components/base-component/base-component.d.ts +0 -80
- package/core-ux/lib/v2/components/cell-renderer/cell-renderer.component.d.ts +0 -11
- package/core-ux/lib/v2/components/data-grid/data-grid.component.d.ts +0 -104
- package/core-ux/lib/v2/components/data-grid/grid-field-descriptor/grid-field.component.d.ts +0 -55
- package/core-ux/lib/v2/components/data-list/data-list.component.d.ts +0 -29
- package/core-ux/lib/v2/components/editor-tab/editor-tab.component.d.ts +0 -15
- package/core-ux/lib/v2/components/editor-tabset/editor-tabset.component.d.ts +0 -18
- package/core-ux/lib/v2/components/field-descriptor/field.component.d.ts +0 -61
- package/core-ux/lib/v2/components/filter-form/filter-form.component.d.ts +0 -12
- package/core-ux/lib/v2/components/filter-summary/filter-summary.component.d.ts +0 -34
- package/core-ux/lib/v2/components/new-editor/new-editor.component.d.ts +0 -66
- package/core-ux/lib/v2/components/new-paginator/new-paginator.component.d.ts +0 -31
- package/core-ux/lib/v2/components/orderable/orderable-modal.component.d.ts +0 -36
- package/core-ux/lib/v2/components/orderable/orderable-modal.service.d.ts +0 -11
- package/core-ux/lib/v2/components/orderable/orderable.interface.d.ts +0 -52
- package/core-ux/lib/v2/components/property-editor/property-editor-component.d.ts +0 -89
- package/core-ux/lib/v2/components/selector/selector-registry.service.d.ts +0 -9
- package/core-ux/lib/v2/components/selector/selector.component.d.ts +0 -33
- package/core-ux/lib/v2/components/selector/selector.model.d.ts +0 -19
- package/core-ux/lib/v2/components/standard-page-layout/standard-page-layout.component.d.ts +0 -29
- package/core-ux/lib/v2/directives/base-shortcut.directive.d.ts +0 -15
- package/core-ux/lib/v2/directives/hide-on-threshold.directive.d.ts +0 -20
- package/core-ux/lib/v2/directives/layout-handler.directive.d.ts +0 -54
- package/core-ux/lib/v2/directives/row-ref.directive.d.ts +0 -21
- package/core-ux/lib/v2/models/aggregation-model.d.ts +0 -8
- package/core-ux/lib/v2/models/contexts/action-context.d.ts +0 -66
- package/core-ux/lib/v2/models/contexts/action-handler-context.d.ts +0 -49
- package/core-ux/lib/v2/models/contexts/base-form-context.d.ts +0 -42
- package/core-ux/lib/v2/models/contexts/change-detection-context.d.ts +0 -41
- package/core-ux/lib/v2/models/contexts/data-context.d.ts +0 -25
- package/core-ux/lib/v2/models/contexts/data-grid-style-context.d.ts +0 -36
- package/core-ux/lib/v2/models/contexts/editor-context.d.ts +0 -30
- package/core-ux/lib/v2/models/contexts/entity-config-context.d.ts +0 -49
- package/core-ux/lib/v2/models/contexts/filter-context.d.ts +0 -49
- package/core-ux/lib/v2/models/contexts/layout-context.d.ts +0 -57
- package/core-ux/lib/v2/models/contexts/logger-context.d.ts +0 -5
- package/core-ux/lib/v2/models/contexts/section-context.d.ts +0 -85
- package/core-ux/lib/v2/models/contexts/selection-context.d.ts +0 -45
- package/core-ux/lib/v2/models/entity-facade.d.ts +0 -35
- package/core-ux/lib/v2/models/guards/facade-load-guard.d.ts +0 -35
- package/core-ux/lib/v2/models/guards/filter-lifecycle-guard.d.ts +0 -29
- package/core-ux/lib/v2/models/states/sorting-state.d.ts +0 -14
- package/core-ux/lib/v2/models/utilities/action-definition.d.ts +0 -38
- package/core-ux/lib/v2/models/utilities/change-utilities.d.ts +0 -11
- package/core-ux/lib/v2/models/utilities/entity-updater.d.ts +0 -11
- package/core-ux/lib/v2/models/utilities/form-wrapper.d.ts +0 -30
- package/core-ux/lib/v2/models/utilities/row-registry.d.ts +0 -15
- package/core-ux/lib/v2/models/utilities/selection-styler.d.ts +0 -15
- package/core-ux/lib/v2/pipes/gridstyle.pipe.d.ts +0 -15
- package/core-ux/lib/v2/services/app-config.service.d.ts +0 -22
- package/core-ux/lib/v2/services/entity-facade-registry.service.d.ts +0 -28
- package/core-ux/lib/v2/services/facade-modal.service.d.ts +0 -21
- package/core-ux/lib/v2/services/layout.service.d.ts +0 -93
- package/core-ux/lib/v2/services/property-change-bus.service.d.ts +0 -9
- package/core-ux/lib/v2/services/selection.service.d.ts +0 -23
- package/core-ux/lib/v2/services/test.service.d.ts +0 -7
- package/core-ux/lib/v2/services/validation.service.d.ts +0 -10
- package/core-ux/lib/v2/services/view-model-loader.service.d.ts +0 -13
- package/system-data/index.d.ts +0 -68
- package/system-data/lib/data-services/account-service.generated.d.ts +0 -20
- package/system-data/lib/data-services/action-service.generated.d.ts +0 -15
- package/system-data/lib/data-services/address-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/checkout-service.generated.d.ts +0 -13
- package/system-data/lib/data-services/company-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/config-service.generated.d.ts +0 -18
- package/system-data/lib/data-services/country-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/currency-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/custom-field-group-entity-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/custom-field-group-item-service.generated.d.ts +0 -13
- package/system-data/lib/data-services/custom-field-group-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/custom-field-options-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/custom-field-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/custom-field-value-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/day-info-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/entity-files-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/error-category-service.generated.d.ts +0 -13
- package/system-data/lib/data-services/exchange-rate-detail-service.generated.d.ts +0 -35
- package/system-data/lib/data-services/exchange-rate-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/files-service.generated.d.ts +0 -26
- package/system-data/lib/data-services/keyword-service.generated.d.ts +0 -12
- package/system-data/lib/data-services/meta-entity-field-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-form-field-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-form-section-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-form-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-keyword-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-relation-definition-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-relation-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-translation-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/meta-entity-view-field-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/news-service.generated.d.ts +0 -13
- package/system-data/lib/data-services/parameter-section-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/parameter-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/parameter-value-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/permission-service.generated.d.ts +0 -13
- package/system-data/lib/data-services/plugin-parameter-value-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/presentation-profile-item-service.generated.d.ts +0 -14
- package/system-data/lib/data-services/presentation-profile-service.generated.d.ts +0 -13
- package/system-data/lib/data-services/rating-service.generated.d.ts +0 -14
- package/system-data/lib/data-services/rating-summary-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/request-entity-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/request-result-service.generated.d.ts +0 -12
- package/system-data/lib/data-services/request-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/resource-key-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/resource-language-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/resource-translation-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/role-permission-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/role-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/subcompany-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/supplier-company-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/supplier-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/synchronized-company-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/tva-rate-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-account-company-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-account-news-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-account-role-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-account-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-account-token-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-favorite-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-group-definition-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-group-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-history-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-permission-view-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/user-session-service.generated.d.ts +0 -10
- package/system-data/lib/data-services/version-service.generated.d.ts +0 -10
- package/system-data/lib/system-data.module.d.ts +0 -9
- package/system-model/index.d.ts +0 -3
- package/system-model/lib/model/interface.generated.d.ts +0 -1588
- package/system-model/lib/model/model.d.ts +0 -11
- package/system-model/lib/system-model.module.d.ts +0 -7
- package/system-root/index.d.ts +0 -8
- package/system-root/lib/generated/system-entity-keys.generated.d.ts +0 -63
- package/system-root/lib/generated/system-menu-item-provider.generated.d.ts +0 -67
- package/system-root/lib/generated/system-menu-service.generated.d.ts +0 -26
- package/system-root/lib/generated/system-permissions.generated.d.ts +0 -368
- package/system-root/lib/system-entity-keys.d.ts +0 -11
- package/system-root/lib/system-menu-item-provider.d.ts +0 -11
- package/system-root/lib/system-menu-service.d.ts +0 -12
- package/system-root/lib/system-root.module.d.ts +0 -7
- package/system-ux/index.d.ts +0 -181
- package/system-ux/lib/activate/activate.component.d.ts +0 -36
- package/system-ux/lib/address/address-editor.component.d.ts +0 -12
- package/system-ux/lib/app/access-denied/access-denied.component.d.ts +0 -9
- package/system-ux/lib/app/dflat-app.module.d.ts +0 -49
- package/system-ux/lib/app/history/history.component.d.ts +0 -16
- package/system-ux/lib/app/homepage/homepage.component.d.ts +0 -19
- package/system-ux/lib/app/layout/dflat-layout.component.d.ts +0 -38
- package/system-ux/lib/app/search/search-result/search-result.component.d.ts +0 -42
- package/system-ux/lib/app/search/search.component.d.ts +0 -68
- package/system-ux/lib/app/services/dflat-app.service.d.ts +0 -21
- package/system-ux/lib/app/services/dflat-auth.interceptor.d.ts +0 -16
- package/system-ux/lib/app/services/dflat-permission.service.d.ts +0 -7
- package/system-ux/lib/app/spinner/dflat-spinner.component.d.ts +0 -11
- package/system-ux/lib/app/user-menu/user-menu.component.d.ts +0 -56
- package/system-ux/lib/app/user-profile/user-profile.component.d.ts +0 -35
- package/system-ux/lib/components/image-upload/image-upload.component.d.ts +0 -99
- package/system-ux/lib/config/config-component.d.ts +0 -22
- package/system-ux/lib/config/datawarehouse-supply/dw-supply.component.d.ts +0 -14
- package/system-ux/lib/custom-field/custom-field-editor.component.d.ts +0 -13
- package/system-ux/lib/custom-field-options/custom-field-options-editor.component.d.ts +0 -17
- package/system-ux/lib/data-components/address.component.d.ts +0 -7
- package/system-ux/lib/data-components/company.component.d.ts +0 -15
- package/system-ux/lib/data-components/country.component.d.ts +0 -6
- package/system-ux/lib/data-components/currency.component.d.ts +0 -6
- package/system-ux/lib/data-components/customfield.component.d.ts +0 -15
- package/system-ux/lib/data-components/customfieldgroup.component.d.ts +0 -21
- package/system-ux/lib/data-components/customfieldgroupentity.component.d.ts +0 -16
- package/system-ux/lib/data-components/customfieldgroupitem.component.d.ts +0 -25
- package/system-ux/lib/data-components/customfieldoptions.component.d.ts +0 -19
- package/system-ux/lib/data-components/customfieldvalue.component.d.ts +0 -10
- package/system-ux/lib/data-components/dayinfo.component.d.ts +0 -10
- package/system-ux/lib/data-components/errorcategory.component.d.ts +0 -10
- package/system-ux/lib/data-components/exchangerate.component.d.ts +0 -11
- package/system-ux/lib/data-components/files.component.d.ts +0 -10
- package/system-ux/lib/data-components/generated/address.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/company.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/country.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/currency.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/customfield.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/customfieldgroup.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/customfieldgroupentity.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/customfieldgroupitem.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/customfieldoptions.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/customfieldvalue.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/dayinfo.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/entityfiles.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/errorcategory.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/exchangerate.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/files.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/keyword.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/metaentity.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/metaentityfield.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/metaentityform.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/metaentityformfield.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/metaentityformsection.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/metaentitykeyword.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/metaentityrelation.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/metaentityrelationdefinition.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/metaentitytranslation.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/metaentityviewfield.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/news.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/parameter.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/parametersection.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/parametervalue.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/permission.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/presentationprofile.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/presentationprofileitem.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/rating.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/ratingsummary.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/request.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/requestentity.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/requestresult.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/resourcekey.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/resourcelanguage.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/resourcetranslation.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/role.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/rolepermission.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/subcompany.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/supplier.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/suppliercompany.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/synchronizedcompany.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/system-components.generated.d.ts +0 -69
- package/system-ux/lib/data-components/generated/tvarate.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/useraccount.component.generated.d.ts +0 -25
- package/system-ux/lib/data-components/generated/useraccountcompany.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/useraccountnews.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/useraccountrole.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/useraccounttoken.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/userfavorite.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/usergroup.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/usergroupdefinition.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/userhistory.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/userpermissionview.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/usersession.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/generated/version.component.generated.d.ts +0 -18
- package/system-ux/lib/data-components/keyword.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentity.component.d.ts +0 -16
- package/system-ux/lib/data-components/metaentityfield.component.d.ts +0 -17
- package/system-ux/lib/data-components/metaentityform.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentityformfield.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentityformsection.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentitykeyword.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentityrelation.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentityrelationdefinition.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentitytranslation.component.d.ts +0 -10
- package/system-ux/lib/data-components/metaentityviewfield.component.d.ts +0 -10
- package/system-ux/lib/data-components/news.component.d.ts +0 -8
- package/system-ux/lib/data-components/parameter.component.d.ts +0 -10
- package/system-ux/lib/data-components/parametersection.component.d.ts +0 -10
- package/system-ux/lib/data-components/parametervalue.component.d.ts +0 -15
- package/system-ux/lib/data-components/permission.component.d.ts +0 -8
- package/system-ux/lib/data-components/presentationprofileitem.component.d.ts +0 -10
- package/system-ux/lib/data-components/rating.component.d.ts +0 -10
- package/system-ux/lib/data-components/ratingsummary.component.d.ts +0 -10
- package/system-ux/lib/data-components/request.component.d.ts +0 -16
- package/system-ux/lib/data-components/requestentity.component.d.ts +0 -10
- package/system-ux/lib/data-components/requestresult.component.d.ts +0 -10
- package/system-ux/lib/data-components/resourcekey.component.d.ts +0 -11
- package/system-ux/lib/data-components/resourcelanguage.component.d.ts +0 -9
- package/system-ux/lib/data-components/resourcetranslation.component.d.ts +0 -10
- package/system-ux/lib/data-components/role.component.d.ts +0 -10
- package/system-ux/lib/data-components/rolepermission.component.d.ts +0 -10
- package/system-ux/lib/data-components/subcompany.component.d.ts +0 -11
- package/system-ux/lib/data-components/supplier.component.d.ts +0 -8
- package/system-ux/lib/data-components/suppliercompany.component.d.ts +0 -10
- package/system-ux/lib/data-components/synchronizedcompany.component.d.ts +0 -15
- package/system-ux/lib/data-components/tvarate.component.d.ts +0 -14
- package/system-ux/lib/data-components/useraccount.component.d.ts +0 -11
- package/system-ux/lib/data-components/useraccountcompany.component.d.ts +0 -10
- package/system-ux/lib/data-components/useraccountnews.component.d.ts +0 -10
- package/system-ux/lib/data-components/useraccountrole.component.d.ts +0 -10
- package/system-ux/lib/data-components/useraccounttoken.component.d.ts +0 -10
- package/system-ux/lib/data-components/usercompany.component.d.ts +0 -19
- package/system-ux/lib/data-components/userfavorite.component.d.ts +0 -10
- package/system-ux/lib/data-components/usergroup.component.d.ts +0 -8
- package/system-ux/lib/data-components/usergroupdefinition.component.d.ts +0 -15
- package/system-ux/lib/data-components/userhistory.component.d.ts +0 -10
- package/system-ux/lib/data-components/userpermission.component.d.ts +0 -11
- package/system-ux/lib/data-components/userpermissionview.component.d.ts +0 -10
- package/system-ux/lib/data-components/userrole.component.d.ts +0 -17
- package/system-ux/lib/data-components/usersession.component.d.ts +0 -10
- package/system-ux/lib/data-components/version.component.d.ts +0 -10
- package/system-ux/lib/editor-components/company-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/country-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/currency-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/custom-field-group-editor.component.d.ts +0 -14
- package/system-ux/lib/editor-components/custom-field-group-entity-editor.component.d.ts +0 -13
- package/system-ux/lib/editor-components/custom-field-group-item-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/news-editor.component.d.ts +0 -28
- package/system-ux/lib/editor-components/permission-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/request-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/resource-translation-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/role-editor.component.d.ts +0 -27
- package/system-ux/lib/editor-components/user-account-editor.component.d.ts +0 -12
- package/system-ux/lib/editor-components/user-account-profile.component.d.ts +0 -31
- package/system-ux/lib/editor-components/user-group-editor.component.d.ts +0 -12
- package/system-ux/lib/entity-files/entity-files.component.d.ts +0 -37
- package/system-ux/lib/exchange-rate/exchange-rate-detail.component.d.ts +0 -17
- package/system-ux/lib/exchange-rate/exchange-rate-editor.component.d.ts +0 -25
- package/system-ux/lib/login/login.component.d.ts +0 -37
- package/system-ux/lib/meta-entity-field/meta-entity-field-editor.component.d.ts +0 -12
- package/system-ux/lib/presentation-profile/pp-facade.service.d.ts +0 -39
- package/system-ux/lib/presentation-profile/presentation-profile-action-service.d.ts +0 -16
- package/system-ux/lib/presentation-profile/presentation-profile-column-grid/presentation-profile-column.component.d.ts +0 -73
- package/system-ux/lib/presentation-profile/presentation-profile-column-grid/presentation-profile-items.component.d.ts +0 -50
- package/system-ux/lib/presentation-profile/presentation-profile-resolver.service.d.ts +0 -34
- package/system-ux/lib/presentation-profile/presentation-profile-transformer.d.ts +0 -49
- package/system-ux/lib/presentation-profile/presentation-profile.component.d.ts +0 -16
- package/system-ux/lib/presentation-profile/presentation-profile.service.d.ts +0 -58
- package/system-ux/lib/request-results/request-results.component.d.ts +0 -15
- package/system-ux/lib/reset-password/reset-password.component.d.ts +0 -32
- package/system-ux/lib/resource-language/resourcelanguage-editor.component.d.ts +0 -12
- package/system-ux/lib/services/custom-field-action-service.d.ts +0 -25
- package/system-ux/lib/services/custom-field-service.d.ts +0 -21
- package/system-ux/lib/services/rates-action-service.d.ts +0 -28
- package/system-ux/lib/services/select-user-company-action-service.d.ts +0 -23
- package/system-ux/lib/services/system-section.service.d.ts +0 -12
- package/system-ux/lib/services/system-selector-mapper.service.d.ts +0 -24
- package/system-ux/lib/services/user-action-service.d.ts +0 -20
- package/system-ux/lib/supplier/supplier-editor.component.d.ts +0 -12
- package/system-ux/lib/system-ux.module.d.ts +0 -131
- package/system-ux/lib/tva-rate/tva-rate-detail.component.d.ts +0 -17
- package/system-ux/lib/tva-rate/tva-rate-editor.component.d.ts +0 -25
|
@@ -1,1622 +1,1847 @@
|
|
|
1
|
-
import * as i7 from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { CommonModule } from
|
|
5
|
-
import * as i3 from
|
|
6
|
-
import { HttpHeaders, provideHttpClient, withInterceptorsFromDi,
|
|
7
|
-
import * as i0 from
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import * as i1
|
|
14
|
-
import * as signalR from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
1
|
+
import * as i7 from "@dflat-core/web/core";
|
|
2
|
+
import { EnsureModuleLoadedOnceGuard, Utilities } from "@dflat-core/web/core";
|
|
3
|
+
import { ApiErrorTypes, CoreModelModule, DictionnaryWrapper, Notification, User, UserUpdatedMessage } from "@dflat-core/web/core-model";
|
|
4
|
+
import { CommonModule } from "@angular/common";
|
|
5
|
+
import * as i3 from "@angular/common/http";
|
|
6
|
+
import { HttpErrorResponse, HttpHeaders, provideHttpClient, withInterceptorsFromDi, withXhr } from "@angular/common/http";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import { EventEmitter, Inject, Injectable, InjectionToken, NgModule, Optional, SkipSelf } from "@angular/core";
|
|
9
|
+
import jwt_decode from "jwt-decode";
|
|
10
|
+
import { BehaviorSubject, ReplaySubject, Subject, empty, throwError, timer } from "rxjs";
|
|
11
|
+
import { catchError, filter, finalize, map } from "rxjs/operators";
|
|
12
|
+
import * as i4 from "@angular/router";
|
|
13
|
+
import * as i1 from "@angular/platform-browser";
|
|
14
|
+
import * as signalR from "@microsoft/signalr";
|
|
15
|
+
var AppConfiguration = class AppConfiguration {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.searchText = "";
|
|
18
|
+
this.isSearchAllowed = false;
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
22
|
+
minVersion: "12.0.0",
|
|
23
|
+
version: "22.2.1",
|
|
24
|
+
ngImport: i0,
|
|
25
|
+
type: AppConfiguration,
|
|
26
|
+
deps: [],
|
|
27
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
static {
|
|
31
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.1",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: AppConfiguration
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.2.1",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: AppConfiguration,
|
|
44
|
+
decorators: [{ type: Injectable }],
|
|
45
|
+
ctorParameters: () => []
|
|
46
|
+
});
|
|
47
|
+
var AppKeys = class AppKeys {
|
|
48
|
+
static {
|
|
49
|
+
this.CURRENT_USER = "current_user";
|
|
50
|
+
}
|
|
51
|
+
static {
|
|
52
|
+
this.ACCESS_TOKEN = "access_token";
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.REFRESH_TOKEN = "refresh_token";
|
|
56
|
+
}
|
|
57
|
+
static {
|
|
58
|
+
this.TOKEN_EXPIRES_IN = "expires_in";
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
this.REMEMBER_ME = "remember_me";
|
|
62
|
+
}
|
|
63
|
+
static {
|
|
64
|
+
this.PERMISSIONS = "permissions";
|
|
65
|
+
}
|
|
66
|
+
static {
|
|
67
|
+
this.LAST_GEOLOCATIONS = "geolocations";
|
|
68
|
+
}
|
|
69
|
+
static {
|
|
70
|
+
this.REFERENCE_SUPPLIER_ID = "refsuppid";
|
|
71
|
+
}
|
|
72
|
+
static {
|
|
73
|
+
this.USER_COMPANY_ID = "companyid";
|
|
74
|
+
}
|
|
75
|
+
static {
|
|
76
|
+
this.SELECTED_COMPANY = "selectedcompany";
|
|
77
|
+
}
|
|
78
|
+
static {
|
|
79
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
80
|
+
minVersion: "12.0.0",
|
|
81
|
+
version: "22.2.1",
|
|
82
|
+
ngImport: i0,
|
|
83
|
+
type: AppKeys,
|
|
84
|
+
deps: [],
|
|
85
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
static {
|
|
89
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
90
|
+
minVersion: "12.0.0",
|
|
91
|
+
version: "22.2.1",
|
|
92
|
+
ngImport: i0,
|
|
93
|
+
type: AppKeys
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
98
|
+
minVersion: "12.0.0",
|
|
99
|
+
version: "22.2.1",
|
|
100
|
+
ngImport: i0,
|
|
101
|
+
type: AppKeys,
|
|
102
|
+
decorators: [{ type: Injectable }]
|
|
103
|
+
});
|
|
104
|
+
var ServerUrl = class ServerUrl {
|
|
105
|
+
static {
|
|
106
|
+
this.isProduction = false;
|
|
107
|
+
}
|
|
108
|
+
static {
|
|
109
|
+
this.baseUrl = ServerUrl.isProduction ? "" : "http://localhost:56407";
|
|
110
|
+
}
|
|
111
|
+
static {
|
|
112
|
+
this.apiUrl = ServerUrl.baseUrl + "/api";
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.hubUrl = ServerUrl.baseUrl + "/hub";
|
|
116
|
+
}
|
|
117
|
+
static {
|
|
118
|
+
this.loginPath = "/Account/Login";
|
|
119
|
+
}
|
|
120
|
+
static {
|
|
121
|
+
this.connectPath = "/Account/Connect";
|
|
122
|
+
}
|
|
123
|
+
static {
|
|
124
|
+
this.registerPath = "/Account/Register";
|
|
125
|
+
}
|
|
126
|
+
static {
|
|
127
|
+
this.activatePath = "/Account/Activate";
|
|
128
|
+
}
|
|
129
|
+
static {
|
|
130
|
+
this.refreshPath = "/Account/RefreshToken";
|
|
131
|
+
}
|
|
132
|
+
static {
|
|
133
|
+
this.disconnectPath = "/Account/Disconnect";
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var LocalStoreManager = class LocalStoreManager {
|
|
137
|
+
constructor() {
|
|
138
|
+
this.syncKeys = [];
|
|
139
|
+
this.initEvent = new Subject();
|
|
140
|
+
this.reservedKeys = [
|
|
141
|
+
"sync_keys",
|
|
142
|
+
"addToSyncKeys",
|
|
143
|
+
"removeFromSyncKeys",
|
|
144
|
+
"getSessionStorage",
|
|
145
|
+
"setSessionStorage",
|
|
146
|
+
"addToSessionStorage",
|
|
147
|
+
"removeFromSessionStorage",
|
|
148
|
+
"clearAllSessionsStorage"
|
|
149
|
+
];
|
|
150
|
+
this.sessionStorageTransferHandler = (event) => {
|
|
151
|
+
if (!event.newValue) return;
|
|
152
|
+
if (event.key == "getSessionStorage") {
|
|
153
|
+
if (sessionStorage.length) {
|
|
154
|
+
this.localStorageSetItem("setSessionStorage", sessionStorage);
|
|
155
|
+
localStorage.removeItem("setSessionStorage");
|
|
156
|
+
}
|
|
157
|
+
} else if (event.key == "setSessionStorage") {
|
|
158
|
+
if (!this.syncKeys.length) this.loadSyncKeys();
|
|
159
|
+
let data = JSON.parse(event.newValue);
|
|
160
|
+
for (let key in data) if (this.syncKeysContains(key)) this.sessionStorageSetItem(key, JSON.parse(data[key]));
|
|
161
|
+
this.onInit();
|
|
162
|
+
} else if (event.key === "addToSessionStorage") {
|
|
163
|
+
let data = JSON.parse(event.newValue);
|
|
164
|
+
this.addToSessionStorageHelper(data["data"], data["key"]);
|
|
165
|
+
} else if (event.key === "removeFromSessionStorage") this.removeFromSessionStorageHelper(event.newValue);
|
|
166
|
+
else if (event.key === "clearAllSessionsStorage" && sessionStorage.length) this.clearInstanceSessionStorage();
|
|
167
|
+
else if (event.key === "addToSyncKeys") this.addToSyncKeysHelper(event.newValue);
|
|
168
|
+
else if (event.key === "removeFromSyncKeys") this.removeFromSyncKeysHelper(event.newValue);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
static {
|
|
172
|
+
this.syncListenerInitialised = false;
|
|
173
|
+
}
|
|
174
|
+
static {
|
|
175
|
+
this.DBKEY_USER_DATA = "user_data";
|
|
176
|
+
}
|
|
177
|
+
static {
|
|
178
|
+
this.DBKEY_SYNC_KEYS = "sync_keys";
|
|
179
|
+
}
|
|
180
|
+
initialiseStorageSyncListener() {
|
|
181
|
+
if (LocalStoreManager.syncListenerInitialised == true) return;
|
|
182
|
+
LocalStoreManager.syncListenerInitialised = true;
|
|
183
|
+
window.addEventListener("storage", this.sessionStorageTransferHandler, false);
|
|
184
|
+
this.syncSessionStorage();
|
|
185
|
+
}
|
|
186
|
+
deinitialiseStorageSyncListener() {
|
|
187
|
+
window.removeEventListener("storage", this.sessionStorageTransferHandler, false);
|
|
188
|
+
LocalStoreManager.syncListenerInitialised = false;
|
|
189
|
+
}
|
|
190
|
+
syncSessionStorage() {
|
|
191
|
+
localStorage.setItem("getSessionStorage", "_dummy");
|
|
192
|
+
localStorage.removeItem("getSessionStorage");
|
|
193
|
+
}
|
|
194
|
+
clearAllStorage() {
|
|
195
|
+
this.clearAllSessionsStorage();
|
|
196
|
+
this.clearLocalStorage();
|
|
197
|
+
}
|
|
198
|
+
clearAllSessionsStorage() {
|
|
199
|
+
this.clearInstanceSessionStorage();
|
|
200
|
+
localStorage.removeItem(LocalStoreManager.DBKEY_SYNC_KEYS);
|
|
201
|
+
localStorage.setItem("clearAllSessionsStorage", "_dummy");
|
|
202
|
+
localStorage.removeItem("clearAllSessionsStorage");
|
|
203
|
+
}
|
|
204
|
+
clearInstanceSessionStorage() {
|
|
205
|
+
sessionStorage.clear();
|
|
206
|
+
this.syncKeys = [];
|
|
207
|
+
}
|
|
208
|
+
clearLocalStorage() {
|
|
209
|
+
localStorage.clear();
|
|
210
|
+
}
|
|
211
|
+
addToSessionStorage(data, key) {
|
|
212
|
+
this.addToSessionStorageHelper(data, key);
|
|
213
|
+
this.addToSyncKeysBackup(key);
|
|
214
|
+
this.localStorageSetItem("addToSessionStorage", {
|
|
215
|
+
key,
|
|
216
|
+
data
|
|
217
|
+
});
|
|
218
|
+
localStorage.removeItem("addToSessionStorage");
|
|
219
|
+
}
|
|
220
|
+
addToSessionStorageHelper(data, key) {
|
|
221
|
+
this.addToSyncKeysHelper(key);
|
|
222
|
+
this.sessionStorageSetItem(key, data);
|
|
223
|
+
}
|
|
224
|
+
removeFromSessionStorage(keyToRemove) {
|
|
225
|
+
this.removeFromSessionStorageHelper(keyToRemove);
|
|
226
|
+
this.removeFromSyncKeysBackup(keyToRemove);
|
|
227
|
+
localStorage.setItem("removeFromSessionStorage", keyToRemove);
|
|
228
|
+
localStorage.removeItem("removeFromSessionStorage");
|
|
229
|
+
}
|
|
230
|
+
removeFromSessionStorageHelper(keyToRemove) {
|
|
231
|
+
sessionStorage.removeItem(keyToRemove);
|
|
232
|
+
this.removeFromSyncKeysHelper(keyToRemove);
|
|
233
|
+
}
|
|
234
|
+
testForInvalidKeys(key) {
|
|
235
|
+
if (!key) throw new Error("key cannot be empty");
|
|
236
|
+
if (this.reservedKeys.some((x) => x === key)) throw new Error(`The storage key "${key}" is reserved and cannot be used. Please use a different key`);
|
|
237
|
+
}
|
|
238
|
+
syncKeysContains(key) {
|
|
239
|
+
return this.syncKeys.some((x) => x === key);
|
|
240
|
+
}
|
|
241
|
+
loadSyncKeys() {
|
|
242
|
+
if (this.syncKeys.length) return;
|
|
243
|
+
this.syncKeys = this.getSyncKeysFromStorage();
|
|
244
|
+
}
|
|
245
|
+
getSyncKeysFromStorage(defaultValue = []) {
|
|
246
|
+
let data = this.localStorageGetItem(LocalStoreManager.DBKEY_SYNC_KEYS);
|
|
247
|
+
if (data == null) return defaultValue;
|
|
248
|
+
else return data;
|
|
249
|
+
}
|
|
250
|
+
addToSyncKeys(key) {
|
|
251
|
+
this.addToSyncKeysHelper(key);
|
|
252
|
+
this.addToSyncKeysBackup(key);
|
|
253
|
+
localStorage.setItem("addToSyncKeys", key);
|
|
254
|
+
localStorage.removeItem("addToSyncKeys");
|
|
255
|
+
}
|
|
256
|
+
addToSyncKeysBackup(key) {
|
|
257
|
+
let storedSyncKeys = this.getSyncKeysFromStorage();
|
|
258
|
+
if (!storedSyncKeys.some((x) => x === key)) {
|
|
259
|
+
storedSyncKeys.push(key);
|
|
260
|
+
this.localStorageSetItem(LocalStoreManager.DBKEY_SYNC_KEYS, storedSyncKeys);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
removeFromSyncKeysBackup(key) {
|
|
264
|
+
let storedSyncKeys = this.getSyncKeysFromStorage();
|
|
265
|
+
let index = storedSyncKeys.indexOf(key);
|
|
266
|
+
if (index > -1) {
|
|
267
|
+
storedSyncKeys.splice(index, 1);
|
|
268
|
+
this.localStorageSetItem(LocalStoreManager.DBKEY_SYNC_KEYS, storedSyncKeys);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
addToSyncKeysHelper(key) {
|
|
272
|
+
if (!this.syncKeysContains(key)) this.syncKeys.push(key);
|
|
273
|
+
}
|
|
274
|
+
removeFromSyncKeys(key) {
|
|
275
|
+
this.removeFromSyncKeysHelper(key);
|
|
276
|
+
this.removeFromSyncKeysBackup(key);
|
|
277
|
+
localStorage.setItem("removeFromSyncKeys", key);
|
|
278
|
+
localStorage.removeItem("removeFromSyncKeys");
|
|
279
|
+
}
|
|
280
|
+
removeFromSyncKeysHelper(key) {
|
|
281
|
+
let index = this.syncKeys.indexOf(key);
|
|
282
|
+
if (index > -1) this.syncKeys.splice(index, 1);
|
|
283
|
+
}
|
|
284
|
+
saveSessionData(data, key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
285
|
+
this.testForInvalidKeys(key);
|
|
286
|
+
this.removeFromSyncKeys(key);
|
|
287
|
+
localStorage.removeItem(key);
|
|
288
|
+
this.sessionStorageSetItem(key, data);
|
|
289
|
+
}
|
|
290
|
+
saveSyncedSessionData(data, key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
291
|
+
this.testForInvalidKeys(key);
|
|
292
|
+
localStorage.removeItem(key);
|
|
293
|
+
this.addToSessionStorage(data, key);
|
|
294
|
+
}
|
|
295
|
+
savePermanentData(data, key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
296
|
+
this.testForInvalidKeys(key);
|
|
297
|
+
this.removeFromSessionStorage(key);
|
|
298
|
+
this.localStorageSetItem(key, data);
|
|
299
|
+
}
|
|
300
|
+
moveDataToSessionStorage(key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
301
|
+
this.testForInvalidKeys(key);
|
|
302
|
+
let data = this.getData(key);
|
|
303
|
+
if (data == null) return;
|
|
304
|
+
this.saveSessionData(data, key);
|
|
305
|
+
}
|
|
306
|
+
moveDataToSyncedSessionStorage(key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
307
|
+
this.testForInvalidKeys(key);
|
|
308
|
+
let data = this.getData(key);
|
|
309
|
+
if (data == null) return;
|
|
310
|
+
this.saveSyncedSessionData(data, key);
|
|
311
|
+
}
|
|
312
|
+
moveDataToPermanentStorage(key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
313
|
+
this.testForInvalidKeys(key);
|
|
314
|
+
let data = this.getData(key);
|
|
315
|
+
if (data == null) return;
|
|
316
|
+
this.savePermanentData(data, key);
|
|
317
|
+
}
|
|
318
|
+
exists(key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
319
|
+
let data = sessionStorage.getItem(key);
|
|
320
|
+
if (data == null) data = localStorage.getItem(key);
|
|
321
|
+
return data != null;
|
|
322
|
+
}
|
|
323
|
+
getData(key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
324
|
+
this.testForInvalidKeys(key);
|
|
325
|
+
let data = this.sessionStorageGetItem(key);
|
|
326
|
+
if (data == null) data = this.localStorageGetItem(key);
|
|
327
|
+
return data;
|
|
328
|
+
}
|
|
329
|
+
getDataObject(key = LocalStoreManager.DBKEY_USER_DATA, isDateType = false) {
|
|
330
|
+
let data = this.getData(key);
|
|
331
|
+
if (data != null) {
|
|
332
|
+
if (isDateType) data = new Date(data);
|
|
333
|
+
return data;
|
|
334
|
+
} else return null;
|
|
335
|
+
}
|
|
336
|
+
deleteData(key = LocalStoreManager.DBKEY_USER_DATA) {
|
|
337
|
+
this.testForInvalidKeys(key);
|
|
338
|
+
this.removeFromSessionStorage(key);
|
|
339
|
+
localStorage.removeItem(key);
|
|
340
|
+
}
|
|
341
|
+
localStorageSetItem(key, data) {
|
|
342
|
+
localStorage.setItem(key, JSON.stringify(data));
|
|
343
|
+
}
|
|
344
|
+
sessionStorageSetItem(key, data) {
|
|
345
|
+
sessionStorage.setItem(key, JSON.stringify(data));
|
|
346
|
+
}
|
|
347
|
+
localStorageGetItem(key) {
|
|
348
|
+
return Utilities.JSonTryParse(localStorage.getItem(key));
|
|
349
|
+
}
|
|
350
|
+
sessionStorageGetItem(key) {
|
|
351
|
+
return Utilities.JSonTryParse(sessionStorage.getItem(key));
|
|
352
|
+
}
|
|
353
|
+
onInit() {
|
|
354
|
+
setTimeout(() => {
|
|
355
|
+
this.initEvent.next({});
|
|
356
|
+
this.initEvent.complete();
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
getInitEvent() {
|
|
360
|
+
return this.initEvent.asObservable();
|
|
361
|
+
}
|
|
362
|
+
static {
|
|
363
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
364
|
+
minVersion: "12.0.0",
|
|
365
|
+
version: "22.2.1",
|
|
366
|
+
ngImport: i0,
|
|
367
|
+
type: LocalStoreManager,
|
|
368
|
+
deps: [],
|
|
369
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
static {
|
|
373
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
374
|
+
minVersion: "12.0.0",
|
|
375
|
+
version: "22.2.1",
|
|
376
|
+
ngImport: i0,
|
|
377
|
+
type: LocalStoreManager
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
382
|
+
minVersion: "12.0.0",
|
|
383
|
+
version: "22.2.1",
|
|
384
|
+
ngImport: i0,
|
|
385
|
+
type: LocalStoreManager,
|
|
386
|
+
decorators: [{ type: Injectable }]
|
|
387
|
+
});
|
|
388
|
+
var HeadersService = class HeadersService {
|
|
389
|
+
constructor(localStorage) {
|
|
390
|
+
this.localStorage = localStorage;
|
|
391
|
+
}
|
|
392
|
+
authJsonHeaders() {
|
|
393
|
+
return new HttpHeaders().set("Content-Type", "application/json").set("Accept", "application/json").set("Authorization", `Bearer ${this.geJWTToken}`);
|
|
394
|
+
}
|
|
395
|
+
authFormHeaders() {
|
|
396
|
+
return new HttpHeaders().set("Content-Type", "application/x-www-form-urlencoded").set("Accept", "application/json").set("Authorization", `Bearer ${this.geJWTToken}`);
|
|
397
|
+
}
|
|
398
|
+
authFileUploadHeaders() {
|
|
399
|
+
return new HttpHeaders().set("Authorization", `Bearer ${this.geJWTToken}`);
|
|
400
|
+
}
|
|
401
|
+
jsonHeaders() {
|
|
402
|
+
return new HttpHeaders().set("Content-Type", "application/json").set("Accept", "application/json");
|
|
403
|
+
}
|
|
404
|
+
contentHeadersV2() {
|
|
405
|
+
return new HttpHeaders().set("Content-Type", "application/x-www-form-urlencoded").set("Accept", "application/json");
|
|
406
|
+
}
|
|
407
|
+
get geJWTToken() {
|
|
408
|
+
let result = this.localStorage.getDataObject(AppKeys.ACCESS_TOKEN);
|
|
409
|
+
if (Utilities.IsNil(result)) return "";
|
|
410
|
+
return result;
|
|
411
|
+
}
|
|
412
|
+
static {
|
|
413
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
414
|
+
minVersion: "12.0.0",
|
|
415
|
+
version: "22.2.1",
|
|
416
|
+
ngImport: i0,
|
|
417
|
+
type: HeadersService,
|
|
418
|
+
deps: [{ token: LocalStoreManager }],
|
|
419
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
static {
|
|
423
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
424
|
+
minVersion: "12.0.0",
|
|
425
|
+
version: "22.2.1",
|
|
426
|
+
ngImport: i0,
|
|
427
|
+
type: HeadersService
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
432
|
+
minVersion: "12.0.0",
|
|
433
|
+
version: "22.2.1",
|
|
434
|
+
ngImport: i0,
|
|
435
|
+
type: HeadersService,
|
|
436
|
+
decorators: [{ type: Injectable }],
|
|
437
|
+
ctorParameters: () => [{ type: LocalStoreManager }]
|
|
438
|
+
});
|
|
439
|
+
var BusMessageService = class BusMessageService {
|
|
440
|
+
constructor() {
|
|
441
|
+
this.message$ = new Subject();
|
|
442
|
+
}
|
|
443
|
+
publish(message) {
|
|
444
|
+
const channel = message.constructor.name;
|
|
445
|
+
this.message$.next({
|
|
446
|
+
Channel: channel,
|
|
447
|
+
Data: message
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
of(messageType) {
|
|
451
|
+
const channel = messageType.name;
|
|
452
|
+
return this.message$.pipe(filter((m) => m.Channel === channel), map((m) => m.Data));
|
|
453
|
+
}
|
|
454
|
+
static {
|
|
455
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
456
|
+
minVersion: "12.0.0",
|
|
457
|
+
version: "22.2.1",
|
|
458
|
+
ngImport: i0,
|
|
459
|
+
type: BusMessageService,
|
|
460
|
+
deps: [],
|
|
461
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
static {
|
|
465
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
466
|
+
minVersion: "12.0.0",
|
|
467
|
+
version: "22.2.1",
|
|
468
|
+
ngImport: i0,
|
|
469
|
+
type: BusMessageService
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
474
|
+
minVersion: "12.0.0",
|
|
475
|
+
version: "22.2.1",
|
|
476
|
+
ngImport: i0,
|
|
477
|
+
type: BusMessageService,
|
|
478
|
+
decorators: [{ type: Injectable }],
|
|
479
|
+
ctorParameters: () => []
|
|
480
|
+
});
|
|
481
|
+
var NotificationMqService = class NotificationMqService {
|
|
482
|
+
constructor() {
|
|
483
|
+
this.message$ = new Subject();
|
|
484
|
+
}
|
|
485
|
+
publish(message) {
|
|
486
|
+
const defaultchannel = message.entityType;
|
|
487
|
+
this.message$.next({
|
|
488
|
+
Channel: defaultchannel,
|
|
489
|
+
Data: message
|
|
490
|
+
});
|
|
491
|
+
if (!Utilities.IsUndefined(message.entityId)) {
|
|
492
|
+
const detailchannel = `${message.entityType}-${message.entityId}`;
|
|
493
|
+
this.message$.next({
|
|
494
|
+
Channel: detailchannel,
|
|
495
|
+
Data: message
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
of(channelKey) {
|
|
500
|
+
const channel = channelKey;
|
|
501
|
+
return this.message$.pipe(filter((m) => m.Channel === channel), map((m) => m.Data));
|
|
502
|
+
}
|
|
503
|
+
static {
|
|
504
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
505
|
+
minVersion: "12.0.0",
|
|
506
|
+
version: "22.2.1",
|
|
507
|
+
ngImport: i0,
|
|
508
|
+
type: NotificationMqService,
|
|
509
|
+
deps: [],
|
|
510
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
static {
|
|
514
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
515
|
+
minVersion: "12.0.0",
|
|
516
|
+
version: "22.2.1",
|
|
517
|
+
ngImport: i0,
|
|
518
|
+
type: NotificationMqService
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
523
|
+
minVersion: "12.0.0",
|
|
524
|
+
version: "22.2.1",
|
|
525
|
+
ngImport: i0,
|
|
526
|
+
type: NotificationMqService,
|
|
527
|
+
decorators: [{ type: Injectable }],
|
|
528
|
+
ctorParameters: () => []
|
|
529
|
+
});
|
|
530
|
+
var PermissionService = class PermissionService {
|
|
531
|
+
constructor(localStorage) {
|
|
532
|
+
this.localStorage = localStorage;
|
|
533
|
+
}
|
|
534
|
+
hasPermission(permission) {
|
|
535
|
+
return this.permissions != null && this.permissions.some((p) => p === permission) || this.isAdmin;
|
|
536
|
+
}
|
|
537
|
+
get permissions() {
|
|
538
|
+
let permissions = this.localStorage.getDataObject(AppKeys.PERMISSIONS);
|
|
539
|
+
return JSON.parse(permissions);
|
|
540
|
+
}
|
|
541
|
+
get isAdmin() {
|
|
542
|
+
let parsed = JSON.parse(this.currentUser);
|
|
543
|
+
return parsed && parsed.IsAdmin || false;
|
|
544
|
+
}
|
|
545
|
+
get currentUser() {
|
|
546
|
+
return this.localStorage.getDataObject(AppKeys.CURRENT_USER);
|
|
547
|
+
}
|
|
548
|
+
static {
|
|
549
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
550
|
+
minVersion: "12.0.0",
|
|
551
|
+
version: "22.2.1",
|
|
552
|
+
ngImport: i0,
|
|
553
|
+
type: PermissionService,
|
|
554
|
+
deps: [{ token: LocalStoreManager }],
|
|
555
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
static {
|
|
559
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
560
|
+
minVersion: "12.0.0",
|
|
561
|
+
version: "22.2.1",
|
|
562
|
+
ngImport: i0,
|
|
563
|
+
type: PermissionService
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
568
|
+
minVersion: "12.0.0",
|
|
569
|
+
version: "22.2.1",
|
|
570
|
+
ngImport: i0,
|
|
571
|
+
type: PermissionService,
|
|
572
|
+
decorators: [{ type: Injectable }],
|
|
573
|
+
ctorParameters: () => [{ type: LocalStoreManager }]
|
|
574
|
+
});
|
|
575
|
+
var MenuService = class MenuService {
|
|
576
|
+
constructor(permissionService) {
|
|
577
|
+
this.permissionService = permissionService;
|
|
578
|
+
this.current = new ReplaySubject(1);
|
|
579
|
+
this.hasPermission = (permKey) => {
|
|
580
|
+
if (permKey === void 0) return true;
|
|
581
|
+
return this.permissionService.hasPermission(permKey);
|
|
582
|
+
};
|
|
583
|
+
this.hasAnyPermission = (permKeys) => {
|
|
584
|
+
let result = false;
|
|
585
|
+
permKeys.forEach((p) => result = result || this.hasPermission(p));
|
|
586
|
+
return result;
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
setCurrent(menu) {
|
|
590
|
+
this.current.next(menu);
|
|
591
|
+
}
|
|
592
|
+
getCurrent() {
|
|
593
|
+
return this.current;
|
|
594
|
+
}
|
|
595
|
+
get permissionRouteMap() {
|
|
596
|
+
if (Utilities.IsNil(this._permissionRouteMap)) {
|
|
597
|
+
this._permissionRouteMap = new DictionnaryWrapper();
|
|
598
|
+
this.getAllMenuItems(true).forEach((item) => {
|
|
599
|
+
if (!Utilities.IsNil(item.sublinks)) item.sublinks.forEach((subItem) => {
|
|
600
|
+
if (subItem.permissionKey) this._permissionRouteMap.dictionary[subItem.link] = subItem.permissionKey;
|
|
601
|
+
});
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
return this._permissionRouteMap;
|
|
605
|
+
}
|
|
606
|
+
resetPermissionMap() {
|
|
607
|
+
this._permissionRouteMap = void 0;
|
|
608
|
+
}
|
|
609
|
+
hasAccessToThisRoute(url) {
|
|
610
|
+
let menuItems = this.getAccessGrantedMenuItems();
|
|
611
|
+
if (!Utilities.IsNil(menuItems) && menuItems.findIndex((f) => f.link === url) >= 0) return true;
|
|
612
|
+
if (this.permissionRouteMap.containsKeyOrPartKey(url)) return this.hasPermission(this.permissionRouteMap.getPartKey(url));
|
|
613
|
+
return true;
|
|
614
|
+
}
|
|
615
|
+
pushItem(items, menuItem, isAdmin) {
|
|
616
|
+
if (Utilities.IsNil(menuItem.permissionKey) || isAdmin || this.hasPermission(menuItem.permissionKey)) items.push(menuItem);
|
|
617
|
+
}
|
|
618
|
+
getMenuItems(isAdmin) {
|
|
619
|
+
let results = this.getAllMenuItems(isAdmin);
|
|
620
|
+
for (let i = 0; i < results.length; i++) results[i].id = i;
|
|
621
|
+
return this.sortLinks(results);
|
|
622
|
+
}
|
|
623
|
+
sortLinks(links) {
|
|
624
|
+
return links.map((t) => {
|
|
625
|
+
return {
|
|
626
|
+
...t,
|
|
627
|
+
sublinks: this.sortLinksSubLevel(t.sublinks)
|
|
628
|
+
};
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
sortLinksSubLevel(links) {
|
|
632
|
+
if (!links) return null;
|
|
633
|
+
return links.sort((a, b) => a.title.localeCompare(b.title));
|
|
634
|
+
}
|
|
635
|
+
merge(Menus) {
|
|
636
|
+
let menu = [];
|
|
637
|
+
Menus.forEach((item) => {
|
|
638
|
+
let index = menu.findIndex((x) => x.title == item.title);
|
|
639
|
+
if (index >= 0) menu[index].sublinks = [...menu[index].sublinks, ...item.sublinks];
|
|
640
|
+
else menu.push(item);
|
|
641
|
+
});
|
|
642
|
+
return menu;
|
|
643
|
+
}
|
|
644
|
+
static {
|
|
645
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
646
|
+
minVersion: "12.0.0",
|
|
647
|
+
version: "22.2.1",
|
|
648
|
+
ngImport: i0,
|
|
649
|
+
type: MenuService,
|
|
650
|
+
deps: [{ token: PermissionService }],
|
|
651
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
static {
|
|
655
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
656
|
+
minVersion: "12.0.0",
|
|
657
|
+
version: "22.2.1",
|
|
658
|
+
ngImport: i0,
|
|
659
|
+
type: MenuService
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
664
|
+
minVersion: "12.0.0",
|
|
665
|
+
version: "22.2.1",
|
|
666
|
+
ngImport: i0,
|
|
667
|
+
type: MenuService,
|
|
668
|
+
decorators: [{ type: Injectable }],
|
|
669
|
+
ctorParameters: () => [{ type: PermissionService }]
|
|
670
|
+
});
|
|
550
671
|
var AuthTokenType;
|
|
551
|
-
(function
|
|
552
|
-
|
|
553
|
-
|
|
672
|
+
(function(AuthTokenType) {
|
|
673
|
+
AuthTokenType[AuthTokenType["AccessToken"] = 0] = "AccessToken";
|
|
674
|
+
AuthTokenType[AuthTokenType["RefreshToken"] = 1] = "RefreshToken";
|
|
554
675
|
})(AuthTokenType || (AuthTokenType = {}));
|
|
555
|
-
class AuthService {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
676
|
+
var AuthService = class AuthService {
|
|
677
|
+
constructor(headersService, busMsg, httpClient, router, localStorage, menuService, env) {
|
|
678
|
+
this.headersService = headersService;
|
|
679
|
+
this.busMsg = busMsg;
|
|
680
|
+
this.httpClient = httpClient;
|
|
681
|
+
this.router = router;
|
|
682
|
+
this.localStorage = localStorage;
|
|
683
|
+
this.menuService = menuService;
|
|
684
|
+
this.env = env;
|
|
685
|
+
this.baseUrl = this.env.apiUrl;
|
|
686
|
+
this.refreshTokenTimerCheckId = "is_refreshToken_timer_started";
|
|
687
|
+
this.scheduleRefreshToken(this.isLoggedIn, false);
|
|
688
|
+
}
|
|
689
|
+
login(username, password, rememberMe) {
|
|
690
|
+
let body = JSON.stringify({
|
|
691
|
+
"username": username,
|
|
692
|
+
"password": password
|
|
693
|
+
});
|
|
694
|
+
let _url = this.baseUrl + ServerUrl.connectPath;
|
|
695
|
+
return this.httpClient.post(_url, body, { headers: this.headersService.authJsonHeaders() }).pipe(map((resp) => {
|
|
696
|
+
let user = resp;
|
|
697
|
+
if (user && user.AccessToken) {
|
|
698
|
+
this.saveUserInfos(user, JSON.stringify(user), rememberMe);
|
|
699
|
+
this.busMsg.publish(new UserUpdatedMessage(user.AccessToken));
|
|
700
|
+
this.scheduleRefreshToken(true, true);
|
|
701
|
+
return user;
|
|
702
|
+
}
|
|
703
|
+
}));
|
|
704
|
+
}
|
|
705
|
+
register(captchaToken, firstName, lastName, email, password, rememberMe) {
|
|
706
|
+
let body = JSON.stringify({
|
|
707
|
+
"CaptchaToken": captchaToken,
|
|
708
|
+
"FirstName": firstName,
|
|
709
|
+
"LastName": lastName,
|
|
710
|
+
"Email": email,
|
|
711
|
+
"Password": password
|
|
712
|
+
});
|
|
713
|
+
let _url = this.baseUrl + ServerUrl.registerPath;
|
|
714
|
+
return this.httpClient.post(_url, body, { headers: this.headersService.authJsonHeaders() }).pipe(map((resp) => {
|
|
715
|
+
let user = resp;
|
|
716
|
+
if (user && user.AccessToken) {
|
|
717
|
+
this.saveUserInfos(user, JSON.stringify(user), rememberMe);
|
|
718
|
+
this.busMsg.publish(new UserUpdatedMessage(user.AccessToken));
|
|
719
|
+
this.scheduleRefreshToken(true, true);
|
|
720
|
+
return user;
|
|
721
|
+
}
|
|
722
|
+
}));
|
|
723
|
+
}
|
|
724
|
+
activate(code) {
|
|
725
|
+
let body = JSON.stringify({ "ActivationCode": code });
|
|
726
|
+
let _url = this.baseUrl + ServerUrl.activatePath;
|
|
727
|
+
return this.httpClient.post(_url, body, { headers: this.headersService.authJsonHeaders() }).pipe(map((resp) => {
|
|
728
|
+
return resp;
|
|
729
|
+
}));
|
|
730
|
+
}
|
|
731
|
+
saveUserInfos(user, userDetails, rememberMe) {
|
|
732
|
+
let permissions = user.Permissions || new Array();
|
|
733
|
+
if (rememberMe) {
|
|
734
|
+
this.localStorage.savePermanentData(user.AccessToken, AppKeys.ACCESS_TOKEN);
|
|
735
|
+
this.localStorage.savePermanentData(user.RefreshToken, AppKeys.REFRESH_TOKEN);
|
|
736
|
+
this.localStorage.savePermanentData(userDetails, AppKeys.CURRENT_USER);
|
|
737
|
+
this.localStorage.savePermanentData(JSON.stringify(permissions), AppKeys.PERMISSIONS);
|
|
738
|
+
} else {
|
|
739
|
+
this.localStorage.saveSyncedSessionData(user.AccessToken, AppKeys.ACCESS_TOKEN);
|
|
740
|
+
this.localStorage.saveSyncedSessionData(user.RefreshToken, AppKeys.REFRESH_TOKEN);
|
|
741
|
+
this.localStorage.saveSyncedSessionData(userDetails, AppKeys.CURRENT_USER);
|
|
742
|
+
this.localStorage.saveSyncedSessionData(JSON.stringify(permissions), AppKeys.PERMISSIONS);
|
|
743
|
+
}
|
|
744
|
+
if (rememberMe) this.localStorage.savePermanentData(rememberMe, AppKeys.REMEMBER_ME);
|
|
745
|
+
}
|
|
746
|
+
getPermissions(token) {
|
|
747
|
+
let decodedToken = jwt_decode(token);
|
|
748
|
+
let permissions = new Array();
|
|
749
|
+
if (decodedToken.permissions) permissions = Array.isArray(decodedToken.permissions) ? decodedToken.permissions : [decodedToken.permissions];
|
|
750
|
+
return permissions;
|
|
751
|
+
}
|
|
752
|
+
removeUserInfos() {
|
|
753
|
+
this.localStorage.deleteData(AppKeys.ACCESS_TOKEN);
|
|
754
|
+
this.localStorage.deleteData(AppKeys.REFRESH_TOKEN);
|
|
755
|
+
this.localStorage.deleteData(AppKeys.CURRENT_USER);
|
|
756
|
+
this.loginRedirectUrl = "/";
|
|
757
|
+
}
|
|
758
|
+
logout(pseudo) {
|
|
759
|
+
this.disconnect(pseudo);
|
|
760
|
+
}
|
|
761
|
+
disconnect(pseudo) {
|
|
762
|
+
const headers = new HttpHeaders({ "Content-Type": "application/json" });
|
|
763
|
+
const model = { refreshToken: this.refreshToken };
|
|
764
|
+
return this.httpClient.post(`${this.baseUrl}${ServerUrl.disconnectPath}`, model, { headers }).pipe(map((response) => response || {}), finalize(() => {
|
|
765
|
+
this.ensureLogout();
|
|
766
|
+
this.router.navigate(["/"]);
|
|
767
|
+
})).subscribe((result) => {
|
|
768
|
+
console.log("logout", result);
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
ensureLogout() {
|
|
772
|
+
this.menuService.resetPermissionMap();
|
|
773
|
+
this.busMsg.publish(new UserUpdatedMessage(null));
|
|
774
|
+
this.removeUserInfos();
|
|
775
|
+
this.unscheduleRefreshToken(true);
|
|
776
|
+
}
|
|
777
|
+
redirectLoginUser() {
|
|
778
|
+
let redirect = this.loginRedirectUrl && this.loginRedirectUrl !== "/" ? this.loginRedirectUrl : "/";
|
|
779
|
+
this.loginRedirectUrl = null;
|
|
780
|
+
let urlParamsAndFragment = Utilities.splitInTwo(redirect, "#");
|
|
781
|
+
let urlAndParams = Utilities.splitInTwo(urlParamsAndFragment.firstPart, "?");
|
|
782
|
+
let navigationExtras = {
|
|
783
|
+
fragment: urlParamsAndFragment.secondPart,
|
|
784
|
+
queryParams: Utilities.getQueryParamsFromString(urlAndParams.secondPart),
|
|
785
|
+
queryParamsHandling: "merge"
|
|
786
|
+
};
|
|
787
|
+
this.router.navigate([urlAndParams.firstPart], navigationExtras);
|
|
788
|
+
}
|
|
789
|
+
invalidateCurrentTabId() {
|
|
790
|
+
if (!this.rememberMe) return;
|
|
791
|
+
const currentTabId = this.getCurrentTabId();
|
|
792
|
+
if (this.timerStat && this.timerStat.tabId === currentTabId) this.setRefreshTokenTimerStopped();
|
|
793
|
+
}
|
|
794
|
+
scheduleRefreshToken(isAuthUserLoggedIn, calledFromLogin) {
|
|
795
|
+
this.unscheduleRefreshToken(false);
|
|
796
|
+
if (!this.isLoggedIn) return;
|
|
797
|
+
const expDateUtc = this.getAccessTokenExpirationDateUtc();
|
|
798
|
+
if (!expDateUtc) throw new Error("This access token has not the `exp` property.");
|
|
799
|
+
const expiresAtUtc = expDateUtc.valueOf();
|
|
800
|
+
const nowUtc = (/* @__PURE__ */ new Date()).valueOf();
|
|
801
|
+
const initialDelay = Math.max(1, expiresAtUtc - nowUtc - 3e3);
|
|
802
|
+
const timerSource$ = timer(initialDelay);
|
|
803
|
+
this.refreshTokenSubscription = timerSource$.subscribe(() => {
|
|
804
|
+
if (calledFromLogin || !this.isRefreshTokenTimerStartedInAnotherTab()) this.updateToken();
|
|
805
|
+
else this.scheduleRefreshToken(isAuthUserLoggedIn, false);
|
|
806
|
+
});
|
|
807
|
+
if (calledFromLogin || !this.isRefreshTokenTimerStartedInAnotherTab()) this.setRefreshTokenTimerStarted();
|
|
808
|
+
}
|
|
809
|
+
setRefreshTokenTimerStopped() {
|
|
810
|
+
this.localStorage.savePermanentData(JSON.stringify({
|
|
811
|
+
isStarted: false,
|
|
812
|
+
tabId: -1
|
|
813
|
+
}), this.refreshTokenTimerCheckId);
|
|
814
|
+
}
|
|
815
|
+
setRefreshTokenTimerStarted() {
|
|
816
|
+
this.localStorage.savePermanentData(JSON.stringify({
|
|
817
|
+
isStarted: true,
|
|
818
|
+
tabId: this.getCurrentTabId()
|
|
819
|
+
}), this.refreshTokenTimerCheckId);
|
|
820
|
+
}
|
|
821
|
+
deleteRefreshTokenTimerCheckId() {
|
|
822
|
+
this.localStorage.deleteData(this.refreshTokenTimerCheckId);
|
|
823
|
+
}
|
|
824
|
+
isRefreshTokenTimerStartedInAnotherTab() {
|
|
825
|
+
if (!this.rememberMe) return false;
|
|
826
|
+
const currentTabId = this.getCurrentTabId();
|
|
827
|
+
return this.timerStat && this.timerStat.isStarted === true && this.timerStat.tabId !== currentTabId;
|
|
828
|
+
}
|
|
829
|
+
getCurrentTabId() {
|
|
830
|
+
const tabIdToken = "currentTabId";
|
|
831
|
+
let tabId = this.localStorage.getData(tabIdToken);
|
|
832
|
+
if (tabId) return tabId;
|
|
833
|
+
tabId = Math.random();
|
|
834
|
+
this.localStorage.saveSyncedSessionData(tabId, tabIdToken);
|
|
835
|
+
return tabId;
|
|
836
|
+
}
|
|
837
|
+
getAccessTokenExpirationDateUtc() {
|
|
838
|
+
const decoded = this.getDecodedAccessToken();
|
|
839
|
+
if (decoded.exp === void 0) return null;
|
|
840
|
+
const date = /* @__PURE__ */ new Date(0);
|
|
841
|
+
date.setUTCSeconds(decoded.exp);
|
|
842
|
+
return date;
|
|
843
|
+
}
|
|
844
|
+
isAccessTokenTokenExpired() {
|
|
845
|
+
const expirationDateUtc = this.getAccessTokenExpirationDateUtc();
|
|
846
|
+
if (!expirationDateUtc) return true;
|
|
847
|
+
return !(expirationDateUtc.valueOf() > (/* @__PURE__ */ new Date()).valueOf());
|
|
848
|
+
}
|
|
849
|
+
getDecodedAccessToken() {
|
|
850
|
+
return jwt_decode(this.token);
|
|
851
|
+
}
|
|
852
|
+
isEmptyString(value) {
|
|
853
|
+
return !value || 0 === value.length;
|
|
854
|
+
}
|
|
855
|
+
unscheduleRefreshToken(cancelTimerCheckToken) {
|
|
856
|
+
if (this.refreshTokenSubscription) this.refreshTokenSubscription.unsubscribe();
|
|
857
|
+
if (cancelTimerCheckToken) this.deleteRefreshTokenTimerCheckId();
|
|
858
|
+
}
|
|
859
|
+
updateToken() {
|
|
860
|
+
console.log(`Entering updateToken()`);
|
|
861
|
+
const headers = new HttpHeaders({ "Content-Type": "application/json" });
|
|
862
|
+
const model = { refreshToken: this.refreshToken };
|
|
863
|
+
return this.httpClient.post(`${this.baseUrl}${ServerUrl.refreshPath}`, model, { headers }).pipe(map((response) => response || {}), catchError((error) => throwError(() => new Error(error.error)))).subscribe((resp) => {
|
|
864
|
+
let user = resp;
|
|
865
|
+
if (user && user.AccessToken) {
|
|
866
|
+
this.saveUserInfos(user, JSON.stringify(user), this.rememberMe);
|
|
867
|
+
this.busMsg.publish(new UserUpdatedMessage(user.AccessToken));
|
|
868
|
+
this.scheduleRefreshToken(this.isLoggedIn, false);
|
|
869
|
+
return user;
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
hasPermission(permission) {
|
|
874
|
+
return this.permissions != null && this.permissions.some((p) => p === permission) || this.isAdmin;
|
|
875
|
+
}
|
|
876
|
+
get timerStat() {
|
|
877
|
+
const timerStat_key = this.localStorage.getDataObject(this.refreshTokenTimerCheckId);
|
|
878
|
+
return JSON.parse(timerStat_key);
|
|
879
|
+
}
|
|
880
|
+
get isLoggedIn() {
|
|
881
|
+
const accessToken = this.token;
|
|
882
|
+
const refreshToken = this.refreshToken;
|
|
883
|
+
return !this.isEmptyString(accessToken) && !this.isEmptyString(refreshToken) && !this.isAccessTokenTokenExpired();
|
|
884
|
+
}
|
|
885
|
+
get isAdmin() {
|
|
886
|
+
let parsed = JSON.parse(this.currentUser);
|
|
887
|
+
if (Utilities.IsNil(parsed)) return false;
|
|
888
|
+
return parsed.IsAdmin || false;
|
|
889
|
+
}
|
|
890
|
+
get pseudo() {
|
|
891
|
+
return JSON.parse(this.currentUser).Username || "";
|
|
892
|
+
}
|
|
893
|
+
get userId() {
|
|
894
|
+
return JSON.parse(this.currentUser).Id || 0;
|
|
895
|
+
}
|
|
896
|
+
get currentUser() {
|
|
897
|
+
return this.localStorage.getDataObject(AppKeys.CURRENT_USER);
|
|
898
|
+
}
|
|
899
|
+
get rememberMe() {
|
|
900
|
+
return this.localStorage.getDataObject(AppKeys.REMEMBER_ME) === true;
|
|
901
|
+
}
|
|
902
|
+
get token() {
|
|
903
|
+
return this.localStorage.getDataObject(AppKeys.ACCESS_TOKEN);
|
|
904
|
+
}
|
|
905
|
+
get refreshToken() {
|
|
906
|
+
return this.localStorage.getDataObject(AppKeys.REFRESH_TOKEN);
|
|
907
|
+
}
|
|
908
|
+
get permissions() {
|
|
909
|
+
let permissions = this.localStorage.getDataObject(AppKeys.PERMISSIONS);
|
|
910
|
+
return JSON.parse(permissions);
|
|
911
|
+
}
|
|
912
|
+
get companyId() {
|
|
913
|
+
const decoded = this.getDecodedAccessToken();
|
|
914
|
+
if (Utilities.IsNil(decoded[AppKeys.USER_COMPANY_ID])) return null;
|
|
915
|
+
return decoded[AppKeys.USER_COMPANY_ID];
|
|
916
|
+
}
|
|
917
|
+
get referenceSupplierId() {
|
|
918
|
+
const decoded = this.getDecodedAccessToken();
|
|
919
|
+
if (Utilities.IsNil(decoded[AppKeys.REFERENCE_SUPPLIER_ID])) return null;
|
|
920
|
+
return decoded[AppKeys.REFERENCE_SUPPLIER_ID];
|
|
921
|
+
}
|
|
922
|
+
navigateToHome() {
|
|
923
|
+
this.router.navigate(["/"]);
|
|
924
|
+
}
|
|
925
|
+
static {
|
|
926
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
927
|
+
minVersion: "12.0.0",
|
|
928
|
+
version: "22.2.1",
|
|
929
|
+
ngImport: i0,
|
|
930
|
+
type: AuthService,
|
|
931
|
+
deps: [
|
|
932
|
+
{ token: HeadersService },
|
|
933
|
+
{ token: BusMessageService },
|
|
934
|
+
{ token: i3.HttpClient },
|
|
935
|
+
{ token: i4.Router },
|
|
936
|
+
{ token: LocalStoreManager },
|
|
937
|
+
{ token: MenuService },
|
|
938
|
+
{ token: i7.EnvironmentBase }
|
|
939
|
+
],
|
|
940
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
static {
|
|
944
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
945
|
+
minVersion: "12.0.0",
|
|
946
|
+
version: "22.2.1",
|
|
947
|
+
ngImport: i0,
|
|
948
|
+
type: AuthService
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
953
|
+
minVersion: "12.0.0",
|
|
954
|
+
version: "22.2.1",
|
|
955
|
+
ngImport: i0,
|
|
956
|
+
type: AuthService,
|
|
957
|
+
decorators: [{ type: Injectable }],
|
|
958
|
+
ctorParameters: () => [
|
|
959
|
+
{ type: HeadersService },
|
|
960
|
+
{ type: BusMessageService },
|
|
961
|
+
{ type: i3.HttpClient },
|
|
962
|
+
{ type: i4.Router },
|
|
963
|
+
{ type: LocalStoreManager },
|
|
964
|
+
{ type: MenuService },
|
|
965
|
+
{ type: i7.EnvironmentBase }
|
|
966
|
+
]
|
|
967
|
+
});
|
|
968
|
+
var AuthGuard = class AuthGuard {
|
|
969
|
+
constructor(authService, menuService, router) {
|
|
970
|
+
this.authService = authService;
|
|
971
|
+
this.menuService = menuService;
|
|
972
|
+
this.router = router;
|
|
973
|
+
}
|
|
974
|
+
canActivate(route, state) {
|
|
975
|
+
let url = state.url;
|
|
976
|
+
return this.checkLogin(url);
|
|
977
|
+
}
|
|
978
|
+
canActivateChild(route, state) {
|
|
979
|
+
return this.canActivate(route, state);
|
|
980
|
+
}
|
|
981
|
+
canLoad(route) {
|
|
982
|
+
let url = `/${route.path}`;
|
|
983
|
+
return this.checkLogin(url);
|
|
984
|
+
}
|
|
985
|
+
checkLogin(url) {
|
|
986
|
+
if (this.authService.isLoggedIn) {
|
|
987
|
+
if (url === "/accessDenied" || this.authService.isAdmin) return true;
|
|
988
|
+
return this.hasAuthUserAccessToThisRoute(url);
|
|
989
|
+
}
|
|
990
|
+
this.menuService.resetPermissionMap();
|
|
991
|
+
this.authService.loginRedirectUrl = url;
|
|
992
|
+
this.router.navigate(["/login"]);
|
|
993
|
+
return false;
|
|
994
|
+
}
|
|
995
|
+
hasAuthUserAccessToThisRoute(returnUrl) {
|
|
996
|
+
if (!this.menuService.hasAccessToThisRoute(Utilities.splitInTwo(returnUrl, "?").firstPart)) {
|
|
997
|
+
this.showAccessDenied(returnUrl);
|
|
998
|
+
return false;
|
|
999
|
+
}
|
|
1000
|
+
return true;
|
|
1001
|
+
}
|
|
1002
|
+
showAccessDenied(returnUrl) {
|
|
1003
|
+
this.router.navigate(["/accessDenied"]);
|
|
1004
|
+
}
|
|
1005
|
+
static {
|
|
1006
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1007
|
+
minVersion: "12.0.0",
|
|
1008
|
+
version: "22.2.1",
|
|
1009
|
+
ngImport: i0,
|
|
1010
|
+
type: AuthGuard,
|
|
1011
|
+
deps: [
|
|
1012
|
+
{ token: AuthService },
|
|
1013
|
+
{ token: MenuService },
|
|
1014
|
+
{ token: i4.Router }
|
|
1015
|
+
],
|
|
1016
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
static {
|
|
1020
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1021
|
+
minVersion: "12.0.0",
|
|
1022
|
+
version: "22.2.1",
|
|
1023
|
+
ngImport: i0,
|
|
1024
|
+
type: AuthGuard
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1029
|
+
minVersion: "12.0.0",
|
|
1030
|
+
version: "22.2.1",
|
|
1031
|
+
ngImport: i0,
|
|
1032
|
+
type: AuthGuard,
|
|
1033
|
+
decorators: [{ type: Injectable }],
|
|
1034
|
+
ctorParameters: () => [
|
|
1035
|
+
{ type: AuthService },
|
|
1036
|
+
{ type: MenuService },
|
|
1037
|
+
{ type: i4.Router }
|
|
1038
|
+
]
|
|
1039
|
+
});
|
|
1040
|
+
var BreadcrumbService = class BreadcrumbService {
|
|
1041
|
+
constructor(title) {
|
|
1042
|
+
this.title = title;
|
|
1043
|
+
this.initialData = {
|
|
1044
|
+
description: "",
|
|
1045
|
+
display: false,
|
|
1046
|
+
header: "",
|
|
1047
|
+
levels: [{
|
|
1048
|
+
icon: "clock-o",
|
|
1049
|
+
link: ["/"],
|
|
1050
|
+
title: "Default"
|
|
1051
|
+
}]
|
|
1052
|
+
};
|
|
1053
|
+
this.current = new ReplaySubject(1);
|
|
1054
|
+
this.clear();
|
|
1055
|
+
}
|
|
1056
|
+
setCurrent(data) {
|
|
1057
|
+
if (data.description !== void 0 && data.description !== "") this.title.setTitle("DFlat - " + data.levels[data.levels.length - 1].title);
|
|
1058
|
+
else this.title.setTitle("DFlat");
|
|
1059
|
+
this.current.next(data);
|
|
1060
|
+
}
|
|
1061
|
+
getCurrent() {
|
|
1062
|
+
return this.current;
|
|
1063
|
+
}
|
|
1064
|
+
clear() {
|
|
1065
|
+
this.setCurrent(this.initialData);
|
|
1066
|
+
}
|
|
1067
|
+
static {
|
|
1068
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1069
|
+
minVersion: "12.0.0",
|
|
1070
|
+
version: "22.2.1",
|
|
1071
|
+
ngImport: i0,
|
|
1072
|
+
type: BreadcrumbService,
|
|
1073
|
+
deps: [{ token: i1.Title }],
|
|
1074
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
static {
|
|
1078
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1079
|
+
minVersion: "12.0.0",
|
|
1080
|
+
version: "22.2.1",
|
|
1081
|
+
ngImport: i0,
|
|
1082
|
+
type: BreadcrumbService
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
1086
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1087
|
+
minVersion: "12.0.0",
|
|
1088
|
+
version: "22.2.1",
|
|
1089
|
+
ngImport: i0,
|
|
1090
|
+
type: BreadcrumbService,
|
|
1091
|
+
decorators: [{ type: Injectable }],
|
|
1092
|
+
ctorParameters: () => [{ type: i1.Title }]
|
|
1093
|
+
});
|
|
1094
|
+
var FilterService = class FilterService {
|
|
1095
|
+
get DisplayFilter() {
|
|
1096
|
+
return this.displayFilter;
|
|
1097
|
+
}
|
|
1098
|
+
get Keywords() {
|
|
1099
|
+
return this.keywords;
|
|
1100
|
+
}
|
|
1101
|
+
set Keywords(value) {
|
|
1102
|
+
this.keywords = value;
|
|
1103
|
+
}
|
|
1104
|
+
constructor() {
|
|
1105
|
+
this.displayFilterChangedSubject = new BehaviorSubject(false);
|
|
1106
|
+
this.filterChanged$ = this.displayFilterChangedSubject.asObservable();
|
|
1107
|
+
this.displayFilter = true;
|
|
1108
|
+
this.keywords = "";
|
|
1109
|
+
}
|
|
1110
|
+
setFilterDisplay(value) {
|
|
1111
|
+
if (this.displayFilter != value) {
|
|
1112
|
+
this.displayFilter = value;
|
|
1113
|
+
this.displayFilterChangedSubject.next(this.displayFilter);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
toggleFilterDisplay() {
|
|
1117
|
+
this.displayFilter = !this.displayFilter;
|
|
1118
|
+
this.displayFilterChangedSubject.next(this.displayFilter);
|
|
1119
|
+
}
|
|
1120
|
+
static {
|
|
1121
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1122
|
+
minVersion: "12.0.0",
|
|
1123
|
+
version: "22.2.1",
|
|
1124
|
+
ngImport: i0,
|
|
1125
|
+
type: FilterService,
|
|
1126
|
+
deps: [],
|
|
1127
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
static {
|
|
1131
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1132
|
+
minVersion: "12.0.0",
|
|
1133
|
+
version: "22.2.1",
|
|
1134
|
+
ngImport: i0,
|
|
1135
|
+
type: FilterService
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1140
|
+
minVersion: "12.0.0",
|
|
1141
|
+
version: "22.2.1",
|
|
1142
|
+
ngImport: i0,
|
|
1143
|
+
type: FilterService,
|
|
1144
|
+
decorators: [{ type: Injectable }],
|
|
1145
|
+
ctorParameters: () => []
|
|
1146
|
+
});
|
|
1147
|
+
var GeolocationService = class GeolocationService {
|
|
1148
|
+
constructor(localStore) {
|
|
1149
|
+
this.localStore = localStore;
|
|
1150
|
+
this.positionsHistory = new Array(0);
|
|
1151
|
+
this.positionChanged = new EventEmitter();
|
|
1152
|
+
try {
|
|
1153
|
+
let saveLocations = localStore.getDataObject(AppKeys.LAST_GEOLOCATIONS, false);
|
|
1154
|
+
if (!Utilities.IsNil(saveLocations)) this.positionsHistory = saveLocations;
|
|
1155
|
+
} catch {}
|
|
1156
|
+
}
|
|
1157
|
+
getCurrentPosition() {
|
|
1158
|
+
if (!Utilities.IsNil(this.positionsHistory) && this.positionsHistory.length > 0) return this.positionsHistory[0];
|
|
1159
|
+
}
|
|
1160
|
+
setCurrentPosition(formattedName, placeId, latitude, longitude) {
|
|
1161
|
+
let currentPosition = {
|
|
1162
|
+
placeId,
|
|
1163
|
+
formattedName,
|
|
1164
|
+
latitude,
|
|
1165
|
+
longitude
|
|
1166
|
+
};
|
|
1167
|
+
this.positionsHistory.unshift(currentPosition);
|
|
1168
|
+
if (this.positionsHistory.length > 5) this.positionsHistory.pop();
|
|
1169
|
+
this.localStore.savePermanentData(this.positionsHistory, AppKeys.LAST_GEOLOCATIONS);
|
|
1170
|
+
this.positionChanged.emit(currentPosition);
|
|
1171
|
+
}
|
|
1172
|
+
getDistanceToCurrent(latitude, longitude) {
|
|
1173
|
+
let position = this.getCurrentPosition();
|
|
1174
|
+
if (Utilities.IsNil(position)) return void 0;
|
|
1175
|
+
return this.getDistance(position.latitude, position.longitude, latitude, longitude);
|
|
1176
|
+
}
|
|
1177
|
+
getDistance(latitude1, longitude1, latitude2, longitude2) {
|
|
1178
|
+
let a = latitude1 * Math.PI / 180;
|
|
1179
|
+
let b = longitude1 * Math.PI / 180;
|
|
1180
|
+
let c = latitude2 * Math.PI / 180;
|
|
1181
|
+
let d = longitude2 * Math.PI / 180;
|
|
1182
|
+
let e = Math.sin(a) * Math.sin(c) + Math.cos(a) * Math.cos(c) * Math.cos(d - b);
|
|
1183
|
+
return 6378137 * Math.acos(e);
|
|
1184
|
+
}
|
|
1185
|
+
static {
|
|
1186
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1187
|
+
minVersion: "12.0.0",
|
|
1188
|
+
version: "22.2.1",
|
|
1189
|
+
ngImport: i0,
|
|
1190
|
+
type: GeolocationService,
|
|
1191
|
+
deps: [{ token: LocalStoreManager }],
|
|
1192
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
static {
|
|
1196
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1197
|
+
minVersion: "12.0.0",
|
|
1198
|
+
version: "22.2.1",
|
|
1199
|
+
ngImport: i0,
|
|
1200
|
+
type: GeolocationService
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1205
|
+
minVersion: "12.0.0",
|
|
1206
|
+
version: "22.2.1",
|
|
1207
|
+
ngImport: i0,
|
|
1208
|
+
type: GeolocationService,
|
|
1209
|
+
decorators: [{ type: Injectable }],
|
|
1210
|
+
ctorParameters: () => [{ type: LocalStoreManager }]
|
|
1211
|
+
});
|
|
1212
|
+
var NotificationsService = class NotificationsService {
|
|
1213
|
+
constructor() {
|
|
1214
|
+
this.notificationsList = [];
|
|
1215
|
+
this.newNotifications = new Subject();
|
|
1216
|
+
this.notifications = new ReplaySubject(1);
|
|
1217
|
+
this.updates = new Subject();
|
|
1218
|
+
this.create = new Subject();
|
|
1219
|
+
this.updates.subscribe((ope) => {
|
|
1220
|
+
this.notificationsList = ope(this.notificationsList);
|
|
1221
|
+
this.notifications.next(this.notificationsList);
|
|
1222
|
+
});
|
|
1223
|
+
this.newNotifications.pipe(map(function(notification) {
|
|
1224
|
+
return (notifications) => {
|
|
1225
|
+
return notifications.concat(notification);
|
|
1226
|
+
};
|
|
1227
|
+
})).subscribe(this.updates);
|
|
1228
|
+
}
|
|
1229
|
+
addNotification(notification) {
|
|
1230
|
+
this.newNotifications.next(notification);
|
|
1231
|
+
}
|
|
1232
|
+
static {
|
|
1233
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1234
|
+
minVersion: "12.0.0",
|
|
1235
|
+
version: "22.2.1",
|
|
1236
|
+
ngImport: i0,
|
|
1237
|
+
type: NotificationsService,
|
|
1238
|
+
deps: [],
|
|
1239
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
static {
|
|
1243
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1244
|
+
minVersion: "12.0.0",
|
|
1245
|
+
version: "22.2.1",
|
|
1246
|
+
ngImport: i0,
|
|
1247
|
+
type: NotificationsService
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1252
|
+
minVersion: "12.0.0",
|
|
1253
|
+
version: "22.2.1",
|
|
1254
|
+
ngImport: i0,
|
|
1255
|
+
type: NotificationsService,
|
|
1256
|
+
decorators: [{ type: Injectable }],
|
|
1257
|
+
ctorParameters: () => []
|
|
1258
|
+
});
|
|
1115
1259
|
var RequestState;
|
|
1116
|
-
(function
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1260
|
+
(function(RequestState) {
|
|
1261
|
+
RequestState[RequestState["Pending"] = 0] = "Pending";
|
|
1262
|
+
RequestState[RequestState["InProgress"] = 1] = "InProgress";
|
|
1263
|
+
RequestState[RequestState["Success"] = 2] = "Success";
|
|
1264
|
+
RequestState[RequestState["Error"] = 3] = "Error";
|
|
1265
|
+
RequestState[RequestState["Warning"] = 4] = "Warning";
|
|
1122
1266
|
})(RequestState || (RequestState = {}));
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1267
|
+
var HubService = class HubService {
|
|
1268
|
+
get hubOptions() {
|
|
1269
|
+
let _self = this;
|
|
1270
|
+
return {
|
|
1271
|
+
skipNegotiation: true,
|
|
1272
|
+
transport: signalR.HttpTransportType.WebSockets,
|
|
1273
|
+
accessTokenFactory: () => {
|
|
1274
|
+
return _self.localStorage.getDataObject(AppKeys.ACCESS_TOKEN);
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
constructor(localStorage, notificationService, busMsg, mqMsg, authService, env) {
|
|
1279
|
+
this.localStorage = localStorage;
|
|
1280
|
+
this.notificationService = notificationService;
|
|
1281
|
+
this.busMsg = busMsg;
|
|
1282
|
+
this.mqMsg = mqMsg;
|
|
1283
|
+
this.authService = authService;
|
|
1284
|
+
this.env = env;
|
|
1285
|
+
this.hubUrl = this.env.hubUrl;
|
|
1286
|
+
this.hubConnection = null;
|
|
1287
|
+
this.isConnected = false;
|
|
1288
|
+
this.isReconnect = false;
|
|
1289
|
+
this.busMsg.of(UserUpdatedMessage).subscribe((msg) => {
|
|
1290
|
+
if (msg.userKey === null) this.disposeConnection();
|
|
1291
|
+
else this.startHub();
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
init() {
|
|
1295
|
+
if (!this.isInit) {
|
|
1296
|
+
this.startHub();
|
|
1297
|
+
this.isInit = true;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
disposeConnection() {
|
|
1301
|
+
if (this.hubConnection) this.hubConnection.stop();
|
|
1302
|
+
}
|
|
1303
|
+
startHub() {
|
|
1304
|
+
if (this.isConnected || !this.authService.isLoggedIn || this.isConnecting) return;
|
|
1305
|
+
this.isConnecting = true;
|
|
1306
|
+
var options = this.hubOptions;
|
|
1307
|
+
this.hubConnection = new signalR.HubConnectionBuilder().withUrl(this.hubUrl, options).configureLogging(signalR.LogLevel.Trace).build();
|
|
1308
|
+
this.hubConnection.serverTimeoutInMilliseconds = 3e4;
|
|
1309
|
+
this.configure();
|
|
1310
|
+
this.hubConnection.start().then(() => {
|
|
1311
|
+
console.log("*****Connection started!");
|
|
1312
|
+
this.isConnected = true;
|
|
1313
|
+
this.isConnecting = false;
|
|
1314
|
+
clearInterval(this.timer$);
|
|
1315
|
+
}).catch((err) => {
|
|
1316
|
+
console.log("Error while establishing connection :(", err);
|
|
1317
|
+
this.isConnected = false;
|
|
1318
|
+
this.isConnecting = false;
|
|
1319
|
+
clearInterval(this.timer$);
|
|
1320
|
+
this.scheduleStartingHub();
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
configure() {
|
|
1324
|
+
this.hubConnection.on("OperationLog", (uid, message) => {
|
|
1325
|
+
this.publishEvents(new Notification({
|
|
1326
|
+
id: void 0,
|
|
1327
|
+
content: message,
|
|
1328
|
+
class: void 0,
|
|
1329
|
+
entityType: uid,
|
|
1330
|
+
entityId: void 0
|
|
1331
|
+
}));
|
|
1332
|
+
});
|
|
1333
|
+
this.hubConnection.on("BroadcastMessage", (name, message) => {});
|
|
1334
|
+
this.hubConnection.on("ReportProgress", (name, message, state, entityType, entityId) => {
|
|
1335
|
+
const notif = new Notification({
|
|
1336
|
+
id: name,
|
|
1337
|
+
content: message,
|
|
1338
|
+
class: "info",
|
|
1339
|
+
entityType,
|
|
1340
|
+
entityId
|
|
1341
|
+
});
|
|
1342
|
+
this.publishEvents(notif);
|
|
1343
|
+
});
|
|
1344
|
+
this.hubConnection.onclose((e) => {
|
|
1345
|
+
console.log(`Hub connection closed !`);
|
|
1346
|
+
this.isConnected = false;
|
|
1347
|
+
this.scheduleStartingHub();
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
scheduleStartingHub() {
|
|
1351
|
+
this.timer$ = setInterval(() => {
|
|
1352
|
+
console.log("retry start hub");
|
|
1353
|
+
this.startHub();
|
|
1354
|
+
}, 3e4);
|
|
1355
|
+
}
|
|
1356
|
+
publishEvents(notif) {
|
|
1357
|
+
this.mqMsg.publish(notif);
|
|
1358
|
+
}
|
|
1359
|
+
static {
|
|
1360
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1361
|
+
minVersion: "12.0.0",
|
|
1362
|
+
version: "22.2.1",
|
|
1363
|
+
ngImport: i0,
|
|
1364
|
+
type: HubService,
|
|
1365
|
+
deps: [
|
|
1366
|
+
{ token: LocalStoreManager },
|
|
1367
|
+
{ token: NotificationsService },
|
|
1368
|
+
{ token: BusMessageService },
|
|
1369
|
+
{ token: NotificationMqService },
|
|
1370
|
+
{ token: AuthService },
|
|
1371
|
+
{ token: i7.EnvironmentBase }
|
|
1372
|
+
],
|
|
1373
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
static {
|
|
1377
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1378
|
+
minVersion: "12.0.0",
|
|
1379
|
+
version: "22.2.1",
|
|
1380
|
+
ngImport: i0,
|
|
1381
|
+
type: HubService
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1386
|
+
minVersion: "12.0.0",
|
|
1387
|
+
version: "22.2.1",
|
|
1388
|
+
ngImport: i0,
|
|
1389
|
+
type: HubService,
|
|
1390
|
+
decorators: [{ type: Injectable }],
|
|
1391
|
+
ctorParameters: () => [
|
|
1392
|
+
{ type: LocalStoreManager },
|
|
1393
|
+
{ type: NotificationsService },
|
|
1394
|
+
{ type: BusMessageService },
|
|
1395
|
+
{ type: NotificationMqService },
|
|
1396
|
+
{ type: AuthService },
|
|
1397
|
+
{ type: i7.EnvironmentBase }
|
|
1398
|
+
]
|
|
1399
|
+
});
|
|
1400
|
+
var MessagesService = class MessagesService {
|
|
1401
|
+
constructor() {
|
|
1402
|
+
this.messagesList = [];
|
|
1403
|
+
this.newMessages = new Subject();
|
|
1404
|
+
this.messages = new ReplaySubject(1);
|
|
1405
|
+
this.updates = new Subject();
|
|
1406
|
+
this.create = new Subject();
|
|
1407
|
+
this.updates.subscribe((ope) => {
|
|
1408
|
+
this.messagesList = ope(this.messagesList);
|
|
1409
|
+
this.messages.next(this.messagesList);
|
|
1410
|
+
});
|
|
1411
|
+
this.newMessages.pipe(map(function(message) {
|
|
1412
|
+
return (messages) => {
|
|
1413
|
+
return messages.concat(message);
|
|
1414
|
+
};
|
|
1415
|
+
})).subscribe(this.updates);
|
|
1416
|
+
}
|
|
1417
|
+
addMessage(message) {
|
|
1418
|
+
this.newMessages.next(message);
|
|
1419
|
+
}
|
|
1420
|
+
static {
|
|
1421
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1422
|
+
minVersion: "12.0.0",
|
|
1423
|
+
version: "22.2.1",
|
|
1424
|
+
ngImport: i0,
|
|
1425
|
+
type: MessagesService,
|
|
1426
|
+
deps: [],
|
|
1427
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
static {
|
|
1431
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1432
|
+
minVersion: "12.0.0",
|
|
1433
|
+
version: "22.2.1",
|
|
1434
|
+
ngImport: i0,
|
|
1435
|
+
type: MessagesService
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
};
|
|
1439
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1440
|
+
minVersion: "12.0.0",
|
|
1441
|
+
version: "22.2.1",
|
|
1442
|
+
ngImport: i0,
|
|
1443
|
+
type: MessagesService,
|
|
1444
|
+
decorators: [{ type: Injectable }],
|
|
1445
|
+
ctorParameters: () => []
|
|
1446
|
+
});
|
|
1447
|
+
var ScreenService = class ScreenService {
|
|
1448
|
+
constructor() {
|
|
1449
|
+
this.screenChanged = new EventEmitter();
|
|
1450
|
+
this.scrollChanged = new EventEmitter();
|
|
1451
|
+
}
|
|
1452
|
+
getScreenConfiguration() {
|
|
1453
|
+
return this.config;
|
|
1454
|
+
}
|
|
1455
|
+
setScreenConfiguration(value) {
|
|
1456
|
+
if (Utilities.IsNil(value)) return;
|
|
1457
|
+
if (Utilities.IsNil(this.config) || this.config.isExtraSmallScreen != value.isExtraSmallScreen || this.config.isSmallScreen != value.isSmallScreen || this.config.isLargeScreen != value.isLargeScreen) {
|
|
1458
|
+
this.config = value;
|
|
1459
|
+
this.screenChanged.emit(this.config);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
scroll(elt) {
|
|
1463
|
+
this.scrollChanged.emit(elt);
|
|
1464
|
+
}
|
|
1465
|
+
static {
|
|
1466
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1467
|
+
minVersion: "12.0.0",
|
|
1468
|
+
version: "22.2.1",
|
|
1469
|
+
ngImport: i0,
|
|
1470
|
+
type: ScreenService,
|
|
1471
|
+
deps: [],
|
|
1472
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
static {
|
|
1476
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1477
|
+
minVersion: "12.0.0",
|
|
1478
|
+
version: "22.2.1",
|
|
1479
|
+
ngImport: i0,
|
|
1480
|
+
type: ScreenService
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
};
|
|
1484
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1485
|
+
minVersion: "12.0.0",
|
|
1486
|
+
version: "22.2.1",
|
|
1487
|
+
ngImport: i0,
|
|
1488
|
+
type: ScreenService,
|
|
1489
|
+
decorators: [{ type: Injectable }],
|
|
1490
|
+
ctorParameters: () => []
|
|
1491
|
+
});
|
|
1492
|
+
var UserService = class UserService {
|
|
1493
|
+
constructor(router, authService) {
|
|
1494
|
+
this.router = router;
|
|
1495
|
+
this.authService = authService;
|
|
1496
|
+
this.userChanged = new EventEmitter();
|
|
1497
|
+
this.current = new ReplaySubject(1);
|
|
1498
|
+
this.editUser = new ReplaySubject(1);
|
|
1499
|
+
}
|
|
1500
|
+
setCurrent(user) {
|
|
1501
|
+
this.current.next(user);
|
|
1502
|
+
this.userChanged.emit(user);
|
|
1503
|
+
}
|
|
1504
|
+
getCurrent() {
|
|
1505
|
+
return this.current;
|
|
1506
|
+
}
|
|
1507
|
+
openEditUser() {
|
|
1508
|
+
this.editUser.next(1);
|
|
1509
|
+
}
|
|
1510
|
+
getEditUser() {
|
|
1511
|
+
return this.editUser;
|
|
1512
|
+
}
|
|
1513
|
+
get AuthenticatedUser() {
|
|
1514
|
+
let user = this.authService.currentUser;
|
|
1515
|
+
let login = JSON.parse(user);
|
|
1516
|
+
if (Utilities.IsNil(login)) return void 0;
|
|
1517
|
+
return new User(login);
|
|
1518
|
+
}
|
|
1519
|
+
logout() {
|
|
1520
|
+
const user = new User({});
|
|
1521
|
+
user.IsConnected = false;
|
|
1522
|
+
this.setCurrent(user);
|
|
1523
|
+
this.authService.logout(this.authService.pseudo);
|
|
1524
|
+
}
|
|
1525
|
+
static {
|
|
1526
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1527
|
+
minVersion: "12.0.0",
|
|
1528
|
+
version: "22.2.1",
|
|
1529
|
+
ngImport: i0,
|
|
1530
|
+
type: UserService,
|
|
1531
|
+
deps: [{ token: i4.Router }, { token: AuthService }],
|
|
1532
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
static {
|
|
1536
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1537
|
+
minVersion: "12.0.0",
|
|
1538
|
+
version: "22.2.1",
|
|
1539
|
+
ngImport: i0,
|
|
1540
|
+
type: UserService
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1544
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1545
|
+
minVersion: "12.0.0",
|
|
1546
|
+
version: "22.2.1",
|
|
1547
|
+
ngImport: i0,
|
|
1548
|
+
type: UserService,
|
|
1549
|
+
decorators: [{ type: Injectable }],
|
|
1550
|
+
ctorParameters: () => [{ type: i4.Router }, { type: AuthService }]
|
|
1551
|
+
});
|
|
1552
|
+
var CoreServicesModule = class CoreServicesModule extends EnsureModuleLoadedOnceGuard {
|
|
1553
|
+
constructor(parentModule) {
|
|
1554
|
+
super(parentModule);
|
|
1555
|
+
}
|
|
1556
|
+
static {
|
|
1557
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1558
|
+
minVersion: "12.0.0",
|
|
1559
|
+
version: "22.2.1",
|
|
1560
|
+
ngImport: i0,
|
|
1561
|
+
type: CoreServicesModule,
|
|
1562
|
+
deps: [{
|
|
1563
|
+
token: CoreServicesModule,
|
|
1564
|
+
optional: true,
|
|
1565
|
+
skipSelf: true
|
|
1566
|
+
}],
|
|
1567
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
static {
|
|
1571
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1572
|
+
minVersion: "14.0.0",
|
|
1573
|
+
version: "22.2.1",
|
|
1574
|
+
ngImport: i0,
|
|
1575
|
+
type: CoreServicesModule,
|
|
1576
|
+
imports: [CommonModule, CoreModelModule]
|
|
1577
|
+
});
|
|
1578
|
+
}
|
|
1579
|
+
static {
|
|
1580
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
1581
|
+
minVersion: "12.0.0",
|
|
1582
|
+
version: "22.2.1",
|
|
1583
|
+
ngImport: i0,
|
|
1584
|
+
type: CoreServicesModule,
|
|
1585
|
+
providers: [
|
|
1586
|
+
LocalStoreManager,
|
|
1587
|
+
GeolocationService,
|
|
1588
|
+
MessagesService,
|
|
1589
|
+
NotificationsService,
|
|
1590
|
+
PermissionService,
|
|
1591
|
+
UserService,
|
|
1592
|
+
AuthGuard,
|
|
1593
|
+
AuthService,
|
|
1594
|
+
HeadersService,
|
|
1595
|
+
BusMessageService,
|
|
1596
|
+
BreadcrumbService,
|
|
1597
|
+
ScreenService,
|
|
1598
|
+
AppConfiguration,
|
|
1599
|
+
HubService,
|
|
1600
|
+
NotificationMqService,
|
|
1601
|
+
FilterService,
|
|
1602
|
+
provideHttpClient(withXhr(), withInterceptorsFromDi())
|
|
1603
|
+
],
|
|
1604
|
+
imports: [CommonModule, CoreModelModule]
|
|
1605
|
+
});
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1609
|
+
minVersion: "12.0.0",
|
|
1610
|
+
version: "22.2.1",
|
|
1611
|
+
ngImport: i0,
|
|
1612
|
+
type: CoreServicesModule,
|
|
1613
|
+
decorators: [{
|
|
1614
|
+
type: NgModule,
|
|
1615
|
+
args: [{
|
|
1616
|
+
exports: [],
|
|
1617
|
+
declarations: [],
|
|
1618
|
+
imports: [CommonModule, CoreModelModule],
|
|
1619
|
+
providers: [
|
|
1620
|
+
LocalStoreManager,
|
|
1621
|
+
GeolocationService,
|
|
1622
|
+
MessagesService,
|
|
1623
|
+
NotificationsService,
|
|
1624
|
+
PermissionService,
|
|
1625
|
+
UserService,
|
|
1626
|
+
AuthGuard,
|
|
1627
|
+
AuthService,
|
|
1628
|
+
HeadersService,
|
|
1629
|
+
BusMessageService,
|
|
1630
|
+
BreadcrumbService,
|
|
1631
|
+
ScreenService,
|
|
1632
|
+
AppConfiguration,
|
|
1633
|
+
HubService,
|
|
1634
|
+
NotificationMqService,
|
|
1635
|
+
FilterService,
|
|
1636
|
+
provideHttpClient(withXhr(), withInterceptorsFromDi())
|
|
1637
|
+
]
|
|
1638
|
+
}]
|
|
1639
|
+
}],
|
|
1640
|
+
ctorParameters: () => [{
|
|
1641
|
+
type: CoreServicesModule,
|
|
1642
|
+
decorators: [{ type: Optional }, { type: SkipSelf }]
|
|
1643
|
+
}]
|
|
1644
|
+
});
|
|
1645
|
+
var AuthInterceptor = class AuthInterceptor {
|
|
1646
|
+
constructor(router, injector) {
|
|
1647
|
+
this.router = router;
|
|
1648
|
+
this.injector = injector;
|
|
1649
|
+
}
|
|
1650
|
+
intercept(req, next) {
|
|
1651
|
+
const headersService = this.injector.get(HeadersService);
|
|
1652
|
+
const authService = this.injector.get(AuthService);
|
|
1653
|
+
switch (req.method) {
|
|
1654
|
+
case "GET":
|
|
1655
|
+
req = req.clone({
|
|
1656
|
+
headers: headersService.authFormHeaders(),
|
|
1657
|
+
withCredentials: true
|
|
1658
|
+
});
|
|
1659
|
+
break;
|
|
1660
|
+
case "POST":
|
|
1661
|
+
if (req.headers["lazyUpdate"] == null) req = req.clone({
|
|
1662
|
+
headers: headersService.authJsonHeaders(),
|
|
1663
|
+
withCredentials: true
|
|
1664
|
+
});
|
|
1665
|
+
break;
|
|
1666
|
+
default: req = req;
|
|
1667
|
+
}
|
|
1668
|
+
const r = req;
|
|
1669
|
+
return next.handle(req).pipe(catchError((err) => {
|
|
1670
|
+
console.log(err);
|
|
1671
|
+
if (err instanceof HttpErrorResponse) {
|
|
1672
|
+
if (r.url.includes("/hub/")) return empty();
|
|
1673
|
+
if (err.status === 401 || err.status === 403) {
|
|
1674
|
+
if (!r.url.endsWith("/api/Account/Connect")) {
|
|
1675
|
+
authService.ensureLogout();
|
|
1676
|
+
this.router.navigate(["/login"]);
|
|
1677
|
+
return empty();
|
|
1678
|
+
}
|
|
1679
|
+
} else if (err.status === 400) {
|
|
1680
|
+
let apiError = {};
|
|
1681
|
+
apiError.ApiErrorType = ApiErrorTypes.UserError;
|
|
1682
|
+
apiError.Message = err.error;
|
|
1683
|
+
this.onError(err, apiError);
|
|
1684
|
+
} else try {
|
|
1685
|
+
if (err.error instanceof Blob) err.error.text().then(((str) => {
|
|
1686
|
+
let apiError = JSON.parse(str);
|
|
1687
|
+
this.onError(err, apiError);
|
|
1688
|
+
}));
|
|
1689
|
+
else {
|
|
1690
|
+
let apiError = err.error;
|
|
1691
|
+
this.onError(err, apiError);
|
|
1692
|
+
}
|
|
1693
|
+
} catch (error) {
|
|
1694
|
+
let apiError = {};
|
|
1695
|
+
apiError.ApiErrorType = ApiErrorTypes.UserError;
|
|
1696
|
+
apiError.Message = "Une erreur a été détectée. Merci de contacter le service technique !";
|
|
1697
|
+
this.onError(err, apiError);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
return throwError(err);
|
|
1701
|
+
}));
|
|
1702
|
+
}
|
|
1703
|
+
onError(errResponse, error) {
|
|
1704
|
+
console.log(error.Message);
|
|
1705
|
+
}
|
|
1706
|
+
static {
|
|
1707
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1708
|
+
minVersion: "12.0.0",
|
|
1709
|
+
version: "22.2.1",
|
|
1710
|
+
ngImport: i0,
|
|
1711
|
+
type: AuthInterceptor,
|
|
1712
|
+
deps: [{ token: i4.Router }, { token: i0.Injector }],
|
|
1713
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1716
|
+
static {
|
|
1717
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1718
|
+
minVersion: "12.0.0",
|
|
1719
|
+
version: "22.2.1",
|
|
1720
|
+
ngImport: i0,
|
|
1721
|
+
type: AuthInterceptor
|
|
1722
|
+
});
|
|
1723
|
+
}
|
|
1724
|
+
};
|
|
1725
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1726
|
+
minVersion: "12.0.0",
|
|
1727
|
+
version: "22.2.1",
|
|
1728
|
+
ngImport: i0,
|
|
1729
|
+
type: AuthInterceptor,
|
|
1730
|
+
decorators: [{ type: Injectable }],
|
|
1731
|
+
ctorParameters: () => [{ type: i4.Router }, { type: i0.Injector }]
|
|
1732
|
+
});
|
|
1733
|
+
var CanActivateGuard = class CanActivateGuard {
|
|
1734
|
+
constructor(router, userService) {
|
|
1735
|
+
this.router = router;
|
|
1736
|
+
this.userService = userService;
|
|
1737
|
+
this.connected = false;
|
|
1738
|
+
this.userService.getCurrent().subscribe((user) => {
|
|
1739
|
+
this.connected = user.IsConnected;
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
canActivate() {
|
|
1743
|
+
if (!this.connected) this.router.navigate(["login"]);
|
|
1744
|
+
return this.connected;
|
|
1745
|
+
}
|
|
1746
|
+
static {
|
|
1747
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1748
|
+
minVersion: "12.0.0",
|
|
1749
|
+
version: "22.2.1",
|
|
1750
|
+
ngImport: i0,
|
|
1751
|
+
type: CanActivateGuard,
|
|
1752
|
+
deps: [{ token: i4.Router }, { token: UserService }],
|
|
1753
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
static {
|
|
1757
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1758
|
+
minVersion: "12.0.0",
|
|
1759
|
+
version: "22.2.1",
|
|
1760
|
+
ngImport: i0,
|
|
1761
|
+
type: CanActivateGuard
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1766
|
+
minVersion: "12.0.0",
|
|
1767
|
+
version: "22.2.1",
|
|
1768
|
+
ngImport: i0,
|
|
1769
|
+
type: CanActivateGuard,
|
|
1770
|
+
decorators: [{ type: Injectable }],
|
|
1771
|
+
ctorParameters: () => [{ type: i4.Router }, { type: UserService }]
|
|
1772
|
+
});
|
|
1541
1773
|
function trimChar(str, c) {
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
? "\\]"
|
|
1545
|
-
: c === "\\"
|
|
1546
|
-
? "\\\\"
|
|
1547
|
-
: c;
|
|
1548
|
-
return str.replace(new RegExp(`^[${c}]+|[${c}]+$`, "g"), "");
|
|
1774
|
+
c = c === "]" ? "\\]" : c === "\\" ? "\\\\" : c;
|
|
1775
|
+
return str.replace(new RegExp(`^[${c}]+|[${c}]+$`, "g"), "");
|
|
1549
1776
|
}
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
* Generated bundle index. Do not edit.
|
|
1619
|
-
*/
|
|
1620
|
-
|
|
1777
|
+
const MODULE_MENU_SERVICES = new InjectionToken("MODULE_MENU_SERVICES");
|
|
1778
|
+
var MenuItem = class {
|
|
1779
|
+
constructor(title, link, icon, sublinks, permissionKey) {
|
|
1780
|
+
this.external = false;
|
|
1781
|
+
this.target = "";
|
|
1782
|
+
this.title = title;
|
|
1783
|
+
this.link = link;
|
|
1784
|
+
this.icon = icon;
|
|
1785
|
+
this.sublinks = sublinks;
|
|
1786
|
+
this.permissionKey = permissionKey;
|
|
1787
|
+
}
|
|
1788
|
+
};
|
|
1789
|
+
var ApplicationMenuService = class ApplicationMenuService extends MenuService {
|
|
1790
|
+
constructor(permissionService, moduleMenus) {
|
|
1791
|
+
super(permissionService);
|
|
1792
|
+
this.moduleMenus = moduleMenus;
|
|
1793
|
+
}
|
|
1794
|
+
getAllMenuItems(isAdmin) {
|
|
1795
|
+
const themes = (this.moduleMenus ?? []).reduce((all, menu) => all.concat(menu.getAllMenuItems(isAdmin)), new Array()).map((theme) => new MenuItem(theme.title, theme.link, theme.icon, [...theme.sublinks ?? []], theme.permissionKey));
|
|
1796
|
+
return this.merge(themes).map((theme) => new MenuItem(theme.title, theme.link, theme.icon, this.distinctItems(theme.sublinks), theme.permissionKey));
|
|
1797
|
+
}
|
|
1798
|
+
getAccessGrantedMenuItems() {
|
|
1799
|
+
return (this.moduleMenus ?? []).reduce((all, menu) => all.concat(menu.getAccessGrantedMenuItems() ?? []), new Array());
|
|
1800
|
+
}
|
|
1801
|
+
distinctItems(items) {
|
|
1802
|
+
const links = /* @__PURE__ */ new Set();
|
|
1803
|
+
return (items ?? []).filter((item) => {
|
|
1804
|
+
if (item.link !== void 0 && links.has(item.link)) return false;
|
|
1805
|
+
links.add(item.link);
|
|
1806
|
+
return true;
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
static {
|
|
1810
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1811
|
+
minVersion: "12.0.0",
|
|
1812
|
+
version: "22.2.1",
|
|
1813
|
+
ngImport: i0,
|
|
1814
|
+
type: ApplicationMenuService,
|
|
1815
|
+
deps: [{ token: PermissionService }, {
|
|
1816
|
+
token: MODULE_MENU_SERVICES,
|
|
1817
|
+
optional: true
|
|
1818
|
+
}],
|
|
1819
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
static {
|
|
1823
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1824
|
+
minVersion: "12.0.0",
|
|
1825
|
+
version: "22.2.1",
|
|
1826
|
+
ngImport: i0,
|
|
1827
|
+
type: ApplicationMenuService
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1832
|
+
minVersion: "12.0.0",
|
|
1833
|
+
version: "22.2.1",
|
|
1834
|
+
ngImport: i0,
|
|
1835
|
+
type: ApplicationMenuService,
|
|
1836
|
+
decorators: [{ type: Injectable }],
|
|
1837
|
+
ctorParameters: () => [{ type: PermissionService }, {
|
|
1838
|
+
type: void 0,
|
|
1839
|
+
decorators: [{ type: Optional }, {
|
|
1840
|
+
type: Inject,
|
|
1841
|
+
args: [MODULE_MENU_SERVICES]
|
|
1842
|
+
}]
|
|
1843
|
+
}]
|
|
1844
|
+
});
|
|
1621
1845
|
export { AppConfiguration, AppKeys, ApplicationMenuService, AuthGuard, AuthInterceptor, AuthService, AuthTokenType, BreadcrumbService, BusMessageService, CanActivateGuard, CoreServicesModule, FilterService, GeolocationService, HeadersService, HubService, LocalStoreManager, MODULE_MENU_SERVICES, MenuItem, MenuService, MessagesService, NotificationMqService, NotificationsService, PermissionService, ScreenService, ServerUrl, UserService, trimChar };
|
|
1622
|
-
|
|
1846
|
+
|
|
1847
|
+
//# sourceMappingURL=dflat-core-web-core-services.mjs.map
|