monkey-front-core 0.0.238 → 0.0.239
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/esm2020/lib/components/alerts/alerts.component.mjs +35 -0
- package/esm2020/lib/components/alerts/alerts.module.mjs +21 -0
- package/esm2020/lib/components/alerts/index.mjs +3 -0
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.component.mjs +29 -0
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.module.mjs +43 -0
- package/esm2020/lib/components/closed-to-maintenance/index.mjs +3 -0
- package/esm2020/lib/components/index.mjs +5 -0
- package/esm2020/lib/components/progress-bar/index.mjs +4 -0
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +23 -0
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +18 -0
- package/esm2020/lib/components/progress-bar/progress-bar.service.mjs +50 -0
- package/esm2020/lib/components/version-changed/index.mjs +3 -0
- package/esm2020/lib/components/version-changed/version-changed.component.mjs +24 -0
- package/esm2020/lib/components/version-changed/version-changed.module.mjs +39 -0
- package/esm2020/lib/core/decorators/index.mjs +5 -0
- package/esm2020/lib/core/decorators/monkeyecx-charts-decorators.mjs +40 -0
- package/esm2020/lib/core/decorators/monkeyecx-decorators.mjs +111 -0
- package/esm2020/lib/core/decorators/monkeyecx-download-decorators.mjs +26 -0
- package/esm2020/lib/core/decorators/monkeyecx-upload-decorators.mjs +26 -0
- package/esm2020/lib/core/directives/index.mjs +13 -0
- package/esm2020/lib/core/directives/monkeyecx-directives-module.mjs +73 -0
- package/esm2020/lib/core/directives/monkeyecx-drag-drop.mjs +57 -0
- package/esm2020/lib/core/directives/monkeyecx-feature-by-program-directive.mjs +50 -0
- package/esm2020/lib/core/directives/monkeyecx-feature-directive.mjs +68 -0
- package/esm2020/lib/core/directives/monkeyecx-format-currency.mjs +44 -0
- package/esm2020/lib/core/directives/monkeyecx-format-upper.mjs +67 -0
- package/esm2020/lib/core/directives/monkeyecx-only-alpha-numeric-directive.mjs +28 -0
- package/esm2020/lib/core/directives/monkeyecx-only-number-directive.mjs +28 -0
- package/esm2020/lib/core/directives/monkeyecx-popover-options.directive.mjs +39 -0
- package/esm2020/lib/core/directives/monkeyecx-popover.directive.mjs +212 -0
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +69 -0
- package/esm2020/lib/core/directives/monkeyecx-tooltip-directive.mjs +123 -0
- package/esm2020/lib/core/index.mjs +10 -0
- package/esm2020/lib/core/interceptors/index.mjs +6 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +39 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +60 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-interceptor.module.mjs +47 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.mjs +43 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.mjs +37 -0
- package/esm2020/lib/core/interfaces/index.mjs +30 -0
- package/esm2020/lib/core/interfaces/monkeyecx-auth-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-company-pendencies.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-company.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-config-boostrap.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-country-security.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-error-response.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-filter.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-handled-error-response.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-header-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-intercom-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-me-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-navigation.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-program.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-releases.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-request-in-progress.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-response-links.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-response-paged.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-saved-state.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-scroll-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-service-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-support-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-translate-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-download/index.mjs +4 -0
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-download.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-downloaded.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-item-download.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-queue/index.mjs +4 -0
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-queue.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-upload/index.mjs +3 -0
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-upload.mjs +2 -0
- package/esm2020/lib/core/interfaces/schedules/index.mjs +2 -0
- package/esm2020/lib/core/interfaces/schedules/monkeyecx-request-schedule.mjs +2 -0
- package/esm2020/lib/core/model/index.mjs +2 -0
- package/esm2020/lib/core/model/monkeyecx-model.mjs +25 -0
- package/esm2020/lib/core/pipes/index.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-display-first-name.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-display-initials.mjs +21 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-address.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-beautify-json.mjs +38 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +27 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-group.mjs +45 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-timelapse.mjs +32 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-unix-timelapse.mjs +36 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-document.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-number.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-phone.mjs +42 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-size.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-tax.mjs +23 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-type-document.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-value.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-zipcode.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-pipes.module.mjs +107 -0
- package/esm2020/lib/core/pipes/monkeyecx-text-truncate.mjs +23 -0
- package/esm2020/lib/core/pipes/monkeyecx-truncate-qtd.mjs +16 -0
- package/esm2020/lib/core/services/auth/index.mjs +5 -0
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-company.service.mjs +28 -0
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-login.service.mjs +27 -0
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard.service.mjs +26 -0
- package/esm2020/lib/core/services/auth/monkeyecx-authentication.service.mjs +69 -0
- package/esm2020/lib/core/services/commons/index.mjs +2 -0
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +405 -0
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +40 -0
- package/esm2020/lib/core/services/config/monkeyecx-config.module.mjs +28 -0
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +111 -0
- package/esm2020/lib/core/services/config/monkeyecx-error-config.service.mjs +85 -0
- package/esm2020/lib/core/services/config/monkeyecx-feature-toggle.service.mjs +67 -0
- package/esm2020/lib/core/services/config/monkeyecx-ga-config.service.mjs +57 -0
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +92 -0
- package/esm2020/lib/core/services/config/monkeyecx-logs-config.service.mjs +34 -0
- package/esm2020/lib/core/services/config/monkeyecx-maintenance-config.service.mjs +37 -0
- package/esm2020/lib/core/services/config/monkeyecx-security-console-config.service.mjs +42 -0
- package/esm2020/lib/core/services/config/monkeyecx-service-worker-config.service.mjs +53 -0
- package/esm2020/lib/core/services/error/index.mjs +5 -0
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.module.mjs +27 -0
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +37 -0
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +135 -0
- package/esm2020/lib/core/services/error/monkeyecx-others-errors-handling.service.mjs +29 -0
- package/esm2020/lib/core/services/index.mjs +23 -0
- package/esm2020/lib/core/services/logged/index.mjs +2 -0
- package/esm2020/lib/core/services/logged/monkeyecx-logged-handling.service.mjs +40 -0
- package/esm2020/lib/core/services/monkeyecx-handling.service.mjs +50 -0
- package/esm2020/lib/core/services/monkeyecx-service.service.mjs +104 -0
- package/esm2020/lib/core/services/pagination/index.mjs +2 -0
- package/esm2020/lib/core/services/pagination/monkeyecx-pagination.service.mjs +29 -0
- package/esm2020/lib/core/services/request-download/index.mjs +3 -0
- package/esm2020/lib/core/services/request-download/monkeyecx-request-download-handling.service.mjs +93 -0
- package/esm2020/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.mjs +61 -0
- package/esm2020/lib/core/services/request-paged/index.mjs +2 -0
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +42 -0
- package/esm2020/lib/core/services/request-queue/index.mjs +3 -0
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.mjs +114 -0
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.mjs +119 -0
- package/esm2020/lib/core/services/routes/index.mjs +2 -0
- package/esm2020/lib/core/services/routes/monkeyecx-dicovery-params.service.mjs +54 -0
- package/esm2020/lib/core/services/schedules/index.mjs +2 -0
- package/esm2020/lib/core/services/schedules/monkeyecx-request-schedule.service.mjs +188 -0
- package/esm2020/lib/core/services/storage/index.mjs +3 -0
- package/esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs +32 -0
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +127 -0
- package/esm2020/lib/core/specification-search/index.mjs +2 -0
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +108 -0
- package/esm2020/lib/core/utils/decorators-utils.mjs +40 -0
- package/esm2020/lib/core/utils/index.mjs +8 -0
- package/esm2020/lib/core/utils/statics.mjs +38 -0
- package/esm2020/lib/core/utils/utils.mjs +221 -0
- package/esm2020/lib/core/utils/validate-utils.mjs +206 -0
- package/esm2020/lib/core/utils/validators.mjs +208 -0
- package/esm2020/lib/monkey-front-core.module.mjs +64 -0
- package/esm2020/monkey-front-core.mjs +5 -0
- package/esm2020/public-api.mjs +7 -0
- package/fesm2015/monkey-front-core.mjs +5123 -0
- package/fesm2015/monkey-front-core.mjs.map +1 -0
- package/fesm2020/monkey-front-core.mjs +5182 -0
- package/fesm2020/monkey-front-core.mjs.map +1 -0
- package/lib/components/alerts/alerts.component.d.ts +16 -0
- package/lib/components/alerts/alerts.module.d.ts +10 -0
- package/{src/lib/components/alerts/index.ts → lib/components/alerts/index.d.ts} +2 -2
- package/lib/components/closed-to-maintenance/closed-to-maintenance.component.d.ts +13 -0
- package/lib/components/closed-to-maintenance/closed-to-maintenance.module.d.ts +11 -0
- package/{src/lib/components/closed-to-maintenance/index.ts → lib/components/closed-to-maintenance/index.d.ts} +2 -2
- package/{src/lib/components/index.ts → lib/components/index.d.ts} +4 -4
- package/{src/lib/components/progress-bar/index.ts → lib/components/progress-bar/index.d.ts} +3 -3
- package/lib/components/progress-bar/progress-bar.component.d.ts +11 -0
- package/lib/components/progress-bar/progress-bar.module.d.ts +8 -0
- package/lib/components/progress-bar/progress-bar.service.d.ts +14 -0
- package/{src/lib/components/version-changed/index.ts → lib/components/version-changed/index.d.ts} +2 -2
- package/lib/components/version-changed/version-changed.component.d.ts +9 -0
- package/lib/components/version-changed/version-changed.module.d.ts +10 -0
- package/{src/lib/core/decorators/index.ts → lib/core/decorators/index.d.ts} +4 -4
- package/lib/core/decorators/monkeyecx-charts-decorators.d.ts +1 -0
- package/lib/core/decorators/monkeyecx-decorators.d.ts +7 -0
- package/lib/core/decorators/monkeyecx-download-decorators.d.ts +2 -0
- package/lib/core/decorators/monkeyecx-upload-decorators.d.ts +2 -0
- package/{src/lib/core/directives/index.ts → lib/core/directives/index.d.ts} +12 -12
- package/lib/core/directives/monkeyecx-directives-module.d.ts +19 -0
- package/lib/core/directives/monkeyecx-drag-drop.d.ts +12 -0
- package/lib/core/directives/monkeyecx-feature-by-program-directive.d.ts +15 -0
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +17 -0
- package/lib/core/directives/monkeyecx-format-currency.d.ts +16 -0
- package/lib/core/directives/monkeyecx-format-upper.d.ts +18 -0
- package/lib/core/directives/monkeyecx-only-alpha-numeric-directive.d.ts +9 -0
- package/lib/core/directives/monkeyecx-only-number-directive.d.ts +9 -0
- package/lib/core/directives/monkeyecx-popover-options.directive.d.ts +19 -0
- package/lib/core/directives/monkeyecx-popover.directive.d.ts +43 -0
- package/lib/core/directives/monkeyecx-security-directive.d.ts +17 -0
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +23 -0
- package/{src/lib/core/index.ts → lib/core/index.d.ts} +9 -9
- package/{src/lib/core/interceptors/index.ts → lib/core/interceptors/index.d.ts} +5 -5
- package/lib/core/interceptors/monkeyecx-http-config-error.interceptor.d.ts +17 -0
- package/lib/core/interceptors/monkeyecx-http-config-header.interceptor.d.ts +16 -0
- package/lib/core/interceptors/monkeyecx-http-config-interceptor.module.d.ts +9 -0
- package/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.d.ts +12 -0
- package/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.d.ts +14 -0
- package/{src/lib/core/interfaces/index.ts → lib/core/interfaces/index.d.ts} +29 -29
- package/lib/core/interfaces/monkeyecx-auth-credentials.d.ts +15 -0
- package/{src/lib/core/interfaces/monkeyecx-company-pendencies.ts → lib/core/interfaces/monkeyecx-company-pendencies.d.ts} +14 -16
- package/lib/core/interfaces/monkeyecx-company.d.ts +10 -0
- package/lib/core/interfaces/monkeyecx-config-boostrap.d.ts +14 -0
- package/lib/core/interfaces/monkeyecx-config.d.ts +125 -0
- package/lib/core/interfaces/monkeyecx-country-security.d.ts +4 -0
- package/lib/core/interfaces/monkeyecx-error-response.d.ts +5 -0
- package/lib/core/interfaces/monkeyecx-filter.d.ts +24 -0
- package/lib/core/interfaces/monkeyecx-handled-error-response.d.ts +10 -0
- package/lib/core/interfaces/monkeyecx-header-credentials.d.ts +4 -0
- package/{src/lib/core/interfaces/monkeyecx-intercom-options.ts → lib/core/interfaces/monkeyecx-intercom-options.d.ts} +4 -4
- package/lib/core/interfaces/monkeyecx-me-credentials.d.ts +22 -0
- package/lib/core/interfaces/monkeyecx-navigation.d.ts +27 -0
- package/lib/core/interfaces/monkeyecx-program.d.ts +10 -0
- package/lib/core/interfaces/monkeyecx-releases.d.ts +9 -0
- package/{src/lib/core/interfaces/monkeyecx-request-in-progress.ts → lib/core/interfaces/monkeyecx-request-in-progress.d.ts} +3 -3
- package/lib/core/interfaces/monkeyecx-request-paged.d.ts +23 -0
- package/lib/core/interfaces/monkeyecx-response-links.d.ts +11 -0
- package/lib/core/interfaces/monkeyecx-response-paged.d.ts +6 -0
- package/lib/core/interfaces/monkeyecx-saved-state.d.ts +5 -0
- package/{src/lib/core/interfaces/monkeyecx-scroll-options.ts → lib/core/interfaces/monkeyecx-scroll-options.d.ts} +5 -6
- package/{src/lib/core/interfaces/monkeyecx-service-credentials.ts → lib/core/interfaces/monkeyecx-service-credentials.d.ts} +12 -13
- package/{src/lib/core/interfaces/monkeyecx-support-options.ts → lib/core/interfaces/monkeyecx-support-options.d.ts} +4 -4
- package/lib/core/interfaces/monkeyecx-token-credentials.d.ts +20 -0
- package/lib/core/interfaces/monkeyecx-translate-options.d.ts +4 -0
- package/{src/lib/core/interfaces/request-download/index.ts → lib/core/interfaces/request-download/index.d.ts} +3 -3
- package/lib/core/interfaces/request-download/monkeyecx-request-download.d.ts +10 -0
- package/lib/core/interfaces/request-download/monkeyecx-request-downloaded.d.ts +7 -0
- package/lib/core/interfaces/request-download/monkeyecx-request-item-download.d.ts +7 -0
- package/{src/lib/core/interfaces/request-queue/index.ts → lib/core/interfaces/request-queue/index.d.ts} +3 -3
- package/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.d.ts +7 -0
- package/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.d.ts +6 -0
- package/{src/lib/core/interfaces/request-queue/monkeyecx-request-queue.ts → lib/core/interfaces/request-queue/monkeyecx-request-queue.d.ts} +8 -9
- package/{src/lib/core/interfaces/request-upload/index.ts → lib/core/interfaces/request-upload/index.d.ts} +2 -2
- package/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.d.ts +5 -0
- package/lib/core/interfaces/request-upload/monkeyecx-request-upload.d.ts +10 -0
- package/{src/lib/core/interfaces/schedules/index.ts → lib/core/interfaces/schedules/index.d.ts} +1 -1
- package/lib/core/interfaces/schedules/monkeyecx-request-schedule.d.ts +13 -0
- package/{src/lib/core/model/index.ts → lib/core/model/index.d.ts} +1 -1
- package/lib/core/model/monkeyecx-model.d.ts +13 -0
- package/{src/lib/core/pipes/index.ts → lib/core/pipes/index.d.ts} +19 -19
- package/lib/core/pipes/monkeyecx-display-first-name.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-display-initials.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-address.d.ts +14 -0
- package/lib/core/pipes/monkeyecx-format-beautify-json.d.ts +8 -0
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +11 -0
- package/lib/core/pipes/monkeyecx-format-date-group.d.ts +11 -0
- package/lib/core/pipes/monkeyecx-format-date-timelapse.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-date-unix-timelapse.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-document.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-number.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-phone.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-size.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-tax.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-value.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-zipcode.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +24 -0
- package/lib/core/pipes/monkeyecx-text-truncate.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-truncate-qtd.d.ts +7 -0
- package/{src/lib/core/services/auth/index.ts → lib/core/services/auth/index.d.ts} +4 -4
- package/lib/core/services/auth/monkeyecx-auth-guard-company.service.d.ts +11 -0
- package/lib/core/services/auth/monkeyecx-auth-guard-login.service.d.ts +11 -0
- package/lib/core/services/auth/monkeyecx-auth-guard.service.d.ts +11 -0
- package/lib/core/services/auth/monkeyecx-authentication.service.d.ts +30 -0
- package/{src/lib/core/services/commons/index.ts → lib/core/services/commons/index.d.ts} +1 -1
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +124 -0
- package/lib/core/services/config/monkeyecx-alerts-config.service.d.ts +11 -0
- package/lib/core/services/config/monkeyecx-config.module.d.ts +9 -0
- package/lib/core/services/config/monkeyecx-config.service.d.ts +36 -0
- package/lib/core/services/config/monkeyecx-error-config.service.d.ts +8 -0
- package/lib/core/services/config/monkeyecx-feature-toggle.service.d.ts +16 -0
- package/lib/core/services/config/monkeyecx-ga-config.service.d.ts +10 -0
- package/lib/core/services/config/monkeyecx-i18n-config.service.d.ts +16 -0
- package/lib/core/services/config/monkeyecx-logs-config.service.d.ts +7 -0
- package/lib/core/services/config/monkeyecx-maintenance-config.service.d.ts +13 -0
- package/lib/core/services/config/monkeyecx-security-console-config.service.d.ts +11 -0
- package/lib/core/services/config/monkeyecx-service-worker-config.service.d.ts +16 -0
- package/{src/lib/core/services/error/index.ts → lib/core/services/error/index.d.ts} +4 -4
- package/lib/core/services/error/monkeyecx-error-handling.module.d.ts +9 -0
- package/lib/core/services/error/monkeyecx-error-handling.service.d.ts +9 -0
- package/lib/core/services/error/monkeyecx-http-error-handling.service.d.ts +26 -0
- package/lib/core/services/error/monkeyecx-others-errors-handling.service.d.ts +9 -0
- package/{src/lib/core/services/index.ts → lib/core/services/index.d.ts} +22 -22
- package/{src/lib/core/services/logged/index.ts → lib/core/services/logged/index.d.ts} +1 -1
- package/lib/core/services/logged/monkeyecx-logged-handling.service.d.ts +14 -0
- package/lib/core/services/monkeyecx-handling.service.d.ts +22 -0
- package/lib/core/services/monkeyecx-service.service.d.ts +18 -0
- package/{src/lib/core/services/pagination/index.ts → lib/core/services/pagination/index.d.ts} +1 -1
- package/lib/core/services/pagination/monkeyecx-pagination.service.d.ts +9 -0
- package/{src/lib/core/services/request-download/index.ts → lib/core/services/request-download/index.d.ts} +2 -2
- package/lib/core/services/request-download/monkeyecx-request-download-handling.service.d.ts +18 -0
- package/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.d.ts +16 -0
- package/{src/lib/core/services/request-paged/index.ts → lib/core/services/request-paged/index.d.ts} +1 -1
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +11 -0
- package/{src/lib/core/services/request-queue/index.ts → lib/core/services/request-queue/index.d.ts} +2 -2
- package/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.d.ts +21 -0
- package/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.d.ts +23 -0
- package/{src/lib/core/services/routes/index.ts → lib/core/services/routes/index.d.ts} +1 -1
- package/lib/core/services/routes/monkeyecx-dicovery-params.service.d.ts +13 -0
- package/{src/lib/core/services/schedules/index.ts → lib/core/services/schedules/index.d.ts} +1 -1
- package/lib/core/services/schedules/monkeyecx-request-schedule.service.d.ts +47 -0
- package/{src/lib/core/services/storage/index.ts → lib/core/services/storage/index.d.ts} +2 -2
- package/lib/core/services/storage/monkeyecx-cookie-storage.service.d.ts +11 -0
- package/lib/core/services/storage/monkeyecx-token-storage.service.d.ts +29 -0
- package/{src/lib/core/specification-search/index.ts → lib/core/specification-search/index.d.ts} +1 -1
- package/lib/core/specification-search/monkeyecx-specification-search.d.ts +20 -0
- package/lib/core/utils/decorators-utils.d.ts +5 -0
- package/{src/lib/core/utils/index.ts → lib/core/utils/index.d.ts} +6 -8
- package/lib/core/utils/statics.d.ts +28 -0
- package/lib/core/utils/utils.d.ts +22 -0
- package/lib/core/utils/validate-utils.d.ts +66 -0
- package/lib/core/utils/validators.d.ts +29 -0
- package/lib/monkey-front-core.module.d.ts +17 -0
- package/monkey-front-core-0.0.239.tgz +0 -0
- package/monkey-front-core.d.ts +5 -0
- package/package.json +24 -4
- package/{src/public-api.ts → public-api.d.ts} +3 -6
- package/karma.conf.js +0 -44
- package/monkey-front-core-0.0.238.tgz +0 -0
- package/ng-package.json +0 -8
- package/src/lib/components/alerts/alerts.component.html +0 -18
- package/src/lib/components/alerts/alerts.component.scss +0 -71
- package/src/lib/components/alerts/alerts.component.ts +0 -36
- package/src/lib/components/alerts/alerts.module.ts +0 -12
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.html +0 -25
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.scss +0 -51
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.ts +0 -25
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.module.ts +0 -26
- package/src/lib/components/progress-bar/progress-bar.component.html +0 -3
- package/src/lib/components/progress-bar/progress-bar.component.scss +0 -6
- package/src/lib/components/progress-bar/progress-bar.component.ts +0 -22
- package/src/lib/components/progress-bar/progress-bar.module.ts +0 -10
- package/src/lib/components/progress-bar/progress-bar.service.ts +0 -61
- package/src/lib/components/version-changed/version-changed.component.html +0 -18
- package/src/lib/components/version-changed/version-changed.component.scss +0 -52
- package/src/lib/components/version-changed/version-changed.component.ts +0 -18
- package/src/lib/components/version-changed/version-changed.module.ts +0 -24
- package/src/lib/core/decorators/monkeyecx-charts-decorators.ts +0 -46
- package/src/lib/core/decorators/monkeyecx-decorators.ts +0 -159
- package/src/lib/core/decorators/monkeyecx-download-decorators.ts +0 -39
- package/src/lib/core/decorators/monkeyecx-upload-decorators.ts +0 -39
- package/src/lib/core/directives/monkeyecx-directives-module.ts +0 -45
- package/src/lib/core/directives/monkeyecx-drag-drop.ts +0 -40
- package/src/lib/core/directives/monkeyecx-feature-by-program-directive.ts +0 -53
- package/src/lib/core/directives/monkeyecx-feature-directive.ts +0 -72
- package/src/lib/core/directives/monkeyecx-format-currency.ts +0 -44
- package/src/lib/core/directives/monkeyecx-format-upper.ts +0 -54
- package/src/lib/core/directives/monkeyecx-only-alpha-numeric-directive.ts +0 -21
- package/src/lib/core/directives/monkeyecx-only-number-directive.ts +0 -21
- package/src/lib/core/directives/monkeyecx-popover-options.directive.ts +0 -52
- package/src/lib/core/directives/monkeyecx-popover.directive.ts +0 -235
- package/src/lib/core/directives/monkeyecx-security-directive.ts +0 -68
- package/src/lib/core/directives/monkeyecx-tooltip-directive.ts +0 -131
- package/src/lib/core/interceptors/monkeyecx-http-config-error.interceptor.ts +0 -58
- package/src/lib/core/interceptors/monkeyecx-http-config-header.interceptor.ts +0 -78
- package/src/lib/core/interceptors/monkeyecx-http-config-interceptor.module.ts +0 -40
- package/src/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.ts +0 -47
- package/src/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.ts +0 -44
- package/src/lib/core/interfaces/monkeyecx-auth-credentials.ts +0 -16
- package/src/lib/core/interfaces/monkeyecx-company.ts +0 -10
- package/src/lib/core/interfaces/monkeyecx-config-boostrap.ts +0 -14
- package/src/lib/core/interfaces/monkeyecx-config.ts +0 -139
- package/src/lib/core/interfaces/monkeyecx-country-security.ts +0 -4
- package/src/lib/core/interfaces/monkeyecx-error-response.ts +0 -5
- package/src/lib/core/interfaces/monkeyecx-filter.ts +0 -26
- package/src/lib/core/interfaces/monkeyecx-handled-error-response.ts +0 -11
- package/src/lib/core/interfaces/monkeyecx-header-credentials.ts +0 -4
- package/src/lib/core/interfaces/monkeyecx-me-credentials.ts +0 -23
- package/src/lib/core/interfaces/monkeyecx-navigation.ts +0 -28
- package/src/lib/core/interfaces/monkeyecx-program.ts +0 -10
- package/src/lib/core/interfaces/monkeyecx-releases.ts +0 -9
- package/src/lib/core/interfaces/monkeyecx-request-paged.ts +0 -27
- package/src/lib/core/interfaces/monkeyecx-response-links.ts +0 -11
- package/src/lib/core/interfaces/monkeyecx-response-paged.ts +0 -6
- package/src/lib/core/interfaces/monkeyecx-saved-state.ts +0 -5
- package/src/lib/core/interfaces/monkeyecx-token-credentials.ts +0 -20
- package/src/lib/core/interfaces/monkeyecx-translate-options.ts +0 -4
- package/src/lib/core/interfaces/request-download/monkeyecx-request-download.ts +0 -11
- package/src/lib/core/interfaces/request-download/monkeyecx-request-downloaded.ts +0 -8
- package/src/lib/core/interfaces/request-download/monkeyecx-request-item-download.ts +0 -7
- package/src/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.ts +0 -7
- package/src/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.ts +0 -6
- package/src/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.ts +0 -5
- package/src/lib/core/interfaces/request-upload/monkeyecx-request-upload.ts +0 -11
- package/src/lib/core/interfaces/schedules/monkeyecx-request-schedule.ts +0 -14
- package/src/lib/core/model/monkeyecx-model.ts +0 -38
- package/src/lib/core/pipes/monkeyecx-display-first-name.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-display-initials.ts +0 -14
- package/src/lib/core/pipes/monkeyecx-display-support-phone.ts +0 -31
- package/src/lib/core/pipes/monkeyecx-format-address.ts +0 -27
- package/src/lib/core/pipes/monkeyecx-format-beautify-json.ts +0 -35
- package/src/lib/core/pipes/monkeyecx-format-currency.ts +0 -20
- package/src/lib/core/pipes/monkeyecx-format-date-group.ts +0 -40
- package/src/lib/core/pipes/monkeyecx-format-date-timelapse.ts +0 -25
- package/src/lib/core/pipes/monkeyecx-format-date-unix-timelapse.ts +0 -31
- package/src/lib/core/pipes/monkeyecx-format-document.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-format-number.ts +0 -14
- package/src/lib/core/pipes/monkeyecx-format-phone.ts +0 -32
- package/src/lib/core/pipes/monkeyecx-format-size.ts +0 -13
- package/src/lib/core/pipes/monkeyecx-format-tax.ts +0 -16
- package/src/lib/core/pipes/monkeyecx-format-type-document.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-format-value.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-format-zipcode.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-pipes.module.ts +0 -65
- package/src/lib/core/pipes/monkeyecx-text-truncate.ts +0 -17
- package/src/lib/core/pipes/monkeyecx-truncate-qtd.ts +0 -10
- package/src/lib/core/services/auth/monkeyecx-auth-guard-company.service.ts +0 -27
- package/src/lib/core/services/auth/monkeyecx-auth-guard-login.service.ts +0 -23
- package/src/lib/core/services/auth/monkeyecx-auth-guard.service.ts +0 -25
- package/src/lib/core/services/auth/monkeyecx-authentication.service.ts +0 -87
- package/src/lib/core/services/commons/monkeyecx-commons.service.ts +0 -557
- package/src/lib/core/services/config/index.ts +0 -9
- package/src/lib/core/services/config/monkeyecx-alerts-config.service.ts +0 -37
- package/src/lib/core/services/config/monkeyecx-config.module.ts +0 -23
- package/src/lib/core/services/config/monkeyecx-config.service.ts +0 -151
- package/src/lib/core/services/config/monkeyecx-error-config.service.ts +0 -92
- package/src/lib/core/services/config/monkeyecx-feature-toggle.service.ts +0 -71
- package/src/lib/core/services/config/monkeyecx-ga-config.service.ts +0 -56
- package/src/lib/core/services/config/monkeyecx-i18n-config.service.ts +0 -95
- package/src/lib/core/services/config/monkeyecx-logs-config.service.ts +0 -34
- package/src/lib/core/services/config/monkeyecx-maintenance-config.service.ts +0 -33
- package/src/lib/core/services/config/monkeyecx-security-console-config.service.ts +0 -40
- package/src/lib/core/services/config/monkeyecx-service-worker-config.service.ts +0 -50
- package/src/lib/core/services/error/monkeyecx-error-handling.module.ts +0 -20
- package/src/lib/core/services/error/monkeyecx-error-handling.service.ts +0 -33
- package/src/lib/core/services/error/monkeyecx-http-error-handling.service.ts +0 -160
- package/src/lib/core/services/error/monkeyecx-others-errors-handling.service.ts +0 -24
- package/src/lib/core/services/logged/monkeyecx-logged-handling.service.ts +0 -42
- package/src/lib/core/services/monkeyecx-handling.service.ts +0 -58
- package/src/lib/core/services/monkeyecx-service.service.ts +0 -116
- package/src/lib/core/services/pagination/monkeyecx-pagination.service.ts +0 -27
- package/src/lib/core/services/request-download/monkeyecx-request-download-handling.service.ts +0 -100
- package/src/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.ts +0 -65
- package/src/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.ts +0 -58
- package/src/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.ts +0 -125
- package/src/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.ts +0 -136
- package/src/lib/core/services/routes/monkeyecx-dicovery-params.service.ts +0 -54
- package/src/lib/core/services/schedules/monkeyecx-request-schedule.service.ts +0 -224
- package/src/lib/core/services/storage/monkeyecx-cookie-storage.service.ts +0 -28
- package/src/lib/core/services/storage/monkeyecx-token-storage.service.ts +0 -151
- package/src/lib/core/specification-search/monkeyecx-specification-search.ts +0 -111
- package/src/lib/core/utils/decorators-utils.ts +0 -56
- package/src/lib/core/utils/statics.ts +0 -36
- package/src/lib/core/utils/utils.ts +0 -237
- package/src/lib/core/utils/validate-utils.ts +0 -221
- package/src/lib/core/utils/validators.ts +0 -251
- package/src/lib/monkey-front-core.module.ts +0 -37
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConnectedPosition,
|
|
3
|
-
FlexibleConnectedPositionStrategy, FlexibleConnectedPositionStrategyOrigin,
|
|
4
|
-
Overlay,
|
|
5
|
-
OverlayPositionBuilder,
|
|
6
|
-
OverlayRef
|
|
7
|
-
} from '@angular/cdk/overlay';
|
|
8
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
|
9
|
-
import {
|
|
10
|
-
ChangeDetectorRef,
|
|
11
|
-
Directive,
|
|
12
|
-
ElementRef,
|
|
13
|
-
Inject,
|
|
14
|
-
Input,
|
|
15
|
-
NgZone,
|
|
16
|
-
OnDestroy,
|
|
17
|
-
Optional,
|
|
18
|
-
TemplateRef,
|
|
19
|
-
ViewContainerRef
|
|
20
|
-
} from '@angular/core';
|
|
21
|
-
import { Subscription } from 'rxjs';
|
|
22
|
-
import { NavigationStart, Router } from '@angular/router';
|
|
23
|
-
import { filter } from 'rxjs/operators';
|
|
24
|
-
import { POPOVER_OPTIONS } from './monkeyecx-popover-options.directive';
|
|
25
|
-
import type { PopoverDir, MonkeyEcxPopoverOptions } from './monkeyecx-popover-options.directive';
|
|
26
|
-
|
|
27
|
-
@Directive({
|
|
28
|
-
selector: '[monkeyecxPopover]'
|
|
29
|
-
})
|
|
30
|
-
export class MonkeyEcxPopoverDirective implements OnDestroy {
|
|
31
|
-
private _popover!: boolean;
|
|
32
|
-
|
|
33
|
-
get popover() {
|
|
34
|
-
return this._popover;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@Input('monkeyecxPopover')
|
|
38
|
-
set popover(show: boolean) {
|
|
39
|
-
this._popover = show;
|
|
40
|
-
if (show) {
|
|
41
|
-
this.createPopover();
|
|
42
|
-
} else if (this.overlayRef) {
|
|
43
|
-
this.overlayRef.dispose();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@Input('monkeyecxPopoverClosed') closed!: (e?: MouseEvent) => void;
|
|
48
|
-
|
|
49
|
-
private _target!: HTMLElement;
|
|
50
|
-
|
|
51
|
-
get target() {
|
|
52
|
-
return this._target;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Input('monkeyecxPopoverTarget')
|
|
56
|
-
set target(target: HTMLElement) {
|
|
57
|
-
this._target = target;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@Input('monkeyecxPopoverMinwidth') minwidth = false;
|
|
61
|
-
|
|
62
|
-
@Input('monkeyecxPopoverBackdrop') backdrop = true;
|
|
63
|
-
|
|
64
|
-
@Input('monkeyecxPopoverWatch') watch = false;
|
|
65
|
-
|
|
66
|
-
@Input('monkeyecxPopoverDir') dir: PopoverDir = 'ltr';
|
|
67
|
-
|
|
68
|
-
@Input('monkeyecxPopoverContextmenu') contextmenu = false;
|
|
69
|
-
|
|
70
|
-
@Input('monkeyecxPopoverHeight') height!: number | string;
|
|
71
|
-
|
|
72
|
-
private overlayRef!: OverlayRef;
|
|
73
|
-
|
|
74
|
-
private positionStrategy!: FlexibleConnectedPositionStrategy;
|
|
75
|
-
|
|
76
|
-
private templatePortal!: TemplatePortal;
|
|
77
|
-
|
|
78
|
-
private subs = new Subscription();
|
|
79
|
-
|
|
80
|
-
private eventsSubs = new Subscription();
|
|
81
|
-
|
|
82
|
-
private resizeObserver: any;
|
|
83
|
-
|
|
84
|
-
constructor(
|
|
85
|
-
private tpl: TemplateRef<any>,
|
|
86
|
-
private vcr: ViewContainerRef,
|
|
87
|
-
private el: ElementRef,
|
|
88
|
-
private zone: NgZone,
|
|
89
|
-
private _viewContainerRef: ViewContainerRef,
|
|
90
|
-
private _cd: ChangeDetectorRef,
|
|
91
|
-
private overlay: Overlay,
|
|
92
|
-
private overlayPositionBuilder: OverlayPositionBuilder,
|
|
93
|
-
private router: Router,
|
|
94
|
-
@Inject(POPOVER_OPTIONS) @Optional() private options: MonkeyEcxPopoverOptions
|
|
95
|
-
) {
|
|
96
|
-
this.eventsSubs = this.router.events
|
|
97
|
-
.pipe(
|
|
98
|
-
filter((event: any) => {
|
|
99
|
-
return event instanceof NavigationStart;
|
|
100
|
-
})
|
|
101
|
-
)
|
|
102
|
-
.subscribe(() => {
|
|
103
|
-
this.onHandleClose();
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
private onHandleClose(e?: MouseEvent) {
|
|
108
|
-
this.popover = false;
|
|
109
|
-
this.subs.unsubscribe();
|
|
110
|
-
this.resizeObserver?.disconnect();
|
|
111
|
-
this.zone.run(() => {
|
|
112
|
-
if (this.closed) {
|
|
113
|
-
this.closed(e);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
getDirPositions(dir?: PopoverDir): ConnectedPosition[] {
|
|
119
|
-
const revert = {
|
|
120
|
-
start: 'end', end: 'start', bottom: 'top', top: 'bottom', center: 'center'
|
|
121
|
-
};
|
|
122
|
-
const centerY = (pos: any): ConnectedPosition => {
|
|
123
|
-
return {
|
|
124
|
-
originX: 'center', originY: pos, overlayX: 'center', overlayY: revert[pos]
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
const centerX = (pos: any): ConnectedPosition => {
|
|
128
|
-
return {
|
|
129
|
-
originX: revert[pos], originY: 'center', overlayX: pos, overlayY: 'center'
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
const ltr = (axis: any): ConnectedPosition => {
|
|
133
|
-
return {
|
|
134
|
-
originX: 'start', originY: axis, overlayX: 'start', overlayY: revert[axis]
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
const rtl = (axis: any): ConnectedPosition => {
|
|
138
|
-
return {
|
|
139
|
-
originX: 'end', originY: axis, overlayX: 'end', overlayY: revert[axis]
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
const side = (axis: any, axis2: any): ConnectedPosition => {
|
|
143
|
-
return {
|
|
144
|
-
originX: axis, originY: axis2, overlayX: revert[axis], overlayY: axis2
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
const cmp = dir || this.options?.dir || this.dir;
|
|
149
|
-
if (cmp === 'ct') {
|
|
150
|
-
return [centerY('top'), centerY('bottom'), centerX('start'), centerX('end')];
|
|
151
|
-
}
|
|
152
|
-
if (cmp === 'cr') {
|
|
153
|
-
return [centerX('end'), centerX('start'), centerY('top'), centerY('bottom')];
|
|
154
|
-
}
|
|
155
|
-
if (cmp === 'cc') {
|
|
156
|
-
return [centerX('center')];
|
|
157
|
-
}
|
|
158
|
-
if (cmp === 'ltr') {
|
|
159
|
-
return [ltr('bottom'), ltr('top')];
|
|
160
|
-
}
|
|
161
|
-
if (cmp === 'rtl') {
|
|
162
|
-
return [rtl('bottom'), rtl('top')];
|
|
163
|
-
}
|
|
164
|
-
if (cmp === 'tltr') {
|
|
165
|
-
return [ltr('top'), ltr('bottom')];
|
|
166
|
-
}
|
|
167
|
-
if (cmp === 'trtl') {
|
|
168
|
-
return [rtl('top'), rtl('bottom')];
|
|
169
|
-
}
|
|
170
|
-
if (cmp === 'rt') {
|
|
171
|
-
return [side('end', 'top'), side('end', 'bottom'), ltr('top')];
|
|
172
|
-
}
|
|
173
|
-
if (cmp === 'rb') {
|
|
174
|
-
return [side('end', 'bottom'), side('end', 'top'), ltr('bottom'), rtl('bottom')];
|
|
175
|
-
}
|
|
176
|
-
if (cmp === 'lt') {
|
|
177
|
-
return [side('start', 'top'), side('start', 'bottom'), rtl('top')];
|
|
178
|
-
}
|
|
179
|
-
if (cmp === 'lb') {
|
|
180
|
-
return [side('start', 'bottom'), side('start', 'top'), rtl('bottom')];
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return [];
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
createPopover(
|
|
187
|
-
origin?: FlexibleConnectedPositionStrategyOrigin,
|
|
188
|
-
options?: MonkeyEcxPopoverOptions
|
|
189
|
-
) {
|
|
190
|
-
this.templatePortal = new TemplatePortal(this.tpl, this._viewContainerRef);
|
|
191
|
-
this.positionStrategy = this.overlayPositionBuilder
|
|
192
|
-
.flexibleConnectedTo(origin || this.target)
|
|
193
|
-
.withPush(true)
|
|
194
|
-
.withGrowAfterOpen(true)
|
|
195
|
-
.withPositions(this.getDirPositions(options?.dir));
|
|
196
|
-
|
|
197
|
-
this.overlayRef = this.overlay.create({
|
|
198
|
-
positionStrategy: this.positionStrategy,
|
|
199
|
-
disposeOnNavigation: true,
|
|
200
|
-
direction: 'ltr',
|
|
201
|
-
hasBackdrop: this.backdrop,
|
|
202
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition({
|
|
203
|
-
}),
|
|
204
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
205
|
-
width: (this.options?.minwidth || this.minwidth) ? (this.target.offsetWidth - 2) : undefined,
|
|
206
|
-
maxHeight: '95%',
|
|
207
|
-
height: this.height
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
this.subs = this.overlayRef.backdropClick().subscribe((e) => {
|
|
211
|
-
this.onHandleClose(e);
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
const attached = this.overlayRef.attach(this.templatePortal);
|
|
215
|
-
|
|
216
|
-
if (this.watch) {
|
|
217
|
-
try {
|
|
218
|
-
if ('ResizeObserver' in window) {
|
|
219
|
-
this.resizeObserver = new ResizeObserver(([{ contentRect }]) => {
|
|
220
|
-
this.overlayRef.updatePosition();
|
|
221
|
-
})
|
|
222
|
-
.observe(attached.rootNodes[0]);
|
|
223
|
-
}
|
|
224
|
-
} catch (e) {
|
|
225
|
-
// not to do
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
ngOnDestroy() {
|
|
231
|
-
this.popover = false;
|
|
232
|
-
this.subs.unsubscribe();
|
|
233
|
-
this.eventsSubs.unsubscribe();
|
|
234
|
-
}
|
|
235
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Directive, ElementRef, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { MonkeyEcxTokenCredentials } from '../interfaces';
|
|
3
|
-
import { MonkeyEcxTokenStorageService } from '../services/storage';
|
|
4
|
-
|
|
5
|
-
@Directive({
|
|
6
|
-
selector: '[monkeyecxSecurity]',
|
|
7
|
-
})
|
|
8
|
-
export class MonkeyEcxSecurityDirective implements OnInit {
|
|
9
|
-
@Input('securityRoles') roles: string[] = [];
|
|
10
|
-
|
|
11
|
-
@Input('securityByExclusion') byExclusion: boolean = false;
|
|
12
|
-
|
|
13
|
-
private tokenCredentials: MonkeyEcxTokenCredentials | null = null;
|
|
14
|
-
|
|
15
|
-
constructor(
|
|
16
|
-
private elementRef: ElementRef,
|
|
17
|
-
private tokenStorageService: MonkeyEcxTokenStorageService,
|
|
18
|
-
private cdr: ChangeDetectorRef
|
|
19
|
-
) {
|
|
20
|
-
// not to do
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
private getRole(): string {
|
|
24
|
-
const { tokenCredentials } = this;
|
|
25
|
-
|
|
26
|
-
if (!tokenCredentials) return '';
|
|
27
|
-
|
|
28
|
-
if (tokenCredentials?.programAdmin === 'true') {
|
|
29
|
-
return 'PROGRAM_ADMIN';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return tokenCredentials?.role || '';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private handleAccess() {
|
|
36
|
-
const { roles, byExclusion } = this;
|
|
37
|
-
let display = 'none';
|
|
38
|
-
const found = roles?.indexOf(this.getRole());
|
|
39
|
-
if (byExclusion) {
|
|
40
|
-
display = 'block';
|
|
41
|
-
if (found > -1) {
|
|
42
|
-
display = 'none';
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
display = 'none';
|
|
46
|
-
if (found > -1) {
|
|
47
|
-
display = 'block';
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!roles || roles.length === 0 || this.getRole() === 'PROGRAM_ADMIN') display = 'block';
|
|
52
|
-
this.elementRef.nativeElement.style.display = display;
|
|
53
|
-
this.cdr.detectChanges();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
ngOnInit() {
|
|
57
|
-
this.elementRef.nativeElement.style.display = 'none';
|
|
58
|
-
this.cdr.detectChanges();
|
|
59
|
-
|
|
60
|
-
this.tokenStorageService.tokenHasChanged().subscribe(() => {
|
|
61
|
-
this.tokenCredentials = this.tokenStorageService.getToken();
|
|
62
|
-
this.handleAccess();
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
this.tokenCredentials = this.tokenStorageService.getToken();
|
|
66
|
-
this.handleAccess();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { Directive, Input, ElementRef, HostListener, Renderer2 } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[monkeyecxTooltip]',
|
|
5
|
-
})
|
|
6
|
-
export class MonkeyEcxTooltipDirective {
|
|
7
|
-
@Input() tooltipDelay?: number;
|
|
8
|
-
|
|
9
|
-
@Input() tooltipPosition?: string;
|
|
10
|
-
|
|
11
|
-
@Input() tooltipText?: string;
|
|
12
|
-
|
|
13
|
-
@Input() tooltipTitle?: string;
|
|
14
|
-
|
|
15
|
-
@Input() enableToShow = true;
|
|
16
|
-
|
|
17
|
-
offset = 10;
|
|
18
|
-
|
|
19
|
-
tooltip: HTMLElement | null = null;
|
|
20
|
-
|
|
21
|
-
constructor(private el: ElementRef, private renderer: Renderer2) {
|
|
22
|
-
// not to do
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@HostListener('mouseenter')
|
|
26
|
-
onMouseEnter() {
|
|
27
|
-
if (!this.tooltip) {
|
|
28
|
-
this.show();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@HostListener('mouseleave')
|
|
33
|
-
onMouseLeave() {
|
|
34
|
-
if (this.tooltip) {
|
|
35
|
-
this.hide();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@HostListener('click')
|
|
40
|
-
clickout() {
|
|
41
|
-
if (this.tooltip) {
|
|
42
|
-
this.hide();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
show() {
|
|
47
|
-
if (this.enableToShow) {
|
|
48
|
-
this.create();
|
|
49
|
-
this.setPosition();
|
|
50
|
-
this.renderer.addClass(this.tooltip, 'monkeyecx-tooltip-show');
|
|
51
|
-
setTimeout(() => {
|
|
52
|
-
this.hide();
|
|
53
|
-
}, 5000);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
hide() {
|
|
58
|
-
if (!this.tooltip) return;
|
|
59
|
-
this.renderer.removeClass(this.tooltip, 'monkeyecx-tooltip-show');
|
|
60
|
-
this.renderer.removeChild(document.body, this.tooltip);
|
|
61
|
-
|
|
62
|
-
this.tooltip = null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
create() {
|
|
66
|
-
const tooltipElement = document.createElement('div');
|
|
67
|
-
|
|
68
|
-
this.tooltip = this.renderer.createElement('span');
|
|
69
|
-
|
|
70
|
-
if (this.tooltipTitle) {
|
|
71
|
-
const tooltipTitleElement = document.createElement('span');
|
|
72
|
-
|
|
73
|
-
tooltipTitleElement.innerText = `${this.tooltipTitle}`;
|
|
74
|
-
tooltipTitleElement.className = 'monkeyecx-tooltip-title';
|
|
75
|
-
|
|
76
|
-
tooltipElement.appendChild(tooltipTitleElement);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (this.tooltipText) {
|
|
80
|
-
const tooltipTextElement = document.createElement('span');
|
|
81
|
-
|
|
82
|
-
tooltipTextElement.innerText = `${this.tooltipText}`;
|
|
83
|
-
tooltipTextElement.className = 'monkeyecx-tooltip-description';
|
|
84
|
-
tooltipElement.appendChild(tooltipTextElement);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
this.renderer.appendChild(this.tooltip, tooltipElement);
|
|
88
|
-
this.renderer.appendChild(document.body, this.tooltip);
|
|
89
|
-
|
|
90
|
-
this.renderer.addClass(this.tooltip, 'monkeyecx-tooltip');
|
|
91
|
-
this.renderer.addClass(this.tooltip, `monkeyecx-tooltip-${this.tooltipPosition}`);
|
|
92
|
-
|
|
93
|
-
this.renderer.setStyle(this.tooltip, '-webkit-transition', `opacity ${this.tooltipDelay}ms`);
|
|
94
|
-
this.renderer.setStyle(this.tooltip, '-moz-transition', `opacity ${this.tooltipDelay}ms`);
|
|
95
|
-
this.renderer.setStyle(this.tooltip, '-o-transition', `opacity ${this.tooltipDelay}ms`);
|
|
96
|
-
this.renderer.setStyle(this.tooltip, 'transition', `opacity ${this.tooltipDelay}ms`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
setPosition() {
|
|
100
|
-
const hostPos = this.el.nativeElement.getBoundingClientRect();
|
|
101
|
-
const tooltipPos = this.tooltip?.getBoundingClientRect();
|
|
102
|
-
if (!tooltipPos) return;
|
|
103
|
-
const scrollPos =
|
|
104
|
-
window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
105
|
-
let top: number = 0;
|
|
106
|
-
let left: number = 0;
|
|
107
|
-
|
|
108
|
-
if (this.tooltipPosition === 'top') {
|
|
109
|
-
top = hostPos.top - tooltipPos.height - this.offset;
|
|
110
|
-
left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (this.tooltipPosition === 'bottom') {
|
|
114
|
-
top = hostPos.bottom + this.offset;
|
|
115
|
-
left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (this.tooltipPosition === 'left') {
|
|
119
|
-
top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
|
|
120
|
-
left = hostPos.left - tooltipPos.width - this.offset;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (this.tooltipPosition === 'right') {
|
|
124
|
-
top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
|
|
125
|
-
left = hostPos.right + this.offset;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
this.renderer.setStyle(this.tooltip, 'top', `${top + scrollPos}px`);
|
|
129
|
-
this.renderer.setStyle(this.tooltip, 'left', `${left}px`);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
HttpErrorResponse,
|
|
4
|
-
HttpEvent,
|
|
5
|
-
HttpHandler,
|
|
6
|
-
HttpInterceptor,
|
|
7
|
-
HttpRequest
|
|
8
|
-
} from '@angular/common/http';
|
|
9
|
-
import { Observable, throwError } from 'rxjs';
|
|
10
|
-
import { catchError, map, mergeMap, take } from 'rxjs/operators';
|
|
11
|
-
import { MonkeyEcxAuthenticationService } from '../services/auth';
|
|
12
|
-
import { MonkeyEcxErrorHandlingService } from '../services/error';
|
|
13
|
-
|
|
14
|
-
export interface Headers {
|
|
15
|
-
name: string;
|
|
16
|
-
value: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Injectable()
|
|
20
|
-
export class MonkeyEcxHttpConfigErrorInterceptor implements HttpInterceptor {
|
|
21
|
-
constructor(
|
|
22
|
-
private monkeyecxAuthenticationService: MonkeyEcxAuthenticationService,
|
|
23
|
-
private monkeyecxErrorHandlingService: MonkeyEcxErrorHandlingService
|
|
24
|
-
) {
|
|
25
|
-
// no to do
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
29
|
-
return next.handle(request).pipe(
|
|
30
|
-
map((event: HttpEvent<any>) => {
|
|
31
|
-
return event;
|
|
32
|
-
}),
|
|
33
|
-
catchError((error: HttpErrorResponse) => {
|
|
34
|
-
if (this.monkeyecxAuthenticationService.refreshShouldHappen(error)) {
|
|
35
|
-
return this.monkeyecxAuthenticationService?.refreshToken()?.pipe(
|
|
36
|
-
take(1),
|
|
37
|
-
map(() => {
|
|
38
|
-
return this.monkeyecxAuthenticationService.getRequestWithHeaders(request);
|
|
39
|
-
}),
|
|
40
|
-
mergeMap((resp: any) => {
|
|
41
|
-
return next.handle(resp).pipe(
|
|
42
|
-
catchError((error: any) => {
|
|
43
|
-
this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
44
|
-
return throwError(null);
|
|
45
|
-
})
|
|
46
|
-
);
|
|
47
|
-
}),
|
|
48
|
-
catchError((error: any) => {
|
|
49
|
-
this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
50
|
-
return throwError(null);
|
|
51
|
-
})
|
|
52
|
-
) || throwError(error);
|
|
53
|
-
}
|
|
54
|
-
return throwError(error);
|
|
55
|
-
})
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
HttpErrorResponse,
|
|
4
|
-
HttpEvent,
|
|
5
|
-
HttpHandler,
|
|
6
|
-
HttpInterceptor,
|
|
7
|
-
HttpRequest
|
|
8
|
-
} from '@angular/common/http';
|
|
9
|
-
import { from, Observable, throwError } from 'rxjs';
|
|
10
|
-
import { catchError, first, map, mergeMap, take } from 'rxjs/operators';
|
|
11
|
-
import { MonkeyEcxErrorHandlingService } from '../services/error';
|
|
12
|
-
import { MonkeyEcxAuthenticationService } from '../services/auth';
|
|
13
|
-
import { MonkeyEcxConfigService } from '../services';
|
|
14
|
-
|
|
15
|
-
@Injectable()
|
|
16
|
-
export class MonkeyEcxHttpConfigHeaderInterceptor implements HttpInterceptor {
|
|
17
|
-
constructor(
|
|
18
|
-
private authService: MonkeyEcxAuthenticationService,
|
|
19
|
-
private errorHandlingService: MonkeyEcxErrorHandlingService,
|
|
20
|
-
private config: MonkeyEcxConfigService
|
|
21
|
-
) {
|
|
22
|
-
// not to do
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
private async handle(request: HttpRequest<any>) {
|
|
26
|
-
const { url } = request;
|
|
27
|
-
|
|
28
|
-
if (this.authService.isTokenMandatory(url)) {
|
|
29
|
-
try {
|
|
30
|
-
await this.config
|
|
31
|
-
.config()
|
|
32
|
-
.pipe(
|
|
33
|
-
first((val: any) => {
|
|
34
|
-
return !!val && JSON.stringify(val) !== '{}';
|
|
35
|
-
})
|
|
36
|
-
)
|
|
37
|
-
.toPromise();
|
|
38
|
-
} catch (e) {
|
|
39
|
-
// not to do
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const resp = await this.authService
|
|
44
|
-
.getRequestWithHeadersOb(request)
|
|
45
|
-
.pipe(
|
|
46
|
-
take(1),
|
|
47
|
-
map((event: any) => {
|
|
48
|
-
return event;
|
|
49
|
-
}),
|
|
50
|
-
catchError((error: HttpErrorResponse) => {
|
|
51
|
-
this.errorHandlingService.handleError(error);
|
|
52
|
-
return throwError(error);
|
|
53
|
-
})
|
|
54
|
-
)
|
|
55
|
-
.toPromise();
|
|
56
|
-
|
|
57
|
-
return resp;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
61
|
-
return from(this.handle(request)).pipe(
|
|
62
|
-
take(1),
|
|
63
|
-
map((event: any) => {
|
|
64
|
-
return event;
|
|
65
|
-
}),
|
|
66
|
-
mergeMap((resp: any) => {
|
|
67
|
-
request = request.clone({
|
|
68
|
-
setHeaders: resp
|
|
69
|
-
});
|
|
70
|
-
return next.handle(request);
|
|
71
|
-
}),
|
|
72
|
-
catchError((error: HttpErrorResponse) => {
|
|
73
|
-
this.errorHandlingService.handleError(error);
|
|
74
|
-
return throwError(error);
|
|
75
|
-
})
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, 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
|
-
|
|
9
|
-
@NgModule({
|
|
10
|
-
imports: [CommonModule],
|
|
11
|
-
})
|
|
12
|
-
export class MonkeyEcxHttpConfigInterceptorModule {
|
|
13
|
-
public static forRoot(): ModuleWithProviders<MonkeyEcxHttpConfigInterceptorModule> {
|
|
14
|
-
return {
|
|
15
|
-
ngModule: MonkeyEcxHttpConfigInterceptorModule,
|
|
16
|
-
providers: [
|
|
17
|
-
{
|
|
18
|
-
provide: HTTP_INTERCEPTORS,
|
|
19
|
-
useClass: MonkeyEcxHttpConfigHeaderInterceptor,
|
|
20
|
-
multi: true,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
provide: HTTP_INTERCEPTORS,
|
|
24
|
-
useClass: MonkeyEcxHttpConfigErrorInterceptor,
|
|
25
|
-
multi: true,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
provide: HTTP_INTERCEPTORS,
|
|
29
|
-
useClass: MonkeyEcxHttpConfigQueueInterceptor,
|
|
30
|
-
multi: true,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
provide: HTTP_INTERCEPTORS,
|
|
34
|
-
useClass: MonkeyEcxHttpConfigLoadingInProgressInterceptor,
|
|
35
|
-
multi: true,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { Injectable, Injector } from '@angular/core';
|
|
3
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { finalize } from 'rxjs/operators';
|
|
6
|
-
import { MonkeyEcxHandlingService } from '../services/monkeyecx-handling.service';
|
|
7
|
-
import { MonkeyEcxRequestLoadingInProgress } from '../interfaces';
|
|
8
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
9
|
-
import { MonkeyEcxProgressBarService } from '../../components';
|
|
10
|
-
|
|
11
|
-
@Injectable()
|
|
12
|
-
export class MonkeyEcxHttpConfigLoadingInProgressInterceptor implements HttpInterceptor {
|
|
13
|
-
constructor(private injector: Injector) {
|
|
14
|
-
// no to do
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
18
|
-
const { injector, isLoadingInProgressProperty } = this;
|
|
19
|
-
const handlingService: MonkeyEcxHandlingService = injector.get(MonkeyEcxHandlingService);
|
|
20
|
-
const progressBarService: MonkeyEcxProgressBarService = injector.get(
|
|
21
|
-
MonkeyEcxProgressBarService
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
const inProgress: MonkeyEcxRequestLoadingInProgress | null = handlingService?.getMonkeyEcxServiceCredentials()
|
|
25
|
-
? handlingService?.getMonkeyEcxServiceCredentials()?.requestInProgress || null
|
|
26
|
-
: null;
|
|
27
|
-
if (isLoadingInProgressProperty(inProgress)) {
|
|
28
|
-
progressBarService.show();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return next.handle(request).pipe(
|
|
32
|
-
finalize(() => {
|
|
33
|
-
if (isLoadingInProgressProperty(inProgress)) {
|
|
34
|
-
progressBarService.hide();
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
private isLoadingInProgressProperty(mlp: MonkeyEcxRequestLoadingInProgress | null): boolean {
|
|
41
|
-
if (!mlp) return false;
|
|
42
|
-
return MonkeyEcxUtils.persistNullEmptyUndefined(mlp) &&
|
|
43
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mlp.showProgress)
|
|
44
|
-
? mlp.showProgress
|
|
45
|
-
: true;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { Injectable, Injector } from '@angular/core';
|
|
3
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { finalize } from 'rxjs/operators';
|
|
6
|
-
import { MonkeyEcxRequestQueueHandlingService } from '../services/request-queue';
|
|
7
|
-
import { MonkeyEcxHandlingService } from '../services/monkeyecx-handling.service';
|
|
8
|
-
import { MonkeyEcxRequestQueue } from '../interfaces';
|
|
9
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
10
|
-
|
|
11
|
-
@Injectable()
|
|
12
|
-
export class MonkeyEcxHttpConfigQueueInterceptor implements HttpInterceptor {
|
|
13
|
-
constructor(
|
|
14
|
-
private injector: Injector,
|
|
15
|
-
private monkeyecxRequestQueueHandlingService: MonkeyEcxRequestQueueHandlingService
|
|
16
|
-
) {
|
|
17
|
-
// not to do
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
21
|
-
const { injector, isQueueProperty } = this;
|
|
22
|
-
const monkeyecxHandlingService = injector.get(MonkeyEcxHandlingService);
|
|
23
|
-
|
|
24
|
-
const monkeyecxRequestQueue: MonkeyEcxRequestQueue | null = monkeyecxHandlingService?.getMonkeyEcxRequestQueue();
|
|
25
|
-
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
26
|
-
this.monkeyecxRequestQueueHandlingService.setQueue(monkeyecxRequestQueue);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return next.handle(request).pipe(
|
|
30
|
-
finalize(() => {
|
|
31
|
-
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
32
|
-
this.monkeyecxRequestQueueHandlingService.finishQueueItem(monkeyecxRequestQueue);
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
private isQueueProperty(mrq?: MonkeyEcxRequestQueue | null): boolean {
|
|
39
|
-
return (
|
|
40
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mrq) &&
|
|
41
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mrq?.item?.name)
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
}
|