ngx-techlify-core 15.0.2 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/access-control-config/access-control-config-form/access-control-config-form.component.mjs +135 -0
- package/{esm2020 → esm2022}/lib/access-control-config/access-control-config-routing.module.mjs +5 -5
- package/esm2022/lib/access-control-config/access-control-config.component.mjs +137 -0
- package/esm2022/lib/access-control-config/access-control-config.model.mjs +34 -0
- package/{esm2020 → esm2022}/lib/access-control-config/access-control-config.module.mjs +24 -24
- package/esm2022/lib/access-control-config/access-control-config.service.mjs +32 -0
- package/esm2022/lib/action-popup/action-popup.component.mjs +36 -0
- package/{esm2020 → esm2022}/lib/action-popup/action-popup.model.mjs +4 -1
- package/{esm2020 → esm2022}/lib/action-popup/action-popup.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-for-model/audit-log-for-model-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-for-model/audit-log-for-model.component.mjs +54 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-for-model/audit-log-for-model.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list/audit-log-list-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-list/audit-log-list.component.mjs +146 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list/audit-log-list.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list-filter/audit-log-list-filter-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.mjs +79 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view/audit-log-view-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-view/audit-log-view.component.mjs +55 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view/audit-log-view.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view-model/audit-log-view-model-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-log-view-model/audit-log-view-model.component.mjs +60 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-log-view-model/audit-log-view-model.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/audit-log/audit-log.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/audit-log/audit-logs-view-model/audit-logs-view-model-routing.module.mjs +5 -5
- package/esm2022/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.mjs +40 -0
- package/{esm2020 → esm2022}/lib/audit-log/audit-logs-view-model/audit-logs-view-model.module.mjs +11 -11
- package/esm2022/lib/base-model/techlify-form-component.class.mjs +52 -0
- package/esm2022/lib/base-model/techlify-listing-component.class.mjs +64 -0
- package/esm2022/lib/base-model/techlify-service.class.mjs +69 -0
- package/{esm2020 → esm2022}/lib/change-password/change-password-routing.module.mjs +5 -5
- package/esm2022/lib/change-password/change-password.component.mjs +96 -0
- package/{esm2020 → esm2022}/lib/change-password/change-password.module.mjs +19 -19
- package/esm2022/lib/column-selector/column-selector/column-selector.component.mjs +36 -0
- package/{esm2020 → esm2022}/lib/column-selector/column-selector.module.mjs +13 -13
- package/esm2022/lib/core/alert.service.mjs +39 -0
- package/esm2022/lib/core/api-prefix.interceptor.mjs +27 -0
- package/esm2022/lib/core/authentication.guard.mjs +37 -0
- package/esm2022/lib/core/authentication.service.mjs +65 -0
- package/esm2022/lib/core/cache.interceptor.mjs +59 -0
- package/esm2022/lib/core/config.service.mjs +46 -0
- package/esm2022/lib/core/core.module.mjs +63 -0
- package/esm2022/lib/core/credentials.service.mjs +80 -0
- package/esm2022/lib/core/dataManager.service.mjs +120 -0
- package/esm2022/lib/core/error-handler.interceptor.mjs +50 -0
- package/esm2022/lib/core/error-handler.service.mjs +57 -0
- package/esm2022/lib/core/filter.service.mjs +39 -0
- package/{esm2020 → esm2022}/lib/core/form-validator.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/core/header.interceptor.mjs +4 -4
- package/esm2022/lib/core/http-cache.service.mjs +110 -0
- package/esm2022/lib/core/http.service.mjs +89 -0
- package/esm2022/lib/core/logger.service.mjs +101 -0
- package/{esm2020 → esm2022}/lib/core/route-reusable-strategy.mjs +4 -4
- package/esm2022/lib/core/snack/snack.component.mjs +35 -0
- package/{esm2020 → esm2022}/lib/core/snack/snack.module.mjs +11 -11
- package/esm2022/lib/core/storage.service.mjs +38 -0
- package/esm2022/lib/core/techlify-config.model.mjs +30 -0
- package/esm2022/lib/core/token.interceptor.mjs +29 -0
- package/esm2022/lib/data-table/data-table.component.mjs +211 -0
- package/esm2022/lib/data-table/data-table.model.mjs +46 -0
- package/{esm2020 → esm2022}/lib/data-table/data-table.module.mjs +11 -11
- package/esm2022/lib/document-viewer/document-viewer.component.mjs +69 -0
- package/{esm2020 → esm2022}/lib/document-viewer/document-viewer.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/document-viewer/viewer-config.model.mjs +4 -1
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-for-user/email-subscription-for-user-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.mjs +77 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.mjs +118 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.mjs +164 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.mjs +114 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.mjs +169 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter-routing.module.mjs +5 -5
- package/esm2022/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.mjs +54 -0
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/email-subscription/email-subscription.module.mjs +7 -7
- package/esm2022/lib/entity-files/entity-file-form/entity-file-form.component.mjs +174 -0
- package/esm2022/lib/entity-files/entity-file.service.mjs +37 -0
- package/esm2022/lib/entity-files/entity-files-view-all.component.mjs +364 -0
- package/{esm2020 → esm2022}/lib/entity-files/entity-files-view-all.module.mjs +29 -29
- package/esm2022/lib/export-excel/export-excel-button/export-excel-button.component.mjs +31 -0
- package/{esm2020 → esm2022}/lib/export-excel/export-excel.module.mjs +7 -7
- package/esm2022/lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop-uploader.component.mjs +92 -0
- package/{esm2020 → esm2022}/lib/file-dragdrop-uploader/file-dragdrop-uploader.module.mjs +13 -13
- package/esm2022/lib/file-dropper/file-dropper.component.mjs +129 -0
- package/esm2022/lib/file-dropper/file-dropper.model.mjs +11 -0
- package/{esm2020 → esm2022}/lib/file-dropper/file-dropper.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/forgot-password/forgot-password-routing.module.mjs +5 -5
- package/esm2022/lib/forgot-password/forgot-password.component.mjs +81 -0
- package/{esm2020 → esm2022}/lib/forgot-password/forgot-password.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/import-csv/data-import/data-import.component.mjs +5 -4
- package/esm2022/lib/import-csv/failed-items-list/failed-items-list.component.mjs +38 -0
- package/esm2022/lib/import-csv/field-mapping/field-mapping.component.mjs +160 -0
- package/esm2022/lib/import-csv/import-csv.component.mjs +207 -0
- package/{esm2020 → esm2022}/lib/import-csv/import-csv.module.mjs +28 -28
- package/esm2022/lib/import-csv/import-history-list/import-history-list.component.mjs +75 -0
- package/esm2022/lib/import-csv/import-success/import-success.component.mjs +26 -0
- package/{esm2020 → esm2022}/lib/ip-address-selector/ip-address-selector.module.mjs +17 -17
- package/esm2022/lib/ip-address-selector/ip-range-selector/ip-range-selector.component.mjs +108 -0
- package/esm2022/lib/loader/loader.component.mjs +23 -0
- package/{esm2020 → esm2022}/lib/loader/loader.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/login/login-routing.module.mjs +5 -5
- package/esm2022/lib/login/login.component.mjs +170 -0
- package/{esm2020 → esm2022}/lib/login/login.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/login-history-for-user/login-history-for-user-routing.module.mjs +5 -5
- package/esm2022/lib/login-history-for-user/login-history-for-user.component.mjs +96 -0
- package/{esm2020 → esm2022}/lib/login-history-for-user/login-history-for-user.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/material.module.mjs +53 -53
- package/{esm2020 → esm2022}/lib/ngx-techlify-users/ngx-techlify-users-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/ngx-techlify-users/ngx-techlify-users.module.mjs +7 -7
- package/esm2022/lib/note/comment-form/comment-form.component.mjs +82 -0
- package/esm2022/lib/note/note-form/note-form.component.mjs +88 -0
- package/esm2022/lib/note/note-list/note-list.component.mjs +153 -0
- package/{esm2020 → esm2022}/lib/note/note.module.mjs +19 -19
- package/esm2022/lib/note/note.service.mjs +30 -0
- package/esm2022/lib/number-input-button/number-input-button/number-input-button.component.mjs +104 -0
- package/{esm2020 → esm2022}/lib/number-input-button/number-input-button.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/password-requirement-check/password-check.service.mjs +4 -4
- package/esm2022/lib/password-requirement-check/password-requirement-check/password-requirement-check.component.mjs +50 -0
- package/{esm2020 → esm2022}/lib/password-requirement-check/password-requirement-check.module.mjs +5 -5
- package/esm2022/lib/profile/profile-edit.component.mjs +84 -0
- package/{esm2020 → esm2022}/lib/profile/profile-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/profile/profile.module.mjs +11 -11
- package/esm2022/lib/read-more/read-more.component.mjs +44 -0
- package/{esm2020 → esm2022}/lib/read-more/read-more.module.mjs +9 -9
- package/esm2022/lib/request-helper/request-helper.service.mjs +107 -0
- package/esm2022/lib/restrictors/restrictor-level-selector/restrictor-level-selector/restrictor-level-selector.component.mjs +93 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictor-level-selector/restrictor-level-selector.module.mjs +11 -11
- package/esm2022/lib/restrictors/restrictor-level-selector/restrictor-level.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictor-status-selector/restrictor-status-selector/restrictor-status-selector.component.mjs +93 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictor-status-selector/restrictor-status-selector.module.mjs +9 -9
- package/esm2022/lib/restrictors/restrictor-status-selector/restrictor-status.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictor-type-selector/restrictor-type-selector/restrictor-type-selector.component.mjs +94 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictor-type-selector/restrictor-type-selector.module.mjs +11 -11
- package/esm2022/lib/restrictors/restrictor-type-selector/restrictor-type.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictor.service.mjs +20 -0
- package/esm2022/lib/restrictors/restrictors-form/restrictors-form.component.mjs +111 -0
- package/esm2022/lib/restrictors/restrictors-form-page/restrictors-form-page.component.mjs +49 -0
- package/esm2022/lib/restrictors/restrictors-list-page/restrictors-list-page.component.mjs +152 -0
- package/{esm2020 → esm2022}/lib/restrictors/restrictors-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/restrictors/restrictors.module.mjs +43 -43
- package/{esm2020 → esm2022}/lib/role/permission/permission.model.mjs +4 -1
- package/{esm2020 → esm2022}/lib/role/permission/permission.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/role/permission/permission.routes.mjs +5 -5
- package/esm2022/lib/role/permission/permissions-management.component.mjs +127 -0
- package/esm2022/lib/role/role-form.component.mjs +109 -0
- package/esm2022/lib/role/role-view/role-view.component.mjs +44 -0
- package/esm2022/lib/role/role.model.mjs +66 -0
- package/{esm2020 → esm2022}/lib/role/role.module.mjs +21 -21
- package/{esm2020 → esm2022}/lib/role/role.routes.mjs +5 -5
- package/esm2022/lib/role/role.service.mjs +27 -0
- package/esm2022/lib/role/roles-view-all.component.mjs +140 -0
- package/esm2022/lib/searchable-selector/searchable-selector.component.mjs +365 -0
- package/{esm2020 → esm2022}/lib/searchable-selector/searchable-selector.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/signup/signup-routing.module.mjs +5 -5
- package/esm2022/lib/signup/signup.component.mjs +87 -0
- package/{esm2020 → esm2022}/lib/signup/signup.module.mjs +11 -11
- package/esm2022/lib/techlify-company-switcher/techlify-company-switcher/techlify-company-switcher.component.mjs +73 -0
- package/{esm2020 → esm2022}/lib/techlify-company-switcher/techlify-company-switcher.module.mjs +9 -9
- package/esm2022/lib/techlify-feature/on-off-switch/on-off-switch.component.mjs +27 -0
- package/esm2022/lib/techlify-feature/techlify-feature-enabled.directive.mjs +79 -0
- package/esm2022/lib/techlify-feature/techlify-feature-listing.component.mjs +179 -0
- package/{esm2020 → esm2022}/lib/techlify-feature/techlify-feature.module.mjs +17 -17
- package/esm2022/lib/techlify-feature/techlify-feature.service.mjs +27 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.mjs +109 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.component.mjs +90 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard.component.mjs +180 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form.component.mjs +131 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list.component.mjs +186 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.component.mjs +72 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber.module.mjs +19 -19
- package/esm2022/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscription-entity.model.mjs +6 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form.component.mjs +111 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list.component.mjs +171 -0
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-type/techlify-notification-type.module.mjs +17 -17
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification-user-status.model.mjs +3 -3
- package/{esm2020 → esm2022}/lib/techlify-notifications/techlify-notification.module.mjs +7 -7
- package/esm2022/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.mjs +24 -0
- package/esm2022/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.mjs +301 -0
- package/{esm2020 → esm2022}/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.module.mjs +13 -13
- package/esm2022/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.mjs +189 -0
- package/{esm2020 → esm2022}/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.module.mjs +17 -17
- package/esm2022/lib/techlify-update/techlify-update-form/techlify-update-form.component.mjs +124 -0
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-form/techlify-update-form.module.mjs +13 -13
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-history/techlify-update-history-routing.module.mjs +5 -5
- package/esm2022/lib/techlify-update/techlify-update-history/techlify-update-history.component.mjs +151 -0
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-history/techlify-update-history.module.mjs +19 -19
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update-routing.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-update.module.mjs +21 -21
- package/esm2022/lib/techlify-update/techlify-update.service.mjs +42 -0
- package/esm2022/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.mjs +169 -0
- package/esm2022/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.component.mjs +63 -0
- package/{esm2020 → esm2022}/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.module.mjs +11 -11
- package/esm2022/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.mjs +85 -0
- package/esm2022/lib/techlify-update/update-notifier/update-notifier.component.mjs +57 -0
- package/{esm2020 → esm2022}/lib/techlify-update/update-notifier/update-notifier.module.mjs +13 -13
- package/esm2022/lib/techlify-update/update-view/update-view.component.mjs +43 -0
- package/{esm2020 → esm2022}/lib/techlify-update/update-view/update-view.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/timeline-filter/timeline-filter-routing.module.mjs +5 -5
- package/esm2022/lib/timeline-filter/timeline-filter.component.mjs +253 -0
- package/{esm2020 → esm2022}/lib/timeline-filter/timeline-filter.module.mjs +25 -25
- package/esm2022/lib/timeline-filter/timeline.model.mjs +18 -0
- package/esm2022/lib/user/current-user.service.mjs +155 -0
- package/esm2022/lib/user/user-enable-button-component/user-enable-button.component.mjs +65 -0
- package/esm2022/lib/user/user-explore.component.mjs +55 -0
- package/esm2022/lib/user/user-form.component.mjs +234 -0
- package/esm2022/lib/user/user-view.component.mjs +76 -0
- package/esm2022/lib/user/user.model.mjs +49 -0
- package/{esm2020 → esm2022}/lib/user/user.module.mjs +42 -42
- package/{esm2020 → esm2022}/lib/user/user.routes.mjs +5 -5
- package/esm2022/lib/user/user.service.mjs +42 -0
- package/esm2022/lib/user/users-view-all.component.mjs +226 -0
- package/esm2022/lib/user-config/user-config.model.mjs +81 -0
- package/esm2022/lib/user-config/user-config.service.mjs +68 -0
- package/esm2022/lib/user-selector/user-data.service.mjs +37 -0
- package/esm2022/lib/user-selector/user-selector.component.mjs +100 -0
- package/{esm2020 → esm2022}/lib/user-selector/user-selector.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/utility/date-utils.service.mjs +4 -4
- package/esm2022/lib/utility/num-items-selector.component.mjs +33 -0
- package/esm2022/lib/utility/number-selector.component.mjs +46 -0
- package/{esm2020 → esm2022}/lib/utility/utility.module.mjs +7 -7
- package/{fesm2020 → fesm2022}/ngx-techlify-core.mjs +3117 -2394
- package/{fesm2020 → fesm2022}/ngx-techlify-core.mjs.map +1 -1
- package/lib/audit-log/audit-log-for-model/audit-log-for-model.component.d.ts +1 -1
- package/lib/audit-log/audit-log-list/audit-log-list.component.d.ts +1 -1
- package/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.d.ts +1 -1
- package/lib/column-selector/column-selector/column-selector.component.d.ts +1 -1
- package/lib/data-table/data-table.component.d.ts +1 -1
- package/lib/document-viewer/document-viewer.component.d.ts +1 -1
- package/lib/entity-files/entity-files-view-all.component.d.ts +1 -1
- package/lib/export-excel/export-excel-button/export-excel-button.component.d.ts +1 -1
- package/lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop-uploader.component.d.ts +1 -1
- package/lib/file-dropper/file-dropper.component.d.ts +1 -1
- package/lib/import-csv/data-import/data-import.component.d.ts +1 -1
- package/lib/import-csv/failed-items-list/failed-items-list.component.d.ts +1 -1
- package/lib/import-csv/field-mapping/field-mapping.component.d.ts +1 -1
- package/lib/import-csv/import-csv.component.d.ts +1 -1
- package/lib/import-csv/import-history-list/import-history-list.component.d.ts +1 -1
- package/lib/import-csv/import-success/import-success.component.d.ts +1 -1
- package/lib/ip-address-selector/ip-range-selector/ip-range-selector.component.d.ts +1 -1
- package/lib/loader/loader.component.d.ts +1 -1
- package/lib/login-history-for-user/login-history-for-user.component.d.ts +1 -1
- package/lib/note/comment-form/comment-form.component.d.ts +1 -1
- package/lib/note/note-list/note-list.component.d.ts +1 -1
- package/lib/number-input-button/number-input-button/number-input-button.component.d.ts +1 -1
- package/lib/password-requirement-check/password-requirement-check/password-requirement-check.component.d.ts +1 -1
- package/lib/read-more/read-more.component.d.ts +1 -1
- package/lib/restrictors/restrictor-level-selector/restrictor-level-selector/restrictor-level-selector.component.d.ts +1 -1
- package/lib/restrictors/restrictor-status-selector/restrictor-status-selector/restrictor-status-selector.component.d.ts +1 -1
- package/lib/restrictors/restrictor-type-selector/restrictor-type-selector/restrictor-type-selector.component.d.ts +1 -1
- package/lib/restrictors/restrictors-form/restrictors-form.component.d.ts +1 -1
- package/lib/role/permission/permissions-management.component.d.ts +1 -1
- package/lib/role/roles-view-all.component.d.ts +1 -1
- package/lib/searchable-selector/searchable-selector.component.d.ts +1 -1
- package/lib/techlify-feature/on-off-switch/on-off-switch.component.d.ts +1 -1
- package/lib/techlify-feature/techlify-feature-enabled.directive.d.ts +1 -1
- package/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.component.d.ts +1 -1
- package/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.component.d.ts +1 -1
- package/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.d.ts +1 -1
- package/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.d.ts +1 -1
- package/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.component.d.ts +1 -1
- package/lib/techlify-update/update-notifier/update-notifier.component.d.ts +1 -1
- package/lib/timeline-filter/timeline-filter.component.d.ts +1 -1
- package/lib/user/user-enable-button-component/user-enable-button.component.d.ts +1 -1
- package/lib/user/user-form.component.d.ts +1 -1
- package/lib/user/users-view-all.component.d.ts +1 -1
- package/lib/user-selector/user-selector.component.d.ts +1 -1
- package/lib/utility/num-items-selector.component.d.ts +1 -1
- package/lib/utility/number-selector.component.d.ts +1 -1
- package/package.json +19 -25
- package/esm2020/lib/access-control-config/access-control-config-form/access-control-config-form.component.mjs +0 -127
- package/esm2020/lib/access-control-config/access-control-config.component.mjs +0 -131
- package/esm2020/lib/access-control-config/access-control-config.model.mjs +0 -21
- package/esm2020/lib/access-control-config/access-control-config.service.mjs +0 -31
- package/esm2020/lib/action-popup/action-popup.component.mjs +0 -34
- package/esm2020/lib/audit-log/audit-log-for-model/audit-log-for-model.component.mjs +0 -51
- package/esm2020/lib/audit-log/audit-log-list/audit-log-list.component.mjs +0 -139
- package/esm2020/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.mjs +0 -74
- package/esm2020/lib/audit-log/audit-log-view/audit-log-view.component.mjs +0 -51
- package/esm2020/lib/audit-log/audit-log-view-model/audit-log-view-model.component.mjs +0 -56
- package/esm2020/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.mjs +0 -37
- package/esm2020/lib/base-model/techlify-form-component.class.mjs +0 -49
- package/esm2020/lib/base-model/techlify-listing-component.class.mjs +0 -65
- package/esm2020/lib/base-model/techlify-service.class.mjs +0 -68
- package/esm2020/lib/change-password/change-password.component.mjs +0 -87
- package/esm2020/lib/column-selector/column-selector/column-selector.component.mjs +0 -37
- package/esm2020/lib/core/alert.service.mjs +0 -38
- package/esm2020/lib/core/api-prefix.interceptor.mjs +0 -26
- package/esm2020/lib/core/authentication.guard.mjs +0 -35
- package/esm2020/lib/core/authentication.service.mjs +0 -62
- package/esm2020/lib/core/cache.interceptor.mjs +0 -58
- package/esm2020/lib/core/config.service.mjs +0 -45
- package/esm2020/lib/core/core.module.mjs +0 -63
- package/esm2020/lib/core/credentials.service.mjs +0 -79
- package/esm2020/lib/core/dataManager.service.mjs +0 -119
- package/esm2020/lib/core/error-handler.interceptor.mjs +0 -48
- package/esm2020/lib/core/error-handler.service.mjs +0 -55
- package/esm2020/lib/core/filter.service.mjs +0 -37
- package/esm2020/lib/core/http-cache.service.mjs +0 -107
- package/esm2020/lib/core/http.service.mjs +0 -84
- package/esm2020/lib/core/logger.service.mjs +0 -100
- package/esm2020/lib/core/snack/snack.component.mjs +0 -33
- package/esm2020/lib/core/storage.service.mjs +0 -38
- package/esm2020/lib/core/techlify-config.model.mjs +0 -28
- package/esm2020/lib/core/token.interceptor.mjs +0 -28
- package/esm2020/lib/data-table/data-table.component.mjs +0 -204
- package/esm2020/lib/data-table/data-table.model.mjs +0 -11
- package/esm2020/lib/document-viewer/document-viewer.component.mjs +0 -65
- package/esm2020/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.mjs +0 -76
- package/esm2020/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.mjs +0 -105
- package/esm2020/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.mjs +0 -161
- package/esm2020/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.mjs +0 -101
- package/esm2020/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.mjs +0 -165
- package/esm2020/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.mjs +0 -52
- package/esm2020/lib/entity-files/entity-file-form/entity-file-form.component.mjs +0 -161
- package/esm2020/lib/entity-files/entity-file.service.mjs +0 -36
- package/esm2020/lib/entity-files/entity-files-view-all.component.mjs +0 -346
- package/esm2020/lib/export-excel/export-excel-button/export-excel-button.component.mjs +0 -32
- package/esm2020/lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop-uploader.component.mjs +0 -90
- package/esm2020/lib/file-dropper/file-dropper.component.mjs +0 -125
- package/esm2020/lib/file-dropper/file-dropper.model.mjs +0 -3
- package/esm2020/lib/forgot-password/forgot-password.component.mjs +0 -69
- package/esm2020/lib/import-csv/failed-items-list/failed-items-list.component.mjs +0 -35
- package/esm2020/lib/import-csv/field-mapping/field-mapping.component.mjs +0 -153
- package/esm2020/lib/import-csv/import-csv.component.mjs +0 -199
- package/esm2020/lib/import-csv/import-history-list/import-history-list.component.mjs +0 -71
- package/esm2020/lib/import-csv/import-success/import-success.component.mjs +0 -24
- package/esm2020/lib/ip-address-selector/ip-range-selector/ip-range-selector.component.mjs +0 -109
- package/esm2020/lib/loader/loader.component.mjs +0 -23
- package/esm2020/lib/login/login.component.mjs +0 -153
- package/esm2020/lib/login-history-for-user/login-history-for-user.component.mjs +0 -92
- package/esm2020/lib/note/comment-form/comment-form.component.mjs +0 -77
- package/esm2020/lib/note/note-form/note-form.component.mjs +0 -79
- package/esm2020/lib/note/note-list/note-list.component.mjs +0 -148
- package/esm2020/lib/note/note.service.mjs +0 -29
- package/esm2020/lib/number-input-button/number-input-button/number-input-button.component.mjs +0 -104
- package/esm2020/lib/password-requirement-check/password-requirement-check/password-requirement-check.component.mjs +0 -47
- package/esm2020/lib/profile/profile-edit.component.mjs +0 -75
- package/esm2020/lib/read-more/read-more.component.mjs +0 -43
- package/esm2020/lib/request-helper/request-helper.service.mjs +0 -105
- package/esm2020/lib/restrictors/restrictor-level-selector/restrictor-level-selector/restrictor-level-selector.component.mjs +0 -91
- package/esm2020/lib/restrictors/restrictor-level-selector/restrictor-level.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictor-status-selector/restrictor-status-selector/restrictor-status-selector.component.mjs +0 -91
- package/esm2020/lib/restrictors/restrictor-status-selector/restrictor-status.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictor-type-selector/restrictor-type-selector/restrictor-type-selector.component.mjs +0 -92
- package/esm2020/lib/restrictors/restrictor-type-selector/restrictor-type.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictor.service.mjs +0 -19
- package/esm2020/lib/restrictors/restrictors-form/restrictors-form.component.mjs +0 -102
- package/esm2020/lib/restrictors/restrictors-form-page/restrictors-form-page.component.mjs +0 -44
- package/esm2020/lib/restrictors/restrictors-list-page/restrictors-list-page.component.mjs +0 -143
- package/esm2020/lib/role/permission/permissions-management.component.mjs +0 -114
- package/esm2020/lib/role/role-form.component.mjs +0 -99
- package/esm2020/lib/role/role-view/role-view.component.mjs +0 -39
- package/esm2020/lib/role/role.model.mjs +0 -56
- package/esm2020/lib/role/role.service.mjs +0 -26
- package/esm2020/lib/role/roles-view-all.component.mjs +0 -131
- package/esm2020/lib/searchable-selector/searchable-selector.component.mjs +0 -348
- package/esm2020/lib/signup/signup.component.mjs +0 -78
- package/esm2020/lib/techlify-company-switcher/techlify-company-switcher/techlify-company-switcher.component.mjs +0 -68
- package/esm2020/lib/techlify-feature/on-off-switch/on-off-switch.component.mjs +0 -24
- package/esm2020/lib/techlify-feature/techlify-feature-enabled.directive.mjs +0 -73
- package/esm2020/lib/techlify-feature/techlify-feature-listing.component.mjs +0 -169
- package/esm2020/lib/techlify-feature/techlify-feature.service.mjs +0 -26
- package/esm2020/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.mjs +0 -103
- package/esm2020/lib/techlify-notifications/techlify-notification-for-user/techlify-notification-for-user.component.mjs +0 -86
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notfication-subscriber-dashboard/techlify-notfication-subscriber-dashboard.component.mjs +0 -173
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-form/techlify-notification-subscriber-form.component.mjs +0 -117
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list/techlify-notification-subscriber-list.component.mjs +0 -180
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscriber-list-filter/techlify-notification-subscriber-list-filter.component.mjs +0 -69
- package/esm2020/lib/techlify-notifications/techlify-notification-subscriber/techlify-notification-subscription-entity.model.mjs +0 -6
- package/esm2020/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-form/techlify-notification-type-form.component.mjs +0 -99
- package/esm2020/lib/techlify-notifications/techlify-notification-type/techlify-notification-type-list/techlify-notification-type-list.component.mjs +0 -166
- package/esm2020/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.mjs +0 -15
- package/esm2020/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.mjs +0 -285
- package/esm2020/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.mjs +0 -180
- package/esm2020/lib/techlify-update/techlify-update-form/techlify-update-form.component.mjs +0 -116
- package/esm2020/lib/techlify-update/techlify-update-history/techlify-update-history.component.mjs +0 -145
- package/esm2020/lib/techlify-update/techlify-update.service.mjs +0 -41
- package/esm2020/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.mjs +0 -163
- package/esm2020/lib/techlify-update/techlify-updates-teaser/techlify-updates-teaser.component.mjs +0 -60
- package/esm2020/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.mjs +0 -77
- package/esm2020/lib/techlify-update/update-notifier/update-notifier.component.mjs +0 -53
- package/esm2020/lib/techlify-update/update-view/update-view.component.mjs +0 -38
- package/esm2020/lib/timeline-filter/timeline-filter.component.mjs +0 -243
- package/esm2020/lib/timeline-filter/timeline.model.mjs +0 -18
- package/esm2020/lib/user/current-user.service.mjs +0 -151
- package/esm2020/lib/user/user-enable-button-component/user-enable-button.component.mjs +0 -59
- package/esm2020/lib/user/user-explore.component.mjs +0 -50
- package/esm2020/lib/user/user-form.component.mjs +0 -219
- package/esm2020/lib/user/user-view.component.mjs +0 -68
- package/esm2020/lib/user/user.model.mjs +0 -30
- package/esm2020/lib/user/user.service.mjs +0 -41
- package/esm2020/lib/user/users-view-all.component.mjs +0 -212
- package/esm2020/lib/user-config/user-config.model.mjs +0 -50
- package/esm2020/lib/user-config/user-config.service.mjs +0 -65
- package/esm2020/lib/user-selector/user-data.service.mjs +0 -35
- package/esm2020/lib/user-selector/user-selector.component.mjs +0 -91
- package/esm2020/lib/utility/num-items-selector.component.mjs +0 -31
- package/esm2020/lib/utility/number-selector.component.mjs +0 -42
- package/fesm2015/ngx-techlify-core.mjs +0 -13476
- package/fesm2015/ngx-techlify-core.mjs.map +0 -1
- /package/{esm2020 → esm2022}/lib/action-popup/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/base-model/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/column-selector/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/core/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/data-table/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/date-validator.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/document-viewer/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-for-user/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-type/email-subscription-type-list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/entity-files/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/file-dropper/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/forgot-password/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/import-csv/import-csv-config.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/loader/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/login/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/note/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/number-input-button/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/password-requirement-check/password-check-result.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/profile/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/restrictors/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/role/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/searchable-selector/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/signup/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/techlify-company-switcher/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/techlify-feature/techlify-feature.routing.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/techlify-notifications/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/timeline-filter/calculate-timeline.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/timeline-filter/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user/user-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user-config/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/user-selector/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/utility/index.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-techlify-core.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/forms";
|
|
4
|
-
import * as i2 from "../../core/credentials.service";
|
|
5
|
-
import * as i3 from "@angular/common";
|
|
6
|
-
import * as i4 from "@angular/flex-layout/flex";
|
|
7
|
-
import * as i5 from "@angular/flex-layout/extended";
|
|
8
|
-
import * as i6 from "@angular/material/button";
|
|
9
|
-
import * as i7 from "@angular/material/form-field";
|
|
10
|
-
import * as i8 from "@angular/material/icon";
|
|
11
|
-
import * as i9 from "@angular/material/input";
|
|
12
|
-
import * as i10 from "../../read-more/read-more.component";
|
|
13
|
-
export class CommentFormComponent {
|
|
14
|
-
set commentData(data) {
|
|
15
|
-
this.view = !!data;
|
|
16
|
-
this._commentData = data;
|
|
17
|
-
this.commentFormGroup.patchValue(data);
|
|
18
|
-
}
|
|
19
|
-
constructor(fb, credentialService) {
|
|
20
|
-
this.fb = fb;
|
|
21
|
-
this.credentialService = credentialService;
|
|
22
|
-
this.action = new EventEmitter();
|
|
23
|
-
this.createForm();
|
|
24
|
-
}
|
|
25
|
-
ngOnInit() { }
|
|
26
|
-
get isLoggedIn() {
|
|
27
|
-
return this.credentialService.isAuthenticated;
|
|
28
|
-
}
|
|
29
|
-
get currentUser() {
|
|
30
|
-
return this.credentialService.credentials.user;
|
|
31
|
-
}
|
|
32
|
-
createForm() {
|
|
33
|
-
//TODO: Finialize and add more validations.
|
|
34
|
-
this.commentFormGroup = this.fb.group({
|
|
35
|
-
id: [""],
|
|
36
|
-
note: [""],
|
|
37
|
-
model_type: [""],
|
|
38
|
-
related_model_id: [""],
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
submit() {
|
|
42
|
-
if (this.commentFormGroup.get("note").value) {
|
|
43
|
-
if (this._commentData) {
|
|
44
|
-
this.view = !this.view;
|
|
45
|
-
}
|
|
46
|
-
this.action.emit({ type: "save", value: this.commentFormGroup.value });
|
|
47
|
-
this.commentFormGroup.reset();
|
|
48
|
-
}
|
|
49
|
-
else if (this.commentFormGroup.get("id").value) {
|
|
50
|
-
this.deleteComment();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
hideEdit() {
|
|
54
|
-
if (this.commentFormGroup.get("id").value) {
|
|
55
|
-
this.view = !this.view;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
editComment() {
|
|
59
|
-
this.view = !this.view;
|
|
60
|
-
this.commentFormGroup.patchValue(this._commentData);
|
|
61
|
-
}
|
|
62
|
-
deleteComment() {
|
|
63
|
-
this.action.emit({ type: "delete", value: this.commentFormGroup.value });
|
|
64
|
-
}
|
|
65
|
-
ngOnDestroy() { }
|
|
66
|
-
}
|
|
67
|
-
CommentFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommentFormComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.CredentialsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
-
CommentFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CommentFormComponent, selector: "app-comment-form", inputs: { commentData: "commentData" }, outputs: { action: "action" }, ngImport: i0, template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"commentFormGroup\">\n <div fxLayout=\"column\" class=\"my-2\" [ngClass]=\"{ 'border border-primary shadow rounded ': view}\">\n <div *ngIf=\"!view\" fxLayout=\"column\">\n <mat-form-field appearance=\"outline\" style=\"background-color:white;\">\n <mat-label>Comment</mat-label>\n <textarea matInput rows=\"5\" placeholder=\"Add a comment...\" formControlName=\"note\" autocomplete=\"off\"></textarea>\n </mat-form-field>\n\n <div fxLayout fxLayoutGap=\"1rem\" class=\"mt-2\">\n <span fxFlex></span>\n <button *ngIf=\"_commentData\" mat-button type=\"button\" (click)=\"view = !view\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" type=\"submit\">\n {{ _commentData ? \"Update\" : \"Post comment\" }}\n </button>\n </div>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"view\" class=\"p-2 m-2\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\".5rem\">\n <div fxFlex=\"20%\" fxLayoutAlign=\"start\">\n <button mat-icon-button type=\"button\" style=\"color:grey\">\n <mat-icon style=\"font-size:60px\">account_circle</mat-icon>\n </button>\n </div>\n <div fxFlex=\"75%\">\n <div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div class=\"font-weight-bold\">{{ _commentData?.creator?.name }}</div>\n <div class=\"text-muted\">{{ _commentData.updated_at | date:'medium' }}</div>\n </div>\n </div>\n </div>\n <app-read-more class=\"mt-2\" [text]=\"_commentData.note\"></app-read-more>\n <div fxLayout class=\"mt-1\" fxLayoutGap=\"1rem\" *ngIf=\"isLoggedIn && currentUser.id === _commentData.creator_id\">\n <a href=\"javascript:;\" (click)=\"editComment()\">\n Edit\n </a>\n <a href=\"javascript:;\" (click)=\"deleteComment()\">\n Delete\n </a>\n </div>\n </div>\n </div>\n</form>", styles: [":host ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important;margin:0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.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: i4.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: i4.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: i4.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: i5.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.ReadMoreComponent, selector: "app-read-more", inputs: ["text", "maxLength"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] });
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommentFormComponent, decorators: [{
|
|
70
|
-
type: Component,
|
|
71
|
-
args: [{ selector: "app-comment-form", template: "<form (ngSubmit)=\"submit()\" [formGroup]=\"commentFormGroup\">\n <div fxLayout=\"column\" class=\"my-2\" [ngClass]=\"{ 'border border-primary shadow rounded ': view}\">\n <div *ngIf=\"!view\" fxLayout=\"column\">\n <mat-form-field appearance=\"outline\" style=\"background-color:white;\">\n <mat-label>Comment</mat-label>\n <textarea matInput rows=\"5\" placeholder=\"Add a comment...\" formControlName=\"note\" autocomplete=\"off\"></textarea>\n </mat-form-field>\n\n <div fxLayout fxLayoutGap=\"1rem\" class=\"mt-2\">\n <span fxFlex></span>\n <button *ngIf=\"_commentData\" mat-button type=\"button\" (click)=\"view = !view\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" type=\"submit\">\n {{ _commentData ? \"Update\" : \"Post comment\" }}\n </button>\n </div>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"view\" class=\"p-2 m-2\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\".5rem\">\n <div fxFlex=\"20%\" fxLayoutAlign=\"start\">\n <button mat-icon-button type=\"button\" style=\"color:grey\">\n <mat-icon style=\"font-size:60px\">account_circle</mat-icon>\n </button>\n </div>\n <div fxFlex=\"75%\">\n <div fxLayout=\"column\" fxLayoutGap=\".5rem\">\n <div class=\"font-weight-bold\">{{ _commentData?.creator?.name }}</div>\n <div class=\"text-muted\">{{ _commentData.updated_at | date:'medium' }}</div>\n </div>\n </div>\n </div>\n <app-read-more class=\"mt-2\" [text]=\"_commentData.note\"></app-read-more>\n <div fxLayout class=\"mt-1\" fxLayoutGap=\"1rem\" *ngIf=\"isLoggedIn && currentUser.id === _commentData.creator_id\">\n <a href=\"javascript:;\" (click)=\"editComment()\">\n Edit\n </a>\n <a href=\"javascript:;\" (click)=\"deleteComment()\">\n Delete\n </a>\n </div>\n </div>\n </div>\n</form>", styles: [":host ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important;margin:0!important}\n"] }]
|
|
72
|
-
}], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2.CredentialsService }]; }, propDecorators: { commentData: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], action: [{
|
|
75
|
-
type: Output
|
|
76
|
-
}] } });
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVudC1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbm90ZS9jb21tZW50LWZvcm0vY29tbWVudC1mb3JtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbm90ZS9jb21tZW50LWZvcm0vY29tbWVudC1mb3JtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBRVQsS0FBSyxFQUNMLE1BQU0sRUFDTixZQUFZLEVBRWIsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7Ozs7OztBQVN2QixNQUFNLE9BQU8sb0JBQW9CO0lBSy9CLElBQWEsV0FBVyxDQUFDLElBQVM7UUFDaEMsSUFBSSxDQUFDLElBQUksR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDO1FBQ25CLElBQUksQ0FBQyxZQUFZLEdBQUcsSUFBSSxDQUFDO1FBQ3pCLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDekMsQ0FBQztJQUlELFlBQW9CLEVBQXNCLEVBQ2hDLGlCQUFxQztRQUQzQixPQUFFLEdBQUYsRUFBRSxDQUFvQjtRQUNoQyx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GZ4TGF5b3V0PVwiY29sdW1uXCIgZnhMYXlvdXRHYXA9XCIuNXJlbVwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZvbnQtd2VpZ2h0LWJvbGRcIj57eyBfY29tbWVudERhdGE/LmNyZWF0b3I/Lm5hbWUgfX08L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0ZXh0LW11dGVkXCI+e3sgX2NvbW1lbnREYXRhLnVwZGF0ZWRfYXQgfCBkYXRlOidtZWRpdW0nIH19PC9kaXY+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgICA8YXBwLXJlYWQtbW9yZSBjbGFzcz1cIm10LTJcIiBbdGV4dF09XCJfY29tbWVudERhdGEubm90ZVwiPjwvYXBwLXJlYWQtbW9yZT5cbiAgICAgIDxkaXYgZnhMYXlvdXQgY2xhc3M9XCJtdC0xXCIgZnhMYXlvdXRHYXA9XCIxcmVtXCIgKm5nSWY9XCJpc0xvZ2dlZEluICYmIGN1cnJlbnRVc2VyLmlkID09PSBfY29tbWVudERhdGEuY3JlYXRvcl9pZFwiPlxuICAgICAgICA8YSBocmVmPVwiamF2YXNjcmlwdDo7XCIgKGNsaWNrKT1cImVkaXRDb21tZW50KClcIj5cbiAgICAgICAgICBFZGl0XG4gICAgICAgIDwvYT5cbiAgICAgICAgPGEgaHJlZj1cImphdmFzY3JpcHQ6O1wiIChjbGljayk9XCJkZWxldGVDb21tZW50KClcIj5cbiAgICAgICAgICBEZWxldGVcbiAgICAgICAgPC9hPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIDwvZGl2PlxuPC9mb3JtPiJdfQ==
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Component, Inject } from "@angular/core";
|
|
2
|
-
import { Validators } from "@angular/forms";
|
|
3
|
-
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/material/dialog";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
import * as i3 from "../../core/form-validator.service";
|
|
8
|
-
import * as i4 from "../../core/alert.service";
|
|
9
|
-
import * as i5 from "../note.service";
|
|
10
|
-
import * as i6 from "@angular/common";
|
|
11
|
-
import * as i7 from "@angular/flex-layout/flex";
|
|
12
|
-
import * as i8 from "@angular/material/button";
|
|
13
|
-
import * as i9 from "@angular/material/form-field";
|
|
14
|
-
import * as i10 from "@angular/material/input";
|
|
15
|
-
const errorMessages = {
|
|
16
|
-
note: {
|
|
17
|
-
required: "Note is required"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export class NoteFormComponent {
|
|
21
|
-
constructor(dialogRef, data, fb, formValidatorService, alertService, noteService) {
|
|
22
|
-
this.dialogRef = dialogRef;
|
|
23
|
-
this.data = data;
|
|
24
|
-
this.fb = fb;
|
|
25
|
-
this.formValidatorService = formValidatorService;
|
|
26
|
-
this.alertService = alertService;
|
|
27
|
-
this.noteService = noteService;
|
|
28
|
-
this.createForm();
|
|
29
|
-
}
|
|
30
|
-
/** Method to create a form **/
|
|
31
|
-
createForm() {
|
|
32
|
-
//TODO: Finialize and add more validations.
|
|
33
|
-
this.noteFormGroup = this.fb.group({
|
|
34
|
-
id: [""],
|
|
35
|
-
note: ["", Validators.compose([Validators.required])],
|
|
36
|
-
model_type: [""],
|
|
37
|
-
related_model_id: [""],
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
ngOnInit() {
|
|
41
|
-
if (this.data.update) {
|
|
42
|
-
this.updateMode = true;
|
|
43
|
-
}
|
|
44
|
-
this.noteFormGroup.patchValue(this.data.note);
|
|
45
|
-
}
|
|
46
|
-
//Method to trigger login
|
|
47
|
-
async submit() {
|
|
48
|
-
this.noteFormFirstAttempt = true;
|
|
49
|
-
if (this.noteFormGroup.valid) {
|
|
50
|
-
const model = this.noteFormGroup.value;
|
|
51
|
-
const result = this.updateMode
|
|
52
|
-
? await this.noteService.editNote(model)
|
|
53
|
-
: await this.noteService.addNote(model);
|
|
54
|
-
this.alertService.addAlert(`${this.data?.labelText} saved successfully`, "success");
|
|
55
|
-
this.dialogRef.close(result);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
cancel() {
|
|
59
|
-
this.dialogRef.close();
|
|
60
|
-
}
|
|
61
|
-
/**Method to evaluate form fields*/
|
|
62
|
-
isFieldValid(field) {
|
|
63
|
-
return this.formValidatorService.isFieldValid(field, this.noteFormGroup, this.noteFormFirstAttempt);
|
|
64
|
-
}
|
|
65
|
-
/**Method to find error in form fields*/
|
|
66
|
-
getErrorMessage(field) {
|
|
67
|
-
return this.formValidatorService.getErrorMessage(field, this.noteFormGroup, errorMessages);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
NoteFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteFormComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.UntypedFormBuilder }, { token: i3.FormValidatorService }, { token: i4.AlertService }, { token: i5.NoteService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
NoteFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NoteFormComponent, selector: "app-note-form", ngImport: i0, template: "<form [formGroup]=\"noteFormGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>{{data?.labelText}}</div>\n </div>\n\n <div mat-dialog-content fxLayout=\"column\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput formControlName=\"note\" placeholder=\"{{data?.labelText}}\" autocomplete=\"off\"\n required></textarea>\n <mat-error *ngIf=\"isFieldValid('note')\">{{\n getErrorMessage(\"note\")\n }}</mat-error>\n </mat-form-field>\n\n <div class=\"my-2\" fxLayout=\"row\" fxLayoutGap=\"30px\" fxLayoutAlign=\"end\" fxFlex=\"100%\">\n <button mat-raised-button type=\"button\" (click)=\"cancel()\">\n Cancel\n </button>\n <button mat-raised-button type=\"submit\" color=\"primary\">Save</button>\n </div>\n </div>\n </div>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }, { kind: "directive", type: i7.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: i7.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: i7.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: i7.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { 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"] }] });
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteFormComponent, decorators: [{
|
|
73
|
-
type: Component,
|
|
74
|
-
args: [{ selector: 'app-note-form', template: "<form [formGroup]=\"noteFormGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>{{data?.labelText}}</div>\n </div>\n\n <div mat-dialog-content fxLayout=\"column\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput formControlName=\"note\" placeholder=\"{{data?.labelText}}\" autocomplete=\"off\"\n required></textarea>\n <mat-error *ngIf=\"isFieldValid('note')\">{{\n getErrorMessage(\"note\")\n }}</mat-error>\n </mat-form-field>\n\n <div class=\"my-2\" fxLayout=\"row\" fxLayoutGap=\"30px\" fxLayoutAlign=\"end\" fxFlex=\"100%\">\n <button mat-raised-button type=\"button\" (click)=\"cancel()\">\n Cancel\n </button>\n <button mat-raised-button type=\"submit\" color=\"primary\">Save</button>\n </div>\n </div>\n </div>\n </div>\n</form>" }]
|
|
75
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
76
|
-
type: Inject,
|
|
77
|
-
args: [MAT_DIALOG_DATA]
|
|
78
|
-
}] }, { type: i2.UntypedFormBuilder }, { type: i3.FormValidatorService }, { type: i4.AlertService }, { type: i5.NoteService }]; } });
|
|
79
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZS1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbm90ZS9ub3RlLWZvcm0vbm90ZS1mb3JtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbm90ZS9ub3RlLWZvcm0vbm90ZS1mb3JtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxFQUFFLE1BQU0sZUF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ICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbjwvZm9ybT4iXX0=
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { NoteFormComponent } from '../note-form/note-form.component';
|
|
3
|
-
import { ActionPopupComponent } from '../../action-popup/action-popup.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../note.service";
|
|
6
|
-
import * as i2 from "@angular/material/dialog";
|
|
7
|
-
import * as i3 from "@angular/common";
|
|
8
|
-
import * as i4 from "ngx-infinite-scroll";
|
|
9
|
-
import * as i5 from "@angular/flex-layout/flex";
|
|
10
|
-
import * as i6 from "@angular/material/button";
|
|
11
|
-
import * as i7 from "@angular/material/icon";
|
|
12
|
-
import * as i8 from "@angular/material/table";
|
|
13
|
-
import * as i9 from "../comment-form/comment-form.component";
|
|
14
|
-
export class NoteListComponent {
|
|
15
|
-
constructor(noteService, dialog) {
|
|
16
|
-
this.noteService = noteService;
|
|
17
|
-
this.dialog = dialog;
|
|
18
|
-
this.readonly = false;
|
|
19
|
-
this.labelText = 'Note';
|
|
20
|
-
this.commentsView = false;
|
|
21
|
-
this.notes = [];
|
|
22
|
-
this.displayedColumns = [
|
|
23
|
-
'index',
|
|
24
|
-
'note',
|
|
25
|
-
'actions'
|
|
26
|
-
];
|
|
27
|
-
this.page = 1;
|
|
28
|
-
this.lastPage = 1;
|
|
29
|
-
this.filters = {};
|
|
30
|
-
this.filters.sort_by = "created_at|DESC";
|
|
31
|
-
}
|
|
32
|
-
ngOnInit() {
|
|
33
|
-
if (this.readonly) {
|
|
34
|
-
this.displayedColumns = this.displayedColumns.filter(x => x !== 'actions');
|
|
35
|
-
}
|
|
36
|
-
this.filters.related_model_id = this.relatedModelId;
|
|
37
|
-
this.filters.model_type = this.modelType;
|
|
38
|
-
this.loadData();
|
|
39
|
-
}
|
|
40
|
-
async loadData() {
|
|
41
|
-
const result = await this.noteService.getNotes({ ...this.filters, page: this.page });
|
|
42
|
-
this.notes = this.notes.concat(result.data);
|
|
43
|
-
this.page = result.current_page;
|
|
44
|
-
this.lastPage = result.last_page;
|
|
45
|
-
}
|
|
46
|
-
addNote() {
|
|
47
|
-
const dialogRef = this.dialog.open(NoteFormComponent, {
|
|
48
|
-
width: "400px",
|
|
49
|
-
data: {
|
|
50
|
-
note: { related_model_id: this.relatedModelId, model_type: this.modelType },
|
|
51
|
-
labelText: this.labelText,
|
|
52
|
-
},
|
|
53
|
-
autoFocus: false
|
|
54
|
-
});
|
|
55
|
-
dialogRef.afterClosed().subscribe(result => {
|
|
56
|
-
if (result) {
|
|
57
|
-
this.resetScroll();
|
|
58
|
-
this.loadData();
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
editNote(note) {
|
|
63
|
-
const dialogRef = this.dialog.open(NoteFormComponent, {
|
|
64
|
-
width: "400px",
|
|
65
|
-
data: {
|
|
66
|
-
note: note,
|
|
67
|
-
update: true,
|
|
68
|
-
labelText: this.labelText
|
|
69
|
-
},
|
|
70
|
-
autoFocus: false
|
|
71
|
-
});
|
|
72
|
-
dialogRef.afterClosed().subscribe(result => {
|
|
73
|
-
if (result) {
|
|
74
|
-
this.resetScroll();
|
|
75
|
-
this.loadData();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
async deleteNote(note) {
|
|
80
|
-
const dialogRef = this.dialog.open(ActionPopupComponent, {
|
|
81
|
-
width: "400px",
|
|
82
|
-
data: {
|
|
83
|
-
title: `Delete ${this.labelText}`,
|
|
84
|
-
message: `Are you sure to delete?`
|
|
85
|
-
},
|
|
86
|
-
autoFocus: false
|
|
87
|
-
});
|
|
88
|
-
dialogRef.afterClosed().subscribe(async (result) => {
|
|
89
|
-
if (result) {
|
|
90
|
-
//Action confirmed
|
|
91
|
-
const result = await this.noteService.deleteNote(note);
|
|
92
|
-
this.notes = this.notes.filter((item) => item.id !== note.id);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
resetScroll() {
|
|
97
|
-
this.page = 1;
|
|
98
|
-
this.lastPage = 1;
|
|
99
|
-
this.notes = [];
|
|
100
|
-
}
|
|
101
|
-
onScroll() {
|
|
102
|
-
if (this.page < this.lastPage) {
|
|
103
|
-
this.page += 1;
|
|
104
|
-
this.loadData();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
commentAction(event) {
|
|
108
|
-
if (event.type === "save") {
|
|
109
|
-
if (event.value.id) {
|
|
110
|
-
this.editComment(event.value);
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
this.addComment(event.value);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
this.deleteNote(event.value);
|
|
117
|
-
}
|
|
118
|
-
async editComment(comment) {
|
|
119
|
-
const result = await this.noteService.editNote(comment);
|
|
120
|
-
let index = this.notes.findIndex((x) => x.id === comment.id);
|
|
121
|
-
if (index !== -1) {
|
|
122
|
-
this.notes[index] = result.item;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
async addComment(comment) {
|
|
126
|
-
comment.related_model_id = this.relatedModelId;
|
|
127
|
-
comment.model_type = this.modelType;
|
|
128
|
-
const result = await this.noteService.addNote(comment);
|
|
129
|
-
this.notes.push(result.item);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
NoteListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteListComponent, deps: [{ token: i1.NoteService }, { token: i2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
133
|
-
NoteListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NoteListComponent, selector: "app-note-list", inputs: { relatedModelId: "relatedModelId", modelType: "modelType", readonly: "readonly", labelText: "labelText", commentsView: "commentsView" }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"1.5rem\" class=\"m-4\" *ngIf=\"!commentsView\">\n\n <div fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"1rem\">\n <h3 class=\"m-0 font-weight-bold mr-3\">{{labelText}}s</h3>\n <button class=\"d-print-none\" *ngIf=\"!readonly\" mat-raised-button color=\"primary\" type=\"button\" (click)=\"addNote()\">+\n Add</button>\n </div>\n\n <div class=\"w-100 scroll-container\" infiniteScroll [infiniteScrollDistance]=\"1\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"notes\" class=\"w-100\" multiTemplateDataRows>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let note; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n\n <ng-container matColumnDef=\"note\">\n <th mat-header-cell *matHeaderCellDef> {{labelText}} </th>\n <td mat-cell *matCellDef=\"let note\">\n {{note?.note}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef class=\"d-print-none\"> Actions </th>\n <td mat-cell *matCellDef=\"let note\" class=\"d-print-none\">\n <button type=\"button\" mat-icon-button (click)=\"editNote(note)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"deleteNote(note)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n\n</div>\n\n<div fxLayout=\"column\" fxLayoutGap=\"1.5rem\" *ngIf=\"commentsView\">\n <div fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"1rem\">\n <h3 class=\"m-0 font-weight-bold mr-3\">{{labelText}}s</h3>\n </div>\n\n <div fxLayout=\"column\" fxLayoutAlign=\"start\" fxFlex=\"100%\">\n <div class=\"w-100 scroll-container jumbotron\" infiniteScroll [infiniteScrollDistance]=\"1\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <app-comment-form [commentData]=\"comment\" (action)=\"commentAction($event)\" *ngFor=\"let comment of notes\">\n </app-comment-form>\n <app-comment-form (action)=\"commentAction($event)\"></app-comment-form>\n </div>\n </div>\n</div>\n", styles: [".scroll-container{max-height:400px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { 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"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i9.CommentFormComponent, selector: "app-comment-form", inputs: ["commentData"], outputs: ["action"] }] });
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteListComponent, decorators: [{
|
|
135
|
-
type: Component,
|
|
136
|
-
args: [{ selector: 'app-note-list', template: "<div fxLayout=\"column\" fxLayoutGap=\"1.5rem\" class=\"m-4\" *ngIf=\"!commentsView\">\n\n <div fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"1rem\">\n <h3 class=\"m-0 font-weight-bold mr-3\">{{labelText}}s</h3>\n <button class=\"d-print-none\" *ngIf=\"!readonly\" mat-raised-button color=\"primary\" type=\"button\" (click)=\"addNote()\">+\n Add</button>\n </div>\n\n <div class=\"w-100 scroll-container\" infiniteScroll [infiniteScrollDistance]=\"1\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"notes\" class=\"w-100\" multiTemplateDataRows>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let note; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n\n <ng-container matColumnDef=\"note\">\n <th mat-header-cell *matHeaderCellDef> {{labelText}} </th>\n <td mat-cell *matCellDef=\"let note\">\n {{note?.note}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef class=\"d-print-none\"> Actions </th>\n <td mat-cell *matCellDef=\"let note\" class=\"d-print-none\">\n <button type=\"button\" mat-icon-button (click)=\"editNote(note)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"deleteNote(note)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n\n</div>\n\n<div fxLayout=\"column\" fxLayoutGap=\"1.5rem\" *ngIf=\"commentsView\">\n <div fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"1rem\">\n <h3 class=\"m-0 font-weight-bold mr-3\">{{labelText}}s</h3>\n </div>\n\n <div fxLayout=\"column\" fxLayoutAlign=\"start\" fxFlex=\"100%\">\n <div class=\"w-100 scroll-container jumbotron\" infiniteScroll [infiniteScrollDistance]=\"1\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <app-comment-form [commentData]=\"comment\" (action)=\"commentAction($event)\" *ngFor=\"let comment of notes\">\n </app-comment-form>\n <app-comment-form (action)=\"commentAction($event)\"></app-comment-form>\n </div>\n </div>\n</div>\n", styles: [".scroll-container{max-height:400px;overflow-y:auto}\n"] }]
|
|
137
|
-
}], ctorParameters: function () { return [{ type: i1.NoteService }, { type: i2.MatDialog }]; }, propDecorators: { relatedModelId: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}], modelType: [{
|
|
140
|
-
type: Input
|
|
141
|
-
}], readonly: [{
|
|
142
|
-
type: Input
|
|
143
|
-
}], labelText: [{
|
|
144
|
-
type: Input
|
|
145
|
-
}], commentsView: [{
|
|
146
|
-
type: Input
|
|
147
|
-
}] } });
|
|
148
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZS1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbm90ZS9ub3RlLWxpc3Qvbm90ZS1saXN0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbm90ZS9ub3RlLWxpc3Qvbm90ZS1saXN0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBR3pELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQ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9kaXY+XG4iXX0=
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../core/http.service";
|
|
4
|
-
export class NoteService {
|
|
5
|
-
constructor(http) {
|
|
6
|
-
this.http = http;
|
|
7
|
-
}
|
|
8
|
-
getNotes(filterModel) {
|
|
9
|
-
return this.http.get('api/notes', { params: filterModel }).toPromise();
|
|
10
|
-
}
|
|
11
|
-
addNote(note) {
|
|
12
|
-
return this.http.post('api/notes', note).toPromise();
|
|
13
|
-
}
|
|
14
|
-
editNote(note) {
|
|
15
|
-
return this.http.put(`api/notes/${note.id}`, note).toPromise();
|
|
16
|
-
}
|
|
17
|
-
deleteNote(note) {
|
|
18
|
-
return this.http.delete(`api/notes/${note.id}`).toPromise();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
NoteService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteService, deps: [{ token: i1.HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
-
NoteService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteService, providedIn: 'root' });
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NoteService, decorators: [{
|
|
24
|
-
type: Injectable,
|
|
25
|
-
args: [{
|
|
26
|
-
providedIn: 'root'
|
|
27
|
-
}]
|
|
28
|
-
}], ctorParameters: function () { return [{ type: i1.HttpService }]; } });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi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UgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEh0dHBTZXJ2aWNlIH0gZnJvbSAnLi4vY29yZS9odHRwLnNlcnZpY2UnO1xuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBOb3RlU2VydmljZSB7XG5cbiAgY29uc3RydWN0b3IocHJpdmF0ZSBodHRwOiBIdHRwU2VydmljZSkgeyB9XG5cbiAgZ2V0Tm90ZXMoZmlsdGVyTW9kZWw6IGFueSkge1xuICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0KCdhcGkvbm90ZXMnLCB7IHBhcmFtczogZmlsdGVyTW9kZWwgfSkudG9Qcm9taXNlKCk7XG4gIH1cblxuICBhZGROb3RlKG5vdGU6IGFueSkge1xuICAgIHJldHVybiB0aGlzLmh0dHAucG9zdCgnYXBpL25vdGVzJywgbm90ZSkudG9Qcm9taXNlKCk7XG4gIH1cblxuICBlZGl0Tm90ZShub3RlOiBhbnkpIHtcbiAgICByZXR1cm4gdGhpcy5odHRwLnB1dChgYXBpL25vdGVzLyR7bm90ZS5pZH1gLCBub3RlKS50b1Byb21pc2UoKTtcbiAgfVxuXG4gIGRlbGV0ZU5vdGUobm90ZTogYW55KSB7XG4gICAgcmV0dXJuIHRoaXMuaHR0cC5kZWxldGUoYGFwaS9ub3Rlcy8ke25vdGUuaWR9YCkudG9Qcm9taXNlKCk7XG4gIH1cbn1cbiJdfQ==
|
package/esm2020/lib/number-input-button/number-input-button/number-input-button.component.mjs
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { UntypedFormControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
2
|
-
import { Component, Input, ViewChild } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/material/form-field";
|
|
6
|
-
import * as i3 from "@angular/material/icon";
|
|
7
|
-
import * as i4 from "@angular/material/input";
|
|
8
|
-
import * as i5 from "@angular/material/tooltip";
|
|
9
|
-
import * as i6 from "@angular/material/button-toggle";
|
|
10
|
-
import * as i7 from "@angular/forms";
|
|
11
|
-
// set the default value
|
|
12
|
-
export const DEFAULT_SELECTED_VALUE = 1;
|
|
13
|
-
export class NumberInputButtonComponent {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.label = 'Select Value';
|
|
16
|
-
this.showLabel = true;
|
|
17
|
-
this.showCustomInput = false;
|
|
18
|
-
this.options = [
|
|
19
|
-
{ title: '1', value: 1, type: 'text', hint: '' },
|
|
20
|
-
{ title: '2', value: 2, type: 'text', hint: '' },
|
|
21
|
-
{ title: '3', value: 3, type: 'text', hint: '' },
|
|
22
|
-
{ title: '4', value: 4, type: 'text', hint: '' },
|
|
23
|
-
{ title: '5', value: 5, type: 'text', hint: '' },
|
|
24
|
-
{ title: 'help', value: 'custom', type: 'icon', hint: 'Custom' },
|
|
25
|
-
];
|
|
26
|
-
this.selectedOption = new UntypedFormControl();
|
|
27
|
-
this.customValue = new UntypedFormControl(DEFAULT_SELECTED_VALUE);
|
|
28
|
-
this.touched = false;
|
|
29
|
-
this.disabled = false;
|
|
30
|
-
this.onChange = (value) => { };
|
|
31
|
-
this.onTouched = () => { };
|
|
32
|
-
}
|
|
33
|
-
ngOnInit() {
|
|
34
|
-
this.selectedOption.valueChanges.subscribe((value) => {
|
|
35
|
-
if (value == 'custom') {
|
|
36
|
-
this.showCustomInput = true;
|
|
37
|
-
value = DEFAULT_SELECTED_VALUE;
|
|
38
|
-
setTimeout(() => {
|
|
39
|
-
this.customInput?.nativeElement?.focus();
|
|
40
|
-
}, 100);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.showCustomInput = false;
|
|
44
|
-
}
|
|
45
|
-
this.onChange(value);
|
|
46
|
-
this.onTouched();
|
|
47
|
-
});
|
|
48
|
-
this.customValue.valueChanges.subscribe((value) => {
|
|
49
|
-
this.onChange(value);
|
|
50
|
-
this.onTouched();
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
writeValue(obj) {
|
|
54
|
-
const option = this.options.find((option) => {
|
|
55
|
-
return option.value === obj;
|
|
56
|
-
});
|
|
57
|
-
if (!option) {
|
|
58
|
-
this.showCustomInput = true;
|
|
59
|
-
this.selectedOption.setValue('custom');
|
|
60
|
-
this.customValue.setValue(obj);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
this.showCustomInput = false;
|
|
64
|
-
this.selectedOption.setValue(obj);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
registerOnChange(fn) {
|
|
68
|
-
this.onChange = fn;
|
|
69
|
-
}
|
|
70
|
-
registerOnTouched(fn) {
|
|
71
|
-
this.onTouched = fn;
|
|
72
|
-
}
|
|
73
|
-
setDisabledState(isDisabled) {
|
|
74
|
-
this.disabled = isDisabled;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
NumberInputButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberInputButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
78
|
-
NumberInputButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NumberInputButtonComponent, selector: "app-number-input-button", inputs: { label: "label", appearance: "appearance", showLabel: "showLabel" }, providers: [
|
|
79
|
-
{
|
|
80
|
-
provide: NG_VALUE_ACCESSOR,
|
|
81
|
-
multi: true,
|
|
82
|
-
useExisting: NumberInputButtonComponent
|
|
83
|
-
}
|
|
84
|
-
], viewQueries: [{ propertyName: "customInput", first: true, predicate: ["customInput"], descendants: true }], ngImport: i0, template: "<span *ngIf=\"showLabel\" class=\"mr-1\">{{ label }}</span> <br *ngIf=\"showLabel\">\n<mat-button-toggle-group [formControl]=\"selectedOption\">\n <mat-button-toggle [matTooltip]=\"option?.hint || ''\" *ngFor=\"let option of options\" [value]=\"option?.value\">\n <span *ngIf=\"option.type =='text'\">{{ option?.title }}</span>\n <mat-icon class=\"small-icon\" *ngIf=\"option.type == 'icon'\">{{option?.title}}</mat-icon>\n </mat-button-toggle>\n</mat-button-toggle-group>\n<mat-form-field class=\"mt-1 w-100\" *ngIf=\"showCustomInput\">\n <mat-label>{{ label }}</mat-label>\n <input type=\"number\" min=\"0\" #customInput matInput [formControl]=\"customValue\">\n</mat-form-field>\n", styles: [":host ::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:30px;padding:0 12px;font-size:12px}:host ::ng-deep .mat-button-toggle-checked{color:#fff!important}:host ::ng-deep .small-icon{height:18px;width:18px;font-size:18px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.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: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i7.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: i7.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NumberInputButtonComponent, decorators: [{
|
|
86
|
-
type: Component,
|
|
87
|
-
args: [{ selector: 'app-number-input-button', providers: [
|
|
88
|
-
{
|
|
89
|
-
provide: NG_VALUE_ACCESSOR,
|
|
90
|
-
multi: true,
|
|
91
|
-
useExisting: NumberInputButtonComponent
|
|
92
|
-
}
|
|
93
|
-
], template: "<span *ngIf=\"showLabel\" class=\"mr-1\">{{ label }}</span> <br *ngIf=\"showLabel\">\n<mat-button-toggle-group [formControl]=\"selectedOption\">\n <mat-button-toggle [matTooltip]=\"option?.hint || ''\" *ngFor=\"let option of options\" [value]=\"option?.value\">\n <span *ngIf=\"option.type =='text'\">{{ option?.title }}</span>\n <mat-icon class=\"small-icon\" *ngIf=\"option.type == 'icon'\">{{option?.title}}</mat-icon>\n </mat-button-toggle>\n</mat-button-toggle-group>\n<mat-form-field class=\"mt-1 w-100\" *ngIf=\"showCustomInput\">\n <mat-label>{{ label }}</mat-label>\n <input type=\"number\" min=\"0\" #customInput matInput [formControl]=\"customValue\">\n</mat-form-field>\n", styles: [":host ::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:30px;padding:0 12px;font-size:12px}:host ::ng-deep .mat-button-toggle-checked{color:#fff!important}:host ::ng-deep .small-icon{height:18px;width:18px;font-size:18px}\n"] }]
|
|
94
|
-
}], propDecorators: { label: [{
|
|
95
|
-
type: Input
|
|
96
|
-
}], appearance: [{
|
|
97
|
-
type: Input
|
|
98
|
-
}], showLabel: [{
|
|
99
|
-
type: Input
|
|
100
|
-
}], customInput: [{
|
|
101
|
-
type: ViewChild,
|
|
102
|
-
args: ['customInput']
|
|
103
|
-
}] } });
|
|
104
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLWlucHV0LWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdGVjaGxpZnktY29yZS9zcmMvbGliL251bWJlci1pbnB1dC1idXR0b24vbnVtYmVyLWlucHV0LWJ1dHRvbi9udW1iZXItaW5wdXQtYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvbnVtYmVyLWlucHV0LWJ1dHRvbi9udW1iZXItaW5wdXQtYnV0dG9uL251bWJlci1pbnB1dC1idXR0b24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUF1QixrQkFBa0IsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBRTNGLE9BQU8sRUFBQyxTQUFTLEVBQWMsS0FBSyxFQUFVLFNBQVMsRUFBQyxNQUFNLGVBQWUsQ0FBQzs7Ozs7Ozs7O0FBUzlFLHdCQUF3QjtBQUN4QixN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