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,127 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Role } from '../role.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../core";
|
|
5
|
+
import * as i2 from "@angular/router";
|
|
6
|
+
import * as i3 from "../../user-config";
|
|
7
|
+
import * as i4 from "@angular/forms";
|
|
8
|
+
import * as i5 from "@angular/common";
|
|
9
|
+
import * as i6 from "@angular/material/button";
|
|
10
|
+
import * as i7 from "@angular/material/form-field";
|
|
11
|
+
import * as i8 from "@angular/material/core";
|
|
12
|
+
import * as i9 from "@angular/material/select";
|
|
13
|
+
import * as i10 from "@angular/material/card";
|
|
14
|
+
/**
|
|
15
|
+
* Role Permissions management controller
|
|
16
|
+
*
|
|
17
|
+
* @author Joshua Kissoon
|
|
18
|
+
* @since 20161013
|
|
19
|
+
*/
|
|
20
|
+
export class PermissionsManagementComponent {
|
|
21
|
+
http;
|
|
22
|
+
alertService;
|
|
23
|
+
route;
|
|
24
|
+
credentialsService;
|
|
25
|
+
errorHandler;
|
|
26
|
+
userConfigService;
|
|
27
|
+
fb;
|
|
28
|
+
roles;
|
|
29
|
+
permissions;
|
|
30
|
+
moduleCode;
|
|
31
|
+
clientId;
|
|
32
|
+
config;
|
|
33
|
+
showColumnForm;
|
|
34
|
+
constructor(http, alertService, route, credentialsService, errorHandler, userConfigService, fb) {
|
|
35
|
+
this.http = http;
|
|
36
|
+
this.alertService = alertService;
|
|
37
|
+
this.route = route;
|
|
38
|
+
this.credentialsService = credentialsService;
|
|
39
|
+
this.errorHandler = errorHandler;
|
|
40
|
+
this.userConfigService = userConfigService;
|
|
41
|
+
this.fb = fb;
|
|
42
|
+
this.moduleCode = null;
|
|
43
|
+
this.config = this.userConfigService.getConfig();
|
|
44
|
+
this.showColumnForm = this.fb.group({
|
|
45
|
+
role_ids: []
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
ngOnInit() {
|
|
49
|
+
this.route.params.subscribe(params => {
|
|
50
|
+
if (params.module_code !== undefined) {
|
|
51
|
+
this.moduleCode = params.module_code;
|
|
52
|
+
}
|
|
53
|
+
this.loadRoles();
|
|
54
|
+
this.loadPermissions();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
isDisabled(isGlobal, isEditable) {
|
|
58
|
+
if (isGlobal && this.credentialsService.credentials?.user?.user_type_id !== 1) {
|
|
59
|
+
return !isEditable;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
loadPermissions() {
|
|
64
|
+
const filters = {};
|
|
65
|
+
if (this.moduleCode) {
|
|
66
|
+
filters.module_code = this.moduleCode;
|
|
67
|
+
}
|
|
68
|
+
if (this.clientId) {
|
|
69
|
+
filters.client_id = this.clientId;
|
|
70
|
+
}
|
|
71
|
+
this.http.get('api/permissions', { params: filters }).toPromise().then((res) => {
|
|
72
|
+
this.permissions = res.data;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Load the Roles from the DB
|
|
77
|
+
*/
|
|
78
|
+
loadRoles() {
|
|
79
|
+
const filters = {
|
|
80
|
+
loadPermissions: true,
|
|
81
|
+
};
|
|
82
|
+
if (this.clientId) {
|
|
83
|
+
filters.client_id = this.clientId;
|
|
84
|
+
}
|
|
85
|
+
this.http.get('api/roles', { params: filters }).toPromise().then((res) => {
|
|
86
|
+
this.roles = new Array();
|
|
87
|
+
for (let row of res.data) {
|
|
88
|
+
let role = new Role();
|
|
89
|
+
role.loadFromJson(row);
|
|
90
|
+
this.roles.push(role);
|
|
91
|
+
role.setupBlankPermissionsForNgModel();
|
|
92
|
+
}
|
|
93
|
+
this.showColumnForm.get('role_ids').setValue(this.roles.map(role => role.id));
|
|
94
|
+
}, error => {
|
|
95
|
+
this.errorHandler.handleError(error);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
updateRolePermission(role, permission) {
|
|
99
|
+
let data = {
|
|
100
|
+
rid: role.id,
|
|
101
|
+
permission: permission.slug
|
|
102
|
+
};
|
|
103
|
+
if (role.hasPermission(permission.slug)) {
|
|
104
|
+
/* Remove the permission */
|
|
105
|
+
this.http.patch('api/roles/' + role.id + '/permissions/' + permission.id + '/remove', data).toPromise().then(res => {
|
|
106
|
+
role.removePermission(permission);
|
|
107
|
+
this.alertService.addAlert(permission.label + ' removed', 'warning');
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
/* Add the permission */
|
|
112
|
+
this.http.patch('api/roles/' + role.id + '/permissions/' + permission.id + '/add', data).toPromise().then(res => {
|
|
113
|
+
role.addPermission(permission);
|
|
114
|
+
this.alertService.addAlert(permission.label + ' added', 'success');
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PermissionsManagementComponent, deps: [{ token: i1.HttpService }, { token: i1.AlertService }, { token: i2.ActivatedRoute }, { token: i1.CredentialsService }, { token: i1.ErrorHandlerService }, { token: i3.UserConfigService }, { token: i4.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PermissionsManagementComponent, selector: "role-permissions-management", inputs: { clientId: "clientId" }, ngImport: i0, template: "<section class=\"d-flex flex-column gap-2 w-100 my-4\">\n\n <mat-card class='d-flex flex-row justify-content-between'>\n <div class='d-flex flex-row gap-2 align-items-center'>\n <h5 class=\"mb-0\">Manage Role Permissions</h5>\n\n <button mat-raised-button [routerLink]=\"['../users']\" *ngIf=\"!config.permissionConfig.disableUsers\">\n <i class=\"icon fas fa-users\"></i> Users\n </button>\n <button mat-raised-button [routerLink]=\"['../roles']\" *ngIf=\"!config.permissionConfig.disableRoles\">\n <i class=\"fas fa-user-md\"></i> Manage Roles\n </button>\n </div>\n\n <section class=\"filters-wrapper hidden-print\">\n <div class=\"pull-right mt-2\">\n <form [formGroup]=\"showColumnForm\">\n\n <mat-form-field *ngIf=\"roles\" appearance=\"outline\">\n <mat-label>Show Roles</mat-label>\n <mat-select formControlName='role_ids' multiple>\n <mat-option *ngFor=\"let role of roles\" [value]=\"role?.id\">\n {{role.label}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </div>\n </section>\n </mat-card>\n\n <mat-card>\n <form>\n <table class=\"table table-sm table-bordered table-condensed table-striped\"\n aria-describedby=\"Role Permissions\">\n <thead>\n <tr>\n <th>Permissions</th>\n <ng-container *ngFor=\"let role of roles\">\n <th class=\"text-center\" *ngIf=\"showColumnForm.get('role_ids').value.includes(role.id)\">\n {{role.label}}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let permission of permissions\">\n <td>{{permission.label}}</td>\n <ng-container *ngFor=\"let role of roles\">\n <td class=\"text-center\" *ngIf=\"showColumnForm.get('role_ids').value.includes(role.id)\">\n <input [disabled]=\"isDisabled(role.is_global, role.is_editable)\" type=\"checkbox\"\n name=\"{{role.id}}[{{permission?.label}}]\"\n [checked]=\"role.hasPermission(permission.slug)\"\n (change)=\"updateRolePermission(role, permission)\" />\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </form>\n </mat-card>\n</section>", dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { 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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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"] }] });
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PermissionsManagementComponent, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{ selector: 'role-permissions-management', template: "<section class=\"d-flex flex-column gap-2 w-100 my-4\">\n\n <mat-card class='d-flex flex-row justify-content-between'>\n <div class='d-flex flex-row gap-2 align-items-center'>\n <h5 class=\"mb-0\">Manage Role Permissions</h5>\n\n <button mat-raised-button [routerLink]=\"['../users']\" *ngIf=\"!config.permissionConfig.disableUsers\">\n <i class=\"icon fas fa-users\"></i> Users\n </button>\n <button mat-raised-button [routerLink]=\"['../roles']\" *ngIf=\"!config.permissionConfig.disableRoles\">\n <i class=\"fas fa-user-md\"></i> Manage Roles\n </button>\n </div>\n\n <section class=\"filters-wrapper hidden-print\">\n <div class=\"pull-right mt-2\">\n <form [formGroup]=\"showColumnForm\">\n\n <mat-form-field *ngIf=\"roles\" appearance=\"outline\">\n <mat-label>Show Roles</mat-label>\n <mat-select formControlName='role_ids' multiple>\n <mat-option *ngFor=\"let role of roles\" [value]=\"role?.id\">\n {{role.label}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </div>\n </section>\n </mat-card>\n\n <mat-card>\n <form>\n <table class=\"table table-sm table-bordered table-condensed table-striped\"\n aria-describedby=\"Role Permissions\">\n <thead>\n <tr>\n <th>Permissions</th>\n <ng-container *ngFor=\"let role of roles\">\n <th class=\"text-center\" *ngIf=\"showColumnForm.get('role_ids').value.includes(role.id)\">\n {{role.label}}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let permission of permissions\">\n <td>{{permission.label}}</td>\n <ng-container *ngFor=\"let role of roles\">\n <td class=\"text-center\" *ngIf=\"showColumnForm.get('role_ids').value.includes(role.id)\">\n <input [disabled]=\"isDisabled(role.is_global, role.is_editable)\" type=\"checkbox\"\n name=\"{{role.id}}[{{permission?.label}}]\"\n [checked]=\"role.hasPermission(permission.slug)\"\n (change)=\"updateRolePermission(role, permission)\" />\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </form>\n </mat-card>\n</section>" }]
|
|
124
|
+
}], ctorParameters: function () { return [{ type: i1.HttpService }, { type: i1.AlertService }, { type: i2.ActivatedRoute }, { type: i1.CredentialsService }, { type: i1.ErrorHandlerService }, { type: i3.UserConfigService }, { type: i4.FormBuilder }]; }, propDecorators: { clientId: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}] } });
|
|
127
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVybWlzc2lvbnMtbWFuYWdlbWVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdGVjaGxpZnktY29yZS9zcmMvbGliL3JvbGUvcGVybWlzc2lvbi9wZXJtaXNzaW9ucy1tYW5hZ2VtZW50LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvcm9sZS9wZXJtaXNzaW9uL3Blcm1pc3Npb25zLW1hbmFnZW1lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUt6RCxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7Ozs7Ozs7Ozs7QUFLckM7Ozs7O0dBS0c7QUFLSCxNQUFNLE9BQU8sOEJBQThCO0lBU25CO0lBQ1I7SUFDQTtJQUNBO0lBQ0E7SUFDRDtJQUNDO0lBZFosS0FBSyxDQUFTO0lBQ2QsV0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ICAgICBjb25zdCBmaWx0ZXJzOiBhbnkgPSB7XG4gICAgICAgICAgICBsb2FkUGVybWlzc2lvbnM6IHRydWUsXG4gICAgICAgIH07XG4gICAgICAgIGlmICh0aGlzLmNsaWVudElkKSB7XG4gICAgICAgICAgICBmaWx0ZXJzLmNsaWVudF9pZCA9IHRoaXMuY2xpZW50SWQ7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmh0dHAuZ2V0KCdhcGkvcm9sZXMnLCB7IHBhcmFtczogZmlsdGVycyB9KS50b1Byb21pc2UoKS50aGVuKFxuICAgICAgICAgICAgKHJlczogYW55KSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5yb2xlcyA9IG5ldyBBcnJheTxSb2xlPigpO1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgcm93IG9mIHJlcy5kYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCByb2xlID0gbmV3IFJvbGUoKTtcbiAgICAgICAgICAgICAgICAgICAgcm9sZS5sb2FkRnJvbUpzb24ocm93KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yb2xlcy5wdXNoKHJvbGUpO1xuICAgICAgICAgICAgICAgICAgICByb2xlLnNldHVwQmxhbmtQZXJtaXNzaW9uc0Zvck5nTW9kZWwoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5zaG93Q29sdW1uRm9ybS5nZXQoJ3JvbGVfaWRzJykuc2V0VmFsdWUoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucm9sZXMubWFwKHJvbGUgPT4gcm9sZS5pZClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSwgZXJyb3IgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmhhbmRsZUVycm9yKGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICB1cGRhdGVSb2xlUGVybWlzc2lvbihyb2xlOiBSb2xlLCBwZXJtaXNzaW9uOiBQZXJtaXNzaW9uKSB7XG4gICAgICAgIGxldCBkYXRhID0ge1xuICAgICAgICAgICAgcmlkOiByb2xlLmlkLFxuICAgICAgICAgICAgcGVybWlzc2lvbjogcGVybWlzc2lvbi5zbHVnXG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKHJvbGUuaGFzUGVybWlzc2lvbihwZXJtaXNzaW9uLnNsdWcpKSB7XG4gICAgICAgICAgICAvKiBSZW1vdmUgdGhlIHBlcm1pc3Npb24gICovXG4gICAgICAgICAgICB0aGlzLmh0dHAucGF0Y2goJ2FwaS9yb2xlcy8nICsgcm9sZS5pZCArICcvcGVybWlzc2lvbnMvJyArIHBlcm1pc3Npb24uaWQgKyAnL3JlbW92ZScsIGRhdGEpLnRvUHJvbWlzZSgpLnRoZW4oXG4gICAgICAgICAgICAgICAgcmVzID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcm9sZS5yZW1vdmVQZXJtaXNzaW9uKHBlcm1pc3Npb24pO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0U2VydmljZS5hZGRBbGVydChwZXJtaXNzaW9uLmxhYmVsICsgJyByZW1vdmVkJywgJ3dhcm5pbmcnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLyogQWRkIHRoZSBwZXJtaXNzaW9uICovXG4gICAgICAgICAgICB0aGlzLmh0dHAucGF0Y2goJ2FwaS9yb2xlcy8nICsgcm9sZS5pZCArICcvcGVybWlzc2lvbnMvJyArIHBlcm1pc3Npb24uaWQgKyAnL2FkZCcsIGRhdGEpLnRvUHJvbWlzZSgpLnRoZW4oXG4gICAgICAgICAgICAgICAgcmVzID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcm9sZS5hZGRQZXJtaXNzaW9uKHBlcm1pc3Npb24pO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ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WRkZW4tcHJpbnRcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwdWxsLXJpZ2h0IG10LTJcIj5cbiAgICAgICAgICAgICAgICA8Zm9ybSBbZm9ybUdyb3VwXT1cInNob3dDb2x1bW5Gb3JtXCI+XG5cbiAgICAgICAgICAgICAgICAgICAgPG1hdC1mb3JtLWZpZWxkICpuZ0lmPVwicm9sZXNcIiBhcHBlYXJhbmNlPVwib3V0bGluZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1sYWJlbD5TaG93IFJvbGVzPC9tYXQtbGFiZWw+XG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LXNlbGVjdCBmb3JtQ29udHJvbE5hbWU9J3JvbGVfaWRzJyBtdWx0aXBsZT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bWF0LW9wdGlvbiAqbmdGb3I9XCJsZXQgcm9sZSBvZiByb2xlc1wiIFt2YWx1ZV09XCJyb2xlPy5pZFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7e3JvbGUubGFiZWx9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbWF0LW9wdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbWF0LXNlbGVjdD5cbiAgICAgICAgICAgICAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgICAgICAgICAgICA8L2Zvcm0+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9zZWN0aW9uPlxuICAgIDwvbWF0LWNhcmQ+XG5cbiAgICA8bWF0LWNhcmQ+XG4gICAgICAgIDxmb3JtPlxuICAgICAgICAgICAgPHRhYmxlIGNsYXNzPVwidGFibGUgdGFibGUtc20gdGFibGUtYm9yZGVyZWQgdGFibGUtY29uZGVuc2VkIHRhYmxlLXN0cmlwZWRcIlxuICAgICAgICAgICAgICAgIGFyaWEtZGVzY3JpYmVkYnk9XCJSb2xlIFBlcm1pc3Npb25zXCI+XG4gICAgICAgICAgICAgICAgPHRoZWFkPlxuICAgICAgICAgICAgICAgICAgICA8dHI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8dGg+UGVybWlzc2lvbnM8L3RoPlxuICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdGb3I9XCJsZXQgcm9sZSBvZiByb2xlc1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aCBjbGFzcz1cInRleHQtY2VudGVyXCIgKm5nSWY9XCJzaG93Q29sdW1uRm9ybS5nZXQoJ3JvbGVfaWRzJykudmFsdWUuaW5jbHVkZXMocm9sZS5pZClcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3tyb2xlLmxhYmVsfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RoPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgIDwvdHI+XG4gICAgICAgICAgICAgICAgPC90aGVhZD5cbiAgICAgICAgICAgICAgICA8dGJvZHk+XG4gICAgICAgICAgICAgICAgICAgIDx0ciAqbmdGb3I9XCJsZXQgcGVybWlzc2lvbiBvZiBwZXJtaXNzaW9uc1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPHRkPnt7cGVybWlzc2lvbi5sYWJlbH19PC90ZD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nRm9yPVwibGV0IHJvbGUgb2Ygcm9sZXNcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9XCJ0ZXh0LWNlbnRlclwiICpuZ0lmPVwic2hvd0NvbHVtbkZvcm0uZ2V0KCdyb2xlX2lkcycpLnZhbHVlLmluY2x1ZGVzKHJvbGUuaWQpXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBbZGlzYWJsZWRdPVwiaXNEaXNhYmxlZChyb2xlLmlzX2dsb2JhbCwgcm9sZS5pc19lZGl0YWJsZSlcIiB0eXBlPVwiY2hlY2tib3hcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZT1cInt7cm9sZS5pZH19W3t7cGVybWlzc2lvbj8ubGFiZWx9fV1cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2NoZWNrZWRdPVwicm9sZS5oYXNQZXJtaXNzaW9uKHBlcm1pc3Npb24uc2x1ZylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNoYW5nZSk9XCJ1cGRhdGVSb2xlUGVybWlzc2lvbihyb2xlLCBwZXJtaXNzaW9uKVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgICAgIDwvdGJvZHk+XG4gICAgICAgICAgICA8L3RhYmxlPlxuICAgICAgICA8L2Zvcm0+XG4gICAgPC9tYXQtY2FyZD5cbjwvc2VjdGlvbj4iXX0=
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { Validators, UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../core";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "../user-config";
|
|
8
|
+
import * as i4 from "@angular/material/dialog";
|
|
9
|
+
import * as i5 from "./role.service";
|
|
10
|
+
import * as i6 from "@angular/common";
|
|
11
|
+
import * as i7 from "@angular/material/button";
|
|
12
|
+
import * as i8 from "@angular/material/checkbox";
|
|
13
|
+
import * as i9 from "@angular/material/form-field";
|
|
14
|
+
import * as i10 from "@angular/material/input";
|
|
15
|
+
import * as i11 from "@angular/material/core";
|
|
16
|
+
import * as i12 from "@angular/material/select";
|
|
17
|
+
import * as i13 from "@angular/flex-layout/flex";
|
|
18
|
+
const errorMessages = {
|
|
19
|
+
label: {
|
|
20
|
+
required: 'Role is required'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export class RoleFormComponent {
|
|
24
|
+
alertService;
|
|
25
|
+
credentialsService;
|
|
26
|
+
fb;
|
|
27
|
+
formValidatorService;
|
|
28
|
+
userConfigService;
|
|
29
|
+
dialogRef;
|
|
30
|
+
data;
|
|
31
|
+
roleService;
|
|
32
|
+
modules = [];
|
|
33
|
+
config;
|
|
34
|
+
isWorking = false;
|
|
35
|
+
roleForm;
|
|
36
|
+
showModuleSelector = true;
|
|
37
|
+
isUpdateMode = false;
|
|
38
|
+
constructor(alertService, credentialsService, fb, formValidatorService, userConfigService, dialogRef, data, roleService) {
|
|
39
|
+
this.alertService = alertService;
|
|
40
|
+
this.credentialsService = credentialsService;
|
|
41
|
+
this.fb = fb;
|
|
42
|
+
this.formValidatorService = formValidatorService;
|
|
43
|
+
this.userConfigService = userConfigService;
|
|
44
|
+
this.dialogRef = dialogRef;
|
|
45
|
+
this.data = data;
|
|
46
|
+
this.roleService = roleService;
|
|
47
|
+
this.config = this.userConfigService.getConfig();
|
|
48
|
+
this.showModuleSelector = this.config.roleConfig.showModuleSelectorOnForm;
|
|
49
|
+
}
|
|
50
|
+
get isAdminUser() {
|
|
51
|
+
return (this.credentialsService.credentials?.user?.user_type_id === 1);
|
|
52
|
+
}
|
|
53
|
+
ngOnInit() {
|
|
54
|
+
this.roleForm = this.fb.group({
|
|
55
|
+
id: [''],
|
|
56
|
+
label: new UntypedFormControl('', Validators.compose([Validators.required])),
|
|
57
|
+
description: new UntypedFormControl(''),
|
|
58
|
+
module_code: [''],
|
|
59
|
+
is_editable: [true],
|
|
60
|
+
is_global: [false],
|
|
61
|
+
client_id: [this.data.client_id ? this.data.client_id : 1]
|
|
62
|
+
});
|
|
63
|
+
if (this.data.role) {
|
|
64
|
+
this.roleForm.patchValue(this.data.role);
|
|
65
|
+
this.isUpdateMode = true;
|
|
66
|
+
}
|
|
67
|
+
if (this.showModuleSelector) {
|
|
68
|
+
this.getSubscribedModules();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async save() {
|
|
72
|
+
if (!this.roleForm.valid) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.isWorking = true;
|
|
76
|
+
if (this.data.module_code) {
|
|
77
|
+
this.roleForm.controls.module_code.setValue(this.data.module_code);
|
|
78
|
+
}
|
|
79
|
+
const result = this.isUpdateMode
|
|
80
|
+
? await this.roleService.updateRole(this.roleForm.value)
|
|
81
|
+
: await this.roleService.createRole(this.roleForm.value);
|
|
82
|
+
this.alertService.addAlert('Successfully saved the role', 'success');
|
|
83
|
+
this.dialogRef.close(result);
|
|
84
|
+
this.isWorking = false;
|
|
85
|
+
}
|
|
86
|
+
async getSubscribedModules() {
|
|
87
|
+
let filters = {};
|
|
88
|
+
filters.client_id = this.data.client_id;
|
|
89
|
+
const result = await this.roleService.getClientSubscriptions(filters);
|
|
90
|
+
}
|
|
91
|
+
/** Method to evaluate form fields*/
|
|
92
|
+
isFieldValid(field) {
|
|
93
|
+
return this.formValidatorService.isFieldValid(field, this.roleForm);
|
|
94
|
+
}
|
|
95
|
+
/** Method to find error in form fields*/
|
|
96
|
+
getErrorMessage(field) {
|
|
97
|
+
return this.formValidatorService.getErrorMessage(field, this.roleForm, errorMessages);
|
|
98
|
+
}
|
|
99
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleFormComponent, deps: [{ token: i1.AlertService }, { token: i1.CredentialsService }, { token: i2.UntypedFormBuilder }, { token: i1.FormValidatorService }, { token: i3.UserConfigService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i5.RoleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
100
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RoleFormComponent, selector: "role-form", ngImport: i0, template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\" *ngIf=\"showModuleSelector\">\n <mat-label>Module</mat-label>\n <mat-select formControlName=\"module_code\" required>\n <mat-option *ngFor=\"let module of modules\" [value]=\"module.package?.module.code\">\n {{module.package?.module.name}}</mat-option>\n </mat-select>\n <mat-error>Module is required</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n <mat-checkbox formControlName=\"is_global\"> Is Global</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.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: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i10.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: i11.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i13.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: i13.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: i13.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: i13.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: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
101
|
+
}
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleFormComponent, decorators: [{
|
|
103
|
+
type: Component,
|
|
104
|
+
args: [{ selector: 'role-form', template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\" *ngIf=\"showModuleSelector\">\n <mat-label>Module</mat-label>\n <mat-select formControlName=\"module_code\" required>\n <mat-option *ngFor=\"let module of modules\" [value]=\"module.package?.module.code\">\n {{module.package?.module.name}}</mat-option>\n </mat-select>\n <mat-error>Module is required</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n <mat-checkbox formControlName=\"is_global\"> Is Global</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form>" }]
|
|
105
|
+
}], ctorParameters: function () { return [{ type: i1.AlertService }, { type: i1.CredentialsService }, { type: i2.UntypedFormBuilder }, { type: i1.FormValidatorService }, { type: i3.UserConfigService }, { type: i4.MatDialogRef }, { type: undefined, decorators: [{
|
|
106
|
+
type: Inject,
|
|
107
|
+
args: [MAT_DIALOG_DATA]
|
|
108
|
+
}] }, { type: i5.RoleService }]; } });
|
|
109
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZS1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvcm9sZS9yb2xlLWZvcm0uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi9yb2xlL3JvbGUtZm9ybS5odG1sIl0sIm5hbWVzIjpbXS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|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../core";
|
|
4
|
+
import * as i2 from "@angular/router";
|
|
5
|
+
import * as i3 from "@angular/common";
|
|
6
|
+
import * as i4 from "@angular/material/card";
|
|
7
|
+
import * as i5 from "@angular/flex-layout/flex";
|
|
8
|
+
export class RoleViewComponent {
|
|
9
|
+
http;
|
|
10
|
+
errorHandler;
|
|
11
|
+
route;
|
|
12
|
+
role;
|
|
13
|
+
roleId;
|
|
14
|
+
constructor(http, errorHandler, route) {
|
|
15
|
+
this.http = http;
|
|
16
|
+
this.errorHandler = errorHandler;
|
|
17
|
+
this.route = route;
|
|
18
|
+
}
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
this.route.params.subscribe(params => {
|
|
21
|
+
if (params.id !== undefined) {
|
|
22
|
+
this.roleId = params.id;
|
|
23
|
+
this.getRole();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
getRole() {
|
|
28
|
+
try {
|
|
29
|
+
this.http.get(`api/roles/${this.roleId}`).subscribe((result) => {
|
|
30
|
+
this.role = result.item;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
this.errorHandler.handleError(error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleViewComponent, deps: [{ token: i1.HttpService }, { token: i1.ErrorHandlerService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RoleViewComponent, selector: "app-role-view", ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"p-4\">\n <h3 fxLayoutAlign=\"center\" class=\"pb-4\">Role View</h3>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Basic Info.</mat-card-title>\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <div>\n <span class=\"font-weight-bold\">Role:</span> {{role?.label}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Description:</span> {{role?.description}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Is App Role:</span> {{role?.is_global ? 'Yes' : 'No'}}\n </div>\n <div>\n <span class=\"font-weight-bold\"># Users:</span> {{role?.role_users_count}}\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Permissions ({{role?.permissions.length}})</mat-card-title>\n <mat-card-content style=\"height:400px;overflow-y: scroll;\">\n <div fxLayout=\"column wrap\">\n <div *ngFor=\"let permission of role?.permissions;let i=index;\">\n {{i+1}}. {{permission.label}}\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i5.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: i5.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: i5.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: i5.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"] }] });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleViewComponent, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'app-role-view', template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"p-4\">\n <h3 fxLayoutAlign=\"center\" class=\"pb-4\">Role View</h3>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Basic Info.</mat-card-title>\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <div>\n <span class=\"font-weight-bold\">Role:</span> {{role?.label}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Description:</span> {{role?.description}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Is App Role:</span> {{role?.is_global ? 'Yes' : 'No'}}\n </div>\n <div>\n <span class=\"font-weight-bold\"># Users:</span> {{role?.role_users_count}}\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Permissions ({{role?.permissions.length}})</mat-card-title>\n <mat-card-content style=\"height:400px;overflow-y: scroll;\">\n <div fxLayout=\"column wrap\">\n <div *ngFor=\"let permission of role?.permissions;let i=index;\">\n {{i+1}}. {{permission.label}}\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </div>\n</div>\n" }]
|
|
43
|
+
}], ctorParameters: function () { return [{ type: i1.HttpService }, { type: i1.ErrorHandlerService }, { type: i2.ActivatedRoute }]; } });
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZS12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvcm9sZS9yb2xlLXZpZXcvcm9sZS12aWV3LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvcm9sZS9yb2xlLXZpZXcvcm9sZS12aWV3LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7QUFTbEQsTUFBTSxPQUFPLGlCQUFpQjtJQUtsQjtJQUNBO0lBQ0E7SUFOVixJQUFJLENBQU07SUFDVixNQUFNLENBQU07SUFFWixZQUNVLElBQWlCLEVBQ2pCLFlBQWlDLEVBQ2pDLEtBQXFCO1FBRnJCLFNBQUksR0FBSixJQUFJLENBQWE7UUFDakIsaUJBQVksR0FBWixZQUFZLENBQXFCO1FBQ2pDLFVBQUssR0FBTCxLQUFLLENBQWdCO0lBQzNCLENBQUM7SUFFTCxRQUFRO1FBQ04sSUFBSSxDQUFDLEtBQUssQ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ICAgICAgIDwvZGl2PlxuICAgICAgICA8L21hdC1jYXJkLWNvbnRlbnQ+XG4gICAgICA8L21hdC1jYXJkPlxuICAgIDwvZGl2PlxuICAgIDxkaXYgZnhGbGV4Lmx0LW1kPVwiMTAwJVwiIGZ4RmxleD1cIjAgMSBjYWxjKDUwJS0xcmVtKVwiPlxuICAgICAgPG1hdC1jYXJkIGZ4RmxleD1cIjEwMCVcIj5cbiAgICAgICAgPG1hdC1jYXJkLXRpdGxlPlBlcm1pc3Npb25zICh7e3JvbGU/LnBlcm1pc3Npb25zLmxlbmd0aH19KTwvbWF0LWNhcmQtdGl0bGU+XG4gICAgICAgIDxtYXQtY2FyZC1jb250ZW50IHN0eWxlPVwiaGVpZ2h0OjQwMHB4O292ZXJmbG93LXk6IHNjcm9sbDtcIj5cbiAgICAgICAgICA8ZGl2IGZ4TGF5b3V0PVwiY29sdW1uIHdyYXBcIj5cbiAgICAgICAgICAgIDxkaXYgKm5nRm9yPVwibGV0IHBlcm1pc3Npb24gb2Ygcm9sZT8ucGVybWlzc2lvbnM7bGV0IGk9aW5kZXg7XCI+XG4gICAgICAgICAgICAgIHt7aSsxfX0uIHt7cGVybWlzc2lvbi5sYWJlbH19XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9tYXQtY2FyZC1jb250ZW50PlxuICAgICAgPC9tYXQtY2FyZD5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class representation of a Role
|
|
3
|
+
*
|
|
4
|
+
* @author Joshua Kissoon
|
|
5
|
+
* @since 20170710
|
|
6
|
+
*/
|
|
7
|
+
export class Role {
|
|
8
|
+
id;
|
|
9
|
+
slug;
|
|
10
|
+
label;
|
|
11
|
+
module_id;
|
|
12
|
+
selected;
|
|
13
|
+
is_global;
|
|
14
|
+
is_editable;
|
|
15
|
+
/* Related */
|
|
16
|
+
permissions;
|
|
17
|
+
permissionsModel = {};
|
|
18
|
+
module_code;
|
|
19
|
+
constructor() {
|
|
20
|
+
this.permissions = new Array();
|
|
21
|
+
}
|
|
22
|
+
loadFromJson(data) {
|
|
23
|
+
this.id = data.id;
|
|
24
|
+
this.slug = data.slug;
|
|
25
|
+
this.label = data.label;
|
|
26
|
+
this.is_global = data.is_global;
|
|
27
|
+
this.is_editable = data.is_editable;
|
|
28
|
+
if (data.permissions != undefined) {
|
|
29
|
+
this.permissions = data.permissions;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
hasPermission(perm) {
|
|
33
|
+
for (let i in this.permissions) {
|
|
34
|
+
let permission = this.permissions[i];
|
|
35
|
+
if (permission.slug == perm) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
removePermission(perm) {
|
|
42
|
+
for (let key in this.permissions) {
|
|
43
|
+
let permission = this.permissions[key];
|
|
44
|
+
if (permission.slug == perm.slug) {
|
|
45
|
+
let index = this.permissions.indexOf(permission);
|
|
46
|
+
this.permissions.splice(index, 1);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
addPermission(permission) {
|
|
52
|
+
this.permissions.push(permission);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Method that sets up a permissions variable to work as an ngModel
|
|
56
|
+
*
|
|
57
|
+
* @author Joshua Kissoon
|
|
58
|
+
* @since 20161014
|
|
59
|
+
*/
|
|
60
|
+
setupBlankPermissionsForNgModel() {
|
|
61
|
+
for (let perm of this.permissions) {
|
|
62
|
+
this.permissionsModel[perm.slug] = true;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZS5tb2RlbC5qcyIsInNvdXJjZVJvb3Q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NzaW9ucztcbiAgICAgICAgfVxuXG4gICAgfVxuXG4gICAgaGFzUGVybWlzc2lvbihwZXJtOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgICAgICAgZm9yIChsZXQgaSBpbiB0aGlzLnBlcm1pc3Npb25zKSB7XG4gICAgICAgICAgICBsZXQgcGVybWlzc2lvbiA9IHRoaXMucGVybWlzc2lvbnNbaV07XG5cbiAgICAgICAgICAgIGlmIChwZXJtaXNzaW9uLnNsdWcgPT0gcGVybSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIHJlbW92ZVBlcm1pc3Npb24ocGVybTogUGVybWlzc2lvbikge1xuICAgICAgICBmb3IgKGxldCBrZXkgaW4gdGhpcy5wZXJtaXNzaW9ucykge1xuICAgICAgICAgICAgbGV0IHBlcm1pc3Npb24gPSB0aGlzLnBlcm1pc3Npb25zW2tleV07XG5cbiAgICAgICAgICAgIGlmIChwZXJtaXNzaW9uLnNsdWcgPT0gcGVybS5zbHVnKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5wZXJtaXNzaW9ucy5pbmRleE9mKHBlcm1pc3Npb24pO1xuICAgICAgICAgICAgICAgIHRoaXMucGVybWlzc2lvbnMuc3BsaWNlKGluZGV4LCAxKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhZGRQZXJtaXNzaW9uKHBlcm1pc3Npb246IFBlcm1pc3Npb24pIHtcbiAgICAgICAgdGhpcy5wZXJtaXNzaW9ucy5wdXNoKHBlcm1pc3Npb24pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIE1ldGhvZCB0aGF0IHNldHMgdXAgYSBwZXJtaXNzaW9ucyB2YXJpYWJsZSB0byB3b3JrIGFzIGFuIG5nTW9kZWxcbiAgICAgKlxuICAgICAqIEBhdXRob3IgSm9zaHVhIEtpc3Nvb25cbiAgICAgKiBAc2luY2UgMjAxNjEwMTRcbiAgICAgKi9cbiAgICBzZXR1cEJsYW5rUGVybWlzc2lvbnNGb3JOZ01vZGVsKCkge1xuICAgICAgICBmb3IgKGxldCBwZXJtIG9mIHRoaXMucGVybWlzc2lvbnMpIHtcbiAgICAgICAgICAgIHRoaXMucGVybWlzc2lvbnNNb2RlbFtwZXJtLnNsdWddID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
|
|
@@ -13,27 +13,27 @@ import { RoleViewComponent } from './role-view/role-view.component';
|
|
|
13
13
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export class RoleModule {
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
17
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: RoleModule, declarations: [RoleFormComponent,
|
|
18
|
+
RolesViewAllComponent,
|
|
19
|
+
RoleViewComponent], imports: [CommonModule,
|
|
20
|
+
RoleRoutingProvider,
|
|
21
|
+
MaterialModule,
|
|
22
|
+
FlexLayoutModule,
|
|
23
|
+
FormsModule,
|
|
24
|
+
ReactiveFormsModule,
|
|
25
|
+
InfiniteScrollModule,
|
|
26
|
+
MatProgressBarModule], exports: [RolesViewAllComponent] });
|
|
27
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleModule, imports: [CommonModule,
|
|
28
|
+
RoleRoutingProvider,
|
|
29
|
+
MaterialModule,
|
|
30
|
+
FlexLayoutModule,
|
|
31
|
+
FormsModule,
|
|
32
|
+
ReactiveFormsModule,
|
|
33
|
+
InfiniteScrollModule,
|
|
34
|
+
MatProgressBarModule] });
|
|
16
35
|
}
|
|
17
|
-
|
|
18
|
-
RoleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RoleModule, declarations: [RoleFormComponent,
|
|
19
|
-
RolesViewAllComponent,
|
|
20
|
-
RoleViewComponent], imports: [CommonModule,
|
|
21
|
-
RoleRoutingProvider,
|
|
22
|
-
MaterialModule,
|
|
23
|
-
FlexLayoutModule,
|
|
24
|
-
FormsModule,
|
|
25
|
-
ReactiveFormsModule,
|
|
26
|
-
InfiniteScrollModule,
|
|
27
|
-
MatProgressBarModule], exports: [RolesViewAllComponent] });
|
|
28
|
-
RoleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RoleModule, imports: [CommonModule,
|
|
29
|
-
RoleRoutingProvider,
|
|
30
|
-
MaterialModule,
|
|
31
|
-
FlexLayoutModule,
|
|
32
|
-
FormsModule,
|
|
33
|
-
ReactiveFormsModule,
|
|
34
|
-
InfiniteScrollModule,
|
|
35
|
-
MatProgressBarModule] });
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RoleModule, decorators: [{
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleModule, decorators: [{
|
|
37
37
|
type: NgModule,
|
|
38
38
|
args: [{
|
|
39
39
|
imports: [
|
|
@@ -56,4 +56,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
56
56
|
]
|
|
57
57
|
}]
|
|
58
58
|
}] });
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cm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 const routes = [
|
|
|
14
14
|
{ path: '**', redirectTo: '', pathMatch: 'full' },
|
|
15
15
|
];
|
|
16
16
|
export class RoleRoutingProvider {
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleRoutingProvider, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
18
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: RoleRoutingProvider, imports: [i1.RouterModule], exports: [RouterModule] });
|
|
19
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleRoutingProvider, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
RoleRoutingProvider.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RoleRoutingProvider, imports: [i1.RouterModule], exports: [RouterModule] });
|
|
20
|
-
RoleRoutingProvider.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RoleRoutingProvider, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RoleRoutingProvider, decorators: [{
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleRoutingProvider, decorators: [{
|
|
22
22
|
type: NgModule,
|
|
23
23
|
args: [{
|
|
24
24
|
imports: [RouterModule.forChild(routes)],
|
|
25
25
|
exports: [RouterModule]
|
|
26
26
|
}]
|
|
27
27
|
}] });
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZS5yb3V0ZXMuanMiLCJzb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91dGVzKV0sXG4gIGV4cG9ydHM6IFtSb3V0ZXJNb2R1bGVdXG59KVxuZXhwb3J0IGNsYXNzIFJvbGVSb3V0aW5nUHJvdmlkZXIgeyB9XG4iXX0=
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../core";
|
|
4
|
+
export class RoleService {
|
|
5
|
+
http;
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
createRole(role) {
|
|
10
|
+
return this.http.post(`api/roles`, role).toPromise();
|
|
11
|
+
}
|
|
12
|
+
updateRole(role) {
|
|
13
|
+
return this.http.put(`api/roles/${role.id}`, role).toPromise();
|
|
14
|
+
}
|
|
15
|
+
getClientSubscriptions(filters) {
|
|
16
|
+
return this.http.get(`api/client-subscriptions`, { params: filters }).toPromise();
|
|
17
|
+
}
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleService, providedIn: 'root' });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RoleService, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{
|
|
24
|
+
providedIn: 'root'
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: function () { return [{ type: i1.HttpService }]; } });
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjd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