ngx-techlify-core 11.4.6 → 11.4.7
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/README.md +24 -24
- package/bundles/ngx-techlify-core.umd.js +7861 -7849
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +2 -2
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/action-popup/action-popup.component.js +32 -32
- package/esm2015/lib/action-popup/action-popup.model.js +3 -3
- package/esm2015/lib/action-popup/action-popup.module.js +26 -26
- package/esm2015/lib/action-popup/index.js +3 -3
- package/esm2015/lib/audit-log/audit-log-for-model/audit-log-for-model-routing.module.js +12 -12
- package/esm2015/lib/audit-log/audit-log-for-model/audit-log-for-model.component.js +49 -49
- package/esm2015/lib/audit-log/audit-log-for-model/audit-log-for-model.module.js +25 -25
- package/esm2015/lib/audit-log/audit-log-list/audit-log-list-routing.module.js +12 -12
- package/esm2015/lib/audit-log/audit-log-list/audit-log-list.component.js +132 -132
- package/esm2015/lib/audit-log/audit-log-list/audit-log-list.module.js +29 -29
- package/esm2015/lib/audit-log/audit-log-list-filter/audit-log-list-filter-routing.module.js +12 -12
- package/esm2015/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.js +67 -67
- package/esm2015/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.js +25 -25
- package/esm2015/lib/audit-log/audit-log-routing.module.js +19 -19
- package/esm2015/lib/audit-log/audit-log-view/audit-log-view-routing.module.js +12 -12
- package/esm2015/lib/audit-log/audit-log-view/audit-log-view.component.js +60 -60
- package/esm2015/lib/audit-log/audit-log-view/audit-log-view.module.js +21 -21
- package/esm2015/lib/audit-log/audit-log-view-model/audit-log-view-model-routing.module.js +12 -12
- package/esm2015/lib/audit-log/audit-log-view-model/audit-log-view-model.component.js +57 -57
- package/esm2015/lib/audit-log/audit-log-view-model/audit-log-view-model.module.js +21 -21
- package/esm2015/lib/audit-log/audit-log.module.js +20 -20
- package/esm2015/lib/audit-log/audit-logs-view-model/audit-logs-view-model-routing.module.js +12 -12
- package/esm2015/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.js +35 -35
- package/esm2015/lib/audit-log/audit-logs-view-model/audit-logs-view-model.module.js +21 -21
- package/esm2015/lib/core/alert.service.js +39 -39
- package/esm2015/lib/core/api-prefix.interceptor.js +28 -28
- package/esm2015/lib/core/authentication.guard.js +39 -39
- package/esm2015/lib/core/authentication.service.js +59 -59
- package/esm2015/lib/core/cache.interceptor.js +60 -60
- package/esm2015/lib/core/config.service.js +47 -47
- package/esm2015/lib/core/core.module.js +42 -42
- package/esm2015/lib/core/credentials.service.js +84 -84
- package/esm2015/lib/core/dataManager.service.js +120 -120
- package/esm2015/lib/core/error-handler.interceptor.js +53 -53
- package/esm2015/lib/core/error-handler.service.js +59 -59
- package/esm2015/lib/core/form-validator.service.js +23 -23
- package/esm2015/lib/core/header.interceptor.js +22 -22
- package/esm2015/lib/core/http-cache.service.js +110 -110
- package/esm2015/lib/core/http.service.js +82 -82
- package/esm2015/lib/core/index.js +21 -21
- package/esm2015/lib/core/logger.service.js +100 -100
- package/esm2015/lib/core/route-reusable-strategy.js +35 -35
- package/esm2015/lib/core/snack/snack.component.js +33 -33
- package/esm2015/lib/core/snack/snack.module.js +25 -25
- package/esm2015/lib/core/storage.service.js +36 -36
- package/esm2015/lib/core/techlify-config.model.js +28 -28
- package/esm2015/lib/core/token.interceptor.js +30 -30
- package/esm2015/lib/data-table/data-table.component.js +190 -190
- package/esm2015/lib/data-table/data-table.model.js +11 -11
- package/esm2015/lib/data-table/data-table.module.js +25 -25
- package/esm2015/lib/data-table/index.js +3 -3
- package/esm2015/lib/date-validator.js +10 -10
- package/esm2015/lib/document-viewer/document-viewer.component.js +58 -58
- package/esm2015/lib/document-viewer/document-viewer.module.js +25 -25
- package/esm2015/lib/document-viewer/index.js +3 -3
- package/esm2015/lib/document-viewer/viewer-config.model.js +3 -3
- package/esm2015/lib/email-subscription/email-subscription-for-user/email-subscription-for-user-routing.module.js +26 -26
- package/esm2015/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.js +72 -72
- package/esm2015/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.module.js +23 -23
- package/esm2015/lib/email-subscription/email-subscription-for-user/index.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-routing.module.js +12 -12
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form-routing.module.js +12 -12
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.js +102 -102
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.module.js +28 -28
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-form/index.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list-routing.module.js +28 -28
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.js +153 -153
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.module.js +27 -27
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-list/index.js +1 -1
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-routing.module.js +12 -12
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type.module.js +15 -15
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form-routing.module.js +12 -12
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.js +99 -99
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.module.js +27 -27
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-form/index.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list-routing.module.js +28 -28
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.js +155 -155
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.module.js +29 -29
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list/index.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter-routing.module.js +12 -12
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.js +50 -50
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.module.js +25 -25
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/index.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-routing.module.js +12 -12
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user.module.js +15 -15
- package/esm2015/lib/email-subscription/email-subscription.module.js +15 -15
- package/esm2015/lib/entity-files/entity-file-form/entity-file-form.component.js +138 -138
- package/esm2015/lib/entity-files/entity-file.service.js +42 -42
- package/esm2015/lib/entity-files/entity-files-view-all.component.js +208 -204
- package/esm2015/lib/entity-files/entity-files-view-all.module.js +34 -34
- package/esm2015/lib/entity-files/index.js +3 -3
- package/esm2015/lib/export-excel/export-excel-button/export-excel-button.component.js +32 -32
- package/esm2015/lib/export-excel/export-excel.module.js +17 -17
- package/esm2015/lib/file-dropper/file-dropper.component.js +122 -122
- package/esm2015/lib/file-dropper/file-dropper.model.js +3 -3
- package/esm2015/lib/file-dropper/file-dropper.module.js +21 -21
- package/esm2015/lib/file-dropper/index.js +3 -3
- package/esm2015/lib/import-csv/data-import/data-import.component.js +18 -18
- package/esm2015/lib/import-csv/failed-items-list/failed-items-list.component.js +33 -33
- package/esm2015/lib/import-csv/field-mapping/field-mapping.component.js +148 -148
- package/esm2015/lib/import-csv/import-csv-config.js +2 -2
- package/esm2015/lib/import-csv/import-csv.component.js +196 -196
- package/esm2015/lib/import-csv/import-csv.module.js +46 -46
- package/esm2015/lib/import-csv/import-history-list/import-history-list.component.js +71 -71
- package/esm2015/lib/import-csv/import-success/import-success.component.js +19 -19
- package/esm2015/lib/loader/index.js +2 -2
- package/esm2015/lib/loader/loader.component.js +22 -22
- package/esm2015/lib/loader/loader.module.js +21 -21
- package/esm2015/lib/login-history-for-user/login-history-for-user-routing.module.js +20 -20
- package/esm2015/lib/login-history-for-user/login-history-for-user.component.js +88 -88
- package/esm2015/lib/login-history-for-user/login-history-for-user.module.js +27 -27
- package/esm2015/lib/material.module.js +60 -60
- package/esm2015/lib/note/comment-form/comment-form.component.js +73 -73
- package/esm2015/lib/note/index.js +4 -4
- package/esm2015/lib/note/note-form/note-form.component.js +81 -81
- package/esm2015/lib/note/note-list/note-list.component.js +151 -151
- package/esm2015/lib/note/note.module.js +36 -36
- package/esm2015/lib/note/note.service.js +31 -31
- package/esm2015/lib/read-more/read-more.component.js +43 -43
- package/esm2015/lib/read-more/read-more.module.js +21 -21
- package/esm2015/lib/searchable-selector/index.js +3 -3
- package/esm2015/lib/searchable-selector/mat-select-infinite-scroll.directive.js +81 -81
- package/esm2015/lib/searchable-selector/searchable-selector.component.js +307 -307
- package/esm2015/lib/searchable-selector/searchable-selector.module.js +28 -28
- package/esm2015/lib/techlify-feature/on-off-switch/on-off-switch.component.js +27 -27
- package/esm2015/lib/techlify-feature/techlify-feature-enabled.directive.js +78 -78
- package/esm2015/lib/techlify-feature/techlify-feature-listing.component.js +177 -177
- package/esm2015/lib/techlify-feature/techlify-feature.module.js +30 -30
- package/esm2015/lib/techlify-feature/techlify-feature.routing.js +12 -12
- package/esm2015/lib/techlify-feature/techlify-feature.service.js +28 -28
- package/esm2015/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.js +15 -15
- package/esm2015/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.js +269 -269
- package/esm2015/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.module.js +25 -25
- package/esm2015/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.js +168 -168
- package/esm2015/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.module.js +29 -29
- package/esm2015/lib/techlify-update/techlify-update-form/techlify-update-form.component.js +114 -114
- package/esm2015/lib/techlify-update/techlify-update-form/techlify-update-form.module.js +28 -28
- package/esm2015/lib/techlify-update/techlify-update-history/techlify-update-history-routing.module.js +22 -22
- package/esm2015/lib/techlify-update/techlify-update-history/techlify-update-history.component.js +143 -143
- package/esm2015/lib/techlify-update/techlify-update-history/techlify-update-history.module.js +28 -28
- package/esm2015/lib/techlify-update/techlify-update-routing.module.js +22 -22
- package/esm2015/lib/techlify-update/techlify-update.module.js +30 -30
- package/esm2015/lib/techlify-update/techlify-update.service.js +43 -43
- package/esm2015/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.js +161 -161
- package/esm2015/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.js +82 -82
- package/esm2015/lib/techlify-update/update-notifier/update-notifier.component.js +62 -62
- package/esm2015/lib/techlify-update/update-notifier/update-notifier.module.js +29 -29
- package/esm2015/lib/techlify-update/update-view/update-view.component.js +36 -36
- package/esm2015/lib/techlify-update/update-view/update-view.module.js +24 -24
- package/esm2015/lib/timeline-filter/calculate-timeline.js +102 -102
- package/esm2015/lib/timeline-filter/index.js +4 -4
- package/esm2015/lib/timeline-filter/timeline-filter-routing.module.js +12 -12
- package/esm2015/lib/timeline-filter/timeline-filter.component.js +213 -213
- package/esm2015/lib/timeline-filter/timeline-filter.module.js +23 -23
- package/esm2015/lib/timeline-filter/timeline.model.js +18 -18
- package/esm2015/lib/utility/date-utils.service.js +48 -48
- package/esm2015/lib/utility/index.js +4 -4
- package/esm2015/lib/utility/num-items-selector.component.js +29 -29
- package/esm2015/lib/utility/number-selector.component.js +38 -38
- package/esm2015/lib/utility/utility.module.js +20 -20
- package/esm2015/ngx-techlify-core.js +59 -59
- package/esm2015/public-api.js +95 -95
- package/fesm2015/ngx-techlify-core.js +6726 -6722
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/action-popup/action-popup.component.d.ts +14 -14
- package/lib/action-popup/action-popup.model.d.ts +5 -5
- package/lib/action-popup/action-popup.module.d.ts +2 -2
- package/lib/action-popup/index.d.ts +2 -2
- package/lib/audit-log/audit-log-for-model/audit-log-for-model-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-log-for-model/audit-log-for-model.component.d.ts +12 -12
- package/lib/audit-log/audit-log-for-model/audit-log-for-model.module.d.ts +2 -2
- package/lib/audit-log/audit-log-list/audit-log-list-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-log-list/audit-log-list.component.d.ts +32 -32
- package/lib/audit-log/audit-log-list/audit-log-list.module.d.ts +2 -2
- package/lib/audit-log/audit-log-list-filter/audit-log-list-filter-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.d.ts +19 -19
- package/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.d.ts +2 -2
- package/lib/audit-log/audit-log-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-log-view/audit-log-view-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-log-view/audit-log-view.component.d.ts +17 -17
- package/lib/audit-log/audit-log-view/audit-log-view.module.d.ts +2 -2
- package/lib/audit-log/audit-log-view-model/audit-log-view-model-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-log-view-model/audit-log-view-model.component.d.ts +15 -15
- package/lib/audit-log/audit-log-view-model/audit-log-view-model.module.d.ts +2 -2
- package/lib/audit-log/audit-log.module.d.ts +2 -2
- package/lib/audit-log/audit-logs-view-model/audit-logs-view-model-routing.module.d.ts +2 -2
- package/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.d.ts +11 -11
- package/lib/audit-log/audit-logs-view-model/audit-logs-view-model.module.d.ts +2 -2
- package/lib/core/alert.service.d.ts +12 -12
- package/lib/core/api-prefix.interceptor.d.ts +11 -11
- package/lib/core/authentication.guard.d.ts +10 -10
- package/lib/core/authentication.service.d.ts +23 -23
- package/lib/core/cache.interceptor.d.ts +21 -21
- package/lib/core/config.service.d.ts +19 -19
- package/lib/core/core.module.d.ts +3 -3
- package/lib/core/credentials.service.d.ts +36 -36
- package/lib/core/dataManager.service.d.ts +70 -70
- package/lib/core/error-handler.interceptor.d.ts +14 -14
- package/lib/core/error-handler.service.d.ts +14 -14
- package/lib/core/form-validator.service.d.ts +8 -8
- package/lib/core/header.interceptor.d.ts +8 -8
- package/lib/core/http-cache.service.d.ts +54 -54
- package/lib/core/http.service.d.ts +56 -56
- package/lib/core/index.d.ts +20 -20
- package/lib/core/logger.service.d.ts +85 -85
- package/lib/core/route-reusable-strategy.d.ts +13 -13
- package/lib/core/snack/snack.component.d.ts +8 -8
- package/lib/core/snack/snack.module.d.ts +2 -2
- package/lib/core/storage.service.d.ts +15 -15
- package/lib/core/techlify-config.model.d.ts +18 -18
- package/lib/core/token.interceptor.d.ts +11 -11
- package/lib/data-table/data-table.component.d.ts +60 -60
- package/lib/data-table/data-table.model.d.ts +46 -46
- package/lib/data-table/data-table.module.d.ts +2 -2
- package/lib/data-table/index.d.ts +2 -2
- package/lib/date-validator.d.ts +1 -1
- package/lib/document-viewer/document-viewer.component.d.ts +16 -16
- package/lib/document-viewer/document-viewer.module.d.ts +2 -2
- package/lib/document-viewer/index.d.ts +2 -2
- package/lib/document-viewer/viewer-config.model.d.ts +5 -5
- package/lib/email-subscription/email-subscription-for-user/email-subscription-for-user-routing.module.d.ts +7 -7
- package/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.d.ts +17 -17
- package/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-for-user/index.d.ts +1 -1
- package/lib/email-subscription/email-subscription-routing.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form-routing.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.d.ts +32 -32
- package/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-type/email-subscription-type-form/index.d.ts +1 -1
- package/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list-routing.module.d.ts +9 -9
- package/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.d.ts +30 -30
- package/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-type/email-subscription-type-list/index.d.ts +1 -1
- package/lib/email-subscription/email-subscription-type/email-subscription-type-routing.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-type/email-subscription-type.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form-routing.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.d.ts +32 -32
- package/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user-form/index.d.ts +1 -1
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list-routing.module.d.ts +9 -9
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.d.ts +32 -32
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list/index.d.ts +1 -1
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter-routing.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.d.ts +13 -13
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/index.d.ts +1 -1
- package/lib/email-subscription/email-subscription-user/email-subscription-user-routing.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription-user/email-subscription-user.module.d.ts +2 -2
- package/lib/email-subscription/email-subscription.module.d.ts +2 -2
- package/lib/entity-files/entity-file-form/entity-file-form.component.d.ts +34 -34
- package/lib/entity-files/entity-file.service.d.ts +10 -10
- package/lib/entity-files/entity-files-view-all.component.d.ts +45 -44
- package/lib/entity-files/entity-files-view-all.module.d.ts +2 -2
- package/lib/entity-files/index.d.ts +2 -2
- package/lib/export-excel/export-excel-button/export-excel-button.component.d.ts +8 -8
- package/lib/export-excel/export-excel.module.d.ts +2 -2
- package/lib/file-dropper/file-dropper.component.d.ts +33 -33
- package/lib/file-dropper/file-dropper.model.d.ts +10 -10
- package/lib/file-dropper/file-dropper.module.d.ts +2 -2
- package/lib/file-dropper/index.d.ts +2 -2
- package/lib/import-csv/data-import/data-import.component.d.ts +6 -6
- package/lib/import-csv/failed-items-list/failed-items-list.component.d.ts +12 -12
- package/lib/import-csv/field-mapping/field-mapping.component.d.ts +34 -34
- package/lib/import-csv/import-csv-config.d.ts +17 -17
- package/lib/import-csv/import-csv.component.d.ts +33 -33
- package/lib/import-csv/import-csv.module.d.ts +2 -2
- package/lib/import-csv/import-history-list/import-history-list.component.d.ts +21 -21
- package/lib/import-csv/import-success/import-success.component.d.ts +8 -8
- package/lib/loader/index.d.ts +1 -1
- package/lib/loader/loader.component.d.ts +8 -8
- package/lib/loader/loader.module.d.ts +2 -2
- package/lib/login-history-for-user/login-history-for-user-routing.module.d.ts +2 -2
- package/lib/login-history-for-user/login-history-for-user.component.d.ts +23 -23
- package/lib/login-history-for-user/login-history-for-user.module.d.ts +2 -2
- package/lib/material.module.d.ts +2 -2
- package/lib/note/comment-form/comment-form.component.d.ts +22 -22
- package/lib/note/index.d.ts +3 -3
- package/lib/note/note-form/note-form.component.d.ts +27 -27
- package/lib/note/note-list/note-list.component.d.ts +28 -28
- package/lib/note/note.module.d.ts +2 -2
- package/lib/note/note.service.d.ts +9 -9
- package/lib/read-more/read-more.component.d.ts +12 -12
- package/lib/read-more/read-more.module.d.ts +2 -2
- package/lib/searchable-selector/index.d.ts +2 -2
- package/lib/searchable-selector/mat-select-infinite-scroll.directive.d.ts +23 -23
- package/lib/searchable-selector/searchable-selector.component.d.ts +81 -81
- package/lib/searchable-selector/searchable-selector.module.d.ts +2 -2
- package/lib/techlify-feature/on-off-switch/on-off-switch.component.d.ts +9 -9
- package/lib/techlify-feature/techlify-feature-enabled.directive.d.ts +17 -17
- package/lib/techlify-feature/techlify-feature-listing.component.d.ts +37 -37
- package/lib/techlify-feature/techlify-feature.module.d.ts +2 -2
- package/lib/techlify-feature/techlify-feature.routing.d.ts +2 -2
- package/lib/techlify-feature/techlify-feature.service.d.ts +8 -8
- package/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.d.ts +12 -12
- package/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.d.ts +76 -76
- package/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.module.d.ts +2 -2
- package/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.d.ts +58 -58
- package/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.module.d.ts +2 -2
- package/lib/techlify-update/techlify-update-form/techlify-update-form.component.d.ts +30 -30
- package/lib/techlify-update/techlify-update-form/techlify-update-form.module.d.ts +2 -2
- package/lib/techlify-update/techlify-update-history/techlify-update-history-routing.module.d.ts +2 -2
- package/lib/techlify-update/techlify-update-history/techlify-update-history.component.d.ts +31 -31
- package/lib/techlify-update/techlify-update-history/techlify-update-history.module.d.ts +2 -2
- package/lib/techlify-update/techlify-update-routing.module.d.ts +2 -2
- package/lib/techlify-update/techlify-update.module.d.ts +2 -2
- package/lib/techlify-update/techlify-update.service.d.ts +13 -13
- package/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.d.ts +31 -31
- package/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.d.ts +25 -25
- package/lib/techlify-update/update-notifier/update-notifier.component.d.ts +16 -16
- package/lib/techlify-update/update-notifier/update-notifier.module.d.ts +2 -2
- package/lib/techlify-update/update-view/update-view.component.d.ts +14 -14
- package/lib/techlify-update/update-view/update-view.module.d.ts +2 -2
- package/lib/timeline-filter/calculate-timeline.d.ts +6 -6
- package/lib/timeline-filter/index.d.ts +3 -3
- package/lib/timeline-filter/timeline-filter-routing.module.d.ts +2 -2
- package/lib/timeline-filter/timeline-filter.component.d.ts +61 -61
- package/lib/timeline-filter/timeline-filter.module.d.ts +2 -2
- package/lib/timeline-filter/timeline.model.d.ts +17 -17
- package/lib/utility/date-utils.service.d.ts +21 -21
- package/lib/utility/index.d.ts +3 -3
- package/lib/utility/num-items-selector.component.d.ts +16 -16
- package/lib/utility/number-selector.component.d.ts +20 -20
- package/lib/utility/utility.module.d.ts +2 -2
- package/ngx-techlify-core.d.ts +59 -59
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +91 -91
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { HttpService } from './http.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./http.service";
|
|
5
|
-
/**
|
|
6
|
-
* Service that provides a wrapper for retrieving data from the server
|
|
7
|
-
* @deprecated use HttpService Instead
|
|
8
|
-
* @author Joshua Kissoon
|
|
9
|
-
* @since 20170709
|
|
10
|
-
*/
|
|
11
|
-
export class DataManager {
|
|
12
|
-
constructor(http) {
|
|
13
|
-
this.http = http;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Callback wrapper for the HTTP GET Call
|
|
17
|
-
*
|
|
18
|
-
* @param urlq The query part of the URL to be sent to the server
|
|
19
|
-
*
|
|
20
|
-
* @author Joshua Kissoon
|
|
21
|
-
* @since 20160826
|
|
22
|
-
* @updated 20170711 to add parameters
|
|
23
|
-
*/
|
|
24
|
-
GET(urlq, params = {}) {
|
|
25
|
-
return this.http
|
|
26
|
-
.get(urlq, { params: params })
|
|
27
|
-
.toPromise();
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Callback wrapper for the HTTP POST Call
|
|
31
|
-
*
|
|
32
|
-
* @param urlq The query part of the URL to be sent to the server
|
|
33
|
-
* @param object The object containing the POST data to be sent
|
|
34
|
-
*
|
|
35
|
-
* @author Joshua Kissoon
|
|
36
|
-
* @since 20160826
|
|
37
|
-
*/
|
|
38
|
-
POST(urlq, object) {
|
|
39
|
-
if (null == object) {
|
|
40
|
-
object = { "blank": "blank" };
|
|
41
|
-
}
|
|
42
|
-
return this.http
|
|
43
|
-
.post(urlq, object)
|
|
44
|
-
.toPromise();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Callback wrapper for the HTTP POST Call
|
|
48
|
-
*
|
|
49
|
-
* @param urlq The query part of the URL to be sent to the server
|
|
50
|
-
* @param object The object containing the POST data to be sent
|
|
51
|
-
*
|
|
52
|
-
* @author Joshua Kissoon
|
|
53
|
-
* @since 20160826
|
|
54
|
-
*/
|
|
55
|
-
POSTRAW(urlq, object) {
|
|
56
|
-
if (null == object) {
|
|
57
|
-
object = { "blank": "blank" };
|
|
58
|
-
}
|
|
59
|
-
return this.http
|
|
60
|
-
.skipHeader()
|
|
61
|
-
.post(urlq, object)
|
|
62
|
-
.toPromise();
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Callback wrapper for the HTTP PUT Call
|
|
66
|
-
*
|
|
67
|
-
* @param urlq The query part of the URL to be sent to the server
|
|
68
|
-
* @param object The object containing the PUT data to be sent
|
|
69
|
-
*
|
|
70
|
-
* @author Joshua Kissoon
|
|
71
|
-
* @since 20160826
|
|
72
|
-
*/
|
|
73
|
-
PUT(urlq, object) {
|
|
74
|
-
if (null == object) {
|
|
75
|
-
object = { "blank": "blank" };
|
|
76
|
-
}
|
|
77
|
-
return this.http
|
|
78
|
-
.put(urlq, object)
|
|
79
|
-
.toPromise();
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Callback wrapper for the HTTP PATCH Call
|
|
83
|
-
*
|
|
84
|
-
* @param urlq The query part of the URL to be sent to the server
|
|
85
|
-
* @param object The object containing the PUT data to be sent
|
|
86
|
-
*
|
|
87
|
-
* @author Joshua Kissoon
|
|
88
|
-
* @since 20161107
|
|
89
|
-
*/
|
|
90
|
-
PATCH(urlq, object) {
|
|
91
|
-
if (null == object) {
|
|
92
|
-
object = { "blank": "blank" };
|
|
93
|
-
}
|
|
94
|
-
return this.http
|
|
95
|
-
.patch(urlq, object)
|
|
96
|
-
.toPromise();
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Callback wrapper for the HTTP DELETE Call
|
|
100
|
-
*
|
|
101
|
-
* @param urlq The query part of the URL to be sent to the server
|
|
102
|
-
*
|
|
103
|
-
* @author Joshua Kissoon
|
|
104
|
-
* @since 20160826
|
|
105
|
-
*/
|
|
106
|
-
DELETE(urlq) {
|
|
107
|
-
return this.http
|
|
108
|
-
.delete(urlq)
|
|
109
|
-
.toPromise();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
DataManager.ɵprov = i0.ɵɵdefineInjectable({ factory: function DataManager_Factory() { return new DataManager(i0.ɵɵinject(i1.HttpService)); }, token: DataManager, providedIn: "root" });
|
|
113
|
-
DataManager.decorators = [
|
|
114
|
-
{ type: Injectable, args: [{
|
|
115
|
-
providedIn: 'root'
|
|
116
|
-
},] }
|
|
117
|
-
];
|
|
118
|
-
DataManager.ctorParameters = () => [
|
|
119
|
-
{ type: HttpService }
|
|
120
|
-
];
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { HttpService } from './http.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./http.service";
|
|
5
|
+
/**
|
|
6
|
+
* Service that provides a wrapper for retrieving data from the server
|
|
7
|
+
* @deprecated use HttpService Instead
|
|
8
|
+
* @author Joshua Kissoon
|
|
9
|
+
* @since 20170709
|
|
10
|
+
*/
|
|
11
|
+
export class DataManager {
|
|
12
|
+
constructor(http) {
|
|
13
|
+
this.http = http;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Callback wrapper for the HTTP GET Call
|
|
17
|
+
*
|
|
18
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
19
|
+
*
|
|
20
|
+
* @author Joshua Kissoon
|
|
21
|
+
* @since 20160826
|
|
22
|
+
* @updated 20170711 to add parameters
|
|
23
|
+
*/
|
|
24
|
+
GET(urlq, params = {}) {
|
|
25
|
+
return this.http
|
|
26
|
+
.get(urlq, { params: params })
|
|
27
|
+
.toPromise();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Callback wrapper for the HTTP POST Call
|
|
31
|
+
*
|
|
32
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
33
|
+
* @param object The object containing the POST data to be sent
|
|
34
|
+
*
|
|
35
|
+
* @author Joshua Kissoon
|
|
36
|
+
* @since 20160826
|
|
37
|
+
*/
|
|
38
|
+
POST(urlq, object) {
|
|
39
|
+
if (null == object) {
|
|
40
|
+
object = { "blank": "blank" };
|
|
41
|
+
}
|
|
42
|
+
return this.http
|
|
43
|
+
.post(urlq, object)
|
|
44
|
+
.toPromise();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Callback wrapper for the HTTP POST Call
|
|
48
|
+
*
|
|
49
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
50
|
+
* @param object The object containing the POST data to be sent
|
|
51
|
+
*
|
|
52
|
+
* @author Joshua Kissoon
|
|
53
|
+
* @since 20160826
|
|
54
|
+
*/
|
|
55
|
+
POSTRAW(urlq, object) {
|
|
56
|
+
if (null == object) {
|
|
57
|
+
object = { "blank": "blank" };
|
|
58
|
+
}
|
|
59
|
+
return this.http
|
|
60
|
+
.skipHeader()
|
|
61
|
+
.post(urlq, object)
|
|
62
|
+
.toPromise();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Callback wrapper for the HTTP PUT Call
|
|
66
|
+
*
|
|
67
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
68
|
+
* @param object The object containing the PUT data to be sent
|
|
69
|
+
*
|
|
70
|
+
* @author Joshua Kissoon
|
|
71
|
+
* @since 20160826
|
|
72
|
+
*/
|
|
73
|
+
PUT(urlq, object) {
|
|
74
|
+
if (null == object) {
|
|
75
|
+
object = { "blank": "blank" };
|
|
76
|
+
}
|
|
77
|
+
return this.http
|
|
78
|
+
.put(urlq, object)
|
|
79
|
+
.toPromise();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Callback wrapper for the HTTP PATCH Call
|
|
83
|
+
*
|
|
84
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
85
|
+
* @param object The object containing the PUT data to be sent
|
|
86
|
+
*
|
|
87
|
+
* @author Joshua Kissoon
|
|
88
|
+
* @since 20161107
|
|
89
|
+
*/
|
|
90
|
+
PATCH(urlq, object) {
|
|
91
|
+
if (null == object) {
|
|
92
|
+
object = { "blank": "blank" };
|
|
93
|
+
}
|
|
94
|
+
return this.http
|
|
95
|
+
.patch(urlq, object)
|
|
96
|
+
.toPromise();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Callback wrapper for the HTTP DELETE Call
|
|
100
|
+
*
|
|
101
|
+
* @param urlq The query part of the URL to be sent to the server
|
|
102
|
+
*
|
|
103
|
+
* @author Joshua Kissoon
|
|
104
|
+
* @since 20160826
|
|
105
|
+
*/
|
|
106
|
+
DELETE(urlq) {
|
|
107
|
+
return this.http
|
|
108
|
+
.delete(urlq)
|
|
109
|
+
.toPromise();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
DataManager.ɵprov = i0.ɵɵdefineInjectable({ factory: function DataManager_Factory() { return new DataManager(i0.ɵɵinject(i1.HttpService)); }, token: DataManager, providedIn: "root" });
|
|
113
|
+
DataManager.decorators = [
|
|
114
|
+
{ type: Injectable, args: [{
|
|
115
|
+
providedIn: 'root'
|
|
116
|
+
},] }
|
|
117
|
+
];
|
|
118
|
+
DataManager.ctorParameters = () => [
|
|
119
|
+
{ type: HttpService }
|
|
120
|
+
];
|
|
121
121
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YU1hbmFnZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvY29yZS9kYXRhTWFuYWdlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7QUFFN0M7Ozs7O0dBS0c7QUFJSCxNQUFNLE9BQU8sV0FBVztJQUVwQixZQUFvQixJQUFpQjtRQUFqQixTQUFJLEdBQUosSUFBSSxDQUFhO0lBQUksQ0FBQztJQUUxQzs7Ozs7Ozs7T0FRRztJQUNILEdBQUcsQ0FBQyxJQUFZLEVBQUUsTUFBTSxHQUFHLEVBQUU7UUFDekIsT0FBTyxJQUFJLENBQUMsSUFBSTthQUNYLEdBQUcsQ0FBQyxJQUFJLEVBQUUsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLENBQUM7YUFDN0IsU0FBUyxFQUFFLENBQUM7SUFDckIsQ0FBQztJQUVEOzs7Ozs7OztPQVFHO0lBQ0gsSUFBSSxDQUFDLElBQVksRUFBRSxNQUFXO1FBQzFCLElBQUksSUFBSSxJQUFJLE1BQU0sRUFBRTtZQUNoQixNQUFNLEdBQUcsRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFFLENBQUM7U0FDakM7UUFFRCxPQUFPLElBQUksQ0FBQyxJQUFJO2FBQ1gsSUFBSSxDQUFDLElBQUksRUFBRSxNQUF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ICAgICAqIEBwYXJhbSBvYmplY3QgVGhlIG9iamVjdCBjb250YWluaW5nIHRoZSBQT1NUIGRhdGEgdG8gYmUgc2VudFxyXG4gICAgICogXHJcbiAgICAgKiBAYXV0aG9yIEpvc2h1YSBLaXNzb29uXHJcbiAgICAgKiBAc2luY2UgMjAxNjA4MjZcclxuICAgICAqL1xyXG4gICAgUE9TVFJBVyh1cmxxOiBzdHJpbmcsIG9iamVjdDogYW55KTogYW55IHtcclxuICAgICAgICBpZiAobnVsbCA9PSBvYmplY3QpIHtcclxuICAgICAgICAgICAgb2JqZWN0ID0geyBcImJsYW5rXCI6IFwiYmxhbmtcIiB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHRoaXMuaHR0cFxyXG4gICAgICAgICAgICAuc2tpcEhlYWRlcigpXHJcbiAgICAgICAgICAgIC5wb3N0KHVybHEsIG9iamVjdClcclxuICAgICAgICAgICAgLnRvUHJvbWlzZSgpO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKipcclxuICAgICAqIENhbGxiYWNrIHdyYXBwZXIgZm9yIHRoZSBIVFRQIFBVVCBDYWxsXHJcbiAgICAgKiBcclxuICAgICAqIEBwYXJhbSB1cmxxIFRoZSBxdWVyeSBwYXJ0IG9mIHRoZSBVUkwgdG8gYmUgc2VudCB0byB0aGUgc2VydmVyXHJcbiAgICAgKiBAcGFyYW0gb2JqZWN0IFRoZSBvYmplY3QgY29udGFpbmluZyB0aGUgUFVUIGRhdGEgdG8gYmUgc2VudFxyXG4gICAgICogXHJcbiAgICAgKiBAYXV0aG9yIEpvc2h1YSBLaXNzb29uXHJcbiAgICAgKiBAc2luY2UgMjAxNjA4MjZcclxuICAgICAqL1xyXG4gICAgUFVUKHVybHE6IHN0cmluZywgb2JqZWN0OiBhbnkpOiBhbnkge1xyXG4gICAgICAgIGlmIChudWxsID09IG9iamVjdCkge1xyXG4gICAgICAgICAgICBvYmplY3QgPSB7IFwiYmxhbmtcIjogXCJibGFua1wiIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5odHRwXHJcbiAgICAgICAgICAgIC5wdXQodXJscSwgb2JqZWN0KVxyXG4gICAgICAgICAgICAudG9Qcm9taXNlKCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBDYWxsYmFjayB3cmFwcGVyIGZvciB0aGUgSFRUUCBQQVRDSCBDYWxsXHJcbiAgICAgKiBcclxuICAgICAqIEBwYXJhbSB1cmxxIFRoZSBxdWVyeSBwYXJ0IG9mIHRoZSBVUkwgdG8gYmUgc2VudCB0byB0aGUgc2VydmVyXHJcbiAgICAgKiBAcGFyYW0gb2JqZWN0IFRoZSBvYmplY3QgY29udGFpbmluZyB0aGUgUFVUIGRhdGEgdG8gYmUgc2VudFxyXG4gICAgICogXHJcbiAgICAgKiBAYXV0aG9yIEpvc2h1YSBLaXNzb29uXHJcbiAgICAgKiBAc2luY2UgMjAxNjExMDdcclxuICAgICAqL1xyXG4gICAgUEFUQ0godXJscTogc3RyaW5nLCBvYmplY3Q6IGFueSk6IGFueSB7XHJcbiAgICAgICAgaWYgKG51bGwgPT0gb2JqZWN0KSB7XHJcbiAgICAgICAgICAgIG9iamVjdCA9IHsgXCJibGFua1wiOiBcImJsYW5rXCIgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzLmh0dHBcclxuICAgICAgICAgICAgLnBhdGNoKHVybHEsIG9iamVjdClcclxuICAgICAgICAgICAgLnRvUHJvbWlzZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQ2FsbGJhY2sgd3JhcHBlciBmb3IgdGhlIEhUVFAgREVMRVRFIENhbGxcclxuICAgICAqIFxyXG4gICAgICogQHBhcmFtIHVybHEgVGhlIHF1ZXJ5IHBhcnQgb2YgdGhlIFVSTCB0byBiZSBzZW50IHRvIHRoZSBzZXJ2ZXJcclxuICAgICAqIFxyXG4gICAgICogQGF1dGhvciBKb3NodWEgS2lzc29vblxyXG4gICAgICogQHNpbmNlIDIwMTYwODI2XHJcbiAgICAgKi9cclxuICAgIERFTEVURSh1cmxxOiBzdHJpbmcpOiBhbnkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmh0dHBcclxuICAgICAgICAgICAgLmRlbGV0ZSh1cmxxKVxyXG4gICAgICAgICAgICAudG9Qcm9taXNlKCk7XHJcbiAgICB9XHJcblxyXG59Il19
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { throwError } from 'rxjs';
|
|
3
|
-
import { catchError } from 'rxjs/operators';
|
|
4
|
-
import { Logger } from './logger.service';
|
|
5
|
-
import { ConfigService } from './config.service';
|
|
6
|
-
import { ErrorHandlerService } from './error-handler.service';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "./config.service";
|
|
9
|
-
import * as i2 from "./error-handler.service";
|
|
10
|
-
const log = new Logger('ErrorHandlerInterceptor');
|
|
11
|
-
/**
|
|
12
|
-
* Adds a default error handler to all requests.
|
|
13
|
-
*/
|
|
14
|
-
export class ErrorHandlerInterceptor {
|
|
15
|
-
constructor(configService, errorHandler) {
|
|
16
|
-
this.configService = configService;
|
|
17
|
-
this.errorHandler = errorHandler;
|
|
18
|
-
}
|
|
19
|
-
intercept(request, next) {
|
|
20
|
-
return next.handle(request).pipe(catchError(error => this.handleError(error)));
|
|
21
|
-
}
|
|
22
|
-
// Customize the default error handler here if needed
|
|
23
|
-
handleError(error) {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
let errorMessage = '';
|
|
26
|
-
if (error.error instanceof ErrorEvent) {
|
|
27
|
-
// client-side error
|
|
28
|
-
errorMessage = `Client Error: ${(_a = this.configService) === null || _a === void 0 ? void 0 : _a.getProjectKey()}: ${error.error.message}`;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
// server-side error
|
|
32
|
-
errorMessage = `Server Error: ${(_b = this.configService) === null || _b === void 0 ? void 0 : _b.getProjectKey()}`;
|
|
33
|
-
try {
|
|
34
|
-
this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');
|
|
35
|
-
}
|
|
36
|
-
catch (e) {
|
|
37
|
-
console.log("Unable to handle server error", e);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return throwError(error);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
ErrorHandlerInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function ErrorHandlerInterceptor_Factory() { return new ErrorHandlerInterceptor(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.ErrorHandlerService)); }, token: ErrorHandlerInterceptor, providedIn: "root" });
|
|
44
|
-
ErrorHandlerInterceptor.decorators = [
|
|
45
|
-
{ type: Injectable, args: [{
|
|
46
|
-
providedIn: 'root'
|
|
47
|
-
},] }
|
|
48
|
-
];
|
|
49
|
-
ErrorHandlerInterceptor.ctorParameters = () => [
|
|
50
|
-
{ type: ConfigService },
|
|
51
|
-
{ type: ErrorHandlerService }
|
|
52
|
-
];
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { throwError } from 'rxjs';
|
|
3
|
+
import { catchError } from 'rxjs/operators';
|
|
4
|
+
import { Logger } from './logger.service';
|
|
5
|
+
import { ConfigService } from './config.service';
|
|
6
|
+
import { ErrorHandlerService } from './error-handler.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "./config.service";
|
|
9
|
+
import * as i2 from "./error-handler.service";
|
|
10
|
+
const log = new Logger('ErrorHandlerInterceptor');
|
|
11
|
+
/**
|
|
12
|
+
* Adds a default error handler to all requests.
|
|
13
|
+
*/
|
|
14
|
+
export class ErrorHandlerInterceptor {
|
|
15
|
+
constructor(configService, errorHandler) {
|
|
16
|
+
this.configService = configService;
|
|
17
|
+
this.errorHandler = errorHandler;
|
|
18
|
+
}
|
|
19
|
+
intercept(request, next) {
|
|
20
|
+
return next.handle(request).pipe(catchError(error => this.handleError(error)));
|
|
21
|
+
}
|
|
22
|
+
// Customize the default error handler here if needed
|
|
23
|
+
handleError(error) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
let errorMessage = '';
|
|
26
|
+
if (error.error instanceof ErrorEvent) {
|
|
27
|
+
// client-side error
|
|
28
|
+
errorMessage = `Client Error: ${(_a = this.configService) === null || _a === void 0 ? void 0 : _a.getProjectKey()}: ${error.error.message}`;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// server-side error
|
|
32
|
+
errorMessage = `Server Error: ${(_b = this.configService) === null || _b === void 0 ? void 0 : _b.getProjectKey()}`;
|
|
33
|
+
try {
|
|
34
|
+
this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
console.log("Unable to handle server error", e);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return throwError(error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
ErrorHandlerInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function ErrorHandlerInterceptor_Factory() { return new ErrorHandlerInterceptor(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.ErrorHandlerService)); }, token: ErrorHandlerInterceptor, providedIn: "root" });
|
|
44
|
+
ErrorHandlerInterceptor.decorators = [
|
|
45
|
+
{ type: Injectable, args: [{
|
|
46
|
+
providedIn: 'root'
|
|
47
|
+
},] }
|
|
48
|
+
];
|
|
49
|
+
ErrorHandlerInterceptor.ctorParameters = () => [
|
|
50
|
+
{ type: ConfigService },
|
|
51
|
+
{ type: ErrorHandlerService }
|
|
52
|
+
];
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItaGFuZGxlci5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiI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RcclxuICBwcml2YXRlIGhhbmRsZUVycm9yKGVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSk6IE9ic2VydmFibGU8SHR0cEV2ZW50PGFueT4+IHtcclxuICAgIGxldCBlcnJvck1lc3NhZ2UgPSAnJztcclxuICAgIGlmIChlcnJvci5lcnJvciBpbnN0YW5jZW9mIEVycm9yRXZlbnQpIHtcclxuICAgICAgLy8gY2xpZW50LXNpZGUgZXJyb3JcclxuICAgICAgZXJyb3JNZXNzYWdlID0gYENsaWVudCBFcnJvcjogJHt0aGlzLmNvbmZpZ1NlcnZpY2U/LmdldFByb2plY3RLZXkoKX06ICR7ZXJyb3IuZXJyb3IubWVzc2FnZX1gO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgLy8gc2VydmVyLXNpZGUgZXJyb3JcclxuICAgICAgZXJyb3JNZXNzYWdlID0gYFNlcnZlciBFcnJvcjogJHt0aGlzLmNvbmZpZ1NlcnZpY2U/LmdldFByb2plY3RLZXkoKX1gO1xyXG4gICAgICB0cnkge1xyXG4gICAgICAgIHRoaXMuZXJyb3JIYW5kbGVyLmhhbmRsZUVycm9yKGVycm9yLCAnVW5leHBlY3RlZCBTZXJ2ZXIgRXJyb3IsIHRyeSBsYXRlciBvciBjb250YWN0IHNlcnZpY2UgdGVhbScpO1xyXG4gICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgY29uc29sZS5sb2coXCJVbmFibGUgdG8gaGFuZGxlIHNlcnZlciBlcnJvclwiLCBlKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIHRocm93RXJyb3IoZXJyb3IpO1xyXG4gIH1cclxuXHJcbn1cclxuIl19
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { TechlifyConfig } from './techlify-config.model';
|
|
2
|
-
import { Injectable } from "@angular/core";
|
|
3
|
-
import { AlertService } from "./alert.service";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "./alert.service";
|
|
6
|
-
import * as i2 from "./techlify-config.model";
|
|
7
|
-
/**
|
|
8
|
-
* Service used to handle errors from the request
|
|
9
|
-
*
|
|
10
|
-
* @author Joshua Kissoon
|
|
11
|
-
* @since 20171202
|
|
12
|
-
*/
|
|
13
|
-
export class ErrorHandlerService {
|
|
14
|
-
constructor(alerter, config) {
|
|
15
|
-
this.alerter = alerter;
|
|
16
|
-
this.config = config;
|
|
17
|
-
}
|
|
18
|
-
handleError(errorResponse, msg = '') {
|
|
19
|
-
var _a, _b, _c, _d;
|
|
20
|
-
// 1 - Create empty array to store errors
|
|
21
|
-
const errors = [];
|
|
22
|
-
// 2 - check if the error object is present in the response
|
|
23
|
-
if (errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) {
|
|
24
|
-
// 3 - Check for Laravel form validation error messages object
|
|
25
|
-
if ((_a = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) === null || _a === void 0 ? void 0 : _a.errors) {
|
|
26
|
-
// 4 - For each error property (which is a form field)
|
|
27
|
-
for (const property in errorResponse.error.errors) {
|
|
28
|
-
if ((_b = errorResponse.error.errors) === null || _b === void 0 ? void 0 : _b.hasOwnProperty(property)) {
|
|
29
|
-
// 5 - Extract it's array of errors
|
|
30
|
-
const propertyErrors = (_c = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) === null || _c === void 0 ? void 0 : _c.errors[property];
|
|
31
|
-
// 6 - Push all errors in the array to the errors array
|
|
32
|
-
propertyErrors.forEach(error => errors.push(error));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (errors.length === 0) {
|
|
37
|
-
// 7 - Push the main error message to the array of errors if there is no validation error
|
|
38
|
-
errors.push(errorResponse.error.message ? errorResponse.error.message : (_d = errorResponse.error) === null || _d === void 0 ? void 0 : _d.error);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
var errMessage = errors.length ? errors[0] : msg;
|
|
42
|
-
this.alerter.addAlert("Error: " + errMessage, "warning");
|
|
43
|
-
if (errorResponse.status == 403 && this.config.isLogoutWhileApiGetsFailed) {
|
|
44
|
-
sessionStorage.clear();
|
|
45
|
-
localStorage.clear();
|
|
46
|
-
location.reload();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
ErrorHandlerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ErrorHandlerService_Factory() { return new ErrorHandlerService(i0.ɵɵinject(i1.AlertService), i0.ɵɵinject(i2.TechlifyConfig)); }, token: ErrorHandlerService, providedIn: "root" });
|
|
51
|
-
ErrorHandlerService.decorators = [
|
|
52
|
-
{ type: Injectable, args: [{
|
|
53
|
-
providedIn: 'root'
|
|
54
|
-
},] }
|
|
55
|
-
];
|
|
56
|
-
ErrorHandlerService.ctorParameters = () => [
|
|
57
|
-
{ type: AlertService },
|
|
58
|
-
{ type: TechlifyConfig }
|
|
59
|
-
];
|
|
1
|
+
import { TechlifyConfig } from './techlify-config.model';
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import { AlertService } from "./alert.service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./alert.service";
|
|
6
|
+
import * as i2 from "./techlify-config.model";
|
|
7
|
+
/**
|
|
8
|
+
* Service used to handle errors from the request
|
|
9
|
+
*
|
|
10
|
+
* @author Joshua Kissoon
|
|
11
|
+
* @since 20171202
|
|
12
|
+
*/
|
|
13
|
+
export class ErrorHandlerService {
|
|
14
|
+
constructor(alerter, config) {
|
|
15
|
+
this.alerter = alerter;
|
|
16
|
+
this.config = config;
|
|
17
|
+
}
|
|
18
|
+
handleError(errorResponse, msg = '') {
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
|
+
// 1 - Create empty array to store errors
|
|
21
|
+
const errors = [];
|
|
22
|
+
// 2 - check if the error object is present in the response
|
|
23
|
+
if (errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) {
|
|
24
|
+
// 3 - Check for Laravel form validation error messages object
|
|
25
|
+
if ((_a = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) === null || _a === void 0 ? void 0 : _a.errors) {
|
|
26
|
+
// 4 - For each error property (which is a form field)
|
|
27
|
+
for (const property in errorResponse.error.errors) {
|
|
28
|
+
if ((_b = errorResponse.error.errors) === null || _b === void 0 ? void 0 : _b.hasOwnProperty(property)) {
|
|
29
|
+
// 5 - Extract it's array of errors
|
|
30
|
+
const propertyErrors = (_c = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) === null || _c === void 0 ? void 0 : _c.errors[property];
|
|
31
|
+
// 6 - Push all errors in the array to the errors array
|
|
32
|
+
propertyErrors.forEach(error => errors.push(error));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (errors.length === 0) {
|
|
37
|
+
// 7 - Push the main error message to the array of errors if there is no validation error
|
|
38
|
+
errors.push(errorResponse.error.message ? errorResponse.error.message : (_d = errorResponse.error) === null || _d === void 0 ? void 0 : _d.error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
var errMessage = errors.length ? errors[0] : msg;
|
|
42
|
+
this.alerter.addAlert("Error: " + errMessage, "warning");
|
|
43
|
+
if (errorResponse.status == 403 && this.config.isLogoutWhileApiGetsFailed) {
|
|
44
|
+
sessionStorage.clear();
|
|
45
|
+
localStorage.clear();
|
|
46
|
+
location.reload();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
ErrorHandlerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ErrorHandlerService_Factory() { return new ErrorHandlerService(i0.ɵɵinject(i1.AlertService), i0.ɵɵinject(i2.TechlifyConfig)); }, token: ErrorHandlerService, providedIn: "root" });
|
|
51
|
+
ErrorHandlerService.decorators = [
|
|
52
|
+
{ type: Injectable, args: [{
|
|
53
|
+
providedIn: 'root'
|
|
54
|
+
},] }
|
|
55
|
+
];
|
|
56
|
+
ErrorHandlerService.ctorParameters = () => [
|
|
57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XJyb3JzIGlmIHRoZXJlIGlzIG5vIHZhbGlkYXRpb24gZXJyb3JcclxuICAgICAgICBlcnJvcnMucHVzaChlcnJvclJlc3BvbnNlLmVycm9yLm1lc3NhZ2UgPyBlcnJvclJlc3BvbnNlLmVycm9yLm1lc3NhZ2UgOiBlcnJvclJlc3BvbnNlLmVycm9yPy5lcnJvcik7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIHZhciBlcnJNZXNzYWdlID0gZXJyb3JzLmxlbmd0aCA/IGVycm9yc1swXSA6IG1zZztcclxuICAgIHRoaXMuYWxlcnRlci5hZGRBbGVydChcIkVycm9yOiBcIiArIGVyck1lc3NhZ2UsIFwid2FybmluZ1wiKTtcclxuXHJcbiAgICBpZiAoZXJyb3JSZXNwb25zZS5zdGF0dXMgPT0gNDAzICYmIHRoaXMuY29uZmlnLmlzTG9nb3V0V2hpbGVBcGlHZXRzRmFpbGVkKSB7XHJcbiAgICAgIHNlc3Npb25TdG9yYWdlLmNsZWFyKCk7XHJcbiAgICAgIGxvY2FsU3RvcmFnZS5jbGVhcigpO1xyXG4gICAgICBsb2NhdGlvbi5yZWxvYWQoKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class FormValidatorService {
|
|
4
|
-
constructor() { }
|
|
5
|
-
/**Method to evaluate form fields*/
|
|
6
|
-
isFieldValid(field, formGroup, firstAttempt) {
|
|
7
|
-
return (!formGroup.get(field).valid && formGroup.get(field).touched) ||
|
|
8
|
-
(!formGroup.get(field).valid && formGroup.get(field).untouched && firstAttempt);
|
|
9
|
-
}
|
|
10
|
-
/**Method to find error in form fields*/
|
|
11
|
-
getErrorMessage(field, formGroup, errorMessages, errorField) {
|
|
12
|
-
const error = Object.keys(formGroup.get(field).errors);
|
|
13
|
-
return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
FormValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormValidatorService_Factory() { return new FormValidatorService(); }, token: FormValidatorService, providedIn: "root" });
|
|
17
|
-
FormValidatorService.decorators = [
|
|
18
|
-
{ type: Injectable, args: [{
|
|
19
|
-
providedIn: 'root'
|
|
20
|
-
},] }
|
|
21
|
-
];
|
|
22
|
-
FormValidatorService.ctorParameters = () => [];
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class FormValidatorService {
|
|
4
|
+
constructor() { }
|
|
5
|
+
/**Method to evaluate form fields*/
|
|
6
|
+
isFieldValid(field, formGroup, firstAttempt) {
|
|
7
|
+
return (!formGroup.get(field).valid && formGroup.get(field).touched) ||
|
|
8
|
+
(!formGroup.get(field).valid && formGroup.get(field).untouched && firstAttempt);
|
|
9
|
+
}
|
|
10
|
+
/**Method to find error in form fields*/
|
|
11
|
+
getErrorMessage(field, formGroup, errorMessages, errorField) {
|
|
12
|
+
const error = Object.keys(formGroup.get(field).errors);
|
|
13
|
+
return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
FormValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormValidatorService_Factory() { return new FormValidatorService(); }, token: FormValidatorService, providedIn: "root" });
|
|
17
|
+
FormValidatorService.decorators = [
|
|
18
|
+
{ type: Injectable, args: [{
|
|
19
|
+
providedIn: 'root'
|
|
20
|
+
},] }
|
|
21
|
+
];
|
|
22
|
+
FormValidatorService.ctorParameters = () => [];
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS12YWxpZGF0b3Iuc2VydmljZS5q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mluZywgZm9ybUdyb3VwOiBGb3JtR3JvdXAgfCBhbnksIGVycm9yTWVzc2FnZXM6IGFueSwgZXJyb3JGaWVsZD86IHN0cmluZykge1xyXG4gICAgY29uc3QgZXJyb3IgPSBPYmplY3Qua2V5cyhmb3JtR3JvdXAuZ2V0KGZpZWxkKS5lcnJvcnMpO1xyXG4gICAgcmV0dXJuIChlcnJvci5sZW5ndGggPiAwKSA/IChlcnJvck1lc3NhZ2VzW2Vycm9yRmllbGQgfHwgZmllbGRdW2Vycm9yWzBdXSA/IGVycm9yTWVzc2FnZXNbZXJyb3JGaWVsZCB8fCBmaWVsZF1bZXJyb3JbMF1dIDogJycpIDogJyc7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.
|
|
5
|
-
*/
|
|
6
|
-
export class HeaderInterceptor {
|
|
7
|
-
intercept(request, next) {
|
|
8
|
-
request = request.clone({
|
|
9
|
-
setHeaders: {
|
|
10
|
-
'Content-Type': request.headers.get('Content-Type') || 'application/json',
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
return next.handle(request);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
HeaderInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function HeaderInterceptor_Factory() { return new HeaderInterceptor(); }, token: HeaderInterceptor, providedIn: "root" });
|
|
17
|
-
HeaderInterceptor.decorators = [
|
|
18
|
-
{ type: Injectable, args: [{
|
|
19
|
-
providedIn: 'root'
|
|
20
|
-
},] }
|
|
21
|
-
];
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.
|
|
5
|
+
*/
|
|
6
|
+
export class HeaderInterceptor {
|
|
7
|
+
intercept(request, next) {
|
|
8
|
+
request = request.clone({
|
|
9
|
+
setHeaders: {
|
|
10
|
+
'Content-Type': request.headers.get('Content-Type') || 'application/json',
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return next.handle(request);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
HeaderInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function HeaderInterceptor_Factory() { return new HeaderInterceptor(); }, token: HeaderInterceptor, providedIn: "root" });
|
|
17
|
+
HeaderInterceptor.decorators = [
|
|
18
|
+
{ type: Injectable, args: [{
|
|
19
|
+
providedIn: 'root'
|
|
20
|
+
},] }
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVhZGVyLmludGVyY2VwdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXRlY2hsaWZ5LWNvcmUvc3JjL2xpYi9jb3JlL2hlYWRlci5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQzs7R0FFRztBQUlILE1BQU0sT0FBTyxpQkFBaUI7SUFFNUIsU0FBUyxDQUFDLE9BQXlCLEVBQUUsSUFBaUI7UUFDcEQsT0FBTyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUM7WUFDdEIsVUFBVSxFQUFFO2dCQUNWLGNBQWMsRUFBRSxPQUFPLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUMsSUFBSSxrQkFBa0I7YUFDMUU7U0FDRixDQUFDLENBQUM7UUFDSCxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsT0F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