new-front-common-library 16.1.32-ROY-3 → 16.1.32-ROY-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/util/array.service.mjs +19 -0
- package/esm2022/lib/util/component/header/header.component.mjs +224 -0
- package/esm2022/lib/util/component/header/menu/menu.component.mjs +96 -0
- package/esm2022/lib/util/component/header/menu/menu.const.mjs +544 -0
- package/esm2022/lib/util/component/header/menu/menu.model.mjs +2 -0
- package/esm2022/lib/util/component/overlay/overlay.component.mjs +40 -0
- package/esm2022/lib/util/component/overlay/overlay.service.mjs +24 -0
- package/esm2022/lib/util/component/popup/popup-login/popup-login.component.mjs +90 -0
- package/esm2022/lib/util/component/sub-header/sub-header.component.mjs +44 -0
- package/esm2022/lib/util/config.mjs +8 -0
- package/esm2022/lib/util/date/PeriodModel.mjs +8 -0
- package/esm2022/lib/util/date/date-format-constants.mjs +12 -0
- package/esm2022/lib/util/date/date.util.mjs +218 -0
- package/esm2022/lib/util/decorators/theme.decorator.mjs +22 -0
- package/esm2022/lib/util/decorators/user.decorator.mjs +25 -0
- package/esm2022/lib/util/directives/my-number-formatter-directive.mjs +34 -0
- package/esm2022/lib/util/directives/show-if-truncated.directive.mjs +25 -0
- package/esm2022/lib/util/enums/family.enum.mjs +6 -0
- package/esm2022/lib/util/enums/rapid-search-item-type.enum.mjs +13 -0
- package/esm2022/lib/util/enums/status-color.enum.mjs +11 -0
- package/esm2022/lib/util/event/header/header-events.service.mjs +21 -0
- package/esm2022/lib/util/event/storage/local-storage-events.service.mjs +17 -0
- package/esm2022/lib/util/event/storage/session-storage-events.service.mjs +18 -0
- package/esm2022/lib/util/http/http-params.builder.mjs +27 -0
- package/esm2022/lib/util/i18n/de.mjs +158 -0
- package/esm2022/lib/util/i18n/en.mjs +158 -0
- package/esm2022/lib/util/i18n/fr.mjs +159 -0
- package/esm2022/lib/util/i18n/multi-translate-http-loader.mjs +21 -0
- package/esm2022/lib/util/interfaces/permissions.interface.mjs +2 -0
- package/esm2022/lib/util/models/any-line.model.mjs +37 -0
- package/esm2022/lib/util/models/audio-content.model.mjs +27 -0
- package/esm2022/lib/util/models/authPermission.model.mjs +16 -0
- package/esm2022/lib/util/models/authUser.model.mjs +21 -0
- package/esm2022/lib/util/models/basic.model.mjs +14 -0
- package/esm2022/lib/util/models/box-set-item.model.mjs +19 -0
- package/esm2022/lib/util/models/commercial/deal-rapid-search-model.mjs +3 -0
- package/esm2022/lib/util/models/commercial/invoice-rapid-search-model.mjs +9 -0
- package/esm2022/lib/util/models/commercial/work-record-rapid-search-model.mjs +13 -0
- package/esm2022/lib/util/models/disc-program.model.mjs +26 -0
- package/esm2022/lib/util/models/disc.model.mjs +22 -0
- package/esm2022/lib/util/models/eventType.model.mjs +7 -0
- package/esm2022/lib/util/models/expenditure-commitment/purchase-order-file.model.mjs +22 -0
- package/esm2022/lib/util/models/expenditure-commitment/purchase-order-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/family.model.mjs +7 -0
- package/esm2022/lib/util/models/index.mjs +101 -0
- package/esm2022/lib/util/models/lang-line.model.mjs +27 -0
- package/esm2022/lib/util/models/legal/contract-rapid-search-model.mjs +3 -0
- package/esm2022/lib/util/models/legal/contract-work.model.mjs +23 -0
- package/esm2022/lib/util/models/legal/contract-work2.model.mjs +21 -0
- package/esm2022/lib/util/models/legal/type-status-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/media-line.model.mjs +18 -0
- package/esm2022/lib/util/models/menu-language.model.mjs +15 -0
- package/esm2022/lib/util/models/permission.model.mjs +20 -0
- package/esm2022/lib/util/models/product-box-set.model.mjs +16 -0
- package/esm2022/lib/util/models/product-disc-detail.model.mjs +22 -0
- package/esm2022/lib/util/models/product-disc.model.mjs +27 -0
- package/esm2022/lib/util/models/product-division.model.mjs +29 -0
- package/esm2022/lib/util/models/product-type.model.mjs +22 -0
- package/esm2022/lib/util/models/product.model.mjs +62 -0
- package/esm2022/lib/util/models/program.model.mjs +28 -0
- package/esm2022/lib/util/models/purchase-order/purchase-order.model.mjs +53 -0
- package/esm2022/lib/util/models/referential/WorkVersionArticleDto.mjs +17 -0
- package/esm2022/lib/util/models/referential/adress-type.model.mjs +14 -0
- package/esm2022/lib/util/models/referential/adress.model.mjs +28 -0
- package/esm2022/lib/util/models/referential/attached-file.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/bank-account.model.mjs +24 -0
- package/esm2022/lib/util/models/referential/bank-accounts.model.mjs +31 -0
- package/esm2022/lib/util/models/referential/basic-hierarchy.model.mjs +8 -0
- package/esm2022/lib/util/models/referential/broadcast-list-item.model.mjs +13 -0
- package/esm2022/lib/util/models/referential/color.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/company.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/content-type.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/content.model.mjs +22 -0
- package/esm2022/lib/util/models/referential/cost-center-criteria-values.model.mjs +14 -0
- package/esm2022/lib/util/models/referential/cost-center-criteria.model.mjs +13 -0
- package/esm2022/lib/util/models/referential/cost-center.model.mjs +28 -0
- package/esm2022/lib/util/models/referential/coutry.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/currency.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/editorial-content.model.mjs +18 -0
- package/esm2022/lib/util/models/referential/fixing.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/flat-media.model.mjs +18 -0
- package/esm2022/lib/util/models/referential/format-image.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/format-type.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/format.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/fsk-index.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/fsk.model.mjs +22 -0
- package/esm2022/lib/util/models/referential/function.model.mjs +23 -0
- package/esm2022/lib/util/models/referential/genre.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/invoice-product-type.model.mjs +22 -0
- package/esm2022/lib/util/models/referential/keywords.model.mjs +13 -0
- package/esm2022/lib/util/models/referential/language.model.mjs +18 -0
- package/esm2022/lib/util/models/referential/media-filter.model.mjs +3 -0
- package/esm2022/lib/util/models/referential/media.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/module.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/parameter.model.mjs +2 -0
- package/esm2022/lib/util/models/referential/participant.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/person.model.mjs +23 -0
- package/esm2022/lib/util/models/referential/project-status.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/quota.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/referential-entity-state.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/referential-value.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/referentiel.model.mjs +26 -0
- package/esm2022/lib/util/models/referential/restriction.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/sap-order.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/service-error.model.mjs +15 -0
- package/esm2022/lib/util/models/referential/sound.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/territories-languages.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/territory-filter.model.mjs +3 -0
- package/esm2022/lib/util/models/referential/territory.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/theme.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/third-party-address-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/referential/third-party-creation-request.model.mjs +44 -0
- package/esm2022/lib/util/models/referential/third-party-module.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/third-party-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/referential/third-party.model.mjs +83 -0
- package/esm2022/lib/util/models/referential/translated-value-model.mjs +16 -0
- package/esm2022/lib/util/models/referential/tva.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/type-export.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/type-tva-company-territory.model.mjs +32 -0
- package/esm2022/lib/util/models/referential/type-tva.model.mjs +25 -0
- package/esm2022/lib/util/models/referential/user-form.model.mjs +2 -0
- package/esm2022/lib/util/models/referential/work-addons-model.mjs +16 -0
- package/esm2022/lib/util/models/referential/work-appartenance.model.mjs +17 -0
- package/esm2022/lib/util/models/referential/work-genre.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/work-language.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/work-milo.model.mjs +61 -0
- package/esm2022/lib/util/models/referential/work-participant.model.mjs +21 -0
- package/esm2022/lib/util/models/referential/work-restrictions-model.mjs +13 -0
- package/esm2022/lib/util/models/referential/work-theme.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/work-title.model.mjs +20 -0
- package/esm2022/lib/util/models/referential/work-version-origin.model.mjs +16 -0
- package/esm2022/lib/util/models/referential/work-version-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/referential/work-versions-used.model.mjs +19 -0
- package/esm2022/lib/util/models/referential/work-versions.model.mjs +27 -0
- package/esm2022/lib/util/models/referential/work-year-production.model.mjs +13 -0
- package/esm2022/lib/util/models/referential/work.model.mjs +22 -0
- package/esm2022/lib/util/models/referential/zone.model.mjs +14 -0
- package/esm2022/lib/util/models/referentiel.model.mjs +26 -0
- package/esm2022/lib/util/models/search-response.model.mjs +10 -0
- package/esm2022/lib/util/models/section.model.mjs +8 -0
- package/esm2022/lib/util/models/select/options.model.mjs +8 -0
- package/esm2022/lib/util/models/select/select.model.mjs +7 -0
- package/esm2022/lib/util/models/subsidiary.model.mjs +8 -0
- package/esm2022/lib/util/models/subtitle-content.model.mjs +28 -0
- package/esm2022/lib/util/models/user-video.model.mjs +22 -0
- package/esm2022/lib/util/models/user.model.mjs +35 -0
- package/esm2022/lib/util/models/video/product-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/video/support-rapid-search.model.mjs +3 -0
- package/esm2022/lib/util/models/video-content.model.mjs +18 -0
- package/esm2022/lib/util/number.validator.mjs +129 -0
- package/esm2022/lib/util/paginator/custom-paginator-configuration.mjs +59 -0
- package/esm2022/lib/util/permissions/permissions.service.mjs +49 -0
- package/esm2022/lib/util/pipes/capitalizefirst.pipe.mjs +41 -0
- package/esm2022/lib/util/pipes/comma-separated-number.pipe.mjs +15 -0
- package/esm2022/lib/util/pipes/common-translate.pipe.mjs +38 -0
- package/esm2022/lib/util/pipes/display-html.pipe.mjs +20 -0
- package/esm2022/lib/util/pipes/display-null.pipe.mjs +24 -0
- package/esm2022/lib/util/pipes/format-currency.pipe.mjs +31 -0
- package/esm2022/lib/util/pipes/format-duration.pipe.mjs +23 -0
- package/esm2022/lib/util/pipes/format-number-input.pipe.mjs +22 -0
- package/esm2022/lib/util/pipes/local-date.pipe.mjs +27 -0
- package/esm2022/lib/util/pipes/my-number.pipe.mjs +44 -0
- package/esm2022/lib/util/pipes/third-party-address-search.pipe.mjs +15 -0
- package/esm2022/lib/util/pipes/third-party-address.pipe.mjs +16 -0
- package/esm2022/lib/util/pipes/trim-string.pipe.mjs +25 -0
- package/esm2022/lib/util/regex/regex.service.mjs +94 -0
- package/esm2022/lib/util/services/api/commercial-api.service.mjs +28 -0
- package/esm2022/lib/util/services/api/common-api.service.mjs +98 -0
- package/esm2022/lib/util/services/api/legal-api.service.mjs +32 -0
- package/esm2022/lib/util/services/api/video-api.service.mjs +45 -0
- package/esm2022/lib/util/services/auth/auth.service.mjs +18 -0
- package/esm2022/lib/util/services/elasticsearch/elasticsearch.service.mjs +166 -0
- package/esm2022/lib/util/services/elasticsearch/subsidiaries.service.mjs +48 -0
- package/esm2022/lib/util/services/form-action/form-actions-events.service.mjs +25 -0
- package/esm2022/lib/util/services/guard/auth.guard.mjs +32 -0
- package/esm2022/lib/util/services/guard/login.guard.mjs +23 -0
- package/esm2022/lib/util/services/history/history.service.mjs +39 -0
- package/esm2022/lib/util/services/interceptor/auth.interceptor.mjs +53 -0
- package/esm2022/lib/util/services/jwt-security/aes.service.mjs +34 -0
- package/esm2022/lib/util/services/jwt-security/interceptorhttp.service.mjs +18 -0
- package/esm2022/lib/util/services/jwt-security/jwt.helpher.mjs +34 -0
- package/esm2022/lib/util/services/storage/local-storage.service.mjs +36 -0
- package/esm2022/lib/util/services/storage/session-storage.service.mjs +38 -0
- package/esm2022/lib/util/services/translate-language/lang.service.mjs +31 -0
- package/esm2022/lib/util/services/user/user-subsidiary.service.mjs +22 -0
- package/esm2022/lib/util/sort.mjs +22 -0
- package/esm2022/lib/util/theme/theme-event.service.mjs +17 -0
- package/esm2022/lib/util/toaster/toaster-events.service.mjs +32 -0
- package/esm2022/lib/util/util.module.mjs +281 -0
- package/esm2022/new-front-common-library.mjs +5 -0
- package/esm2022/public-api.mjs +59 -0
- package/fesm2022/new-front-common-library.mjs +5700 -0
- package/fesm2022/new-front-common-library.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/util/array.service.d.ts +7 -0
- package/lib/util/component/header/header.component.d.ts +74 -0
- package/lib/util/component/header/menu/menu.component.d.ts +27 -0
- package/lib/util/component/header/menu/menu.const.d.ts +2 -0
- package/lib/util/component/header/menu/menu.model.d.ts +23 -0
- package/lib/util/component/overlay/overlay.component.d.ts +17 -0
- package/lib/util/component/overlay/overlay.service.d.ts +13 -0
- package/lib/util/component/popup/popup-login/popup-login.component.d.ts +35 -0
- package/lib/util/component/sub-header/sub-header.component.d.ts +13 -0
- package/lib/util/config.d.ts +8 -0
- package/lib/util/date/PeriodModel.d.ts +6 -0
- package/lib/util/date/date-format-constants.d.ts +25 -0
- package/lib/util/date/date.util.d.ts +16 -0
- package/lib/util/decorators/theme.decorator.d.ts +1 -0
- package/lib/util/decorators/user.decorator.d.ts +1 -0
- package/lib/util/directives/my-number-formatter-directive.d.ts +15 -0
- package/lib/util/directives/show-if-truncated.directive.d.ts +11 -0
- package/lib/util/enums/family.enum.d.ts +4 -0
- package/lib/util/enums/rapid-search-item-type.enum.d.ts +11 -0
- package/lib/util/enums/status-color.enum.d.ts +9 -0
- package/lib/util/event/header/header-events.service.d.ts +11 -0
- package/lib/util/event/storage/local-storage-events.service.d.ts +9 -0
- package/lib/util/event/storage/session-storage-events.service.d.ts +10 -0
- package/lib/util/http/http-params.builder.d.ts +9 -0
- package/lib/util/i18n/de.d.ts +141 -0
- package/lib/util/i18n/en.d.ts +141 -0
- package/lib/util/i18n/fr.d.ts +142 -0
- package/lib/util/i18n/multi-translate-http-loader.d.ts +14 -0
- package/lib/util/models/any-line.model.d.ts +24 -0
- package/lib/util/models/audio-content.model.d.ts +27 -0
- package/lib/util/models/authPermission.model.d.ts +7 -0
- package/lib/util/models/authUser.model.d.ts +16 -0
- package/lib/util/models/basic.model.d.ts +11 -0
- package/lib/util/models/box-set-item.model.d.ts +12 -0
- package/lib/util/models/commercial/deal-rapid-search-model.d.ts +10 -0
- package/lib/util/models/commercial/invoice-rapid-search-model.d.ts +18 -0
- package/lib/util/models/commercial/work-record-rapid-search-model.d.ts +21 -0
- package/lib/util/models/disc-program.model.d.ts +9 -0
- package/lib/util/models/disc.model.d.ts +15 -0
- package/lib/util/models/eventType.model.d.ts +5 -0
- package/lib/util/models/expenditure-commitment/purchase-order-file.model.d.ts +8 -0
- package/lib/util/models/expenditure-commitment/purchase-order-rapid-search.model.d.ts +10 -0
- package/lib/util/models/family.model.d.ts +5 -0
- package/{src/lib/util/models/index.ts → lib/util/models/index.d.ts} +0 -1
- package/lib/util/models/lang-line.model.d.ts +18 -0
- package/lib/util/models/legal/contract-rapid-search-model.d.ts +10 -0
- package/lib/util/models/legal/contract-work.model.d.ts +27 -0
- package/lib/util/models/legal/contract-work2.model.d.ts +23 -0
- package/lib/util/models/legal/type-status-rapid-search.model.d.ts +5 -0
- package/lib/util/models/media-line.model.d.ts +9 -0
- package/lib/util/models/menu-language.model.d.ts +6 -0
- package/lib/util/models/permission.model.d.ts +12 -0
- package/lib/util/models/product-box-set.model.d.ts +8 -0
- package/lib/util/models/product-disc-detail.model.d.ts +14 -0
- package/lib/util/models/product-disc.model.d.ts +11 -0
- package/lib/util/models/product-division.model.d.ts +15 -0
- package/lib/util/models/product-type.model.d.ts +7 -0
- package/lib/util/models/product.model.d.ts +52 -0
- package/lib/util/models/program.model.d.ts +21 -0
- package/lib/util/models/purchase-order/purchase-order.model.d.ts +40 -0
- package/lib/util/models/referential/WorkVersionArticleDto.d.ts +10 -0
- package/lib/util/models/referential/adress-type.model.d.ts +5 -0
- package/lib/util/models/referential/adress.model.d.ts +20 -0
- package/lib/util/models/referential/attached-file.model.d.ts +11 -0
- package/lib/util/models/referential/bank-account.model.d.ts +15 -0
- package/lib/util/models/referential/bank-accounts.model.d.ts +17 -0
- package/lib/util/models/referential/basic-hierarchy.model.d.ts +6 -0
- package/lib/util/models/referential/broadcast-list-item.model.d.ts +8 -0
- package/lib/util/models/referential/color.model.d.ts +6 -0
- package/lib/util/models/referential/company.model.d.ts +7 -0
- package/lib/util/models/referential/content-type.model.d.ts +12 -0
- package/lib/util/models/referential/content.model.d.ts +7 -0
- package/lib/util/models/referential/cost-center-criteria-values.model.d.ts +7 -0
- package/lib/util/models/referential/cost-center-criteria.model.d.ts +12 -0
- package/lib/util/models/referential/cost-center.model.d.ts +18 -0
- package/lib/util/models/referential/coutry.model.d.ts +7 -0
- package/lib/util/models/referential/currency.model.d.ts +11 -0
- package/lib/util/models/referential/editorial-content.model.d.ts +25 -0
- package/lib/util/models/referential/fixing.model.d.ts +10 -0
- package/lib/util/models/referential/flat-media.model.d.ts +9 -0
- package/lib/util/models/referential/format-image.model.d.ts +7 -0
- package/lib/util/models/referential/format-type.model.d.ts +6 -0
- package/lib/util/models/referential/format.model.d.ts +7 -0
- package/lib/util/models/referential/fsk-index.model.d.ts +22 -0
- package/lib/util/models/referential/fsk.model.d.ts +37 -0
- package/lib/util/models/referential/function.model.d.ts +8 -0
- package/lib/util/models/referential/genre.model.d.ts +7 -0
- package/lib/util/models/referential/invoice-product-type.model.d.ts +7 -0
- package/lib/util/models/referential/keywords.model.d.ts +6 -0
- package/lib/util/models/referential/language.model.d.ts +11 -0
- package/lib/util/models/referential/media-filter.model.d.ts +10 -0
- package/lib/util/models/referential/media.model.d.ts +11 -0
- package/lib/util/models/referential/module.model.d.ts +11 -0
- package/{src/lib/util/models/referential/parameter.model.ts → lib/util/models/referential/parameter.model.d.ts} +0 -2
- package/lib/util/models/referential/participant.model.d.ts +11 -0
- package/lib/util/models/referential/person.model.d.ts +13 -0
- package/lib/util/models/referential/project-status.model.d.ts +6 -0
- package/lib/util/models/referential/quota.model.d.ts +7 -0
- package/lib/util/models/referential/referential-entity-state.model.d.ts +11 -0
- package/lib/util/models/referential/referential-value.model.d.ts +11 -0
- package/lib/util/models/referential/referentiel.model.d.ts +12 -0
- package/lib/util/models/referential/restriction.model.d.ts +9 -0
- package/lib/util/models/referential/sap-order.model.d.ts +27 -0
- package/lib/util/models/referential/service-error.model.d.ts +13 -0
- package/lib/util/models/referential/sound.model.d.ts +6 -0
- package/lib/util/models/referential/territories-languages.model.d.ts +8 -0
- package/lib/util/models/referential/territory-filter.model.d.ts +6 -0
- package/lib/util/models/referential/territory.model.d.ts +12 -0
- package/lib/util/models/referential/theme.model.d.ts +7 -0
- package/lib/util/models/referential/third-party-address-rapid-search.model.d.ts +8 -0
- package/lib/util/models/referential/third-party-creation-request.model.d.ts +48 -0
- package/lib/util/models/referential/third-party-module.model.d.ts +11 -0
- package/lib/util/models/referential/third-party-rapid-search.model.d.ts +8 -0
- package/lib/util/models/referential/third-party.model.d.ts +45 -0
- package/lib/util/models/referential/translated-value-model.d.ts +10 -0
- package/lib/util/models/referential/tva.model.d.ts +7 -0
- package/lib/util/models/referential/type-export.model.d.ts +7 -0
- package/lib/util/models/referential/type-tva-company-territory.model.d.ts +18 -0
- package/lib/util/models/referential/type-tva.model.d.ts +10 -0
- package/{src/lib/util/models/referential/user-form.model.ts → lib/util/models/referential/user-form.model.d.ts} +0 -2
- package/lib/util/models/referential/work-addons-model.d.ts +25 -0
- package/lib/util/models/referential/work-appartenance.model.d.ts +7 -0
- package/lib/util/models/referential/work-genre.model.d.ts +11 -0
- package/lib/util/models/referential/work-language.model.d.ts +11 -0
- package/lib/util/models/referential/work-milo.model.d.ts +46 -0
- package/lib/util/models/referential/work-participant.model.d.ts +10 -0
- package/lib/util/models/referential/work-restrictions-model.d.ts +18 -0
- package/lib/util/models/referential/work-theme.model.d.ts +11 -0
- package/lib/util/models/referential/work-title.model.d.ts +10 -0
- package/lib/util/models/referential/work-version-origin.model.d.ts +10 -0
- package/lib/util/models/referential/work-version-rapid-search.model.d.ts +9 -0
- package/lib/util/models/referential/work-versions-used.model.d.ts +12 -0
- package/lib/util/models/referential/work-versions.model.d.ts +29 -0
- package/lib/util/models/referential/work-year-production.model.d.ts +6 -0
- package/lib/util/models/referential/work.model.d.ts +74 -0
- package/lib/util/models/referential/zone.model.d.ts +6 -0
- package/lib/util/models/referentiel.model.d.ts +12 -0
- package/lib/util/models/search-response.model.d.ts +7 -0
- package/lib/util/models/section.model.d.ts +7 -0
- package/lib/util/models/select/options.model.d.ts +6 -0
- package/lib/util/models/select/select.model.d.ts +5 -0
- package/lib/util/models/subsidiary.model.d.ts +7 -0
- package/lib/util/models/subtitle-content.model.d.ts +26 -0
- package/lib/util/models/user-video.model.d.ts +10 -0
- package/lib/util/models/user.model.d.ts +27 -0
- package/lib/util/models/video/product-rapid-search.model.d.ts +8 -0
- package/lib/util/models/video/support-rapid-search.model.d.ts +6 -0
- package/lib/util/models/video-content.model.d.ts +24 -0
- package/lib/util/number.validator.d.ts +14 -0
- package/lib/util/paginator/custom-paginator-configuration.d.ts +16 -0
- package/lib/util/permissions/permissions.service.d.ts +15 -0
- package/lib/util/pipes/capitalizefirst.pipe.d.ts +8 -0
- package/lib/util/pipes/comma-separated-number.pipe.d.ts +7 -0
- package/lib/util/pipes/common-translate.pipe.d.ts +12 -0
- package/lib/util/pipes/display-html.pipe.d.ts +10 -0
- package/lib/util/pipes/display-null.pipe.d.ts +8 -0
- package/lib/util/pipes/format-currency.pipe.d.ts +10 -0
- package/lib/util/pipes/format-duration.pipe.d.ts +7 -0
- package/lib/util/pipes/format-number-input.pipe.d.ts +7 -0
- package/lib/util/pipes/local-date.pipe.d.ts +9 -0
- package/lib/util/pipes/my-number.pipe.d.ts +11 -0
- package/lib/util/pipes/third-party-address-search.pipe.d.ts +8 -0
- package/lib/util/pipes/third-party-address.pipe.d.ts +8 -0
- package/lib/util/pipes/trim-string.pipe.d.ts +7 -0
- package/lib/util/regex/regex.service.d.ts +12 -0
- package/lib/util/services/api/commercial-api.service.d.ts +12 -0
- package/lib/util/services/api/common-api.service.d.ts +27 -0
- package/lib/util/services/api/legal-api.service.d.ts +15 -0
- package/lib/util/services/api/video-api.service.d.ts +17 -0
- package/lib/util/services/auth/auth.service.d.ts +9 -0
- package/lib/util/services/elasticsearch/elasticsearch.service.d.ts +35 -0
- package/lib/util/services/elasticsearch/subsidiaries.service.d.ts +12 -0
- package/lib/util/services/form-action/form-actions-events.service.d.ts +14 -0
- package/lib/util/services/guard/auth.guard.d.ts +2 -0
- package/lib/util/services/guard/login.guard.d.ts +1 -0
- package/lib/util/services/history/history.service.d.ts +10 -0
- package/lib/util/services/interceptor/auth.interceptor.d.ts +16 -0
- package/lib/util/services/jwt-security/aes.service.d.ts +12 -0
- package/lib/util/services/jwt-security/interceptorhttp.service.d.ts +8 -0
- package/lib/util/services/jwt-security/jwt.helpher.d.ts +4 -0
- package/lib/util/services/storage/local-storage.service.d.ts +13 -0
- package/lib/util/services/storage/session-storage.service.d.ts +13 -0
- package/lib/util/services/translate-language/lang.service.d.ts +14 -0
- package/lib/util/services/user/user-subsidiary.service.d.ts +9 -0
- package/lib/util/sort.d.ts +4 -0
- package/lib/util/theme/theme-event.service.d.ts +9 -0
- package/lib/util/toaster/toaster-events.service.d.ts +15 -0
- package/lib/util/util.module.d.ts +49 -0
- package/package.json +18 -1
- package/{src/public-api.ts → public-api.d.ts} +2 -17
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -10
- package/src/lib/new-front-common-library.component.spec.ts +0 -25
- package/src/lib/new-front-common-library.component.ts +0 -20
- package/src/lib/new-front-common-library.module.ts +0 -26
- package/src/lib/new-front-common-library.service.spec.ts +0 -16
- package/src/lib/new-front-common-library.service.ts +0 -10
- package/src/lib/util/animations/actions.animation.ts +0 -16
- package/src/lib/util/animations/fade.animation.ts +0 -16
- package/src/lib/util/array.service.ts +0 -14
- package/src/lib/util/component/header/header.component.html +0 -389
- package/src/lib/util/component/header/header.component.scss +0 -265
- package/src/lib/util/component/header/header.component.ts +0 -245
- package/src/lib/util/component/header/menu/menu.component.html +0 -52
- package/src/lib/util/component/header/menu/menu.component.scss +0 -127
- package/src/lib/util/component/header/menu/menu.component.spec.ts +0 -21
- package/src/lib/util/component/header/menu/menu.component.ts +0 -94
- package/src/lib/util/component/header/menu/menu.const.ts +0 -546
- package/src/lib/util/component/header/menu/menu.model.ts +0 -26
- package/src/lib/util/component/overlay/overlay.component.css +0 -20
- package/src/lib/util/component/overlay/overlay.component.html +0 -10
- package/src/lib/util/component/overlay/overlay.component.ts +0 -42
- package/src/lib/util/component/overlay/overlay.service.ts +0 -23
- package/src/lib/util/component/popup/popup-login/popup-login.component.css +0 -3
- package/src/lib/util/component/popup/popup-login/popup-login.component.html +0 -29
- package/src/lib/util/component/popup/popup-login/popup-login.component.ts +0 -96
- package/src/lib/util/component/sub-header/sub-header.component.css +0 -136
- package/src/lib/util/component/sub-header/sub-header.component.html +0 -20
- package/src/lib/util/component/sub-header/sub-header.component.spec.ts +0 -25
- package/src/lib/util/component/sub-header/sub-header.component.ts +0 -37
- package/src/lib/util/config.ts +0 -15
- package/src/lib/util/date/PeriodModel.ts +0 -7
- package/src/lib/util/date/date-format-constants.ts +0 -12
- package/src/lib/util/date/date.util.ts +0 -222
- package/src/lib/util/decorators/theme.decorator.ts +0 -24
- package/src/lib/util/decorators/user.decorator.ts +0 -30
- package/src/lib/util/directives/my-number-formatter-directive.ts +0 -32
- package/src/lib/util/directives/show-if-truncated.directive.ts +0 -19
- package/src/lib/util/enums/family.enum.ts +0 -4
- package/src/lib/util/enums/rapid-search-item-type.enum.ts +0 -11
- package/src/lib/util/enums/status-color.enum.ts +0 -9
- package/src/lib/util/event/header/header-events.service.ts +0 -20
- package/src/lib/util/event/storage/local-storage-events.service.ts +0 -15
- package/src/lib/util/event/storage/session-storage-events.service.ts +0 -15
- package/src/lib/util/http/http-params.builder.ts +0 -33
- package/src/lib/util/i18n/de.ts +0 -173
- package/src/lib/util/i18n/en.ts +0 -173
- package/src/lib/util/i18n/fr.ts +0 -174
- package/src/lib/util/i18n/multi-translate-http-loader.ts +0 -31
- package/src/lib/util/models/any-line.model.ts +0 -45
- package/src/lib/util/models/audio-content.model.ts +0 -40
- package/src/lib/util/models/authPermission.model.ts +0 -17
- package/src/lib/util/models/authUser.model.ts +0 -28
- package/src/lib/util/models/basic-hierarchy.model.ts +0 -8
- package/src/lib/util/models/basic.model.ts +0 -31
- package/src/lib/util/models/box-set-item.model.ts +0 -23
- package/src/lib/util/models/commercial/deal-rapid-search-model.ts +0 -10
- package/src/lib/util/models/commercial/invoice-rapid-search-model.ts +0 -25
- package/src/lib/util/models/commercial/work-record-rapid-search-model.ts +0 -28
- package/src/lib/util/models/custom-typings.d.ts +0 -166
- package/src/lib/util/models/disc-program.model.ts +0 -29
- package/src/lib/util/models/disc.model.ts +0 -26
- package/src/lib/util/models/eventType.model.ts +0 -7
- package/src/lib/util/models/expenditure-commitment/purchase-order-file.model.ts +0 -27
- package/src/lib/util/models/expenditure-commitment/purchase-order-rapid-search.model.ts +0 -10
- package/src/lib/util/models/family.model.ts +0 -6
- package/src/lib/util/models/lang-line.model.ts +0 -31
- package/src/lib/util/models/legal/contract-rapid-search-model.ts +0 -13
- package/src/lib/util/models/legal/contract-work.model.ts +0 -43
- package/src/lib/util/models/legal/contract-work2.model.ts +0 -39
- package/src/lib/util/models/legal/type-status-rapid-search.model.ts +0 -5
- package/src/lib/util/models/media-line.model.ts +0 -20
- package/src/lib/util/models/menu-language.model.ts +0 -16
- package/src/lib/util/models/milo/territory.model.ts +0 -19
- package/src/lib/util/models/module.model.ts +0 -9
- package/src/lib/util/models/permission.model.ts +0 -21
- package/src/lib/util/models/product-box-set.model.ts +0 -19
- package/src/lib/util/models/product-disc-detail.model.ts +0 -25
- package/src/lib/util/models/product-disc.model.ts +0 -31
- package/src/lib/util/models/product-division.model.ts +0 -35
- package/src/lib/util/models/product-type.model.ts +0 -26
- package/src/lib/util/models/product.model.ts +0 -73
- package/src/lib/util/models/program.model.ts +0 -34
- package/src/lib/util/models/purchase-order/purchase-order.model.ts +0 -61
- package/src/lib/util/models/referential/WorkVersionArticleDto.ts +0 -20
- package/src/lib/util/models/referential/adress-type.model.ts +0 -13
- package/src/lib/util/models/referential/adress.model.ts +0 -31
- package/src/lib/util/models/referential/attached-file.model.ts +0 -21
- package/src/lib/util/models/referential/bank-account.model.ts +0 -25
- package/src/lib/util/models/referential/bank-accounts.model.ts +0 -34
- package/src/lib/util/models/referential/basic-hierarchy.model.ts +0 -8
- package/src/lib/util/models/referential/broadcast-list-item.model.ts +0 -19
- package/src/lib/util/models/referential/color.model.ts +0 -16
- package/src/lib/util/models/referential/company.model.ts +0 -17
- package/src/lib/util/models/referential/content-type.model.ts +0 -22
- package/src/lib/util/models/referential/content.model.ts +0 -26
- package/src/lib/util/models/referential/cost-center-criteria-values.model.ts +0 -17
- package/src/lib/util/models/referential/cost-center-criteria.model.ts +0 -23
- package/src/lib/util/models/referential/cost-center.model.ts +0 -37
- package/src/lib/util/models/referential/coutry.model.ts +0 -17
- package/src/lib/util/models/referential/currency.model.ts +0 -22
- package/src/lib/util/models/referential/editorial-content.model.ts +0 -37
- package/src/lib/util/models/referential/fixing.model.ts +0 -21
- package/src/lib/util/models/referential/flat-media.model.ts +0 -19
- package/src/lib/util/models/referential/format-image.model.ts +0 -17
- package/src/lib/util/models/referential/format-type.model.ts +0 -16
- package/src/lib/util/models/referential/format.model.ts +0 -17
- package/src/lib/util/models/referential/fsk-index.model.ts +0 -36
- package/src/lib/util/models/referential/fsk.model.ts +0 -53
- package/src/lib/util/models/referential/function.model.ts +0 -25
- package/src/lib/util/models/referential/genre.model.ts +0 -17
- package/src/lib/util/models/referential/invoice-product-type.model.ts +0 -24
- package/src/lib/util/models/referential/keywords.model.ts +0 -16
- package/src/lib/util/models/referential/language.model.ts +0 -22
- package/src/lib/util/models/referential/media-filter.model.ts +0 -10
- package/src/lib/util/models/referential/media.model.ts +0 -21
- package/src/lib/util/models/referential/module.model.ts +0 -21
- package/src/lib/util/models/referential/participant.model.ts +0 -31
- package/src/lib/util/models/referential/person.model.ts +0 -30
- package/src/lib/util/models/referential/po/WorkRestrictionPO.ts +0 -11
- package/src/lib/util/models/referential/project-status.model.ts +0 -16
- package/src/lib/util/models/referential/quota.model.ts +0 -17
- package/src/lib/util/models/referential/referential-entity-state.model.ts +0 -22
- package/src/lib/util/models/referential/referential-value.model.ts +0 -21
- package/src/lib/util/models/referential/referentiel.model.ts +0 -29
- package/src/lib/util/models/referential/restriction.model.ts +0 -26
- package/src/lib/util/models/referential/sap-order.model.ts +0 -48
- package/src/lib/util/models/referential/service-error.model.ts +0 -16
- package/src/lib/util/models/referential/sound.model.ts +0 -16
- package/src/lib/util/models/referential/territories-languages.model.ts +0 -19
- package/src/lib/util/models/referential/territory-filter.model.ts +0 -6
- package/src/lib/util/models/referential/territory.model.ts +0 -27
- package/src/lib/util/models/referential/theme.model.ts +0 -17
- package/src/lib/util/models/referential/third-party-address-rapid-search.model.ts +0 -8
- package/src/lib/util/models/referential/third-party-creation-request.model.ts +0 -59
- package/src/lib/util/models/referential/third-party-module.model.ts +0 -21
- package/src/lib/util/models/referential/third-party-rapid-search.model.ts +0 -10
- package/src/lib/util/models/referential/third-party.model.ts +0 -100
- package/src/lib/util/models/referential/translated-value-model.ts +0 -20
- package/src/lib/util/models/referential/tva.model.ts +0 -17
- package/src/lib/util/models/referential/type-export.model.ts +0 -17
- package/src/lib/util/models/referential/type-tva-company-territory.model.ts +0 -36
- package/src/lib/util/models/referential/type-tva.model.ts +0 -29
- package/src/lib/util/models/referential/work-addons-model.ts +0 -36
- package/src/lib/util/models/referential/work-appartenance.model.ts +0 -17
- package/src/lib/util/models/referential/work-genre.model.ts +0 -21
- package/src/lib/util/models/referential/work-language.model.ts +0 -21
- package/src/lib/util/models/referential/work-milo.model.ts +0 -65
- package/src/lib/util/models/referential/work-participant.model.ts +0 -28
- package/src/lib/util/models/referential/work-restrictions-model.ts +0 -34
- package/src/lib/util/models/referential/work-theme.model.ts +0 -21
- package/src/lib/util/models/referential/work-title.model.ts +0 -27
- package/src/lib/util/models/referential/work-version-origin.model.ts +0 -20
- package/src/lib/util/models/referential/work-version-rapid-search.model.ts +0 -10
- package/src/lib/util/models/referential/work-versions-used.model.ts +0 -22
- package/src/lib/util/models/referential/work-versions.model.ts +0 -47
- package/src/lib/util/models/referential/work-year-production.model.ts +0 -16
- package/src/lib/util/models/referential/work.model.ts +0 -88
- package/src/lib/util/models/referential/zone.model.ts +0 -16
- package/src/lib/util/models/referentiel.model.ts +0 -29
- package/src/lib/util/models/search-response.model.ts +0 -7
- package/src/lib/util/models/section.model.ts +0 -11
- package/src/lib/util/models/select/options.model.ts +0 -8
- package/src/lib/util/models/select/select.model.ts +0 -4
- package/src/lib/util/models/subsidiary.model.ts +0 -10
- package/src/lib/util/models/subtitle-content.model.ts +0 -39
- package/src/lib/util/models/user-video.model.ts +0 -29
- package/src/lib/util/models/user.model.ts +0 -41
- package/src/lib/util/models/video/product-rapid-search.model.ts +0 -10
- package/src/lib/util/models/video/support-rapid-search.model.ts +0 -7
- package/src/lib/util/models/video-content.model.ts +0 -37
- package/src/lib/util/number.validator.ts +0 -123
- package/src/lib/util/paginator/custom-paginator-configuration.ts +0 -68
- package/src/lib/util/permissions/permissions.service.ts +0 -47
- package/src/lib/util/pipes/capitalizefirst.pipe.ts +0 -39
- package/src/lib/util/pipes/comma-separated-number.pipe.ts +0 -9
- package/src/lib/util/pipes/common-translate.pipe.ts +0 -37
- package/src/lib/util/pipes/display-html.pipe.ts +0 -15
- package/src/lib/util/pipes/display-null.pipe.ts +0 -19
- package/src/lib/util/pipes/format-currency.pipe.ts +0 -26
- package/src/lib/util/pipes/format-duration.pipe.ts +0 -16
- package/src/lib/util/pipes/format-number-input.pipe.ts +0 -19
- package/src/lib/util/pipes/local-date.pipe.ts +0 -29
- package/src/lib/util/pipes/my-number.pipe.ts +0 -51
- package/src/lib/util/pipes/third-party-address-search.pipe.ts +0 -12
- package/src/lib/util/pipes/third-party-address.pipe.ts +0 -13
- package/src/lib/util/pipes/trim-string.pipe.ts +0 -24
- package/src/lib/util/regex/regex.service.ts +0 -94
- package/src/lib/util/regex/regex.spec.ts +0 -45
- package/src/lib/util/services/api/commercial-api.service.ts +0 -23
- package/src/lib/util/services/api/common-api.service.ts +0 -121
- package/src/lib/util/services/api/legal-api.service.ts +0 -27
- package/src/lib/util/services/api/video-api.service.ts +0 -45
- package/src/lib/util/services/auth/auth.service.spec.ts +0 -16
- package/src/lib/util/services/auth/auth.service.ts +0 -14
- package/src/lib/util/services/elasticsearch/elasticsearch.service.ts +0 -179
- package/src/lib/util/services/elasticsearch/subsidiaries.service.ts +0 -48
- package/src/lib/util/services/form-action/form-actions-events.service.ts +0 -25
- package/src/lib/util/services/guard/auth.guard.ts +0 -44
- package/src/lib/util/services/guard/login.guard.ts +0 -26
- package/src/lib/util/services/history/history.service.ts +0 -38
- package/src/lib/util/services/interceptor/auth.interceptor.ts +0 -66
- package/src/lib/util/services/jwt-security/aes.service.ts +0 -48
- package/src/lib/util/services/jwt-security/interceptorhttp.service.ts +0 -98
- package/src/lib/util/services/jwt-security/jwt.helpher.ts +0 -38
- package/src/lib/util/services/storage/local-storage.service.ts +0 -36
- package/src/lib/util/services/storage/session-storage.service.ts +0 -39
- package/src/lib/util/services/translate-language/lang.service.ts +0 -26
- package/src/lib/util/services/user/user-subsidiary.service.spec.ts +0 -207
- package/src/lib/util/services/user/user-subsidiary.service.ts +0 -21
- package/src/lib/util/sort.ts +0 -27
- package/src/lib/util/theme/theme-event.service.ts +0 -15
- package/src/lib/util/toaster/toaster-events.service.ts +0 -32
- package/src/lib/util/util.module.ts +0 -185
- package/src/test.ts +0 -13
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- /package/{src/lib/util/interfaces/permissions.interface.ts → lib/util/interfaces/permissions.interface.d.ts} +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {inject, Injectable} from "@angular/core";
|
|
2
|
-
import {SubsidiaryModel} from "../../models";
|
|
3
|
-
import {LegalApiService} from "../api/legal-api.service";
|
|
4
|
-
|
|
5
|
-
@Injectable({providedIn: 'root'})
|
|
6
|
-
export class SubsidiariesService {
|
|
7
|
-
|
|
8
|
-
private readonly legalService: LegalApiService = inject(LegalApiService);
|
|
9
|
-
|
|
10
|
-
private defaultMapping: Record<number, number[]> = {
|
|
11
|
-
1: [4991],
|
|
12
|
-
2: [332, 333, 334, 739, 335, 1379, 1380, 4988, 4990],
|
|
13
|
-
3: [332, 333, 334, 739, 335, 1379, 1380, 4988, 4990],
|
|
14
|
-
4: [332, 333, 334, 739, 335, 1379, 1380, 4988, 4990],
|
|
15
|
-
5: [332, 333, 334, 739, 335, 1379, 1380, 4988, 4990],
|
|
16
|
-
6: [332, 333, 334, 739, 335, 1379, 1380, 4988, 4990],
|
|
17
|
-
7: [332, 333, 334, 739, 335, 1379, 1380, 4988, 4990]
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
private subsidiaryToSocieteMapLegal: Record<number, number[]> = {};
|
|
21
|
-
|
|
22
|
-
constructor() {
|
|
23
|
-
this.loadTableSocieteAppartenance();
|
|
24
|
-
}
|
|
25
|
-
loadTableSocieteAppartenance() {
|
|
26
|
-
this.legalService.getMappingSocietesSubsidiaries().subscribe({
|
|
27
|
-
next: (map: Record<number, number[]>) => {
|
|
28
|
-
this.subsidiaryToSocieteMapLegal = map;
|
|
29
|
-
},
|
|
30
|
-
error: () => {
|
|
31
|
-
console.log('Default mapping for subsidiaryToSocieteMapLegal');
|
|
32
|
-
this.subsidiaryToSocieteMapLegal = {...this.defaultMapping};
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
getSocieteAppartenance(subsidiaries: SubsidiaryModel[]) {
|
|
38
|
-
if (subsidiaries === null) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return subsidiaries
|
|
42
|
-
.reduce((acc: number[], sub) => {
|
|
43
|
-
const societes = this.subsidiaryToSocieteMapLegal[sub.id] || [];
|
|
44
|
-
return acc.concat(societes);
|
|
45
|
-
}, [])
|
|
46
|
-
.filter((v, i, arr) => arr.indexOf(v) === i);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Injectable } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Injectable()
|
|
4
|
-
export class FormActionsEventsService {
|
|
5
|
-
|
|
6
|
-
public updateEvent: EventEmitter<boolean> = new EventEmitter<boolean>(true);
|
|
7
|
-
public consultToEdit: EventEmitter<boolean> = new EventEmitter<boolean>(true);
|
|
8
|
-
public EditToConsult: EventEmitter<boolean> = new EventEmitter<boolean>(true);
|
|
9
|
-
public consultToDuplicate: EventEmitter<boolean> = new EventEmitter<boolean>(true);
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public emitUpdateEvent() {
|
|
15
|
-
this.updateEvent.emit();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public emitEventIsUpdateTrue() {
|
|
19
|
-
this.consultToEdit.emit(true);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public emitConsultEvent() {
|
|
23
|
-
this.EditToConsult.emit();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot } from '@angular/router';
|
|
2
|
-
import { WEB_CONFIG } from '../../config';
|
|
3
|
-
import { CookieService } from 'ngx-cookie-service';
|
|
4
|
-
import { CommonApiService } from '../api/common-api.service';
|
|
5
|
-
import { catchError, map } from 'rxjs/operators';
|
|
6
|
-
import { AuthUserModel } from '../../models';
|
|
7
|
-
import { inject } from '@angular/core';
|
|
8
|
-
import { AuthService } from '../auth/auth.service';
|
|
9
|
-
import { of } from "rxjs";
|
|
10
|
-
|
|
11
|
-
export const authGuard: CanActivateFn = (
|
|
12
|
-
route: ActivatedRouteSnapshot,
|
|
13
|
-
state: RouterStateSnapshot
|
|
14
|
-
) => {
|
|
15
|
-
const cookieService = inject(CookieService);
|
|
16
|
-
const commonApiService = inject(CommonApiService);
|
|
17
|
-
const webConfig = inject(WEB_CONFIG);
|
|
18
|
-
const authService = inject(AuthService);
|
|
19
|
-
|
|
20
|
-
if (state.url.includes('/login/invalid')) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (commonApiService.isTokenValid()) {
|
|
25
|
-
authService.setAuthenticated(true);
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const user: AuthUserModel = commonApiService.getUserDataFromToken();
|
|
30
|
-
const email: string = user.secondary ? user.email : cookieService.get('auth-mail');
|
|
31
|
-
|
|
32
|
-
return commonApiService.ssoLogin(email).pipe(
|
|
33
|
-
map((data) => {
|
|
34
|
-
user.secondary ? commonApiService.setSecondaryToken(data.token) : commonApiService.setToken(data.token);
|
|
35
|
-
authService.setAuthenticated(true);
|
|
36
|
-
return true;
|
|
37
|
-
}),
|
|
38
|
-
catchError(() => {
|
|
39
|
-
authService.setAuthenticated(false);
|
|
40
|
-
window.location.href = webConfig.api_url + '/login/invalid';
|
|
41
|
-
return of(false);
|
|
42
|
-
})
|
|
43
|
-
);
|
|
44
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { inject } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { MyDialogPopupLoginComponent } from '../../component/popup/popup-login/popup-login.component';
|
|
4
|
-
import { AuthService } from '../auth/auth.service';
|
|
5
|
-
import {map} from "rxjs/operators";
|
|
6
|
-
|
|
7
|
-
export const loginGuard = () => {
|
|
8
|
-
const dialog = inject(MatDialog);
|
|
9
|
-
const authService = inject(AuthService);
|
|
10
|
-
|
|
11
|
-
if (sessionStorage.getItem('authToken') !== null) {
|
|
12
|
-
authService.setAuthenticated(true);
|
|
13
|
-
return true;
|
|
14
|
-
} else {
|
|
15
|
-
const dialogRef = dialog.open(MyDialogPopupLoginComponent, {
|
|
16
|
-
disableClose: true
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
return dialogRef.afterClosed().pipe(
|
|
20
|
-
map((res: boolean) => {
|
|
21
|
-
authService.setAuthenticated(res);
|
|
22
|
-
return res;
|
|
23
|
-
})
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { LocalStorageService } from '../storage/local-storage.service';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class HistoryService {
|
|
6
|
-
|
|
7
|
-
constructor(private localStorage: LocalStorageService) {
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public add(type: 'PRODUCT' | 'PO' | 'DEAL' | 'WORK' | 'CONTRACT_ACQ' | 'CONTRACT_CESS' | 'CONTRACT_AUTH' | 'BUDGET', id: string, ref: any) {
|
|
11
|
-
let history = [];
|
|
12
|
-
if (this.localStorage.exist('history')) {
|
|
13
|
-
history = this.localStorage.get('history');
|
|
14
|
-
}
|
|
15
|
-
// DELETE EXISTING SCREEN
|
|
16
|
-
history.forEach((element, index) => {
|
|
17
|
-
if (this.exist(type, id, ref, element)) history.splice(index, 1);
|
|
18
|
-
});
|
|
19
|
-
// ADD THE LAST CONSULTED SCREEN TO THE BEGINNING
|
|
20
|
-
history.unshift({type: type, id: id, ref: ref});
|
|
21
|
-
|
|
22
|
-
// SHOW ONLY THE 10 LAST CONSULTED SCREENS
|
|
23
|
-
if (history.length >= 10) {
|
|
24
|
-
history = history.slice(0, 10);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// POST TO LOCAL STORAGE
|
|
28
|
-
this.localStorage.post('history', history);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
private exist(type: 'PRODUCT' | 'PO' | 'DEAL' | 'WORK' | 'CONTRACT_ACQ' | 'CONTRACT_CESS' | 'CONTRACT_AUTH' | 'BUDGET', id: string, ref: string, history: any) {
|
|
32
|
-
if (type == history.type && id == history.id && ref == history.ref) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
3
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
|
-
import { filter, switchMap, take } from 'rxjs/operators';
|
|
5
|
-
import { CookieService } from 'ngx-cookie-service';
|
|
6
|
-
import { CommonApiService } from '../api/common-api.service';
|
|
7
|
-
import { AuthUserModel } from '../../models';
|
|
8
|
-
|
|
9
|
-
@Injectable()
|
|
10
|
-
export class AuthInterceptor implements HttpInterceptor {
|
|
11
|
-
|
|
12
|
-
private refreshTokenInProgress = false;
|
|
13
|
-
private refreshTokenSubject: BehaviorSubject<any> = new BehaviorSubject<any>(
|
|
14
|
-
null
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
-
private authService: CommonApiService,
|
|
19
|
-
private cookieService: CookieService
|
|
20
|
-
) {
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
24
|
-
if (request.url.includes('/login/email') || request.url.includes('/login/findUser') || request.url.startsWith('./')) {
|
|
25
|
-
return next.handle(request);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (!this.authService.isTokenValid()) {
|
|
29
|
-
if (this.refreshTokenInProgress) {
|
|
30
|
-
return this.refreshTokenSubject.pipe(
|
|
31
|
-
filter((result) => result !== null),
|
|
32
|
-
take(1),
|
|
33
|
-
switchMap(() => next.handle(this.addToken(request)))
|
|
34
|
-
);
|
|
35
|
-
} else {
|
|
36
|
-
this.refreshTokenInProgress = true;
|
|
37
|
-
this.refreshTokenSubject.next(null);
|
|
38
|
-
const user: AuthUserModel = this.authService.getUserDataFromToken();
|
|
39
|
-
const email: string = user.secondary ? user.email : this.cookieService.get('auth-mail');
|
|
40
|
-
|
|
41
|
-
return this.authService.ssoLogin(email)
|
|
42
|
-
.pipe(
|
|
43
|
-
switchMap((data: any) => {
|
|
44
|
-
this.authService.setToken(data.token);
|
|
45
|
-
this.refreshTokenInProgress = false;
|
|
46
|
-
this.refreshTokenSubject.next(data.token);
|
|
47
|
-
return next.handle(this.addToken(request));
|
|
48
|
-
})
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return next.handle(this.addToken(request));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private addToken(request: HttpRequest<any>): HttpRequest<any> {
|
|
57
|
-
const token = this.authService.getToken();
|
|
58
|
-
if (!token) {
|
|
59
|
-
return request;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return request.clone({
|
|
63
|
-
headers: request.headers.set('Authorization', `Bearer ${token}`)
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as CryptoJS from 'crypto-js';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class AesService {
|
|
6
|
-
|
|
7
|
-
// private SECRET_CODE: string ;
|
|
8
|
-
private readonly SECRET_CODE: string = '1234567891234567';
|
|
9
|
-
private keySize: number = 128 / 32;
|
|
10
|
-
private iterationCount = 1000;
|
|
11
|
-
// private iv: string ;
|
|
12
|
-
// private salt: string ;
|
|
13
|
-
private pwdEncrypted: string;
|
|
14
|
-
|
|
15
|
-
// private cipherText: string;
|
|
16
|
-
|
|
17
|
-
constructor() {
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public generateKey(salt: string) {
|
|
21
|
-
|
|
22
|
-
// this.SECRET_CODE = sessionStorage.getItem('_uniqueKey');
|
|
23
|
-
const key = CryptoJS.PBKDF2(
|
|
24
|
-
this.SECRET_CODE,
|
|
25
|
-
CryptoJS.enc.Hex.parse(salt),
|
|
26
|
-
{keySize: this.keySize, iterations: this.iterationCount});
|
|
27
|
-
|
|
28
|
-
return key;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
public encrypt(planText: string) {
|
|
32
|
-
const iv = CryptoJS.lib.WordArray.random(16).toString(CryptoJS.enc.Hex);
|
|
33
|
-
const salt = CryptoJS.lib.WordArray.random(16).toString(CryptoJS.enc.Hex);
|
|
34
|
-
|
|
35
|
-
const key = this.generateKey(salt);
|
|
36
|
-
|
|
37
|
-
const encrypted = CryptoJS.AES.encrypt(planText, key, {iv: CryptoJS.enc.Hex.parse(iv)});
|
|
38
|
-
|
|
39
|
-
const cipherText = encrypted.ciphertext.toString(CryptoJS.enc.Base64);
|
|
40
|
-
|
|
41
|
-
const aesPassword = (iv + '::' + salt + '::' + cipherText);
|
|
42
|
-
// conversion en base 64
|
|
43
|
-
this.pwdEncrypted = btoa(aesPassword);
|
|
44
|
-
|
|
45
|
-
return this.pwdEncrypted;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
const AUTH_HEADER_KEY = 'Authorization';
|
|
6
|
-
const AUTH_PREFIX = 'Bearer ';
|
|
7
|
-
const TOKEN_NAME = 'authToken';
|
|
8
|
-
|
|
9
|
-
@Injectable()
|
|
10
|
-
export class InterceptorHttpService implements HttpInterceptor {
|
|
11
|
-
|
|
12
|
-
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
13
|
-
const token = `${AUTH_PREFIX}${sessionStorage.getItem(TOKEN_NAME)}`;
|
|
14
|
-
req.headers.set(AUTH_HEADER_KEY, `${AUTH_PREFIX} ${token}`);
|
|
15
|
-
return next.handle(req);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// TODO à refaire lorsque l'on réactivera l'interceptor du BACK d'orphe
|
|
19
|
-
// public request(url: string | Request): Observable<Response> {
|
|
20
|
-
//
|
|
21
|
-
// const token = sessionStorage.getItem(TOKEN_NAME);
|
|
22
|
-
//
|
|
23
|
-
// const options = {headers: new Headers()};
|
|
24
|
-
// if (typeof url === 'string') {
|
|
25
|
-
//
|
|
26
|
-
// options.headers.set(AUTH_HEADER_KEY, `${AUTH_PREFIX} ${token}`);
|
|
27
|
-
// } else {
|
|
28
|
-
// url.headers.set(AUTH_HEADER_KEY, `${AUTH_PREFIX} ${token}`);
|
|
29
|
-
// }
|
|
30
|
-
// return super.request(url, options).catch(this.catchError);
|
|
31
|
-
// }
|
|
32
|
-
//
|
|
33
|
-
// public get(url: string, options?): Observable<Response> {
|
|
34
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
35
|
-
// return super.get(url, enhacedOptions).pipe(catchError(this.catchError));
|
|
36
|
-
// }
|
|
37
|
-
//
|
|
38
|
-
// public post(url: string, body: any, options?): Observable<Response> {
|
|
39
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
40
|
-
// return super.post(url, body, enhacedOptions).pipe(catchError(this.catchError));
|
|
41
|
-
// }
|
|
42
|
-
//
|
|
43
|
-
// public put(url: string, body: any, options?): Observable<Response> {
|
|
44
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
45
|
-
// return super.put(url, body, enhacedOptions).pipe(catchError(this.catchError));
|
|
46
|
-
// }
|
|
47
|
-
//
|
|
48
|
-
// public delete(url: string, options?): Observable<Response> {
|
|
49
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
50
|
-
// return super.delete(url, enhacedOptions).pipe(catchError(this.catchError));
|
|
51
|
-
// }
|
|
52
|
-
//
|
|
53
|
-
// public patch(url: string, body: any, options?): Observable<Response> {
|
|
54
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
55
|
-
// return super.patch(url, body, enhacedOptions).pipe(catchError(this.catchError));
|
|
56
|
-
// }
|
|
57
|
-
//
|
|
58
|
-
// public head(url: string, options?): Observable<Response> {
|
|
59
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
60
|
-
// return super.head(url, enhacedOptions).pipe(catchError(this.catchError));
|
|
61
|
-
// }
|
|
62
|
-
//
|
|
63
|
-
// public options(url: string, options?): Observable<Response> {
|
|
64
|
-
// const enhacedOptions = this.setAuthorizationHeader(options);
|
|
65
|
-
// return super.options(url, enhacedOptions).pipe(catchError(this.catchError));
|
|
66
|
-
// }
|
|
67
|
-
//
|
|
68
|
-
// // Ajout de l'attribut Authorization au Header
|
|
69
|
-
// private setAuthorizationHeader(options?) {
|
|
70
|
-
//
|
|
71
|
-
// const token = `${AUTH_PREFIX}${sessionStorage.getItem(TOKEN_NAME)}`;
|
|
72
|
-
// // Copie du header dans le RequestOptions et ajout du token a 'Authorization'
|
|
73
|
-
// const headers = {
|
|
74
|
-
// ...options.headers.toJSON(),
|
|
75
|
-
// Authorization: token
|
|
76
|
-
// };
|
|
77
|
-
// options.headers = new Headers(headers);
|
|
78
|
-
// return options;
|
|
79
|
-
// }
|
|
80
|
-
//
|
|
81
|
-
// // Response Interceptor
|
|
82
|
-
// private catchError(error: any): Observable<any> {
|
|
83
|
-
//
|
|
84
|
-
// if (error instanceof HttpErrorResponse) {
|
|
85
|
-
// return Observable.throw(error);
|
|
86
|
-
// } else if (error instanceof Response) {
|
|
87
|
-
// if (sessionStorage.getItem('loginFlag') === 'true' && error.status === 401) {
|
|
88
|
-
// sessionStorage.removeItem(TOKEN_NAME);
|
|
89
|
-
// sessionStorage.removeItem('loginFlag');
|
|
90
|
-
// window.location.reload();
|
|
91
|
-
// }
|
|
92
|
-
// return Observable.throw(error);
|
|
93
|
-
// } else {
|
|
94
|
-
// return Observable.throw(error);
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
}
|
|
98
|
-
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export class JwtHelper {
|
|
2
|
-
|
|
3
|
-
public decodeToken(token: string) {
|
|
4
|
-
let parts = token.split('.');
|
|
5
|
-
if (parts.length !== 3) {
|
|
6
|
-
throw new Error('JWT must have 3 parts');
|
|
7
|
-
}
|
|
8
|
-
let decoded = this.urlBase64Decode(parts[1]);
|
|
9
|
-
if (!decoded) {
|
|
10
|
-
throw new Error('Cannot decode the token');
|
|
11
|
-
}
|
|
12
|
-
return JSON.parse(decoded);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
private urlBase64Decode(str: string) {
|
|
16
|
-
let output = str.replace(/-/g, '+').replace(/_/g, '/');
|
|
17
|
-
switch (output.length % 4) {
|
|
18
|
-
case 0: {
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
case 2: {
|
|
22
|
-
output += '==';
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
case 3: {
|
|
26
|
-
output += '=';
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
default: {
|
|
30
|
-
throw 'Illegal base64url string!';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return decodeURIComponent((<any>window).escape(window.atob(output)));
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { LocalStorageEventsService } from '../../event/storage/local-storage-events.service';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class LocalStorageService {
|
|
6
|
-
|
|
7
|
-
constructor(private localStorageEvents: LocalStorageEventsService) {
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Check if the data exist in the session storage
|
|
11
|
-
public exist(key: string) {
|
|
12
|
-
return localStorage.hasOwnProperty(key);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public get(key: string) {
|
|
16
|
-
return this.exist(key) ? JSON.parse(localStorage.getItem(key)) : null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public post(key: string, data: any) {
|
|
20
|
-
localStorage.setItem(key, JSON.stringify(data));
|
|
21
|
-
this.localStorageEvents.emitLocalStorageEvent();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// check if the key exist in the local storage and if it equals to the value param
|
|
25
|
-
public contains(key: string, data: any) {
|
|
26
|
-
return localStorage.getItem(key).indexOf(JSON.stringify(data)) !== -1 ? true : false;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public delete(key: string): boolean {
|
|
30
|
-
if (this.exist(key)) {
|
|
31
|
-
localStorage.removeItem(key);
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Angular 2
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { SessionStorageEventsService } from '../../event/storage/session-storage-events.service';
|
|
4
|
-
|
|
5
|
-
// Services
|
|
6
|
-
|
|
7
|
-
@Injectable()
|
|
8
|
-
export class SessionStorageService {
|
|
9
|
-
|
|
10
|
-
constructor(private sessionsStorageEvents: SessionStorageEventsService) {
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Check if the data exist in the session storage
|
|
14
|
-
public exist(key: string) {
|
|
15
|
-
return (undefined !== sessionStorage.getItem(key) && null !== sessionStorage.getItem(key)) ? true : false;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public get(key: string) {
|
|
19
|
-
return this.exist(key) ? JSON.parse(sessionStorage.getItem(key)) : null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public post(key: string, data: any) {
|
|
23
|
-
sessionStorage.setItem(key, JSON.stringify(data));
|
|
24
|
-
this.sessionsStorageEvents.emitUpdate();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// check if the key exist in the session storage and if it equals to the value param
|
|
28
|
-
public contains(key: string, data: any) {
|
|
29
|
-
return this.get(key).indexOf(JSON.stringify(data)) !== -1 ? true : false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public delete(key: string): boolean {
|
|
33
|
-
if (this.exist(key)) {
|
|
34
|
-
sessionStorage.removeItem(key);
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, Injectable } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { LocalStorageService } from "../storage/local-storage.service";
|
|
4
|
-
|
|
5
|
-
@Injectable()
|
|
6
|
-
export class LangService {
|
|
7
|
-
public switchLangEmitter: EventEmitter<any> = new EventEmitter();
|
|
8
|
-
|
|
9
|
-
constructor(private translate: TranslateService, private localStorage: LocalStorageService) {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
translateLanguage() {
|
|
13
|
-
this.translate.addLangs(['en', 'fr', 'de']);
|
|
14
|
-
if (this.localStorage.exist('lang') && this.translate.getLangs().indexOf(this.localStorage.get('lang')) != -1) {
|
|
15
|
-
this.translate.use(this.localStorage.get('lang'));
|
|
16
|
-
} else {
|
|
17
|
-
this.translate.use(this.translate.getLangs().indexOf(this.translate.getBrowserLang()) != -1 ? this.translate.getBrowserLang() : 'en');
|
|
18
|
-
}
|
|
19
|
-
this.localStorage.post('lang', this.translate.currentLang);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// emit an event when local storage change
|
|
23
|
-
public switchLang() {
|
|
24
|
-
this.switchLangEmitter.emit();
|
|
25
|
-
}
|
|
26
|
-
}
|