ngx-techlify-core 15.0.2 → 16.0.0
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/access-control-config/access-control-config-form/access-control-config-form.component.mjs +135 -0
- package/{esm2020 → esm2022}/lib/access-control-config/access-control-config-routing.module.mjs +5 -5
- package/esm2022/lib/access-control-config/access-control-config.component.mjs +137 -0
- package/esm2022/lib/access-control-config/access-control-config.model.mjs +34 -0
- package/{esm2020 → esm2022}/lib/access-control-config/access-control-config.module.mjs +24 -24
- package/esm2022/lib/access-control-config/access-control-config.service.mjs +32 -0
- package/esm2022/lib/action-popup/action-popup.component.mjs +36 -0
- package/{esm2020 → esm2022}/lib/action-popup/action-popup.model.mjs +4 -1
- package/{esm2020 → esm2022}/lib/action-popup/action-popup.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-for-model/audit-log-for-model-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-for-model/audit-log-for-model.component.mjs +54 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-for-model/audit-log-for-model.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list/audit-log-list-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-list/audit-log-list.component.mjs +146 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list/audit-log-list.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list-filter/audit-log-list-filter-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.mjs +79 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view/audit-log-view-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-view/audit-log-view.component.mjs +55 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view/audit-log-view.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view-model/audit-log-view-model-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-view-model/audit-log-view-model.component.mjs +60 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view-model/audit-log-view-model.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/audit-log/audit-log.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/audit-log/audit-logs-view-model/audit-logs-view-model-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.mjs +40 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-logs-view-model/audit-logs-view-model.module.mjs +11 -11
- package/esm2022/lib/base-model/techlify-form-component.class.mjs +52 -0
- package/esm2022/lib/base-model/techlify-listing-component.class.mjs +64 -0
- package/esm2022/lib/base-model/techlify-service.class.mjs +69 -0
- package/{esm2020 → esm2022}/lib/change-password/change-password-routing.module.mjs +5 -5
- package/esm2022/lib/change-password/change-password.component.mjs +96 -0
- package/{esm2020 → esm2022}/lib/change-password/change-password.module.mjs +19 -19
- package/esm2022/lib/column-selector/column-selector/column-selector.component.mjs +36 -0
- package/{esm2020 → esm2022}/lib/column-selector/column-selector.module.mjs +13 -13
- package/esm2022/lib/core/alert.service.mjs +39 -0
- package/esm2022/lib/core/api-prefix.interceptor.mjs +27 -0
- package/esm2022/lib/core/authentication.guard.mjs +37 -0
- package/esm2022/lib/core/authentication.service.mjs +65 -0
- package/esm2022/lib/core/cache.interceptor.mjs +59 -0
- package/esm2022/lib/core/config.service.mjs +46 -0
- package/esm2022/lib/core/core.module.mjs +63 -0
- package/esm2022/lib/core/credentials.service.mjs +80 -0
- package/esm2022/lib/core/dataManager.service.mjs +120 -0
- package/esm2022/lib/core/error-handler.interceptor.mjs +50 -0
- package/esm2022/lib/core/error-handler.service.mjs +57 -0
- package/esm2022/lib/core/filter.service.mjs +39 -0
- package/{esm2020 → esm2022}/lib/core/form-validator.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/core/header.interceptor.mjs +4 -4
- package/esm2022/lib/core/http-cache.service.mjs +110 -0
- package/esm2022/lib/core/http.service.mjs +89 -0
- package/esm2022/lib/core/logger.service.mjs +101 -0
- package/{esm2020 → esm2022}/lib/core/route-reusable-strategy.mjs +4 -4
- package/esm2022/lib/core/snack/snack.component.mjs +35 -0
- package/{esm2020 → esm2022}/lib/core/snack/snack.module.mjs +11 -11
- package/esm2022/lib/core/storage.service.mjs +38 -0
- package/esm2022/lib/core/techlify-config.model.mjs +30 -0
- package/esm2022/lib/core/token.interceptor.mjs +29 -0
- package/esm2022/lib/data-table/data-table.component.mjs +211 -0
- package/esm2022/lib/data-table/data-table.model.mjs +46 -0
- package/{esm2020 → esm2022}/lib/data-table/data-table.module.mjs +11 -11
- package/esm2022/lib/document-viewer/document-viewer.component.mjs +69 -0
- package/{esm2020 → esm2022}/lib/document-viewer/document-viewer.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/document-viewer/viewer-config.model.mjs +4 -1
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-for-user/email-subscription-for-user-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.mjs +77 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.mjs +118 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.mjs +164 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.mjs +114 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.mjs +169 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.mjs +54 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription.module.mjs +7 -7
- package/esm2022/lib/entity-files/entity-file-form/entity-file-form.component.mjs +174 -0
- package/esm2022/lib/entity-files/entity-file.service.mjs +37 -0
- package/esm2022/lib/entity-files/entity-files-view-all.component.mjs +364 -0
- package/{esm2020 → esm2022}/lib/entity-files/entity-files-view-all.module.mjs +29 -29
- package/esm2022/lib/export-excel/export-excel-button/export-excel-button.component.mjs +31 -0
- package/{esm2020 → esm2022}/lib/export-excel/export-excel.module.mjs +7 -7
- package/esm2022/lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop-uploader.component.mjs +92 -0
- package/{esm2020 → esm2022}/lib/file-dragdrop-uploader/file-dragdrop-uploader.module.mjs +13 -13
- package/esm2022/lib/file-dropper/file-dropper.component.mjs +129 -0
- package/esm2022/lib/file-dropper/file-dropper.model.mjs +11 -0
- package/{esm2020 → esm2022}/lib/file-dropper/file-dropper.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/forgot-password/forgot-password-routing.module.mjs +5 -5
- package/esm2022/lib/forgot-password/forgot-password.component.mjs +81 -0
- package/{esm2020 → esm2022}/lib/forgot-password/forgot-password.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/import-csv/data-import/data-import.component.mjs +5 -4
- package/esm2022/lib/import-csv/failed-items-list/failed-items-list.component.mjs +38 -0
- package/esm2022/lib/import-csv/field-mapping/field-mapping.component.mjs +160 -0
- package/esm2022/lib/import-csv/import-csv.component.mjs +207 -0
- package/{esm2020 → esm2022}/lib/import-csv/import-csv.module.mjs +28 -28
- package/esm2022/lib/import-csv/import-history-list/import-history-list.component.mjs +75 -0
- package/esm2022/lib/import-csv/import-success/import-success.component.mjs +26 -0
- package/{esm2020 → esm2022}/lib/ip-address-selector/ip-address-selector.module.mjs +17 -17
- package/esm2022/lib/ip-address-selector/ip-range-selector/ip-range-selector.component.mjs +108 -0
- package/esm2022/lib/loader/loader.component.mjs +23 -0
- package/{esm2020 → esm2022}/lib/loader/loader.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/login/login-routing.module.mjs +5 -5
- package/esm2022/lib/login/login.component.mjs +170 -0
- package/{esm2020 → esm2022}/lib/login/login.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/login-history-for-user/login-history-for-user-routing.module.mjs +5 -5
- package/esm2022/lib/login-history-for-user/login-history-for-user.component.mjs +96 -0
- package/{esm2020 → esm2022}/lib/login-history-for-user/login-history-for-user.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/material.module.mjs +53 -53
- package/{esm2020 → esm2022}/lib/ngx-techlify-users/ngx-techlify-users-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/ngx-techlify-users/ngx-techlify-users.module.mjs +7 -7
- package/esm2022/lib/note/comment-form/comment-form.component.mjs +82 -0
- package/esm2022/lib/note/note-form/note-form.component.mjs +88 -0
- package/esm2022/lib/note/note-list/note-list.component.mjs +153 -0
- package/{esm2020 → esm2022}/lib/note/note.module.mjs +19 -19
- package/esm2022/lib/note/note.service.mjs +30 -0
- package/esm2022/lib/number-input-button/number-input-button/number-input-button.component.mjs +104 -0
- package/{esm2020 → esm2022}/lib/number-input-button/number-input-button.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/password-requirement-check/password-check.service.mjs +4 -4
- package/esm2022/lib/password-requirement-check/password-requirement-check/password-requirement-check.component.mjs +50 -0
- package/{esm2020 → esm2022}/lib/password-requirement-check/password-requirement-check.module.mjs +5 -5
- package/esm2022/lib/profile/profile-edit.component.mjs +84 -0
- package/{esm2020 → esm2022}/lib/profile/profile-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/profile/profile.module.mjs +11 -11
- package/esm2022/lib/read-more/read-more.component.mjs +44 -0
- package/{esm2020 → esm2022}/lib/read-more/read-more.module.mjs +9 -9
- package/esm2022/lib/request-helper/request-helper.service.mjs +107 -0
- package/esm2022/lib/restrictors/restrictor-level-selector/restrictor-level-selector/restrictor-level-selector.component.mjs +93 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictor-level-selector/restrictor-level-selector.module.mjs +11 -11
- package/esm2022/lib/restrictors/restrictor-level-selector/restrictor-level.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictor-status-selector/restrictor-status-selector/restrictor-status-selector.component.mjs +93 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictor-status-selector/restrictor-status-selector.module.mjs +9 -9
- package/esm2022/lib/restrictors/restrictor-status-selector/restrictor-status.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictor-type-selector/restrictor-type-selector/restrictor-type-selector.component.mjs +94 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictor-type-selector/restrictor-type-selector.module.mjs +11 -11
- package/esm2022/lib/restrictors/restrictor-type-selector/restrictor-type.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictor.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictors-form/restrictors-form.component.mjs +111 -0
- package/esm2022/lib/restrictors/restrictors-form-page/restrictors-form-page.component.mjs +49 -0
- package/esm2022/lib/restrictors/restrictors-list-page/restrictors-list-page.component.mjs +152 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictors-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/restrictors/restrictors.module.mjs +43 -43
- package/{esm2020 → esm2022}/lib/role/permission/permission.model.mjs +4 -1
- package/{esm2020 → esm2022}/lib/role/permission/permission.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/role/permission/permission.routes.mjs +5 -5
- package/esm2022/lib/role/permission/permissions-management.component.mjs +127 -0
- package/esm2022/lib/role/role-form.component.mjs +109 -0
- package/esm2022/lib/role/role-view/role-view.component.mjs +44 -0
- package/esm2022/lib/role/role.model.mjs +66 -0
- package/{esm2020 → esm2022}/lib/role/role.module.mjs +21 -21
- package/{esm2020 → esm2022}/lib/role/role.routes.mjs +5 -5
- package/esm2022/lib/role/role.service.mjs +27 -0
- package/esm2022/lib/role/roles-view-all.component.mjs +140 -0
- package/esm2022/lib/searchable-selector/searchable-selector.component.mjs +365 -0
- package/{esm2020 → esm2022}/lib/searchable-selector/searchable-selector.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/signup/signup-routing.module.mjs +5 -5
- package/esm2022/lib/signup/signup.component.mjs +87 -0
- package/{esm2020 → esm2022}/lib/signup/signup.module.mjs +11 -11
- package/esm2022/lib/techlify-company-switcher/techlify-company-switcher/techlify-company-switcher.component.mjs +73 -0
- package/{esm2020 → esm2022}/lib/techlify-company-switcher/techlify-company-switcher.module.mjs +9 -9
- package/esm2022/lib/techlify-feature/on-off-switch/on-off-switch.component.mjs +27 -0
- package/esm2022/lib/techlify-feature/techlify-feature-enabled.directive.mjs +79 -0
- package/esm2022/lib/techlify-feature/techlify-feature-listing.component.mjs +179 -0
- package/{esm2020 → esm2022}/lib/techlify-feature/techlify-feature.module.mjs +17 -17
- package/esm2022/lib/techlify-feature/techlify-feature.service.mjs +27 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.mjs +109 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.component.mjs +90 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard.component.mjs +180 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form.component.mjs +131 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list.component.mjs +186 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.component.mjs +72 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber.module.mjs +19 -19
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscription-entity.model.mjs +6 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form.component.mjs +111 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list.component.mjs +171 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-user-status.model.mjs +3 -3
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification.module.mjs +7 -7
- package/esm2022/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.mjs +24 -0
- package/esm2022/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.mjs +301 -0
- package/{esm2020 → esm2022}/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.module.mjs +13 -13
- package/esm2022/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.mjs +189 -0
- package/{esm2020 → esm2022}/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.module.mjs +17 -17
- package/esm2022/lib/techlify-update/techlify-update-form/techlify-update-form.component.mjs +124 -0
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-form/techlify-update-form.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-history/techlify-update-history-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-update/techlify-update-history/techlify-update-history.component.mjs +151 -0
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-history/techlify-update-history.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update.module.mjs +21 -21
- package/esm2022/lib/techlify-update/techlify-update.service.mjs +42 -0
- package/esm2022/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.mjs +169 -0
- package/esm2022/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.component.mjs +63 -0
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.module.mjs +11 -11
- package/esm2022/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.mjs +85 -0
- package/esm2022/lib/techlify-update/update-notifier/update-notifier.component.mjs +57 -0
- package/{esm2020 → esm2022}/lib/techlify-update/update-notifier/update-notifier.module.mjs +13 -13
- package/esm2022/lib/techlify-update/update-view/update-view.component.mjs +43 -0
- package/{esm2020 → esm2022}/lib/techlify-update/update-view/update-view.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/timeline-filter/timeline-filter-routing.module.mjs +5 -5
- package/esm2022/lib/timeline-filter/timeline-filter.component.mjs +253 -0
- package/{esm2020 → esm2022}/lib/timeline-filter/timeline-filter.module.mjs +25 -25
- package/esm2022/lib/timeline-filter/timeline.model.mjs +18 -0
- package/esm2022/lib/user/current-user.service.mjs +155 -0
- package/esm2022/lib/user/user-enable-button-component/user-enable-button.component.mjs +65 -0
- package/esm2022/lib/user/user-explore.component.mjs +55 -0
- package/esm2022/lib/user/user-form.component.mjs +234 -0
- package/esm2022/lib/user/user-view.component.mjs +76 -0
- package/esm2022/lib/user/user.model.mjs +49 -0
- package/{esm2020 → esm2022}/lib/user/user.module.mjs +42 -42
- package/{esm2020 → esm2022}/lib/user/user.routes.mjs +5 -5
- package/esm2022/lib/user/user.service.mjs +42 -0
- package/esm2022/lib/user/users-view-all.component.mjs +226 -0
- package/esm2022/lib/user-config/user-config.model.mjs +81 -0
- package/esm2022/lib/user-config/user-config.service.mjs +68 -0
- package/esm2022/lib/user-selector/user-data.service.mjs +37 -0
- package/esm2022/lib/user-selector/user-selector.component.mjs +100 -0
- package/{esm2020 → esm2022}/lib/user-selector/user-selector.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/utility/date-utils.service.mjs +4 -4
- package/esm2022/lib/utility/num-items-selector.component.mjs +33 -0
- package/esm2022/lib/utility/number-selector.component.mjs +46 -0
- package/{esm2020 → esm2022}/lib/utility/utility.module.mjs +7 -7
- package/{fesm2020 → fesm2022}/ngx-techlify-core.mjs +3117 -2394
- package/{fesm2020 → fesm2022}/ngx-techlify-core.mjs.map +1 -1
- package/lib/audit-log/audit-log-for-model/audit-log-for-model.component.d.ts +1 -1
- package/lib/audit-log/audit-log-list/audit-log-list.component.d.ts +1 -1
- package/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.d.ts +1 -1
- package/lib/column-selector/column-selector/column-selector.component.d.ts +1 -1
- package/lib/data-table/data-table.component.d.ts +1 -1
- package/lib/document-viewer/document-viewer.component.d.ts +1 -1
- package/lib/entity-files/entity-files-view-all.component.d.ts +1 -1
- package/lib/export-excel/export-excel-button/export-excel-button.component.d.ts +1 -1
- package/lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop-uploader.component.d.ts +1 -1
- package/lib/file-dropper/file-dropper.component.d.ts +1 -1
- package/lib/import-csv/data-import/data-import.component.d.ts +1 -1
- package/lib/import-csv/failed-items-list/failed-items-list.component.d.ts +1 -1
- package/lib/import-csv/field-mapping/field-mapping.component.d.ts +1 -1
- package/lib/import-csv/import-csv.component.d.ts +1 -1
- package/lib/import-csv/import-history-list/import-history-list.component.d.ts +1 -1
- package/lib/import-csv/import-success/import-success.component.d.ts +1 -1
- package/lib/ip-address-selector/ip-range-selector/ip-range-selector.component.d.ts +1 -1
- package/lib/loader/loader.component.d.ts +1 -1
- package/lib/login-history-for-user/login-history-for-user.component.d.ts +1 -1
- package/lib/note/comment-form/comment-form.component.d.ts +1 -1
- package/lib/note/note-list/note-list.component.d.ts +1 -1
- package/lib/number-input-button/number-input-button/number-input-button.component.d.ts +1 -1
- package/lib/password-requirement-check/password-requirement-check/password-requirement-check.component.d.ts +1 -1
- package/lib/read-more/read-more.component.d.ts +1 -1
- package/lib/restrictors/restrictor-level-selector/restrictor-level-selector/restrictor-level-selector.component.d.ts +1 -1
- package/lib/restrictors/restrictor-status-selector/restrictor-status-selector/restrictor-status-selector.component.d.ts +1 -1
- package/lib/restrictors/restrictor-type-selector/restrictor-type-selector/restrictor-type-selector.component.d.ts +1 -1
- package/lib/restrictors/restrictors-form/restrictors-form.component.d.ts +1 -1
- package/lib/role/permission/permissions-management.component.d.ts +1 -1
- package/lib/role/roles-view-all.component.d.ts +1 -1
- package/lib/searchable-selector/searchable-selector.component.d.ts +1 -1
- package/lib/techlify-feature/on-off-switch/on-off-switch.component.d.ts +1 -1
- package/lib/techlify-feature/techlify-feature-enabled.directive.d.ts +1 -1
- package/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.component.d.ts +1 -1
- package/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.component.d.ts +1 -1
- package/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.d.ts +1 -1
- package/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.d.ts +1 -1
- package/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.component.d.ts +1 -1
- package/lib/techlify-update/update-notifier/update-notifier.component.d.ts +1 -1
- package/lib/timeline-filter/timeline-filter.component.d.ts +1 -1
- package/lib/user/user-enable-button-component/user-enable-button.component.d.ts +1 -1
- package/lib/user/user-form.component.d.ts +1 -1
- package/lib/user/users-view-all.component.d.ts +1 -1
- package/lib/user-selector/user-selector.component.d.ts +1 -1
- package/lib/utility/num-items-selector.component.d.ts +1 -1
- package/lib/utility/number-selector.component.d.ts +1 -1
- package/package.json +19 -25
- package/esm2020/lib/access-control-config/access-control-config-form/access-control-config-form.component.mjs +0 -127
- package/esm2020/lib/access-control-config/access-control-config.component.mjs +0 -131
- package/esm2020/lib/access-control-config/access-control-config.model.mjs +0 -21
- package/esm2020/lib/access-control-config/access-control-config.service.mjs +0 -31
- package/esm2020/lib/action-popup/action-popup.component.mjs +0 -34
- package/esm2020/lib/audit-log/audit-log-for-model/audit-log-for-model.component.mjs +0 -51
- package/esm2020/lib/audit-log/audit-log-list/audit-log-list.component.mjs +0 -139
- package/esm2020/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.mjs +0 -74
- package/esm2020/lib/audit-log/audit-log-view/audit-log-view.component.mjs +0 -51
- package/esm2020/lib/audit-log/audit-log-view-model/audit-log-view-model.component.mjs +0 -56
- package/esm2020/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.mjs +0 -37
- package/esm2020/lib/base-model/techlify-form-component.class.mjs +0 -49
- package/esm2020/lib/base-model/techlify-listing-component.class.mjs +0 -65
- package/esm2020/lib/base-model/techlify-service.class.mjs +0 -68
- package/esm2020/lib/change-password/change-password.component.mjs +0 -87
- package/esm2020/lib/column-selector/column-selector/column-selector.component.mjs +0 -37
- package/esm2020/lib/core/alert.service.mjs +0 -38
- package/esm2020/lib/core/api-prefix.interceptor.mjs +0 -26
- package/esm2020/lib/core/authentication.guard.mjs +0 -35
- package/esm2020/lib/core/authentication.service.mjs +0 -62
- package/esm2020/lib/core/cache.interceptor.mjs +0 -58
- package/esm2020/lib/core/config.service.mjs +0 -45
- package/esm2020/lib/core/core.module.mjs +0 -63
- package/esm2020/lib/core/credentials.service.mjs +0 -79
- package/esm2020/lib/core/dataManager.service.mjs +0 -119
- package/esm2020/lib/core/error-handler.interceptor.mjs +0 -48
- package/esm2020/lib/core/error-handler.service.mjs +0 -55
- package/esm2020/lib/core/filter.service.mjs +0 -37
- package/esm2020/lib/core/http-cache.service.mjs +0 -107
- package/esm2020/lib/core/http.service.mjs +0 -84
- package/esm2020/lib/core/logger.service.mjs +0 -100
- package/esm2020/lib/core/snack/snack.component.mjs +0 -33
- package/esm2020/lib/core/storage.service.mjs +0 -38
- package/esm2020/lib/core/techlify-config.model.mjs +0 -28
- package/esm2020/lib/core/token.interceptor.mjs +0 -28
- package/esm2020/lib/data-table/data-table.component.mjs +0 -204
- package/esm2020/lib/data-table/data-table.model.mjs +0 -11
- package/esm2020/lib/document-viewer/document-viewer.component.mjs +0 -65
- package/esm2020/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.mjs +0 -76
- package/esm2020/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.mjs +0 -105
- package/esm2020/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.mjs +0 -161
- package/esm2020/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.mjs +0 -101
- package/esm2020/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.mjs +0 -165
- package/esm2020/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.mjs +0 -52
- package/esm2020/lib/entity-files/entity-file-form/entity-file-form.component.mjs +0 -161
- package/esm2020/lib/entity-files/entity-file.service.mjs +0 -36
- package/esm2020/lib/entity-files/entity-files-view-all.component.mjs +0 -346
- package/esm2020/lib/export-excel/export-excel-button/export-excel-button.component.mjs +0 -32
- package/esm2020/lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop-uploader.component.mjs +0 -90
- package/esm2020/lib/file-dropper/file-dropper.component.mjs +0 -125
- package/esm2020/lib/file-dropper/file-dropper.model.mjs +0 -3
- package/esm2020/lib/forgot-password/forgot-password.component.mjs +0 -69
- package/esm2020/lib/import-csv/failed-items-list/failed-items-list.component.mjs +0 -35
- package/esm2020/lib/import-csv/field-mapping/field-mapping.component.mjs +0 -153
- package/esm2020/lib/import-csv/import-csv.component.mjs +0 -199
- package/esm2020/lib/import-csv/import-history-list/import-history-list.component.mjs +0 -71
- package/esm2020/lib/import-csv/import-success/import-success.component.mjs +0 -24
- package/esm2020/lib/ip-address-selector/ip-range-selector/ip-range-selector.component.mjs +0 -109
- package/esm2020/lib/loader/loader.component.mjs +0 -23
- package/esm2020/lib/login/login.component.mjs +0 -153
- package/esm2020/lib/login-history-for-user/login-history-for-user.component.mjs +0 -92
- package/esm2020/lib/note/comment-form/comment-form.component.mjs +0 -77
- package/esm2020/lib/note/note-form/note-form.component.mjs +0 -79
- package/esm2020/lib/note/note-list/note-list.component.mjs +0 -148
- package/esm2020/lib/note/note.service.mjs +0 -29
- package/esm2020/lib/number-input-button/number-input-button/number-input-button.component.mjs +0 -104
- package/esm2020/lib/password-requirement-check/password-requirement-check/password-requirement-check.component.mjs +0 -47
- package/esm2020/lib/profile/profile-edit.component.mjs +0 -75
- package/esm2020/lib/read-more/read-more.component.mjs +0 -43
- package/esm2020/lib/request-helper/request-helper.service.mjs +0 -105
- package/esm2020/lib/restrictors/restrictor-level-selector/restrictor-level-selector/restrictor-level-selector.component.mjs +0 -91
- package/esm2020/lib/restrictors/restrictor-level-selector/restrictor-level.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictor-status-selector/restrictor-status-selector/restrictor-status-selector.component.mjs +0 -91
- package/esm2020/lib/restrictors/restrictor-status-selector/restrictor-status.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictor-type-selector/restrictor-type-selector/restrictor-type-selector.component.mjs +0 -92
- package/esm2020/lib/restrictors/restrictor-type-selector/restrictor-type.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictor.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictors-form/restrictors-form.component.mjs +0 -102
- package/esm2020/lib/restrictors/restrictors-form-page/restrictors-form-page.component.mjs +0 -44
- package/esm2020/lib/restrictors/restrictors-list-page/restrictors-list-page.component.mjs +0 -143
- package/esm2020/lib/role/permission/permissions-management.component.mjs +0 -114
- package/esm2020/lib/role/role-form.component.mjs +0 -99
- package/esm2020/lib/role/role-view/role-view.component.mjs +0 -39
- package/esm2020/lib/role/role.model.mjs +0 -56
- package/esm2020/lib/role/role.service.mjs +0 -26
- package/esm2020/lib/role/roles-view-all.component.mjs +0 -131
- package/esm2020/lib/searchable-selector/searchable-selector.component.mjs +0 -348
- package/esm2020/lib/signup/signup.component.mjs +0 -78
- package/esm2020/lib/techlify-company-switcher/techlify-company-switcher/techlify-company-switcher.component.mjs +0 -68
- package/esm2020/lib/techlify-feature/on-off-switch/on-off-switch.component.mjs +0 -24
- package/esm2020/lib/techlify-feature/techlify-feature-enabled.directive.mjs +0 -73
- package/esm2020/lib/techlify-feature/techlify-feature-listing.component.mjs +0 -169
- package/esm2020/lib/techlify-feature/techlify-feature.service.mjs +0 -26
- package/esm2020/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.mjs +0 -103
- package/esm2020/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.component.mjs +0 -86
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard.component.mjs +0 -173
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form.component.mjs +0 -117
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list.component.mjs +0 -180
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.component.mjs +0 -69
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscription-entity.model.mjs +0 -6
- package/esm2020/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form.component.mjs +0 -99
- package/esm2020/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list.component.mjs +0 -166
- package/esm2020/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.mjs +0 -15
- package/esm2020/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.mjs +0 -285
- package/esm2020/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.mjs +0 -180
- package/esm2020/lib/techlify-update/techlify-update-form/techlify-update-form.component.mjs +0 -116
- package/esm2020/lib/techlify-update/techlify-update-history/techlify-update-history.component.mjs +0 -145
- package/esm2020/lib/techlify-update/techlify-update.service.mjs +0 -41
- package/esm2020/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.mjs +0 -163
- package/esm2020/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.component.mjs +0 -60
- package/esm2020/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.mjs +0 -77
- package/esm2020/lib/techlify-update/update-notifier/update-notifier.component.mjs +0 -53
- package/esm2020/lib/techlify-update/update-view/update-view.component.mjs +0 -38
- package/esm2020/lib/timeline-filter/timeline-filter.component.mjs +0 -243
- package/esm2020/lib/timeline-filter/timeline.model.mjs +0 -18
- package/esm2020/lib/user/current-user.service.mjs +0 -151
- package/esm2020/lib/user/user-enable-button-component/user-enable-button.component.mjs +0 -59
- package/esm2020/lib/user/user-explore.component.mjs +0 -50
- package/esm2020/lib/user/user-form.component.mjs +0 -219
- package/esm2020/lib/user/user-view.component.mjs +0 -68
- package/esm2020/lib/user/user.model.mjs +0 -30
- package/esm2020/lib/user/user.service.mjs +0 -41
- package/esm2020/lib/user/users-view-all.component.mjs +0 -212
- package/esm2020/lib/user-config/user-config.model.mjs +0 -50
- package/esm2020/lib/user-config/user-config.service.mjs +0 -65
- package/esm2020/lib/user-selector/user-data.service.mjs +0 -35
- package/esm2020/lib/user-selector/user-selector.component.mjs +0 -91
- package/esm2020/lib/utility/num-items-selector.component.mjs +0 -31
- package/esm2020/lib/utility/number-selector.component.mjs +0 -42
- package/fesm2015/ngx-techlify-core.mjs +0 -13476
- package/fesm2015/ngx-techlify-core.mjs.map +0 -1
- /package/{esm2020 → esm2022}/lib/action-popup/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/base-model/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/column-selector/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/core/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/data-table/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/date-validator.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/document-viewer/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-for-user/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/entity-files/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/file-dropper/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/forgot-password/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/import-csv/import-csv-config.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/loader/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/login/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/note/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/number-input-button/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/password-requirement-check/password-check-result.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/profile/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/restrictors/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/role/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/searchable-selector/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/signup/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/techlify-company-switcher/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/techlify-feature/techlify-feature.routing.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/techlify-notifications/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/timeline-filter/calculate-timeline.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/timeline-filter/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user/user-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user-config/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user-selector/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/utility/index.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-techlify-core.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./http.service";
|
|
4
|
+
/**
|
|
5
|
+
* Service that provides a wrapper for retrieving data from the server
|
|
6
|
+
* @deprecated use HttpService Instead
|
|
7
|
+
* @author Joshua Kissoon
|
|
8
|
+
* @since 20170709
|
|
9
|
+
*/
|
|
10
|
+
export class DataManager {
|
|
11
|
+
http;
|
|
12
|
+
constructor(http) {
|
|
13
|
+
this.http = http;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Callback wrapper for the HTTP GET Call
|
|
17
|
+
*
|
|
18
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
19
|
+
*
|
|
20
|
+
* @author Joshua Kissoon
|
|
21
|
+
* @since 20160826
|
|
22
|
+
* @updated 20170711 to add parameters
|
|
23
|
+
*/
|
|
24
|
+
GET(urlq, params = {}) {
|
|
25
|
+
return this.http
|
|
26
|
+
.get(urlq, { params: params })
|
|
27
|
+
.toPromise();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Callback wrapper for the HTTP POST Call
|
|
31
|
+
*
|
|
32
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
33
|
+
* @param object The object containing the POST data to be sent
|
|
34
|
+
*
|
|
35
|
+
* @author Joshua Kissoon
|
|
36
|
+
* @since 20160826
|
|
37
|
+
*/
|
|
38
|
+
POST(urlq, object) {
|
|
39
|
+
if (null == object) {
|
|
40
|
+
object = { "blank": "blank" };
|
|
41
|
+
}
|
|
42
|
+
return this.http
|
|
43
|
+
.post(urlq, object)
|
|
44
|
+
.toPromise();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Callback wrapper for the HTTP POST Call
|
|
48
|
+
*
|
|
49
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
50
|
+
* @param object The object containing the POST data to be sent
|
|
51
|
+
*
|
|
52
|
+
* @author Joshua Kissoon
|
|
53
|
+
* @since 20160826
|
|
54
|
+
*/
|
|
55
|
+
POSTRAW(urlq, object) {
|
|
56
|
+
if (null == object) {
|
|
57
|
+
object = { "blank": "blank" };
|
|
58
|
+
}
|
|
59
|
+
return this.http
|
|
60
|
+
.skipHeader()
|
|
61
|
+
.post(urlq, object)
|
|
62
|
+
.toPromise();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Callback wrapper for the HTTP PUT Call
|
|
66
|
+
*
|
|
67
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
68
|
+
* @param object The object containing the PUT data to be sent
|
|
69
|
+
*
|
|
70
|
+
* @author Joshua Kissoon
|
|
71
|
+
* @since 20160826
|
|
72
|
+
*/
|
|
73
|
+
PUT(urlq, object) {
|
|
74
|
+
if (null == object) {
|
|
75
|
+
object = { "blank": "blank" };
|
|
76
|
+
}
|
|
77
|
+
return this.http
|
|
78
|
+
.put(urlq, object)
|
|
79
|
+
.toPromise();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Callback wrapper for the HTTP PATCH Call
|
|
83
|
+
*
|
|
84
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
85
|
+
* @param object The object containing the PUT data to be sent
|
|
86
|
+
*
|
|
87
|
+
* @author Joshua Kissoon
|
|
88
|
+
* @since 20161107
|
|
89
|
+
*/
|
|
90
|
+
PATCH(urlq, object) {
|
|
91
|
+
if (null == object) {
|
|
92
|
+
object = { "blank": "blank" };
|
|
93
|
+
}
|
|
94
|
+
return this.http
|
|
95
|
+
.patch(urlq, object)
|
|
96
|
+
.toPromise();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Callback wrapper for the HTTP DELETE Call
|
|
100
|
+
*
|
|
101
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
102
|
+
*
|
|
103
|
+
* @author Joshua Kissoon
|
|
104
|
+
* @since 20160826
|
|
105
|
+
*/
|
|
106
|
+
DELETE(urlq) {
|
|
107
|
+
return this.http
|
|
108
|
+
.delete(urlq)
|
|
109
|
+
.toPromise();
|
|
110
|
+
}
|
|
111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataManager, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
112
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataManager, providedIn: 'root' });
|
|
113
|
+
}
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataManager, decorators: [{
|
|
115
|
+
type: Injectable,
|
|
116
|
+
args: [{
|
|
117
|
+
providedIn: 'root'
|
|
118
|
+
}]
|
|
119
|
+
}], ctorParameters: function () { return [{ type: i1.HttpService }]; } });
|
|
120
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YU1hbmFnZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29yZS9kYXR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FsbFxyXG4gICAgICogXHJcbiAgICAgKiBAcGFyYW0gdXJscSBUaGUgcXVlcnkgcGFydCBvZiB0aGUgVVJMIHRvIGJlIHNlbnQgdG8gdGhlIHNlcnZlclxyXG4gICAgICogQHBhcmFtIG9iamVjdCBUaGUgb2JqZWN0IGNvbnRhaW5pbmcgdGhlIFBPU1QgZGF0YSB0byBiZSBzZW50XHJcbiAgICAgKiBcclxuICAgICAqIEBhdXRob3IgSm9zaHVhIEtpc3Nvb25cclxuICAgICAqIEBzaW5jZSAyMDE2MDgyNlxyXG4gICAgICovXHJcbiAgICBQT1NUKHVybHE6IHN0cmluZywgb2JqZWN0OiBhbnkpOiBhbnkge1xyXG4gICAgICAgIGlmIChudWxsID09IG9iamVjdCkge1xyXG4gICAgICAgICAgICBvYmplY3QgPSB7IFwiYmxhbmtcIjogXCJibGFua1wiIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5odHRwXHJcbiAgICAgICAgICAgIC5wb3N0KHVybHEsIG9iamVjdClcclxuICAgICAgICAgICAgLnRvUHJvbWlzZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQ2FsbGJhY2sgd3JhcHBlciBmb3IgdGhlIEhUVFAgUE9TVCBDYWxsXHJcbiAgICAgKiBcclxuICAgICAqIEBwYXJhbSB1cmxxIFRoZSBxdWVyeSBwYXJ0IG9mIHRoZSBVUkwgdG8gYmUgc2VudCB0byB0aGUgc2VydmVyXHJcbiAgICAgKiBAcGFyYW0gb2JqZWN0IFRoZSBvYmplY3QgY29udGFpbmluZyB0aGUgUE9TVCBkYXRhIHRvIGJlIHNlbnRcclxuICAgICAqIFxyXG4gICAgICogQGF1dGhvciBKb3NodWEgS2lzc29vblxyXG4gICAgICogQHNpbmNlIDIwMTYwODI2XHJcbiAgICAgKi9cclxuICAgIFBPU1RSQVcodXJscTogc3RyaW5nLCBvYmplY3Q6IGFueSk6IGFueSB7XHJcbiAgICAgICAgaWYgKG51bGwgPT0gb2JqZWN0KSB7XHJcbiAgICAgICAgICAgIG9iamVjdCA9IHsgXCJibGFua1wiOiBcImJsYW5rXCIgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzLmh0dHBcclxuICAgICAgICAgICAgLnNraXBIZWFkZXIoKVxyXG4gICAgICAgICAgICAucG9zdCh1cmxxLCBvYmplY3QpXHJcbiAgICAgICAgICAgIC50b1Byb21pc2UoKTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBDYWxsYmFjayB3cmFwcGVyIGZvciB0aGUgSFRUUCBQVVQgQ2FsbFxyXG4gICAgICogXHJcbiAgICAgKiBAcGFyYW0gdXJscSBUaGUgcXVlcnkgcGFydCBvZiB0aGUgVVJMIHRvIGJlIHNlbnQgdG8gdGhlIHNlcnZlclxyXG4gICAgICogQHBhcmFtIG9iamVjdCBUaGUgb2JqZWN0IGNvbnRhaW5pbmcgdGhlIFBVVCBkYXRhIHRvIGJlIHNlbnRcclxuICAgICAqIFxyXG4gICAgICogQGF1dGhvciBKb3NodWEgS2lzc29vblxyXG4gICAgICogQHNpbmNlIDIwMTYwODI2XHJcbiAgICAgKi9cclxuICAgIFBVVCh1cmxxOiBzdHJpbmcsIG9iamVjdDogYW55KTogYW55IHtcclxuICAgICAgICBpZiAobnVsbCA9PSBvYmplY3QpIHtcclxuICAgICAgICAgICAgb2JqZWN0ID0geyBcImJsYW5rXCI6IFwiYmxhbmtcIiB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHRoaXMuaHR0cFxyXG4gICAgICAgICAgICAucHV0KHVybHEsIG9iamVjdClcclxuICAgICAgICAgICAgLnRvUHJvbWlzZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQ2FsbGJhY2sgd3JhcHBlciBmb3IgdGhlIEhUVFAgUEFUQ0ggQ2FsbFxyXG4gICAgICogXHJcbiAgICAgKiBAcGFyYW0gdXJscSBUaGUgcXVlcnkgcGFydCBvZiB0aGUgVVJMIHRvIGJlIHNlbnQgdG8gdGhlIHNlcnZlclxyXG4gICAgICogQHBhcmFtIG9iamVjdCBUaGUgb2JqZWN0IGNvbnRhaW5pbmcgdGhlIFBVVCBkYXRhIHRvIGJlIHNlbnRcclxuICAgICAqIFxyXG4gICAgICogQGF1dGhvciBKb3NodWEgS2lzc29vblxyXG4gICAgICogQHNpbmNlIDIwMTYxMTA3XHJcbiAgICAgKi9cclxuICAgIFBBVENIKHVybHE6IHN0cmluZywgb2JqZWN0OiBhbnkpOiBhbnkge1xyXG4gICAgICAgIGlmIChudWxsID09IG9iamVjdCkge1xyXG4gICAgICAgICAgICBvYmplY3QgPSB7IFwiYmxhbmtcIjogXCJibGFua1wiIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5odHRwXHJcbiAgICAgICAgICAgIC5wYXRjaCh1cmxxLCBvYmplY3QpXHJcbiAgICAgICAgICAgIC50b1Byb21pc2UoKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENhbGxiYWNrIHdyYXBwZXIgZm9yIHRoZSBIVFRQIERFTEVURSBDYWxsXHJcbiAgICAgKiBcclxuICAgICAqIEBwYXJhbSB1cmxxIFRoZSBxdWVyeSBwYXJ0IG9mIHRoZSBVUkwgdG8gYmUgc2VudCB0byB0aGUgc2VydmVyXHJcbiAgICAgKiBcclxuICAgICAqIEBhdXRob3IgSm9zaHVhIEtpc3Nvb25cclxuICAgICAqIEBzaW5jZSAyMDE2MDgyNlxyXG4gICAgICovXHJcbiAgICBERUxFVEUodXJscTogc3RyaW5nKTogYW55IHtcclxuICAgICAgICByZXR1cm4gdGhpcy5odHRwXHJcbiAgICAgICAgICAgIC5kZWxldGUodXJscSlcclxuICAgICAgICAgICAgLnRvUHJvbWlzZSgpO1xyXG4gICAgfVxyXG5cclxufSJdfQ==
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { throwError } from 'rxjs';
|
|
3
|
+
import { catchError } from 'rxjs/operators';
|
|
4
|
+
import { Logger } from './logger.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "./config.service";
|
|
7
|
+
import * as i2 from "./error-handler.service";
|
|
8
|
+
const log = new Logger('ErrorHandlerInterceptor');
|
|
9
|
+
/**
|
|
10
|
+
* Adds a default error handler to all requests.
|
|
11
|
+
*/
|
|
12
|
+
export class ErrorHandlerInterceptor {
|
|
13
|
+
configService;
|
|
14
|
+
errorHandler;
|
|
15
|
+
constructor(configService, errorHandler) {
|
|
16
|
+
this.configService = configService;
|
|
17
|
+
this.errorHandler = errorHandler;
|
|
18
|
+
}
|
|
19
|
+
intercept(request, next) {
|
|
20
|
+
return next.handle(request).pipe(catchError(error => this.handleError(error)));
|
|
21
|
+
}
|
|
22
|
+
// Customize the default error handler here if needed
|
|
23
|
+
handleError(error) {
|
|
24
|
+
let errorMessage = '';
|
|
25
|
+
if (error.error instanceof ErrorEvent) {
|
|
26
|
+
// client-side error
|
|
27
|
+
errorMessage = `Client Error: ${this.configService?.getProjectKey()}: ${error.error.message}`;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// server-side error
|
|
31
|
+
errorMessage = `Server Error: ${this.configService?.getProjectKey()}`;
|
|
32
|
+
try {
|
|
33
|
+
this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.log("Unable to handle server error", e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return throwError(error);
|
|
40
|
+
}
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorHandlerInterceptor, deps: [{ token: i1.ConfigService }, { token: i2.ErrorHandlerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
42
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorHandlerInterceptor, providedIn: 'root' });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorHandlerInterceptor, decorators: [{
|
|
45
|
+
type: Injectable,
|
|
46
|
+
args: [{
|
|
47
|
+
providedIn: 'root'
|
|
48
|
+
}]
|
|
49
|
+
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2.ErrorHandlerService }]; } });
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItaGFuZGxlci5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29yZS9lcnJvci1oYW5kbGVyLmludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0MsT0FBTyxFQUFjLFVBQVUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUM5QyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDOzs7O0FBSTFDLE1BQU0sR0FBRyxHQUFHLElBQUksTUFBTSxDQUFDLHlCQUF5QixDQUFDLENBQUM7QUFFbEQ7O0dBRUc7QUFJSCxNQUFNLE9BQU8sdUJBQXVCO0lBRWQ7SUFBc0M7SUFBMUQsWUFBb0IsYUFBNEIsRUFBVSxZQUFpQztRQUF2RSxrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQUFVLGlCQUFZLEdBQVosW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VxuICAgIH1cbiAgICByZXR1cm4gdGhyb3dFcnJvcihlcnJvcik7XG4gIH1cblxufVxuIl19
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Injectable } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./alert.service";
|
|
4
|
+
import * as i2 from "./techlify-config.model";
|
|
5
|
+
/**
|
|
6
|
+
* Service used to handle errors from the request
|
|
7
|
+
*
|
|
8
|
+
* @author Joshua Kissoon
|
|
9
|
+
* @since 20171202
|
|
10
|
+
*/
|
|
11
|
+
export class ErrorHandlerService {
|
|
12
|
+
alerter;
|
|
13
|
+
config;
|
|
14
|
+
constructor(alerter, config) {
|
|
15
|
+
this.alerter = alerter;
|
|
16
|
+
this.config = config;
|
|
17
|
+
}
|
|
18
|
+
handleError(errorResponse, msg = '') {
|
|
19
|
+
// 1 - Create empty array to store errors
|
|
20
|
+
const errors = [];
|
|
21
|
+
// 2 - check if the error object is present in the response
|
|
22
|
+
if (errorResponse?.error) {
|
|
23
|
+
// 3 - Check for Laravel form validation error messages object
|
|
24
|
+
if (errorResponse?.error?.errors) {
|
|
25
|
+
// 4 - For each error property (which is a form field)
|
|
26
|
+
for (const property in errorResponse.error.errors) {
|
|
27
|
+
if (errorResponse.error.errors?.hasOwnProperty(property)) {
|
|
28
|
+
// 5 - Extract it's array of errors
|
|
29
|
+
const propertyErrors = errorResponse?.error?.errors[property];
|
|
30
|
+
// 6 - Push all errors in the array to the errors array
|
|
31
|
+
propertyErrors.forEach(error => errors.push(error));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (errors.length === 0) {
|
|
36
|
+
// 7 - Push the main error message to the array of errors if there is no validation error
|
|
37
|
+
errors.push(errorResponse.error.message ? errorResponse.error.message : errorResponse.error?.error);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var errMessage = errors.length ? errors[0] : msg;
|
|
41
|
+
this.alerter.addAlert("Error: " + errMessage, "warning");
|
|
42
|
+
if (errorResponse.status == 403 && this.config.isLogoutWhileApiGetsFailed) {
|
|
43
|
+
sessionStorage.clear();
|
|
44
|
+
localStorage.clear();
|
|
45
|
+
location.reload();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorHandlerService, deps: [{ token: i1.AlertService }, { token: i2.TechlifyConfig }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorHandlerService, providedIn: 'root' });
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ErrorHandlerService, decorators: [{
|
|
52
|
+
type: Injectable,
|
|
53
|
+
args: [{
|
|
54
|
+
providedIn: 'root'
|
|
55
|
+
}]
|
|
56
|
+
}], ctorParameters: function () { return [{ type: i1.AlertService }, { type: i2.TechlifyConfig }]; } });
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItaGFuZGxlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi9jb3JlL2Vycm9yLWhhbmRsZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7O0FBSTNDOzs7OztHQUtHO0FBSUgsTUFBTSxPQUFPLG1CQUFtQjtJQUVWO0lBQ1Y7SUFEVixZQUFvQixPQUFxQixFQUMvQixNQUFzQjtRQURaLFlBQU8sR0FBUCxPQUFPLENBQWM7U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4iXX0=
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/router";
|
|
4
|
+
export class FilterService {
|
|
5
|
+
router;
|
|
6
|
+
filters;
|
|
7
|
+
constructor(router) {
|
|
8
|
+
this.router = router;
|
|
9
|
+
}
|
|
10
|
+
applyFilterToRoute(url, filter) {
|
|
11
|
+
this.router.navigate([filter], {
|
|
12
|
+
relativeTo: url,
|
|
13
|
+
replaceUrl: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
getFiltersFromRoute(url, filterFormGroup) {
|
|
17
|
+
url.params.subscribe(params => {
|
|
18
|
+
for (var filter in params) {
|
|
19
|
+
if (params[filter]) {
|
|
20
|
+
for (let [key, value] of Object.entries(filterFormGroup)) {
|
|
21
|
+
if (key === filter) {
|
|
22
|
+
filterFormGroup[key] = params[filter];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return filterFormGroup;
|
|
29
|
+
}
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterService, providedIn: 'root' });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterService, decorators: [{
|
|
34
|
+
type: Injectable,
|
|
35
|
+
args: [{
|
|
36
|
+
providedIn: 'root'
|
|
37
|
+
}]
|
|
38
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; } });
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm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KGtleSA9PT0gZmlsdGVyKSB7XG4gICAgICAgICAgICAgICAgZmlsdGVyRm9ybUdyb3VwW2tleV0gPSBwYXJhbXNbZmlsdGVyXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfVxuXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICApO1xuICAgIHJldHVybiBmaWx0ZXJGb3JtR3JvdXA7XG4gIH1cblxufVxuIl19
|
|
@@ -12,13 +12,13 @@ export class FormValidatorService {
|
|
|
12
12
|
const error = Object.keys(formGroup.get(field).errors);
|
|
13
13
|
return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';
|
|
14
14
|
}
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormValidatorService, providedIn: 'root' });
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
FormValidatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormValidatorService, providedIn: 'root' });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormValidatorService, decorators: [{
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormValidatorService, decorators: [{
|
|
19
19
|
type: Injectable,
|
|
20
20
|
args: [{
|
|
21
21
|
providedIn: 'root'
|
|
22
22
|
}]
|
|
23
23
|
}], ctorParameters: function () { return []; } });
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS12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G8gZmluZCBlcnJvciBpbiBmb3JtIGZpZWxkcyovXG4gIGdldEVycm9yTWVzc2FnZShmaWVsZDogc3RyaW5nLCBmb3JtR3JvdXA6IFVudHlwZWRGb3JtR3JvdXAgfCBhbnksIGVycm9yTWVzc2FnZXM6IGFueSwgZXJyb3JGaWVsZD86IHN0cmluZykge1xuICAgIGNvbnN0IGVycm9yID0gT2JqZWN0LmtleXMoZm9ybUdyb3VwLmdldChmaWVsZCkuZXJyb3JzKTtcbiAgICByZXR1cm4gKGVycm9yLmxlbmd0aCA+IDApID8gKGVycm9yTWVzc2FnZXNbZXJyb3JGaWVsZCB8fCBmaWVsZF1bZXJyb3JbMF1dID8gZXJyb3JNZXNzYWdlc1tlcnJvckZpZWxkIHx8IGZpZWxkXVtlcnJvclswXV0gOiAnJykgOiAnJztcbiAgfVxuXG59XG4iXX0=
|
|
@@ -12,13 +12,13 @@ export class HeaderInterceptor {
|
|
|
12
12
|
});
|
|
13
13
|
return next.handle(request);
|
|
14
14
|
}
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderInterceptor, providedIn: 'root' });
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
HeaderInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeaderInterceptor, providedIn: 'root' });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeaderInterceptor, decorators: [{
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderInterceptor, decorators: [{
|
|
19
19
|
type: Injectable,
|
|
20
20
|
args: [{
|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9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbi9odHRwJztcbmltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tICdyeGpzJztcblxuXG4vKipcbiAqIFByZWZpeGVzIGFsbCByZXF1ZXN0cyBub3Qgc3RhcnRpbmcgd2l0aCBgaHR0cFtzXWAgd2l0aCBgZW52aXJvbm1lbnQuc2VydmVyVXJsYC5cbiAqL1xuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgSGVhZGVySW50ZXJjZXB0b3IgaW1wbGVtZW50cyBIdHRwSW50ZXJjZXB0b3Ige1xuXG4gIGludGVyY2VwdChyZXF1ZXN0OiBIdHRwUmVxdWVzdDxhbnk+LCBuZXh0OiBIdHRwSGFuZGxlcik6IE9ic2VydmFibGU8SHR0cEV2ZW50PGFueT4+IHtcbiAgICByZXF1ZXN0ID0gcmVxdWVzdC5jbG9uZSh7XG4gICAgICBzZXRIZWFkZXJzOiB7XG4gICAgICAgICdDb250ZW50LVR5cGUnOiByZXF1ZXN0LmhlYWRlcnMuZ2V0KCdDb250ZW50LVR5cGUnKSB8fCAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIG5leHQuaGFuZGxlKHJlcXVlc3QpO1xuICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Logger } from './logger.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./config.service";
|
|
5
|
+
const log = new Logger('HttpCacheService');
|
|
6
|
+
/**
|
|
7
|
+
* Provides a cache facility for HTTP requests with configurable persistence policy.
|
|
8
|
+
*/
|
|
9
|
+
export class HttpCacheService {
|
|
10
|
+
configService;
|
|
11
|
+
cachedData = {};
|
|
12
|
+
storage;
|
|
13
|
+
cachePersistenceKey;
|
|
14
|
+
constructor(configService) {
|
|
15
|
+
this.configService = configService;
|
|
16
|
+
this.storage = this.configService.getStorage();
|
|
17
|
+
this.cachePersistenceKey = this.configService.getProjectKey() + '_HTTP_CACHE';
|
|
18
|
+
this.loadCacheData();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Sets the cache data for the specified request.
|
|
22
|
+
* @param {!string} url The request URL.
|
|
23
|
+
* @param {ResponseOptions} data The received data.
|
|
24
|
+
* @param {Date=} lastUpdated The cache last update, current date is used if not specified.
|
|
25
|
+
*/
|
|
26
|
+
setCacheData(url, data, lastUpdated) {
|
|
27
|
+
this.cachedData[url] = {
|
|
28
|
+
lastUpdated: lastUpdated || new Date(),
|
|
29
|
+
data: data
|
|
30
|
+
};
|
|
31
|
+
log.debug(`Cache set for key: "${url}"`);
|
|
32
|
+
this.saveCacheData();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Gets the cached data for the specified request.
|
|
36
|
+
* @param {!string} url The request URL.
|
|
37
|
+
* @return {?ResponseOptions} The cached data or null if no cached data exists for this request.
|
|
38
|
+
*/
|
|
39
|
+
getCacheData(url) {
|
|
40
|
+
const cacheEntry = this.cachedData[url];
|
|
41
|
+
if (cacheEntry) {
|
|
42
|
+
log.debug(`Cache hit for key: "${url}"`);
|
|
43
|
+
return cacheEntry.data;
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Gets the cached entry for the specified request.
|
|
49
|
+
* @param {!string} url The request URL.
|
|
50
|
+
* @return {?HttpCacheEntry} The cache entry or null if no cache entry exists for this request.
|
|
51
|
+
*/
|
|
52
|
+
getHttpCacheEntry(url) {
|
|
53
|
+
return this.cachedData[url] || null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Clears the cached entry (if exists) for the specified request.
|
|
57
|
+
* @param {!string} url The request URL.
|
|
58
|
+
*/
|
|
59
|
+
clearCache(url) {
|
|
60
|
+
delete this.cachedData[url];
|
|
61
|
+
log.debug(`Cache cleared for key: "${url}"`);
|
|
62
|
+
this.saveCacheData();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Cleans cache entries older than the specified date.
|
|
66
|
+
* @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.
|
|
67
|
+
*/
|
|
68
|
+
cleanCache(expirationDate) {
|
|
69
|
+
if (expirationDate) {
|
|
70
|
+
Object(this.cachedData).keys.forEach((key) => {
|
|
71
|
+
if (expirationDate >= this.cachedData[key]?.lastUpdated) {
|
|
72
|
+
delete this.cachedData[key];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.cachedData = {};
|
|
78
|
+
}
|
|
79
|
+
this.saveCacheData();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Sets the cache persistence policy.
|
|
83
|
+
* Note that changing the cache persistence will also clear the cache from its previous storage.
|
|
84
|
+
* @param {'local'|'session'=} persistence How the cache should be persisted, it can be either local or session
|
|
85
|
+
* storage, or if no value is provided it will be only in-memory (default).
|
|
86
|
+
*/
|
|
87
|
+
setPersistence(persistence) {
|
|
88
|
+
this.cleanCache();
|
|
89
|
+
this.storage = persistence === 'local' ? localStorage : persistence === 'session' ? sessionStorage : null;
|
|
90
|
+
this.loadCacheData();
|
|
91
|
+
}
|
|
92
|
+
saveCacheData() {
|
|
93
|
+
if (this.storage) {
|
|
94
|
+
this.storage[this.cachePersistenceKey] = JSON.stringify(this.cachedData);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
loadCacheData() {
|
|
98
|
+
const data = this.storage ? this.storage[this.cachePersistenceKey] : null;
|
|
99
|
+
this.cachedData = data ? JSON.parse(data) : {};
|
|
100
|
+
}
|
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpCacheService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
102
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpCacheService, providedIn: 'root' });
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpCacheService, decorators: [{
|
|
105
|
+
type: Injectable,
|
|
106
|
+
args: [{
|
|
107
|
+
providedIn: 'root'
|
|
108
|
+
}]
|
|
109
|
+
}], ctorParameters: function () { return [{ type: i1.ConfigService }]; } });
|
|
110
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC1jYWNoZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi9jb3JlL2h0dHAtY2FjaGUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRzNDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQzs7O0FBRTFDLE1BQU0sR0FBRyxHQUFHLElBQUksTUFBTSxDQUFDLGtCQUFrQixDQUFDLENBQUM7QUFRM0M7O0dBRUc7QUFJSCxNQUFNLE9BQU8sZ0JBQWdCO0lBTVA7SUFKWixVQUFVLEdBQXVDLEVBQUUsQ0FBQztJQUNwRCxPQUFPLENBQXVCO0lBQzlCLG1CQUFtQixDQUFlO0lBRTFDLFlBQW9CLGFBQTRCO1FBQTVCLGtCQUFhLEdBQWIsYUFBYSxDQUFlO1FBQzlDLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUMvQyxJQUFJLENBQUMsbUJBQW1CLEdBQUcsSUFBS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iAgICBpZiAodGhpcy5zdG9yYWdlKSB7XG4gICAgICB0aGlzLnN0b3JhZ2VbdGhpcy5jYWNoZVBlcnNpc3RlbmNlS2V5XSA9IEpTT04uc3RyaW5naWZ5KHRoaXMuY2FjaGVkRGF0YSk7XG4gICAgfVxuICB9XG5cbiAgcHJpdmF0ZSBsb2FkQ2FjaGVEYXRhKCkge1xuICAgIGNvbnN0IGRhdGEgPSB0aGlzLnN0b3JhZ2UgPyB0aGlzLnN0b3JhZ2VbdGhpcy5jYWNoZVBlcnNpc3RlbmNlS2V5XSA6IG51bGw7XG4gICAgdGhpcy5jYWNoZWREYXRhID0gZGF0YSA/IEpTT04ucGFyc2UoZGF0YSkgOiB7fTtcbiAgfVxuXG59XG4iXX0=
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { ErrorHandlerInterceptor } from './error-handler.interceptor';
|
|
4
|
+
import { CacheInterceptor } from './cache.interceptor';
|
|
5
|
+
import { ApiPrefixInterceptor } from './api-prefix.interceptor';
|
|
6
|
+
import { TokenInterceptor } from './token.interceptor';
|
|
7
|
+
import { HeaderInterceptor } from './header.interceptor';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@angular/common/http";
|
|
10
|
+
// From @angular/common/http/src/interceptor: allows to chain interceptors
|
|
11
|
+
class HttpInterceptorHandler {
|
|
12
|
+
next;
|
|
13
|
+
interceptor;
|
|
14
|
+
constructor(next, interceptor) {
|
|
15
|
+
this.next = next;
|
|
16
|
+
this.interceptor = interceptor;
|
|
17
|
+
}
|
|
18
|
+
handle(request) {
|
|
19
|
+
return this.interceptor.intercept(request, this.next);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Allows to override default dynamic interceptors that can be disabled with the HttpService extension.
|
|
24
|
+
* Except for very specific needs, you should better configure these interceptors directly in the constructor below
|
|
25
|
+
* for better readability.
|
|
26
|
+
*
|
|
27
|
+
* For static interceptors that should always be enabled (like ApiPrefixInterceptor), use the standard
|
|
28
|
+
* HTTP_INTERCEPTORS token.
|
|
29
|
+
*/
|
|
30
|
+
export const HTTP_DYNAMIC_INTERCEPTORS = new InjectionToken('HTTP_DYNAMIC_INTERCEPTORS');
|
|
31
|
+
/**
|
|
32
|
+
* Extends HttpClient with per request configuration using dynamic interceptors.
|
|
33
|
+
*/
|
|
34
|
+
export class HttpService extends HttpClient {
|
|
35
|
+
httpHandler;
|
|
36
|
+
injector;
|
|
37
|
+
interceptors;
|
|
38
|
+
constructor(httpHandler, injector, interceptors = []) {
|
|
39
|
+
super(httpHandler);
|
|
40
|
+
this.httpHandler = httpHandler;
|
|
41
|
+
this.injector = injector;
|
|
42
|
+
this.interceptors = interceptors;
|
|
43
|
+
if (!this.interceptors) {
|
|
44
|
+
// Configure default interceptors that can be disabled here
|
|
45
|
+
this.interceptors = [this.injector.get(ApiPrefixInterceptor), this.injector.get(HeaderInterceptor), this.injector.get(TokenInterceptor), this.injector.get(ErrorHandlerInterceptor)];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
cache(forceUpdate) {
|
|
49
|
+
const cacheInterceptor = this.injector.get(CacheInterceptor).configure({ update: forceUpdate });
|
|
50
|
+
return this.addInterceptor(cacheInterceptor);
|
|
51
|
+
}
|
|
52
|
+
skipErrorHandler() {
|
|
53
|
+
return this.removeInterceptor(ErrorHandlerInterceptor);
|
|
54
|
+
}
|
|
55
|
+
skipApiPrefix() {
|
|
56
|
+
return this.removeInterceptor(ApiPrefixInterceptor);
|
|
57
|
+
}
|
|
58
|
+
skipToken() {
|
|
59
|
+
return this.removeInterceptor(TokenInterceptor);
|
|
60
|
+
}
|
|
61
|
+
skipHeader() {
|
|
62
|
+
return this.removeInterceptor(HeaderInterceptor);
|
|
63
|
+
}
|
|
64
|
+
// Override the original method to wire interceptors when triggering the request.
|
|
65
|
+
request(method, url, options) {
|
|
66
|
+
const handler = this.interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.httpHandler);
|
|
67
|
+
return new HttpClient(handler).request(method, url, options);
|
|
68
|
+
}
|
|
69
|
+
removeInterceptor(interceptorType) {
|
|
70
|
+
return new HttpService(this.httpHandler, this.injector, this.interceptors.filter(i => !(i instanceof interceptorType)));
|
|
71
|
+
}
|
|
72
|
+
addInterceptor(interceptor) {
|
|
73
|
+
return new HttpService(this.httpHandler, this.injector, this.interceptors.concat([interceptor]));
|
|
74
|
+
}
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpService, deps: [{ token: i1.HttpHandler }, { token: i0.Injector }, { token: HTTP_DYNAMIC_INTERCEPTORS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
76
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpService, providedIn: 'root' });
|
|
77
|
+
}
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HttpService, decorators: [{
|
|
79
|
+
type: Injectable,
|
|
80
|
+
args: [{
|
|
81
|
+
providedIn: 'root'
|
|
82
|
+
}]
|
|
83
|
+
}], ctorParameters: function () { return [{ type: i1.HttpHandler }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
84
|
+
type: Optional
|
|
85
|
+
}, {
|
|
86
|
+
type: Inject,
|
|
87
|
+
args: [HTTP_DYNAMIC_INTERCEPTORS]
|
|
88
|
+
}] }]; } });
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3J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