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,29 +0,0 @@
|
|
|
1
|
-
<h3 mat-dialog-title>Log in</h3>
|
|
2
|
-
|
|
3
|
-
<mat-dialog-content>
|
|
4
|
-
<form (keyup.enter)="onLogin()" [formGroup]="userForm" class="d-flex flex-column">
|
|
5
|
-
<div class="form-group">
|
|
6
|
-
<mat-label>{{'CORE.LOGIN.USERNAME' | translate }} <span style="color:#ef5350; font-weight: bold">*</span>
|
|
7
|
-
</mat-label>
|
|
8
|
-
<mat-form-field appearance="outline">
|
|
9
|
-
<input [(ngModel)]="username" formControlName="username" matInput/>
|
|
10
|
-
</mat-form-field>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="form-group">
|
|
13
|
-
<mat-label>{{'CORE.LOGIN.PASSWORD' | translate }} <span style="color:#ef5350; font-weight: bold">*</span>
|
|
14
|
-
</mat-label>
|
|
15
|
-
<mat-form-field appearance="outline">
|
|
16
|
-
<input [(ngModel)]="password" formControlName="password" matInput type="password"/>
|
|
17
|
-
</mat-form-field>
|
|
18
|
-
</div>
|
|
19
|
-
</form>
|
|
20
|
-
</mat-dialog-content>
|
|
21
|
-
|
|
22
|
-
<mat-dialog-actions>
|
|
23
|
-
<button (click)="onLogin()" [disabled]="loading" class="primary w-100" mat-raised-button
|
|
24
|
-
type="submit">{{ 'CORE.LOGIN.SIGN_IN' | translate }}</button>
|
|
25
|
-
<mat-spinner *ngIf="loading" [diameter]="30" class="not-so-close-from-button login-spinner"></mat-spinner>
|
|
26
|
-
<div *ngIf="(errorMessage !== null || errorMessage !== '')" class="errorMessage not-so-close-from-button">
|
|
27
|
-
{{errorMessage}} </div>
|
|
28
|
-
</mat-dialog-actions>
|
|
29
|
-
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Component, Inject, OnInit } from '@angular/core';
|
|
2
|
-
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
import { AesService } from '../../../services/jwt-security/aes.service';
|
|
4
|
-
import { Config, WEB_CONFIG } from '../../../config';
|
|
5
|
-
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
8
|
-
import {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';
|
|
9
|
-
import { CookieService } from 'ngx-cookie-service';
|
|
10
|
-
import { CommonApiService } from '../../../services/api/common-api.service';
|
|
11
|
-
import {UserFormModel} from "../../../models/referential/user-form.model";
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'sc-popup-login',
|
|
15
|
-
templateUrl: './popup-login.component.html',
|
|
16
|
-
styleUrls: ['./popup-login.component.css']
|
|
17
|
-
})
|
|
18
|
-
export class MyDialogPopupLoginComponent implements OnInit {
|
|
19
|
-
public username = '';
|
|
20
|
-
public password = '';
|
|
21
|
-
public loading = false;
|
|
22
|
-
public errorMessage = '';
|
|
23
|
-
public apiUrl = '';
|
|
24
|
-
public userForm: FormGroup<UserFormModel>;
|
|
25
|
-
|
|
26
|
-
constructor(
|
|
27
|
-
public dialogRef: MatDialogRef<MyDialogPopupLoginComponent>,
|
|
28
|
-
private aesUtil: AesService,
|
|
29
|
-
@Inject(WEB_CONFIG) private config: Config,
|
|
30
|
-
private http: HttpClient,
|
|
31
|
-
private translateService: TranslateService,
|
|
32
|
-
private cookieService: CookieService,
|
|
33
|
-
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
34
|
-
private commonApiService: CommonApiService,
|
|
35
|
-
private formBuilder: FormBuilder
|
|
36
|
-
) {
|
|
37
|
-
this.apiUrl = config.api_url + '/authorization-api';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
public ngOnInit() {
|
|
41
|
-
this.buildForm();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public onLogin() {
|
|
45
|
-
if (this.userForm.invalid) {
|
|
46
|
-
this.errorMessage = this.translateService.instant(
|
|
47
|
-
'CORE.LOGIN.ACCESS_DENIED'
|
|
48
|
-
);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.loading = true;
|
|
52
|
-
this.errorMessage = '';
|
|
53
|
-
|
|
54
|
-
this.login(
|
|
55
|
-
{username: this.username, password: this.password},
|
|
56
|
-
this.translateService.currentLang
|
|
57
|
-
).subscribe(
|
|
58
|
-
user => {
|
|
59
|
-
this.loading = false;
|
|
60
|
-
sessionStorage.setItem('loginFlag', 'true');
|
|
61
|
-
sessionStorage.removeItem('authToken');
|
|
62
|
-
sessionStorage.setItem('authToken', user.token);
|
|
63
|
-
this.cookieService.set('auth-mail', this.commonApiService.getUserDataFromToken().email);
|
|
64
|
-
this.dialogRef.close(true);
|
|
65
|
-
},
|
|
66
|
-
() => {
|
|
67
|
-
this.loading = false;
|
|
68
|
-
this.errorMessage = this.translateService.instant(
|
|
69
|
-
'CORE.LOGIN.ACCESS_DENIED'
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
private login(user: any, language: string): Observable<any> {
|
|
76
|
-
let url: string = this.apiUrl + '/login/findUser';
|
|
77
|
-
if (language) {
|
|
78
|
-
url += '?language=' + language;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
user.password = this.aesUtil.encrypt(user.password);
|
|
82
|
-
|
|
83
|
-
return this.http.post(url, user, {
|
|
84
|
-
headers: new HttpHeaders({
|
|
85
|
-
'Content-Type': 'application/json'
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private buildForm(): void {
|
|
91
|
-
this.userForm = this.formBuilder.group({
|
|
92
|
-
username: new FormControl<string>(null, Validators.required),
|
|
93
|
-
password: new FormControl<string>(null, Validators.required)
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
GENERAL
|
|
3
|
-
*/
|
|
4
|
-
#template-header-container {
|
|
5
|
-
position: relative;
|
|
6
|
-
background: #3F3F3F;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
#template-header {
|
|
10
|
-
position: fixed;
|
|
11
|
-
z-index: 300;
|
|
12
|
-
top: 20px;
|
|
13
|
-
width: 100%;
|
|
14
|
-
/*height: 103px;*/
|
|
15
|
-
padding-top: 30px !important;
|
|
16
|
-
background: #3F3F3F;
|
|
17
|
-
color: white;
|
|
18
|
-
transition: 0.3s;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
#left-part {
|
|
22
|
-
float: left;
|
|
23
|
-
margin-left: 15px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#right-part {
|
|
27
|
-
float: right;
|
|
28
|
-
margin-right: 230px;
|
|
29
|
-
height: 100%
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
a {
|
|
33
|
-
vertical-align: middle;
|
|
34
|
-
text-align: center;
|
|
35
|
-
color: #afafaf;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.header-hide {
|
|
39
|
-
top: -25px !important;
|
|
40
|
-
transition: 0.3s;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.title {
|
|
44
|
-
color: white !important;
|
|
45
|
-
font-weight: bold !important;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.subtitle {
|
|
49
|
-
color: #b3b3b3 !important;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
Large screens: min-width 1025px, large screens
|
|
55
|
-
*/
|
|
56
|
-
@media only screen and (min-width: 64.063em) {
|
|
57
|
-
|
|
58
|
-
#template-header {
|
|
59
|
-
/*padding: 10px 0px 5px 55px;*/
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.title {
|
|
63
|
-
font-size: 23px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.subtitle {
|
|
67
|
-
font-size: 16px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.status {
|
|
71
|
-
color: #65d39b;
|
|
72
|
-
margin-left: 10px;
|
|
73
|
-
font-size: 12px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.codeMilo {
|
|
77
|
-
color: #b3b3b3;
|
|
78
|
-
font-size: 15px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.dealNumber {
|
|
82
|
-
color: #b3b3b3;
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
font-size: 19px;
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
Medium screens: min-width 641px and max-width 1024px
|
|
92
|
-
*/
|
|
93
|
-
@media only screen and (min-width: 40.063em) and (max-width: 64em) {
|
|
94
|
-
|
|
95
|
-
.title {
|
|
96
|
-
font-size: 15px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.subtitle {
|
|
100
|
-
font-size: 10px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.status {
|
|
104
|
-
color: #65d39b;
|
|
105
|
-
margin-left: 10px;
|
|
106
|
-
font-size: 10px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
#template-header {
|
|
110
|
-
padding: 45px 0 5px 55px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
Small screens - max-width 640px, mobile-only styles,
|
|
116
|
-
*/
|
|
117
|
-
@media only screen and (max-width: 40em) {
|
|
118
|
-
|
|
119
|
-
.title {
|
|
120
|
-
font-size: 10px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.subtitle {
|
|
124
|
-
font-size: 8px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.status {
|
|
128
|
-
color: #65d39b;
|
|
129
|
-
margin-left: 10px;
|
|
130
|
-
font-size: 8px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
#template-header {
|
|
134
|
-
padding: 45px 0 5px 0;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div id="template-header-container">
|
|
2
|
-
<div [ngClass]="{'header-hide':isHide}" id="template-header">
|
|
3
|
-
|
|
4
|
-
<!-- What you want -->
|
|
5
|
-
<div id="left-part">
|
|
6
|
-
<ng-content select=[left]></ng-content>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<!-- What you want -->
|
|
10
|
-
<div id="middle-part">
|
|
11
|
-
<ng-content select=[middle]></ng-content>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<!-- What you want -->
|
|
15
|
-
<div id="right-part">
|
|
16
|
-
<ng-content select=[right]></ng-content>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { SubHeaderComponent } from './sub-header.component';
|
|
3
|
-
import { RouterTestingModule } from '@angular/router/testing';
|
|
4
|
-
|
|
5
|
-
let comp: SubHeaderComponent;
|
|
6
|
-
let fixture: ComponentFixture<SubHeaderComponent>;
|
|
7
|
-
|
|
8
|
-
describe('Sub header component(SubHeaderComponent)', () => {
|
|
9
|
-
beforeEach(async(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
imports: [RouterTestingModule],
|
|
12
|
-
declarations: [SubHeaderComponent],
|
|
13
|
-
providers: []
|
|
14
|
-
});
|
|
15
|
-
}));
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
fixture = TestBed.createComponent(SubHeaderComponent);
|
|
19
|
-
comp = fixture.componentInstance;
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create the component', () => {
|
|
23
|
-
expect(comp).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Angular 2
|
|
2
|
-
import { Component, HostListener, Inject, OnInit } from '@angular/core';
|
|
3
|
-
// Decorators
|
|
4
|
-
import { Theme } from '../../decorators/theme.decorator';
|
|
5
|
-
import { DOCUMENT } from '@angular/common';
|
|
6
|
-
|
|
7
|
-
// Component configuration
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'sc-sub-header',
|
|
11
|
-
templateUrl: './sub-header.component.html',
|
|
12
|
-
styleUrls: ['./sub-header.component.css']
|
|
13
|
-
})
|
|
14
|
-
export class SubHeaderComponent implements OnInit {
|
|
15
|
-
@Theme() public theme: string;
|
|
16
|
-
|
|
17
|
-
public isHide = false;
|
|
18
|
-
public currentScroll = 0;
|
|
19
|
-
|
|
20
|
-
constructor(@Inject(DOCUMENT) private document: any) {
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public ngOnInit(): void {
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@HostListener('window:scroll', [])
|
|
27
|
-
public onWindowScroll() {
|
|
28
|
-
const numberVar = this.document.documentElement.scrollTop;
|
|
29
|
-
if (numberVar > this.currentScroll) {
|
|
30
|
-
this.isHide = true;
|
|
31
|
-
}
|
|
32
|
-
if (numberVar < this.currentScroll) {
|
|
33
|
-
this.isHide = false;
|
|
34
|
-
}
|
|
35
|
-
this.currentScroll = numberVar;
|
|
36
|
-
}
|
|
37
|
-
}
|
package/src/lib/util/config.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export const WEB_CONFIG = new InjectionToken<Config>('WEB_CONFIG');
|
|
4
|
-
|
|
5
|
-
export interface Config {
|
|
6
|
-
api_url: string;
|
|
7
|
-
env: string;
|
|
8
|
-
elasticsearch_url?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const DEFAULT_WEB_CONFIG: Config = {
|
|
12
|
-
api_url: 'http://localhost:8080',
|
|
13
|
-
env: 'DEV',
|
|
14
|
-
elasticsearch_url: 'https://vpc-unity-search-dev-nm5ydumospctjfaatstfjvoqey.eu-west-1.es.amazonaws.com'
|
|
15
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const CUSTOM_DATE_FORMATS = {
|
|
2
|
-
|
|
3
|
-
parse: {
|
|
4
|
-
dateInput: {month: 'short', year: 'numeric', day: 'numeric'},
|
|
5
|
-
},
|
|
6
|
-
display: {
|
|
7
|
-
dateInput: 'input',
|
|
8
|
-
monthYearLabel: {year: 'numeric', month: 'long'},
|
|
9
|
-
dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},
|
|
10
|
-
monthYearA11yLabel: {year: 'numeric', month: 'long'},
|
|
11
|
-
}
|
|
12
|
-
};
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { PeriodModel } from './PeriodModel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Created by dstoian on 27/03/2017.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export class DateUtil {
|
|
8
|
-
public static daysPerMonth = new Map<number, number>();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Format Date to YYYY-MM-DD
|
|
14
|
-
public static formatDate(date: Date, language) {
|
|
15
|
-
const mm = date.getMonth() + 1;
|
|
16
|
-
const dd = date.getDate();
|
|
17
|
-
|
|
18
|
-
if (language && 'fr' === language) {
|
|
19
|
-
return [(dd > 9 ? '' : '0') + dd,
|
|
20
|
-
(mm > 9 ? '' : '0') + mm,
|
|
21
|
-
date.getFullYear()
|
|
22
|
-
].join('/');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return [date.getFullYear(),
|
|
26
|
-
(mm > 9 ? '' : '0') + mm,
|
|
27
|
-
(dd > 9 ? '' : '0') + dd
|
|
28
|
-
].join('-');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// convert a string formatted "YYYY-MM-DD" into a date object
|
|
32
|
-
public static fromStringToDate(stringdate: string): Date {
|
|
33
|
-
const parts = stringdate.split('-');
|
|
34
|
-
const month = parts[1].toString();
|
|
35
|
-
const yearNumber = Number(parts[0]);
|
|
36
|
-
let monthNumber = 0;
|
|
37
|
-
if (month[0] === '0') {
|
|
38
|
-
monthNumber = +month[1];
|
|
39
|
-
} else {
|
|
40
|
-
monthNumber = +parts[1];
|
|
41
|
-
}
|
|
42
|
-
const numberOfDays = Number(parts[2]);
|
|
43
|
-
return new Date(yearNumber, monthNumber - 1, numberOfDays);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// convert a string formatted "YYYY-MM-DD" into a date object
|
|
47
|
-
public static fromStringToDateSecond(stringdate: string): Date {
|
|
48
|
-
const parts = stringdate.split(',');
|
|
49
|
-
const month = parts[1].toString();
|
|
50
|
-
const yearNumber = Number(parts[0]);
|
|
51
|
-
let monthNumber = 0;
|
|
52
|
-
if (month[0] === '0') {
|
|
53
|
-
monthNumber = +month[1];
|
|
54
|
-
} else {
|
|
55
|
-
monthNumber = +parts[1];
|
|
56
|
-
}
|
|
57
|
-
const numberOfDays = Number(parts[2]);
|
|
58
|
-
return new Date(yearNumber, monthNumber - 1, numberOfDays);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public static periodBetweenDates(startDate: string, endDate: string): PeriodModel {
|
|
62
|
-
DateUtil.initDaysPerMonths();
|
|
63
|
-
const a = new Date(startDate);
|
|
64
|
-
const b = new Date(endDate);
|
|
65
|
-
let numberOfDays = 0;
|
|
66
|
-
let numberOfYears = b.getFullYear() - a.getFullYear();
|
|
67
|
-
let numberOfMonths = (b.getMonth() - a.getMonth() + 12) % 12;
|
|
68
|
-
if (a.getMonth() === b.getMonth() && a.getTime() > b.getTime()) {
|
|
69
|
-
numberOfYears--;
|
|
70
|
-
}
|
|
71
|
-
if (a.getMonth() > b.getMonth()) {
|
|
72
|
-
numberOfYears--;
|
|
73
|
-
}
|
|
74
|
-
if (a.getDate() > b.getDate()) {
|
|
75
|
-
numberOfMonths--;
|
|
76
|
-
if (numberOfMonths < 0) {
|
|
77
|
-
numberOfMonths = 11;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (b.getDate() < a.getDate()) {
|
|
81
|
-
let numberOfDaysPerMonth = DateUtil.daysPerMonth.get(a.getMonth());
|
|
82
|
-
if (a.getMonth() === 1 && DateUtil.checkLeapYear(a.getFullYear())) {
|
|
83
|
-
numberOfDaysPerMonth++;
|
|
84
|
-
}
|
|
85
|
-
numberOfDays = numberOfDaysPerMonth - a.getDate() + b.getDate();
|
|
86
|
-
} else {
|
|
87
|
-
numberOfDays = b.getDate() - a.getDate();
|
|
88
|
-
}
|
|
89
|
-
return new PeriodModel(numberOfYears, numberOfMonths, numberOfDays);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
public static checkLeapYear(year: number): boolean {
|
|
93
|
-
if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
public static initDaysPerMonths() {
|
|
100
|
-
DateUtil.daysPerMonth.set(0, 31);
|
|
101
|
-
DateUtil.daysPerMonth.set(1, 28);
|
|
102
|
-
DateUtil.daysPerMonth.set(2, 31);
|
|
103
|
-
DateUtil.daysPerMonth.set(3, 30);
|
|
104
|
-
DateUtil.daysPerMonth.set(4, 31);
|
|
105
|
-
DateUtil.daysPerMonth.set(5, 30);
|
|
106
|
-
DateUtil.daysPerMonth.set(6, 31);
|
|
107
|
-
DateUtil.daysPerMonth.set(7, 31);
|
|
108
|
-
DateUtil.daysPerMonth.set(8, 30);
|
|
109
|
-
DateUtil.daysPerMonth.set(9, 31);
|
|
110
|
-
DateUtil.daysPerMonth.set(10, 30);
|
|
111
|
-
DateUtil.daysPerMonth.set(11, 31);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// returns 0 if the 2 dates are equal, 1 if the first date is greater than the second one or -1 when it's the opposite
|
|
115
|
-
public static compareLocalDates(first: Date, second: Date): number {
|
|
116
|
-
if (first.getFullYear() > second.getFullYear()) {
|
|
117
|
-
return 1;
|
|
118
|
-
} else if (first.getFullYear() < second.getFullYear()) {
|
|
119
|
-
return -1;
|
|
120
|
-
} else {
|
|
121
|
-
if (first.getMonth() > second.getMonth()) {
|
|
122
|
-
return 1;
|
|
123
|
-
} else if (first.getMonth() < second.getMonth()) {
|
|
124
|
-
return -1;
|
|
125
|
-
} else {
|
|
126
|
-
if (first.getDate() > second.getDate()) {
|
|
127
|
-
return 1;
|
|
128
|
-
} else if (first.getDate() < second.getDate()) {
|
|
129
|
-
return -1;
|
|
130
|
-
} else {
|
|
131
|
-
return 0;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* From moment-precise-range plugin */
|
|
138
|
-
public static preciseDiff(d1, d2): PeriodModel {
|
|
139
|
-
// let m1 = moment(d1);
|
|
140
|
-
// let m2 = moment(d2);
|
|
141
|
-
//
|
|
142
|
-
// if (m1.isSame(m2)) {
|
|
143
|
-
// return new PeriodModel(0, 0, 0);
|
|
144
|
-
// }
|
|
145
|
-
// if (m1.isAfter(m2)) {
|
|
146
|
-
// const tmp = m1;
|
|
147
|
-
// m1 = m2;
|
|
148
|
-
// m2 = tmp;
|
|
149
|
-
// }
|
|
150
|
-
//
|
|
151
|
-
// let yDiff = m2.year() - m1.year();
|
|
152
|
-
// let mDiff = m2.month() - m1.month();
|
|
153
|
-
// let dDiff = m2.date() - m1.date();
|
|
154
|
-
// let hourDiff = m2.hour() - m1.hour();
|
|
155
|
-
// let minDiff = m2.minute() - m1.minute();
|
|
156
|
-
// let secDiff = m2.second() - m1.second();
|
|
157
|
-
//
|
|
158
|
-
// if (secDiff < 0) {
|
|
159
|
-
// secDiff = 60 + secDiff;
|
|
160
|
-
// minDiff--;
|
|
161
|
-
// }
|
|
162
|
-
// if (minDiff < 0) {
|
|
163
|
-
// minDiff = 60 + minDiff;
|
|
164
|
-
// hourDiff--;
|
|
165
|
-
// }
|
|
166
|
-
// if (hourDiff < 0) {
|
|
167
|
-
// hourDiff = 24 + hourDiff;
|
|
168
|
-
// dDiff--;
|
|
169
|
-
// }
|
|
170
|
-
// if (dDiff < 0) {
|
|
171
|
-
// const daysInLastFullMonth = moment(m2.year() + '-' + (m2.month() + 1), 'YYYY-MM')
|
|
172
|
-
// .subtract(1, 'months').daysInMonth();
|
|
173
|
-
// if (daysInLastFullMonth < m1.date()) { // 31/01 -> 2/03
|
|
174
|
-
// dDiff = daysInLastFullMonth + dDiff + (m1.date() - daysInLastFullMonth);
|
|
175
|
-
// } else {
|
|
176
|
-
// dDiff = daysInLastFullMonth + dDiff;
|
|
177
|
-
// }
|
|
178
|
-
// mDiff--;
|
|
179
|
-
// }
|
|
180
|
-
// if (mDiff < 0) {
|
|
181
|
-
// mDiff = 12 + mDiff;
|
|
182
|
-
// yDiff--;
|
|
183
|
-
// }
|
|
184
|
-
//
|
|
185
|
-
// const result = [];
|
|
186
|
-
//
|
|
187
|
-
// moment.relativeTimeThreshold('s', 60);
|
|
188
|
-
// moment.relativeTimeThreshold('m', 60);
|
|
189
|
-
// moment.relativeTimeThreshold('h', 23);
|
|
190
|
-
// moment.relativeTimeThreshold('dd', 28);
|
|
191
|
-
// moment.relativeTimeThreshold('dm', 45);
|
|
192
|
-
// moment.relativeTimeThreshold('dy', 365);
|
|
193
|
-
//
|
|
194
|
-
// if (yDiff) {
|
|
195
|
-
// result.push(moment.duration(yDiff, 'year').humanize());
|
|
196
|
-
// }
|
|
197
|
-
// if (mDiff) {
|
|
198
|
-
// result.push(moment.duration(mDiff, 'month').humanize());
|
|
199
|
-
// }
|
|
200
|
-
// if (dDiff) {
|
|
201
|
-
// result.push(moment.duration(dDiff, 'day').humanize());
|
|
202
|
-
// }
|
|
203
|
-
// if (hourDiff) {
|
|
204
|
-
// result.push(moment.duration(hourDiff, 'hour').humanize());
|
|
205
|
-
// }
|
|
206
|
-
// if (minDiff) {
|
|
207
|
-
// result.push(moment.duration(minDiff, 'minute').humanize());
|
|
208
|
-
// }
|
|
209
|
-
// if (secDiff) {
|
|
210
|
-
// result.push(moment.duration(secDiff, 'second').humanize());
|
|
211
|
-
// }
|
|
212
|
-
//
|
|
213
|
-
// const period = new PeriodModel(0, 0, 0);
|
|
214
|
-
// period.years = moment.duration(yDiff, 'year').asYears();
|
|
215
|
-
// period.months = moment.duration(mDiff, 'month').asMonths();
|
|
216
|
-
// period.days = moment.duration(dDiff, 'day').asDays();
|
|
217
|
-
//
|
|
218
|
-
const period = new PeriodModel(0, 0, 0);
|
|
219
|
-
return period;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function Theme() {
|
|
2
|
-
return (target: any, key: string) => {
|
|
3
|
-
// Check if the data exist in the local storage
|
|
4
|
-
function exist(dataKey: string) {
|
|
5
|
-
return localStorage.hasOwnProperty(dataKey);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// Get data from local storage
|
|
9
|
-
function get(theme: string) {
|
|
10
|
-
return exist(theme) ? JSON.parse(localStorage.getItem(theme)) : null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Set data in the local storage and return it
|
|
14
|
-
function setDefault(theme: any): string {
|
|
15
|
-
localStorage.setItem('newTheme', JSON.stringify(theme));
|
|
16
|
-
return theme;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(target, key, {
|
|
20
|
-
configurable: false,
|
|
21
|
-
get: () => (exist('newTheme') ? get('newTheme') : setDefault('light'))
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { JwtHelper } from '../services/jwt-security/jwt.helpher';
|
|
2
|
-
|
|
3
|
-
export function User() {
|
|
4
|
-
|
|
5
|
-
const jwtHelper: JwtHelper = new JwtHelper();
|
|
6
|
-
return (target: any, key: string) => {
|
|
7
|
-
|
|
8
|
-
// Check if the data exist in the local storage
|
|
9
|
-
function exist(dataKey: string) {
|
|
10
|
-
return sessionStorage.hasOwnProperty(dataKey);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Get data from local storage
|
|
14
|
-
function get(user: string) {
|
|
15
|
-
return exist(user) ? jwtHelper.decodeToken(sessionStorage.getItem(user)) : null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(target, key, {
|
|
19
|
-
configurable: false,
|
|
20
|
-
get: () => {
|
|
21
|
-
const user = get('authToken');
|
|
22
|
-
if (user && user.superAdmin && exist('authTokenSecondary')) {
|
|
23
|
-
return Object.assign({secondary: true}, get('authTokenSecondary'));
|
|
24
|
-
}
|
|
25
|
-
return user;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
}
|