monkey-front-core 0.0.456 → 0.0.458
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/esm2020/lib/components/alerts/alerts.component.mjs +45 -45
- package/esm2020/lib/components/alerts/alerts.module.mjs +21 -21
- package/esm2020/lib/components/alerts/index.mjs +3 -3
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.component.mjs +29 -29
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.module.mjs +43 -43
- package/esm2020/lib/components/closed-to-maintenance/index.mjs +3 -3
- package/esm2020/lib/components/currency-config/currency-config.component.mjs +39 -39
- package/esm2020/lib/components/currency-config/currency-config.module.mjs +39 -39
- package/esm2020/lib/components/currency-config/index.mjs +3 -3
- package/esm2020/lib/components/index.mjs +6 -6
- package/esm2020/lib/components/progress-bar/index.mjs +4 -4
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +23 -23
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +18 -18
- package/esm2020/lib/components/progress-bar/progress-bar.service.mjs +50 -50
- package/esm2020/lib/components/version-changed/index.mjs +3 -3
- package/esm2020/lib/components/version-changed/version-changed.component.mjs +24 -24
- package/esm2020/lib/components/version-changed/version-changed.module.mjs +39 -39
- package/esm2020/lib/core/decorators/index.mjs +5 -5
- package/esm2020/lib/core/decorators/monkeyecx-charts-decorators.mjs +40 -40
- package/esm2020/lib/core/decorators/monkeyecx-decorators.mjs +111 -111
- package/esm2020/lib/core/decorators/monkeyecx-download-decorators.mjs +26 -26
- package/esm2020/lib/core/decorators/monkeyecx-upload-decorators.mjs +26 -26
- package/esm2020/lib/core/directives/index.mjs +13 -13
- package/esm2020/lib/core/directives/monkeyecx-directives-module.mjs +73 -73
- package/esm2020/lib/core/directives/monkeyecx-drag-drop.mjs +57 -57
- package/esm2020/lib/core/directives/monkeyecx-feature-by-program-directive.mjs +54 -54
- package/esm2020/lib/core/directives/monkeyecx-feature-directive.mjs +68 -68
- package/esm2020/lib/core/directives/monkeyecx-format-currency.mjs +44 -44
- package/esm2020/lib/core/directives/monkeyecx-format-upper.mjs +67 -67
- package/esm2020/lib/core/directives/monkeyecx-only-alpha-numeric-directive.mjs +28 -28
- package/esm2020/lib/core/directives/monkeyecx-only-number-directive.mjs +28 -28
- package/esm2020/lib/core/directives/monkeyecx-popover-options.directive.mjs +39 -39
- package/esm2020/lib/core/directives/monkeyecx-popover.directive.mjs +212 -212
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +75 -75
- package/esm2020/lib/core/directives/monkeyecx-tooltip-directive.mjs +123 -123
- package/esm2020/lib/core/index.mjs +10 -10
- package/esm2020/lib/core/interceptors/index.mjs +6 -6
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +49 -49
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +59 -59
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-interceptor.module.mjs +47 -47
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.mjs +43 -43
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.mjs +37 -37
- package/esm2020/lib/core/interfaces/index.mjs +35 -35
- package/esm2020/lib/core/interfaces/monkeyecx-auth-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-company-pendencies.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-company.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-config-bootstrap.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-country-security.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-error-response.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-filter.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-handled-error-response.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-header-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-intercom-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-interface.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-me-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-navigation.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-pagination.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-program.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-releases.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-request-in-progress.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-resolver.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-response-links.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-response-paged.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-saved-state.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-scroll-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-service-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-storage.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-store.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-support-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-translate-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-download/index.mjs +4 -4
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-download.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-downloaded.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-item-download.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-queue/index.mjs +4 -4
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-queue.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-upload/index.mjs +3 -3
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-upload.mjs +2 -2
- package/esm2020/lib/core/interfaces/schedules/index.mjs +2 -2
- package/esm2020/lib/core/interfaces/schedules/monkeyecx-request-schedule.mjs +2 -2
- package/esm2020/lib/core/model/index.mjs +3 -3
- package/esm2020/lib/core/model/monkeyecx-links.model.mjs +8 -8
- package/esm2020/lib/core/model/monkeyecx-model.mjs +25 -25
- package/esm2020/lib/core/pipes/index.mjs +22 -22
- package/esm2020/lib/core/pipes/monkeyecx-blob-secure.mjs +26 -26
- package/esm2020/lib/core/pipes/monkeyecx-display-first-name.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-display-initials.mjs +21 -21
- package/esm2020/lib/core/pipes/monkeyecx-display-support-phone.mjs +33 -33
- package/esm2020/lib/core/pipes/monkeyecx-format-address.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-beautify-json.mjs +38 -38
- package/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +27 -27
- package/esm2020/lib/core/pipes/monkeyecx-format-date-group.mjs +45 -45
- package/esm2020/lib/core/pipes/monkeyecx-format-date-timelapse.mjs +32 -32
- package/esm2020/lib/core/pipes/monkeyecx-format-date-unix-timelapse.mjs +36 -36
- package/esm2020/lib/core/pipes/monkeyecx-format-document.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-number.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-phone.mjs +42 -42
- package/esm2020/lib/core/pipes/monkeyecx-format-size.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-tax.mjs +23 -23
- package/esm2020/lib/core/pipes/monkeyecx-format-type-document.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-value.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-zipcode.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-pipes.module.mjs +117 -117
- package/esm2020/lib/core/pipes/monkeyecx-text-truncate.mjs +23 -23
- package/esm2020/lib/core/pipes/monkeyecx-truncate-qtd.mjs +16 -16
- package/esm2020/lib/core/services/alerts/index.mjs +2 -2
- package/esm2020/lib/core/services/alerts/monkeyecx-alerts.service.mjs +42 -42
- package/esm2020/lib/core/services/auth/index.mjs +6 -6
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-company.service.mjs +28 -28
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-login.service.mjs +27 -27
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-role.service.mjs +79 -79
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard.service.mjs +26 -26
- package/esm2020/lib/core/services/auth/monkeyecx-authentication.service.mjs +78 -78
- package/esm2020/lib/core/services/commons/index.mjs +3 -3
- package/esm2020/lib/core/services/commons/monkeyecx-commons-resolve.service.mjs +121 -122
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +362 -362
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +42 -42
- package/esm2020/lib/core/services/config/monkeyecx-config.module.mjs +28 -28
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +107 -107
- package/esm2020/lib/core/services/config/monkeyecx-currency-config.service.mjs +84 -84
- package/esm2020/lib/core/services/config/monkeyecx-error-config.service.mjs +85 -85
- package/esm2020/lib/core/services/config/monkeyecx-feature-toggle.service.mjs +76 -76
- package/esm2020/lib/core/services/config/monkeyecx-gtm-config.service.mjs +50 -50
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +152 -152
- package/esm2020/lib/core/services/config/monkeyecx-logs-config.service.mjs +34 -34
- package/esm2020/lib/core/services/config/monkeyecx-maintenance-config.service.mjs +37 -37
- package/esm2020/lib/core/services/config/monkeyecx-security-console-config.service.mjs +47 -47
- package/esm2020/lib/core/services/config/monkeyecx-service-worker-config.service.mjs +53 -53
- package/esm2020/lib/core/services/error/index.mjs +5 -5
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.module.mjs +27 -27
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +37 -37
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +138 -138
- package/esm2020/lib/core/services/error/monkeyecx-others-errors-handling.service.mjs +29 -29
- package/esm2020/lib/core/services/index.mjs +26 -26
- package/esm2020/lib/core/services/logged/index.mjs +2 -2
- package/esm2020/lib/core/services/logged/monkeyecx-logged-handling.service.mjs +40 -40
- package/esm2020/lib/core/services/monkeyecx-handling.service.mjs +50 -50
- package/esm2020/lib/core/services/monkeyecx-service.service.mjs +104 -104
- package/esm2020/lib/core/services/pagination/index.mjs +2 -2
- package/esm2020/lib/core/services/pagination/monkeyecx-pagination.service.mjs +29 -29
- package/esm2020/lib/core/services/request-download/index.mjs +3 -3
- package/esm2020/lib/core/services/request-download/monkeyecx-request-download-handling.service.mjs +93 -93
- package/esm2020/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.mjs +61 -61
- package/esm2020/lib/core/services/request-paged/index.mjs +2 -2
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +42 -42
- package/esm2020/lib/core/services/request-queue/index.mjs +3 -3
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.mjs +114 -114
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.mjs +119 -119
- package/esm2020/lib/core/services/routes/index.mjs +2 -2
- package/esm2020/lib/core/services/routes/monkeyecx-dicovery-params.service.mjs +54 -54
- package/esm2020/lib/core/services/schedules/index.mjs +2 -2
- package/esm2020/lib/core/services/schedules/monkeyecx-request-schedule.service.mjs +188 -188
- package/esm2020/lib/core/services/storage/index.mjs +3 -3
- package/esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs +32 -32
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +236 -236
- package/esm2020/lib/core/services/store/index.mjs +2 -2
- package/esm2020/lib/core/services/store/monkeyecx-store.service.mjs +189 -189
- package/esm2020/lib/core/specification-search/index.mjs +2 -2
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +108 -108
- package/esm2020/lib/core/utils/decorators-utils.mjs +40 -40
- package/esm2020/lib/core/utils/index.mjs +8 -8
- package/esm2020/lib/core/utils/statics.mjs +45 -45
- package/esm2020/lib/core/utils/utils.mjs +267 -267
- package/esm2020/lib/core/utils/validate-utils.mjs +205 -205
- package/esm2020/lib/core/utils/validators.mjs +268 -268
- package/esm2020/lib/monkey-front-core.module.mjs +71 -71
- package/esm2020/lib/store/actions/index.mjs +2 -2
- package/esm2020/lib/store/actions/monkeyecx-storage.actions.mjs +8 -8
- package/esm2020/lib/store/index.mjs +4 -4
- package/esm2020/lib/store/reducers/index.mjs +3 -3
- package/esm2020/lib/store/reducers/monkeyecx-seeder.reducer.mjs +53 -53
- package/esm2020/lib/store/reducers/monkeyecx-storage.reducer.mjs +40 -40
- package/esm2020/lib/store/selectors/index.mjs +2 -2
- package/esm2020/lib/store/selectors/monkeyecx-storage.selector.mjs +17 -17
- package/esm2020/monkey-front-core.mjs +4 -4
- package/esm2020/public-api.mjs +8 -8
- package/fesm2015/monkey-front-core.mjs +5859 -5860
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +5921 -5922
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/components/alerts/alerts.component.d.ts +22 -22
- package/lib/components/alerts/alerts.module.d.ts +10 -10
- package/lib/components/alerts/index.d.ts +2 -2
- package/lib/components/closed-to-maintenance/closed-to-maintenance.component.d.ts +13 -13
- package/lib/components/closed-to-maintenance/closed-to-maintenance.module.d.ts +11 -11
- package/lib/components/closed-to-maintenance/index.d.ts +2 -2
- package/lib/components/currency-config/currency-config.component.d.ts +17 -17
- package/lib/components/currency-config/currency-config.module.d.ts +10 -10
- package/lib/components/currency-config/index.d.ts +2 -2
- package/lib/components/index.d.ts +5 -5
- package/lib/components/progress-bar/index.d.ts +3 -3
- package/lib/components/progress-bar/progress-bar.component.d.ts +11 -11
- package/lib/components/progress-bar/progress-bar.module.d.ts +8 -8
- package/lib/components/progress-bar/progress-bar.service.d.ts +14 -14
- package/lib/components/version-changed/index.d.ts +2 -2
- package/lib/components/version-changed/version-changed.component.d.ts +9 -9
- package/lib/components/version-changed/version-changed.module.d.ts +10 -10
- package/lib/core/decorators/index.d.ts +4 -4
- package/lib/core/decorators/monkeyecx-charts-decorators.d.ts +1 -1
- package/lib/core/decorators/monkeyecx-decorators.d.ts +7 -7
- package/lib/core/decorators/monkeyecx-download-decorators.d.ts +2 -2
- package/lib/core/decorators/monkeyecx-upload-decorators.d.ts +2 -2
- package/lib/core/directives/index.d.ts +12 -12
- package/lib/core/directives/monkeyecx-directives-module.d.ts +19 -19
- package/lib/core/directives/monkeyecx-drag-drop.d.ts +12 -12
- package/lib/core/directives/monkeyecx-feature-by-program-directive.d.ts +16 -16
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +17 -17
- package/lib/core/directives/monkeyecx-format-currency.d.ts +16 -16
- package/lib/core/directives/monkeyecx-format-upper.d.ts +18 -18
- package/lib/core/directives/monkeyecx-only-alpha-numeric-directive.d.ts +9 -9
- package/lib/core/directives/monkeyecx-only-number-directive.d.ts +9 -9
- package/lib/core/directives/monkeyecx-popover-options.directive.d.ts +19 -19
- package/lib/core/directives/monkeyecx-popover.directive.d.ts +43 -43
- package/lib/core/directives/monkeyecx-security-directive.d.ts +18 -18
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +23 -23
- package/lib/core/index.d.ts +9 -9
- package/lib/core/interceptors/index.d.ts +5 -5
- package/lib/core/interceptors/monkeyecx-http-config-error.interceptor.d.ts +18 -18
- package/lib/core/interceptors/monkeyecx-http-config-header.interceptor.d.ts +16 -16
- package/lib/core/interceptors/monkeyecx-http-config-interceptor.module.d.ts +9 -9
- package/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.d.ts +12 -12
- package/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.d.ts +14 -14
- package/lib/core/interfaces/index.d.ts +34 -34
- package/lib/core/interfaces/monkeyecx-auth-credentials.d.ts +15 -15
- package/lib/core/interfaces/monkeyecx-company-pendencies.d.ts +14 -14
- package/lib/core/interfaces/monkeyecx-company.d.ts +10 -10
- package/lib/core/interfaces/monkeyecx-config-bootstrap.d.ts +14 -14
- package/lib/core/interfaces/monkeyecx-config.d.ts +132 -132
- package/lib/core/interfaces/monkeyecx-country-security.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-error-response.d.ts +5 -5
- package/lib/core/interfaces/monkeyecx-filter.d.ts +42 -42
- package/lib/core/interfaces/monkeyecx-handled-error-response.d.ts +10 -10
- package/lib/core/interfaces/monkeyecx-header-credentials.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-intercom-options.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-interface.d.ts +11 -11
- package/lib/core/interfaces/monkeyecx-me-credentials.d.ts +22 -22
- package/lib/core/interfaces/monkeyecx-navigation.d.ts +27 -27
- package/lib/core/interfaces/monkeyecx-pagination.d.ts +25 -25
- package/lib/core/interfaces/monkeyecx-program.d.ts +10 -10
- package/lib/core/interfaces/monkeyecx-releases.d.ts +9 -9
- package/lib/core/interfaces/monkeyecx-request-in-progress.d.ts +3 -3
- package/lib/core/interfaces/monkeyecx-request-paged.d.ts +23 -23
- package/lib/core/interfaces/monkeyecx-resolver.d.ts +39 -39
- package/lib/core/interfaces/monkeyecx-response-links.d.ts +11 -11
- package/lib/core/interfaces/monkeyecx-response-paged.d.ts +6 -6
- package/lib/core/interfaces/monkeyecx-saved-state.d.ts +5 -5
- package/lib/core/interfaces/monkeyecx-scroll-options.d.ts +5 -5
- package/lib/core/interfaces/monkeyecx-service-credentials.d.ts +12 -12
- package/lib/core/interfaces/monkeyecx-storage.d.ts +38 -38
- package/lib/core/interfaces/monkeyecx-store.d.ts +31 -31
- package/lib/core/interfaces/monkeyecx-support-options.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-token-credentials.d.ts +21 -21
- package/lib/core/interfaces/monkeyecx-translate-options.d.ts +4 -4
- package/lib/core/interfaces/request-download/index.d.ts +3 -3
- package/lib/core/interfaces/request-download/monkeyecx-request-download.d.ts +10 -10
- package/lib/core/interfaces/request-download/monkeyecx-request-downloaded.d.ts +7 -7
- package/lib/core/interfaces/request-download/monkeyecx-request-item-download.d.ts +7 -7
- package/lib/core/interfaces/request-queue/index.d.ts +3 -3
- package/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.d.ts +7 -7
- package/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.d.ts +6 -6
- package/lib/core/interfaces/request-queue/monkeyecx-request-queue.d.ts +8 -8
- package/lib/core/interfaces/request-upload/index.d.ts +2 -2
- package/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.d.ts +5 -5
- package/lib/core/interfaces/request-upload/monkeyecx-request-upload.d.ts +10 -10
- package/lib/core/interfaces/schedules/index.d.ts +1 -1
- package/lib/core/interfaces/schedules/monkeyecx-request-schedule.d.ts +13 -13
- package/lib/core/model/index.d.ts +2 -2
- package/lib/core/model/monkeyecx-links.model.d.ts +4 -4
- package/lib/core/model/monkeyecx-model.d.ts +13 -13
- package/lib/core/pipes/index.d.ts +21 -21
- package/lib/core/pipes/monkeyecx-blob-secure.d.ts +13 -13
- package/lib/core/pipes/monkeyecx-display-first-name.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-display-initials.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-display-support-phone.d.ts +18 -18
- package/lib/core/pipes/monkeyecx-format-address.d.ts +14 -14
- package/lib/core/pipes/monkeyecx-format-beautify-json.d.ts +8 -8
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +11 -11
- package/lib/core/pipes/monkeyecx-format-date-group.d.ts +11 -11
- package/lib/core/pipes/monkeyecx-format-date-timelapse.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-date-unix-timelapse.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-document.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-number.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-phone.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-size.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-tax.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-value.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-zipcode.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +26 -26
- package/lib/core/pipes/monkeyecx-text-truncate.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-truncate-qtd.d.ts +7 -7
- package/lib/core/services/alerts/index.d.ts +1 -1
- package/lib/core/services/alerts/monkeyecx-alerts.service.d.ts +21 -21
- package/lib/core/services/auth/index.d.ts +5 -5
- package/lib/core/services/auth/monkeyecx-auth-guard-company.service.d.ts +10 -10
- package/lib/core/services/auth/monkeyecx-auth-guard-login.service.d.ts +10 -10
- package/lib/core/services/auth/monkeyecx-auth-guard-role.service.d.ts +16 -16
- package/lib/core/services/auth/monkeyecx-auth-guard.service.d.ts +10 -10
- package/lib/core/services/auth/monkeyecx-authentication.service.d.ts +35 -35
- package/lib/core/services/commons/index.d.ts +2 -2
- package/lib/core/services/commons/monkeyecx-commons-resolve.service.d.ts +53 -56
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +120 -120
- package/lib/core/services/config/monkeyecx-alerts-config.service.d.ts +11 -11
- package/lib/core/services/config/monkeyecx-config.module.d.ts +9 -9
- package/lib/core/services/config/monkeyecx-config.service.d.ts +36 -36
- package/lib/core/services/config/monkeyecx-currency-config.service.d.ts +15 -15
- package/lib/core/services/config/monkeyecx-error-config.service.d.ts +8 -8
- package/lib/core/services/config/monkeyecx-feature-toggle.service.d.ts +16 -16
- package/lib/core/services/config/monkeyecx-gtm-config.service.d.ts +8 -8
- package/lib/core/services/config/monkeyecx-i18n-config.service.d.ts +18 -18
- package/lib/core/services/config/monkeyecx-logs-config.service.d.ts +7 -7
- package/lib/core/services/config/monkeyecx-maintenance-config.service.d.ts +13 -13
- package/lib/core/services/config/monkeyecx-security-console-config.service.d.ts +12 -12
- package/lib/core/services/config/monkeyecx-service-worker-config.service.d.ts +16 -16
- package/lib/core/services/error/index.d.ts +4 -4
- package/lib/core/services/error/monkeyecx-error-handling.module.d.ts +9 -9
- package/lib/core/services/error/monkeyecx-error-handling.service.d.ts +9 -9
- package/lib/core/services/error/monkeyecx-http-error-handling.service.d.ts +26 -26
- package/lib/core/services/error/monkeyecx-others-errors-handling.service.d.ts +9 -9
- package/lib/core/services/index.d.ts +25 -25
- package/lib/core/services/logged/index.d.ts +1 -1
- package/lib/core/services/logged/monkeyecx-logged-handling.service.d.ts +14 -14
- package/lib/core/services/monkeyecx-handling.service.d.ts +22 -22
- package/lib/core/services/monkeyecx-service.service.d.ts +18 -18
- package/lib/core/services/pagination/index.d.ts +1 -1
- package/lib/core/services/pagination/monkeyecx-pagination.service.d.ts +9 -9
- package/lib/core/services/request-download/index.d.ts +2 -2
- package/lib/core/services/request-download/monkeyecx-request-download-handling.service.d.ts +18 -18
- package/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.d.ts +16 -16
- package/lib/core/services/request-paged/index.d.ts +1 -1
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +11 -11
- package/lib/core/services/request-queue/index.d.ts +2 -2
- package/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.d.ts +21 -21
- package/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.d.ts +23 -23
- package/lib/core/services/routes/index.d.ts +1 -1
- package/lib/core/services/routes/monkeyecx-dicovery-params.service.d.ts +13 -13
- package/lib/core/services/schedules/index.d.ts +1 -1
- package/lib/core/services/schedules/monkeyecx-request-schedule.service.d.ts +47 -47
- package/lib/core/services/storage/index.d.ts +2 -2
- package/lib/core/services/storage/monkeyecx-cookie-storage.service.d.ts +11 -11
- package/lib/core/services/storage/monkeyecx-token-storage.service.d.ts +30 -30
- package/lib/core/services/store/index.d.ts +1 -1
- package/lib/core/services/store/monkeyecx-store.service.d.ts +50 -50
- package/lib/core/specification-search/index.d.ts +1 -1
- package/lib/core/specification-search/monkeyecx-specification-search.d.ts +20 -20
- package/lib/core/utils/decorators-utils.d.ts +5 -5
- package/lib/core/utils/index.d.ts +6 -6
- package/lib/core/utils/statics.d.ts +34 -34
- package/lib/core/utils/utils.d.ts +26 -26
- package/lib/core/utils/validate-utils.d.ts +66 -66
- package/lib/core/utils/validators.d.ts +36 -36
- package/lib/monkey-front-core.module.d.ts +19 -19
- package/lib/store/actions/index.d.ts +1 -1
- package/lib/store/actions/monkeyecx-storage.actions.d.ts +23 -23
- package/lib/store/index.d.ts +3 -3
- package/lib/store/reducers/index.d.ts +2 -2
- package/lib/store/reducers/monkeyecx-seeder.reducer.d.ts +2 -2
- package/lib/store/reducers/monkeyecx-storage.reducer.d.ts +13 -13
- package/lib/store/selectors/index.d.ts +1 -1
- package/lib/store/selectors/monkeyecx-storage.selector.d.ts +8 -8
- package/monkey-front-core-0.0.458.tgz +0 -0
- package/monkey-front-core.d.ts +5 -5
- package/package.json +1 -1
- package/public-api.d.ts +4 -4
- package/monkey-front-core-0.0.456.tgz +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { from, throwError } from 'rxjs';
|
|
3
|
-
import { catchError, map, mergeMap, take } from 'rxjs/operators';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../services/auth";
|
|
6
|
-
import * as i2 from "../services/error";
|
|
7
|
-
export class MonkeyEcxHttpConfigErrorInterceptor {
|
|
8
|
-
constructor(monkeyecxAuthenticationService, monkeyecxErrorHandlingService) {
|
|
9
|
-
this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
10
|
-
this.monkeyecxErrorHandlingService = monkeyecxErrorHandlingService;
|
|
11
|
-
// no to do
|
|
12
|
-
}
|
|
13
|
-
async handle(request, error) {
|
|
14
|
-
try {
|
|
15
|
-
if (this.monkeyecxAuthenticationService.refreshShouldHappen(error)) {
|
|
16
|
-
await this.monkeyecxAuthenticationService?.refreshToken();
|
|
17
|
-
const headers = await this.monkeyecxAuthenticationService.getRequestWithHeadersAsync(request);
|
|
18
|
-
return headers;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
catch (e) {
|
|
22
|
-
return throwError(e);
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
intercept(request, next) {
|
|
27
|
-
return next.handle(request).pipe(map((event) => {
|
|
28
|
-
return event;
|
|
29
|
-
}), catchError((error) => {
|
|
30
|
-
return from(this.handle(request, error)).pipe(take(1), map((event) => {
|
|
31
|
-
return event;
|
|
32
|
-
}), mergeMap((resp) => {
|
|
33
|
-
request = request.clone({
|
|
34
|
-
setHeaders: resp
|
|
35
|
-
});
|
|
36
|
-
return next.handle(request);
|
|
37
|
-
}), catchError(() => {
|
|
38
|
-
this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
39
|
-
return throwError(error);
|
|
40
|
-
}));
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
MonkeyEcxHttpConfigErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigErrorInterceptor, deps: [{ token: i1.MonkeyEcxAuthenticationService }, { token: i2.MonkeyEcxErrorHandlingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
-
MonkeyEcxHttpConfigErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigErrorInterceptor });
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigErrorInterceptor, decorators: [{
|
|
47
|
-
type: Injectable
|
|
48
|
-
}], ctorParameters: function () { return [{ type: i1.MonkeyEcxAuthenticationService }, { type: i2.MonkeyEcxErrorHandlingService }]; } });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { from, throwError } from 'rxjs';
|
|
3
|
+
import { catchError, map, mergeMap, take } from 'rxjs/operators';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../services/auth";
|
|
6
|
+
import * as i2 from "../services/error";
|
|
7
|
+
export class MonkeyEcxHttpConfigErrorInterceptor {
|
|
8
|
+
constructor(monkeyecxAuthenticationService, monkeyecxErrorHandlingService) {
|
|
9
|
+
this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
10
|
+
this.monkeyecxErrorHandlingService = monkeyecxErrorHandlingService;
|
|
11
|
+
// no to do
|
|
12
|
+
}
|
|
13
|
+
async handle(request, error) {
|
|
14
|
+
try {
|
|
15
|
+
if (this.monkeyecxAuthenticationService.refreshShouldHappen(error)) {
|
|
16
|
+
await this.monkeyecxAuthenticationService?.refreshToken();
|
|
17
|
+
const headers = await this.monkeyecxAuthenticationService.getRequestWithHeadersAsync(request);
|
|
18
|
+
return headers;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
return throwError(e);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
intercept(request, next) {
|
|
27
|
+
return next.handle(request).pipe(map((event) => {
|
|
28
|
+
return event;
|
|
29
|
+
}), catchError((error) => {
|
|
30
|
+
return from(this.handle(request, error)).pipe(take(1), map((event) => {
|
|
31
|
+
return event;
|
|
32
|
+
}), mergeMap((resp) => {
|
|
33
|
+
request = request.clone({
|
|
34
|
+
setHeaders: resp
|
|
35
|
+
});
|
|
36
|
+
return next.handle(request);
|
|
37
|
+
}), catchError(() => {
|
|
38
|
+
this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
39
|
+
return throwError(error);
|
|
40
|
+
}));
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
MonkeyEcxHttpConfigErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigErrorInterceptor, deps: [{ token: i1.MonkeyEcxAuthenticationService }, { token: i2.MonkeyEcxErrorHandlingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
MonkeyEcxHttpConfigErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigErrorInterceptor });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigErrorInterceptor, decorators: [{
|
|
47
|
+
type: Injectable
|
|
48
|
+
}], ctorParameters: function () { return [{ type: i1.MonkeyEcxAuthenticationService }, { type: i2.MonkeyEcxErrorHandlingService }]; } });
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWh0dHAtY29uZmlnLWVycm9yLmludGVyY2VwdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9ua2V5LWZyb250LWNvcmUvc3JjL2xpYi9jb3JlL2ludGVyY2VwdG9ycy9tb25rZXllY3gtaHR0cC1jb25maWctZXJyb3IuaW50ZXJjZXB0b3IudHMiXSwibmFtZX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ZXN0LmNsb25lKHtcbiAgICAgICAgICAgICAgc2V0SGVhZGVyczogcmVzcFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gbmV4dC5oYW5kbGUocmVxdWVzdCk7XG4gICAgICAgICAgfSksXG4gICAgICAgICAgY2F0Y2hFcnJvcigoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLm1vbmtleWVjeEVycm9ySGFuZGxpbmdTZXJ2aWNlLmhhbmRsZUVycm9yKGVycm9yLCAncmVmcmVzaF90b2tlbicpO1xuICAgICAgICAgICAgcmV0dXJuIHRocm93RXJyb3IoZXJyb3IpO1xuICAgICAgICAgIH0pXG4gICAgICAgICk7XG4gICAgICB9KVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { from, throwError } from 'rxjs';
|
|
3
|
-
import { catchError, first, map, mergeMap, take } from 'rxjs/operators';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../services/auth";
|
|
6
|
-
import * as i2 from "../services/error";
|
|
7
|
-
import * as i3 from "../services";
|
|
8
|
-
export class MonkeyEcxHttpConfigHeaderInterceptor {
|
|
9
|
-
constructor(authService, errorHandlingService, config) {
|
|
10
|
-
this.authService = authService;
|
|
11
|
-
this.errorHandlingService = errorHandlingService;
|
|
12
|
-
this.config = config;
|
|
13
|
-
// not to do
|
|
14
|
-
}
|
|
15
|
-
async handle(request) {
|
|
16
|
-
const { url } = request;
|
|
17
|
-
if (this.authService.isTokenMandatory(url)) {
|
|
18
|
-
try {
|
|
19
|
-
await this.config
|
|
20
|
-
.config()
|
|
21
|
-
.pipe(first((val) => {
|
|
22
|
-
return !!val && JSON.stringify(val) !== '{}';
|
|
23
|
-
}))
|
|
24
|
-
.toPromise();
|
|
25
|
-
}
|
|
26
|
-
catch (e) {
|
|
27
|
-
// not to do
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
let resp = null;
|
|
31
|
-
try {
|
|
32
|
-
resp = await this.authService.getRequestWithHeadersAsync(request);
|
|
33
|
-
}
|
|
34
|
-
catch (e) {
|
|
35
|
-
this.errorHandlingService.handleError(e);
|
|
36
|
-
return throwError(e);
|
|
37
|
-
}
|
|
38
|
-
return resp;
|
|
39
|
-
}
|
|
40
|
-
intercept(request, next) {
|
|
41
|
-
return from(this.handle(request)).pipe(take(1), map((event) => {
|
|
42
|
-
return event;
|
|
43
|
-
}), mergeMap((resp) => {
|
|
44
|
-
request = request.clone({
|
|
45
|
-
setHeaders: resp
|
|
46
|
-
});
|
|
47
|
-
return next.handle(request);
|
|
48
|
-
}), catchError((error) => {
|
|
49
|
-
this.errorHandlingService.handleError(error);
|
|
50
|
-
return throwError(error);
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
MonkeyEcxHttpConfigHeaderInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigHeaderInterceptor, deps: [{ token: i1.MonkeyEcxAuthenticationService }, { token: i2.MonkeyEcxErrorHandlingService }, { token: i3.MonkeyEcxConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
-
MonkeyEcxHttpConfigHeaderInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigHeaderInterceptor });
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigHeaderInterceptor, decorators: [{
|
|
57
|
-
type: Injectable
|
|
58
|
-
}], ctorParameters: function () { return [{ type: i1.MonkeyEcxAuthenticationService }, { type: i2.MonkeyEcxErrorHandlingService }, { type: i3.MonkeyEcxConfigService }]; } });
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { from, throwError } from 'rxjs';
|
|
3
|
+
import { catchError, first, map, mergeMap, take } from 'rxjs/operators';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../services/auth";
|
|
6
|
+
import * as i2 from "../services/error";
|
|
7
|
+
import * as i3 from "../services";
|
|
8
|
+
export class MonkeyEcxHttpConfigHeaderInterceptor {
|
|
9
|
+
constructor(authService, errorHandlingService, config) {
|
|
10
|
+
this.authService = authService;
|
|
11
|
+
this.errorHandlingService = errorHandlingService;
|
|
12
|
+
this.config = config;
|
|
13
|
+
// not to do
|
|
14
|
+
}
|
|
15
|
+
async handle(request) {
|
|
16
|
+
const { url } = request;
|
|
17
|
+
if (this.authService.isTokenMandatory(url)) {
|
|
18
|
+
try {
|
|
19
|
+
await this.config
|
|
20
|
+
.config()
|
|
21
|
+
.pipe(first((val) => {
|
|
22
|
+
return !!val && JSON.stringify(val) !== '{}';
|
|
23
|
+
}))
|
|
24
|
+
.toPromise();
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
// not to do
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
let resp = null;
|
|
31
|
+
try {
|
|
32
|
+
resp = await this.authService.getRequestWithHeadersAsync(request);
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
this.errorHandlingService.handleError(e);
|
|
36
|
+
return throwError(e);
|
|
37
|
+
}
|
|
38
|
+
return resp;
|
|
39
|
+
}
|
|
40
|
+
intercept(request, next) {
|
|
41
|
+
return from(this.handle(request)).pipe(take(1), map((event) => {
|
|
42
|
+
return event;
|
|
43
|
+
}), mergeMap((resp) => {
|
|
44
|
+
request = request.clone({
|
|
45
|
+
setHeaders: resp
|
|
46
|
+
});
|
|
47
|
+
return next.handle(request);
|
|
48
|
+
}), catchError((error) => {
|
|
49
|
+
this.errorHandlingService.handleError(error);
|
|
50
|
+
return throwError(error);
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
MonkeyEcxHttpConfigHeaderInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigHeaderInterceptor, deps: [{ token: i1.MonkeyEcxAuthenticationService }, { token: i2.MonkeyEcxErrorHandlingService }, { token: i3.MonkeyEcxConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
55
|
+
MonkeyEcxHttpConfigHeaderInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigHeaderInterceptor });
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigHeaderInterceptor, decorators: [{
|
|
57
|
+
type: Injectable
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i1.MonkeyEcxAuthenticationService }, { type: i2.MonkeyEcxErrorHandlingService }, { type: i3.MonkeyEcxConfigService }]; } });
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWh0dHAtY29uZmlnLWhlYWRlci5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21vbmtleS1mcm9udC1jb3JlL3NyYy9saWIvY29yZS9pbnRlcmNlcHRvcnMvbW9ua2V5ZWN4LWh0dHAtY29uZmlnLWhlYWRlci5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxJQUFJLEVBQWMsVUFBVSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3BELE9BQU8sRUFBRSxVQUFVLEVBQUUsS0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gcmVxdWVzdC5jbG9uZSh7XG4gICAgICAgICAgc2V0SGVhZGVyczogcmVzcFxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIG5leHQuaGFuZGxlKHJlcXVlc3QpO1xuICAgICAgfSksXG4gICAgICBjYXRjaEVycm9yKChlcnJvcjogSHR0cEVycm9yUmVzcG9uc2UpID0+IHtcbiAgICAgICAgdGhpcy5lcnJvckhhbmRsaW5nU2VydmljZS5oYW5kbGVFcnJvcihlcnJvcik7XG4gICAgICAgIHJldHVybiB0aHJvd0Vycm9yKGVycm9yKTtcbiAgICAgIH0pXG4gICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { MonkeyEcxHttpConfigErrorInterceptor } from './monkeyecx-http-config-error.interceptor';
|
|
5
|
-
import { MonkeyEcxHttpConfigHeaderInterceptor } from './monkeyecx-http-config-header.interceptor';
|
|
6
|
-
import { MonkeyEcxHttpConfigQueueInterceptor } from './monkeyecx-http-config-queue.interceptor';
|
|
7
|
-
import { MonkeyEcxHttpConfigLoadingInProgressInterceptor } from './monkeyecx-http-config-loading-in-progress.interceptor';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export class MonkeyEcxHttpConfigInterceptorModule {
|
|
10
|
-
static forRoot() {
|
|
11
|
-
return {
|
|
12
|
-
ngModule: MonkeyEcxHttpConfigInterceptorModule,
|
|
13
|
-
providers: [
|
|
14
|
-
{
|
|
15
|
-
provide: HTTP_INTERCEPTORS,
|
|
16
|
-
useClass: MonkeyEcxHttpConfigHeaderInterceptor,
|
|
17
|
-
multi: true,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
provide: HTTP_INTERCEPTORS,
|
|
21
|
-
useClass: MonkeyEcxHttpConfigErrorInterceptor,
|
|
22
|
-
multi: true,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
provide: HTTP_INTERCEPTORS,
|
|
26
|
-
useClass: MonkeyEcxHttpConfigQueueInterceptor,
|
|
27
|
-
multi: true,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
provide: HTTP_INTERCEPTORS,
|
|
31
|
-
useClass: MonkeyEcxHttpConfigLoadingInProgressInterceptor,
|
|
32
|
-
multi: true,
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
MonkeyEcxHttpConfigInterceptorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
39
|
-
MonkeyEcxHttpConfigInterceptorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, imports: [CommonModule] });
|
|
40
|
-
MonkeyEcxHttpConfigInterceptorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, imports: [[CommonModule]] });
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, decorators: [{
|
|
42
|
-
type: NgModule,
|
|
43
|
-
args: [{
|
|
44
|
-
imports: [CommonModule],
|
|
45
|
-
}]
|
|
46
|
-
}] });
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { MonkeyEcxHttpConfigErrorInterceptor } from './monkeyecx-http-config-error.interceptor';
|
|
5
|
+
import { MonkeyEcxHttpConfigHeaderInterceptor } from './monkeyecx-http-config-header.interceptor';
|
|
6
|
+
import { MonkeyEcxHttpConfigQueueInterceptor } from './monkeyecx-http-config-queue.interceptor';
|
|
7
|
+
import { MonkeyEcxHttpConfigLoadingInProgressInterceptor } from './monkeyecx-http-config-loading-in-progress.interceptor';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export class MonkeyEcxHttpConfigInterceptorModule {
|
|
10
|
+
static forRoot() {
|
|
11
|
+
return {
|
|
12
|
+
ngModule: MonkeyEcxHttpConfigInterceptorModule,
|
|
13
|
+
providers: [
|
|
14
|
+
{
|
|
15
|
+
provide: HTTP_INTERCEPTORS,
|
|
16
|
+
useClass: MonkeyEcxHttpConfigHeaderInterceptor,
|
|
17
|
+
multi: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
provide: HTTP_INTERCEPTORS,
|
|
21
|
+
useClass: MonkeyEcxHttpConfigErrorInterceptor,
|
|
22
|
+
multi: true,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
provide: HTTP_INTERCEPTORS,
|
|
26
|
+
useClass: MonkeyEcxHttpConfigQueueInterceptor,
|
|
27
|
+
multi: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
provide: HTTP_INTERCEPTORS,
|
|
31
|
+
useClass: MonkeyEcxHttpConfigLoadingInProgressInterceptor,
|
|
32
|
+
multi: true,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
MonkeyEcxHttpConfigInterceptorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
39
|
+
MonkeyEcxHttpConfigInterceptorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, imports: [CommonModule] });
|
|
40
|
+
MonkeyEcxHttpConfigInterceptorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, imports: [[CommonModule]] });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigInterceptorModule, decorators: [{
|
|
42
|
+
type: NgModule,
|
|
43
|
+
args: [{
|
|
44
|
+
imports: [CommonModule],
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWh0dHAtY29uZmlnLWludGVyY2VwdG9yLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21vbmtleS1mcm9udC1jb3JlL3NyYy9saWIvY29yZS9pbnRlcmNlcHRvcnMvbW9ua2V5ZWN4LWh0dHAtY29uZmlnLWludGVyY2VwdG9yLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXVCLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM5RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN6RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLG1DQUFtQyxFQUFFLE1BQU0sMkNBQTJDLENBQUM7QUFDaEcsT0FBTyxFQUFFLG9DQUFvQyxFQUFFLE1BQU0sNENBQTRDLENBQUM7QUFDbEcsT0FBTyxFQUFFLG1DQUFtQyxFQUFFLE1BQU0sMkNBQTJDLENBQUM7QUFDaEcsT0FBTyxFQ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xuICAgICAgICAgIG11bHRpOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogSFRUUF9JTlRFUkNFUFRPUlMsXG4gICAgICAgICAgdXNlQ2xhc3M6IE1vbmtleUVjeEh0dHBDb25maWdFcnJvckludGVyY2VwdG9yLFxuICAgICAgICAgIG11bHRpOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogSFRUUF9JTlRFUkNFUFRPUlMsXG4gICAgICAgICAgdXNlQ2xhc3M6IE1vbmtleUVjeEh0dHBDb25maWdRdWV1ZUludGVyY2VwdG9yLFxuICAgICAgICAgIG11bHRpOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogSFRUUF9JTlRFUkNFUFRPUlMsXG4gICAgICAgICAgdXNlQ2xhc3M6IE1vbmtleUVjeEh0dHBDb25maWdMb2FkaW5nSW5Qcm9ncmVzc0ludGVyY2VwdG9yLFxuICAgICAgICAgIG11bHRpOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9O1xuICB9XG59XG4iXX0=
|
package/esm2020/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.mjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { finalize } from 'rxjs/operators';
|
|
4
|
-
import { MonkeyEcxHandlingService } from '../services/monkeyecx-handling.service';
|
|
5
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
6
|
-
import { MonkeyEcxProgressBarService } from '../../components';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export class MonkeyEcxHttpConfigLoadingInProgressInterceptor {
|
|
9
|
-
constructor(injector) {
|
|
10
|
-
this.injector = injector;
|
|
11
|
-
// no to do
|
|
12
|
-
}
|
|
13
|
-
intercept(request, next) {
|
|
14
|
-
const { injector, isLoadingInProgressProperty } = this;
|
|
15
|
-
const handlingService = injector.get(MonkeyEcxHandlingService);
|
|
16
|
-
const progressBarService = injector.get(MonkeyEcxProgressBarService);
|
|
17
|
-
const inProgress = handlingService?.getMonkeyEcxServiceCredentials()
|
|
18
|
-
? handlingService?.getMonkeyEcxServiceCredentials()?.requestInProgress || null
|
|
19
|
-
: null;
|
|
20
|
-
if (isLoadingInProgressProperty(inProgress)) {
|
|
21
|
-
progressBarService.show();
|
|
22
|
-
}
|
|
23
|
-
return next.handle(request).pipe(finalize(() => {
|
|
24
|
-
if (isLoadingInProgressProperty(inProgress)) {
|
|
25
|
-
progressBarService.hide();
|
|
26
|
-
}
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
isLoadingInProgressProperty(mlp) {
|
|
30
|
-
if (!mlp)
|
|
31
|
-
return false;
|
|
32
|
-
return MonkeyEcxUtils.persistNullEmptyUndefined(mlp) &&
|
|
33
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mlp.showProgress)
|
|
34
|
-
? mlp.showProgress
|
|
35
|
-
: true;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
MonkeyEcxHttpConfigLoadingInProgressInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
39
|
-
MonkeyEcxHttpConfigLoadingInProgressInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor, decorators: [{
|
|
41
|
-
type: Injectable
|
|
42
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
43
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { finalize } from 'rxjs/operators';
|
|
4
|
+
import { MonkeyEcxHandlingService } from '../services/monkeyecx-handling.service';
|
|
5
|
+
import { MonkeyEcxUtils } from '../utils/utils';
|
|
6
|
+
import { MonkeyEcxProgressBarService } from '../../components';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export class MonkeyEcxHttpConfigLoadingInProgressInterceptor {
|
|
9
|
+
constructor(injector) {
|
|
10
|
+
this.injector = injector;
|
|
11
|
+
// no to do
|
|
12
|
+
}
|
|
13
|
+
intercept(request, next) {
|
|
14
|
+
const { injector, isLoadingInProgressProperty } = this;
|
|
15
|
+
const handlingService = injector.get(MonkeyEcxHandlingService);
|
|
16
|
+
const progressBarService = injector.get(MonkeyEcxProgressBarService);
|
|
17
|
+
const inProgress = handlingService?.getMonkeyEcxServiceCredentials()
|
|
18
|
+
? handlingService?.getMonkeyEcxServiceCredentials()?.requestInProgress || null
|
|
19
|
+
: null;
|
|
20
|
+
if (isLoadingInProgressProperty(inProgress)) {
|
|
21
|
+
progressBarService.show();
|
|
22
|
+
}
|
|
23
|
+
return next.handle(request).pipe(finalize(() => {
|
|
24
|
+
if (isLoadingInProgressProperty(inProgress)) {
|
|
25
|
+
progressBarService.hide();
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
isLoadingInProgressProperty(mlp) {
|
|
30
|
+
if (!mlp)
|
|
31
|
+
return false;
|
|
32
|
+
return MonkeyEcxUtils.persistNullEmptyUndefined(mlp) &&
|
|
33
|
+
MonkeyEcxUtils.persistNullEmptyUndefined(mlp.showProgress)
|
|
34
|
+
? mlp.showProgress
|
|
35
|
+
: true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
MonkeyEcxHttpConfigLoadingInProgressInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
39
|
+
MonkeyEcxHttpConfigLoadingInProgressInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor, decorators: [{
|
|
41
|
+
type: Injectable
|
|
42
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWh0dHAtY29uZmlnLWxvYWRpbmctaW4tcHJvZ3Jlc3MuaW50ZXJjZXB0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9tb25rZXktZnJvbnQtY29yZS9zcmMvbGliL2NvcmUvaW50ZXJjZXB0b3JzL21vbmtleWVjeC1odHRwLWNvbmZpZy1sb2FkaW5nLWluLXByb2dyZXNzLmludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUE0QjtBQUM1QixPQUFPLEVBQUUsVUFBVSxFQUFZLE1BQU0sZUFBZSxDQUFDO0FBR3JELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMxQyxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQztBQUVsRixPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDaEQsT0FBTyxFQUFFLDJCQUEyQix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uIG5leHQuaGFuZGxlKHJlcXVlc3QpLnBpcGUoXG4gICAgICBmaW5hbGl6ZSgoKSA9PiB7XG4gICAgICAgIGlmIChpc0xvYWRpbmdJblByb2dyZXNzUHJvcGVydHkoaW5Qcm9ncmVzcykpIHtcbiAgICAgICAgICBwcm9ncmVzc0JhclNlcnZpY2UuaGlkZSgpO1xuICAgICAgICB9XG4gICAgICB9KVxuICAgICk7XG4gIH1cblxuICBwcml2YXRlIGlzTG9hZGluZ0luUHJvZ3Jlc3NQcm9wZXJ0eShtbHA6IE1vbmtleUVjeFJlcXVlc3RMb2FkaW5nSW5Qcm9ncmVzcyB8IG51bGwpOiBib29sZWFuIHtcbiAgICBpZiAoIW1scCkgcmV0dXJuIGZhbHNlO1xuICAgIHJldHVybiBNb25rZXlFY3hVdGlscy5wZXJzaXN0TnVsbEVtcHR5VW5kZWZpbmVkKG1scCkgJiZcbiAgICAgIE1vbmtleUVjeFV0aWxzLnBlcnNpc3ROdWxsRW1wdHlVbmRlZmluZWQobWxwLnNob3dQcm9ncmVzcylcbiAgICAgID8gbWxwLnNob3dQcm9ncmVzc1xuICAgICAgOiB0cnVlO1xuICB9XG59XG4iXX0=
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { finalize } from 'rxjs/operators';
|
|
4
|
-
import { MonkeyEcxHandlingService } from '../services/monkeyecx-handling.service';
|
|
5
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "../services/request-queue";
|
|
8
|
-
export class MonkeyEcxHttpConfigQueueInterceptor {
|
|
9
|
-
constructor(injector, monkeyecxRequestQueueHandlingService) {
|
|
10
|
-
this.injector = injector;
|
|
11
|
-
this.monkeyecxRequestQueueHandlingService = monkeyecxRequestQueueHandlingService;
|
|
12
|
-
// not to do
|
|
13
|
-
}
|
|
14
|
-
intercept(request, next) {
|
|
15
|
-
const { injector, isQueueProperty } = this;
|
|
16
|
-
const monkeyecxHandlingService = injector.get(MonkeyEcxHandlingService);
|
|
17
|
-
const monkeyecxRequestQueue = monkeyecxHandlingService?.getMonkeyEcxRequestQueue();
|
|
18
|
-
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
19
|
-
this.monkeyecxRequestQueueHandlingService.setQueue(monkeyecxRequestQueue);
|
|
20
|
-
}
|
|
21
|
-
return next.handle(request).pipe(finalize(() => {
|
|
22
|
-
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
23
|
-
this.monkeyecxRequestQueueHandlingService.finishQueueItem(monkeyecxRequestQueue);
|
|
24
|
-
}
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
isQueueProperty(mrq) {
|
|
28
|
-
return (MonkeyEcxUtils.persistNullEmptyUndefined(mrq) &&
|
|
29
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mrq?.item?.name));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
MonkeyEcxHttpConfigQueueInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigQueueInterceptor, deps: [{ token: i0.Injector }, { token: i1.MonkeyEcxRequestQueueHandlingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
|
-
MonkeyEcxHttpConfigQueueInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigQueueInterceptor });
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigQueueInterceptor, decorators: [{
|
|
35
|
-
type: Injectable
|
|
36
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.MonkeyEcxRequestQueueHandlingService }]; } });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { finalize } from 'rxjs/operators';
|
|
4
|
+
import { MonkeyEcxHandlingService } from '../services/monkeyecx-handling.service';
|
|
5
|
+
import { MonkeyEcxUtils } from '../utils/utils';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../services/request-queue";
|
|
8
|
+
export class MonkeyEcxHttpConfigQueueInterceptor {
|
|
9
|
+
constructor(injector, monkeyecxRequestQueueHandlingService) {
|
|
10
|
+
this.injector = injector;
|
|
11
|
+
this.monkeyecxRequestQueueHandlingService = monkeyecxRequestQueueHandlingService;
|
|
12
|
+
// not to do
|
|
13
|
+
}
|
|
14
|
+
intercept(request, next) {
|
|
15
|
+
const { injector, isQueueProperty } = this;
|
|
16
|
+
const monkeyecxHandlingService = injector.get(MonkeyEcxHandlingService);
|
|
17
|
+
const monkeyecxRequestQueue = monkeyecxHandlingService?.getMonkeyEcxRequestQueue();
|
|
18
|
+
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
19
|
+
this.monkeyecxRequestQueueHandlingService.setQueue(monkeyecxRequestQueue);
|
|
20
|
+
}
|
|
21
|
+
return next.handle(request).pipe(finalize(() => {
|
|
22
|
+
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
23
|
+
this.monkeyecxRequestQueueHandlingService.finishQueueItem(monkeyecxRequestQueue);
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
isQueueProperty(mrq) {
|
|
28
|
+
return (MonkeyEcxUtils.persistNullEmptyUndefined(mrq) &&
|
|
29
|
+
MonkeyEcxUtils.persistNullEmptyUndefined(mrq?.item?.name));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
MonkeyEcxHttpConfigQueueInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigQueueInterceptor, deps: [{ token: i0.Injector }, { token: i1.MonkeyEcxRequestQueueHandlingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
|
+
MonkeyEcxHttpConfigQueueInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigQueueInterceptor });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpConfigQueueInterceptor, decorators: [{
|
|
35
|
+
type: Injectable
|
|
36
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.MonkeyEcxRequestQueueHandlingService }]; } });
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWh0dHAtY29uZmlnLXF1ZXVlLmludGVyY2VwdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9ua2V5LWZyb250LWNvcmUvc3JjL2xpYi9jb3JlL2ludGVyY2VwdG9ycy9tb25rZXllY3gtaHR0cC1jb25maWctcXVldWUuaW50ZXJjZXB0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNEJBQTRCO0FBQzVCLE9BQU8sRUFBRSxVQUFVLEVBQVksTUFBTSxlQUFlLENBQUM7QUFHckQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRTFDLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBRWxGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7O0FBR2hELE1BQU0sT0FBTyxtQ0FBbUM7SUFDOUMsWUFDVSxRQUFrQixFQUNsQixvQ0FBMEU7UUFEMUUsYUFBUSxHQUFSLFFBQVEsQ0FBVTtRQUNsQix5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