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
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { debounceTime } from 'rxjs/operators';
|
|
3
|
-
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
|
4
|
-
/**
|
|
5
|
-
* Interface used to ensure we have a consistent structure across our listing pages
|
|
6
|
-
*
|
|
7
|
-
* @todo This should be moved to ngx-techlify-core
|
|
8
|
-
*
|
|
9
|
-
* Advantages of this abstract class
|
|
10
|
-
* - Less code, less maintenance, less bugs
|
|
11
|
-
* - more consistent code
|
|
12
|
-
* - comments on more code
|
|
13
|
-
* - save time, save energy
|
|
14
|
-
*/
|
|
15
|
-
let TechlifyListingControllerInterface = class TechlifyListingControllerInterface {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.models = [];
|
|
18
|
-
this.page = 1;
|
|
19
|
-
this.perPage = 25;
|
|
20
|
-
this.lastPage = 0;
|
|
21
|
-
this.isWorking = false;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Function that listens for any changes in the form group to apply the filters
|
|
25
|
-
*/
|
|
26
|
-
listenForChanges() {
|
|
27
|
-
this.filterForm.valueChanges.pipe(debounceTime(500), untilDestroyed(this))
|
|
28
|
-
.subscribe(() => {
|
|
29
|
-
this.reload();
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Reload all data from page 1
|
|
34
|
-
*/
|
|
35
|
-
reload() {
|
|
36
|
-
this.models = [];
|
|
37
|
-
this.page = 1;
|
|
38
|
-
if (!this.isWorking) {
|
|
39
|
-
this.loadData();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Can be called when the user is scrolling,
|
|
44
|
-
* to trigger loading a new page of data
|
|
45
|
-
*/
|
|
46
|
-
onScroll() {
|
|
47
|
-
if (!this.isWorking && this.page < this.lastPage) {
|
|
48
|
-
this.page += 1;
|
|
49
|
-
this.loadData();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Reset the filter.
|
|
54
|
-
*
|
|
55
|
-
* @param field
|
|
56
|
-
*/
|
|
57
|
-
resetFilter(field) {
|
|
58
|
-
this.filterForm.get(field).reset('');
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
TechlifyListingControllerInterface = __decorate([
|
|
62
|
-
UntilDestroy()
|
|
63
|
-
], TechlifyListingControllerInterface);
|
|
64
|
-
export { TechlifyListingControllerInterface };
|
|
65
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVjaGxpZnktbGlzdGluZy1jb21wb25lbnQuY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdGVjaGxpZnktY29yZS9zcmMvbGliL2Jhc2UtbW9kZWwvdGVjaGxpZnktbGlzdGluZy1jb21wb25lbnQuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM5QyxPQUFPLEVBQUUsWUFBWSxFQUFFLGNBQW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IDE7XG4gICAgICB0aGlzLmxvYWREYXRhKCk7XG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIFJlc2V0IHRoZSBmaWx0ZXIuXG4gICAqXG4gICAqIEBwYXJhbSBmaWVsZFxuICAgKi9cbiAgcmVzZXRGaWx0ZXIoZmllbGQ6IHN0cmluZyk6IHZvaWQge1xuICAgIHRoaXMuZmlsdGVyRm9ybS5nZXQoZmllbGQpLnJlc2V0KCcnKTtcbiAgfVxuXG59XG4iXX0=
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface used to ensure we have a consistent structure across our listing pages
|
|
3
|
-
*
|
|
4
|
-
* Advantages of this abstract class
|
|
5
|
-
* - Less code, less maintenance, less bugs
|
|
6
|
-
* - more consistent code
|
|
7
|
-
* - comments on more code
|
|
8
|
-
* - save time, save energy
|
|
9
|
-
*/
|
|
10
|
-
export class TechlifyServiceBaseClass {
|
|
11
|
-
constructor(http, baseUrl) {
|
|
12
|
-
this.http = http;
|
|
13
|
-
this.baseUrl = 'you-forgot-to-set-a-base-url';
|
|
14
|
-
this.baseUrl = baseUrl;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Loads a set of the model this service is for
|
|
18
|
-
*
|
|
19
|
-
* @param params Query parameters
|
|
20
|
-
* @return Observable<any>
|
|
21
|
-
*/
|
|
22
|
-
index(params, isCache) {
|
|
23
|
-
if (isCache) {
|
|
24
|
-
return this.http.cache().get(`api/${this.baseUrl}`, { params });
|
|
25
|
-
}
|
|
26
|
-
return this.http.get(`api/${this.baseUrl}`, { params });
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Add a new record to the database
|
|
30
|
-
*
|
|
31
|
-
* @param model The data of the model to add
|
|
32
|
-
* @param params Query parameters
|
|
33
|
-
* @return Observable<any>
|
|
34
|
-
*/
|
|
35
|
-
store(model, params) {
|
|
36
|
-
return this.http.post(`api/${this.baseUrl}`, model, { params });
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Load a single model record, often with all relations and related data
|
|
40
|
-
*
|
|
41
|
-
* @param modelId ID of the model to load
|
|
42
|
-
* @param params Query parameters
|
|
43
|
-
* @return Observable<any>
|
|
44
|
-
*/
|
|
45
|
-
show(modelId, params) {
|
|
46
|
-
return this.http.get(`api/${this.baseUrl}/${modelId}`, { params });
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Update fields of a single existing model
|
|
50
|
-
*
|
|
51
|
-
* @param model Model to update
|
|
52
|
-
* @param params Query parameters
|
|
53
|
-
* @return Observable<any>
|
|
54
|
-
*/
|
|
55
|
-
update(model, params) {
|
|
56
|
-
return this.http.put(`api/${this.baseUrl}/${model.id}`, model, { params });
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Delete a single model
|
|
60
|
-
*
|
|
61
|
-
* @param model Model to delete
|
|
62
|
-
* @return Observable<any>
|
|
63
|
-
*/
|
|
64
|
-
delete(model) {
|
|
65
|
-
return this.http.delete(`api/${this.baseUrl}/${model.id}`);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVjaGxpZnktc2VydmljZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvYmFzZS1tb2RlbC90ZWNobGlmeS1zZXJ2aWNlLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBOzs7Ozs7OztHQVFHO0FBQ0gsTUFBTSxPQUFPLHdCQUF3QjtJQUluQyxZQUFzQixJQUFpQixFQUFFLE9BQWU7UUFBbEMsU0FBSSxHQUFKLElBQUksQ0FBYTtRQUY3QixZQUFPLEdBQUcsOEJBQThCLENBQUM7UUFHakQsSUFBSSxDQUFDLE9BQU8sR0FB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IE9ic2VydmFibGU8YW55PlxuICAgKi9cbiAgc2hvdyhtb2RlbElkOiBhbnksIHBhcmFtcz86IGFueSk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQoYGFwaS8ke3RoaXMuYmFzZVVybH0vJHttb2RlbElkfWAsIHsgcGFyYW1zIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqIFVwZGF0ZSBmaWVsZHMgb2YgYSBzaW5nbGUgZXhpc3RpbmcgbW9kZWxcbiAgICpcbiAgICogQHBhcmFtIG1vZGVsIE1vZGVsIHRvIHVwZGF0ZVxuICAgKiBAcGFyYW0gcGFyYW1zIFF1ZXJ5IHBhcmFtZXRlcnNcbiAgICogQHJldHVybiBPYnNlcnZhYmxlPGFueT5cbiAgICovXG4gIHVwZGF0ZShtb2RlbDogYW55LCBwYXJhbXM/OiBhbnkpOiBPYnNlcnZhYmxlPGFueT4ge1xuICAgIHJldHVybiB0aGlzLmh0dHAucHV0KGBhcGkvJHt0aGlzLmJhc2VVcmx9LyR7bW9kZWwuaWR9YCwgbW9kZWwsIHsgcGFyYW1zIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqIERlbGV0ZSBhIHNpbmdsZSBtb2RlbFxuICAgKlxuICAgKiBAcGFyYW0gbW9kZWwgTW9kZWwgdG8gZGVsZXRlXG4gICAqIEByZXR1cm4gT2JzZXJ2YWJsZTxhbnk+XG4gICAqL1xuICBkZWxldGUobW9kZWw6IGFueSk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgcmV0dXJuIHRoaXMuaHR0cC5kZWxldGUoYGFwaS8ke3RoaXMuYmFzZVVybH0vJHttb2RlbC5pZH1gKTtcbiAgfVxuXG5cbn1cbiJdfQ==
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/* tslint:disable:component-selector one-variable-per-declaration */
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { Validators, UntypedFormControl } from '@angular/forms';
|
|
4
|
-
import { User } from '../user';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../core";
|
|
7
|
-
import * as i2 from "@angular/router";
|
|
8
|
-
import * as i3 from "../user";
|
|
9
|
-
import * as i4 from "@angular/forms";
|
|
10
|
-
import * as i5 from "@angular/common";
|
|
11
|
-
import * as i6 from "@angular/material/button";
|
|
12
|
-
import * as i7 from "@angular/material/form-field";
|
|
13
|
-
import * as i8 from "@angular/material/icon";
|
|
14
|
-
import * as i9 from "@angular/material/input";
|
|
15
|
-
import * as i10 from "@angular/material/card";
|
|
16
|
-
import * as i11 from "@angular/flex-layout/flex";
|
|
17
|
-
import * as i12 from "../password-requirement-check/password-requirement-check/password-requirement-check.component";
|
|
18
|
-
const errorMessages = {
|
|
19
|
-
current_password: {
|
|
20
|
-
required: 'Current password is required'
|
|
21
|
-
},
|
|
22
|
-
password: {
|
|
23
|
-
required: 'New password is required',
|
|
24
|
-
capitalLetter: 'Password should contain at-least 1 capital letter',
|
|
25
|
-
symbol: 'Password should contain at-least 1 symbol',
|
|
26
|
-
digit: 'Password should contain at-least 1 digit',
|
|
27
|
-
minLength: 'Should have minimum length',
|
|
28
|
-
},
|
|
29
|
-
password_confirmation: {
|
|
30
|
-
required: 'Confirm password is required',
|
|
31
|
-
passwordMismatch: 'Password should match'
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
export class ChangePasswordComponent {
|
|
35
|
-
constructor(http, alertService, router, currentUserService, fb, errorHandler, formValidatorService) {
|
|
36
|
-
this.http = http;
|
|
37
|
-
this.alertService = alertService;
|
|
38
|
-
this.router = router;
|
|
39
|
-
this.currentUserService = currentUserService;
|
|
40
|
-
this.fb = fb;
|
|
41
|
-
this.errorHandler = errorHandler;
|
|
42
|
-
this.formValidatorService = formValidatorService;
|
|
43
|
-
this.passwordHide = true;
|
|
44
|
-
this.passwordConfirmationHide = true;
|
|
45
|
-
this.isWorking = false;
|
|
46
|
-
this.passwordResetForm = fb.group({
|
|
47
|
-
current_password: new UntypedFormControl('', Validators.required),
|
|
48
|
-
password: new UntypedFormControl('', Validators.required),
|
|
49
|
-
password_confirmation: new UntypedFormControl('', Validators.required),
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
ngOnInit() {
|
|
53
|
-
this.user = new User();
|
|
54
|
-
this.currentUserService.getUserObservable(true).subscribe(user => {
|
|
55
|
-
this.user = user;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
saveNewPassword() {
|
|
59
|
-
if (!this.passwordResetForm.valid) {
|
|
60
|
-
this.passwordResetForm.markAllAsTouched();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
this.isWorking = true;
|
|
64
|
-
this.http.patch('api/user/current/update-password', this.passwordResetForm.value).toPromise().then(res => {
|
|
65
|
-
this.isWorking = false;
|
|
66
|
-
this.alertService.addAlert('Successfully changed your password', 'success');
|
|
67
|
-
this.router.navigate(['/dashboard']);
|
|
68
|
-
}).catch(error => {
|
|
69
|
-
this.errorHandler.handleError(error);
|
|
70
|
-
}).finally(() => {
|
|
71
|
-
this.isWorking = false;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
isFieldValid(field) {
|
|
75
|
-
return this.formValidatorService.isFieldValid(field, this.passwordResetForm);
|
|
76
|
-
}
|
|
77
|
-
getErrorMessage(field) {
|
|
78
|
-
return this.formValidatorService.getErrorMessage(field, this.passwordResetForm, errorMessages);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
ChangePasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1.HttpService }, { token: i1.AlertService }, { token: i2.Router }, { token: i3.CurrentUserService }, { token: i4.UntypedFormBuilder }, { token: i1.ErrorHandlerService }, { token: i1.FormValidatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
-
ChangePasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChangePasswordComponent, selector: "app-change-password", ngImport: i0, template: "<div fxLayout=\"column wrap\" fxFlexFill fxLayoutAlign=\"center center\">\n <mat-card>\n <mat-card-title fxLayoutAlign=\"center center\">\n Update Your Password\n </mat-card-title>\n <mat-card-subtitle fxLayoutAlign=\"center center\">\n <small class=\"text-muted\" *ngIf=\"user?.is_temporary_password\">\n You\u2019re currently using a temporary password, please change it to proceed\n </small>\n </mat-card-subtitle>\n <form [formGroup]=\"passwordResetForm\" (ngSubmit)=\"saveNewPassword()\">\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Current Password</mat-label>\n <input matInput formControlName=\"current_password\"\n placeholder=\"Current Password\"\n type=\"password\"\n autocomplete=\"off\"\n required />\n <mat-hint>Your current password.</mat-hint>\n <mat-error *ngIf=\"isFieldValid('current_password')\">{{getErrorMessage('current_password')}}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <mat-label>New Password</mat-label>\n <input matInput formControlName=\"password\"\n placeholder=\"New Password\"\n [type]=\"passwordHide ? 'password' : 'text'\"\n autocomplete=\"off\"\n required />\n <button matSuffix mat-icon-button (click)=\"passwordHide = !passwordHide\" type=\"button\">\n <mat-icon>{{passwordHide ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n <mat-error *ngIf=\"isFieldValid('password')\">{{getErrorMessage('password')}}</mat-error>\n <mat-hint>The new password you would like to use.</mat-hint>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Confirm Password</mat-label>\n <input matInput formControlName=\"password_confirmation\" placeholder=\"Confirm Password\"\n [type]=\"passwordConfirmationHide ? 'password' : 'text'\" autocomplete=\"off\" required />\n <button matSuffix mat-icon-button (click)=\"passwordConfirmationHide = !passwordConfirmationHide\" type=\"button\">\n <mat-icon>{{passwordConfirmationHide ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n <mat-error *ngIf=\"isFieldValid('password_confirmation')\">{{getErrorMessage('password_confirmation')}}</mat-error>\n </mat-form-field>\n </mat-card-content>\n <div class=\"mt-2 mb-2\">\n <techlify-password-requirement-check [password]=\"passwordResetForm.get('password').value\"></techlify-password-requirement-check>\n </div>\n <mat-card-actions fxLayoutAlign=\"end\">\n <button mat-raised-button color=primary type=\"submit\" [disabled]=\"isWorking\">\n Change Password\n </button>\n </mat-card-actions>\n </form>\n </mat-card>\n</div>\n", styles: ["mat-card{width:500px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i10.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i10.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i10.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i10.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i11.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i11.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i11.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i11.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i12.PasswordRequirementCheckComponent, selector: "techlify-password-requirement-check", inputs: ["password"] }] });
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChangePasswordComponent, decorators: [{
|
|
84
|
-
type: Component,
|
|
85
|
-
args: [{ selector: 'app-change-password', template: "<div fxLayout=\"column wrap\" fxFlexFill fxLayoutAlign=\"center center\">\n <mat-card>\n <mat-card-title fxLayoutAlign=\"center center\">\n Update Your Password\n </mat-card-title>\n <mat-card-subtitle fxLayoutAlign=\"center center\">\n <small class=\"text-muted\" *ngIf=\"user?.is_temporary_password\">\n You\u2019re currently using a temporary password, please change it to proceed\n </small>\n </mat-card-subtitle>\n <form [formGroup]=\"passwordResetForm\" (ngSubmit)=\"saveNewPassword()\">\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Current Password</mat-label>\n <input matInput formControlName=\"current_password\"\n placeholder=\"Current Password\"\n type=\"password\"\n autocomplete=\"off\"\n required />\n <mat-hint>Your current password.</mat-hint>\n <mat-error *ngIf=\"isFieldValid('current_password')\">{{getErrorMessage('current_password')}}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <mat-label>New Password</mat-label>\n <input matInput formControlName=\"password\"\n placeholder=\"New Password\"\n [type]=\"passwordHide ? 'password' : 'text'\"\n autocomplete=\"off\"\n required />\n <button matSuffix mat-icon-button (click)=\"passwordHide = !passwordHide\" type=\"button\">\n <mat-icon>{{passwordHide ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n <mat-error *ngIf=\"isFieldValid('password')\">{{getErrorMessage('password')}}</mat-error>\n <mat-hint>The new password you would like to use.</mat-hint>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <mat-label>Confirm Password</mat-label>\n <input matInput formControlName=\"password_confirmation\" placeholder=\"Confirm Password\"\n [type]=\"passwordConfirmationHide ? 'password' : 'text'\" autocomplete=\"off\" required />\n <button matSuffix mat-icon-button (click)=\"passwordConfirmationHide = !passwordConfirmationHide\" type=\"button\">\n <mat-icon>{{passwordConfirmationHide ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n <mat-error *ngIf=\"isFieldValid('password_confirmation')\">{{getErrorMessage('password_confirmation')}}</mat-error>\n </mat-form-field>\n </mat-card-content>\n <div class=\"mt-2 mb-2\">\n <techlify-password-requirement-check [password]=\"passwordResetForm.get('password').value\"></techlify-password-requirement-check>\n </div>\n <mat-card-actions fxLayoutAlign=\"end\">\n <button mat-raised-button color=primary type=\"submit\" [disabled]=\"isWorking\">\n Change Password\n </button>\n </mat-card-actions>\n </form>\n </mat-card>\n</div>\n", styles: ["mat-card{width:500px}\n"] }]
|
|
86
|
-
}], ctorParameters: function () { return [{ type: i1.HttpService }, { type: i1.AlertService }, { type: i2.Router }, { type: i3.CurrentUserService }, { type: i4.UntypedFormBuilder }, { type: i1.ErrorHandlerService }, { type: i1.FormValidatorService }]; } });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhbmdlLXBhc3N3b3JkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3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ItMlwiPlxuICAgICAgICA8dGVjaGxpZnktcGFzc3dvcmQtcmVxdWlyZW1lbnQtY2hlY2sgW3Bhc3N3b3JkXT1cInBhc3N3b3JkUmVzZXRGb3JtLmdldCgncGFzc3dvcmQnKS52YWx1ZVwiPjwvdGVjaGxpZnktcGFzc3dvcmQtcmVxdWlyZW1lbnQtY2hlY2s+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxtYXQtY2FyZC1hY3Rpb25zIGZ4TGF5b3V0QWxpZ249XCJlbmRcIj5cbiAgICAgICAgPGJ1dHRvbiBtYXQtcmFpc2VkLWJ1dHRvbiBjb2xvcj1wcmltYXJ5IHR5cGU9XCJzdWJtaXRcIiBbZGlzYWJsZWRdPVwiaXNXb3JraW5nXCI+XG4gICAgICAgICAgQ2hhbmdlIFBhc3N3b3JkXG4gICAgICAgIDwvYnV0dG9uPlxuICAgICAgPC9tYXQtY2FyZC1hY3Rpb25zPlxuICAgIDwvZm9ybT5cbiAgPC9tYXQtY2FyZD5cbjwvZGl2PlxuIl19
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { FormControl } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/material/form-field";
|
|
6
|
-
import * as i3 from "@angular/material/core";
|
|
7
|
-
import * as i4 from "@angular/material/select";
|
|
8
|
-
import * as i5 from "@angular/forms";
|
|
9
|
-
export class ColumnSelectorComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.availableColumns = [];
|
|
12
|
-
this.label = 'Columns';
|
|
13
|
-
this.updated = new EventEmitter();
|
|
14
|
-
this.columnSelector = new FormControl([]);
|
|
15
|
-
}
|
|
16
|
-
ngOnInit() {
|
|
17
|
-
if (this.availableColumns?.length > 0) {
|
|
18
|
-
this.columnSelector.setValue(this.availableColumns, { emitEvent: false });
|
|
19
|
-
}
|
|
20
|
-
this.columnSelector.valueChanges.subscribe((val) => {
|
|
21
|
-
this.updated.emit(val);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
ColumnSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
ColumnSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ColumnSelectorComponent, selector: "app-column-selector", inputs: { availableColumns: "availableColumns", label: "label" }, outputs: { updated: "updated" }, ngImport: i0, template: "<mat-form-field class=\"w-100\">\n <mat-label>{{ label }}</mat-label>\n <mat-select [multiple]=\"true\" [formControl]=\"columnSelector\">\n <mat-option class=\"text-capitalize\" *ngFor=\"let col of availableColumns\" [value]=\"col\">\n {{ col }}\n </mat-option>\n </mat-select>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnSelectorComponent, decorators: [{
|
|
28
|
-
type: Component,
|
|
29
|
-
args: [{ selector: 'app-column-selector', template: "<mat-form-field class=\"w-100\">\n <mat-label>{{ label }}</mat-label>\n <mat-select [multiple]=\"true\" [formControl]=\"columnSelector\">\n <mat-option class=\"text-capitalize\" *ngFor=\"let col of availableColumns\" [value]=\"col\">\n {{ col }}\n </mat-option>\n </mat-select>\n</mat-form-field>\n" }]
|
|
30
|
-
}], ctorParameters: function () { return []; }, propDecorators: { availableColumns: [{
|
|
31
|
-
type: Input
|
|
32
|
-
}], label: [{
|
|
33
|
-
type: Input
|
|
34
|
-
}], updated: [{
|
|
35
|
-
type: Output
|
|
36
|
-
}] } });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sdW1uLXNlbGVjdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29sdW1uLXNlbGVjdG9yL2NvbHVtbi1zZWxlY3Rvci9jb2x1bW4tc2VsZWN0b3IuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi9jb2x1bW4tc2VsZWN0b3IvY29sdW1uLXNlbGVjdG9yL2NvbHVtbi1zZWxlY3Rvci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzdFLE9BQU8sRUFBQyxXQUFXLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQzs7Ozs7OztBQVEzQyxNQUFNLE9BQU8sdUJBQXVCO0lBT2xDO1FBTlMscUJB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tYXQtc2VsZWN0IFttdWx0aXBsZV09XCJ0cnVlXCIgW2Zvcm1Db250cm9sXT1cImNvbHVtblNlbGVjdG9yXCI+XG4gICAgPG1hdC1vcHRpb24gY2xhc3M9XCJ0ZXh0LWNhcGl0YWxpemVcIiAqbmdGb3I9XCJsZXQgY29sIG9mIGF2YWlsYWJsZUNvbHVtbnNcIiBbdmFsdWVdPVwiY29sXCI+XG4gICAgICB7eyBjb2wgfX1cbiAgICA8L21hdC1vcHRpb24+XG4gIDwvbWF0LXNlbGVjdD5cbjwvbWF0LWZvcm0tZmllbGQ+XG4iXX0=
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { ErrorSnackComponent, SuccessSnackComponent } from './snack/snack.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/material/snack-bar";
|
|
5
|
-
/**
|
|
6
|
-
* Service used to manage alerts in the entire system frontend
|
|
7
|
-
*
|
|
8
|
-
* @author Gokula Prasanna
|
|
9
|
-
* @since 20210131
|
|
10
|
-
*/
|
|
11
|
-
export class AlertService {
|
|
12
|
-
constructor(snackBar) {
|
|
13
|
-
this.snackBar = snackBar;
|
|
14
|
-
}
|
|
15
|
-
addAlert(message, alertType, duration = 3) {
|
|
16
|
-
if (alertType == "success") {
|
|
17
|
-
this.snackBar.openFromComponent(SuccessSnackComponent, {
|
|
18
|
-
duration: 1000 * duration,
|
|
19
|
-
data: message
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.snackBar.openFromComponent(ErrorSnackComponent, {
|
|
24
|
-
duration: 1000 * duration,
|
|
25
|
-
data: message
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
AlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AlertService, deps: [{ token: i1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
-
AlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AlertService, providedIn: 'root' });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AlertService, decorators: [{
|
|
33
|
-
type: Injectable,
|
|
34
|
-
args: [{
|
|
35
|
-
providedIn: 'root'
|
|
36
|
-
}]
|
|
37
|
-
}], ctorParameters: function () { return [{ type: i1.MatSnackBar }]; } });
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29yZS9hbGVydC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0MsT0FBTyxFQUFFLG1CQUFtQixFQUFFLHFCQUFxQixFQUFFLE1BQU0seUJBQXlCLENBQUM7OztBQUVyRjs7Ozs7R0FLRztBQUlILE1BQU0sT0FBTyxZQUFZO0lBRXJCLFlBQW1CLFFBQXFCO1FBQXJCLGFBQVEsR0FBUixRQUFRLENBQWE7SUFBSSxDQUFDO0lBRTdDLFFBQVEsQ0FBQyxPQUFlLEVBQUUsU0FBaUIsRUFBRSxRQUFRLEdBQUcsQ0FBQztRQUNyRCxJQUFJLFNBQVMsSUFBSSxTQUFTLEVBQUU7WUFDeEIsSUFBSSxDQUFDLFFBQVEsQ0FBQyxpQkFBaUIsQ0FBQyxxQkFBcUIsRUFBRTtnQkFDbkQsUUFBUSxFQUFFLElBQUksR0FBRyxRQUFRO2dCQUN6QixJQUFJLEVBQUUsT0FBTzthQUNoQ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JcbiAgICAgICAgaWYgKGFsZXJ0VHlwZSA9PSBcInN1Y2Nlc3NcIikge1xyXG4gICAgICAgICAgICB0aGlzLnNuYWNrQmFyLm9wZW5Gcm9tQ29tcG9uZW50KFN1Y2Nlc3NTbmFja0NvbXBvbmVudCwge1xyXG4gICAgICAgICAgICAgICAgZHVyYXRpb246IDEwMDAgKiBkdXJhdGlvbixcclxuICAgICAgICAgICAgICAgIGRhdGE6IG1lc3NhZ2VcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLnNuYWNrQmFyLm9wZW5Gcm9tQ29tcG9uZW50KEVycm9yU25hY2tDb21wb25lbnQsIHtcclxuICAgICAgICAgICAgICAgIGR1cmF0aW9uOiAxMDAwICogZHVyYXRpb24sXHJcbiAgICAgICAgICAgICAgICBkYXRhOiBtZXNzYWdlXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./config.service";
|
|
4
|
-
/**
|
|
5
|
-
* Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.
|
|
6
|
-
*/
|
|
7
|
-
export class ApiPrefixInterceptor {
|
|
8
|
-
constructor(configService) {
|
|
9
|
-
this.configService = configService;
|
|
10
|
-
}
|
|
11
|
-
intercept(request, next) {
|
|
12
|
-
if (!/^(http|https):/i.test(request.url)) {
|
|
13
|
-
request = request.clone({ url: this.configService.getApiUrl() + request.url });
|
|
14
|
-
}
|
|
15
|
-
return next.handle(request);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
ApiPrefixInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiPrefixInterceptor, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
-
ApiPrefixInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiPrefixInterceptor, providedIn: 'root' });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ApiPrefixInterceptor, decorators: [{
|
|
21
|
-
type: Injectable,
|
|
22
|
-
args: [{
|
|
23
|
-
providedIn: 'root'
|
|
24
|
-
}]
|
|
25
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigService }]; } });
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLXByZWZpeC5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29yZS9hcGktcHJlZml4LmludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQUszQzs7R0FFRztBQUlILE1BQU0sT0FBTyxvQkFBb0I7SUFFL0IsWUFBb0IsYUFBNEI7UUFBNUIsa0JBQWEsR0FBYixhQUFhLENBQWU7SUFBSSxDQUFDO0lBRXJELFNBQVMsQ0FBQyxPQUF5QixFQUFFLElBQWlCO1FBQ3BELElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFO1lBQ3hDLE9BQU8sR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUUsR0FBRyxFQUFFLElBQUksQ0FBQyxhQUFhLENBQUMsU0FBUyxFQUFFLEdBQUcsT0FBTyxDQUFDLEdBQUcsRUFBRSxDQUFDLENB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zdC51cmwpKSB7XG4gICAgICByZXF1ZXN0ID0gcmVxdWVzdC5jbG9uZSh7IHVybDogdGhpcy5jb25maWdTZXJ2aWNlLmdldEFwaVVybCgpICsgcmVxdWVzdC51cmwgfSk7XG4gICAgfVxuICAgIHJldHVybiBuZXh0LmhhbmRsZShyZXF1ZXN0KTtcbiAgfVxufVxuIl19
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Logger } from './logger.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/router";
|
|
5
|
-
import * as i2 from "./credentials.service";
|
|
6
|
-
const log = new Logger('AuthenticationGuard');
|
|
7
|
-
export class AuthenticationGuard {
|
|
8
|
-
constructor(router, credentialsService) {
|
|
9
|
-
this.router = router;
|
|
10
|
-
this.credentialsService = credentialsService;
|
|
11
|
-
}
|
|
12
|
-
canActivate(route, state) {
|
|
13
|
-
return this.isUserAuthenticated(route, state);
|
|
14
|
-
}
|
|
15
|
-
canLoad(route, state) {
|
|
16
|
-
return this.isUserAuthenticated(route, state);
|
|
17
|
-
}
|
|
18
|
-
isUserAuthenticated(route, state) {
|
|
19
|
-
if (this.credentialsService.isAuthenticated) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
log.debug('Not authenticated, redirecting and adding redirect url...');
|
|
23
|
-
this.router.navigate(['/login'], { queryParams: { redirect: state.url }, replaceUrl: true });
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
AuthenticationGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthenticationGuard, deps: [{ token: i1.Router }, { token: i2.CredentialsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
-
AuthenticationGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthenticationGuard, providedIn: 'root' });
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthenticationGuard, decorators: [{
|
|
30
|
-
type: Injectable,
|
|
31
|
-
args: [{
|
|
32
|
-
providedIn: 'root'
|
|
33
|
-
}]
|
|
34
|
-
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.CredentialsService }]; } });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aGVudGljYXRpb24uZ3VhcmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdGVjaGxpZnktY29yZS9zcmMvbGliL2NvcmUvYXV0aGVudGljYXRpb24uZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUczQyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7Ozs7QUFFMUMsTUFBTSxHQUFHLEdBQUcsSUFBSSxNQUFNLENBQUMscUJBQXFCLENBQUMsQ0FBQztBQUs5QyxNQUFNLE9BQU8sbUJBQW1CO0lBRTlCLFlBQW9CLE1BQWMsRUFDeEIsa0JBQXNDO1FBRDVCLFdBQU0sR0FBTixNQUFNLENBQVE7UUFDeEIsdUJBQWtCLEdBQWxCLGtCQUFrQixDQUFvQjtJQUFJLENBQUM7SUFFckQsV0FBVyxDQUFDLEtBQTZCLEVBQUUsS0FBMEI7UUFDbkUsT0FBTyxJQUFJLENBQUMsbUJBQW1CLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBQ2hELENBQUM7SUFFRCxPQUFPLENBQUMsS0FBNkIsRUFBRSxLQUEwQjtRQUMvRCxPQUFPLElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxLQUFLLEVBQUUsS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O1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG59XG4iXX0=
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { of } from 'rxjs';
|
|
3
|
-
import { map, switchMap } from 'rxjs/operators';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "./credentials.service";
|
|
6
|
-
import * as i2 from "./http.service";
|
|
7
|
-
import * as i3 from "../user/current-user.service";
|
|
8
|
-
/**
|
|
9
|
-
* Provides a base for authentication workflow.
|
|
10
|
-
* The login/logout methods should be replaced with proper implementation.
|
|
11
|
-
*/
|
|
12
|
-
export class AuthenticationService {
|
|
13
|
-
constructor(credentialsService, http, currentUserService) {
|
|
14
|
-
this.credentialsService = credentialsService;
|
|
15
|
-
this.http = http;
|
|
16
|
-
this.currentUserService = currentUserService;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Authenticates the user.
|
|
20
|
-
* @param context The login parameters.
|
|
21
|
-
* @return The user credentials.
|
|
22
|
-
*/
|
|
23
|
-
login(context) {
|
|
24
|
-
const data = {};
|
|
25
|
-
return this.http
|
|
26
|
-
.skipToken()
|
|
27
|
-
.post('oauth/token', context)
|
|
28
|
-
.pipe(switchMap((tokenInfo) => {
|
|
29
|
-
tokenInfo.expires_in = Date.now() + (tokenInfo.expires_in * 1000);
|
|
30
|
-
data.token = tokenInfo;
|
|
31
|
-
data.user = {};
|
|
32
|
-
this.credentialsService.setCredentials(data, context.remember);
|
|
33
|
-
// Update the auth status of the user.
|
|
34
|
-
this.currentUserService.updateAuthStatus(true);
|
|
35
|
-
return this.http.get('api/user/current')
|
|
36
|
-
.pipe(map((res) => {
|
|
37
|
-
data.user = res?.user;
|
|
38
|
-
this.credentialsService.setCredentials(data, context.remember);
|
|
39
|
-
return data;
|
|
40
|
-
}));
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Logs out the user and clear credentials.
|
|
45
|
-
* @return True if the user was logged out successfully.
|
|
46
|
-
*/
|
|
47
|
-
logout() {
|
|
48
|
-
// Update the auth status of the user.
|
|
49
|
-
this.currentUserService.updateAuthStatus(false);
|
|
50
|
-
this.credentialsService.setCredentials();
|
|
51
|
-
return of(true);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
AuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthenticationService, deps: [{ token: i1.CredentialsService }, { token: i2.HttpService }, { token: i3.CurrentUserService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
-
AuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthenticationService, providedIn: 'root' });
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthenticationService, decorators: [{
|
|
57
|
-
type: Injectable,
|
|
58
|
-
args: [{
|
|
59
|
-
providedIn: 'root'
|
|
60
|
-
}]
|
|
61
|
-
}], ctorParameters: function () { return [{ type: i1.CredentialsService }, { type: i2.HttpService }, { type: i3.CurrentUserService }]; } });
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aGVudGljYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29yZS9hdXRoZW50aWNhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN0QyxPQUFPLEVBQUUsR0FBRyxFQ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hmYWxzZSk7XG4gICAgdGhpcy5jcmVkZW50aWFsc1NlcnZpY2Uuc2V0Q3JlZGVudGlhbHMoKTtcbiAgICByZXR1cm4gb2YodHJ1ZSk7XG4gIH1cblxufVxuIl19
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { HttpResponse } from '@angular/common/http';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "./http-cache.service";
|
|
6
|
-
/**
|
|
7
|
-
* Caches HTTP requests.
|
|
8
|
-
* Use ExtendedHttpClient fluent API to configure caching for each request.
|
|
9
|
-
*/
|
|
10
|
-
export class CacheInterceptor {
|
|
11
|
-
constructor(httpCacheService) {
|
|
12
|
-
this.httpCacheService = httpCacheService;
|
|
13
|
-
this.forceUpdate = false;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Configures interceptor options
|
|
17
|
-
* @param {{update: boolean}} options If update option is enabled, forces request to be made and updates cache entry.
|
|
18
|
-
* @return {CacheInterceptor} The configured instance.
|
|
19
|
-
*/
|
|
20
|
-
configure(options) {
|
|
21
|
-
const instance = new CacheInterceptor(this.httpCacheService);
|
|
22
|
-
if (options && options.update) {
|
|
23
|
-
instance.forceUpdate = true;
|
|
24
|
-
}
|
|
25
|
-
return instance;
|
|
26
|
-
}
|
|
27
|
-
intercept(request, next) {
|
|
28
|
-
if (request.method !== 'GET') {
|
|
29
|
-
return next.handle(request);
|
|
30
|
-
}
|
|
31
|
-
return new Observable((subscriber) => {
|
|
32
|
-
const cachedData = this.forceUpdate ? null : this.httpCacheService.getCacheData(request.urlWithParams);
|
|
33
|
-
if (cachedData !== null) {
|
|
34
|
-
// Create new response to avoid side-effects
|
|
35
|
-
subscriber.next(new HttpResponse(cachedData));
|
|
36
|
-
subscriber.complete();
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
next.handle(request)
|
|
40
|
-
.subscribe(event => {
|
|
41
|
-
if (event instanceof HttpResponse) {
|
|
42
|
-
this.httpCacheService.setCacheData(request.urlWithParams, event);
|
|
43
|
-
}
|
|
44
|
-
subscriber.next(event);
|
|
45
|
-
}, error => subscriber.error(error), () => subscriber.complete());
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
CacheInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CacheInterceptor, deps: [{ token: i1.HttpCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
51
|
-
CacheInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CacheInterceptor, providedIn: 'root' });
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CacheInterceptor, decorators: [{
|
|
53
|
-
type: Injectable,
|
|
54
|
-
args: [{
|
|
55
|
-
providedIn: 'root'
|
|
56
|
-
}]
|
|
57
|
-
}], ctorParameters: function () { return [{ type: i1.HttpCacheService }]; } });
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUuaW50ZXJjZXB0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdGVjaGxpZnktY29yZS9zcmMvbGliL2NvcmUvY2FjaGUuaW50ZXJjZXB0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQXdELFlBQVksRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRTFHLE9BQU8sRUFBRSxVQUFVLEVBQWMsTUFBTSxNQUFNLENBQUM7OztBQUU5Qzs7O0dBR0c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