monkey-front-core 0.0.34 → 0.0.38
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/closed-to-maintenance/closed-to-maintenance.component.mjs +29 -0
- package/{esm2015/lib/components/closed-to-maintenance/closed-to-maintenance.module.js → esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.module.mjs} +5 -5
- package/{esm2015/lib/components/closed-to-maintenance/index.js → esm2020/lib/components/closed-to-maintenance/index.mjs} +1 -1
- package/{esm2015/lib/components/index.js → esm2020/lib/components/index.mjs} +0 -0
- package/{esm2015/lib/components/progress-bar/index.js → esm2020/lib/components/progress-bar/index.mjs} +1 -1
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +23 -0
- package/{esm2015/lib/components/progress-bar/progress-bar.module.js → esm2020/lib/components/progress-bar/progress-bar.module.mjs} +5 -5
- package/esm2020/lib/components/progress-bar/progress-bar.service.mjs +50 -0
- package/{esm2015/lib/components/version-changed/index.js → esm2020/lib/components/version-changed/index.mjs} +1 -1
- package/esm2020/lib/components/version-changed/version-changed.component.mjs +24 -0
- package/{esm2015/lib/components/version-changed/version-changed.module.js → esm2020/lib/components/version-changed/version-changed.module.mjs} +5 -5
- 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/{esm2015/lib/core/directives/index.js → esm2020/lib/core/directives/index.mjs} +2 -1
- package/esm2020/lib/core/directives/monkeyecx-directives-module.mjs +55 -0
- package/esm2020/lib/core/directives/monkeyecx-drag-drop.mjs +57 -0
- package/esm2020/lib/core/directives/monkeyecx-feature-directive.mjs +68 -0
- package/{esm2015/lib/core/directives/monkeyecx-format-currency.js → esm2020/lib/core/directives/monkeyecx-format-currency.mjs} +4 -4
- package/esm2020/lib/core/directives/monkeyecx-format-upper.mjs +67 -0
- package/{esm2015/lib/core/directives/monkeyecx-only-alpha-numeric-directive.js → esm2020/lib/core/directives/monkeyecx-only-alpha-numeric-directive.mjs} +4 -4
- package/{esm2015/lib/core/directives/monkeyecx-only-number-directive.js → esm2020/lib/core/directives/monkeyecx-only-number-directive.mjs} +4 -4
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +69 -0
- package/esm2020/lib/core/directives/monkeyecx-tooltip-directive.mjs +123 -0
- package/{esm2015/lib/core/index.js → esm2020/lib/core/index.mjs} +1 -1
- package/{esm2015/lib/core/interceptors/index.js → esm2020/lib/core/interceptors/index.mjs} +1 -1
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +39 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +32 -0
- package/{esm2015/lib/core/interceptors/monkeyecx-http-config-interceptor.module.js → esm2020/lib/core/interceptors/monkeyecx-http-config-interceptor.module.mjs} +5 -5
- 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/{esm2015/lib/core/interfaces/index.js → esm2020/lib/core/interfaces/index.mjs} +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-auth-credentials.mjs +2 -0
- package/{esm2015/lib/core/interfaces/monkeyecx-company.js → esm2020/lib/core/interfaces/monkeyecx-company.mjs} +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-config-boostrap.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +2 -0
- package/{esm2015/lib/core/interfaces/monkeyecx-error-response.js → esm2020/lib/core/interfaces/monkeyecx-error-response.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/monkeyecx-handled-error-response.js → esm2020/lib/core/interfaces/monkeyecx-handled-error-response.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/monkeyecx-header-credentials.js → esm2020/lib/core/interfaces/monkeyecx-header-credentials.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/monkeyecx-intercom-options.js → esm2020/lib/core/interfaces/monkeyecx-intercom-options.mjs} +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-me-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-navigation.mjs +2 -0
- package/{esm2015/lib/core/interfaces/monkeyecx-program.js → esm2020/lib/core/interfaces/monkeyecx-program.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/monkeyecx-releases.js → esm2020/lib/core/interfaces/monkeyecx-releases.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/monkeyecx-request-in-progress.js → esm2020/lib/core/interfaces/monkeyecx-request-in-progress.mjs} +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +2 -0
- package/{esm2015/lib/core/interfaces/monkeyecx-response-paged.js → esm2020/lib/core/interfaces/monkeyecx-response-paged.mjs} +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-service-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +2 -0
- package/{esm2015/lib/core/interfaces/monkeyecx-translate-options.js → esm2020/lib/core/interfaces/monkeyecx-translate-options.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-download/index.js → esm2020/lib/core/interfaces/request-download/index.mjs} +1 -1
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-download.mjs +2 -0
- package/{esm2015/lib/core/interfaces/request-download/monkeyecx-request-downloaded.js → esm2020/lib/core/interfaces/request-download/monkeyecx-request-downloaded.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-download/monkeyecx-request-item-download.js → esm2020/lib/core/interfaces/request-download/monkeyecx-request-item-download.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-queue/index.js → esm2020/lib/core/interfaces/request-queue/index.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.js → esm2020/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.js → esm2020/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.mjs} +1 -1
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-queue.mjs +2 -0
- package/{esm2015/lib/core/interfaces/request-upload/index.js → esm2020/lib/core/interfaces/request-upload/index.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.js → esm2020/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/request-upload/monkeyecx-request-upload.js → esm2020/lib/core/interfaces/request-upload/monkeyecx-request-upload.mjs} +1 -1
- package/{esm2015/lib/core/interfaces/schedules/index.js → esm2020/lib/core/interfaces/schedules/index.mjs} +1 -1
- package/esm2020/lib/core/interfaces/schedules/monkeyecx-request-schedule.mjs +2 -0
- package/{esm2015/lib/core/model/index.js → esm2020/lib/core/model/index.mjs} +1 -1
- package/{esm2015/lib/core/model/monkeyecx-model.js → esm2020/lib/core/model/monkeyecx-model.mjs} +1 -1
- package/esm2020/lib/core/pipes/index.mjs +16 -0
- package/esm2020/lib/core/pipes/monkeyecx-display-first-name.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-address.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +27 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-timelapse.mjs +31 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date.mjs +29 -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-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 +87 -0
- package/esm2020/lib/core/pipes/monkeyecx-text-truncate.mjs +23 -0
- package/{esm2015/lib/core/pipes/monkeyecx-truncate-qtd.js → esm2020/lib/core/pipes/monkeyecx-truncate-qtd.mjs} +4 -4
- package/{esm2015/lib/core/services/auth/index.js → esm2020/lib/core/services/auth/index.mjs} +1 -1
- package/{esm2015/lib/core/services/auth/monkeyecx-auth-guard-login.service.js → esm2020/lib/core/services/auth/monkeyecx-auth-guard-login.service.mjs} +4 -4
- package/{esm2015/lib/core/services/auth/monkeyecx-auth-guard.service.js → esm2020/lib/core/services/auth/monkeyecx-auth-guard.service.mjs} +4 -4
- package/esm2020/lib/core/services/auth/monkeyecx-authentication.service.mjs +61 -0
- package/{esm2015/lib/core/services/commons/index.js → esm2020/lib/core/services/commons/index.mjs} +1 -1
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +269 -0
- package/{esm2015/lib/core/services/config/monkeyecx-config.module.js → esm2020/lib/core/services/config/monkeyecx-config.module.mjs} +5 -5
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +104 -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 +65 -0
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +66 -0
- package/esm2020/lib/core/services/config/monkeyecx-logs-config.service.mjs +34 -0
- package/{esm2015/lib/core/services/config/monkeyecx-maintenance-config.service.js → esm2020/lib/core/services/config/monkeyecx-maintenance-config.service.mjs} +5 -5
- 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/{esm2015/lib/core/services/error/index.js → esm2020/lib/core/services/error/index.mjs} +1 -1
- package/{esm2015/lib/core/services/error/monkeyecx-error-handling.module.js → esm2020/lib/core/services/error/monkeyecx-error-handling.module.mjs} +5 -5
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +39 -0
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +127 -0
- package/{esm2015/lib/core/services/error/monkeyecx-others-errors-handling.service.js → esm2020/lib/core/services/error/monkeyecx-others-errors-handling.service.mjs} +4 -4
- package/esm2020/lib/core/services/index.mjs +24 -0
- package/{esm2015/lib/core/services/logged/index.js → esm2020/lib/core/services/logged/index.mjs} +1 -1
- package/{esm2015/lib/core/services/logged/monkeyecx-logged-handling.service.js → esm2020/lib/core/services/logged/monkeyecx-logged-handling.service.mjs} +4 -4
- package/esm2020/lib/core/services/monkeyecx-handling.service.mjs +50 -0
- package/esm2020/lib/core/services/monkeyecx-service.service.mjs +104 -0
- package/{esm2015/lib/core/services/request-download/index.js → esm2020/lib/core/services/request-download/index.mjs} +1 -1
- 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/{esm2015/lib/core/services/request-paged/index.js → esm2020/lib/core/services/request-paged/index.mjs} +1 -1
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +30 -0
- package/{esm2015/lib/core/services/request-queue/index.js → esm2020/lib/core/services/request-queue/index.mjs} +1 -1
- 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/{esm2015/lib/core/services/routes/index.js → esm2020/lib/core/services/routes/index.mjs} +1 -1
- package/{esm2015/lib/core/services/routes/monkeyecx-dicovery-params.service.js → esm2020/lib/core/services/routes/monkeyecx-dicovery-params.service.mjs} +6 -6
- package/{esm2015/lib/core/services/schedules/index.js → esm2020/lib/core/services/schedules/index.mjs} +1 -1
- package/esm2020/lib/core/services/schedules/monkeyecx-request-schedule.service.mjs +127 -0
- package/{esm2015/lib/core/services/storage/index.js → esm2020/lib/core/services/storage/index.mjs} +1 -1
- package/{esm2015/lib/core/services/storage/monkeyecx-cookie-storage.service.js → esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs} +5 -5
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +125 -0
- package/{esm2015/lib/core/specification-search/index.js → esm2020/lib/core/specification-search/index.mjs} +1 -1
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +97 -0
- package/esm2020/lib/core/utils/decorators-utils.mjs +40 -0
- package/{esm2015/lib/core/utils/index.js → esm2020/lib/core/utils/index.mjs} +1 -1
- package/{esm2015/lib/core/utils/statics.js → esm2020/lib/core/utils/statics.mjs} +1 -1
- package/esm2020/lib/core/utils/utils.mjs +218 -0
- package/esm2020/lib/core/utils/validate-utils.mjs +204 -0
- package/esm2020/lib/core/utils/validators.mjs +193 -0
- package/esm2020/lib/monkey-front-core.module.mjs +62 -0
- package/{esm2015/monkey-front-core.js → esm2020/monkey-front-core.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +1 -1
- package/fesm2015/{monkey-front-core.js → monkey-front-core.mjs} +776 -517
- package/fesm2015/monkey-front-core.mjs.map +1 -0
- package/fesm2020/monkey-front-core.mjs +4213 -0
- package/fesm2020/monkey-front-core.mjs.map +1 -0
- package/lib/components/closed-to-maintenance/closed-to-maintenance.component.d.ts +2 -2
- package/lib/components/progress-bar/progress-bar.service.d.ts +1 -1
- package/lib/components/version-changed/version-changed.component.d.ts +1 -1
- package/lib/core/decorators/index.d.ts +1 -0
- package/lib/core/decorators/monkeyecx-charts-decorators.d.ts +1 -0
- package/lib/core/directives/index.d.ts +1 -0
- package/lib/core/directives/monkeyecx-directives-module.d.ts +7 -6
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +17 -0
- package/lib/core/directives/monkeyecx-format-upper.d.ts +2 -2
- package/lib/core/directives/monkeyecx-security-directive.d.ts +1 -1
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +7 -6
- package/lib/core/interfaces/monkeyecx-service-credentials.d.ts +2 -1
- package/lib/core/interfaces/request-download/monkeyecx-request-download.d.ts +1 -1
- package/lib/core/interfaces/request-download/monkeyecx-request-item-download.d.ts +1 -1
- package/lib/core/interfaces/request-queue/monkeyecx-request-queue.d.ts +1 -1
- package/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.d.ts +1 -1
- package/lib/core/interfaces/request-upload/monkeyecx-request-upload.d.ts +1 -1
- package/lib/core/model/monkeyecx-model.d.ts +1 -1
- package/lib/core/pipes/index.d.ts +3 -0
- package/lib/core/pipes/monkeyecx-display-first-name.d.ts +0 -1
- package/lib/core/pipes/monkeyecx-format-address.d.ts +14 -0
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +1 -3
- package/lib/core/pipes/monkeyecx-format-date-timelapse.d.ts +1 -2
- package/lib/core/pipes/monkeyecx-format-date.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-document.d.ts +0 -1
- package/lib/core/pipes/monkeyecx-format-number.d.ts +3 -4
- package/lib/core/pipes/monkeyecx-format-phone.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-size.d.ts +0 -1
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +3 -4
- package/lib/core/pipes/monkeyecx-format-value.d.ts +0 -1
- package/lib/core/pipes/monkeyecx-format-zipcode.d.ts +0 -1
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +14 -11
- package/lib/core/pipes/monkeyecx-text-truncate.d.ts +0 -1
- package/lib/core/services/auth/monkeyecx-authentication.service.d.ts +6 -6
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +27 -27
- package/lib/core/services/config/monkeyecx-config.service.d.ts +1 -1
- package/lib/core/services/config/monkeyecx-i18n-config.service.d.ts +0 -1
- package/lib/core/services/config/monkeyecx-maintenance-config.service.d.ts +1 -1
- package/lib/core/services/index.d.ts +13 -3
- package/lib/core/services/monkeyecx-handling.service.d.ts +8 -5
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +1 -1
- package/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.d.ts +2 -2
- package/lib/core/services/schedules/monkeyecx-request-schedule.service.d.ts +2 -2
- package/lib/core/utils/validate-utils.d.ts +13 -13
- package/monkey-front-core-0.0.38.tgz +0 -0
- package/package.json +22 -9
- package/bundles/monkey-front-core.umd.js +0 -4560
- package/bundles/monkey-front-core.umd.js.map +0 -1
- package/esm2015/lib/components/closed-to-maintenance/closed-to-maintenance.component.js +0 -32
- package/esm2015/lib/components/progress-bar/progress-bar.component.js +0 -28
- package/esm2015/lib/components/progress-bar/progress-bar.service.js +0 -49
- package/esm2015/lib/components/version-changed/version-changed.component.js +0 -25
- package/esm2015/lib/core/decorators/index.js +0 -4
- package/esm2015/lib/core/decorators/monkeyecx-decorators.js +0 -108
- package/esm2015/lib/core/decorators/monkeyecx-download-decorators.js +0 -24
- package/esm2015/lib/core/decorators/monkeyecx-upload-decorators.js +0 -24
- package/esm2015/lib/core/directives/monkeyecx-directives-module.js +0 -50
- package/esm2015/lib/core/directives/monkeyecx-drag-drop.js +0 -57
- package/esm2015/lib/core/directives/monkeyecx-format-upper.js +0 -67
- package/esm2015/lib/core/directives/monkeyecx-security-directive.js +0 -67
- package/esm2015/lib/core/directives/monkeyecx-tooltip-directive.js +0 -110
- package/esm2015/lib/core/interceptors/monkeyecx-http-config-error.interceptor.js +0 -39
- package/esm2015/lib/core/interceptors/monkeyecx-http-config-header.interceptor.js +0 -32
- package/esm2015/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.js +0 -41
- package/esm2015/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.js +0 -37
- package/esm2015/lib/core/interfaces/monkeyecx-auth-credentials.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-config-boostrap.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-config.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-me-credentials.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-navigation.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-request-paged.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-service-credentials.js +0 -2
- package/esm2015/lib/core/interfaces/monkeyecx-token-credentials.js +0 -2
- package/esm2015/lib/core/interfaces/request-download/monkeyecx-request-download.js +0 -2
- package/esm2015/lib/core/interfaces/request-queue/monkeyecx-request-queue.js +0 -2
- package/esm2015/lib/core/interfaces/schedules/monkeyecx-request-schedule.js +0 -2
- package/esm2015/lib/core/pipes/index.js +0 -13
- package/esm2015/lib/core/pipes/monkeyecx-display-first-name.js +0 -22
- package/esm2015/lib/core/pipes/monkeyecx-format-currency.js +0 -30
- package/esm2015/lib/core/pipes/monkeyecx-format-date-timelapse.js +0 -37
- package/esm2015/lib/core/pipes/monkeyecx-format-document.js +0 -22
- package/esm2015/lib/core/pipes/monkeyecx-format-number.js +0 -23
- package/esm2015/lib/core/pipes/monkeyecx-format-size.js +0 -23
- package/esm2015/lib/core/pipes/monkeyecx-format-type-document.js +0 -22
- package/esm2015/lib/core/pipes/monkeyecx-format-value.js +0 -22
- package/esm2015/lib/core/pipes/monkeyecx-format-zipcode.js +0 -22
- package/esm2015/lib/core/pipes/monkeyecx-pipes.module.js +0 -72
- package/esm2015/lib/core/pipes/monkeyecx-text-truncate.js +0 -26
- package/esm2015/lib/core/services/auth/monkeyecx-authentication.service.js +0 -61
- package/esm2015/lib/core/services/commons/monkeyecx-commons.service.js +0 -242
- package/esm2015/lib/core/services/config/index.js +0 -9
- package/esm2015/lib/core/services/config/monkeyecx-config.service.js +0 -104
- package/esm2015/lib/core/services/config/monkeyecx-error-config.service.js +0 -85
- package/esm2015/lib/core/services/config/monkeyecx-feature-toggle.service.js +0 -65
- package/esm2015/lib/core/services/config/monkeyecx-i18n-config.service.js +0 -72
- package/esm2015/lib/core/services/config/monkeyecx-logs-config.service.js +0 -34
- package/esm2015/lib/core/services/config/monkeyecx-security-console-config.service.js +0 -42
- package/esm2015/lib/core/services/config/monkeyecx-service-worker-config.service.js +0 -54
- package/esm2015/lib/core/services/error/monkeyecx-error-handling.service.js +0 -39
- package/esm2015/lib/core/services/error/monkeyecx-http-error-handling.service.js +0 -131
- package/esm2015/lib/core/services/index.js +0 -14
- package/esm2015/lib/core/services/monkeyecx-handling.service.js +0 -44
- package/esm2015/lib/core/services/monkeyecx-service.service.js +0 -102
- package/esm2015/lib/core/services/request-download/monkeyecx-request-download-handling.service.js +0 -81
- package/esm2015/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.js +0 -55
- package/esm2015/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.js +0 -30
- package/esm2015/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.js +0 -97
- package/esm2015/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.js +0 -106
- package/esm2015/lib/core/services/schedules/monkeyecx-request-schedule.service.js +0 -99
- package/esm2015/lib/core/services/storage/monkeyecx-token-storage.service.js +0 -117
- package/esm2015/lib/core/specification-search/monkeyecx-specification-search.js +0 -97
- package/esm2015/lib/core/utils/decorators-utils.js +0 -37
- package/esm2015/lib/core/utils/utils.js +0 -219
- package/esm2015/lib/core/utils/validate-utils.js +0 -204
- package/esm2015/lib/core/utils/validators.js +0 -193
- package/esm2015/lib/monkey-front-core.module.js +0 -60
- package/fesm2015/monkey-front-core.js.map +0 -1
- package/lib/core/services/config/index.d.ts +0 -8
- package/monkey-front-core-0.0.34.tgz +0 -0
|
@@ -1,4560 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('monkey-style-guide'), require('@ngx-translate/core'), require('moment'), require('@angular/common'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@angular/forms'), require('@angular/common/http'), require('@angular/common/locales/global/pt'), require('ngx-cookie-service'), require('@datadog/browser-rum'), require('@angular/service-worker'), require('launchdarkly-js-client-sdk')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('monkey-front-core', ['exports', '@angular/core', 'monkey-style-guide', '@ngx-translate/core', 'moment', '@angular/common', '@angular/router', 'rxjs', 'rxjs/operators', '@angular/forms', '@angular/common/http', '@angular/common/locales/global/pt', 'ngx-cookie-service', '@datadog/browser-rum', '@angular/service-worker', 'launchdarkly-js-client-sdk'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["monkey-front-core"] = {}, global.ng.core, global["monkey-style-guide"], global["@ngx-translate/core"], global.moment, global.ng.common, global.ng.router, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.common.http, global.ng.common.locales.global.pt, global["ngx-cookie-service"], global["@datadog/browser-rum"], global.ng.serviceWorker, global["launchdarkly-js-client-sdk"]));
|
|
5
|
-
})(this, (function (exports, i0, i1, i1$1, moment_, i1$2, i1$3, rxjs, operators, forms, i1$4, localePTBR, i1$5, browserRum, i1$6, launchdarklyJsClientSdk) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
function _interopNamespace(e) {
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
11
|
-
var n = Object.create(null);
|
|
12
|
-
if (e) {
|
|
13
|
-
Object.keys(e).forEach(function (k) {
|
|
14
|
-
if (k !== 'default') {
|
|
15
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return e[k]; }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n["default"] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
|
-
var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
|
|
31
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
32
|
-
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
33
|
-
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
34
|
-
var localePTBR__default = /*#__PURE__*/_interopDefaultLegacy(localePTBR);
|
|
35
|
-
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
36
|
-
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
37
|
-
|
|
38
|
-
/* eslint-disable comma-dangle */
|
|
39
|
-
/* eslint-disable max-len */
|
|
40
|
-
/* eslint-disable no-useless-escape */
|
|
41
|
-
/* eslint-disable no-plusplus */
|
|
42
|
-
/* eslint-disable no-cond-assign */
|
|
43
|
-
/* eslint-disable eqeqeq */
|
|
44
|
-
/* eslint-disable no-redeclare */
|
|
45
|
-
/* eslint-disable vars-on-top */
|
|
46
|
-
/* eslint-disable no-var */
|
|
47
|
-
/* eslint-disable block-scoped-var */
|
|
48
|
-
var MonkeyEcxUtils = /** @class */ (function () {
|
|
49
|
-
function MonkeyEcxUtils() {
|
|
50
|
-
}
|
|
51
|
-
MonkeyEcxUtils.persistNullEmptyUndefined = function (tp) {
|
|
52
|
-
return tp !== null && tp !== undefined && tp !== '';
|
|
53
|
-
};
|
|
54
|
-
MonkeyEcxUtils.getDocumentType = function (doc, country) {
|
|
55
|
-
if (!doc)
|
|
56
|
-
return '';
|
|
57
|
-
if (country === 'cl')
|
|
58
|
-
return 'RUT';
|
|
59
|
-
return doc.length <= 11 ? 'CPF' : 'CNPJ';
|
|
60
|
-
};
|
|
61
|
-
MonkeyEcxUtils.getDocumentMask = function (type) {
|
|
62
|
-
if (type === 'CPF')
|
|
63
|
-
return '000.000.000-00';
|
|
64
|
-
return '00.000.000/0000-00';
|
|
65
|
-
};
|
|
66
|
-
MonkeyEcxUtils.formatDocumentWithMask = function (doc, withType, country) {
|
|
67
|
-
if (!doc)
|
|
68
|
-
return doc;
|
|
69
|
-
var formated = '';
|
|
70
|
-
if (country === 'cl') {
|
|
71
|
-
formated = doc.replace(/^(\d{1,2})(\d{3})(\d{3})(\w{1})$/, '$1.$2.$3-$4');
|
|
72
|
-
return "" + formated;
|
|
73
|
-
}
|
|
74
|
-
if (doc.length === 14) {
|
|
75
|
-
formated = doc
|
|
76
|
-
.replace(/^(\d{2})(\d)/, '$1.$2')
|
|
77
|
-
.replace(/^(\d{2})\.(\d{3})(\d)/, '$1.$2.$3')
|
|
78
|
-
.replace(/\.(\d{3})(\d)/, '.$1/$2')
|
|
79
|
-
.replace(/(\d{4})(\d)/, '$1-$2');
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
formated = doc
|
|
83
|
-
.replace(/^(\d{3})(\d)/, '$1.$2')
|
|
84
|
-
.replace(/^(\d{3})\.(\d{3})(\d)/, '$1.$2.$3')
|
|
85
|
-
.replace(/\.(\d{3})(\d)/, '.$1-$2');
|
|
86
|
-
}
|
|
87
|
-
return (withType ? this.getDocumentType(doc) + ":" : '') + " " + formated;
|
|
88
|
-
};
|
|
89
|
-
MonkeyEcxUtils.cutFirstLastName = function (value, tp) {
|
|
90
|
-
if (tp === void 0) { tp = 'first'; }
|
|
91
|
-
var _a, _b;
|
|
92
|
-
var split = (_a = value === null || value === void 0 ? void 0 : value.trim()) === null || _a === void 0 ? void 0 : _a.split(' ');
|
|
93
|
-
if (tp === 'first')
|
|
94
|
-
return split[0];
|
|
95
|
-
return (_b = split === null || split === void 0 ? void 0 : split.splice(1, split.length)) === null || _b === void 0 ? void 0 : _b.join(' ');
|
|
96
|
-
};
|
|
97
|
-
MonkeyEcxUtils.isCPFCNPJValid = function (document) {
|
|
98
|
-
document = document.replace(/[^\d]/g, '');
|
|
99
|
-
if (document.length === 11) {
|
|
100
|
-
var base = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0];
|
|
101
|
-
for (var i = 0, n = 0; i < 9; n += document[i] * base[i++])
|
|
102
|
-
;
|
|
103
|
-
if (document[9] != ((n %= 11) <= 1 ? 0 : 11 - n)) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
base = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0];
|
|
107
|
-
for (var i = 0, n = 0; i <= 9; n += document[i] * base[i++])
|
|
108
|
-
;
|
|
109
|
-
if (document[10] != ((n %= 11) <= 1 ? 0 : 11 - n)) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
if (document.length === 14 || /0{14}/.test(document)) {
|
|
115
|
-
var base = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
116
|
-
for (var i = 0, n = 0; i < 12; n += document[i] * base[++i])
|
|
117
|
-
;
|
|
118
|
-
if (document[12] != ((n %= 11) < 2 ? 0 : 11 - n)) {
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
for (var i = 0, n = 0; i <= 12; n += document[i] * base[i++])
|
|
122
|
-
;
|
|
123
|
-
if (document[13] != ((n %= 11) < 2 ? 0 : 11 - n)) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
return false;
|
|
129
|
-
};
|
|
130
|
-
MonkeyEcxUtils.isValidRUT = function (document) {
|
|
131
|
-
if (!document || document.trim().length < 3)
|
|
132
|
-
return false;
|
|
133
|
-
var documentHandled = document.replace(/[^0-9kK]/g, '');
|
|
134
|
-
if (documentHandled.length < 3)
|
|
135
|
-
return false;
|
|
136
|
-
var calcDv = function (rut) {
|
|
137
|
-
var value = "" + rut;
|
|
138
|
-
var sum = 0;
|
|
139
|
-
var mult = 2;
|
|
140
|
-
for (var i = 1; i <= value.length; i++) {
|
|
141
|
-
var index = mult * Number(value.charAt(value.length - i));
|
|
142
|
-
sum += index;
|
|
143
|
-
if (mult < 7) {
|
|
144
|
-
mult += 1;
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
mult = 2;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
var dvEsperado = 11 - (sum % 11);
|
|
151
|
-
if (dvEsperado === 10)
|
|
152
|
-
return 'K';
|
|
153
|
-
if (dvEsperado === 11)
|
|
154
|
-
return '0';
|
|
155
|
-
return "" + dvEsperado;
|
|
156
|
-
};
|
|
157
|
-
var num = documentHandled.slice(0, -1);
|
|
158
|
-
var dgv = documentHandled.slice(-1).toUpperCase();
|
|
159
|
-
var dvCalc = calcDv(num);
|
|
160
|
-
return dvCalc === dgv;
|
|
161
|
-
};
|
|
162
|
-
MonkeyEcxUtils.isValidUrl = function (txt) {
|
|
163
|
-
var regex = new RegExp(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)+[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,10}(:[0-9]{1,5})?(\/.*)?$/gm);
|
|
164
|
-
return regex.test(txt);
|
|
165
|
-
};
|
|
166
|
-
MonkeyEcxUtils.isValidZipCode = function (zipCode) {
|
|
167
|
-
return ("" + this.handleOnlyNumbers(zipCode)).length === 8;
|
|
168
|
-
};
|
|
169
|
-
MonkeyEcxUtils.getRandomString = function (len, charSet) {
|
|
170
|
-
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
171
|
-
var randomString = new Array(len)
|
|
172
|
-
.fill('1')
|
|
173
|
-
.map(function () {
|
|
174
|
-
return charSet.charAt(Math.floor(Math.random() * charSet.length));
|
|
175
|
-
})
|
|
176
|
-
.join('');
|
|
177
|
-
return randomString;
|
|
178
|
-
};
|
|
179
|
-
MonkeyEcxUtils.handleOnlyNumbers = function (value) {
|
|
180
|
-
if (!value)
|
|
181
|
-
return null;
|
|
182
|
-
return value.replace(new RegExp(/[^0-9]/g), '');
|
|
183
|
-
};
|
|
184
|
-
MonkeyEcxUtils.handleOnlyAlphaNumeric = function (value) {
|
|
185
|
-
if (!value)
|
|
186
|
-
return '';
|
|
187
|
-
return value.replace(new RegExp(/[^0-9A-Za-z]/, 'g'), '');
|
|
188
|
-
};
|
|
189
|
-
MonkeyEcxUtils.capitalize = function (value) {
|
|
190
|
-
return "" + value.charAt(0).toUpperCase() + value.slice(1);
|
|
191
|
-
};
|
|
192
|
-
MonkeyEcxUtils.formatZipCode = function (zipCode) {
|
|
193
|
-
if (!zipCode)
|
|
194
|
-
return zipCode;
|
|
195
|
-
var formated = zipCode
|
|
196
|
-
.replace(/^(\d{5})(\d)/, '$1-$2')
|
|
197
|
-
.replace(/\.(\d{3})(\d)/, '.$1-$2');
|
|
198
|
-
return "" + formated;
|
|
199
|
-
};
|
|
200
|
-
MonkeyEcxUtils.formatFileSize = function (size) {
|
|
201
|
-
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
202
|
-
var l = 0;
|
|
203
|
-
while (size >= 1024 && ++l) {
|
|
204
|
-
size /= 1024;
|
|
205
|
-
}
|
|
206
|
-
return size.toFixed(size < 10 && l > 0 ? 1 : 0) + " " + units[l];
|
|
207
|
-
};
|
|
208
|
-
MonkeyEcxUtils.sufflue = function (data) {
|
|
209
|
-
for (var i = data.length - 1; i > 0; i--) {
|
|
210
|
-
var j = Math.floor(Math.random() * i);
|
|
211
|
-
var temp = data[i];
|
|
212
|
-
data[i] = data[j];
|
|
213
|
-
data[j] = temp;
|
|
214
|
-
}
|
|
215
|
-
return data;
|
|
216
|
-
};
|
|
217
|
-
MonkeyEcxUtils.handleBlobFile = function (theBlob, fileName, fileType) {
|
|
218
|
-
function blobToFile(theBlob, fileName) {
|
|
219
|
-
var b = theBlob;
|
|
220
|
-
b.lastModifiedDate = new Date();
|
|
221
|
-
b.name = fileName;
|
|
222
|
-
return b;
|
|
223
|
-
}
|
|
224
|
-
var file;
|
|
225
|
-
if (!navigator.msSaveBlob) {
|
|
226
|
-
file = new File([theBlob], fileName, {
|
|
227
|
-
type: fileType,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
file = new Blob([theBlob], {
|
|
232
|
-
type: fileType,
|
|
233
|
-
});
|
|
234
|
-
file = blobToFile(file, fileName);
|
|
235
|
-
}
|
|
236
|
-
return file;
|
|
237
|
-
};
|
|
238
|
-
MonkeyEcxUtils.truncate = function (text, maxLength) {
|
|
239
|
-
if (maxLength === void 0) { maxLength = 25; }
|
|
240
|
-
var midChar = '...';
|
|
241
|
-
if (!text)
|
|
242
|
-
return midChar;
|
|
243
|
-
if (text && text.length <= maxLength)
|
|
244
|
-
return text;
|
|
245
|
-
var left = Math.ceil(maxLength / 2);
|
|
246
|
-
var right = text.length - left + 1;
|
|
247
|
-
return text.substr(0, left) + " " + midChar + " " + text.substring(right);
|
|
248
|
-
};
|
|
249
|
-
MonkeyEcxUtils.isLocalhost = function () {
|
|
250
|
-
var href = (window === null || window === void 0 ? void 0 : window.location).href;
|
|
251
|
-
if (!href)
|
|
252
|
-
return false;
|
|
253
|
-
return (href === null || href === void 0 ? void 0 : href.search('localhost')) >= 0;
|
|
254
|
-
};
|
|
255
|
-
MonkeyEcxUtils.isSameOrigin = function (frontend) {
|
|
256
|
-
var initialPath = window.location.origin;
|
|
257
|
-
return (initialPath || '') === frontend;
|
|
258
|
-
};
|
|
259
|
-
return MonkeyEcxUtils;
|
|
260
|
-
}());
|
|
261
|
-
|
|
262
|
-
var moment$2 = moment___namespace;
|
|
263
|
-
var MonkeyEcxFormatDateTimelapsePipe = /** @class */ (function () {
|
|
264
|
-
function MonkeyEcxFormatDateTimelapsePipe() {
|
|
265
|
-
// not todo
|
|
266
|
-
}
|
|
267
|
-
MonkeyEcxFormatDateTimelapsePipe.prototype.transform = function (date, showTime, useUtc, format) {
|
|
268
|
-
if (showTime === void 0) { showTime = false; }
|
|
269
|
-
if (useUtc === void 0) { useUtc = true; }
|
|
270
|
-
var _a;
|
|
271
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
|
|
272
|
-
return '';
|
|
273
|
-
if (!format) {
|
|
274
|
-
format = '- HH:mm';
|
|
275
|
-
}
|
|
276
|
-
var stillUtc = moment$2.utc(date).toDate();
|
|
277
|
-
if (!useUtc)
|
|
278
|
-
stillUtc = moment$2(date).toDate();
|
|
279
|
-
if (((_a = date.toString()) === null || _a === void 0 ? void 0 : _a.indexOf(':')) <= -1) {
|
|
280
|
-
stillUtc = date;
|
|
281
|
-
showTime = false;
|
|
282
|
-
}
|
|
283
|
-
var formatFrom = "YYYY/MM/DD" + (showTime ? " " + format : '');
|
|
284
|
-
var formatTo = "DD/MM/YYYY" + (showTime ? " " + format : '');
|
|
285
|
-
return "" + moment$2(stillUtc, formatFrom).format(formatTo);
|
|
286
|
-
};
|
|
287
|
-
return MonkeyEcxFormatDateTimelapsePipe;
|
|
288
|
-
}());
|
|
289
|
-
MonkeyEcxFormatDateTimelapsePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatDateTimelapsePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
290
|
-
MonkeyEcxFormatDateTimelapsePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatDateTimelapsePipe, name: "monkeyecxFormatDateTimelapse" });
|
|
291
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatDateTimelapsePipe, decorators: [{
|
|
292
|
-
type: i0.Pipe,
|
|
293
|
-
args: [{
|
|
294
|
-
name: 'monkeyecxFormatDateTimelapse'
|
|
295
|
-
}]
|
|
296
|
-
}], ctorParameters: function () { return []; } });
|
|
297
|
-
|
|
298
|
-
var ClosedToMaintenanceComponent = /** @class */ (function () {
|
|
299
|
-
function ClosedToMaintenanceComponent() {
|
|
300
|
-
this._configBoostrap = null;
|
|
301
|
-
}
|
|
302
|
-
ClosedToMaintenanceComponent.prototype.ngOnInit = function () {
|
|
303
|
-
this._configBoostrap = this.config.data;
|
|
304
|
-
};
|
|
305
|
-
ClosedToMaintenanceComponent.prototype.onClose = function () {
|
|
306
|
-
document.location.reload();
|
|
307
|
-
};
|
|
308
|
-
return ClosedToMaintenanceComponent;
|
|
309
|
-
}());
|
|
310
|
-
ClosedToMaintenanceComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ClosedToMaintenanceComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
311
|
-
ClosedToMaintenanceComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ClosedToMaintenanceComponent, selector: "monkeyecx-closed-to-maintenance", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0__namespace, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\">\r\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\r\n <span class=\"h2\">\r\n {{ 'SCREENS.CLOSED-TO-MAINTENANCE.TITLE' | translate }}\r\n </span>\r\n <span class=\"information-title mt-4\">\r\n {{ 'SCREENS.CLOSED-TO-MAINTENANCE.INFORMATION-1' | translate }}\r\n </span>\r\n <span class=\"information-title mt-4\">\r\n {{ 'SCREENS.CLOSED-TO-MAINTENANCE.INFORMATION-2' | translate }}\r\n </span>\r\n <span class=\"information mt-3\">\r\n {{ 'SCREENS.CLOSED-TO-MAINTENANCE.INFORMATION-3' | translate }}\r\n {{ _configBoostrap?.maintenance?.endDate | monkeyecxFormatDateTimelapse: true }}\r\n </span>\r\n <span class=\"information-title mt-4\">\r\n {{ 'SCREENS.CLOSED-TO-MAINTENANCE.INFORMATION-4' | translate }}\r\n </span>\r\n </div>\r\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-5\">\r\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onClose()\">\r\n {{ 'SCREENS.CLOSED-TO-MAINTENANCE.BUTTONS.UPDATE-MAINTENANCE' | translate }}\r\n </monkey-button>\r\n </div>\r\n</monkey-modal>", styles: ["monkeyecx-closed-to-maintenance .body{padding:24px;width:100%}monkeyecx-closed-to-maintenance .information-title{font-style:normal;font-weight:600;font-size:25px;line-height:32px;display:flex;align-items:center;text-align:center;color:#4b4a53}monkeyecx-closed-to-maintenance .information{font-style:normal;font-weight:normal;font-size:20px;line-height:24px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-closed-to-maintenance .browser-name{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;text-align:center;color:#9c9ca6}monkeyecx-closed-to-maintenance .option{text-decoration:none;padding:4px;background:#eee;border:1px solid #d6d6d6;box-sizing:border-box;border-radius:16px}monkeyecx-closed-to-maintenance monkey-modal mecx-monkey-modal .body{margin-bottom:0!important}\n"], components: [{ type: i1__namespace.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1__namespace.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], pipes: { "translate": i1__namespace$1.TranslatePipe, "monkeyecxFormatDateTimelapse": MonkeyEcxFormatDateTimelapsePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
312
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ClosedToMaintenanceComponent, decorators: [{
|
|
313
|
-
type: i0.Component,
|
|
314
|
-
args: [{
|
|
315
|
-
selector: 'monkeyecx-closed-to-maintenance',
|
|
316
|
-
templateUrl: './closed-to-maintenance.component.html',
|
|
317
|
-
styleUrls: ['./closed-to-maintenance.component.scss'],
|
|
318
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
319
|
-
}]
|
|
320
|
-
}], propDecorators: { config: [{
|
|
321
|
-
type: i0.Input
|
|
322
|
-
}], modalRef: [{
|
|
323
|
-
type: i0.Input
|
|
324
|
-
}] } });
|
|
325
|
-
|
|
326
|
-
var MonkeyEcxFormatNumber = /** @class */ (function () {
|
|
327
|
-
function MonkeyEcxFormatNumber() {
|
|
328
|
-
// not to do
|
|
329
|
-
}
|
|
330
|
-
MonkeyEcxFormatNumber.prototype.transform = function (number) {
|
|
331
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(number))
|
|
332
|
-
return '';
|
|
333
|
-
return i1$2.formatNumber(Number(number), 'ptbr');
|
|
334
|
-
};
|
|
335
|
-
return MonkeyEcxFormatNumber;
|
|
336
|
-
}());
|
|
337
|
-
MonkeyEcxFormatNumber.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatNumber, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
338
|
-
MonkeyEcxFormatNumber.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatNumber, name: "monkeyecxFormatNumber" });
|
|
339
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatNumber, decorators: [{
|
|
340
|
-
type: i0.Pipe,
|
|
341
|
-
args: [{
|
|
342
|
-
name: 'monkeyecxFormatNumber'
|
|
343
|
-
}]
|
|
344
|
-
}], ctorParameters: function () { return []; } });
|
|
345
|
-
|
|
346
|
-
var MonkeyEcxFormatValue = /** @class */ (function () {
|
|
347
|
-
function MonkeyEcxFormatValue() {
|
|
348
|
-
// not to do
|
|
349
|
-
}
|
|
350
|
-
MonkeyEcxFormatValue.prototype.transform = function (number) {
|
|
351
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(number))
|
|
352
|
-
return '';
|
|
353
|
-
return number;
|
|
354
|
-
};
|
|
355
|
-
return MonkeyEcxFormatValue;
|
|
356
|
-
}());
|
|
357
|
-
MonkeyEcxFormatValue.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatValue, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
358
|
-
MonkeyEcxFormatValue.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatValue, name: "monkeyecxFormatValue" });
|
|
359
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatValue, decorators: [{
|
|
360
|
-
type: i0.Pipe,
|
|
361
|
-
args: [{
|
|
362
|
-
name: 'monkeyecxFormatValue'
|
|
363
|
-
}]
|
|
364
|
-
}], ctorParameters: function () { return []; } });
|
|
365
|
-
|
|
366
|
-
var MonkeyEcxFormatDocumentPipe = /** @class */ (function () {
|
|
367
|
-
function MonkeyEcxFormatDocumentPipe() {
|
|
368
|
-
// not to do
|
|
369
|
-
}
|
|
370
|
-
MonkeyEcxFormatDocumentPipe.prototype.transform = function (document, withType) {
|
|
371
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
|
|
372
|
-
return '';
|
|
373
|
-
return MonkeyEcxUtils.formatDocumentWithMask(document, withType);
|
|
374
|
-
};
|
|
375
|
-
return MonkeyEcxFormatDocumentPipe;
|
|
376
|
-
}());
|
|
377
|
-
MonkeyEcxFormatDocumentPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatDocumentPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
378
|
-
MonkeyEcxFormatDocumentPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatDocumentPipe, name: "monkeyecxFormatDocument" });
|
|
379
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatDocumentPipe, decorators: [{
|
|
380
|
-
type: i0.Pipe,
|
|
381
|
-
args: [{
|
|
382
|
-
name: 'monkeyecxFormatDocument'
|
|
383
|
-
}]
|
|
384
|
-
}], ctorParameters: function () { return []; } });
|
|
385
|
-
|
|
386
|
-
var MonkeyEcxDisplayFirstNamePipe = /** @class */ (function () {
|
|
387
|
-
function MonkeyEcxDisplayFirstNamePipe() {
|
|
388
|
-
// not to do
|
|
389
|
-
}
|
|
390
|
-
MonkeyEcxDisplayFirstNamePipe.prototype.transform = function (name) {
|
|
391
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(name))
|
|
392
|
-
return '';
|
|
393
|
-
return MonkeyEcxUtils.cutFirstLastName(name);
|
|
394
|
-
};
|
|
395
|
-
return MonkeyEcxDisplayFirstNamePipe;
|
|
396
|
-
}());
|
|
397
|
-
MonkeyEcxDisplayFirstNamePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDisplayFirstNamePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
398
|
-
MonkeyEcxDisplayFirstNamePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDisplayFirstNamePipe, name: "monkeyecxDisplayFirstName" });
|
|
399
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDisplayFirstNamePipe, decorators: [{
|
|
400
|
-
type: i0.Pipe,
|
|
401
|
-
args: [{
|
|
402
|
-
name: 'monkeyecxDisplayFirstName'
|
|
403
|
-
}]
|
|
404
|
-
}], ctorParameters: function () { return []; } });
|
|
405
|
-
|
|
406
|
-
var MonkeyEcxFormatSizePipe = /** @class */ (function () {
|
|
407
|
-
function MonkeyEcxFormatSizePipe() {
|
|
408
|
-
// not to do
|
|
409
|
-
}
|
|
410
|
-
MonkeyEcxFormatSizePipe.prototype.transform = function (size) {
|
|
411
|
-
if (!size)
|
|
412
|
-
return '0 B';
|
|
413
|
-
var sizeNum = Number(size);
|
|
414
|
-
return MonkeyEcxUtils.formatFileSize(sizeNum);
|
|
415
|
-
};
|
|
416
|
-
return MonkeyEcxFormatSizePipe;
|
|
417
|
-
}());
|
|
418
|
-
MonkeyEcxFormatSizePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatSizePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
419
|
-
MonkeyEcxFormatSizePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatSizePipe, name: "monkeyecxFormatSize" });
|
|
420
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatSizePipe, decorators: [{
|
|
421
|
-
type: i0.Pipe,
|
|
422
|
-
args: [{
|
|
423
|
-
name: 'monkeyecxFormatSize'
|
|
424
|
-
}]
|
|
425
|
-
}], ctorParameters: function () { return []; } });
|
|
426
|
-
|
|
427
|
-
var MonkeyEcxFormatCurrencyPipe = /** @class */ (function () {
|
|
428
|
-
function MonkeyEcxFormatCurrencyPipe(injector, currencyPipe) {
|
|
429
|
-
var _this = this;
|
|
430
|
-
this.injector = injector;
|
|
431
|
-
this.currencyPipe = currencyPipe;
|
|
432
|
-
this.currencyCode = 'BRL';
|
|
433
|
-
this.currentLocale = 'pt-BR';
|
|
434
|
-
var translateService = this.injector.get(i1$1.TranslateService);
|
|
435
|
-
translateService.get('MONKEY-CURRENCY-CODE').subscribe(function (_) {
|
|
436
|
-
_this.currencyCode = _;
|
|
437
|
-
_this.currentLocale = translateService.getDefaultLang();
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
MonkeyEcxFormatCurrencyPipe.prototype.transform = function (value) {
|
|
441
|
-
var _a = this, currencyCode = _a.currencyCode, currentLocale = _a.currentLocale;
|
|
442
|
-
return this.currencyPipe.transform(value, currencyCode, 'symbol', '', currentLocale);
|
|
443
|
-
};
|
|
444
|
-
return MonkeyEcxFormatCurrencyPipe;
|
|
445
|
-
}());
|
|
446
|
-
MonkeyEcxFormatCurrencyPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatCurrencyPipe, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace$2.CurrencyPipe }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
447
|
-
MonkeyEcxFormatCurrencyPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatCurrencyPipe, name: "monkeyecxFormatCurrency" });
|
|
448
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatCurrencyPipe, decorators: [{
|
|
449
|
-
type: i0.Pipe,
|
|
450
|
-
args: [{
|
|
451
|
-
name: 'monkeyecxFormatCurrency'
|
|
452
|
-
}]
|
|
453
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i1__namespace$2.CurrencyPipe }]; } });
|
|
454
|
-
|
|
455
|
-
var MonkeyEcxFormatZipCodePipe = /** @class */ (function () {
|
|
456
|
-
function MonkeyEcxFormatZipCodePipe() {
|
|
457
|
-
// not to do
|
|
458
|
-
}
|
|
459
|
-
MonkeyEcxFormatZipCodePipe.prototype.transform = function (zipCode) {
|
|
460
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(zipCode))
|
|
461
|
-
return '';
|
|
462
|
-
return MonkeyEcxUtils.formatZipCode(zipCode);
|
|
463
|
-
};
|
|
464
|
-
return MonkeyEcxFormatZipCodePipe;
|
|
465
|
-
}());
|
|
466
|
-
MonkeyEcxFormatZipCodePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatZipCodePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
467
|
-
MonkeyEcxFormatZipCodePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatZipCodePipe, name: "monkeyecxFormatZipCode" });
|
|
468
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatZipCodePipe, decorators: [{
|
|
469
|
-
type: i0.Pipe,
|
|
470
|
-
args: [{
|
|
471
|
-
name: 'monkeyecxFormatZipCode'
|
|
472
|
-
}]
|
|
473
|
-
}], ctorParameters: function () { return []; } });
|
|
474
|
-
|
|
475
|
-
var MonkeyEcxTextTruncatePipe = /** @class */ (function () {
|
|
476
|
-
function MonkeyEcxTextTruncatePipe() {
|
|
477
|
-
// not to do
|
|
478
|
-
}
|
|
479
|
-
MonkeyEcxTextTruncatePipe.prototype.transform = function (text, maxLength) {
|
|
480
|
-
if (maxLength === void 0) { maxLength = 25; }
|
|
481
|
-
var midChar = '...';
|
|
482
|
-
if (!text)
|
|
483
|
-
return midChar;
|
|
484
|
-
if (text && text.length <= maxLength)
|
|
485
|
-
return text;
|
|
486
|
-
var left = Math.ceil(maxLength / 2);
|
|
487
|
-
var right = text.length - left + 1;
|
|
488
|
-
return text.substr(0, left) + " " + midChar + " " + text.substring(right);
|
|
489
|
-
};
|
|
490
|
-
return MonkeyEcxTextTruncatePipe;
|
|
491
|
-
}());
|
|
492
|
-
MonkeyEcxTextTruncatePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTextTruncatePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
493
|
-
MonkeyEcxTextTruncatePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTextTruncatePipe, name: "monkeyecxTextTruncate" });
|
|
494
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTextTruncatePipe, decorators: [{
|
|
495
|
-
type: i0.Pipe,
|
|
496
|
-
args: [{
|
|
497
|
-
name: 'monkeyecxTextTruncate'
|
|
498
|
-
}]
|
|
499
|
-
}], ctorParameters: function () { return []; } });
|
|
500
|
-
|
|
501
|
-
var MonkeyEcxDocumentTypePipe = /** @class */ (function () {
|
|
502
|
-
function MonkeyEcxDocumentTypePipe() {
|
|
503
|
-
// not to do
|
|
504
|
-
}
|
|
505
|
-
MonkeyEcxDocumentTypePipe.prototype.transform = function (document) {
|
|
506
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
|
|
507
|
-
return '';
|
|
508
|
-
return MonkeyEcxUtils.getDocumentType(document);
|
|
509
|
-
};
|
|
510
|
-
return MonkeyEcxDocumentTypePipe;
|
|
511
|
-
}());
|
|
512
|
-
MonkeyEcxDocumentTypePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDocumentTypePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
513
|
-
MonkeyEcxDocumentTypePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDocumentTypePipe, name: "monkeyecxDocumentType" });
|
|
514
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDocumentTypePipe, decorators: [{
|
|
515
|
-
type: i0.Pipe,
|
|
516
|
-
args: [{
|
|
517
|
-
name: 'monkeyecxDocumentType'
|
|
518
|
-
}]
|
|
519
|
-
}], ctorParameters: function () { return []; } });
|
|
520
|
-
|
|
521
|
-
var MonkeyEcxTruncateQtdPipe = /** @class */ (function () {
|
|
522
|
-
function MonkeyEcxTruncateQtdPipe() {
|
|
523
|
-
}
|
|
524
|
-
MonkeyEcxTruncateQtdPipe.prototype.transform = function (number, threshold) {
|
|
525
|
-
return "" + (number > threshold ? threshold + "+" : number);
|
|
526
|
-
};
|
|
527
|
-
return MonkeyEcxTruncateQtdPipe;
|
|
528
|
-
}());
|
|
529
|
-
MonkeyEcxTruncateQtdPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTruncateQtdPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
530
|
-
MonkeyEcxTruncateQtdPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTruncateQtdPipe, name: "monkeyecxTruncateQtd" });
|
|
531
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTruncateQtdPipe, decorators: [{
|
|
532
|
-
type: i0.Pipe,
|
|
533
|
-
args: [{
|
|
534
|
-
name: 'monkeyecxTruncateQtd'
|
|
535
|
-
}]
|
|
536
|
-
}] });
|
|
537
|
-
|
|
538
|
-
var MonkeyEcxPipesModule = /** @class */ (function () {
|
|
539
|
-
function MonkeyEcxPipesModule() {
|
|
540
|
-
}
|
|
541
|
-
return MonkeyEcxPipesModule;
|
|
542
|
-
}());
|
|
543
|
-
MonkeyEcxPipesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxPipesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
544
|
-
MonkeyEcxPipesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxPipesModule, declarations: [MonkeyEcxFormatDocumentPipe,
|
|
545
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
546
|
-
MonkeyEcxDisplayFirstNamePipe,
|
|
547
|
-
MonkeyEcxFormatSizePipe,
|
|
548
|
-
MonkeyEcxFormatCurrencyPipe,
|
|
549
|
-
MonkeyEcxFormatZipCodePipe,
|
|
550
|
-
MonkeyEcxFormatNumber,
|
|
551
|
-
MonkeyEcxFormatValue,
|
|
552
|
-
MonkeyEcxTextTruncatePipe,
|
|
553
|
-
MonkeyEcxTruncateQtdPipe,
|
|
554
|
-
MonkeyEcxDocumentTypePipe], exports: [MonkeyEcxFormatDocumentPipe,
|
|
555
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
556
|
-
MonkeyEcxDisplayFirstNamePipe,
|
|
557
|
-
MonkeyEcxFormatSizePipe,
|
|
558
|
-
MonkeyEcxFormatCurrencyPipe,
|
|
559
|
-
MonkeyEcxFormatZipCodePipe,
|
|
560
|
-
MonkeyEcxFormatNumber,
|
|
561
|
-
MonkeyEcxFormatValue,
|
|
562
|
-
MonkeyEcxTextTruncatePipe,
|
|
563
|
-
MonkeyEcxTruncateQtdPipe,
|
|
564
|
-
MonkeyEcxDocumentTypePipe] });
|
|
565
|
-
MonkeyEcxPipesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxPipesModule, providers: [i1$2.CurrencyPipe] });
|
|
566
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxPipesModule, decorators: [{
|
|
567
|
-
type: i0.NgModule,
|
|
568
|
-
args: [{
|
|
569
|
-
declarations: [
|
|
570
|
-
MonkeyEcxFormatDocumentPipe,
|
|
571
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
572
|
-
MonkeyEcxDisplayFirstNamePipe,
|
|
573
|
-
MonkeyEcxFormatSizePipe,
|
|
574
|
-
MonkeyEcxFormatCurrencyPipe,
|
|
575
|
-
MonkeyEcxFormatZipCodePipe,
|
|
576
|
-
MonkeyEcxFormatNumber,
|
|
577
|
-
MonkeyEcxFormatValue,
|
|
578
|
-
MonkeyEcxTextTruncatePipe,
|
|
579
|
-
MonkeyEcxTruncateQtdPipe,
|
|
580
|
-
MonkeyEcxDocumentTypePipe
|
|
581
|
-
],
|
|
582
|
-
exports: [
|
|
583
|
-
MonkeyEcxFormatDocumentPipe,
|
|
584
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
585
|
-
MonkeyEcxDisplayFirstNamePipe,
|
|
586
|
-
MonkeyEcxFormatSizePipe,
|
|
587
|
-
MonkeyEcxFormatCurrencyPipe,
|
|
588
|
-
MonkeyEcxFormatZipCodePipe,
|
|
589
|
-
MonkeyEcxFormatNumber,
|
|
590
|
-
MonkeyEcxFormatValue,
|
|
591
|
-
MonkeyEcxTextTruncatePipe,
|
|
592
|
-
MonkeyEcxTruncateQtdPipe,
|
|
593
|
-
MonkeyEcxDocumentTypePipe
|
|
594
|
-
],
|
|
595
|
-
providers: [i1$2.CurrencyPipe]
|
|
596
|
-
}]
|
|
597
|
-
}] });
|
|
598
|
-
|
|
599
|
-
var ClosedToMaintenanceModule = /** @class */ (function () {
|
|
600
|
-
function ClosedToMaintenanceModule() {
|
|
601
|
-
}
|
|
602
|
-
return ClosedToMaintenanceModule;
|
|
603
|
-
}());
|
|
604
|
-
ClosedToMaintenanceModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ClosedToMaintenanceModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
605
|
-
ClosedToMaintenanceModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ClosedToMaintenanceModule, declarations: [ClosedToMaintenanceComponent], imports: [i1$2.CommonModule,
|
|
606
|
-
i1.MonkeyButtonModule,
|
|
607
|
-
i1.MonkeyIconModule,
|
|
608
|
-
i1.MonkeyInputModule,
|
|
609
|
-
i1.MonkeyModalModule,
|
|
610
|
-
MonkeyEcxPipesModule, i1__namespace$1.TranslateModule], exports: [ClosedToMaintenanceComponent] });
|
|
611
|
-
ClosedToMaintenanceModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ClosedToMaintenanceModule, imports: [[
|
|
612
|
-
i1$2.CommonModule,
|
|
613
|
-
i1.MonkeyButtonModule,
|
|
614
|
-
i1.MonkeyIconModule,
|
|
615
|
-
i1.MonkeyInputModule,
|
|
616
|
-
i1.MonkeyModalModule,
|
|
617
|
-
MonkeyEcxPipesModule,
|
|
618
|
-
i1$1.TranslateModule.forChild()
|
|
619
|
-
]] });
|
|
620
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ClosedToMaintenanceModule, decorators: [{
|
|
621
|
-
type: i0.NgModule,
|
|
622
|
-
args: [{
|
|
623
|
-
declarations: [ClosedToMaintenanceComponent],
|
|
624
|
-
imports: [
|
|
625
|
-
i1$2.CommonModule,
|
|
626
|
-
i1.MonkeyButtonModule,
|
|
627
|
-
i1.MonkeyIconModule,
|
|
628
|
-
i1.MonkeyInputModule,
|
|
629
|
-
i1.MonkeyModalModule,
|
|
630
|
-
MonkeyEcxPipesModule,
|
|
631
|
-
i1$1.TranslateModule.forChild()
|
|
632
|
-
],
|
|
633
|
-
exports: [ClosedToMaintenanceComponent]
|
|
634
|
-
}]
|
|
635
|
-
}] });
|
|
636
|
-
|
|
637
|
-
var MonkeyEcxProgressBarService = /** @class */ (function () {
|
|
638
|
-
function MonkeyEcxProgressBarService(router) {
|
|
639
|
-
this.router = router;
|
|
640
|
-
this.init();
|
|
641
|
-
}
|
|
642
|
-
MonkeyEcxProgressBarService.prototype.init = function () {
|
|
643
|
-
var _this = this;
|
|
644
|
-
this.visible = new rxjs.BehaviorSubject(false);
|
|
645
|
-
this.router.events
|
|
646
|
-
.pipe(operators.filter(function (event) {
|
|
647
|
-
return event instanceof i1$3.NavigationStart;
|
|
648
|
-
}))
|
|
649
|
-
.subscribe(function () {
|
|
650
|
-
_this.show();
|
|
651
|
-
});
|
|
652
|
-
this.router.events
|
|
653
|
-
.pipe(operators.filter(function (event) {
|
|
654
|
-
return (event instanceof i1$3.NavigationEnd ||
|
|
655
|
-
event instanceof i1$3.NavigationError ||
|
|
656
|
-
event instanceof i1$3.NavigationCancel);
|
|
657
|
-
}))
|
|
658
|
-
.subscribe(function () {
|
|
659
|
-
_this.hide();
|
|
660
|
-
});
|
|
661
|
-
};
|
|
662
|
-
MonkeyEcxProgressBarService.prototype.show = function () {
|
|
663
|
-
this.visible.next(true);
|
|
664
|
-
};
|
|
665
|
-
MonkeyEcxProgressBarService.prototype.hide = function () {
|
|
666
|
-
this.visible.next(false);
|
|
667
|
-
};
|
|
668
|
-
MonkeyEcxProgressBarService.prototype.visibleConfig = function () {
|
|
669
|
-
return this.visible.asObservable();
|
|
670
|
-
};
|
|
671
|
-
return MonkeyEcxProgressBarService;
|
|
672
|
-
}());
|
|
673
|
-
MonkeyEcxProgressBarService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarService, deps: [{ token: i1__namespace$3.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
674
|
-
MonkeyEcxProgressBarService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarService, providedIn: 'root' });
|
|
675
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarService, decorators: [{
|
|
676
|
-
type: i0.Injectable,
|
|
677
|
-
args: [{
|
|
678
|
-
providedIn: 'root'
|
|
679
|
-
}]
|
|
680
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$3.Router }]; } });
|
|
681
|
-
|
|
682
|
-
var MonkeyEcxProgressBarComponent = /** @class */ (function () {
|
|
683
|
-
function MonkeyEcxProgressBarComponent(progressBarService) {
|
|
684
|
-
this.progressBarService = progressBarService;
|
|
685
|
-
this.visible = false;
|
|
686
|
-
//not to do
|
|
687
|
-
}
|
|
688
|
-
MonkeyEcxProgressBarComponent.prototype.ngOnInit = function () {
|
|
689
|
-
var _this = this;
|
|
690
|
-
this.progressBarService.visibleConfig().subscribe(function (visible) {
|
|
691
|
-
_this.visible = visible;
|
|
692
|
-
});
|
|
693
|
-
};
|
|
694
|
-
return MonkeyEcxProgressBarComponent;
|
|
695
|
-
}());
|
|
696
|
-
MonkeyEcxProgressBarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarComponent, deps: [{ token: MonkeyEcxProgressBarService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
697
|
-
MonkeyEcxProgressBarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxProgressBarComponent, selector: "monkeyecx-progress-bar", ngImport: i0__namespace, template: "<ng-container *ngIf=\"visible\">\r\n <progress class=\"monkey-progress monkey-progress__theme\"></progress>\r\n</ng-container>\r\n", styles: ["monkeyecx-progress-bar{position:absolute;width:100%;margin-top:-9.5px;z-index:99998}\n"], directives: [{ type: i1__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
698
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarComponent, decorators: [{
|
|
699
|
-
type: i0.Component,
|
|
700
|
-
args: [{
|
|
701
|
-
selector: 'monkeyecx-progress-bar',
|
|
702
|
-
templateUrl: './progress-bar.component.html',
|
|
703
|
-
styleUrls: ['./progress-bar.component.scss'],
|
|
704
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
705
|
-
}]
|
|
706
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxProgressBarService }]; } });
|
|
707
|
-
|
|
708
|
-
var MonkeyEcxProgressBarModule = /** @class */ (function () {
|
|
709
|
-
function MonkeyEcxProgressBarModule() {
|
|
710
|
-
}
|
|
711
|
-
return MonkeyEcxProgressBarModule;
|
|
712
|
-
}());
|
|
713
|
-
MonkeyEcxProgressBarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
714
|
-
MonkeyEcxProgressBarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarModule, declarations: [MonkeyEcxProgressBarComponent], imports: [i1$2.CommonModule], exports: [MonkeyEcxProgressBarComponent] });
|
|
715
|
-
MonkeyEcxProgressBarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarModule, imports: [[i1$2.CommonModule]] });
|
|
716
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxProgressBarModule, decorators: [{
|
|
717
|
-
type: i0.NgModule,
|
|
718
|
-
args: [{
|
|
719
|
-
declarations: [MonkeyEcxProgressBarComponent],
|
|
720
|
-
imports: [i1$2.CommonModule],
|
|
721
|
-
exports: [MonkeyEcxProgressBarComponent]
|
|
722
|
-
}]
|
|
723
|
-
}] });
|
|
724
|
-
|
|
725
|
-
var VersionChangedComponent = /** @class */ (function () {
|
|
726
|
-
function VersionChangedComponent() {
|
|
727
|
-
}
|
|
728
|
-
VersionChangedComponent.prototype.onClose = function () {
|
|
729
|
-
document.location.reload();
|
|
730
|
-
};
|
|
731
|
-
return VersionChangedComponent;
|
|
732
|
-
}());
|
|
733
|
-
VersionChangedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: VersionChangedComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
734
|
-
VersionChangedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: VersionChangedComponent, selector: "monkeyecx-version-changed", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0__namespace, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\">\r\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\r\n <span class=\"h2\">\r\n {{ 'SCREENS.VERSION-CHANGED.TITLE' | translate }}\r\n </span>\r\n <span class=\"information-title mt-4\">\r\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-1' | translate }}\r\n </span>\r\n <span class=\"information mt-3\">\r\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-2' | translate }}\r\n </span>\r\n </div>\r\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-5\">\r\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onClose()\">\r\n {{ 'SCREENS.VERSION-CHANGED.BUTTONS.UPDATE-VERSION' | translate }}\r\n </monkey-button>\r\n </div>\r\n</monkey-modal>", styles: ["monkeyecx-version-changed .body{padding:24px;width:100%}monkeyecx-version-changed .information-title{font-style:normal;font-weight:600;font-size:25px;line-height:32px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .information{font-style:normal;font-weight:normal;font-size:20px;line-height:24px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .browser-name{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;text-align:center;color:#9c9ca6}monkeyecx-version-changed .option{text-decoration:none;padding:4px;background:#eee;border:1px solid #d6d6d6;box-sizing:border-box;border-radius:16px}monkeyecx-version-changed monkey-modal mecx-monkey-modal .body{margin-bottom:0!important}\n"], components: [{ type: i1__namespace.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1__namespace.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], pipes: { "translate": i1__namespace$1.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
735
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: VersionChangedComponent, decorators: [{
|
|
736
|
-
type: i0.Component,
|
|
737
|
-
args: [{
|
|
738
|
-
selector: 'monkeyecx-version-changed',
|
|
739
|
-
templateUrl: './version-changed.component.html',
|
|
740
|
-
styleUrls: ['./version-changed.component.scss'],
|
|
741
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
742
|
-
}]
|
|
743
|
-
}], propDecorators: { config: [{
|
|
744
|
-
type: i0.Input
|
|
745
|
-
}], modalRef: [{
|
|
746
|
-
type: i0.Input
|
|
747
|
-
}] } });
|
|
748
|
-
|
|
749
|
-
var VersionChangedModule = /** @class */ (function () {
|
|
750
|
-
function VersionChangedModule() {
|
|
751
|
-
}
|
|
752
|
-
return VersionChangedModule;
|
|
753
|
-
}());
|
|
754
|
-
VersionChangedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: VersionChangedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
755
|
-
VersionChangedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: VersionChangedModule, declarations: [VersionChangedComponent], imports: [i1$2.CommonModule,
|
|
756
|
-
i1.MonkeyButtonModule,
|
|
757
|
-
i1.MonkeyIconModule,
|
|
758
|
-
i1.MonkeyInputModule,
|
|
759
|
-
i1.MonkeyModalModule, i1__namespace$1.TranslateModule], exports: [VersionChangedComponent] });
|
|
760
|
-
VersionChangedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: VersionChangedModule, imports: [[
|
|
761
|
-
i1$2.CommonModule,
|
|
762
|
-
i1.MonkeyButtonModule,
|
|
763
|
-
i1.MonkeyIconModule,
|
|
764
|
-
i1.MonkeyInputModule,
|
|
765
|
-
i1.MonkeyModalModule,
|
|
766
|
-
i1$1.TranslateModule.forChild()
|
|
767
|
-
]] });
|
|
768
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: VersionChangedModule, decorators: [{
|
|
769
|
-
type: i0.NgModule,
|
|
770
|
-
args: [{
|
|
771
|
-
declarations: [VersionChangedComponent],
|
|
772
|
-
imports: [
|
|
773
|
-
i1$2.CommonModule,
|
|
774
|
-
i1.MonkeyButtonModule,
|
|
775
|
-
i1.MonkeyIconModule,
|
|
776
|
-
i1.MonkeyInputModule,
|
|
777
|
-
i1.MonkeyModalModule,
|
|
778
|
-
i1$1.TranslateModule.forChild()
|
|
779
|
-
],
|
|
780
|
-
exports: [VersionChangedComponent]
|
|
781
|
-
}]
|
|
782
|
-
}] });
|
|
783
|
-
|
|
784
|
-
/*! *****************************************************************************
|
|
785
|
-
Copyright (c) Microsoft Corporation.
|
|
786
|
-
|
|
787
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
788
|
-
purpose with or without fee is hereby granted.
|
|
789
|
-
|
|
790
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
791
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
792
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
793
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
794
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
795
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
796
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
797
|
-
***************************************************************************** */
|
|
798
|
-
/* global Reflect, Promise */
|
|
799
|
-
var extendStatics = function (d, b) {
|
|
800
|
-
extendStatics = Object.setPrototypeOf ||
|
|
801
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
802
|
-
function (d, b) { for (var p in b)
|
|
803
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
804
|
-
d[p] = b[p]; };
|
|
805
|
-
return extendStatics(d, b);
|
|
806
|
-
};
|
|
807
|
-
function __extends(d, b) {
|
|
808
|
-
if (typeof b !== "function" && b !== null)
|
|
809
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
810
|
-
extendStatics(d, b);
|
|
811
|
-
function __() { this.constructor = d; }
|
|
812
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
813
|
-
}
|
|
814
|
-
var __assign = function () {
|
|
815
|
-
__assign = Object.assign || function __assign(t) {
|
|
816
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
817
|
-
s = arguments[i];
|
|
818
|
-
for (var p in s)
|
|
819
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
820
|
-
t[p] = s[p];
|
|
821
|
-
}
|
|
822
|
-
return t;
|
|
823
|
-
};
|
|
824
|
-
return __assign.apply(this, arguments);
|
|
825
|
-
};
|
|
826
|
-
function __rest(s, e) {
|
|
827
|
-
var t = {};
|
|
828
|
-
for (var p in s)
|
|
829
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
830
|
-
t[p] = s[p];
|
|
831
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
832
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
833
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
834
|
-
t[p[i]] = s[p[i]];
|
|
835
|
-
}
|
|
836
|
-
return t;
|
|
837
|
-
}
|
|
838
|
-
function __decorate(decorators, target, key, desc) {
|
|
839
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
840
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
841
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
842
|
-
else
|
|
843
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
844
|
-
if (d = decorators[i])
|
|
845
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
846
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
847
|
-
}
|
|
848
|
-
function __param(paramIndex, decorator) {
|
|
849
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
850
|
-
}
|
|
851
|
-
function __metadata(metadataKey, metadataValue) {
|
|
852
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
853
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
854
|
-
}
|
|
855
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
856
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
857
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
858
|
-
function fulfilled(value) { try {
|
|
859
|
-
step(generator.next(value));
|
|
860
|
-
}
|
|
861
|
-
catch (e) {
|
|
862
|
-
reject(e);
|
|
863
|
-
} }
|
|
864
|
-
function rejected(value) { try {
|
|
865
|
-
step(generator["throw"](value));
|
|
866
|
-
}
|
|
867
|
-
catch (e) {
|
|
868
|
-
reject(e);
|
|
869
|
-
} }
|
|
870
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
871
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
function __generator(thisArg, body) {
|
|
875
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
876
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
877
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
878
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
879
|
-
function step(op) {
|
|
880
|
-
if (f)
|
|
881
|
-
throw new TypeError("Generator is already executing.");
|
|
882
|
-
while (_)
|
|
883
|
-
try {
|
|
884
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
885
|
-
return t;
|
|
886
|
-
if (y = 0, t)
|
|
887
|
-
op = [op[0] & 2, t.value];
|
|
888
|
-
switch (op[0]) {
|
|
889
|
-
case 0:
|
|
890
|
-
case 1:
|
|
891
|
-
t = op;
|
|
892
|
-
break;
|
|
893
|
-
case 4:
|
|
894
|
-
_.label++;
|
|
895
|
-
return { value: op[1], done: false };
|
|
896
|
-
case 5:
|
|
897
|
-
_.label++;
|
|
898
|
-
y = op[1];
|
|
899
|
-
op = [0];
|
|
900
|
-
continue;
|
|
901
|
-
case 7:
|
|
902
|
-
op = _.ops.pop();
|
|
903
|
-
_.trys.pop();
|
|
904
|
-
continue;
|
|
905
|
-
default:
|
|
906
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
907
|
-
_ = 0;
|
|
908
|
-
continue;
|
|
909
|
-
}
|
|
910
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
911
|
-
_.label = op[1];
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
915
|
-
_.label = t[1];
|
|
916
|
-
t = op;
|
|
917
|
-
break;
|
|
918
|
-
}
|
|
919
|
-
if (t && _.label < t[2]) {
|
|
920
|
-
_.label = t[2];
|
|
921
|
-
_.ops.push(op);
|
|
922
|
-
break;
|
|
923
|
-
}
|
|
924
|
-
if (t[2])
|
|
925
|
-
_.ops.pop();
|
|
926
|
-
_.trys.pop();
|
|
927
|
-
continue;
|
|
928
|
-
}
|
|
929
|
-
op = body.call(thisArg, _);
|
|
930
|
-
}
|
|
931
|
-
catch (e) {
|
|
932
|
-
op = [6, e];
|
|
933
|
-
y = 0;
|
|
934
|
-
}
|
|
935
|
-
finally {
|
|
936
|
-
f = t = 0;
|
|
937
|
-
}
|
|
938
|
-
if (op[0] & 5)
|
|
939
|
-
throw op[1];
|
|
940
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
944
|
-
if (k2 === undefined)
|
|
945
|
-
k2 = k;
|
|
946
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
947
|
-
}) : (function (o, m, k, k2) {
|
|
948
|
-
if (k2 === undefined)
|
|
949
|
-
k2 = k;
|
|
950
|
-
o[k2] = m[k];
|
|
951
|
-
});
|
|
952
|
-
function __exportStar(m, o) {
|
|
953
|
-
for (var p in m)
|
|
954
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
955
|
-
__createBinding(o, m, p);
|
|
956
|
-
}
|
|
957
|
-
function __values(o) {
|
|
958
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
959
|
-
if (m)
|
|
960
|
-
return m.call(o);
|
|
961
|
-
if (o && typeof o.length === "number")
|
|
962
|
-
return {
|
|
963
|
-
next: function () {
|
|
964
|
-
if (o && i >= o.length)
|
|
965
|
-
o = void 0;
|
|
966
|
-
return { value: o && o[i++], done: !o };
|
|
967
|
-
}
|
|
968
|
-
};
|
|
969
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
970
|
-
}
|
|
971
|
-
function __read(o, n) {
|
|
972
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
973
|
-
if (!m)
|
|
974
|
-
return o;
|
|
975
|
-
var i = m.call(o), r, ar = [], e;
|
|
976
|
-
try {
|
|
977
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
978
|
-
ar.push(r.value);
|
|
979
|
-
}
|
|
980
|
-
catch (error) {
|
|
981
|
-
e = { error: error };
|
|
982
|
-
}
|
|
983
|
-
finally {
|
|
984
|
-
try {
|
|
985
|
-
if (r && !r.done && (m = i["return"]))
|
|
986
|
-
m.call(i);
|
|
987
|
-
}
|
|
988
|
-
finally {
|
|
989
|
-
if (e)
|
|
990
|
-
throw e.error;
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
return ar;
|
|
994
|
-
}
|
|
995
|
-
/** @deprecated */
|
|
996
|
-
function __spread() {
|
|
997
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
998
|
-
ar = ar.concat(__read(arguments[i]));
|
|
999
|
-
return ar;
|
|
1000
|
-
}
|
|
1001
|
-
/** @deprecated */
|
|
1002
|
-
function __spreadArrays() {
|
|
1003
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
1004
|
-
s += arguments[i].length;
|
|
1005
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1006
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
1007
|
-
r[k] = a[j];
|
|
1008
|
-
return r;
|
|
1009
|
-
}
|
|
1010
|
-
function __spreadArray(to, from, pack) {
|
|
1011
|
-
if (pack || arguments.length === 2)
|
|
1012
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1013
|
-
if (ar || !(i in from)) {
|
|
1014
|
-
if (!ar)
|
|
1015
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
1016
|
-
ar[i] = from[i];
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1020
|
-
}
|
|
1021
|
-
function __await(v) {
|
|
1022
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
1023
|
-
}
|
|
1024
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
1025
|
-
if (!Symbol.asyncIterator)
|
|
1026
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1027
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1028
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
1029
|
-
function verb(n) { if (g[n])
|
|
1030
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
1031
|
-
function resume(n, v) { try {
|
|
1032
|
-
step(g[n](v));
|
|
1033
|
-
}
|
|
1034
|
-
catch (e) {
|
|
1035
|
-
settle(q[0][3], e);
|
|
1036
|
-
} }
|
|
1037
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
1038
|
-
function fulfill(value) { resume("next", value); }
|
|
1039
|
-
function reject(value) { resume("throw", value); }
|
|
1040
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
1041
|
-
resume(q[0][0], q[0][1]); }
|
|
1042
|
-
}
|
|
1043
|
-
function __asyncDelegator(o) {
|
|
1044
|
-
var i, p;
|
|
1045
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
1046
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
1047
|
-
}
|
|
1048
|
-
function __asyncValues(o) {
|
|
1049
|
-
if (!Symbol.asyncIterator)
|
|
1050
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1051
|
-
var m = o[Symbol.asyncIterator], i;
|
|
1052
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
1053
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
1054
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
1055
|
-
}
|
|
1056
|
-
function __makeTemplateObject(cooked, raw) {
|
|
1057
|
-
if (Object.defineProperty) {
|
|
1058
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
1059
|
-
}
|
|
1060
|
-
else {
|
|
1061
|
-
cooked.raw = raw;
|
|
1062
|
-
}
|
|
1063
|
-
return cooked;
|
|
1064
|
-
}
|
|
1065
|
-
;
|
|
1066
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
1067
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1068
|
-
}) : function (o, v) {
|
|
1069
|
-
o["default"] = v;
|
|
1070
|
-
};
|
|
1071
|
-
function __importStar(mod) {
|
|
1072
|
-
if (mod && mod.__esModule)
|
|
1073
|
-
return mod;
|
|
1074
|
-
var result = {};
|
|
1075
|
-
if (mod != null)
|
|
1076
|
-
for (var k in mod)
|
|
1077
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
1078
|
-
__createBinding(result, mod, k);
|
|
1079
|
-
__setModuleDefault(result, mod);
|
|
1080
|
-
return result;
|
|
1081
|
-
}
|
|
1082
|
-
function __importDefault(mod) {
|
|
1083
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
1084
|
-
}
|
|
1085
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
1086
|
-
if (kind === "a" && !f)
|
|
1087
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
1088
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
1089
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1090
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1091
|
-
}
|
|
1092
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
1093
|
-
if (kind === "m")
|
|
1094
|
-
throw new TypeError("Private method is not writable");
|
|
1095
|
-
if (kind === "a" && !f)
|
|
1096
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
1097
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
1098
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1099
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
/* eslint-disable max-classes-per-file */
|
|
1103
|
-
var moment$1 = moment___namespace;
|
|
1104
|
-
var DateValidator = /** @class */ (function () {
|
|
1105
|
-
function DateValidator() {
|
|
1106
|
-
}
|
|
1107
|
-
DateValidator.do = function (control) {
|
|
1108
|
-
if (!control.parent || !control)
|
|
1109
|
-
return null;
|
|
1110
|
-
if (control && control.value) {
|
|
1111
|
-
var dateFormat = 'MM-DD-YYYY';
|
|
1112
|
-
if (!moment$1(moment$1(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true).isValid()) {
|
|
1113
|
-
return {
|
|
1114
|
-
invalidDate: true
|
|
1115
|
-
};
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
return null;
|
|
1119
|
-
};
|
|
1120
|
-
return DateValidator;
|
|
1121
|
-
}());
|
|
1122
|
-
var DocumentValidator = /** @class */ (function () {
|
|
1123
|
-
function DocumentValidator() {
|
|
1124
|
-
}
|
|
1125
|
-
DocumentValidator.do = function (control) {
|
|
1126
|
-
if (!control.parent || !control)
|
|
1127
|
-
return null;
|
|
1128
|
-
if (control && control.value) {
|
|
1129
|
-
if (!MonkeyEcxUtils.isCPFCNPJValid(control.value)) {
|
|
1130
|
-
return {
|
|
1131
|
-
invalidCpfCnpj: true
|
|
1132
|
-
};
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
return null;
|
|
1136
|
-
};
|
|
1137
|
-
return DocumentValidator;
|
|
1138
|
-
}());
|
|
1139
|
-
var DocumentRutValidator = /** @class */ (function () {
|
|
1140
|
-
function DocumentRutValidator() {
|
|
1141
|
-
}
|
|
1142
|
-
DocumentRutValidator.do = function (control) {
|
|
1143
|
-
if (!control.parent || !control)
|
|
1144
|
-
return null;
|
|
1145
|
-
if (control && control.value) {
|
|
1146
|
-
if (!MonkeyEcxUtils.isValidRUT(control.value)) {
|
|
1147
|
-
return {
|
|
1148
|
-
invalidRut: true
|
|
1149
|
-
};
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
return null;
|
|
1153
|
-
};
|
|
1154
|
-
return DocumentRutValidator;
|
|
1155
|
-
}());
|
|
1156
|
-
var ZipCodeValidator = /** @class */ (function () {
|
|
1157
|
-
function ZipCodeValidator() {
|
|
1158
|
-
}
|
|
1159
|
-
ZipCodeValidator.do = function (control) {
|
|
1160
|
-
if (!control.parent || !control)
|
|
1161
|
-
return null;
|
|
1162
|
-
if (control && control.value) {
|
|
1163
|
-
if (!MonkeyEcxUtils.isValidZipCode(control.value)) {
|
|
1164
|
-
return {
|
|
1165
|
-
invalidZipCode: true
|
|
1166
|
-
};
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
return null;
|
|
1170
|
-
};
|
|
1171
|
-
return ZipCodeValidator;
|
|
1172
|
-
}());
|
|
1173
|
-
var ComboValidator = /** @class */ (function () {
|
|
1174
|
-
function ComboValidator() {
|
|
1175
|
-
}
|
|
1176
|
-
ComboValidator.do = function (control) {
|
|
1177
|
-
if (!control.parent || !control)
|
|
1178
|
-
return null;
|
|
1179
|
-
if (control && control.value !== '0')
|
|
1180
|
-
return null;
|
|
1181
|
-
return {
|
|
1182
|
-
invalidCombo: true
|
|
1183
|
-
};
|
|
1184
|
-
};
|
|
1185
|
-
return ComboValidator;
|
|
1186
|
-
}());
|
|
1187
|
-
var isTrueValidator = /** @class */ (function () {
|
|
1188
|
-
function isTrueValidator() {
|
|
1189
|
-
}
|
|
1190
|
-
isTrueValidator.do = function (control) {
|
|
1191
|
-
if (!control.parent || !control)
|
|
1192
|
-
return null;
|
|
1193
|
-
if (control && control.value !== false)
|
|
1194
|
-
return null;
|
|
1195
|
-
return {
|
|
1196
|
-
invalidTrue: true
|
|
1197
|
-
};
|
|
1198
|
-
};
|
|
1199
|
-
return isTrueValidator;
|
|
1200
|
-
}());
|
|
1201
|
-
var PasswordMatchValidation = /** @class */ (function () {
|
|
1202
|
-
function PasswordMatchValidation() {
|
|
1203
|
-
}
|
|
1204
|
-
PasswordMatchValidation.do = function (control) {
|
|
1205
|
-
if (!control.parent || !control)
|
|
1206
|
-
return null;
|
|
1207
|
-
var parent = control.parent;
|
|
1208
|
-
var password = parent.get('password').value;
|
|
1209
|
-
var passwordConfirm = parent.get('passwordConfirm').value;
|
|
1210
|
-
if (!password || !passwordConfirm)
|
|
1211
|
-
return null;
|
|
1212
|
-
if (password === passwordConfirm)
|
|
1213
|
-
return null;
|
|
1214
|
-
return {
|
|
1215
|
-
passwordsNotMatching: true
|
|
1216
|
-
};
|
|
1217
|
-
};
|
|
1218
|
-
return PasswordMatchValidation;
|
|
1219
|
-
}());
|
|
1220
|
-
var UrlValidator = /** @class */ (function () {
|
|
1221
|
-
function UrlValidator() {
|
|
1222
|
-
}
|
|
1223
|
-
UrlValidator.do = function (control) {
|
|
1224
|
-
if (!control.parent || !control)
|
|
1225
|
-
return null;
|
|
1226
|
-
if (control && control.value) {
|
|
1227
|
-
if (!MonkeyEcxUtils.isValidUrl(control.value)) {
|
|
1228
|
-
return {
|
|
1229
|
-
invalidUrl: true
|
|
1230
|
-
};
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
return null;
|
|
1234
|
-
};
|
|
1235
|
-
return UrlValidator;
|
|
1236
|
-
}());
|
|
1237
|
-
var CustomDatesStartValidator = /** @class */ (function () {
|
|
1238
|
-
function CustomDatesStartValidator() {
|
|
1239
|
-
}
|
|
1240
|
-
CustomDatesStartValidator.do = function (control) {
|
|
1241
|
-
if (!control.parent || !control)
|
|
1242
|
-
return null;
|
|
1243
|
-
var parent = control.parent;
|
|
1244
|
-
var valueStart = parent.get('dateStart').value;
|
|
1245
|
-
var valueEnd = parent.get('dateEnd').value;
|
|
1246
|
-
var dateStart;
|
|
1247
|
-
var dateEnd;
|
|
1248
|
-
if (valueStart) {
|
|
1249
|
-
dateStart = new Date(valueStart);
|
|
1250
|
-
}
|
|
1251
|
-
if (valueEnd) {
|
|
1252
|
-
dateEnd = new Date(valueEnd);
|
|
1253
|
-
}
|
|
1254
|
-
if (!dateStart || !dateEnd)
|
|
1255
|
-
return null;
|
|
1256
|
-
if (dateStart > dateEnd) {
|
|
1257
|
-
return {
|
|
1258
|
-
dateStartMustBeLessThanAnd: true
|
|
1259
|
-
};
|
|
1260
|
-
}
|
|
1261
|
-
return null;
|
|
1262
|
-
};
|
|
1263
|
-
return CustomDatesStartValidator;
|
|
1264
|
-
}());
|
|
1265
|
-
var CustomDatesEndValidator = /** @class */ (function () {
|
|
1266
|
-
function CustomDatesEndValidator() {
|
|
1267
|
-
}
|
|
1268
|
-
CustomDatesEndValidator.do = function (control) {
|
|
1269
|
-
if (!control.parent || !control)
|
|
1270
|
-
return null;
|
|
1271
|
-
var parent = control.parent;
|
|
1272
|
-
var valueStart = parent.get('dateStart').value;
|
|
1273
|
-
var valueEnd = parent.get('dateEnd').value;
|
|
1274
|
-
var dateStart;
|
|
1275
|
-
var dateEnd;
|
|
1276
|
-
if (valueStart) {
|
|
1277
|
-
dateStart = new Date(valueStart);
|
|
1278
|
-
}
|
|
1279
|
-
if (valueEnd) {
|
|
1280
|
-
dateEnd = new Date(valueEnd);
|
|
1281
|
-
}
|
|
1282
|
-
if (!dateEnd || !dateStart)
|
|
1283
|
-
return null;
|
|
1284
|
-
if (dateEnd < dateStart) {
|
|
1285
|
-
return {
|
|
1286
|
-
dateEndMustBeGreaterThanStart: true
|
|
1287
|
-
};
|
|
1288
|
-
}
|
|
1289
|
-
return null;
|
|
1290
|
-
};
|
|
1291
|
-
return CustomDatesEndValidator;
|
|
1292
|
-
}());
|
|
1293
|
-
var UnlockRegisterBuyerValidator = /** @class */ (function () {
|
|
1294
|
-
function UnlockRegisterBuyerValidator() {
|
|
1295
|
-
}
|
|
1296
|
-
UnlockRegisterBuyerValidator.do = function (control) {
|
|
1297
|
-
if (!control.parent || !control)
|
|
1298
|
-
return null;
|
|
1299
|
-
if (control && control.value !== '#MONKEYBUYER') {
|
|
1300
|
-
return {
|
|
1301
|
-
invalidUnlockRegister: true
|
|
1302
|
-
};
|
|
1303
|
-
}
|
|
1304
|
-
return null;
|
|
1305
|
-
};
|
|
1306
|
-
return UnlockRegisterBuyerValidator;
|
|
1307
|
-
}());
|
|
1308
|
-
var UnlockRegisterSponsorValidator = /** @class */ (function () {
|
|
1309
|
-
function UnlockRegisterSponsorValidator() {
|
|
1310
|
-
}
|
|
1311
|
-
UnlockRegisterSponsorValidator.do = function (control) {
|
|
1312
|
-
if (!control.parent || !control)
|
|
1313
|
-
return null;
|
|
1314
|
-
if (control && control.value !== '#MONKEYSPONSOR') {
|
|
1315
|
-
return {
|
|
1316
|
-
invalidUnlockRegister: true
|
|
1317
|
-
};
|
|
1318
|
-
}
|
|
1319
|
-
return null;
|
|
1320
|
-
};
|
|
1321
|
-
return UnlockRegisterSponsorValidator;
|
|
1322
|
-
}());
|
|
1323
|
-
var DateRangeValidator = /** @class */ (function () {
|
|
1324
|
-
function DateRangeValidator() {
|
|
1325
|
-
}
|
|
1326
|
-
DateRangeValidator.do = function (control) {
|
|
1327
|
-
if (!control.parent || !control) {
|
|
1328
|
-
return null;
|
|
1329
|
-
}
|
|
1330
|
-
var dates = control.parent.get('dates').value;
|
|
1331
|
-
if (dates &&
|
|
1332
|
-
(!MonkeyEcxUtils.persistNullEmptyUndefined(dates.startDate) ||
|
|
1333
|
-
!MonkeyEcxUtils.persistNullEmptyUndefined(dates.endDate))) {
|
|
1334
|
-
return {
|
|
1335
|
-
invalidDateRange: true
|
|
1336
|
-
};
|
|
1337
|
-
}
|
|
1338
|
-
return null;
|
|
1339
|
-
};
|
|
1340
|
-
return DateRangeValidator;
|
|
1341
|
-
}());
|
|
1342
|
-
|
|
1343
|
-
var validateUtils = /*#__PURE__*/Object.freeze({
|
|
1344
|
-
__proto__: null,
|
|
1345
|
-
DateValidator: DateValidator,
|
|
1346
|
-
DocumentValidator: DocumentValidator,
|
|
1347
|
-
DocumentRutValidator: DocumentRutValidator,
|
|
1348
|
-
ZipCodeValidator: ZipCodeValidator,
|
|
1349
|
-
ComboValidator: ComboValidator,
|
|
1350
|
-
isTrueValidator: isTrueValidator,
|
|
1351
|
-
PasswordMatchValidation: PasswordMatchValidation,
|
|
1352
|
-
UrlValidator: UrlValidator,
|
|
1353
|
-
CustomDatesStartValidator: CustomDatesStartValidator,
|
|
1354
|
-
CustomDatesEndValidator: CustomDatesEndValidator,
|
|
1355
|
-
UnlockRegisterBuyerValidator: UnlockRegisterBuyerValidator,
|
|
1356
|
-
UnlockRegisterSponsorValidator: UnlockRegisterSponsorValidator,
|
|
1357
|
-
DateRangeValidator: DateRangeValidator
|
|
1358
|
-
});
|
|
1359
|
-
|
|
1360
|
-
/* eslint-disable no-unused-vars */
|
|
1361
|
-
/* eslint-disable no-shadow */
|
|
1362
|
-
var MonkeyEcxQueueEvents;
|
|
1363
|
-
(function (MonkeyEcxQueueEvents) {
|
|
1364
|
-
MonkeyEcxQueueEvents[MonkeyEcxQueueEvents["OnGoing"] = 0] = "OnGoing";
|
|
1365
|
-
MonkeyEcxQueueEvents[MonkeyEcxQueueEvents["Finished"] = 1] = "Finished";
|
|
1366
|
-
MonkeyEcxQueueEvents[MonkeyEcxQueueEvents["FinishedWithError"] = 2] = "FinishedWithError";
|
|
1367
|
-
})(MonkeyEcxQueueEvents || (MonkeyEcxQueueEvents = {}));
|
|
1368
|
-
var MonkeyEcxDownloadEvents;
|
|
1369
|
-
(function (MonkeyEcxDownloadEvents) {
|
|
1370
|
-
MonkeyEcxDownloadEvents[MonkeyEcxDownloadEvents["OnGoing"] = 0] = "OnGoing";
|
|
1371
|
-
MonkeyEcxDownloadEvents[MonkeyEcxDownloadEvents["Finished"] = 1] = "Finished";
|
|
1372
|
-
MonkeyEcxDownloadEvents[MonkeyEcxDownloadEvents["FinishedWithError"] = 2] = "FinishedWithError";
|
|
1373
|
-
})(MonkeyEcxDownloadEvents || (MonkeyEcxDownloadEvents = {}));
|
|
1374
|
-
var MonkeyEcxUploadEvents;
|
|
1375
|
-
(function (MonkeyEcxUploadEvents) {
|
|
1376
|
-
MonkeyEcxUploadEvents[MonkeyEcxUploadEvents["OnGoing"] = 0] = "OnGoing";
|
|
1377
|
-
MonkeyEcxUploadEvents[MonkeyEcxUploadEvents["Finished"] = 1] = "Finished";
|
|
1378
|
-
MonkeyEcxUploadEvents[MonkeyEcxUploadEvents["FinishedWithError"] = 2] = "FinishedWithError";
|
|
1379
|
-
})(MonkeyEcxUploadEvents || (MonkeyEcxUploadEvents = {}));
|
|
1380
|
-
// TODO pegar do json de config
|
|
1381
|
-
var ApiEndPointsTokenNotMandatory;
|
|
1382
|
-
(function (ApiEndPointsTokenNotMandatory) {
|
|
1383
|
-
ApiEndPointsTokenNotMandatory["Assets"] = "assets/";
|
|
1384
|
-
ApiEndPointsTokenNotMandatory["MonkeyEcx"] = "/monkeyecx";
|
|
1385
|
-
ApiEndPointsTokenNotMandatory["ViaCep"] = "viacep.com.br/";
|
|
1386
|
-
})(ApiEndPointsTokenNotMandatory || (ApiEndPointsTokenNotMandatory = {}));
|
|
1387
|
-
// TODO pegar do json de config
|
|
1388
|
-
var ApiEndPointsHeaderNotMandatory;
|
|
1389
|
-
(function (ApiEndPointsHeaderNotMandatory) {
|
|
1390
|
-
ApiEndPointsHeaderNotMandatory["Assets"] = "/assets";
|
|
1391
|
-
ApiEndPointsHeaderNotMandatory["PayablesUpload"] = "payables-upload";
|
|
1392
|
-
ApiEndPointsHeaderNotMandatory["PictureUser"] = "/user-pictures";
|
|
1393
|
-
ApiEndPointsHeaderNotMandatory["Documents"] = "documents/";
|
|
1394
|
-
ApiEndPointsHeaderNotMandatory["BuyerTaxFile"] = "/buyer-tax-file";
|
|
1395
|
-
ApiEndPointsHeaderNotMandatory["ViaCep"] = "viacep.com.br/";
|
|
1396
|
-
})(ApiEndPointsHeaderNotMandatory || (ApiEndPointsHeaderNotMandatory = {}));
|
|
1397
|
-
|
|
1398
|
-
var statics = /*#__PURE__*/Object.freeze({
|
|
1399
|
-
__proto__: null,
|
|
1400
|
-
get MonkeyEcxQueueEvents () { return MonkeyEcxQueueEvents; },
|
|
1401
|
-
get MonkeyEcxDownloadEvents () { return MonkeyEcxDownloadEvents; },
|
|
1402
|
-
get MonkeyEcxUploadEvents () { return MonkeyEcxUploadEvents; },
|
|
1403
|
-
get ApiEndPointsTokenNotMandatory () { return ApiEndPointsTokenNotMandatory; },
|
|
1404
|
-
get ApiEndPointsHeaderNotMandatory () { return ApiEndPointsHeaderNotMandatory; }
|
|
1405
|
-
});
|
|
1406
|
-
|
|
1407
|
-
function buildQueuePropertys(queue) {
|
|
1408
|
-
var params = {
|
|
1409
|
-
item: Object.assign(Object.assign({}, queue), { id: MonkeyEcxUtils.getRandomString(40) }),
|
|
1410
|
-
status: MonkeyEcxQueueEvents.OnGoing
|
|
1411
|
-
};
|
|
1412
|
-
return params;
|
|
1413
|
-
}
|
|
1414
|
-
function buildDownloadPropertys(name, description, size) {
|
|
1415
|
-
var params = {
|
|
1416
|
-
item: {
|
|
1417
|
-
name: name,
|
|
1418
|
-
description: description,
|
|
1419
|
-
id: "" + MonkeyEcxUtils.getRandomString(40),
|
|
1420
|
-
size: size,
|
|
1421
|
-
createdAt: new Date()
|
|
1422
|
-
},
|
|
1423
|
-
status: MonkeyEcxQueueEvents.OnGoing
|
|
1424
|
-
};
|
|
1425
|
-
return params;
|
|
1426
|
-
}
|
|
1427
|
-
function buildUploadPropertys(name, description) {
|
|
1428
|
-
var params = {
|
|
1429
|
-
item: {
|
|
1430
|
-
name: name,
|
|
1431
|
-
description: description,
|
|
1432
|
-
id: "" + MonkeyEcxUtils.getRandomString(40)
|
|
1433
|
-
},
|
|
1434
|
-
status: MonkeyEcxUploadEvents.OnGoing
|
|
1435
|
-
};
|
|
1436
|
-
return params;
|
|
1437
|
-
}
|
|
1438
|
-
function hasMonkeyEcxServiceAndHandlingProperties(context) {
|
|
1439
|
-
return Object.prototype.hasOwnProperty.call(context, 'monkeyecxService');
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
var decoratorsUtils = /*#__PURE__*/Object.freeze({
|
|
1443
|
-
__proto__: null,
|
|
1444
|
-
buildQueuePropertys: buildQueuePropertys,
|
|
1445
|
-
buildDownloadPropertys: buildDownloadPropertys,
|
|
1446
|
-
buildUploadPropertys: buildUploadPropertys,
|
|
1447
|
-
hasMonkeyEcxServiceAndHandlingProperties: hasMonkeyEcxServiceAndHandlingProperties
|
|
1448
|
-
});
|
|
1449
|
-
|
|
1450
|
-
var moment = moment___namespace;
|
|
1451
|
-
var EMAIL_REGEXP = /^[\w-.]+@([\w-]+\.)+[\w-]{1,64}$/;
|
|
1452
|
-
function isEmptyInputValue(value) {
|
|
1453
|
-
return value == null || value.length === 0;
|
|
1454
|
-
}
|
|
1455
|
-
function emailValidator(control) {
|
|
1456
|
-
if (!control.parent || !control || isEmptyInputValue(control.value)) {
|
|
1457
|
-
return null;
|
|
1458
|
-
}
|
|
1459
|
-
var test = EMAIL_REGEXP.test(control.value);
|
|
1460
|
-
if (test)
|
|
1461
|
-
return null;
|
|
1462
|
-
return {
|
|
1463
|
-
email: true
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
function dateRangeValidator(control) {
|
|
1467
|
-
if (!control.parent || !control || isEmptyInputValue(control.value)) {
|
|
1468
|
-
return null;
|
|
1469
|
-
}
|
|
1470
|
-
var dates = control.parent.get('dates').value;
|
|
1471
|
-
if (dates &&
|
|
1472
|
-
(!MonkeyEcxUtils.persistNullEmptyUndefined(dates === null || dates === void 0 ? void 0 : dates.startDate) ||
|
|
1473
|
-
!MonkeyEcxUtils.persistNullEmptyUndefined(dates === null || dates === void 0 ? void 0 : dates.endDate))) {
|
|
1474
|
-
return {
|
|
1475
|
-
dateRange: true
|
|
1476
|
-
};
|
|
1477
|
-
}
|
|
1478
|
-
return null;
|
|
1479
|
-
}
|
|
1480
|
-
function registerValidator(control, type) {
|
|
1481
|
-
if (!control.parent || !control || isEmptyInputValue(control.value)) {
|
|
1482
|
-
return null;
|
|
1483
|
-
}
|
|
1484
|
-
if (control && control.value !== ("#MONKEY" + type).toUpperCase()) {
|
|
1485
|
-
return {
|
|
1486
|
-
invalidUnlockRegister: true
|
|
1487
|
-
};
|
|
1488
|
-
}
|
|
1489
|
-
return null;
|
|
1490
|
-
}
|
|
1491
|
-
function dateStartEndValidator(control) {
|
|
1492
|
-
if (!control.parent || !control) {
|
|
1493
|
-
return null;
|
|
1494
|
-
}
|
|
1495
|
-
var parent = control.parent;
|
|
1496
|
-
var valueStart = parent.get('dateStart').value;
|
|
1497
|
-
var valueEnd = parent.get('dateEnd').value;
|
|
1498
|
-
var dateStart;
|
|
1499
|
-
var dateEnd;
|
|
1500
|
-
if (valueStart) {
|
|
1501
|
-
dateStart = new Date(valueStart);
|
|
1502
|
-
}
|
|
1503
|
-
if (valueEnd) {
|
|
1504
|
-
dateEnd = new Date(valueEnd);
|
|
1505
|
-
}
|
|
1506
|
-
if (!dateEnd || !dateStart)
|
|
1507
|
-
return null;
|
|
1508
|
-
if (dateStart > dateEnd) {
|
|
1509
|
-
return {
|
|
1510
|
-
dateStartMustBeLessThanAnd: true
|
|
1511
|
-
};
|
|
1512
|
-
}
|
|
1513
|
-
return null;
|
|
1514
|
-
}
|
|
1515
|
-
function urlValidator(control) {
|
|
1516
|
-
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1517
|
-
return null;
|
|
1518
|
-
if (!MonkeyEcxUtils.isValidUrl(control.value)) {
|
|
1519
|
-
return {
|
|
1520
|
-
url: true
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
return null;
|
|
1524
|
-
}
|
|
1525
|
-
function passwordConfirmValidator(control) {
|
|
1526
|
-
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1527
|
-
return null;
|
|
1528
|
-
var parent = control.parent;
|
|
1529
|
-
var password = parent.get('password').value;
|
|
1530
|
-
var passwordConfirm = parent.get('passwordConfirm').value;
|
|
1531
|
-
if (!password || !passwordConfirm)
|
|
1532
|
-
return null;
|
|
1533
|
-
if (password === passwordConfirm)
|
|
1534
|
-
return null;
|
|
1535
|
-
return {
|
|
1536
|
-
passwordsNotMatching: true
|
|
1537
|
-
};
|
|
1538
|
-
}
|
|
1539
|
-
function trueValidator(control) {
|
|
1540
|
-
if (!control.parent || !control)
|
|
1541
|
-
return null;
|
|
1542
|
-
if (control && control.value !== false)
|
|
1543
|
-
return null;
|
|
1544
|
-
return {
|
|
1545
|
-
invalidTrue: true
|
|
1546
|
-
};
|
|
1547
|
-
}
|
|
1548
|
-
function comboValidator(control) {
|
|
1549
|
-
if (!control.parent || !control)
|
|
1550
|
-
return null;
|
|
1551
|
-
if (control && control.value !== '0')
|
|
1552
|
-
return null;
|
|
1553
|
-
return {
|
|
1554
|
-
invalidCombo: true
|
|
1555
|
-
};
|
|
1556
|
-
}
|
|
1557
|
-
function zipCodeValidator(control) {
|
|
1558
|
-
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1559
|
-
return null;
|
|
1560
|
-
if (control && control.value) {
|
|
1561
|
-
if (!MonkeyEcxUtils.isValidZipCode(control.value)) {
|
|
1562
|
-
return {
|
|
1563
|
-
invalidZipCode: true
|
|
1564
|
-
};
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
return null;
|
|
1568
|
-
}
|
|
1569
|
-
function documentValidator(control, country) {
|
|
1570
|
-
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1571
|
-
return null;
|
|
1572
|
-
if (country === 'BR') {
|
|
1573
|
-
if (!MonkeyEcxUtils.isCPFCNPJValid(control.value)) {
|
|
1574
|
-
return {
|
|
1575
|
-
invalidCpfCnpj: true
|
|
1576
|
-
};
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
else if (country === 'CL') {
|
|
1580
|
-
if (!MonkeyEcxUtils.isValidRUT(control.value)) {
|
|
1581
|
-
return {
|
|
1582
|
-
invalidCpfCnpj: true
|
|
1583
|
-
};
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
return null;
|
|
1587
|
-
}
|
|
1588
|
-
function dateValidator(control) {
|
|
1589
|
-
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1590
|
-
return null;
|
|
1591
|
-
var dateFormat = 'MM-DD-YYYY';
|
|
1592
|
-
if (!moment(moment(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true).isValid()) {
|
|
1593
|
-
return {
|
|
1594
|
-
invalidDate: true
|
|
1595
|
-
};
|
|
1596
|
-
}
|
|
1597
|
-
return null;
|
|
1598
|
-
}
|
|
1599
|
-
var Validators = /** @class */ (function () {
|
|
1600
|
-
function Validators() {
|
|
1601
|
-
}
|
|
1602
|
-
Validators.email = function (control) {
|
|
1603
|
-
return emailValidator(control);
|
|
1604
|
-
};
|
|
1605
|
-
Validators.dateRange = function (control) {
|
|
1606
|
-
return dateRangeValidator(control);
|
|
1607
|
-
};
|
|
1608
|
-
Validators.unlockSponsorRegister = function (control) {
|
|
1609
|
-
return registerValidator(control, 'sponsor');
|
|
1610
|
-
};
|
|
1611
|
-
Validators.unlockBuyerRegister = function (control) {
|
|
1612
|
-
return registerValidator(control, 'buyer');
|
|
1613
|
-
};
|
|
1614
|
-
Validators.dateStartEnd = function (control) {
|
|
1615
|
-
return dateStartEndValidator(control);
|
|
1616
|
-
};
|
|
1617
|
-
Validators.url = function (control) {
|
|
1618
|
-
return urlValidator(control);
|
|
1619
|
-
};
|
|
1620
|
-
Validators.passwordConfirm = function (control) {
|
|
1621
|
-
return passwordConfirmValidator(control);
|
|
1622
|
-
};
|
|
1623
|
-
Validators.true = function (control) {
|
|
1624
|
-
return trueValidator(control);
|
|
1625
|
-
};
|
|
1626
|
-
Validators.combo = function (control) {
|
|
1627
|
-
return comboValidator(control);
|
|
1628
|
-
};
|
|
1629
|
-
Validators.zipCode = function (control) {
|
|
1630
|
-
return zipCodeValidator(control);
|
|
1631
|
-
};
|
|
1632
|
-
Validators.documentBR = function (control) {
|
|
1633
|
-
return documentValidator(control, 'BR');
|
|
1634
|
-
};
|
|
1635
|
-
Validators.documentCL = function (control) {
|
|
1636
|
-
return documentValidator(control, 'CL');
|
|
1637
|
-
};
|
|
1638
|
-
Validators.date = function (control) {
|
|
1639
|
-
return dateValidator(control);
|
|
1640
|
-
};
|
|
1641
|
-
return Validators;
|
|
1642
|
-
}());
|
|
1643
|
-
|
|
1644
|
-
/* eslint-disable object-curly-newline */
|
|
1645
|
-
|
|
1646
|
-
function MonkeyEcxCoreServiceConstructor() {
|
|
1647
|
-
return function (target) {
|
|
1648
|
-
Object.entries(target.prototype).forEach(function (_a) {
|
|
1649
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
1650
|
-
var method = target.prototype[key];
|
|
1651
|
-
if (key !== 'constructor') {
|
|
1652
|
-
target.prototype[key] = function () {
|
|
1653
|
-
var args = [];
|
|
1654
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1655
|
-
args[_i] = arguments[_i];
|
|
1656
|
-
}
|
|
1657
|
-
var context = this;
|
|
1658
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1659
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1660
|
-
}
|
|
1661
|
-
var result = method.apply(context, args);
|
|
1662
|
-
return result;
|
|
1663
|
-
};
|
|
1664
|
-
}
|
|
1665
|
-
});
|
|
1666
|
-
return target;
|
|
1667
|
-
};
|
|
1668
|
-
}
|
|
1669
|
-
function MonkeyEcxCoreLog(tp) {
|
|
1670
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1671
|
-
var method = propertyDescriptor.value;
|
|
1672
|
-
propertyDescriptor.value = function () {
|
|
1673
|
-
var args = [];
|
|
1674
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1675
|
-
args[_i] = arguments[_i];
|
|
1676
|
-
}
|
|
1677
|
-
var params = args
|
|
1678
|
-
.map(function (a) {
|
|
1679
|
-
return JSON.stringify(a);
|
|
1680
|
-
})
|
|
1681
|
-
.join();
|
|
1682
|
-
var result = method.apply(this, args);
|
|
1683
|
-
var r = JSON.stringify(result);
|
|
1684
|
-
console.log("Call: " + propertyName + "(" + params + ") => " + r);
|
|
1685
|
-
return result;
|
|
1686
|
-
};
|
|
1687
|
-
return propertyDescriptor;
|
|
1688
|
-
};
|
|
1689
|
-
}
|
|
1690
|
-
function MonkeyEcxCoreClearDecorators() {
|
|
1691
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1692
|
-
var method = propertyDescriptor.value;
|
|
1693
|
-
propertyDescriptor.value = function () {
|
|
1694
|
-
var args = [];
|
|
1695
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1696
|
-
args[_i] = arguments[_i];
|
|
1697
|
-
}
|
|
1698
|
-
var context = this;
|
|
1699
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1700
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1701
|
-
}
|
|
1702
|
-
var result = method.apply(context, args);
|
|
1703
|
-
return result;
|
|
1704
|
-
};
|
|
1705
|
-
return propertyDescriptor;
|
|
1706
|
-
};
|
|
1707
|
-
}
|
|
1708
|
-
function MonkeyEcxCoreService(params) {
|
|
1709
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1710
|
-
var method = propertyDescriptor.value;
|
|
1711
|
-
propertyDescriptor.value = function () {
|
|
1712
|
-
var args = [];
|
|
1713
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1714
|
-
args[_i] = arguments[_i];
|
|
1715
|
-
}
|
|
1716
|
-
var context = this;
|
|
1717
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1718
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1719
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxServiceCredentials(params);
|
|
1720
|
-
}
|
|
1721
|
-
var result = method.apply(context, args);
|
|
1722
|
-
return result;
|
|
1723
|
-
};
|
|
1724
|
-
return propertyDescriptor;
|
|
1725
|
-
};
|
|
1726
|
-
}
|
|
1727
|
-
function MonkeyEcxCoreServicePaged(params) {
|
|
1728
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1729
|
-
var method = propertyDescriptor.value;
|
|
1730
|
-
propertyDescriptor.value = function () {
|
|
1731
|
-
var args = [];
|
|
1732
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1733
|
-
args[_i] = arguments[_i];
|
|
1734
|
-
}
|
|
1735
|
-
var context = this;
|
|
1736
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1737
|
-
var credentials = context.monkeyecxService.monkeyecxHandlingService.getMonkeyEcxServiceCredentials();
|
|
1738
|
-
var requestPaged = null;
|
|
1739
|
-
if (credentials) {
|
|
1740
|
-
requestPaged = credentials.requestPaged;
|
|
1741
|
-
}
|
|
1742
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1743
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxServiceCredentials(Object.assign(Object.assign({}, params), (requestPaged || null)));
|
|
1744
|
-
}
|
|
1745
|
-
var result = method.apply(context, args);
|
|
1746
|
-
return result;
|
|
1747
|
-
};
|
|
1748
|
-
return propertyDescriptor;
|
|
1749
|
-
};
|
|
1750
|
-
}
|
|
1751
|
-
function MonkeyEcxCoreServiceQueue(name, description, params) {
|
|
1752
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1753
|
-
var method = propertyDescriptor.value;
|
|
1754
|
-
propertyDescriptor.value = function () {
|
|
1755
|
-
var args = [];
|
|
1756
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1757
|
-
args[_i] = arguments[_i];
|
|
1758
|
-
}
|
|
1759
|
-
var context = this;
|
|
1760
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1761
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(params)) {
|
|
1762
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1763
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxServiceCredentials(params);
|
|
1764
|
-
}
|
|
1765
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxRequestQueue(buildQueuePropertys({
|
|
1766
|
-
name: name,
|
|
1767
|
-
description: description
|
|
1768
|
-
}));
|
|
1769
|
-
}
|
|
1770
|
-
var result = method.apply(context, args);
|
|
1771
|
-
return result;
|
|
1772
|
-
};
|
|
1773
|
-
return propertyDescriptor;
|
|
1774
|
-
};
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
/* eslint-disable space-before-function-paren */
|
|
1778
|
-
function MonkeyEcxServiceDownload(name, description, params) {
|
|
1779
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1780
|
-
var method = propertyDescriptor.value;
|
|
1781
|
-
propertyDescriptor.value = function () {
|
|
1782
|
-
var args = [];
|
|
1783
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1784
|
-
args[_i] = arguments[_i];
|
|
1785
|
-
}
|
|
1786
|
-
var context = this;
|
|
1787
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1788
|
-
if (i1.MonkeyUtils.persistNullEmptyUndefined(params)) {
|
|
1789
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1790
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxServiceCredentials(params);
|
|
1791
|
-
}
|
|
1792
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxRequestDownload(Object.assign({}, buildDownloadPropertys(name, description)));
|
|
1793
|
-
}
|
|
1794
|
-
var result = method.apply(context, args);
|
|
1795
|
-
return result;
|
|
1796
|
-
};
|
|
1797
|
-
return propertyDescriptor;
|
|
1798
|
-
};
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
/* eslint-disable space-before-function-paren */
|
|
1802
|
-
function MonkeyEcxServiceUpload(name, description, params) {
|
|
1803
|
-
return function (target, propertyName, propertyDescriptor) {
|
|
1804
|
-
var method = propertyDescriptor.value;
|
|
1805
|
-
propertyDescriptor.value = function () {
|
|
1806
|
-
var args = [];
|
|
1807
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1808
|
-
args[_i] = arguments[_i];
|
|
1809
|
-
}
|
|
1810
|
-
var context = this;
|
|
1811
|
-
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1812
|
-
if (i1.MonkeyUtils.persistNullEmptyUndefined(params)) {
|
|
1813
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
1814
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxServiceCredentials(params);
|
|
1815
|
-
}
|
|
1816
|
-
context.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxRequestUpload(Object.assign({}, buildUploadPropertys(name, description)));
|
|
1817
|
-
}
|
|
1818
|
-
var result = method.apply(context, args);
|
|
1819
|
-
return result;
|
|
1820
|
-
};
|
|
1821
|
-
return propertyDescriptor;
|
|
1822
|
-
};
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
var MonkeyEcxDragDropDirective = /** @class */ (function () {
|
|
1826
|
-
function MonkeyEcxDragDropDirective() {
|
|
1827
|
-
this.onFileDropped = new i0.EventEmitter();
|
|
1828
|
-
this.background = '#f5fcff';
|
|
1829
|
-
this.opacity = '1';
|
|
1830
|
-
}
|
|
1831
|
-
MonkeyEcxDragDropDirective.prototype.onDragOver = function (evt) {
|
|
1832
|
-
evt.preventDefault();
|
|
1833
|
-
evt.stopPropagation();
|
|
1834
|
-
this.background = '#9ecbec';
|
|
1835
|
-
this.opacity = '0.8';
|
|
1836
|
-
};
|
|
1837
|
-
MonkeyEcxDragDropDirective.prototype.onDragLeave = function (evt) {
|
|
1838
|
-
evt.preventDefault();
|
|
1839
|
-
evt.stopPropagation();
|
|
1840
|
-
this.background = '#f5fcff';
|
|
1841
|
-
this.opacity = '1';
|
|
1842
|
-
};
|
|
1843
|
-
MonkeyEcxDragDropDirective.prototype.ondrop = function (evt) {
|
|
1844
|
-
evt.preventDefault();
|
|
1845
|
-
evt.stopPropagation();
|
|
1846
|
-
this.background = '#f5fcff';
|
|
1847
|
-
this.opacity = '1';
|
|
1848
|
-
var files = evt.dataTransfer.files;
|
|
1849
|
-
if (files.length > 0) {
|
|
1850
|
-
this.onFileDropped.emit(files);
|
|
1851
|
-
}
|
|
1852
|
-
};
|
|
1853
|
-
return MonkeyEcxDragDropDirective;
|
|
1854
|
-
}());
|
|
1855
|
-
MonkeyEcxDragDropDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDragDropDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1856
|
-
MonkeyEcxDragDropDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxDragDropDirective, selector: "[monkeyecxDragDrop]", outputs: { onFileDropped: "onFileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "style.background-color": "this.background", "style.opacity": "this.opacity" } }, ngImport: i0__namespace });
|
|
1857
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDragDropDirective, decorators: [{
|
|
1858
|
-
type: i0.Directive,
|
|
1859
|
-
args: [{
|
|
1860
|
-
selector: '[monkeyecxDragDrop]'
|
|
1861
|
-
}]
|
|
1862
|
-
}], propDecorators: { onFileDropped: [{
|
|
1863
|
-
type: i0.Output
|
|
1864
|
-
}], background: [{
|
|
1865
|
-
type: i0.HostBinding,
|
|
1866
|
-
args: ['style.background-color']
|
|
1867
|
-
}], opacity: [{
|
|
1868
|
-
type: i0.HostBinding,
|
|
1869
|
-
args: ['style.opacity']
|
|
1870
|
-
}], onDragOver: [{
|
|
1871
|
-
type: i0.HostListener,
|
|
1872
|
-
args: ['dragover', ['$event']]
|
|
1873
|
-
}], onDragLeave: [{
|
|
1874
|
-
type: i0.HostListener,
|
|
1875
|
-
args: ['dragleave', ['$event']]
|
|
1876
|
-
}], ondrop: [{
|
|
1877
|
-
type: i0.HostListener,
|
|
1878
|
-
args: ['drop', ['$event']]
|
|
1879
|
-
}] } });
|
|
1880
|
-
|
|
1881
|
-
var MonkeyEcxFormatCurrency = /** @class */ (function () {
|
|
1882
|
-
function MonkeyEcxFormatCurrency(elementRef, injector) {
|
|
1883
|
-
var _this = this;
|
|
1884
|
-
this.elementRef = elementRef;
|
|
1885
|
-
this.injector = injector;
|
|
1886
|
-
this.currencyCode = 'BRL';
|
|
1887
|
-
this.currentLocale = 'pt-BR';
|
|
1888
|
-
this.el = this.elementRef.nativeElement;
|
|
1889
|
-
this.currency = this.injector.get(i1$2.CurrencyPipe);
|
|
1890
|
-
var translateService = this.injector.get(i1$1.TranslateService);
|
|
1891
|
-
translateService.get('MONKEY-CURRENCY-CODE').subscribe(function (_) {
|
|
1892
|
-
_this.currencyCode = _;
|
|
1893
|
-
_this.currentLocale = translateService.getDefaultLang();
|
|
1894
|
-
});
|
|
1895
|
-
}
|
|
1896
|
-
MonkeyEcxFormatCurrency.prototype.handle = function (value) {
|
|
1897
|
-
var _a = this, currencyCode = _a.currencyCode, currentLocale = _a.currentLocale;
|
|
1898
|
-
var newValue = MonkeyEcxUtils.handleOnlyNumbers(value);
|
|
1899
|
-
return this.currency.transform(newValue / 100, currencyCode, 'symbol', '', currentLocale);
|
|
1900
|
-
};
|
|
1901
|
-
MonkeyEcxFormatCurrency.prototype.ngOnInit = function () {
|
|
1902
|
-
this.el.value = this.handle(this.el.value);
|
|
1903
|
-
};
|
|
1904
|
-
MonkeyEcxFormatCurrency.prototype.onInput = function (value) {
|
|
1905
|
-
this.el.value = this.handle(value);
|
|
1906
|
-
};
|
|
1907
|
-
return MonkeyEcxFormatCurrency;
|
|
1908
|
-
}());
|
|
1909
|
-
MonkeyEcxFormatCurrency.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatCurrency, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1910
|
-
MonkeyEcxFormatCurrency.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxFormatCurrency, selector: "[monkeyecxFormatCurrency]", host: { listeners: { "input": "onInput($event.target.value)" } }, providers: [i1$2.CurrencyPipe], ngImport: i0__namespace });
|
|
1911
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatCurrency, decorators: [{
|
|
1912
|
-
type: i0.Directive,
|
|
1913
|
-
args: [{
|
|
1914
|
-
selector: '[monkeyecxFormatCurrency]',
|
|
1915
|
-
providers: [i1$2.CurrencyPipe]
|
|
1916
|
-
}]
|
|
1917
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Injector }]; }, propDecorators: { onInput: [{
|
|
1918
|
-
type: i0.HostListener,
|
|
1919
|
-
args: ['input', ['$event.target.value']]
|
|
1920
|
-
}] } });
|
|
1921
|
-
|
|
1922
|
-
var MonkeyEcxFormatUpper = /** @class */ (function () {
|
|
1923
|
-
function MonkeyEcxFormatUpper(_el, _renderer) {
|
|
1924
|
-
this._el = _el;
|
|
1925
|
-
this._renderer = _renderer;
|
|
1926
|
-
// not to do
|
|
1927
|
-
}
|
|
1928
|
-
MonkeyEcxFormatUpper.prototype.onKeyDown = function (evt) {
|
|
1929
|
-
var value = this._el.nativeElement.value.toUpperCase();
|
|
1930
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', value);
|
|
1931
|
-
this._onChange(value);
|
|
1932
|
-
evt.preventDefault();
|
|
1933
|
-
};
|
|
1934
|
-
MonkeyEcxFormatUpper.prototype.onBlur = function () {
|
|
1935
|
-
this._touched();
|
|
1936
|
-
};
|
|
1937
|
-
MonkeyEcxFormatUpper.prototype.writeValue = function (value) {
|
|
1938
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', value);
|
|
1939
|
-
};
|
|
1940
|
-
MonkeyEcxFormatUpper.prototype.registerOnChange = function (fn) {
|
|
1941
|
-
this._onChange = fn;
|
|
1942
|
-
};
|
|
1943
|
-
MonkeyEcxFormatUpper.prototype.registerOnTouched = function (fn) {
|
|
1944
|
-
this._touched = fn;
|
|
1945
|
-
};
|
|
1946
|
-
MonkeyEcxFormatUpper.prototype.setDisabledState = function (isDisabled) {
|
|
1947
|
-
this._renderer.setProperty(this._el.nativeElement, 'disabled', isDisabled);
|
|
1948
|
-
};
|
|
1949
|
-
return MonkeyEcxFormatUpper;
|
|
1950
|
-
}());
|
|
1951
|
-
MonkeyEcxFormatUpper.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatUpper, deps: [{ token: i0__namespace.ElementRef, self: true }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1952
|
-
MonkeyEcxFormatUpper.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxFormatUpper, selector: "[monkeyecxFormatUpper]", host: { listeners: { "keyup": "onKeyDown($event)", "blur": "onBlur($event)" } }, providers: [
|
|
1953
|
-
{
|
|
1954
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
1955
|
-
useExisting: i0.forwardRef(function () {
|
|
1956
|
-
// eslint-disable-next-line no-use-before-define
|
|
1957
|
-
return MonkeyEcxFormatUpper;
|
|
1958
|
-
}),
|
|
1959
|
-
multi: true
|
|
1960
|
-
}
|
|
1961
|
-
], ngImport: i0__namespace });
|
|
1962
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFormatUpper, decorators: [{
|
|
1963
|
-
type: i0.Directive,
|
|
1964
|
-
args: [{
|
|
1965
|
-
selector: '[monkeyecxFormatUpper]',
|
|
1966
|
-
providers: [
|
|
1967
|
-
{
|
|
1968
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
1969
|
-
useExisting: i0.forwardRef(function () {
|
|
1970
|
-
// eslint-disable-next-line no-use-before-define
|
|
1971
|
-
return MonkeyEcxFormatUpper;
|
|
1972
|
-
}),
|
|
1973
|
-
multi: true
|
|
1974
|
-
}
|
|
1975
|
-
]
|
|
1976
|
-
}]
|
|
1977
|
-
}], ctorParameters: function () {
|
|
1978
|
-
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
1979
|
-
type: i0.Self
|
|
1980
|
-
}] }, { type: i0__namespace.Renderer2 }];
|
|
1981
|
-
}, propDecorators: { onKeyDown: [{
|
|
1982
|
-
type: i0.HostListener,
|
|
1983
|
-
args: ['keyup', ['$event']]
|
|
1984
|
-
}], onBlur: [{
|
|
1985
|
-
type: i0.HostListener,
|
|
1986
|
-
args: ['blur', ['$event']]
|
|
1987
|
-
}] } });
|
|
1988
|
-
|
|
1989
|
-
var MonkeyEcxOnlyAlphaNumericDirective = /** @class */ (function () {
|
|
1990
|
-
function MonkeyEcxOnlyAlphaNumericDirective(elementRef) {
|
|
1991
|
-
this.elementRef = elementRef;
|
|
1992
|
-
// not to do
|
|
1993
|
-
}
|
|
1994
|
-
MonkeyEcxOnlyAlphaNumericDirective.prototype.onInputChange = function (event) {
|
|
1995
|
-
var initalValue = this.elementRef.nativeElement.value;
|
|
1996
|
-
this.elementRef.nativeElement.value = MonkeyEcxUtils.handleOnlyAlphaNumeric(initalValue);
|
|
1997
|
-
if (initalValue !== this.elementRef.nativeElement.value) {
|
|
1998
|
-
event.stopPropagation();
|
|
1999
|
-
}
|
|
2000
|
-
};
|
|
2001
|
-
return MonkeyEcxOnlyAlphaNumericDirective;
|
|
2002
|
-
}());
|
|
2003
|
-
MonkeyEcxOnlyAlphaNumericDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOnlyAlphaNumericDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2004
|
-
MonkeyEcxOnlyAlphaNumericDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxOnlyAlphaNumericDirective, selector: "[monkeyecxOnlyAlphaNumeric]", host: { listeners: { "input": "onInputChange($event)" } }, ngImport: i0__namespace });
|
|
2005
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOnlyAlphaNumericDirective, decorators: [{
|
|
2006
|
-
type: i0.Directive,
|
|
2007
|
-
args: [{
|
|
2008
|
-
selector: '[monkeyecxOnlyAlphaNumeric]'
|
|
2009
|
-
}]
|
|
2010
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { onInputChange: [{
|
|
2011
|
-
type: i0.HostListener,
|
|
2012
|
-
args: ['input', ['$event']]
|
|
2013
|
-
}] } });
|
|
2014
|
-
|
|
2015
|
-
var MonkeyEcxOnlyNumbersDirective = /** @class */ (function () {
|
|
2016
|
-
function MonkeyEcxOnlyNumbersDirective(elementRef) {
|
|
2017
|
-
this.elementRef = elementRef;
|
|
2018
|
-
// not to do
|
|
2019
|
-
}
|
|
2020
|
-
MonkeyEcxOnlyNumbersDirective.prototype.onInputChange = function (event) {
|
|
2021
|
-
var initalValue = this.elementRef.nativeElement.value;
|
|
2022
|
-
this.elementRef.nativeElement.value = MonkeyEcxUtils.handleOnlyNumbers(initalValue);
|
|
2023
|
-
if (initalValue !== this.elementRef.nativeElement.value) {
|
|
2024
|
-
event.stopPropagation();
|
|
2025
|
-
}
|
|
2026
|
-
};
|
|
2027
|
-
return MonkeyEcxOnlyNumbersDirective;
|
|
2028
|
-
}());
|
|
2029
|
-
MonkeyEcxOnlyNumbersDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOnlyNumbersDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2030
|
-
MonkeyEcxOnlyNumbersDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxOnlyNumbersDirective, selector: "[monkeyecxOnlyNumbers]", host: { listeners: { "input": "onInputChange($event)" } }, ngImport: i0__namespace });
|
|
2031
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOnlyNumbersDirective, decorators: [{
|
|
2032
|
-
type: i0.Directive,
|
|
2033
|
-
args: [{
|
|
2034
|
-
selector: '[monkeyecxOnlyNumbers]'
|
|
2035
|
-
}]
|
|
2036
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { onInputChange: [{
|
|
2037
|
-
type: i0.HostListener,
|
|
2038
|
-
args: ['input', ['$event']]
|
|
2039
|
-
}] } });
|
|
2040
|
-
|
|
2041
|
-
var MonkeyEcxRequestPagedHandling = /** @class */ (function () {
|
|
2042
|
-
function MonkeyEcxRequestPagedHandling(_url, _pagedParams) {
|
|
2043
|
-
this.url = _url;
|
|
2044
|
-
this.pagedParams = _pagedParams || {
|
|
2045
|
-
page: {}
|
|
2046
|
-
};
|
|
2047
|
-
}
|
|
2048
|
-
MonkeyEcxRequestPagedHandling.prototype.handlePagedValuesFromApi = function (url) {
|
|
2049
|
-
if (url.search('\\?') < 0)
|
|
2050
|
-
return url;
|
|
2051
|
-
var params = url.substr(url.search('\\?') + 1, url.length);
|
|
2052
|
-
url = url.substr(0, url.search('\\?'));
|
|
2053
|
-
return url + "?" + new i1$4.HttpParams({
|
|
2054
|
-
fromString: params
|
|
2055
|
-
}).delete('size').delete('page').toString();
|
|
2056
|
-
};
|
|
2057
|
-
MonkeyEcxRequestPagedHandling.prototype.getUrlParams = function (url) {
|
|
2058
|
-
var pagedParams = this.pagedParams;
|
|
2059
|
-
var _a = pagedParams === null || pagedParams === void 0 ? void 0 : pagedParams.page, number = _a.number, size = _a.size;
|
|
2060
|
-
var hasInitialQueryParams = url.search('\\?') > 0;
|
|
2061
|
-
return (!hasInitialQueryParams ? '?' : '&') + "page=" + (number || 0) + "&size=" + (size || 20);
|
|
2062
|
-
};
|
|
2063
|
-
MonkeyEcxRequestPagedHandling.prototype.getRequestWithPagedParams = function () {
|
|
2064
|
-
var url = this.url;
|
|
2065
|
-
var handled = this.handlePagedValuesFromApi(url);
|
|
2066
|
-
return "" + handled + this.getUrlParams(handled);
|
|
2067
|
-
};
|
|
2068
|
-
return MonkeyEcxRequestPagedHandling;
|
|
2069
|
-
}());
|
|
2070
|
-
|
|
2071
|
-
var MonkeyEcxCommonsService = /** @class */ (function () {
|
|
2072
|
-
function MonkeyEcxCommonsService(monkeyecxService, tokenStorage, otherArgs) {
|
|
2073
|
-
this.monkeyecxService = monkeyecxService;
|
|
2074
|
-
this.tokenStorage = tokenStorage;
|
|
2075
|
-
this.otherArgs = otherArgs;
|
|
2076
|
-
this.flagValidator = true;
|
|
2077
|
-
this.__requestPaged = null;
|
|
2078
|
-
this.__onSearchChanged$ = new rxjs.BehaviorSubject(null);
|
|
2079
|
-
this.__onDataChanged$ = new rxjs.BehaviorSubject(null);
|
|
2080
|
-
this.__onLoadingInProgress$ = new rxjs.BehaviorSubject(false);
|
|
2081
|
-
this.__onDataDeleted$ = new rxjs.BehaviorSubject(null);
|
|
2082
|
-
this.__onErrorChanged$ = new rxjs.BehaviorSubject(null);
|
|
2083
|
-
this.__onGovernmentIdDataChanged$ = new rxjs.BehaviorSubject(null);
|
|
2084
|
-
this.__onZipCodeDataChanged$ = new rxjs.BehaviorSubject(null);
|
|
2085
|
-
this.__oni18nDataChanged$ = new rxjs.BehaviorSubject(null);
|
|
2086
|
-
this.__onDoSearch$ = new rxjs.BehaviorSubject(null);
|
|
2087
|
-
this.__onDoPagination$ = new rxjs.BehaviorSubject(null);
|
|
2088
|
-
this.handleInit();
|
|
2089
|
-
}
|
|
2090
|
-
MonkeyEcxCommonsService.prototype.handleInit = function () {
|
|
2091
|
-
var _this = this;
|
|
2092
|
-
var _a, _b, _c;
|
|
2093
|
-
if (this.tokenStorage) {
|
|
2094
|
-
this.__tokenCredentials = this.tokenStorage.getToken();
|
|
2095
|
-
}
|
|
2096
|
-
if ((_a = this.otherArgs) === null || _a === void 0 ? void 0 : _a.router) {
|
|
2097
|
-
var clearOnChangeRoute_1 = ((_c = (_b = this.otherArgs) === null || _b === void 0 ? void 0 : _b.schedule) === null || _c === void 0 ? void 0 : _c.options).clearOnChangeRoute;
|
|
2098
|
-
this.otherArgs.router.events
|
|
2099
|
-
.pipe(operators.filter(function (event) {
|
|
2100
|
-
return event instanceof i1$3.NavigationStart;
|
|
2101
|
-
}), operators.take(1))
|
|
2102
|
-
.subscribe(function () {
|
|
2103
|
-
var _a, _b, _c;
|
|
2104
|
-
if (_this.__schedule && clearOnChangeRoute_1) {
|
|
2105
|
-
(_c = (_b = (_a = _this.otherArgs) === null || _a === void 0 ? void 0 : _a.schedule) === null || _b === void 0 ? void 0 : _b.service) === null || _c === void 0 ? void 0 : _c.removeSchedule(_this.__schedule);
|
|
2106
|
-
_this.__schedule = null;
|
|
2107
|
-
}
|
|
2108
|
-
});
|
|
2109
|
-
}
|
|
2110
|
-
};
|
|
2111
|
-
MonkeyEcxCommonsService.prototype.getRole = function () {
|
|
2112
|
-
var __tokenCredentials = this.__tokenCredentials;
|
|
2113
|
-
if (!__tokenCredentials)
|
|
2114
|
-
return '';
|
|
2115
|
-
if ((__tokenCredentials === null || __tokenCredentials === void 0 ? void 0 : __tokenCredentials.programAdmin) === 'true') {
|
|
2116
|
-
return 'PROGRAM_ADMIN';
|
|
2117
|
-
}
|
|
2118
|
-
return (__tokenCredentials === null || __tokenCredentials === void 0 ? void 0 : __tokenCredentials.role) || '';
|
|
2119
|
-
};
|
|
2120
|
-
MonkeyEcxCommonsService.prototype.allowedSecurityAccess = function (args) {
|
|
2121
|
-
if (!args)
|
|
2122
|
-
return true;
|
|
2123
|
-
var roles = args === null || args === void 0 ? void 0 : args.roles;
|
|
2124
|
-
var byExclusion = args === null || args === void 0 ? void 0 : args.byExclusion;
|
|
2125
|
-
var found = roles === null || roles === void 0 ? void 0 : roles.indexOf(this.getRole());
|
|
2126
|
-
var ret = false;
|
|
2127
|
-
if (byExclusion) {
|
|
2128
|
-
ret = true;
|
|
2129
|
-
if (found > -1) {
|
|
2130
|
-
ret = false;
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
else {
|
|
2134
|
-
ret = false;
|
|
2135
|
-
if (found > -1) {
|
|
2136
|
-
ret = true;
|
|
2137
|
-
}
|
|
2138
|
-
}
|
|
2139
|
-
if (!roles || roles.length === 0 || this.getRole() === 'PROGRAM_ADMIN') {
|
|
2140
|
-
ret = true;
|
|
2141
|
-
}
|
|
2142
|
-
return ret;
|
|
2143
|
-
};
|
|
2144
|
-
MonkeyEcxCommonsService.prototype.navigateToErrorPage = function (statusCode, router) {
|
|
2145
|
-
var routes = {
|
|
2146
|
-
403: 'forbidden',
|
|
2147
|
-
404: 'not-found',
|
|
2148
|
-
500: 'service-problems',
|
|
2149
|
-
503: 'service-problems'
|
|
2150
|
-
};
|
|
2151
|
-
if (!router) {
|
|
2152
|
-
// eslint-disable-next-line no-console
|
|
2153
|
-
console.error('Router must be declared');
|
|
2154
|
-
}
|
|
2155
|
-
else {
|
|
2156
|
-
router.navigate([("/app/pages/" + routes[statusCode]).toLowerCase()], {
|
|
2157
|
-
skipLocationChange: true
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
};
|
|
2161
|
-
MonkeyEcxCommonsService.prototype.setPage = function (requestPaged) {
|
|
2162
|
-
this.__requestPaged = Object.assign(Object.assign({}, this.__requestPaged), requestPaged);
|
|
2163
|
-
return this;
|
|
2164
|
-
};
|
|
2165
|
-
MonkeyEcxCommonsService.prototype.nextPage = function () {
|
|
2166
|
-
if (!this.__requestPaged)
|
|
2167
|
-
return false;
|
|
2168
|
-
var page = this.__requestPaged.page;
|
|
2169
|
-
var number = page.number, totalPages = page.totalPages;
|
|
2170
|
-
if (number < totalPages) {
|
|
2171
|
-
this.__requestPaged = Object.assign(Object.assign({}, this.__requestPaged), { page: Object.assign(Object.assign({}, page), { number: number + 1 }) });
|
|
2172
|
-
return true;
|
|
2173
|
-
}
|
|
2174
|
-
return false;
|
|
2175
|
-
};
|
|
2176
|
-
MonkeyEcxCommonsService.prototype.getEmbeddedData = function (data, field) {
|
|
2177
|
-
var _embedded = data._embedded;
|
|
2178
|
-
return _embedded ? _embedded[field] : null;
|
|
2179
|
-
};
|
|
2180
|
-
MonkeyEcxCommonsService.prototype.getNormalizedUrl = function (url) {
|
|
2181
|
-
var __requestPaged = this.__requestPaged;
|
|
2182
|
-
return new MonkeyEcxRequestPagedHandling(url, __requestPaged).getRequestWithPagedParams();
|
|
2183
|
-
};
|
|
2184
|
-
MonkeyEcxCommonsService.prototype.clear = function (clearData) {
|
|
2185
|
-
var _a, _b, _c;
|
|
2186
|
-
if (clearData) {
|
|
2187
|
-
this.__data = null;
|
|
2188
|
-
this.__requestPaged = null;
|
|
2189
|
-
this.__params = null;
|
|
2190
|
-
this.__page = null;
|
|
2191
|
-
if (this.__schedule) {
|
|
2192
|
-
var queue = this.__schedule.queue;
|
|
2193
|
-
if (queue) {
|
|
2194
|
-
this.otherArgs.queue.service.removeQueueItem(queue);
|
|
2195
|
-
}
|
|
2196
|
-
(_c = (_b = (_a = this.otherArgs) === null || _a === void 0 ? void 0 : _a.schedule) === null || _b === void 0 ? void 0 : _b.service) === null || _c === void 0 ? void 0 : _c.removeSchedule(this.__schedule);
|
|
2197
|
-
this.__schedule = null;
|
|
2198
|
-
}
|
|
2199
|
-
}
|
|
2200
|
-
this.__error = null;
|
|
2201
|
-
this.__handledError = null;
|
|
2202
|
-
this.flagValidator = false;
|
|
2203
|
-
};
|
|
2204
|
-
MonkeyEcxCommonsService.prototype.resolve = function (route, state, otherArgs) {
|
|
2205
|
-
var _this = this;
|
|
2206
|
-
var _a, _b, _c;
|
|
2207
|
-
this.__data = null;
|
|
2208
|
-
this.__page = null;
|
|
2209
|
-
this.__requestPaged = null;
|
|
2210
|
-
this.flagValidator = true;
|
|
2211
|
-
if (this.tokenStorage) {
|
|
2212
|
-
this.__tokenCredentials = this.tokenStorage.getToken();
|
|
2213
|
-
}
|
|
2214
|
-
if (this.allowedSecurityAccess(otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.security)) {
|
|
2215
|
-
Object.entries(this).forEach(function (_d) {
|
|
2216
|
-
var _e = __read(_d, 2), key = _e[0], value = _e[1];
|
|
2217
|
-
if (value instanceof rxjs.BehaviorSubject) {
|
|
2218
|
-
_this[key] = new rxjs.BehaviorSubject(null);
|
|
2219
|
-
}
|
|
2220
|
-
});
|
|
2221
|
-
if (this.__schedule) {
|
|
2222
|
-
(_c = (_b = (_a = this.otherArgs) === null || _a === void 0 ? void 0 : _a.schedule) === null || _b === void 0 ? void 0 : _b.service) === null || _c === void 0 ? void 0 : _c.removeSchedule(this.__schedule);
|
|
2223
|
-
this.__schedule = null;
|
|
2224
|
-
}
|
|
2225
|
-
var __requestPaged = this.__requestPaged;
|
|
2226
|
-
if (!__requestPaged) {
|
|
2227
|
-
this.setPage({
|
|
2228
|
-
page: {
|
|
2229
|
-
number: 0,
|
|
2230
|
-
size: 10
|
|
2231
|
-
}
|
|
2232
|
-
});
|
|
2233
|
-
}
|
|
2234
|
-
if (otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.callbackPagination) {
|
|
2235
|
-
this.__onDoPagination$.subscribe(function () {
|
|
2236
|
-
if (!_this.__onLoadingInProgress$.value) {
|
|
2237
|
-
var hasMorePages = _this.setPage({
|
|
2238
|
-
page: Object.assign({}, _this.__page)
|
|
2239
|
-
}).nextPage();
|
|
2240
|
-
if (hasMorePages && (otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.callbackPagination)) {
|
|
2241
|
-
otherArgs.callbackPagination();
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
});
|
|
2245
|
-
}
|
|
2246
|
-
if (otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.translateOptions) {
|
|
2247
|
-
var _d = otherArgs.translateOptions, service = _d.service, keys = _d.keys;
|
|
2248
|
-
this.geti18n(service, keys);
|
|
2249
|
-
}
|
|
2250
|
-
if (otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.feature) {
|
|
2251
|
-
var _e = otherArgs.feature, flag_1 = _e.flag, service_1 = _e.service;
|
|
2252
|
-
service_1.onFlags
|
|
2253
|
-
.pipe(operators.takeWhile(function () {
|
|
2254
|
-
return _this.flagValidator;
|
|
2255
|
-
}))
|
|
2256
|
-
.subscribe(function (val) {
|
|
2257
|
-
if (val) {
|
|
2258
|
-
var hasFlag = service_1.getFlag(flag_1);
|
|
2259
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(hasFlag)) {
|
|
2260
|
-
if (!hasFlag) {
|
|
2261
|
-
_this.navigateToErrorPage(404, otherArgs.router);
|
|
2262
|
-
return;
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.callbackMain();
|
|
2266
|
-
}
|
|
2267
|
-
});
|
|
2268
|
-
}
|
|
2269
|
-
else {
|
|
2270
|
-
otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.callbackMain();
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2273
|
-
else {
|
|
2274
|
-
this.navigateToErrorPage(403, otherArgs.router);
|
|
2275
|
-
}
|
|
2276
|
-
};
|
|
2277
|
-
MonkeyEcxCommonsService.prototype.getHTTPHeaderApplicationPDF = function () {
|
|
2278
|
-
return {
|
|
2279
|
-
observe: 'response',
|
|
2280
|
-
responseType: 'blob'
|
|
2281
|
-
};
|
|
2282
|
-
};
|
|
2283
|
-
MonkeyEcxCommonsService.prototype.genericMethod = function (link, data, callback) {
|
|
2284
|
-
var href = link.href, type = link.type;
|
|
2285
|
-
this.monkeyecxService[type.toLowerCase()]("" + href, data).subscribe(function (resp) {
|
|
2286
|
-
if (callback)
|
|
2287
|
-
callback();
|
|
2288
|
-
}, function (err) {
|
|
2289
|
-
rxjs.throwError(err);
|
|
2290
|
-
});
|
|
2291
|
-
};
|
|
2292
|
-
MonkeyEcxCommonsService.prototype.geti18n = function (translateService, keys) {
|
|
2293
|
-
var _this = this;
|
|
2294
|
-
translateService
|
|
2295
|
-
.getStreamOnTranslationChange(keys)
|
|
2296
|
-
.subscribe(function (translations) {
|
|
2297
|
-
_this.__i18n = translations;
|
|
2298
|
-
_this.__oni18nDataChanged$.next(null);
|
|
2299
|
-
});
|
|
2300
|
-
};
|
|
2301
|
-
return MonkeyEcxCommonsService;
|
|
2302
|
-
}());
|
|
2303
|
-
__decorate([
|
|
2304
|
-
MonkeyEcxCoreService({
|
|
2305
|
-
requestInProgress: {
|
|
2306
|
-
showProgress: true
|
|
2307
|
-
}
|
|
2308
|
-
})
|
|
2309
|
-
], MonkeyEcxCommonsService.prototype, "genericMethod", null);
|
|
2310
|
-
|
|
2311
|
-
/* eslint-disable max-len */
|
|
2312
|
-
var MonkeyEcxHandlingService = /** @class */ (function () {
|
|
2313
|
-
function MonkeyEcxHandlingService() {
|
|
2314
|
-
}
|
|
2315
|
-
MonkeyEcxHandlingService.prototype.clearAll = function () {
|
|
2316
|
-
this.monkeyecxServiceCredentials = null;
|
|
2317
|
-
this.monkeyecxRequestQueue = null;
|
|
2318
|
-
this.monkeyecxRequestDownload = null;
|
|
2319
|
-
this.monkeyecxRequestUpload = null;
|
|
2320
|
-
};
|
|
2321
|
-
MonkeyEcxHandlingService.prototype.setMonkeyEcxServiceCredentials = function (param) {
|
|
2322
|
-
this.monkeyecxServiceCredentials = param;
|
|
2323
|
-
};
|
|
2324
|
-
MonkeyEcxHandlingService.prototype.getMonkeyEcxServiceCredentials = function () {
|
|
2325
|
-
return this.monkeyecxServiceCredentials;
|
|
2326
|
-
};
|
|
2327
|
-
MonkeyEcxHandlingService.prototype.setMonkeyEcxRequestQueue = function (queue) {
|
|
2328
|
-
this.monkeyecxRequestQueue = queue;
|
|
2329
|
-
};
|
|
2330
|
-
MonkeyEcxHandlingService.prototype.getMonkeyEcxRequestQueue = function () {
|
|
2331
|
-
return this.monkeyecxRequestQueue;
|
|
2332
|
-
};
|
|
2333
|
-
MonkeyEcxHandlingService.prototype.setMonkeyEcxRequestDownload = function (download) {
|
|
2334
|
-
this.monkeyecxRequestDownload = download;
|
|
2335
|
-
};
|
|
2336
|
-
MonkeyEcxHandlingService.prototype.getMonkeyEcxRequestDownload = function () {
|
|
2337
|
-
return this.monkeyecxRequestDownload;
|
|
2338
|
-
};
|
|
2339
|
-
MonkeyEcxHandlingService.prototype.setMonkeyEcxRequestUpload = function (upload) {
|
|
2340
|
-
this.monkeyecxRequestUpload = upload;
|
|
2341
|
-
};
|
|
2342
|
-
MonkeyEcxHandlingService.prototype.getMonkeyEcxRequestUpload = function () {
|
|
2343
|
-
return this.monkeyecxRequestUpload;
|
|
2344
|
-
};
|
|
2345
|
-
return MonkeyEcxHandlingService;
|
|
2346
|
-
}());
|
|
2347
|
-
MonkeyEcxHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHandlingService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2348
|
-
MonkeyEcxHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHandlingService, providedIn: 'root' });
|
|
2349
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHandlingService, decorators: [{
|
|
2350
|
-
type: i0.Injectable,
|
|
2351
|
-
args: [{
|
|
2352
|
-
providedIn: 'root'
|
|
2353
|
-
}]
|
|
2354
|
-
}] });
|
|
2355
|
-
|
|
2356
|
-
var MonkeyEcxService = /** @class */ (function () {
|
|
2357
|
-
function MonkeyEcxService(http, monkeyecxHandlingService) {
|
|
2358
|
-
this.http = http;
|
|
2359
|
-
this.monkeyecxHandlingService = monkeyecxHandlingService;
|
|
2360
|
-
// not to do
|
|
2361
|
-
}
|
|
2362
|
-
MonkeyEcxService.prototype.handlelize = function (params) {
|
|
2363
|
-
var e_1, _a;
|
|
2364
|
-
if (!params) {
|
|
2365
|
-
return params;
|
|
2366
|
-
}
|
|
2367
|
-
try {
|
|
2368
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
2369
|
-
for (var _b = __values([
|
|
2370
|
-
'createdAt',
|
|
2371
|
-
'createUserId',
|
|
2372
|
-
'updatedAt',
|
|
2373
|
-
'lastUserId',
|
|
2374
|
-
'_links',
|
|
2375
|
-
'governmentIdType',
|
|
2376
|
-
'governmentIdMask',
|
|
2377
|
-
'screenType',
|
|
2378
|
-
'screenTab'
|
|
2379
|
-
]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2380
|
-
var field = _c.value;
|
|
2381
|
-
delete params[field];
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2385
|
-
finally {
|
|
2386
|
-
try {
|
|
2387
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2388
|
-
}
|
|
2389
|
-
finally { if (e_1) throw e_1.error; }
|
|
2390
|
-
}
|
|
2391
|
-
return params;
|
|
2392
|
-
};
|
|
2393
|
-
MonkeyEcxService.prototype.get = function (url, options) {
|
|
2394
|
-
return this.http.get(url, options);
|
|
2395
|
-
};
|
|
2396
|
-
MonkeyEcxService.prototype.post = function (url, params, options) {
|
|
2397
|
-
return this.http.post(url, params, options);
|
|
2398
|
-
};
|
|
2399
|
-
MonkeyEcxService.prototype.put = function (url, params) {
|
|
2400
|
-
return this.http.put(url, this.handlelize(Object.assign({}, params)));
|
|
2401
|
-
};
|
|
2402
|
-
MonkeyEcxService.prototype.delete = function (url, params) {
|
|
2403
|
-
return this.http.delete(url, params);
|
|
2404
|
-
};
|
|
2405
|
-
MonkeyEcxService.prototype.download = function (url, options, filename) {
|
|
2406
|
-
this.http.get(url, options).subscribe(function (resp) {
|
|
2407
|
-
var headers = resp.headers, body = resp.body;
|
|
2408
|
-
var contentType = headers.get('Content-Type');
|
|
2409
|
-
var contentDisposition = headers.get('Content-Disposition');
|
|
2410
|
-
if (contentDisposition) {
|
|
2411
|
-
filename = contentDisposition
|
|
2412
|
-
.split(';')[1]
|
|
2413
|
-
.split('filename')[1]
|
|
2414
|
-
.split('=')[1]
|
|
2415
|
-
.trim()
|
|
2416
|
-
.replace(new RegExp(/"/g), '');
|
|
2417
|
-
}
|
|
2418
|
-
var blob = new Blob([body], {
|
|
2419
|
-
type: "" + contentType
|
|
2420
|
-
});
|
|
2421
|
-
return {
|
|
2422
|
-
filename: filename,
|
|
2423
|
-
blob: blob
|
|
2424
|
-
};
|
|
2425
|
-
}, function (err) {
|
|
2426
|
-
rxjs.throwError(err);
|
|
2427
|
-
});
|
|
2428
|
-
};
|
|
2429
|
-
MonkeyEcxService.prototype.downloadOb = function (url, options, filename) {
|
|
2430
|
-
return this.http.get(url, options).pipe(operators.map(function (resp) {
|
|
2431
|
-
var headers = resp.headers, body = resp.body;
|
|
2432
|
-
var contentType = headers.get('Content-Type');
|
|
2433
|
-
var contentDisposition = headers.get('Content-Disposition');
|
|
2434
|
-
if (contentDisposition) {
|
|
2435
|
-
filename = contentDisposition
|
|
2436
|
-
.split(';')[1]
|
|
2437
|
-
.split('filename')[1]
|
|
2438
|
-
.split('=')[1]
|
|
2439
|
-
.trim()
|
|
2440
|
-
.replace(new RegExp(/"/g), '');
|
|
2441
|
-
}
|
|
2442
|
-
var blob = new Blob([body], {
|
|
2443
|
-
type: "" + contentType
|
|
2444
|
-
});
|
|
2445
|
-
return {
|
|
2446
|
-
filename: filename,
|
|
2447
|
-
blob: blob
|
|
2448
|
-
};
|
|
2449
|
-
}), operators.catchError(function (err) {
|
|
2450
|
-
return rxjs.throwError(err);
|
|
2451
|
-
}));
|
|
2452
|
-
};
|
|
2453
|
-
return MonkeyEcxService;
|
|
2454
|
-
}());
|
|
2455
|
-
MonkeyEcxService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxService, deps: [{ token: i1__namespace$4.HttpClient }, { token: MonkeyEcxHandlingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2456
|
-
MonkeyEcxService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxService, providedIn: 'root' });
|
|
2457
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxService, decorators: [{
|
|
2458
|
-
type: i0.Injectable,
|
|
2459
|
-
args: [{
|
|
2460
|
-
providedIn: 'root'
|
|
2461
|
-
}]
|
|
2462
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$4.HttpClient }, { type: MonkeyEcxHandlingService }]; } });
|
|
2463
|
-
|
|
2464
|
-
/* eslint-disable object-curly-newline */
|
|
2465
|
-
var MonkeyEcxCookieStorageService = /** @class */ (function () {
|
|
2466
|
-
function MonkeyEcxCookieStorageService(cookieService) {
|
|
2467
|
-
this.cookieService = cookieService;
|
|
2468
|
-
// not to do
|
|
2469
|
-
}
|
|
2470
|
-
MonkeyEcxCookieStorageService.prototype.setCookie = function (name, value) {
|
|
2471
|
-
this.removeCookie(name);
|
|
2472
|
-
this.cookieService.set(name, value, null, '/', '', true, 'None');
|
|
2473
|
-
};
|
|
2474
|
-
MonkeyEcxCookieStorageService.prototype.getCookie = function (name) {
|
|
2475
|
-
return this.cookieService.get(name);
|
|
2476
|
-
};
|
|
2477
|
-
MonkeyEcxCookieStorageService.prototype.removeCookie = function (name) {
|
|
2478
|
-
this.cookieService.delete(name, '/');
|
|
2479
|
-
};
|
|
2480
|
-
return MonkeyEcxCookieStorageService;
|
|
2481
|
-
}());
|
|
2482
|
-
MonkeyEcxCookieStorageService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxCookieStorageService, deps: [{ token: i1__namespace$5.CookieService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2483
|
-
MonkeyEcxCookieStorageService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxCookieStorageService, providedIn: 'root' });
|
|
2484
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxCookieStorageService, decorators: [{
|
|
2485
|
-
type: i0.Injectable,
|
|
2486
|
-
args: [{
|
|
2487
|
-
providedIn: 'root'
|
|
2488
|
-
}]
|
|
2489
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$5.CookieService }]; } });
|
|
2490
|
-
|
|
2491
|
-
var window$1;
|
|
2492
|
-
var text = {
|
|
2493
|
-
i18n: {
|
|
2494
|
-
title: 'We have an quick update for you',
|
|
2495
|
-
message: 'Click anywhere here to reload your locale'
|
|
2496
|
-
},
|
|
2497
|
-
theme: {
|
|
2498
|
-
title: 'We have an quick update for you',
|
|
2499
|
-
message: 'Click anywhere here to reload your theme'
|
|
2500
|
-
}
|
|
2501
|
-
};
|
|
2502
|
-
var MonkeyEcxErrorConfigService = /** @class */ (function () {
|
|
2503
|
-
function MonkeyEcxErrorConfigService() {
|
|
2504
|
-
// not to do
|
|
2505
|
-
}
|
|
2506
|
-
MonkeyEcxErrorConfigService.prototype.enableSupport = function () {
|
|
2507
|
-
window$1.zE('webWidget', 'updateSettings', {
|
|
2508
|
-
webWidget: {
|
|
2509
|
-
color: {
|
|
2510
|
-
theme: '#0273E8',
|
|
2511
|
-
launcherText: '#fff',
|
|
2512
|
-
header: '#0273E8',
|
|
2513
|
-
button: '#0273E8'
|
|
2514
|
-
},
|
|
2515
|
-
zIndex: 99,
|
|
2516
|
-
offset: {
|
|
2517
|
-
horizontal: '1px',
|
|
2518
|
-
vertical: '20px'
|
|
2519
|
-
},
|
|
2520
|
-
mobile: {
|
|
2521
|
-
labelVisible: true
|
|
2522
|
-
},
|
|
2523
|
-
launcher: {
|
|
2524
|
-
mobile: {
|
|
2525
|
-
labelVisible: true
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
});
|
|
2530
|
-
window$1.zE('webWidget', 'setLocale', 'en-US');
|
|
2531
|
-
window$1.zE('webWidget', 'show');
|
|
2532
|
-
};
|
|
2533
|
-
MonkeyEcxErrorConfigService.prototype.apply = function (type) {
|
|
2534
|
-
var _a = text[type], title = _a.title, message = _a.message;
|
|
2535
|
-
var element = document.createElement('div');
|
|
2536
|
-
element.id = 'monkeyecx-information';
|
|
2537
|
-
var elementImg = document.createElement('img');
|
|
2538
|
-
elementImg.width = 128;
|
|
2539
|
-
elementImg.src = 'assets/images/monkey.svg';
|
|
2540
|
-
elementImg.style.marginBottom = '50px';
|
|
2541
|
-
var elementTitle = document.createElement('span');
|
|
2542
|
-
elementTitle.id = 'title';
|
|
2543
|
-
elementTitle.innerText = title;
|
|
2544
|
-
elementTitle.style.marginBottom = '20px';
|
|
2545
|
-
var elementMessage = document.createElement('span');
|
|
2546
|
-
elementMessage.id = 'message';
|
|
2547
|
-
elementMessage.innerText = message;
|
|
2548
|
-
elementMessage.style.marginBottom = '20px';
|
|
2549
|
-
var elementChat = document.createElement('span');
|
|
2550
|
-
elementChat.id = 'message';
|
|
2551
|
-
elementChat.innerText =
|
|
2552
|
-
"If you're having trouble to update, please use the support icon bellow";
|
|
2553
|
-
element.appendChild(elementImg);
|
|
2554
|
-
element.appendChild(elementTitle);
|
|
2555
|
-
element.appendChild(elementMessage);
|
|
2556
|
-
element.appendChild(elementChat);
|
|
2557
|
-
element.addEventListener('click', function () {
|
|
2558
|
-
document.location.reload();
|
|
2559
|
-
});
|
|
2560
|
-
document.body.appendChild(element);
|
|
2561
|
-
document.body.getElementsByTagName('app-root')[0].remove();
|
|
2562
|
-
this.enableSupport();
|
|
2563
|
-
};
|
|
2564
|
-
return MonkeyEcxErrorConfigService;
|
|
2565
|
-
}());
|
|
2566
|
-
MonkeyEcxErrorConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorConfigService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2567
|
-
MonkeyEcxErrorConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorConfigService, providedIn: 'root' });
|
|
2568
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorConfigService, decorators: [{
|
|
2569
|
-
type: i0.Injectable,
|
|
2570
|
-
args: [{
|
|
2571
|
-
providedIn: 'root'
|
|
2572
|
-
}]
|
|
2573
|
-
}], ctorParameters: function () { return []; } });
|
|
2574
|
-
|
|
2575
|
-
var MonkeyEcxi18nConfigService = /** @class */ (function (_super) {
|
|
2576
|
-
__extends(MonkeyEcxi18nConfigService, _super);
|
|
2577
|
-
function MonkeyEcxi18nConfigService(monkeyecxService, translateService, monkeyecxCookieStorageService, monkeyecxErrorConfigService) {
|
|
2578
|
-
var _this = _super.call(this, monkeyecxService) || this;
|
|
2579
|
-
_this.translateService = translateService;
|
|
2580
|
-
_this.monkeyecxCookieStorageService = monkeyecxCookieStorageService;
|
|
2581
|
-
_this.monkeyecxErrorConfigService = monkeyecxErrorConfigService;
|
|
2582
|
-
_this.translateService.addLangs(['pt-BR', 'en-US']);
|
|
2583
|
-
_this.translateService.setDefaultLang('pt-BR');
|
|
2584
|
-
_this.translateService.use('pt-BR');
|
|
2585
|
-
_this.applyLocal();
|
|
2586
|
-
return _this;
|
|
2587
|
-
}
|
|
2588
|
-
MonkeyEcxi18nConfigService.prototype.applyLocal = function () {
|
|
2589
|
-
i1$2.registerLocaleData(localePTBR__default["default"], 'pt-PT');
|
|
2590
|
-
};
|
|
2591
|
-
MonkeyEcxi18nConfigService.prototype.apply = function (params, environment, change) {
|
|
2592
|
-
var _this = this;
|
|
2593
|
-
if (change === void 0) { change = false; }
|
|
2594
|
-
var _a = this, monkeyecxService = _a.monkeyecxService, monkeyecxCookieStorageService = _a.monkeyecxCookieStorageService, monkeyecxErrorConfigService = _a.monkeyecxErrorConfigService;
|
|
2595
|
-
var i18n = params.i18n;
|
|
2596
|
-
var cookie = monkeyecxCookieStorageService.getCookie('monkey-app-locale');
|
|
2597
|
-
if (cookie && !change) {
|
|
2598
|
-
i18n = JSON.parse(atob(cookie));
|
|
2599
|
-
}
|
|
2600
|
-
else {
|
|
2601
|
-
monkeyecxCookieStorageService.setCookie('monkey-app-locale', btoa(JSON.stringify(i18n)));
|
|
2602
|
-
if (!cookie)
|
|
2603
|
-
change = true;
|
|
2604
|
-
}
|
|
2605
|
-
monkeyecxService.get(environment.localAssets + "/i18n/" + i18n.lang + ".json").subscribe(function (config) {
|
|
2606
|
-
var lang = config.lang, data = config.data;
|
|
2607
|
-
_this.translateService.setTranslation(lang, data, true);
|
|
2608
|
-
_this.translateService.use(lang);
|
|
2609
|
-
if (change)
|
|
2610
|
-
document.location.reload();
|
|
2611
|
-
}, function (err) {
|
|
2612
|
-
console.error("i18n " + i18n.lang + " not found!");
|
|
2613
|
-
monkeyecxErrorConfigService.apply('i18n');
|
|
2614
|
-
rxjs.throwError(err);
|
|
2615
|
-
});
|
|
2616
|
-
};
|
|
2617
|
-
return MonkeyEcxi18nConfigService;
|
|
2618
|
-
}(MonkeyEcxCommonsService));
|
|
2619
|
-
MonkeyEcxi18nConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxi18nConfigService, deps: [{ token: MonkeyEcxService }, { token: i1__namespace$1.TranslateService }, { token: MonkeyEcxCookieStorageService }, { token: MonkeyEcxErrorConfigService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2620
|
-
MonkeyEcxi18nConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxi18nConfigService, providedIn: 'root' });
|
|
2621
|
-
__decorate([
|
|
2622
|
-
MonkeyEcxCoreService({
|
|
2623
|
-
httpResponse: {
|
|
2624
|
-
httpCodeIgnore: [404]
|
|
2625
|
-
},
|
|
2626
|
-
requestInProgress: {
|
|
2627
|
-
showProgress: false
|
|
2628
|
-
}
|
|
2629
|
-
})
|
|
2630
|
-
], MonkeyEcxi18nConfigService.prototype, "apply", null);
|
|
2631
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxi18nConfigService, decorators: [{
|
|
2632
|
-
type: i0.Injectable,
|
|
2633
|
-
args: [{
|
|
2634
|
-
providedIn: 'root'
|
|
2635
|
-
}]
|
|
2636
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: i1__namespace$1.TranslateService }, { type: MonkeyEcxCookieStorageService }, { type: MonkeyEcxErrorConfigService }]; }, propDecorators: { apply: [] } });
|
|
2637
|
-
|
|
2638
|
-
var MonkeyEcxLogsConfigService = /** @class */ (function () {
|
|
2639
|
-
function MonkeyEcxLogsConfigService() {
|
|
2640
|
-
}
|
|
2641
|
-
MonkeyEcxLogsConfigService.prototype.apply = function (params, configBoostrap, environment, identifyCode) {
|
|
2642
|
-
var program = params.program, logs = params.logs;
|
|
2643
|
-
if ((logs === null || logs === void 0 ? void 0 : logs.enabled) && environment.environment !== 'dev') {
|
|
2644
|
-
browserRum.datadogRum.init({
|
|
2645
|
-
applicationId: environment === null || environment === void 0 ? void 0 : environment.dataDogApplicationId,
|
|
2646
|
-
clientToken: environment === null || environment === void 0 ? void 0 : environment.dataDogClientToken,
|
|
2647
|
-
service: program.token,
|
|
2648
|
-
site: 'datadoghq.com',
|
|
2649
|
-
sampleRate: 100,
|
|
2650
|
-
replaySampleRate: 100,
|
|
2651
|
-
env: "monkey-front-" + identifyCode + "-" + environment.environment,
|
|
2652
|
-
version: configBoostrap === null || configBoostrap === void 0 ? void 0 : configBoostrap.version,
|
|
2653
|
-
trackInteractions: true,
|
|
2654
|
-
trackSessionAcrossSubdomains: true,
|
|
2655
|
-
useSecureSessionCookie: true,
|
|
2656
|
-
useCrossSiteSessionCookie: true
|
|
2657
|
-
});
|
|
2658
|
-
browserRum.datadogRum.startSessionReplayRecording();
|
|
2659
|
-
}
|
|
2660
|
-
};
|
|
2661
|
-
return MonkeyEcxLogsConfigService;
|
|
2662
|
-
}());
|
|
2663
|
-
MonkeyEcxLogsConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxLogsConfigService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2664
|
-
MonkeyEcxLogsConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxLogsConfigService, providedIn: 'root' });
|
|
2665
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxLogsConfigService, decorators: [{
|
|
2666
|
-
type: i0.Injectable,
|
|
2667
|
-
args: [{
|
|
2668
|
-
providedIn: 'root'
|
|
2669
|
-
}]
|
|
2670
|
-
}] });
|
|
2671
|
-
|
|
2672
|
-
var MonkeyEcxServiceWorkerConfigService = /** @class */ (function () {
|
|
2673
|
-
function MonkeyEcxServiceWorkerConfigService(appRef, updates, modalService) {
|
|
2674
|
-
this.appRef = appRef;
|
|
2675
|
-
this.updates = updates;
|
|
2676
|
-
this.modalService = modalService;
|
|
2677
|
-
// not to do
|
|
2678
|
-
}
|
|
2679
|
-
MonkeyEcxServiceWorkerConfigService.prototype.handleValidation = function (config) {
|
|
2680
|
-
var _a;
|
|
2681
|
-
var _b = this, updates = _b.updates, modalService = _b.modalService;
|
|
2682
|
-
(_a = updates === null || updates === void 0 ? void 0 : updates.available) === null || _a === void 0 ? void 0 : _a.subscribe(function () {
|
|
2683
|
-
if (!config.showNewVersion || config.maintenance.closed) {
|
|
2684
|
-
document.location.reload();
|
|
2685
|
-
}
|
|
2686
|
-
else {
|
|
2687
|
-
modalService.open(VersionChangedComponent, {
|
|
2688
|
-
color: 'theme',
|
|
2689
|
-
size: 'md'
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2692
|
-
});
|
|
2693
|
-
};
|
|
2694
|
-
MonkeyEcxServiceWorkerConfigService.prototype.verify = function () {
|
|
2695
|
-
var _b = this, appRef = _b.appRef, updates = _b.updates;
|
|
2696
|
-
var appIsStable$ = appRef.isStable
|
|
2697
|
-
.pipe(operators.first(function (isStable) { return isStable === true; }));
|
|
2698
|
-
var everyHour$ = rxjs.interval(1 * 60 * 60 * 1000);
|
|
2699
|
-
var everyHourOnceAppIsStable$ = rxjs.concat(appIsStable$, everyHour$);
|
|
2700
|
-
everyHourOnceAppIsStable$.subscribe(function () {
|
|
2701
|
-
updates.checkForUpdate();
|
|
2702
|
-
});
|
|
2703
|
-
updates.checkForUpdate();
|
|
2704
|
-
};
|
|
2705
|
-
MonkeyEcxServiceWorkerConfigService.prototype.apply = function (config) {
|
|
2706
|
-
this.handleValidation(config);
|
|
2707
|
-
this.verify();
|
|
2708
|
-
};
|
|
2709
|
-
return MonkeyEcxServiceWorkerConfigService;
|
|
2710
|
-
}());
|
|
2711
|
-
MonkeyEcxServiceWorkerConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxServiceWorkerConfigService, deps: [{ token: i0__namespace.ApplicationRef }, { token: i1__namespace$6.SwUpdate }, { token: i1__namespace.MonkeyStyleGuideModalService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2712
|
-
MonkeyEcxServiceWorkerConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxServiceWorkerConfigService, providedIn: 'root' });
|
|
2713
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxServiceWorkerConfigService, decorators: [{
|
|
2714
|
-
type: i0.Injectable,
|
|
2715
|
-
args: [{
|
|
2716
|
-
providedIn: 'root'
|
|
2717
|
-
}]
|
|
2718
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ApplicationRef }, { type: i1__namespace$6.SwUpdate }, { type: i1__namespace.MonkeyStyleGuideModalService }]; } });
|
|
2719
|
-
|
|
2720
|
-
var MonkeyEcxSecurityConsoleConfigService = /** @class */ (function (_super) {
|
|
2721
|
-
__extends(MonkeyEcxSecurityConsoleConfigService, _super);
|
|
2722
|
-
function MonkeyEcxSecurityConsoleConfigService(translateService) {
|
|
2723
|
-
var _this = _super.call(this) || this;
|
|
2724
|
-
_this.translateService = translateService;
|
|
2725
|
-
_this.geti18n(_this.translateService, 'SERVICES.WARNING.CONSOLE');
|
|
2726
|
-
return _this;
|
|
2727
|
-
}
|
|
2728
|
-
MonkeyEcxSecurityConsoleConfigService.prototype.handleValidation = function () {
|
|
2729
|
-
var _this = this;
|
|
2730
|
-
this.__oni18nDataChanged$.subscribe(function () {
|
|
2731
|
-
var __i18n = _this.__i18n;
|
|
2732
|
-
var title = __i18n === null || __i18n === void 0 ? void 0 : __i18n.TITLE;
|
|
2733
|
-
var message = __i18n === null || __i18n === void 0 ? void 0 : __i18n.MESSAGE;
|
|
2734
|
-
if (title) {
|
|
2735
|
-
console.log("%c" + title, 'background: #f2f061; color: #ff0000; font-size: x-large');
|
|
2736
|
-
console.log("%c" + message, 'font-size: x-large');
|
|
2737
|
-
console.log('%c __ __ _ ______ \n ' +
|
|
2738
|
-
'| \\/ | ___ _ __ | | _____ _ _\\ \\ \\ \\ \n ' +
|
|
2739
|
-
"| |\\/| |/ _ \\| '_ \\| |/ / _ \\ | | |\\ \\ \\ \\ \n " +
|
|
2740
|
-
'| | | | (_) | | | | < __/ |_| |/ / / / \n ' +
|
|
2741
|
-
'|_| |_|\\___/|_| |_|_|\\_\\___|\\__, /_/_/_/ \n ' +
|
|
2742
|
-
' |___/ \n ' +
|
|
2743
|
-
'Join us: https://monkeyecx.gupy.io', 'background: #1976d2; color: #fff');
|
|
2744
|
-
}
|
|
2745
|
-
});
|
|
2746
|
-
};
|
|
2747
|
-
MonkeyEcxSecurityConsoleConfigService.prototype.apply = function () {
|
|
2748
|
-
this.handleValidation();
|
|
2749
|
-
};
|
|
2750
|
-
return MonkeyEcxSecurityConsoleConfigService;
|
|
2751
|
-
}(MonkeyEcxCommonsService));
|
|
2752
|
-
MonkeyEcxSecurityConsoleConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxSecurityConsoleConfigService, deps: [{ token: i1__namespace$1.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2753
|
-
MonkeyEcxSecurityConsoleConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxSecurityConsoleConfigService, providedIn: 'root' });
|
|
2754
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxSecurityConsoleConfigService, decorators: [{
|
|
2755
|
-
type: i0.Injectable,
|
|
2756
|
-
args: [{
|
|
2757
|
-
providedIn: 'root'
|
|
2758
|
-
}]
|
|
2759
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.TranslateService }]; } });
|
|
2760
|
-
|
|
2761
|
-
var MonkeyEcxMaintenanceConfigService = /** @class */ (function () {
|
|
2762
|
-
function MonkeyEcxMaintenanceConfigService(modalService, router) {
|
|
2763
|
-
this.modalService = modalService;
|
|
2764
|
-
this.router = router;
|
|
2765
|
-
// not to do
|
|
2766
|
-
}
|
|
2767
|
-
MonkeyEcxMaintenanceConfigService.prototype.handleValidation = function (config) {
|
|
2768
|
-
var _this = this;
|
|
2769
|
-
if (config.maintenance.closed) {
|
|
2770
|
-
localStorage.clear();
|
|
2771
|
-
this.router.navigate(['']);
|
|
2772
|
-
setTimeout(function () {
|
|
2773
|
-
_this.modalService.open(ClosedToMaintenanceComponent, {
|
|
2774
|
-
color: 'theme',
|
|
2775
|
-
size: 'md',
|
|
2776
|
-
data: config
|
|
2777
|
-
});
|
|
2778
|
-
}, 200);
|
|
2779
|
-
}
|
|
2780
|
-
};
|
|
2781
|
-
MonkeyEcxMaintenanceConfigService.prototype.apply = function (config) {
|
|
2782
|
-
this.handleValidation(config);
|
|
2783
|
-
};
|
|
2784
|
-
return MonkeyEcxMaintenanceConfigService;
|
|
2785
|
-
}());
|
|
2786
|
-
MonkeyEcxMaintenanceConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxMaintenanceConfigService, deps: [{ token: i1__namespace.MonkeyStyleGuideModalService }, { token: i1__namespace$3.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2787
|
-
MonkeyEcxMaintenanceConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxMaintenanceConfigService, providedIn: 'root' });
|
|
2788
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxMaintenanceConfigService, decorators: [{
|
|
2789
|
-
type: i0.Injectable,
|
|
2790
|
-
args: [{
|
|
2791
|
-
providedIn: 'root'
|
|
2792
|
-
}]
|
|
2793
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.MonkeyStyleGuideModalService }, { type: i1__namespace$3.Router }]; } });
|
|
2794
|
-
|
|
2795
|
-
var MonkeyEcxFeatureToggleService = /** @class */ (function () {
|
|
2796
|
-
function MonkeyEcxFeatureToggleService() {
|
|
2797
|
-
this.flagSubject$ = new rxjs.BehaviorSubject(null);
|
|
2798
|
-
// not to do
|
|
2799
|
-
}
|
|
2800
|
-
MonkeyEcxFeatureToggleService.prototype.getAllFlags = function () {
|
|
2801
|
-
this.flags = this.ldClient.allFlags();
|
|
2802
|
-
this.flagSubject$.next(true);
|
|
2803
|
-
};
|
|
2804
|
-
MonkeyEcxFeatureToggleService.prototype.identify = function (config, environment) {
|
|
2805
|
-
var _a;
|
|
2806
|
-
if (config) {
|
|
2807
|
-
var email = 'monkey@monkey.exchange';
|
|
2808
|
-
var user = {
|
|
2809
|
-
email: email,
|
|
2810
|
-
key: ((_a = config.program) === null || _a === void 0 ? void 0 : _a.token) + "#" + email
|
|
2811
|
-
};
|
|
2812
|
-
if (!this.ldClient) {
|
|
2813
|
-
this.ldClient = launchdarklyJsClientSdk.initialize(environment.launchDarklyClientSideID, user, {
|
|
2814
|
-
streaming: true,
|
|
2815
|
-
disableSyncEventPost: true,
|
|
2816
|
-
sendEvents: false,
|
|
2817
|
-
diagnosticOptOut: true
|
|
2818
|
-
});
|
|
2819
|
-
this.ldClient.on('change', this.getAllFlags.bind(this));
|
|
2820
|
-
this.ldClient.on('ready', this.getAllFlags.bind(this));
|
|
2821
|
-
}
|
|
2822
|
-
else {
|
|
2823
|
-
this.ldClient.identify(user, null, this.getAllFlags);
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
};
|
|
2827
|
-
MonkeyEcxFeatureToggleService.prototype.apply = function (configSubject$, environment) {
|
|
2828
|
-
var _this = this;
|
|
2829
|
-
if (environment.launchDarklyClientSideID) {
|
|
2830
|
-
configSubject$.subscribe(function (config) {
|
|
2831
|
-
_this.identify(config, environment);
|
|
2832
|
-
});
|
|
2833
|
-
}
|
|
2834
|
-
else {
|
|
2835
|
-
this.flagSubject$.next(true);
|
|
2836
|
-
}
|
|
2837
|
-
};
|
|
2838
|
-
Object.defineProperty(MonkeyEcxFeatureToggleService.prototype, "onFlags", {
|
|
2839
|
-
get: function () {
|
|
2840
|
-
return this.flagSubject$.asObservable();
|
|
2841
|
-
},
|
|
2842
|
-
enumerable: false,
|
|
2843
|
-
configurable: true
|
|
2844
|
-
});
|
|
2845
|
-
MonkeyEcxFeatureToggleService.prototype.getFlag = function (flag) {
|
|
2846
|
-
var _a;
|
|
2847
|
-
var flagValue = (_a = this.flags) === null || _a === void 0 ? void 0 : _a[flag];
|
|
2848
|
-
return i1.MonkeyUtils.persistNullEmptyUndefined(flagValue) ? flagValue : null;
|
|
2849
|
-
};
|
|
2850
|
-
return MonkeyEcxFeatureToggleService;
|
|
2851
|
-
}());
|
|
2852
|
-
MonkeyEcxFeatureToggleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFeatureToggleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2853
|
-
MonkeyEcxFeatureToggleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFeatureToggleService, providedIn: 'root' });
|
|
2854
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxFeatureToggleService, decorators: [{
|
|
2855
|
-
type: i0.Injectable,
|
|
2856
|
-
args: [{
|
|
2857
|
-
providedIn: 'root'
|
|
2858
|
-
}]
|
|
2859
|
-
}], ctorParameters: function () { return []; } });
|
|
2860
|
-
|
|
2861
|
-
var MonkeyEcxConfigService = /** @class */ (function (_super) {
|
|
2862
|
-
__extends(MonkeyEcxConfigService, _super);
|
|
2863
|
-
function MonkeyEcxConfigService(monkeyecxService, monkeyecxi18nConfigService, monkeyecxLogsConfigService, monkeyStyleGuideSettingsService, monkeyecxServiceWorkerConfigService, monkeyecxSecurityConsoleConfigService, monkeyecxMaintenanceConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService) {
|
|
2864
|
-
var _this = _super.call(this, monkeyecxService) || this;
|
|
2865
|
-
_this.monkeyecxi18nConfigService = monkeyecxi18nConfigService;
|
|
2866
|
-
_this.monkeyecxLogsConfigService = monkeyecxLogsConfigService;
|
|
2867
|
-
_this.monkeyStyleGuideSettingsService = monkeyStyleGuideSettingsService;
|
|
2868
|
-
_this.monkeyecxServiceWorkerConfigService = monkeyecxServiceWorkerConfigService;
|
|
2869
|
-
_this.monkeyecxSecurityConsoleConfigService = monkeyecxSecurityConsoleConfigService;
|
|
2870
|
-
_this.monkeyecxMaintenanceConfigService = monkeyecxMaintenanceConfigService;
|
|
2871
|
-
_this.monkeyecxErrorConfigService = monkeyecxErrorConfigService;
|
|
2872
|
-
_this.monkeyEcxFeatureToggleService = monkeyEcxFeatureToggleService;
|
|
2873
|
-
_this.configSubject$ = new rxjs.BehaviorSubject(null);
|
|
2874
|
-
_this.configBoostrapSubject$ = new rxjs.BehaviorSubject(null);
|
|
2875
|
-
return _this;
|
|
2876
|
-
}
|
|
2877
|
-
MonkeyEcxConfigService.prototype.internalValidations = function () {
|
|
2878
|
-
var args = [];
|
|
2879
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2880
|
-
args[_i] = arguments[_i];
|
|
2881
|
-
}
|
|
2882
|
-
var _a = this, monkeyecxServiceWorkerConfigService = _a.monkeyecxServiceWorkerConfigService, monkeyecxSecurityConsoleConfigService = _a.monkeyecxSecurityConsoleConfigService, monkeyecxMaintenanceConfigService = _a.monkeyecxMaintenanceConfigService;
|
|
2883
|
-
var configBoostrap = args[0];
|
|
2884
|
-
var callback = args[1];
|
|
2885
|
-
monkeyecxSecurityConsoleConfigService.apply();
|
|
2886
|
-
monkeyecxServiceWorkerConfigService.apply(configBoostrap);
|
|
2887
|
-
monkeyecxMaintenanceConfigService.apply(configBoostrap);
|
|
2888
|
-
callback(configBoostrap);
|
|
2889
|
-
};
|
|
2890
|
-
MonkeyEcxConfigService.prototype.getWhiteLabelSettings = function (monkeyecxCode, configBoostrap, callback, environment, identifyCode) {
|
|
2891
|
-
var _this = this;
|
|
2892
|
-
if (configBoostrap === void 0) { configBoostrap = null; }
|
|
2893
|
-
var _a = this, monkeyecxService = _a.monkeyecxService, monkeyecxi18nConfigService = _a.monkeyecxi18nConfigService, configSubject$ = _a.configSubject$, monkeyStyleGuideSettingsService = _a.monkeyStyleGuideSettingsService, monkeyecxLogsConfigService = _a.monkeyecxLogsConfigService, monkeyecxErrorConfigService = _a.monkeyecxErrorConfigService, monkeyEcxFeatureToggleService = _a.monkeyEcxFeatureToggleService, internalValidations = _a.internalValidations;
|
|
2894
|
-
var url = "" + environment.urlAssets;
|
|
2895
|
-
monkeyecxService.get(url + "/" + monkeyecxCode.toLowerCase() + "/white-label.json").subscribe(function (config) {
|
|
2896
|
-
monkeyecxi18nConfigService.apply(config, environment);
|
|
2897
|
-
monkeyecxLogsConfigService.apply(config, configBoostrap, environment, identifyCode);
|
|
2898
|
-
monkeyEcxFeatureToggleService.apply(configSubject$, environment);
|
|
2899
|
-
monkeyStyleGuideSettingsService.boostrap(url + "/" + monkeyecxCode.toLowerCase() + "/monkey-style-guide-settings.json", internalValidations.bind(_this, configBoostrap, callback, environment));
|
|
2900
|
-
configSubject$.next(config);
|
|
2901
|
-
}, function (err) {
|
|
2902
|
-
monkeyecxErrorConfigService.apply('theme');
|
|
2903
|
-
console.error('Program Configuration not found!');
|
|
2904
|
-
rxjs.throwError(err);
|
|
2905
|
-
});
|
|
2906
|
-
};
|
|
2907
|
-
MonkeyEcxConfigService.prototype.init = function (callback, environment, identifyCode, monkeyecxCode) {
|
|
2908
|
-
var _this = this;
|
|
2909
|
-
var _a = this, monkeyecxService = _a.monkeyecxService, configBoostrapSubject$ = _a.configBoostrapSubject$, monkeyecxErrorConfigService = _a.monkeyecxErrorConfigService;
|
|
2910
|
-
monkeyecxService
|
|
2911
|
-
.get(environment.boostrapAssets + "?t=" + i1.MonkeyUtils.getRandomString(30), {
|
|
2912
|
-
observe: 'response'
|
|
2913
|
-
})
|
|
2914
|
-
.subscribe(function (resp) {
|
|
2915
|
-
var headers = resp.headers, body = resp.body;
|
|
2916
|
-
var monkeyCode = headers.get('monkey-code') || monkeyecxCode;
|
|
2917
|
-
if (monkeyCode) {
|
|
2918
|
-
_this.getWhiteLabelSettings(monkeyCode, body, callback, environment, identifyCode);
|
|
2919
|
-
configBoostrapSubject$.next(body);
|
|
2920
|
-
}
|
|
2921
|
-
else {
|
|
2922
|
-
monkeyecxErrorConfigService.apply('theme');
|
|
2923
|
-
console.error("Boostrap " + monkeyCode + " Configuration not found!");
|
|
2924
|
-
}
|
|
2925
|
-
}, function (err) {
|
|
2926
|
-
monkeyecxErrorConfigService.apply('theme');
|
|
2927
|
-
console.error('Boostrap Configuration not found!');
|
|
2928
|
-
rxjs.throwError(err);
|
|
2929
|
-
});
|
|
2930
|
-
};
|
|
2931
|
-
MonkeyEcxConfigService.prototype.config = function () {
|
|
2932
|
-
return this.configSubject$.asObservable();
|
|
2933
|
-
};
|
|
2934
|
-
MonkeyEcxConfigService.prototype.boostrapConfig = function () {
|
|
2935
|
-
return this.configBoostrapSubject$.asObservable();
|
|
2936
|
-
};
|
|
2937
|
-
return MonkeyEcxConfigService;
|
|
2938
|
-
}(MonkeyEcxCommonsService));
|
|
2939
|
-
MonkeyEcxConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxi18nConfigService }, { token: MonkeyEcxLogsConfigService }, { token: i1__namespace.MonkeyStyleGuideSettingsService }, { token: MonkeyEcxServiceWorkerConfigService }, { token: MonkeyEcxSecurityConsoleConfigService }, { token: MonkeyEcxMaintenanceConfigService }, { token: MonkeyEcxErrorConfigService }, { token: MonkeyEcxFeatureToggleService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2940
|
-
MonkeyEcxConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigService, providedIn: 'root' });
|
|
2941
|
-
__decorate([
|
|
2942
|
-
MonkeyEcxCoreService({
|
|
2943
|
-
httpResponse: {
|
|
2944
|
-
httpCodeIgnore: [404]
|
|
2945
|
-
},
|
|
2946
|
-
requestInProgress: {
|
|
2947
|
-
showProgress: false
|
|
2948
|
-
}
|
|
2949
|
-
})
|
|
2950
|
-
], MonkeyEcxConfigService.prototype, "init", null);
|
|
2951
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigService, decorators: [{
|
|
2952
|
-
type: i0.Injectable,
|
|
2953
|
-
args: [{
|
|
2954
|
-
providedIn: 'root'
|
|
2955
|
-
}]
|
|
2956
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxi18nConfigService }, { type: MonkeyEcxLogsConfigService }, { type: i1__namespace.MonkeyStyleGuideSettingsService }, { type: MonkeyEcxServiceWorkerConfigService }, { type: MonkeyEcxSecurityConsoleConfigService }, { type: MonkeyEcxMaintenanceConfigService }, { type: MonkeyEcxErrorConfigService }, { type: MonkeyEcxFeatureToggleService }]; }, propDecorators: { init: [] } });
|
|
2957
|
-
|
|
2958
|
-
var MonkeyEcxTokenStorageService = /** @class */ (function () {
|
|
2959
|
-
function MonkeyEcxTokenStorageService(monkeyecxConfigService) {
|
|
2960
|
-
var _this = this;
|
|
2961
|
-
this.monkeyecxConfigService = monkeyecxConfigService;
|
|
2962
|
-
this.config = null;
|
|
2963
|
-
this.token = {
|
|
2964
|
-
username: '',
|
|
2965
|
-
program: '',
|
|
2966
|
-
accessToken: '',
|
|
2967
|
-
refreshToken: '',
|
|
2968
|
-
companyId: '',
|
|
2969
|
-
governmentId: '',
|
|
2970
|
-
companyTypeUrl: '',
|
|
2971
|
-
companyType: '',
|
|
2972
|
-
programAdmin: false,
|
|
2973
|
-
programType: '',
|
|
2974
|
-
role: '',
|
|
2975
|
-
_clearIgnore: {
|
|
2976
|
-
ignore: ['username', 'program']
|
|
2977
|
-
}
|
|
2978
|
-
};
|
|
2979
|
-
this.token$ = new rxjs.BehaviorSubject(null);
|
|
2980
|
-
this.me$ = new rxjs.BehaviorSubject(null);
|
|
2981
|
-
this.monkeyecxConfigService.config().subscribe(function (_) {
|
|
2982
|
-
_this.config = _;
|
|
2983
|
-
});
|
|
2984
|
-
}
|
|
2985
|
-
MonkeyEcxTokenStorageService.prototype.setAllTokens = function (token) {
|
|
2986
|
-
var token$ = this.token$;
|
|
2987
|
-
Object.entries(token).forEach(function (_a) {
|
|
2988
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
2989
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
2990
|
-
localStorage.setItem(key, value);
|
|
2991
|
-
}
|
|
2992
|
-
});
|
|
2993
|
-
token$.next(token);
|
|
2994
|
-
};
|
|
2995
|
-
MonkeyEcxTokenStorageService.prototype.getAllTokens = function () {
|
|
2996
|
-
var token = this.token;
|
|
2997
|
-
var handledToken = Object.assign({}, token);
|
|
2998
|
-
Object.entries(token).forEach(function (_a) {
|
|
2999
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
3000
|
-
handledToken[key] = localStorage.getItem(key);
|
|
3001
|
-
});
|
|
3002
|
-
return handledToken;
|
|
3003
|
-
};
|
|
3004
|
-
MonkeyEcxTokenStorageService.prototype.setAllMe = function (me) {
|
|
3005
|
-
var me$ = this.me$;
|
|
3006
|
-
var previousMe = JSON.parse(localStorage.getItem('me'));
|
|
3007
|
-
Object.entries(me).forEach(function (_a) {
|
|
3008
|
-
var _b;
|
|
3009
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
3010
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
3011
|
-
previousMe = Object.assign(Object.assign({}, previousMe), (_b = {}, _b[key] = value, _b));
|
|
3012
|
-
}
|
|
3013
|
-
});
|
|
3014
|
-
localStorage.setItem('me', JSON.stringify(previousMe));
|
|
3015
|
-
me$.next(previousMe);
|
|
3016
|
-
};
|
|
3017
|
-
MonkeyEcxTokenStorageService.prototype.getAllMe = function () {
|
|
3018
|
-
var me = localStorage.getItem('me');
|
|
3019
|
-
return JSON.parse(me);
|
|
3020
|
-
};
|
|
3021
|
-
MonkeyEcxTokenStorageService.prototype.tokenHasChanged = function () {
|
|
3022
|
-
return this.token$.asObservable();
|
|
3023
|
-
};
|
|
3024
|
-
MonkeyEcxTokenStorageService.prototype.meHasChanged = function () {
|
|
3025
|
-
return this.me$.asObservable() || null;
|
|
3026
|
-
};
|
|
3027
|
-
MonkeyEcxTokenStorageService.prototype.getToken = function () {
|
|
3028
|
-
return this.getAllTokens();
|
|
3029
|
-
};
|
|
3030
|
-
MonkeyEcxTokenStorageService.prototype.getMe = function () {
|
|
3031
|
-
return this.getAllMe();
|
|
3032
|
-
};
|
|
3033
|
-
MonkeyEcxTokenStorageService.prototype.setToken = function (token) {
|
|
3034
|
-
this.setAllTokens(token);
|
|
3035
|
-
};
|
|
3036
|
-
MonkeyEcxTokenStorageService.prototype.setMe = function (me) {
|
|
3037
|
-
this.setAllMe(me);
|
|
3038
|
-
};
|
|
3039
|
-
MonkeyEcxTokenStorageService.prototype.clear = function (force) {
|
|
3040
|
-
var token = this.token;
|
|
3041
|
-
try {
|
|
3042
|
-
Object.entries(token).forEach(function (_a) {
|
|
3043
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
3044
|
-
if (token._clearIgnore.ignore.filter(function (val) {
|
|
3045
|
-
return val === key;
|
|
3046
|
-
}).length <= 0 ||
|
|
3047
|
-
force === true) {
|
|
3048
|
-
localStorage.removeItem(key);
|
|
3049
|
-
}
|
|
3050
|
-
});
|
|
3051
|
-
localStorage.removeItem('me');
|
|
3052
|
-
}
|
|
3053
|
-
catch (error) {
|
|
3054
|
-
return rxjs.of(false);
|
|
3055
|
-
}
|
|
3056
|
-
return rxjs.of(true);
|
|
3057
|
-
};
|
|
3058
|
-
/**
|
|
3059
|
-
* @param fields (the name of fields you want to clear. ie: ['companyId', 'role', ...])
|
|
3060
|
-
*/
|
|
3061
|
-
MonkeyEcxTokenStorageService.prototype.clearCredentials = function (fields) {
|
|
3062
|
-
if (fields === void 0) { fields = ['companyId', 'governmentId', 'companyType', 'programAdmin', 'role']; }
|
|
3063
|
-
fields === null || fields === void 0 ? void 0 : fields.forEach(function (key) {
|
|
3064
|
-
localStorage.removeItem(key);
|
|
3065
|
-
});
|
|
3066
|
-
};
|
|
3067
|
-
return MonkeyEcxTokenStorageService;
|
|
3068
|
-
}());
|
|
3069
|
-
MonkeyEcxTokenStorageService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTokenStorageService, deps: [{ token: MonkeyEcxConfigService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3070
|
-
MonkeyEcxTokenStorageService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTokenStorageService, providedIn: 'root' });
|
|
3071
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTokenStorageService, decorators: [{
|
|
3072
|
-
type: i0.Injectable,
|
|
3073
|
-
args: [{
|
|
3074
|
-
providedIn: 'root'
|
|
3075
|
-
}]
|
|
3076
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxConfigService }]; } });
|
|
3077
|
-
|
|
3078
|
-
var MonkeyEcxSecurityDirective = /** @class */ (function () {
|
|
3079
|
-
function MonkeyEcxSecurityDirective(elementRef, tokenStorageService, cdr) {
|
|
3080
|
-
this.elementRef = elementRef;
|
|
3081
|
-
this.tokenStorageService = tokenStorageService;
|
|
3082
|
-
this.cdr = cdr;
|
|
3083
|
-
this.byExclusion = false;
|
|
3084
|
-
// not to do
|
|
3085
|
-
}
|
|
3086
|
-
MonkeyEcxSecurityDirective.prototype.getRole = function () {
|
|
3087
|
-
var tokenCredentials = this.tokenCredentials;
|
|
3088
|
-
if (!tokenCredentials)
|
|
3089
|
-
return '';
|
|
3090
|
-
if ((tokenCredentials === null || tokenCredentials === void 0 ? void 0 : tokenCredentials.programAdmin) === 'true') {
|
|
3091
|
-
return 'PROGRAM_ADMIN';
|
|
3092
|
-
}
|
|
3093
|
-
return (tokenCredentials === null || tokenCredentials === void 0 ? void 0 : tokenCredentials.role) || '';
|
|
3094
|
-
};
|
|
3095
|
-
MonkeyEcxSecurityDirective.prototype.handleAccess = function () {
|
|
3096
|
-
var _a = this, roles = _a.roles, byExclusion = _a.byExclusion;
|
|
3097
|
-
var display = 'none';
|
|
3098
|
-
var found = roles === null || roles === void 0 ? void 0 : roles.indexOf(this.getRole());
|
|
3099
|
-
if (byExclusion) {
|
|
3100
|
-
display = 'block';
|
|
3101
|
-
if (found > -1) {
|
|
3102
|
-
display = 'none';
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
else {
|
|
3106
|
-
display = 'none';
|
|
3107
|
-
if (found > -1) {
|
|
3108
|
-
display = 'block';
|
|
3109
|
-
}
|
|
3110
|
-
}
|
|
3111
|
-
if (!roles || roles.length === 0 || (this.getRole() === 'PROGRAM_ADMIN'))
|
|
3112
|
-
display = 'block';
|
|
3113
|
-
this.elementRef.nativeElement.style.display = display;
|
|
3114
|
-
this.cdr.detectChanges();
|
|
3115
|
-
};
|
|
3116
|
-
MonkeyEcxSecurityDirective.prototype.ngOnInit = function () {
|
|
3117
|
-
var _this = this;
|
|
3118
|
-
this.elementRef.nativeElement.style.display = 'none';
|
|
3119
|
-
this.cdr.detectChanges();
|
|
3120
|
-
this.tokenStorageService.tokenHasChanged().subscribe(function () {
|
|
3121
|
-
_this.tokenCredentials = _this.tokenStorageService.getToken();
|
|
3122
|
-
_this.handleAccess();
|
|
3123
|
-
});
|
|
3124
|
-
this.tokenCredentials = this.tokenStorageService.getToken();
|
|
3125
|
-
this.handleAccess();
|
|
3126
|
-
};
|
|
3127
|
-
return MonkeyEcxSecurityDirective;
|
|
3128
|
-
}());
|
|
3129
|
-
MonkeyEcxSecurityDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxSecurityDirective, deps: [{ token: i0__namespace.ElementRef }, { token: MonkeyEcxTokenStorageService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
3130
|
-
MonkeyEcxSecurityDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxSecurityDirective, selector: "[monkeyecxSecurity]", inputs: { roles: ["securityRoles", "roles"], byExclusion: ["securityByExclusion", "byExclusion"] }, ngImport: i0__namespace });
|
|
3131
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxSecurityDirective, decorators: [{
|
|
3132
|
-
type: i0.Directive,
|
|
3133
|
-
args: [{
|
|
3134
|
-
selector: '[monkeyecxSecurity]'
|
|
3135
|
-
}]
|
|
3136
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: MonkeyEcxTokenStorageService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { roles: [{
|
|
3137
|
-
type: i0.Input,
|
|
3138
|
-
args: ['securityRoles']
|
|
3139
|
-
}], byExclusion: [{
|
|
3140
|
-
type: i0.Input,
|
|
3141
|
-
args: ['securityByExclusion']
|
|
3142
|
-
}] } });
|
|
3143
|
-
|
|
3144
|
-
var MonkeyEcxTooltipDirective = /** @class */ (function () {
|
|
3145
|
-
function MonkeyEcxTooltipDirective(el, renderer) {
|
|
3146
|
-
this.el = el;
|
|
3147
|
-
this.renderer = renderer;
|
|
3148
|
-
this.offset = 10;
|
|
3149
|
-
// not to do
|
|
3150
|
-
}
|
|
3151
|
-
MonkeyEcxTooltipDirective.prototype.onMouseEnter = function () {
|
|
3152
|
-
if (!this.tooltip) {
|
|
3153
|
-
this.show();
|
|
3154
|
-
}
|
|
3155
|
-
};
|
|
3156
|
-
MonkeyEcxTooltipDirective.prototype.onMouseLeave = function () {
|
|
3157
|
-
if (this.tooltip) {
|
|
3158
|
-
this.hide();
|
|
3159
|
-
}
|
|
3160
|
-
};
|
|
3161
|
-
MonkeyEcxTooltipDirective.prototype.clickout = function () {
|
|
3162
|
-
if (this.tooltip) {
|
|
3163
|
-
this.hide();
|
|
3164
|
-
}
|
|
3165
|
-
};
|
|
3166
|
-
MonkeyEcxTooltipDirective.prototype.show = function () {
|
|
3167
|
-
this.create();
|
|
3168
|
-
this.setPosition();
|
|
3169
|
-
this.renderer.addClass(this.tooltip, 'monkey-tooltip-show');
|
|
3170
|
-
};
|
|
3171
|
-
MonkeyEcxTooltipDirective.prototype.hide = function () {
|
|
3172
|
-
this.renderer.removeClass(this.tooltip, 'monkey-tooltip-show');
|
|
3173
|
-
this.renderer.removeChild(document.body, this.tooltip);
|
|
3174
|
-
this.tooltip = null;
|
|
3175
|
-
};
|
|
3176
|
-
MonkeyEcxTooltipDirective.prototype.create = function () {
|
|
3177
|
-
var tooltipElement = document.createElement('div');
|
|
3178
|
-
this.tooltip = this.renderer.createElement('span');
|
|
3179
|
-
if (this.tooltipTitle) {
|
|
3180
|
-
var tooltipTitleElement = document.createElement('span');
|
|
3181
|
-
tooltipTitleElement.innerText = "" + this.tooltipTitle;
|
|
3182
|
-
tooltipTitleElement.className = 'monkey-tooltip-title';
|
|
3183
|
-
tooltipElement.appendChild(tooltipTitleElement);
|
|
3184
|
-
}
|
|
3185
|
-
if (this.tooltipText) {
|
|
3186
|
-
var tooltipTextElement = document.createElement('span');
|
|
3187
|
-
tooltipTextElement.innerText = "" + this.tooltipText;
|
|
3188
|
-
tooltipTextElement.className = 'monkey-tooltip-description';
|
|
3189
|
-
tooltipElement.appendChild(tooltipTextElement);
|
|
3190
|
-
}
|
|
3191
|
-
this.renderer.appendChild(this.tooltip, tooltipElement);
|
|
3192
|
-
this.renderer.appendChild(document.body, this.tooltip);
|
|
3193
|
-
this.renderer.addClass(this.tooltip, 'monkey-tooltip');
|
|
3194
|
-
this.renderer.addClass(this.tooltip, "monkey-tooltip-" + this.tooltipPosition);
|
|
3195
|
-
this.renderer.setStyle(this.tooltip, '-webkit-transition', "opacity " + this.tooltipDelay + "ms");
|
|
3196
|
-
this.renderer.setStyle(this.tooltip, '-moz-transition', "opacity " + this.tooltipDelay + "ms");
|
|
3197
|
-
this.renderer.setStyle(this.tooltip, '-o-transition', "opacity " + this.tooltipDelay + "ms");
|
|
3198
|
-
this.renderer.setStyle(this.tooltip, 'transition', "opacity " + this.tooltipDelay + "ms");
|
|
3199
|
-
};
|
|
3200
|
-
MonkeyEcxTooltipDirective.prototype.setPosition = function () {
|
|
3201
|
-
var hostPos = this.el.nativeElement.getBoundingClientRect();
|
|
3202
|
-
var tooltipPos = this.tooltip.getBoundingClientRect();
|
|
3203
|
-
var scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
3204
|
-
var top;
|
|
3205
|
-
var left;
|
|
3206
|
-
if (this.tooltipPosition === 'top') {
|
|
3207
|
-
top = hostPos.top - tooltipPos.height - this.offset;
|
|
3208
|
-
left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
|
|
3209
|
-
}
|
|
3210
|
-
if (this.tooltipPosition === 'bottom') {
|
|
3211
|
-
top = hostPos.bottom + this.offset;
|
|
3212
|
-
left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
|
|
3213
|
-
}
|
|
3214
|
-
if (this.tooltipPosition === 'left') {
|
|
3215
|
-
top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
|
|
3216
|
-
left = hostPos.left - tooltipPos.width - this.offset;
|
|
3217
|
-
}
|
|
3218
|
-
if (this.tooltipPosition === 'right') {
|
|
3219
|
-
top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
|
|
3220
|
-
left = hostPos.right + this.offset;
|
|
3221
|
-
}
|
|
3222
|
-
this.renderer.setStyle(this.tooltip, 'top', top + scrollPos + "px");
|
|
3223
|
-
this.renderer.setStyle(this.tooltip, 'left', left + "px");
|
|
3224
|
-
};
|
|
3225
|
-
return MonkeyEcxTooltipDirective;
|
|
3226
|
-
}());
|
|
3227
|
-
MonkeyEcxTooltipDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTooltipDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
3228
|
-
MonkeyEcxTooltipDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxTooltipDirective, selector: "[monkeyecxTooltip]", inputs: { tooltipDelay: "tooltipDelay", tooltipPosition: "tooltipPosition", tooltipText: "tooltipText", tooltipTitle: "tooltipTitle" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "clickout()" } }, ngImport: i0__namespace });
|
|
3229
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTooltipDirective, decorators: [{
|
|
3230
|
-
type: i0.Directive,
|
|
3231
|
-
args: [{
|
|
3232
|
-
selector: '[monkeyecxTooltip]'
|
|
3233
|
-
}]
|
|
3234
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { tooltipDelay: [{
|
|
3235
|
-
type: i0.Input
|
|
3236
|
-
}], tooltipPosition: [{
|
|
3237
|
-
type: i0.Input
|
|
3238
|
-
}], tooltipText: [{
|
|
3239
|
-
type: i0.Input
|
|
3240
|
-
}], tooltipTitle: [{
|
|
3241
|
-
type: i0.Input
|
|
3242
|
-
}], onMouseEnter: [{
|
|
3243
|
-
type: i0.HostListener,
|
|
3244
|
-
args: ['mouseenter']
|
|
3245
|
-
}], onMouseLeave: [{
|
|
3246
|
-
type: i0.HostListener,
|
|
3247
|
-
args: ['mouseleave']
|
|
3248
|
-
}], clickout: [{
|
|
3249
|
-
type: i0.HostListener,
|
|
3250
|
-
args: ['click']
|
|
3251
|
-
}] } });
|
|
3252
|
-
|
|
3253
|
-
var MonkeyEcxDirectivesModule = /** @class */ (function () {
|
|
3254
|
-
function MonkeyEcxDirectivesModule() {
|
|
3255
|
-
}
|
|
3256
|
-
return MonkeyEcxDirectivesModule;
|
|
3257
|
-
}());
|
|
3258
|
-
MonkeyEcxDirectivesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDirectivesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3259
|
-
MonkeyEcxDirectivesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDirectivesModule, declarations: [MonkeyEcxDragDropDirective,
|
|
3260
|
-
MonkeyEcxFormatCurrency,
|
|
3261
|
-
MonkeyEcxFormatUpper,
|
|
3262
|
-
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3263
|
-
MonkeyEcxOnlyNumbersDirective,
|
|
3264
|
-
MonkeyEcxSecurityDirective,
|
|
3265
|
-
MonkeyEcxTooltipDirective], exports: [MonkeyEcxDragDropDirective,
|
|
3266
|
-
MonkeyEcxFormatCurrency,
|
|
3267
|
-
MonkeyEcxFormatUpper,
|
|
3268
|
-
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3269
|
-
MonkeyEcxOnlyNumbersDirective,
|
|
3270
|
-
MonkeyEcxSecurityDirective,
|
|
3271
|
-
MonkeyEcxTooltipDirective] });
|
|
3272
|
-
MonkeyEcxDirectivesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDirectivesModule });
|
|
3273
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDirectivesModule, decorators: [{
|
|
3274
|
-
type: i0.NgModule,
|
|
3275
|
-
args: [{
|
|
3276
|
-
declarations: [
|
|
3277
|
-
MonkeyEcxDragDropDirective,
|
|
3278
|
-
MonkeyEcxFormatCurrency,
|
|
3279
|
-
MonkeyEcxFormatUpper,
|
|
3280
|
-
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3281
|
-
MonkeyEcxOnlyNumbersDirective,
|
|
3282
|
-
MonkeyEcxSecurityDirective,
|
|
3283
|
-
MonkeyEcxTooltipDirective
|
|
3284
|
-
],
|
|
3285
|
-
exports: [
|
|
3286
|
-
MonkeyEcxDragDropDirective,
|
|
3287
|
-
MonkeyEcxFormatCurrency,
|
|
3288
|
-
MonkeyEcxFormatUpper,
|
|
3289
|
-
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3290
|
-
MonkeyEcxOnlyNumbersDirective,
|
|
3291
|
-
MonkeyEcxSecurityDirective,
|
|
3292
|
-
MonkeyEcxTooltipDirective
|
|
3293
|
-
]
|
|
3294
|
-
}]
|
|
3295
|
-
}] });
|
|
3296
|
-
|
|
3297
|
-
/* eslint-disable no-console */
|
|
3298
|
-
var MonkeyEcxAuthenticationService = /** @class */ (function () {
|
|
3299
|
-
function MonkeyEcxAuthenticationService() {
|
|
3300
|
-
this.hadAtLeastOneLogin = function () {
|
|
3301
|
-
console.error('hadAtLeastOneLogin needs to be declared!');
|
|
3302
|
-
return null;
|
|
3303
|
-
};
|
|
3304
|
-
this.redirectApp = function () {
|
|
3305
|
-
console.error('redirectApp needs to be declared!');
|
|
3306
|
-
return null;
|
|
3307
|
-
};
|
|
3308
|
-
this.redirectLoginWelcomeBack = function () {
|
|
3309
|
-
console.error('redirectLoginWelcomeBack needs to be declared!');
|
|
3310
|
-
return null;
|
|
3311
|
-
};
|
|
3312
|
-
this.isAuthorized = function () {
|
|
3313
|
-
console.error('isAuthorized needs to be declared!');
|
|
3314
|
-
return false;
|
|
3315
|
-
};
|
|
3316
|
-
this.getRequestWithHeaders = function (request) {
|
|
3317
|
-
console.error('getRequestWithHeaders needs to be declared!');
|
|
3318
|
-
return null;
|
|
3319
|
-
};
|
|
3320
|
-
this.getRequestWithHeadersOb = function (request) {
|
|
3321
|
-
console.error('getRequestWithHeadersOb needs to be declared!');
|
|
3322
|
-
return null;
|
|
3323
|
-
};
|
|
3324
|
-
this.refreshShouldHappen = function (response) {
|
|
3325
|
-
console.error('refreshShouldHappen needs to be declared!');
|
|
3326
|
-
return false;
|
|
3327
|
-
};
|
|
3328
|
-
this.refreshToken = function () {
|
|
3329
|
-
console.error('refreshToken needs to be declared!');
|
|
3330
|
-
return null;
|
|
3331
|
-
};
|
|
3332
|
-
// not to do
|
|
3333
|
-
}
|
|
3334
|
-
MonkeyEcxAuthenticationService.prototype.init = function (args) {
|
|
3335
|
-
this.hadAtLeastOneLogin = (args === null || args === void 0 ? void 0 : args.hadAtLeastOneLogin) || this.hadAtLeastOneLogin.bind(this);
|
|
3336
|
-
this.redirectApp = (args === null || args === void 0 ? void 0 : args.redirectApp) || this.redirectApp.bind(this);
|
|
3337
|
-
this.redirectLoginWelcomeBack = (args === null || args === void 0 ? void 0 : args.redirectLoginWelcomeBack) ||
|
|
3338
|
-
this.redirectLoginWelcomeBack.bind(this);
|
|
3339
|
-
this.isAuthorized = (args === null || args === void 0 ? void 0 : args.isAuthorized) || this.isAuthorized.bind(this);
|
|
3340
|
-
this.getRequestWithHeaders = (args === null || args === void 0 ? void 0 : args.getRequestWithHeaders) ||
|
|
3341
|
-
this.getRequestWithHeaders.bind(this);
|
|
3342
|
-
this.getRequestWithHeadersOb = args === null || args === void 0 ? void 0 : args.getRequestWithHeadersOb.bind(this);
|
|
3343
|
-
this.refreshShouldHappen = (args === null || args === void 0 ? void 0 : args.refreshShouldHappen) || this.refreshShouldHappen.bind(this);
|
|
3344
|
-
this.refreshToken = (args === null || args === void 0 ? void 0 : args.refreshToken) || this.refreshToken.bind(this);
|
|
3345
|
-
};
|
|
3346
|
-
return MonkeyEcxAuthenticationService;
|
|
3347
|
-
}());
|
|
3348
|
-
MonkeyEcxAuthenticationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthenticationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3349
|
-
MonkeyEcxAuthenticationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthenticationService, providedIn: 'root' });
|
|
3350
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthenticationService, decorators: [{
|
|
3351
|
-
type: i0.Injectable,
|
|
3352
|
-
args: [{
|
|
3353
|
-
providedIn: 'root'
|
|
3354
|
-
}]
|
|
3355
|
-
}], ctorParameters: function () { return []; } });
|
|
3356
|
-
|
|
3357
|
-
var MonkeyEcxAuthGuardLogin = /** @class */ (function () {
|
|
3358
|
-
function MonkeyEcxAuthGuardLogin(monkeyecxAuthenticationService) {
|
|
3359
|
-
this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
3360
|
-
// not to do
|
|
3361
|
-
}
|
|
3362
|
-
MonkeyEcxAuthGuardLogin.prototype.canActivate = function () {
|
|
3363
|
-
if (this.monkeyecxAuthenticationService.isAuthorized()) {
|
|
3364
|
-
this.monkeyecxAuthenticationService.redirectApp();
|
|
3365
|
-
return false;
|
|
3366
|
-
}
|
|
3367
|
-
if (this.monkeyecxAuthenticationService.hadAtLeastOneLogin()) {
|
|
3368
|
-
this.monkeyecxAuthenticationService.redirectLoginWelcomeBack();
|
|
3369
|
-
return false;
|
|
3370
|
-
}
|
|
3371
|
-
return true;
|
|
3372
|
-
};
|
|
3373
|
-
return MonkeyEcxAuthGuardLogin;
|
|
3374
|
-
}());
|
|
3375
|
-
MonkeyEcxAuthGuardLogin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthGuardLogin, deps: [{ token: MonkeyEcxAuthenticationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3376
|
-
MonkeyEcxAuthGuardLogin.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthGuardLogin, providedIn: 'root' });
|
|
3377
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthGuardLogin, decorators: [{
|
|
3378
|
-
type: i0.Injectable,
|
|
3379
|
-
args: [{
|
|
3380
|
-
providedIn: 'root'
|
|
3381
|
-
}]
|
|
3382
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxAuthenticationService }]; } });
|
|
3383
|
-
|
|
3384
|
-
var MonkeyEcxAuthGuard = /** @class */ (function () {
|
|
3385
|
-
function MonkeyEcxAuthGuard(monkeyecxAuthenticationService) {
|
|
3386
|
-
this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
3387
|
-
// not to do
|
|
3388
|
-
}
|
|
3389
|
-
MonkeyEcxAuthGuard.prototype.canActivate = function () {
|
|
3390
|
-
var monkeyecxAuthenticationService = this.monkeyecxAuthenticationService;
|
|
3391
|
-
if (monkeyecxAuthenticationService.isAuthorized()) {
|
|
3392
|
-
return true;
|
|
3393
|
-
}
|
|
3394
|
-
monkeyecxAuthenticationService.redirectLoginWelcomeBack();
|
|
3395
|
-
return false;
|
|
3396
|
-
};
|
|
3397
|
-
return MonkeyEcxAuthGuard;
|
|
3398
|
-
}());
|
|
3399
|
-
MonkeyEcxAuthGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthGuard, deps: [{ token: MonkeyEcxAuthenticationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3400
|
-
MonkeyEcxAuthGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthGuard, providedIn: 'root' });
|
|
3401
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxAuthGuard, decorators: [{
|
|
3402
|
-
type: i0.Injectable,
|
|
3403
|
-
args: [{
|
|
3404
|
-
providedIn: 'root'
|
|
3405
|
-
}]
|
|
3406
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxAuthenticationService }]; } });
|
|
3407
|
-
|
|
3408
|
-
var MonkeyEcxHttpErrorHandlingService = /** @class */ (function (_super) {
|
|
3409
|
-
__extends(MonkeyEcxHttpErrorHandlingService, _super);
|
|
3410
|
-
function MonkeyEcxHttpErrorHandlingService(monkeyecxService, tokenStorage, monkeyecxAuthenticationService, router, snackbarService, translateService) {
|
|
3411
|
-
var _this = _super.call(this, monkeyecxService, tokenStorage) || this;
|
|
3412
|
-
_this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
3413
|
-
_this.router = router;
|
|
3414
|
-
_this.snackbarService = snackbarService;
|
|
3415
|
-
_this.translateService = translateService;
|
|
3416
|
-
_super.prototype.resolve.call(_this, null, null);
|
|
3417
|
-
_this.geti18n(_this.translateService, 'SERVICES.WARNING');
|
|
3418
|
-
return _this;
|
|
3419
|
-
}
|
|
3420
|
-
MonkeyEcxHttpErrorHandlingService.prototype.isHttpCodeIgnoreMessage = function (tp, httpCode) {
|
|
3421
|
-
var _a, _b;
|
|
3422
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(tp) && !(tp === null || tp === void 0 ? void 0 : tp.httpResponse)) {
|
|
3423
|
-
return false;
|
|
3424
|
-
}
|
|
3425
|
-
var found = ((_b = (_a = tp === null || tp === void 0 ? void 0 : tp.httpResponse) === null || _a === void 0 ? void 0 : _a.httpCodeIgnore) === null || _b === void 0 ? void 0 : _b.indexOf(httpCode)) > -1;
|
|
3426
|
-
return found;
|
|
3427
|
-
};
|
|
3428
|
-
MonkeyEcxHttpErrorHandlingService.prototype.isHttpCodeIgnoreRedirect = function (tp, httpCode) {
|
|
3429
|
-
var _a, _b;
|
|
3430
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(tp) && !(tp === null || tp === void 0 ? void 0 : tp.httpResponse)) {
|
|
3431
|
-
return false;
|
|
3432
|
-
}
|
|
3433
|
-
var found = ((_b = (_a = tp === null || tp === void 0 ? void 0 : tp.httpResponse) === null || _a === void 0 ? void 0 : _a.httpCodeIgnoreRedirect) === null || _b === void 0 ? void 0 : _b.indexOf(httpCode)) > -1;
|
|
3434
|
-
return found;
|
|
3435
|
-
};
|
|
3436
|
-
MonkeyEcxHttpErrorHandlingService.prototype.getMessageType = function (status) {
|
|
3437
|
-
if (status === 409 || status === 400) {
|
|
3438
|
-
return 'warning';
|
|
3439
|
-
}
|
|
3440
|
-
return 'error';
|
|
3441
|
-
};
|
|
3442
|
-
MonkeyEcxHttpErrorHandlingService.prototype.showMessage = function (message, error, mkc) {
|
|
3443
|
-
var _a;
|
|
3444
|
-
var snackbarService = this.snackbarService;
|
|
3445
|
-
if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
3446
|
-
snackbarService.show({
|
|
3447
|
-
title: (_a = this.__i18n) === null || _a === void 0 ? void 0 : _a.TITLE,
|
|
3448
|
-
message: message,
|
|
3449
|
-
type: this.getMessageType(error.status),
|
|
3450
|
-
duration: 4000,
|
|
3451
|
-
horizontalPosition: 'center',
|
|
3452
|
-
verticalPosition: 'top'
|
|
3453
|
-
});
|
|
3454
|
-
}
|
|
3455
|
-
};
|
|
3456
|
-
MonkeyEcxHttpErrorHandlingService.prototype.handleMessage = function (error, mkc) {
|
|
3457
|
-
var _this = this;
|
|
3458
|
-
var _a;
|
|
3459
|
-
// eslint-disable-next-line camelcase
|
|
3460
|
-
var _c = error.error, notifications = _c.notifications, error_description = _c.error_description, message = _c.message;
|
|
3461
|
-
var customMessage = '';
|
|
3462
|
-
if (message) {
|
|
3463
|
-
customMessage = message;
|
|
3464
|
-
}
|
|
3465
|
-
// eslint-disable-next-line camelcase
|
|
3466
|
-
if (error_description) {
|
|
3467
|
-
// eslint-disable-next-line camelcase
|
|
3468
|
-
customMessage = error_description;
|
|
3469
|
-
}
|
|
3470
|
-
if (notifications) {
|
|
3471
|
-
customMessage = notifications;
|
|
3472
|
-
}
|
|
3473
|
-
if (!customMessage) {
|
|
3474
|
-
if (error.error instanceof Blob) {
|
|
3475
|
-
var blob = new Blob([error.error], {
|
|
3476
|
-
type: 'application/json'
|
|
3477
|
-
});
|
|
3478
|
-
var reader = new FileReader();
|
|
3479
|
-
reader.addEventListener('loadend', function (e) {
|
|
3480
|
-
var text = e.target.result;
|
|
3481
|
-
var jsonResp = JSON.parse(text);
|
|
3482
|
-
customMessage = jsonResp.notifications;
|
|
3483
|
-
_this.showMessage(customMessage, error, mkc);
|
|
3484
|
-
});
|
|
3485
|
-
reader.readAsText(blob);
|
|
3486
|
-
}
|
|
3487
|
-
else {
|
|
3488
|
-
this.showMessage((_a = this.__i18n['ERROR-HANDLING']) === null || _a === void 0 ? void 0 : _a.ERROR, error, mkc);
|
|
3489
|
-
}
|
|
3490
|
-
}
|
|
3491
|
-
else {
|
|
3492
|
-
this.showMessage(customMessage, error, mkc);
|
|
3493
|
-
}
|
|
3494
|
-
};
|
|
3495
|
-
MonkeyEcxHttpErrorHandlingService.prototype.handleError = function (error, mkc) {
|
|
3496
|
-
var _this = this;
|
|
3497
|
-
var router = this.router;
|
|
3498
|
-
var status = error.status;
|
|
3499
|
-
var routes = {
|
|
3500
|
-
403: 'forbidden',
|
|
3501
|
-
500: 'service-problems',
|
|
3502
|
-
503: 'service-problems'
|
|
3503
|
-
};
|
|
3504
|
-
var found = routes[status];
|
|
3505
|
-
var timeout = 0;
|
|
3506
|
-
if (found && !this.isHttpCodeIgnoreRedirect(mkc, error.status)) {
|
|
3507
|
-
var route = ("/app/pages/" + found).toLowerCase();
|
|
3508
|
-
timeout = 800;
|
|
3509
|
-
router.navigate([route]);
|
|
3510
|
-
}
|
|
3511
|
-
setTimeout(function () {
|
|
3512
|
-
_this.handleMessage(error, mkc);
|
|
3513
|
-
}, timeout);
|
|
3514
|
-
};
|
|
3515
|
-
MonkeyEcxHttpErrorHandlingService.prototype.handleErrorRefreshToken = function (error, mkc) {
|
|
3516
|
-
if (error.status === 401 || error.status === 400) {
|
|
3517
|
-
i0.NgZone.call(this.monkeyecxAuthenticationService.redirectLoginWelcomeBack());
|
|
3518
|
-
}
|
|
3519
|
-
else if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
3520
|
-
this.handleMessage(error, mkc);
|
|
3521
|
-
}
|
|
3522
|
-
};
|
|
3523
|
-
return MonkeyEcxHttpErrorHandlingService;
|
|
3524
|
-
}(MonkeyEcxCommonsService));
|
|
3525
|
-
MonkeyEcxHttpErrorHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpErrorHandlingService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxTokenStorageService }, { token: MonkeyEcxAuthenticationService }, { token: i1__namespace$3.Router }, { token: i1__namespace.MonkeyStyleGuideSnackbarService }, { token: i1__namespace$1.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3526
|
-
MonkeyEcxHttpErrorHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpErrorHandlingService, providedIn: 'root' });
|
|
3527
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpErrorHandlingService, decorators: [{
|
|
3528
|
-
type: i0.Injectable,
|
|
3529
|
-
args: [{
|
|
3530
|
-
providedIn: 'root'
|
|
3531
|
-
}]
|
|
3532
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxTokenStorageService }, { type: MonkeyEcxAuthenticationService }, { type: i1__namespace$3.Router }, { type: i1__namespace.MonkeyStyleGuideSnackbarService }, { type: i1__namespace$1.TranslateService }]; } });
|
|
3533
|
-
|
|
3534
|
-
var MonkeyEcxOthersErrorsHandlingService = /** @class */ (function () {
|
|
3535
|
-
function MonkeyEcxOthersErrorsHandlingService(modalService) {
|
|
3536
|
-
this.modalService = modalService;
|
|
3537
|
-
// not to do
|
|
3538
|
-
}
|
|
3539
|
-
MonkeyEcxOthersErrorsHandlingService.prototype.handleError = function (error) {
|
|
3540
|
-
var modalService = this.modalService;
|
|
3541
|
-
var message = error.message;
|
|
3542
|
-
if (new RegExp(/Loading chunk [\d]+ failed/).test(message)) {
|
|
3543
|
-
modalService.open(VersionChangedComponent, {
|
|
3544
|
-
color: 'theme',
|
|
3545
|
-
size: 'md'
|
|
3546
|
-
});
|
|
3547
|
-
}
|
|
3548
|
-
};
|
|
3549
|
-
return MonkeyEcxOthersErrorsHandlingService;
|
|
3550
|
-
}());
|
|
3551
|
-
MonkeyEcxOthersErrorsHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOthersErrorsHandlingService, deps: [{ token: i1__namespace.MonkeyStyleGuideModalService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3552
|
-
MonkeyEcxOthersErrorsHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOthersErrorsHandlingService, providedIn: 'root' });
|
|
3553
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxOthersErrorsHandlingService, decorators: [{
|
|
3554
|
-
type: i0.Injectable,
|
|
3555
|
-
args: [{
|
|
3556
|
-
providedIn: 'root'
|
|
3557
|
-
}]
|
|
3558
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.MonkeyStyleGuideModalService }]; } });
|
|
3559
|
-
|
|
3560
|
-
var MonkeyEcxErrorHandlingService = /** @class */ (function () {
|
|
3561
|
-
function MonkeyEcxErrorHandlingService(injector) {
|
|
3562
|
-
this.injector = injector;
|
|
3563
|
-
// not to do
|
|
3564
|
-
}
|
|
3565
|
-
MonkeyEcxErrorHandlingService.prototype.handleError = function (error, type) {
|
|
3566
|
-
var injector = this.injector;
|
|
3567
|
-
var handlingService = injector.get(MonkeyEcxHandlingService);
|
|
3568
|
-
var httpErrorHandlingService = injector.get(MonkeyEcxHttpErrorHandlingService);
|
|
3569
|
-
var othersErrorsHandlingService = injector.get(MonkeyEcxOthersErrorsHandlingService);
|
|
3570
|
-
if (error instanceof i1$4.HttpErrorResponse) {
|
|
3571
|
-
var sCredentials = handlingService.getMonkeyEcxServiceCredentials();
|
|
3572
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(type) && type === 'refresh_token') {
|
|
3573
|
-
httpErrorHandlingService.handleErrorRefreshToken(error, sCredentials);
|
|
3574
|
-
}
|
|
3575
|
-
else
|
|
3576
|
-
httpErrorHandlingService.handleError(error, sCredentials);
|
|
3577
|
-
}
|
|
3578
|
-
else {
|
|
3579
|
-
othersErrorsHandlingService.handleError(error);
|
|
3580
|
-
}
|
|
3581
|
-
};
|
|
3582
|
-
return MonkeyEcxErrorHandlingService;
|
|
3583
|
-
}());
|
|
3584
|
-
MonkeyEcxErrorHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3585
|
-
MonkeyEcxErrorHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingService, providedIn: 'root' });
|
|
3586
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingService, decorators: [{
|
|
3587
|
-
type: i0.Injectable,
|
|
3588
|
-
args: [{
|
|
3589
|
-
providedIn: 'root'
|
|
3590
|
-
}]
|
|
3591
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
3592
|
-
|
|
3593
|
-
var MonkeyEcxErrorHandlingModule = /** @class */ (function () {
|
|
3594
|
-
function MonkeyEcxErrorHandlingModule() {
|
|
3595
|
-
}
|
|
3596
|
-
MonkeyEcxErrorHandlingModule.forRoot = function () {
|
|
3597
|
-
return {
|
|
3598
|
-
ngModule: MonkeyEcxErrorHandlingModule,
|
|
3599
|
-
providers: [
|
|
3600
|
-
{
|
|
3601
|
-
provide: i0.ErrorHandler,
|
|
3602
|
-
useClass: MonkeyEcxErrorHandlingService
|
|
3603
|
-
}
|
|
3604
|
-
]
|
|
3605
|
-
};
|
|
3606
|
-
};
|
|
3607
|
-
return MonkeyEcxErrorHandlingModule;
|
|
3608
|
-
}());
|
|
3609
|
-
MonkeyEcxErrorHandlingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3610
|
-
MonkeyEcxErrorHandlingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingModule, imports: [i1$2.CommonModule] });
|
|
3611
|
-
MonkeyEcxErrorHandlingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingModule, imports: [[i1$2.CommonModule]] });
|
|
3612
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxErrorHandlingModule, decorators: [{
|
|
3613
|
-
type: i0.NgModule,
|
|
3614
|
-
args: [{
|
|
3615
|
-
imports: [i1$2.CommonModule]
|
|
3616
|
-
}]
|
|
3617
|
-
}] });
|
|
3618
|
-
|
|
3619
|
-
var MonkeyEcxHttpConfigErrorInterceptor = /** @class */ (function () {
|
|
3620
|
-
function MonkeyEcxHttpConfigErrorInterceptor(monkeyecxAuthenticationService, monkeyecxErrorHandlingService) {
|
|
3621
|
-
this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
3622
|
-
this.monkeyecxErrorHandlingService = monkeyecxErrorHandlingService;
|
|
3623
|
-
// no to do
|
|
3624
|
-
}
|
|
3625
|
-
MonkeyEcxHttpConfigErrorInterceptor.prototype.intercept = function (request, next) {
|
|
3626
|
-
var _this = this;
|
|
3627
|
-
return next.handle(request).pipe(operators.map(function (event) {
|
|
3628
|
-
return event;
|
|
3629
|
-
}), operators.catchError(function (error) {
|
|
3630
|
-
if (_this.monkeyecxAuthenticationService.refreshShouldHappen(error)) {
|
|
3631
|
-
return _this.monkeyecxAuthenticationService.refreshToken().pipe(operators.take(1), operators.map(function () {
|
|
3632
|
-
return _this.monkeyecxAuthenticationService.getRequestWithHeaders(request);
|
|
3633
|
-
}), operators.mergeMap(function (resp) {
|
|
3634
|
-
return next.handle(resp).pipe(operators.catchError(function (error) {
|
|
3635
|
-
_this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
3636
|
-
return rxjs.throwError(null);
|
|
3637
|
-
}));
|
|
3638
|
-
}), operators.catchError(function (error) {
|
|
3639
|
-
_this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
3640
|
-
return rxjs.throwError(null);
|
|
3641
|
-
}));
|
|
3642
|
-
}
|
|
3643
|
-
return rxjs.throwError(error);
|
|
3644
|
-
}));
|
|
3645
|
-
};
|
|
3646
|
-
return MonkeyEcxHttpConfigErrorInterceptor;
|
|
3647
|
-
}());
|
|
3648
|
-
MonkeyEcxHttpConfigErrorInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigErrorInterceptor, deps: [{ token: MonkeyEcxAuthenticationService }, { token: MonkeyEcxErrorHandlingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3649
|
-
MonkeyEcxHttpConfigErrorInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigErrorInterceptor });
|
|
3650
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigErrorInterceptor, decorators: [{
|
|
3651
|
-
type: i0.Injectable
|
|
3652
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxAuthenticationService }, { type: MonkeyEcxErrorHandlingService }]; } });
|
|
3653
|
-
|
|
3654
|
-
var MonkeyEcxHttpConfigHeaderInterceptor = /** @class */ (function () {
|
|
3655
|
-
function MonkeyEcxHttpConfigHeaderInterceptor(monkeyecxAuthenticationService, monkeyecxErrorHandlingService) {
|
|
3656
|
-
this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
|
|
3657
|
-
this.monkeyecxErrorHandlingService = monkeyecxErrorHandlingService;
|
|
3658
|
-
// not to do
|
|
3659
|
-
}
|
|
3660
|
-
MonkeyEcxHttpConfigHeaderInterceptor.prototype.intercept = function (request, next) {
|
|
3661
|
-
var _this = this;
|
|
3662
|
-
return this.monkeyecxAuthenticationService.getRequestWithHeadersOb(request).pipe(operators.take(1), operators.map(function (event) {
|
|
3663
|
-
return event;
|
|
3664
|
-
}), operators.mergeMap(function (resp) {
|
|
3665
|
-
request = request.clone({
|
|
3666
|
-
setHeaders: resp
|
|
3667
|
-
});
|
|
3668
|
-
return next.handle(request);
|
|
3669
|
-
}), operators.catchError(function (error) {
|
|
3670
|
-
_this.monkeyecxErrorHandlingService.handleError(error);
|
|
3671
|
-
return rxjs.throwError(error);
|
|
3672
|
-
}));
|
|
3673
|
-
};
|
|
3674
|
-
return MonkeyEcxHttpConfigHeaderInterceptor;
|
|
3675
|
-
}());
|
|
3676
|
-
MonkeyEcxHttpConfigHeaderInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigHeaderInterceptor, deps: [{ token: MonkeyEcxAuthenticationService }, { token: MonkeyEcxErrorHandlingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3677
|
-
MonkeyEcxHttpConfigHeaderInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigHeaderInterceptor });
|
|
3678
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigHeaderInterceptor, decorators: [{
|
|
3679
|
-
type: i0.Injectable
|
|
3680
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxAuthenticationService }, { type: MonkeyEcxErrorHandlingService }]; } });
|
|
3681
|
-
|
|
3682
|
-
var MonkeyEcxRequestQueueHandlingService = /** @class */ (function () {
|
|
3683
|
-
function MonkeyEcxRequestQueueHandlingService() {
|
|
3684
|
-
this.queue = [];
|
|
3685
|
-
this.newQueue = new rxjs.BehaviorSubject(false);
|
|
3686
|
-
this.queues$ = new rxjs.BehaviorSubject([]);
|
|
3687
|
-
}
|
|
3688
|
-
MonkeyEcxRequestQueueHandlingService.prototype.addToQueue = function (q) {
|
|
3689
|
-
this.queue.push(q);
|
|
3690
|
-
this.queues$.next(this.queue);
|
|
3691
|
-
this.newQueue.next(true);
|
|
3692
|
-
};
|
|
3693
|
-
MonkeyEcxRequestQueueHandlingService.prototype.markQueueItemAsFinish = function (q, status, action) {
|
|
3694
|
-
var saved = __spreadArray([], __read(this.queue));
|
|
3695
|
-
this.queue = __spreadArray([], __read(saved.map(function (val) {
|
|
3696
|
-
var valSaved = Object.assign({}, val);
|
|
3697
|
-
if (val.status === MonkeyEcxQueueEvents.OnGoing) {
|
|
3698
|
-
if (valSaved.item.id === q.item.id) {
|
|
3699
|
-
return Object.assign(Object.assign({}, valSaved), { status: status || MonkeyEcxQueueEvents.Finished, action: action });
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
return valSaved;
|
|
3703
|
-
})));
|
|
3704
|
-
this.queues$.next(this.queue);
|
|
3705
|
-
};
|
|
3706
|
-
MonkeyEcxRequestQueueHandlingService.prototype.updateQueue = function (q, progress) {
|
|
3707
|
-
var saved = __spreadArray([], __read(this.queue));
|
|
3708
|
-
this.queue = __spreadArray([], __read(saved.map(function (val) {
|
|
3709
|
-
var valSaved = Object.assign({}, val);
|
|
3710
|
-
var total = progress.total, loaded = progress.loaded;
|
|
3711
|
-
var currentPecentage = Math.floor((loaded / total) * 100);
|
|
3712
|
-
var totalPercentage = 100;
|
|
3713
|
-
if (valSaved.item.id === q.item.id) {
|
|
3714
|
-
return Object.assign(Object.assign({}, valSaved), { progress: {
|
|
3715
|
-
loaded: loaded,
|
|
3716
|
-
total: total,
|
|
3717
|
-
currentPercentage: currentPecentage,
|
|
3718
|
-
totalPercentage: totalPercentage
|
|
3719
|
-
} });
|
|
3720
|
-
}
|
|
3721
|
-
return valSaved;
|
|
3722
|
-
})));
|
|
3723
|
-
this.queues$.next(this.queue);
|
|
3724
|
-
};
|
|
3725
|
-
MonkeyEcxRequestQueueHandlingService.prototype.deleteQueue = function (q) {
|
|
3726
|
-
var saved = __spreadArray([], __read(this.queue));
|
|
3727
|
-
this.queue = __spreadArray([], __read(saved.map(function (val) {
|
|
3728
|
-
var valSaved = Object.assign({}, val);
|
|
3729
|
-
if (valSaved.item.id === q.item.id) {
|
|
3730
|
-
return null;
|
|
3731
|
-
}
|
|
3732
|
-
return valSaved;
|
|
3733
|
-
}))).filter(function (_) {
|
|
3734
|
-
return _;
|
|
3735
|
-
});
|
|
3736
|
-
this.queues$.next(this.queue);
|
|
3737
|
-
};
|
|
3738
|
-
MonkeyEcxRequestQueueHandlingService.prototype.setQueue = function (q) {
|
|
3739
|
-
this.addToQueue(q);
|
|
3740
|
-
};
|
|
3741
|
-
MonkeyEcxRequestQueueHandlingService.prototype.getQueue = function () {
|
|
3742
|
-
return this.queues$.asObservable();
|
|
3743
|
-
};
|
|
3744
|
-
MonkeyEcxRequestQueueHandlingService.prototype.finishQueueItem = function (q, action, status) {
|
|
3745
|
-
this.markQueueItemAsFinish(q, status, action);
|
|
3746
|
-
};
|
|
3747
|
-
MonkeyEcxRequestQueueHandlingService.prototype.removeQueueItem = function (q) {
|
|
3748
|
-
this.deleteQueue(q);
|
|
3749
|
-
};
|
|
3750
|
-
MonkeyEcxRequestQueueHandlingService.prototype.updateQueueItem = function (q, progress) {
|
|
3751
|
-
this.updateQueue(q, progress);
|
|
3752
|
-
};
|
|
3753
|
-
MonkeyEcxRequestQueueHandlingService.prototype.hasNewQueue = function () {
|
|
3754
|
-
return this.newQueue.pipe(operators.map(function (_) {
|
|
3755
|
-
return _;
|
|
3756
|
-
}));
|
|
3757
|
-
};
|
|
3758
|
-
return MonkeyEcxRequestQueueHandlingService;
|
|
3759
|
-
}());
|
|
3760
|
-
MonkeyEcxRequestQueueHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestQueueHandlingService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3761
|
-
MonkeyEcxRequestQueueHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestQueueHandlingService, providedIn: 'root' });
|
|
3762
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestQueueHandlingService, decorators: [{
|
|
3763
|
-
type: i0.Injectable,
|
|
3764
|
-
args: [{
|
|
3765
|
-
providedIn: 'root'
|
|
3766
|
-
}]
|
|
3767
|
-
}], ctorParameters: function () { return []; } });
|
|
3768
|
-
|
|
3769
|
-
var MonkeyEcxRequestQueueModalHandlingService = /** @class */ (function () {
|
|
3770
|
-
function MonkeyEcxRequestQueueModalHandlingService() {
|
|
3771
|
-
this.queue = [];
|
|
3772
|
-
this.newQueue$ = new rxjs.BehaviorSubject(false);
|
|
3773
|
-
this.allQueueFinished$ = new rxjs.BehaviorSubject(false);
|
|
3774
|
-
this.queues$ = new rxjs.BehaviorSubject([]);
|
|
3775
|
-
}
|
|
3776
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.addToQueue = function (q) {
|
|
3777
|
-
this.queue.push(q);
|
|
3778
|
-
this.queues$.next(this.queue);
|
|
3779
|
-
this.newQueue$.next(true);
|
|
3780
|
-
};
|
|
3781
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.markQueueItemAsFinish = function (q, status, action) {
|
|
3782
|
-
var saved = __spreadArray([], __read(this.queue));
|
|
3783
|
-
this.queue = __spreadArray([], __read(saved.map(function (val) {
|
|
3784
|
-
var valSaved = Object.assign({}, val);
|
|
3785
|
-
if (val.status === MonkeyEcxQueueEvents.OnGoing) {
|
|
3786
|
-
if (valSaved.item.id === q.item.id) {
|
|
3787
|
-
return Object.assign(Object.assign({}, valSaved), { status: status || MonkeyEcxQueueEvents.Finished, action: action });
|
|
3788
|
-
}
|
|
3789
|
-
}
|
|
3790
|
-
return valSaved;
|
|
3791
|
-
})));
|
|
3792
|
-
this.queues$.next(this.queue);
|
|
3793
|
-
};
|
|
3794
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.updateQueue = function (q, progress) {
|
|
3795
|
-
var saved = __spreadArray([], __read(this.queue));
|
|
3796
|
-
this.queue = __spreadArray([], __read(saved.map(function (val) {
|
|
3797
|
-
var valSaved = Object.assign({}, val);
|
|
3798
|
-
var total = progress.total, loaded = progress.loaded;
|
|
3799
|
-
var currentPecentage = Math.floor((loaded / total) * 100);
|
|
3800
|
-
var totalPercentage = 100;
|
|
3801
|
-
if (valSaved.item.id === q.item.id) {
|
|
3802
|
-
return Object.assign(Object.assign({}, valSaved), { progress: {
|
|
3803
|
-
loaded: loaded,
|
|
3804
|
-
total: total,
|
|
3805
|
-
currentPercentage: currentPecentage,
|
|
3806
|
-
totalPercentage: totalPercentage
|
|
3807
|
-
} });
|
|
3808
|
-
}
|
|
3809
|
-
return valSaved;
|
|
3810
|
-
})));
|
|
3811
|
-
this.queues$.next(this.queue);
|
|
3812
|
-
};
|
|
3813
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.deleteQueue = function (q) {
|
|
3814
|
-
var saved = __spreadArray([], __read(this.queue));
|
|
3815
|
-
this.queue = __spreadArray([], __read(saved.map(function (val) {
|
|
3816
|
-
var valSaved = Object.assign({}, val);
|
|
3817
|
-
if (valSaved.item.id === q.item.id) {
|
|
3818
|
-
return null;
|
|
3819
|
-
}
|
|
3820
|
-
return valSaved;
|
|
3821
|
-
}))).filter(function (_) {
|
|
3822
|
-
return _;
|
|
3823
|
-
});
|
|
3824
|
-
this.queues$.next(this.queue);
|
|
3825
|
-
if (this.queue.length <= 0) {
|
|
3826
|
-
this.allQueueFinished$.next(true);
|
|
3827
|
-
}
|
|
3828
|
-
};
|
|
3829
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.setQueue = function (q) {
|
|
3830
|
-
this.addToQueue(q);
|
|
3831
|
-
};
|
|
3832
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.getQueue = function () {
|
|
3833
|
-
return this.queues$.asObservable();
|
|
3834
|
-
};
|
|
3835
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.finishQueueItem = function (q, action, status) {
|
|
3836
|
-
this.markQueueItemAsFinish(q, status, action);
|
|
3837
|
-
};
|
|
3838
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.removeQueueItem = function (q) {
|
|
3839
|
-
this.deleteQueue(q);
|
|
3840
|
-
};
|
|
3841
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.updateQueueItem = function (q, progress) {
|
|
3842
|
-
this.updateQueue(q, progress);
|
|
3843
|
-
};
|
|
3844
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.hasNewQueue = function () {
|
|
3845
|
-
return this.newQueue$.pipe(operators.map(function (_) {
|
|
3846
|
-
return _;
|
|
3847
|
-
}));
|
|
3848
|
-
};
|
|
3849
|
-
MonkeyEcxRequestQueueModalHandlingService.prototype.hasAllQueueFinished = function () {
|
|
3850
|
-
return this.allQueueFinished$.pipe(operators.map(function (_) {
|
|
3851
|
-
return _;
|
|
3852
|
-
}));
|
|
3853
|
-
};
|
|
3854
|
-
return MonkeyEcxRequestQueueModalHandlingService;
|
|
3855
|
-
}());
|
|
3856
|
-
MonkeyEcxRequestQueueModalHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestQueueModalHandlingService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3857
|
-
MonkeyEcxRequestQueueModalHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestQueueModalHandlingService, providedIn: 'root' });
|
|
3858
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestQueueModalHandlingService, decorators: [{
|
|
3859
|
-
type: i0.Injectable,
|
|
3860
|
-
args: [{
|
|
3861
|
-
providedIn: 'root'
|
|
3862
|
-
}]
|
|
3863
|
-
}], ctorParameters: function () { return []; } });
|
|
3864
|
-
|
|
3865
|
-
/* eslint-disable max-len */
|
|
3866
|
-
var MonkeyEcxHttpConfigQueueInterceptor = /** @class */ (function () {
|
|
3867
|
-
function MonkeyEcxHttpConfigQueueInterceptor(injector, monkeyecxRequestQueueHandlingService) {
|
|
3868
|
-
this.injector = injector;
|
|
3869
|
-
this.monkeyecxRequestQueueHandlingService = monkeyecxRequestQueueHandlingService;
|
|
3870
|
-
// not to do
|
|
3871
|
-
}
|
|
3872
|
-
MonkeyEcxHttpConfigQueueInterceptor.prototype.intercept = function (request, next) {
|
|
3873
|
-
var _this = this;
|
|
3874
|
-
var _a = this, injector = _a.injector, isQueueProperty = _a.isQueueProperty;
|
|
3875
|
-
var monkeyecxHandlingService = injector.get(MonkeyEcxHandlingService);
|
|
3876
|
-
var monkeyecxRequestQueue = monkeyecxHandlingService.getMonkeyEcxRequestQueue();
|
|
3877
|
-
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
3878
|
-
this.monkeyecxRequestQueueHandlingService.setQueue(monkeyecxRequestQueue);
|
|
3879
|
-
}
|
|
3880
|
-
return next.handle(request).pipe(operators.finalize(function () {
|
|
3881
|
-
if (isQueueProperty(monkeyecxRequestQueue)) {
|
|
3882
|
-
_this.monkeyecxRequestQueueHandlingService.finishQueueItem(monkeyecxRequestQueue);
|
|
3883
|
-
}
|
|
3884
|
-
}));
|
|
3885
|
-
};
|
|
3886
|
-
MonkeyEcxHttpConfigQueueInterceptor.prototype.isQueueProperty = function (mrq) {
|
|
3887
|
-
return (MonkeyEcxUtils.persistNullEmptyUndefined(mrq) &&
|
|
3888
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mrq.item.name));
|
|
3889
|
-
};
|
|
3890
|
-
return MonkeyEcxHttpConfigQueueInterceptor;
|
|
3891
|
-
}());
|
|
3892
|
-
MonkeyEcxHttpConfigQueueInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigQueueInterceptor, deps: [{ token: i0__namespace.Injector }, { token: MonkeyEcxRequestQueueHandlingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3893
|
-
MonkeyEcxHttpConfigQueueInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigQueueInterceptor });
|
|
3894
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigQueueInterceptor, decorators: [{
|
|
3895
|
-
type: i0.Injectable
|
|
3896
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: MonkeyEcxRequestQueueHandlingService }]; } });
|
|
3897
|
-
|
|
3898
|
-
/* eslint-disable max-len */
|
|
3899
|
-
var MonkeyEcxHttpConfigLoadingInProgressInterceptor = /** @class */ (function () {
|
|
3900
|
-
function MonkeyEcxHttpConfigLoadingInProgressInterceptor(injector) {
|
|
3901
|
-
this.injector = injector;
|
|
3902
|
-
// no to do
|
|
3903
|
-
}
|
|
3904
|
-
MonkeyEcxHttpConfigLoadingInProgressInterceptor.prototype.intercept = function (request, next) {
|
|
3905
|
-
var _a = this, injector = _a.injector, isLoadingInProgressProperty = _a.isLoadingInProgressProperty;
|
|
3906
|
-
var handlingService = injector.get(MonkeyEcxHandlingService);
|
|
3907
|
-
var progressBarService = injector.get(MonkeyEcxProgressBarService);
|
|
3908
|
-
var inProgress = handlingService.getMonkeyEcxServiceCredentials()
|
|
3909
|
-
? handlingService.getMonkeyEcxServiceCredentials().requestInProgress
|
|
3910
|
-
: null;
|
|
3911
|
-
if (isLoadingInProgressProperty(inProgress)) {
|
|
3912
|
-
progressBarService.show();
|
|
3913
|
-
}
|
|
3914
|
-
return next.handle(request).pipe(operators.finalize(function () {
|
|
3915
|
-
if (isLoadingInProgressProperty(inProgress)) {
|
|
3916
|
-
progressBarService.hide();
|
|
3917
|
-
}
|
|
3918
|
-
}));
|
|
3919
|
-
};
|
|
3920
|
-
MonkeyEcxHttpConfigLoadingInProgressInterceptor.prototype.isLoadingInProgressProperty = function (mlp) {
|
|
3921
|
-
return MonkeyEcxUtils.persistNullEmptyUndefined(mlp) &&
|
|
3922
|
-
MonkeyEcxUtils.persistNullEmptyUndefined(mlp.showProgress)
|
|
3923
|
-
? mlp.showProgress
|
|
3924
|
-
: true;
|
|
3925
|
-
};
|
|
3926
|
-
return MonkeyEcxHttpConfigLoadingInProgressInterceptor;
|
|
3927
|
-
}());
|
|
3928
|
-
MonkeyEcxHttpConfigLoadingInProgressInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3929
|
-
MonkeyEcxHttpConfigLoadingInProgressInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor });
|
|
3930
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigLoadingInProgressInterceptor, decorators: [{
|
|
3931
|
-
type: i0.Injectable
|
|
3932
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
3933
|
-
|
|
3934
|
-
var MonkeyEcxHttpConfigInterceptorModule = /** @class */ (function () {
|
|
3935
|
-
function MonkeyEcxHttpConfigInterceptorModule() {
|
|
3936
|
-
}
|
|
3937
|
-
MonkeyEcxHttpConfigInterceptorModule.forRoot = function () {
|
|
3938
|
-
return {
|
|
3939
|
-
ngModule: MonkeyEcxHttpConfigInterceptorModule,
|
|
3940
|
-
providers: [
|
|
3941
|
-
{
|
|
3942
|
-
provide: i1$4.HTTP_INTERCEPTORS,
|
|
3943
|
-
useClass: MonkeyEcxHttpConfigHeaderInterceptor,
|
|
3944
|
-
multi: true
|
|
3945
|
-
},
|
|
3946
|
-
{
|
|
3947
|
-
provide: i1$4.HTTP_INTERCEPTORS,
|
|
3948
|
-
useClass: MonkeyEcxHttpConfigErrorInterceptor,
|
|
3949
|
-
multi: true
|
|
3950
|
-
},
|
|
3951
|
-
{
|
|
3952
|
-
provide: i1$4.HTTP_INTERCEPTORS,
|
|
3953
|
-
useClass: MonkeyEcxHttpConfigQueueInterceptor,
|
|
3954
|
-
multi: true
|
|
3955
|
-
},
|
|
3956
|
-
{
|
|
3957
|
-
provide: i1$4.HTTP_INTERCEPTORS,
|
|
3958
|
-
useClass: MonkeyEcxHttpConfigLoadingInProgressInterceptor,
|
|
3959
|
-
multi: true
|
|
3960
|
-
}
|
|
3961
|
-
]
|
|
3962
|
-
};
|
|
3963
|
-
};
|
|
3964
|
-
return MonkeyEcxHttpConfigInterceptorModule;
|
|
3965
|
-
}());
|
|
3966
|
-
MonkeyEcxHttpConfigInterceptorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigInterceptorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3967
|
-
MonkeyEcxHttpConfigInterceptorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigInterceptorModule, imports: [i1$2.CommonModule] });
|
|
3968
|
-
MonkeyEcxHttpConfigInterceptorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigInterceptorModule, imports: [[i1$2.CommonModule]] });
|
|
3969
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxHttpConfigInterceptorModule, decorators: [{
|
|
3970
|
-
type: i0.NgModule,
|
|
3971
|
-
args: [{
|
|
3972
|
-
imports: [i1$2.CommonModule]
|
|
3973
|
-
}]
|
|
3974
|
-
}] });
|
|
3975
|
-
|
|
3976
|
-
var MonkeyEcxModel = /** @class */ (function () {
|
|
3977
|
-
function MonkeyEcxModel() {
|
|
3978
|
-
}
|
|
3979
|
-
MonkeyEcxModel.prototype.getAction = function (type) {
|
|
3980
|
-
var _links = this._links;
|
|
3981
|
-
if (!_links)
|
|
3982
|
-
return null;
|
|
3983
|
-
var link = _links[type.toLowerCase()];
|
|
3984
|
-
return link;
|
|
3985
|
-
};
|
|
3986
|
-
return MonkeyEcxModel;
|
|
3987
|
-
}());
|
|
3988
|
-
|
|
3989
|
-
/* eslint-disable indent */
|
|
3990
|
-
var MonkeyEcxConfigModule = /** @class */ (function () {
|
|
3991
|
-
function MonkeyEcxConfigModule(parentModule) {
|
|
3992
|
-
if (parentModule) {
|
|
3993
|
-
throw new Error('MonkeyEcxConfigModule is already loaded. Import it in the AppModule only!');
|
|
3994
|
-
}
|
|
3995
|
-
}
|
|
3996
|
-
MonkeyEcxConfigModule.forRoot = function () {
|
|
3997
|
-
return {
|
|
3998
|
-
ngModule: MonkeyEcxConfigModule,
|
|
3999
|
-
providers: [MonkeyEcxConfigService]
|
|
4000
|
-
};
|
|
4001
|
-
};
|
|
4002
|
-
return MonkeyEcxConfigModule;
|
|
4003
|
-
}());
|
|
4004
|
-
MonkeyEcxConfigModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigModule, deps: [{ token: MonkeyEcxConfigModule, optional: true, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
4005
|
-
MonkeyEcxConfigModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigModule });
|
|
4006
|
-
MonkeyEcxConfigModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigModule });
|
|
4007
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxConfigModule, decorators: [{
|
|
4008
|
-
type: i0.NgModule
|
|
4009
|
-
}], ctorParameters: function () {
|
|
4010
|
-
return [{ type: MonkeyEcxConfigModule, decorators: [{
|
|
4011
|
-
type: i0.Optional
|
|
4012
|
-
}, {
|
|
4013
|
-
type: i0.SkipSelf
|
|
4014
|
-
}] }];
|
|
4015
|
-
} });
|
|
4016
|
-
|
|
4017
|
-
var MonkeyEcxLoggedHandlingService = /** @class */ (function () {
|
|
4018
|
-
function MonkeyEcxLoggedHandlingService() {
|
|
4019
|
-
this.schedules = [];
|
|
4020
|
-
// not to do
|
|
4021
|
-
}
|
|
4022
|
-
MonkeyEcxLoggedHandlingService.prototype.destroySchedule = function () {
|
|
4023
|
-
this.schedules.forEach(function (sch) {
|
|
4024
|
-
clearInterval(sch.interval);
|
|
4025
|
-
});
|
|
4026
|
-
this.schedules = [];
|
|
4027
|
-
};
|
|
4028
|
-
MonkeyEcxLoggedHandlingService.prototype.addSchedule = function (sch) {
|
|
4029
|
-
this.schedules = sch;
|
|
4030
|
-
};
|
|
4031
|
-
MonkeyEcxLoggedHandlingService.prototype.destroy = function () {
|
|
4032
|
-
this.destroySchedule();
|
|
4033
|
-
};
|
|
4034
|
-
return MonkeyEcxLoggedHandlingService;
|
|
4035
|
-
}());
|
|
4036
|
-
MonkeyEcxLoggedHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxLoggedHandlingService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
4037
|
-
MonkeyEcxLoggedHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxLoggedHandlingService, providedIn: 'root' });
|
|
4038
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxLoggedHandlingService, decorators: [{
|
|
4039
|
-
type: i0.Injectable,
|
|
4040
|
-
args: [{
|
|
4041
|
-
providedIn: 'root'
|
|
4042
|
-
}]
|
|
4043
|
-
}], ctorParameters: function () { return []; } });
|
|
4044
|
-
|
|
4045
|
-
var MonkeyEcxRequestDownloadHandlingService = /** @class */ (function () {
|
|
4046
|
-
function MonkeyEcxRequestDownloadHandlingService() {
|
|
4047
|
-
this.download = [];
|
|
4048
|
-
this.download$ = new rxjs.BehaviorSubject([]);
|
|
4049
|
-
}
|
|
4050
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.addTo = function (q) {
|
|
4051
|
-
this.download.push(q);
|
|
4052
|
-
this.download$.next(this.download);
|
|
4053
|
-
};
|
|
4054
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.markItemAsFinish = function (q, status) {
|
|
4055
|
-
var saved = __spreadArray([], __read(this.download));
|
|
4056
|
-
this.download = __spreadArray([], __read(saved
|
|
4057
|
-
.map(function (val) {
|
|
4058
|
-
if (val.status === MonkeyEcxDownloadEvents.OnGoing) {
|
|
4059
|
-
var valSaved = Object.assign({}, val);
|
|
4060
|
-
if (valSaved.item.id === q.item.id) {
|
|
4061
|
-
return Object.assign(Object.assign({}, valSaved), { status: status || MonkeyEcxDownloadEvents.Finished });
|
|
4062
|
-
}
|
|
4063
|
-
return valSaved;
|
|
4064
|
-
}
|
|
4065
|
-
return null;
|
|
4066
|
-
})
|
|
4067
|
-
.filter(function (_) {
|
|
4068
|
-
return _;
|
|
4069
|
-
})));
|
|
4070
|
-
this.download = this.download.filter(function (_) {
|
|
4071
|
-
return _.status === MonkeyEcxDownloadEvents.OnGoing;
|
|
4072
|
-
});
|
|
4073
|
-
this.download$.next(this.download);
|
|
4074
|
-
};
|
|
4075
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.updateItem = function (q, loaded, total) {
|
|
4076
|
-
var saved = __spreadArray([], __read(this.download));
|
|
4077
|
-
this.download = __spreadArray([], __read(saved.map(function (val) {
|
|
4078
|
-
var valSaved = Object.assign({}, val);
|
|
4079
|
-
var currentPecentage = Math.floor((loaded / total) * 100);
|
|
4080
|
-
var totalPercentage = 100;
|
|
4081
|
-
if (valSaved.item.id === q.item.id) {
|
|
4082
|
-
return Object.assign(Object.assign({}, valSaved), { loaded: loaded,
|
|
4083
|
-
total: total, currentPercentage: currentPecentage, totalPercentage: totalPercentage });
|
|
4084
|
-
}
|
|
4085
|
-
return valSaved;
|
|
4086
|
-
})));
|
|
4087
|
-
this.download$.next(this.download);
|
|
4088
|
-
};
|
|
4089
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.set = function (q) {
|
|
4090
|
-
this.addTo(q);
|
|
4091
|
-
};
|
|
4092
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.get = function () {
|
|
4093
|
-
return this.download$.asObservable();
|
|
4094
|
-
};
|
|
4095
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.update = function (q, loaded, total) {
|
|
4096
|
-
this.updateItem(q, loaded, total);
|
|
4097
|
-
};
|
|
4098
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.finishItem = function (q, status) {
|
|
4099
|
-
this.markItemAsFinish(q, status);
|
|
4100
|
-
};
|
|
4101
|
-
MonkeyEcxRequestDownloadHandlingService.prototype.hasDownloadOnGoing = function () {
|
|
4102
|
-
var found = this.download.find(function (_) {
|
|
4103
|
-
return _.status === MonkeyEcxDownloadEvents.OnGoing;
|
|
4104
|
-
});
|
|
4105
|
-
return MonkeyEcxUtils.persistNullEmptyUndefined(found);
|
|
4106
|
-
};
|
|
4107
|
-
return MonkeyEcxRequestDownloadHandlingService;
|
|
4108
|
-
}());
|
|
4109
|
-
MonkeyEcxRequestDownloadHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestDownloadHandlingService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
4110
|
-
MonkeyEcxRequestDownloadHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestDownloadHandlingService, providedIn: 'root' });
|
|
4111
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestDownloadHandlingService, decorators: [{
|
|
4112
|
-
type: i0.Injectable,
|
|
4113
|
-
args: [{
|
|
4114
|
-
providedIn: 'root'
|
|
4115
|
-
}]
|
|
4116
|
-
}], ctorParameters: function () { return []; } });
|
|
4117
|
-
|
|
4118
|
-
var MonkeyEcxRequestDownloadedHandlingService = /** @class */ (function () {
|
|
4119
|
-
function MonkeyEcxRequestDownloadedHandlingService() {
|
|
4120
|
-
this.downloaded = [];
|
|
4121
|
-
this.downloaded$ = new rxjs.BehaviorSubject([]);
|
|
4122
|
-
}
|
|
4123
|
-
MonkeyEcxRequestDownloadedHandlingService.prototype.addTo = function (q) {
|
|
4124
|
-
this.downloaded.push(q);
|
|
4125
|
-
this.downloaded$.next(this.downloaded);
|
|
4126
|
-
};
|
|
4127
|
-
MonkeyEcxRequestDownloadedHandlingService.prototype.markItemAsFinish = function (q, status) {
|
|
4128
|
-
var saved = __spreadArray([], __read(this.downloaded));
|
|
4129
|
-
this.downloaded = __spreadArray([], __read(saved.map(function (val) {
|
|
4130
|
-
if (val.status === MonkeyEcxDownloadEvents.OnGoing) {
|
|
4131
|
-
var valSaved = Object.assign({}, val);
|
|
4132
|
-
if (valSaved.item.id === q.item.id) {
|
|
4133
|
-
return Object.assign(Object.assign({}, valSaved), { status: status || MonkeyEcxDownloadEvents.Finished, action: q.action });
|
|
4134
|
-
}
|
|
4135
|
-
return valSaved;
|
|
4136
|
-
}
|
|
4137
|
-
return val;
|
|
4138
|
-
})));
|
|
4139
|
-
this.downloaded$.next(this.downloaded);
|
|
4140
|
-
};
|
|
4141
|
-
MonkeyEcxRequestDownloadedHandlingService.prototype.set = function (q) {
|
|
4142
|
-
this.addTo(q);
|
|
4143
|
-
};
|
|
4144
|
-
MonkeyEcxRequestDownloadedHandlingService.prototype.get = function () {
|
|
4145
|
-
return this.downloaded$.asObservable();
|
|
4146
|
-
};
|
|
4147
|
-
MonkeyEcxRequestDownloadedHandlingService.prototype.finishItem = function (q, status) {
|
|
4148
|
-
this.markItemAsFinish(q, status);
|
|
4149
|
-
};
|
|
4150
|
-
MonkeyEcxRequestDownloadedHandlingService.prototype.hasDownloadOnGoing = function () {
|
|
4151
|
-
var found = this.downloaded.find(function (_) {
|
|
4152
|
-
return _.status === MonkeyEcxDownloadEvents.OnGoing;
|
|
4153
|
-
});
|
|
4154
|
-
return MonkeyEcxUtils.persistNullEmptyUndefined(found);
|
|
4155
|
-
};
|
|
4156
|
-
return MonkeyEcxRequestDownloadedHandlingService;
|
|
4157
|
-
}());
|
|
4158
|
-
MonkeyEcxRequestDownloadedHandlingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestDownloadedHandlingService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
4159
|
-
MonkeyEcxRequestDownloadedHandlingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestDownloadedHandlingService, providedIn: 'root' });
|
|
4160
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestDownloadedHandlingService, decorators: [{
|
|
4161
|
-
type: i0.Injectable,
|
|
4162
|
-
args: [{
|
|
4163
|
-
providedIn: 'root'
|
|
4164
|
-
}]
|
|
4165
|
-
}], ctorParameters: function () { return []; } });
|
|
4166
|
-
|
|
4167
|
-
var MonkeyEcxDiscoveryParamsService = /** @class */ (function () {
|
|
4168
|
-
function MonkeyEcxDiscoveryParamsService(router) {
|
|
4169
|
-
this.router = router;
|
|
4170
|
-
// not to do
|
|
4171
|
-
}
|
|
4172
|
-
MonkeyEcxDiscoveryParamsService.prototype.getLastChild = function (route) {
|
|
4173
|
-
if (route.firstChild) {
|
|
4174
|
-
return this.getLastChild(route.firstChild);
|
|
4175
|
-
}
|
|
4176
|
-
return route;
|
|
4177
|
-
};
|
|
4178
|
-
MonkeyEcxDiscoveryParamsService.prototype.setData = function (field, value) {
|
|
4179
|
-
var root = this.router.routerState.snapshot.root;
|
|
4180
|
-
var route = this.getLastChild(root);
|
|
4181
|
-
route.data[field] = value;
|
|
4182
|
-
};
|
|
4183
|
-
MonkeyEcxDiscoveryParamsService.prototype.getData = function (field) {
|
|
4184
|
-
var root = this.router.routerState.snapshot.root;
|
|
4185
|
-
var route = this.getLastChild(root);
|
|
4186
|
-
var found = MonkeyEcxUtils.persistNullEmptyUndefined(route) ? route.data[field] : null;
|
|
4187
|
-
return found;
|
|
4188
|
-
};
|
|
4189
|
-
MonkeyEcxDiscoveryParamsService.prototype.getDataFromCurrentNavigation = function (field) {
|
|
4190
|
-
var navigation = this.router.getCurrentNavigation();
|
|
4191
|
-
var state = null;
|
|
4192
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(navigation)) {
|
|
4193
|
-
state = navigation.extras.state;
|
|
4194
|
-
}
|
|
4195
|
-
return state ? state[field] : null;
|
|
4196
|
-
};
|
|
4197
|
-
MonkeyEcxDiscoveryParamsService.prototype.getParam = function (param) {
|
|
4198
|
-
var root = this.router.routerState.snapshot.root;
|
|
4199
|
-
var route = this.getLastChild(root);
|
|
4200
|
-
var found = MonkeyEcxUtils.persistNullEmptyUndefined(route)
|
|
4201
|
-
? route.paramMap.get(param)
|
|
4202
|
-
: '';
|
|
4203
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(found))
|
|
4204
|
-
found = this.getData(param);
|
|
4205
|
-
return found;
|
|
4206
|
-
};
|
|
4207
|
-
return MonkeyEcxDiscoveryParamsService;
|
|
4208
|
-
}());
|
|
4209
|
-
MonkeyEcxDiscoveryParamsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDiscoveryParamsService, deps: [{ token: i1__namespace$3.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
4210
|
-
MonkeyEcxDiscoveryParamsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDiscoveryParamsService, providedIn: 'root' });
|
|
4211
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDiscoveryParamsService, decorators: [{
|
|
4212
|
-
type: i0.Injectable,
|
|
4213
|
-
args: [{
|
|
4214
|
-
providedIn: 'root'
|
|
4215
|
-
}]
|
|
4216
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$3.Router }]; } });
|
|
4217
|
-
|
|
4218
|
-
var MonkeyEcxRequestScheduleService = /** @class */ (function () {
|
|
4219
|
-
function MonkeyEcxRequestScheduleService(monkeyecxService, monkeyecxLoggedHandlingService) {
|
|
4220
|
-
this.monkeyecxService = monkeyecxService;
|
|
4221
|
-
this.monkeyecxLoggedHandlingService = monkeyecxLoggedHandlingService;
|
|
4222
|
-
this.schedule = [];
|
|
4223
|
-
// not to do
|
|
4224
|
-
}
|
|
4225
|
-
MonkeyEcxRequestScheduleService.prototype.addToSchedule = function (q) {
|
|
4226
|
-
this.schedule.push(q);
|
|
4227
|
-
this.monkeyecxLoggedHandlingService.addSchedule(this.schedule);
|
|
4228
|
-
};
|
|
4229
|
-
MonkeyEcxRequestScheduleService.prototype.removeFromSchedule = function (q) {
|
|
4230
|
-
clearInterval(q.interval);
|
|
4231
|
-
var saved = __spreadArray([], __read(this.schedule));
|
|
4232
|
-
this.schedule = __spreadArray([], __read(saved.map(function (sch) {
|
|
4233
|
-
var savedLocal = Object.assign({}, sch);
|
|
4234
|
-
if (sch.id === q.id) {
|
|
4235
|
-
return null;
|
|
4236
|
-
}
|
|
4237
|
-
return savedLocal;
|
|
4238
|
-
}))).filter(function (_) {
|
|
4239
|
-
return _;
|
|
4240
|
-
});
|
|
4241
|
-
this.monkeyecxLoggedHandlingService.addSchedule(this.schedule);
|
|
4242
|
-
};
|
|
4243
|
-
MonkeyEcxRequestScheduleService.prototype.removeFromScheduleById = function (id) {
|
|
4244
|
-
var q = this.getScheduleById(id);
|
|
4245
|
-
clearInterval(q.interval);
|
|
4246
|
-
var saved = __spreadArray([], __read(this.schedule));
|
|
4247
|
-
this.schedule = __spreadArray([], __read(saved.map(function (sch) {
|
|
4248
|
-
var savedLocal = Object.assign({}, sch);
|
|
4249
|
-
if (sch.id === q.id) {
|
|
4250
|
-
return null;
|
|
4251
|
-
}
|
|
4252
|
-
return savedLocal;
|
|
4253
|
-
}))).filter(function (_) {
|
|
4254
|
-
return _;
|
|
4255
|
-
});
|
|
4256
|
-
this.monkeyecxLoggedHandlingService.addSchedule(this.schedule);
|
|
4257
|
-
};
|
|
4258
|
-
MonkeyEcxRequestScheduleService.prototype.doCall = function (sch) {
|
|
4259
|
-
var _this = this;
|
|
4260
|
-
var url = sch.url, method = sch.method, params = sch.params, data = sch.data, action = sch.action;
|
|
4261
|
-
this.monkeyecxService[method.toLowerCase()]("" + url, params).subscribe(function (resp) {
|
|
4262
|
-
action(Object.assign(Object.assign({}, data), resp), sch);
|
|
4263
|
-
}, function () {
|
|
4264
|
-
_this.removeFromSchedule(sch);
|
|
4265
|
-
});
|
|
4266
|
-
};
|
|
4267
|
-
MonkeyEcxRequestScheduleService.prototype.setSchedule = function (q, delay) {
|
|
4268
|
-
var _this = this;
|
|
4269
|
-
if (delay === void 0) { delay = 3000; }
|
|
4270
|
-
var interval = setInterval(function () {
|
|
4271
|
-
_this.doCall(Object.assign(Object.assign({}, q), { interval: interval }));
|
|
4272
|
-
}, delay);
|
|
4273
|
-
var sch = Object.assign(Object.assign({}, q), { id: "" + MonkeyEcxUtils.getRandomString(40), interval: interval });
|
|
4274
|
-
this.addToSchedule(sch);
|
|
4275
|
-
return sch;
|
|
4276
|
-
};
|
|
4277
|
-
MonkeyEcxRequestScheduleService.prototype.removeSchedule = function (q) {
|
|
4278
|
-
this.removeFromSchedule(q);
|
|
4279
|
-
};
|
|
4280
|
-
MonkeyEcxRequestScheduleService.prototype.removeScheduleById = function (id) {
|
|
4281
|
-
this.removeFromScheduleById(id);
|
|
4282
|
-
};
|
|
4283
|
-
MonkeyEcxRequestScheduleService.prototype.getScheduleById = function (id) {
|
|
4284
|
-
var q = this.schedule.find(function (sch) {
|
|
4285
|
-
return sch.id === id;
|
|
4286
|
-
});
|
|
4287
|
-
return q;
|
|
4288
|
-
};
|
|
4289
|
-
return MonkeyEcxRequestScheduleService;
|
|
4290
|
-
}());
|
|
4291
|
-
MonkeyEcxRequestScheduleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestScheduleService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxLoggedHandlingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
4292
|
-
MonkeyEcxRequestScheduleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestScheduleService, providedIn: 'root' });
|
|
4293
|
-
__decorate([
|
|
4294
|
-
MonkeyEcxCoreService({
|
|
4295
|
-
httpResponse: {
|
|
4296
|
-
httpCodeIgnore: [400, 403, 404, 500, 503]
|
|
4297
|
-
},
|
|
4298
|
-
requestInProgress: {
|
|
4299
|
-
showProgress: false
|
|
4300
|
-
}
|
|
4301
|
-
})
|
|
4302
|
-
], MonkeyEcxRequestScheduleService.prototype, "doCall", null);
|
|
4303
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxRequestScheduleService, decorators: [{
|
|
4304
|
-
type: i0.Injectable,
|
|
4305
|
-
args: [{
|
|
4306
|
-
providedIn: 'root'
|
|
4307
|
-
}]
|
|
4308
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxLoggedHandlingService }]; }, propDecorators: { doCall: [] } });
|
|
4309
|
-
|
|
4310
|
-
/* eslint-disable no-unused-vars */
|
|
4311
|
-
exports.OpSearch = void 0;
|
|
4312
|
-
(function (OpSearch) {
|
|
4313
|
-
OpSearch["LIKE"] = ":*:value*";
|
|
4314
|
-
OpSearch["BETWEEN"] = ":first AND :last";
|
|
4315
|
-
OpSearch["OR"] = "OR";
|
|
4316
|
-
OpSearch["AND"] = "AND";
|
|
4317
|
-
OpSearch["GT"] = ">:value";
|
|
4318
|
-
OpSearch["LT"] = "<:value";
|
|
4319
|
-
OpSearch["EQUAL"] = "::value";
|
|
4320
|
-
})(exports.OpSearch || (exports.OpSearch = {}));
|
|
4321
|
-
var MonkeyEcxSpecificationSearch = /** @class */ (function () {
|
|
4322
|
-
function MonkeyEcxSpecificationSearch() {
|
|
4323
|
-
// not to do
|
|
4324
|
-
}
|
|
4325
|
-
MonkeyEcxSpecificationSearch.prototype.handleValue = function (value) {
|
|
4326
|
-
return Object.entries(value).map(function (_c) {
|
|
4327
|
-
var _d = __read(_c, 2), key = _d[0], value1 = _d[1];
|
|
4328
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(value1)) {
|
|
4329
|
-
return null;
|
|
4330
|
-
}
|
|
4331
|
-
if (Array.isArray(value1)) {
|
|
4332
|
-
if (key === exports.OpSearch.BETWEEN) {
|
|
4333
|
-
return ("" + key).replace(':first', value1[0]).replace(':last', value1[1]);
|
|
4334
|
-
}
|
|
4335
|
-
}
|
|
4336
|
-
return ("" + key).replace(':value', value1.toString());
|
|
4337
|
-
})[0];
|
|
4338
|
-
};
|
|
4339
|
-
MonkeyEcxSpecificationSearch.prototype.queryVisitor = function (value) {
|
|
4340
|
-
var _this = this;
|
|
4341
|
-
var okay = Object.entries(value).map(function (_c) {
|
|
4342
|
-
var _d = __read(_c, 2), key1 = _d[0], value1 = _d[1];
|
|
4343
|
-
if (key1 === exports.OpSearch.OR || key1 === exports.OpSearch.AND) {
|
|
4344
|
-
var join = value1
|
|
4345
|
-
.map(function (_) {
|
|
4346
|
-
return Object.entries(_).map(function (_c) {
|
|
4347
|
-
var _d = __read(_c, 2), key2 = _d[0], value2 = _d[1];
|
|
4348
|
-
if (value2 instanceof Object) {
|
|
4349
|
-
value2 = _this.handleValue(value2);
|
|
4350
|
-
}
|
|
4351
|
-
return _this.criteriaParser(key2, value2);
|
|
4352
|
-
})[0];
|
|
4353
|
-
})
|
|
4354
|
-
.filter(function (_) {
|
|
4355
|
-
return _;
|
|
4356
|
-
})
|
|
4357
|
-
.join(" " + key1 + " ");
|
|
4358
|
-
return "" + (join ? "(" + join + ")" : '');
|
|
4359
|
-
}
|
|
4360
|
-
if (value1 instanceof Object) {
|
|
4361
|
-
value1 = _this.handleValue(value1);
|
|
4362
|
-
}
|
|
4363
|
-
return _this.criteriaParser(key1, value1);
|
|
4364
|
-
});
|
|
4365
|
-
return okay
|
|
4366
|
-
.filter(function (_) {
|
|
4367
|
-
return _;
|
|
4368
|
-
})
|
|
4369
|
-
.join(' AND ');
|
|
4370
|
-
};
|
|
4371
|
-
MonkeyEcxSpecificationSearch.prototype.criteriaParser = function (key, value) {
|
|
4372
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
4373
|
-
return '';
|
|
4374
|
-
}
|
|
4375
|
-
if (value instanceof Object) {
|
|
4376
|
-
return this.queryVisitor(value);
|
|
4377
|
-
}
|
|
4378
|
-
return "" + key + value;
|
|
4379
|
-
};
|
|
4380
|
-
MonkeyEcxSpecificationSearch.prototype.build = function (spec) {
|
|
4381
|
-
try {
|
|
4382
|
-
return this.queryVisitor(spec);
|
|
4383
|
-
}
|
|
4384
|
-
catch (e) {
|
|
4385
|
-
throw new Error("MonkeyEcxSpecificationSearch Error " + e);
|
|
4386
|
-
}
|
|
4387
|
-
};
|
|
4388
|
-
MonkeyEcxSpecificationSearch.prototype.buildMoreThanOne = function (field, op) {
|
|
4389
|
-
if (op === void 0) { op = exports.OpSearch.EQUAL; }
|
|
4390
|
-
var _a, _b;
|
|
4391
|
-
try {
|
|
4392
|
-
if (!this[field])
|
|
4393
|
-
return [];
|
|
4394
|
-
var filters = (_b = (_a = this[field]) === null || _a === void 0 ? void 0 : _a.split(',')) === null || _b === void 0 ? void 0 : _b.map(function (filter) {
|
|
4395
|
-
var _c, _d;
|
|
4396
|
-
if (!filter)
|
|
4397
|
-
return null;
|
|
4398
|
-
return _c = {},
|
|
4399
|
-
_c[field] = (_d = {},
|
|
4400
|
-
_d[op] = "" + filter,
|
|
4401
|
-
_d),
|
|
4402
|
-
_c;
|
|
4403
|
-
}).filter(function (val) { return val; });
|
|
4404
|
-
return filters || [];
|
|
4405
|
-
}
|
|
4406
|
-
catch (e) {
|
|
4407
|
-
throw new Error("MonkeyEcxSpecificationSearch Error " + e);
|
|
4408
|
-
}
|
|
4409
|
-
};
|
|
4410
|
-
return MonkeyEcxSpecificationSearch;
|
|
4411
|
-
}());
|
|
4412
|
-
|
|
4413
|
-
var MonkeyFrontCoreModuleModule = /** @class */ (function () {
|
|
4414
|
-
function MonkeyFrontCoreModuleModule() {
|
|
4415
|
-
}
|
|
4416
|
-
return MonkeyFrontCoreModuleModule;
|
|
4417
|
-
}());
|
|
4418
|
-
MonkeyFrontCoreModuleModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyFrontCoreModuleModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
4419
|
-
MonkeyFrontCoreModuleModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyFrontCoreModuleModule, imports: [i1$2.CommonModule,
|
|
4420
|
-
i1$4.HttpClientModule, i1__namespace$1.TranslateModule, MonkeyEcxConfigModule, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxErrorHandlingModule, i1.MonkeyStyleGuideModule, i1__namespace$6.ServiceWorkerModule, ClosedToMaintenanceModule,
|
|
4421
|
-
VersionChangedModule] });
|
|
4422
|
-
MonkeyFrontCoreModuleModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyFrontCoreModuleModule, providers: [
|
|
4423
|
-
i1.MonkeyStyleGuideModalService,
|
|
4424
|
-
i1.MonkeyStyleGuideSettingsService,
|
|
4425
|
-
i1.MonkeyStyleGuideSnackbarService
|
|
4426
|
-
], imports: [[
|
|
4427
|
-
i1$2.CommonModule,
|
|
4428
|
-
i1$4.HttpClientModule,
|
|
4429
|
-
i1$1.TranslateModule.forRoot(),
|
|
4430
|
-
MonkeyEcxConfigModule.forRoot(),
|
|
4431
|
-
MonkeyEcxHttpConfigInterceptorModule.forRoot(),
|
|
4432
|
-
MonkeyEcxErrorHandlingModule.forRoot(),
|
|
4433
|
-
i1.MonkeyStyleGuideModule,
|
|
4434
|
-
i1$6.ServiceWorkerModule.register('ngsw-worker.js'),
|
|
4435
|
-
ClosedToMaintenanceModule,
|
|
4436
|
-
VersionChangedModule
|
|
4437
|
-
]] });
|
|
4438
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyFrontCoreModuleModule, decorators: [{
|
|
4439
|
-
type: i0.NgModule,
|
|
4440
|
-
args: [{
|
|
4441
|
-
imports: [
|
|
4442
|
-
i1$2.CommonModule,
|
|
4443
|
-
i1$4.HttpClientModule,
|
|
4444
|
-
i1$1.TranslateModule.forRoot(),
|
|
4445
|
-
MonkeyEcxConfigModule.forRoot(),
|
|
4446
|
-
MonkeyEcxHttpConfigInterceptorModule.forRoot(),
|
|
4447
|
-
MonkeyEcxErrorHandlingModule.forRoot(),
|
|
4448
|
-
i1.MonkeyStyleGuideModule,
|
|
4449
|
-
i1$6.ServiceWorkerModule.register('ngsw-worker.js'),
|
|
4450
|
-
ClosedToMaintenanceModule,
|
|
4451
|
-
VersionChangedModule
|
|
4452
|
-
],
|
|
4453
|
-
providers: [
|
|
4454
|
-
i1.MonkeyStyleGuideModalService,
|
|
4455
|
-
i1.MonkeyStyleGuideSettingsService,
|
|
4456
|
-
i1.MonkeyStyleGuideSnackbarService
|
|
4457
|
-
]
|
|
4458
|
-
}]
|
|
4459
|
-
}] });
|
|
4460
|
-
|
|
4461
|
-
/*
|
|
4462
|
-
* Public API Surface of monkey-front-core
|
|
4463
|
-
*/
|
|
4464
|
-
|
|
4465
|
-
/**
|
|
4466
|
-
* Generated bundle index. Do not edit.
|
|
4467
|
-
*/
|
|
4468
|
-
|
|
4469
|
-
exports.ClosedToMaintenanceComponent = ClosedToMaintenanceComponent;
|
|
4470
|
-
exports.ClosedToMaintenanceModule = ClosedToMaintenanceModule;
|
|
4471
|
-
exports.DecoratorsUtils = decoratorsUtils;
|
|
4472
|
-
exports.MonkeyEcxAuthGuard = MonkeyEcxAuthGuard;
|
|
4473
|
-
exports.MonkeyEcxAuthGuardLogin = MonkeyEcxAuthGuardLogin;
|
|
4474
|
-
exports.MonkeyEcxAuthenticationService = MonkeyEcxAuthenticationService;
|
|
4475
|
-
exports.MonkeyEcxCommonsService = MonkeyEcxCommonsService;
|
|
4476
|
-
exports.MonkeyEcxConfigModule = MonkeyEcxConfigModule;
|
|
4477
|
-
exports.MonkeyEcxConfigService = MonkeyEcxConfigService;
|
|
4478
|
-
exports.MonkeyEcxCookieStorageService = MonkeyEcxCookieStorageService;
|
|
4479
|
-
exports.MonkeyEcxCoreClearDecorators = MonkeyEcxCoreClearDecorators;
|
|
4480
|
-
exports.MonkeyEcxCoreLog = MonkeyEcxCoreLog;
|
|
4481
|
-
exports.MonkeyEcxCoreService = MonkeyEcxCoreService;
|
|
4482
|
-
exports.MonkeyEcxCoreServiceConstructor = MonkeyEcxCoreServiceConstructor;
|
|
4483
|
-
exports.MonkeyEcxCoreServicePaged = MonkeyEcxCoreServicePaged;
|
|
4484
|
-
exports.MonkeyEcxCoreServiceQueue = MonkeyEcxCoreServiceQueue;
|
|
4485
|
-
exports.MonkeyEcxDirectivesModule = MonkeyEcxDirectivesModule;
|
|
4486
|
-
exports.MonkeyEcxDiscoveryParamsService = MonkeyEcxDiscoveryParamsService;
|
|
4487
|
-
exports.MonkeyEcxDisplayFirstNamePipe = MonkeyEcxDisplayFirstNamePipe;
|
|
4488
|
-
exports.MonkeyEcxDocumentTypePipe = MonkeyEcxDocumentTypePipe;
|
|
4489
|
-
exports.MonkeyEcxDragDropDirective = MonkeyEcxDragDropDirective;
|
|
4490
|
-
exports.MonkeyEcxErrorHandlingModule = MonkeyEcxErrorHandlingModule;
|
|
4491
|
-
exports.MonkeyEcxErrorHandlingService = MonkeyEcxErrorHandlingService;
|
|
4492
|
-
exports.MonkeyEcxFeatureToggleService = MonkeyEcxFeatureToggleService;
|
|
4493
|
-
exports.MonkeyEcxFormatCurrency = MonkeyEcxFormatCurrency;
|
|
4494
|
-
exports.MonkeyEcxFormatCurrencyPipe = MonkeyEcxFormatCurrencyPipe;
|
|
4495
|
-
exports.MonkeyEcxFormatDateTimelapsePipe = MonkeyEcxFormatDateTimelapsePipe;
|
|
4496
|
-
exports.MonkeyEcxFormatDocumentPipe = MonkeyEcxFormatDocumentPipe;
|
|
4497
|
-
exports.MonkeyEcxFormatNumber = MonkeyEcxFormatNumber;
|
|
4498
|
-
exports.MonkeyEcxFormatSizePipe = MonkeyEcxFormatSizePipe;
|
|
4499
|
-
exports.MonkeyEcxFormatUpper = MonkeyEcxFormatUpper;
|
|
4500
|
-
exports.MonkeyEcxFormatValue = MonkeyEcxFormatValue;
|
|
4501
|
-
exports.MonkeyEcxFormatZipCodePipe = MonkeyEcxFormatZipCodePipe;
|
|
4502
|
-
exports.MonkeyEcxHandlingService = MonkeyEcxHandlingService;
|
|
4503
|
-
exports.MonkeyEcxHttpConfigErrorInterceptor = MonkeyEcxHttpConfigErrorInterceptor;
|
|
4504
|
-
exports.MonkeyEcxHttpConfigHeaderInterceptor = MonkeyEcxHttpConfigHeaderInterceptor;
|
|
4505
|
-
exports.MonkeyEcxHttpConfigInterceptorModule = MonkeyEcxHttpConfigInterceptorModule;
|
|
4506
|
-
exports.MonkeyEcxHttpConfigLoadingInProgressInterceptor = MonkeyEcxHttpConfigLoadingInProgressInterceptor;
|
|
4507
|
-
exports.MonkeyEcxHttpConfigQueueInterceptor = MonkeyEcxHttpConfigQueueInterceptor;
|
|
4508
|
-
exports.MonkeyEcxHttpErrorHandlingService = MonkeyEcxHttpErrorHandlingService;
|
|
4509
|
-
exports.MonkeyEcxLoggedHandlingService = MonkeyEcxLoggedHandlingService;
|
|
4510
|
-
exports.MonkeyEcxLogsConfigService = MonkeyEcxLogsConfigService;
|
|
4511
|
-
exports.MonkeyEcxMaintenanceConfigService = MonkeyEcxMaintenanceConfigService;
|
|
4512
|
-
exports.MonkeyEcxModel = MonkeyEcxModel;
|
|
4513
|
-
exports.MonkeyEcxOnlyAlphaNumericDirective = MonkeyEcxOnlyAlphaNumericDirective;
|
|
4514
|
-
exports.MonkeyEcxOnlyNumbersDirective = MonkeyEcxOnlyNumbersDirective;
|
|
4515
|
-
exports.MonkeyEcxOthersErrorsHandlingService = MonkeyEcxOthersErrorsHandlingService;
|
|
4516
|
-
exports.MonkeyEcxPipesModule = MonkeyEcxPipesModule;
|
|
4517
|
-
exports.MonkeyEcxProgressBarComponent = MonkeyEcxProgressBarComponent;
|
|
4518
|
-
exports.MonkeyEcxProgressBarModule = MonkeyEcxProgressBarModule;
|
|
4519
|
-
exports.MonkeyEcxProgressBarService = MonkeyEcxProgressBarService;
|
|
4520
|
-
exports.MonkeyEcxRequestDownloadHandlingService = MonkeyEcxRequestDownloadHandlingService;
|
|
4521
|
-
exports.MonkeyEcxRequestDownloadedHandlingService = MonkeyEcxRequestDownloadedHandlingService;
|
|
4522
|
-
exports.MonkeyEcxRequestPagedHandling = MonkeyEcxRequestPagedHandling;
|
|
4523
|
-
exports.MonkeyEcxRequestQueueHandlingService = MonkeyEcxRequestQueueHandlingService;
|
|
4524
|
-
exports.MonkeyEcxRequestQueueModalHandlingService = MonkeyEcxRequestQueueModalHandlingService;
|
|
4525
|
-
exports.MonkeyEcxRequestScheduleService = MonkeyEcxRequestScheduleService;
|
|
4526
|
-
exports.MonkeyEcxSecurityConsoleConfigService = MonkeyEcxSecurityConsoleConfigService;
|
|
4527
|
-
exports.MonkeyEcxSecurityDirective = MonkeyEcxSecurityDirective;
|
|
4528
|
-
exports.MonkeyEcxService = MonkeyEcxService;
|
|
4529
|
-
exports.MonkeyEcxServiceDownload = MonkeyEcxServiceDownload;
|
|
4530
|
-
exports.MonkeyEcxServiceUpload = MonkeyEcxServiceUpload;
|
|
4531
|
-
exports.MonkeyEcxServiceWorkerConfigService = MonkeyEcxServiceWorkerConfigService;
|
|
4532
|
-
exports.MonkeyEcxSpecificationSearch = MonkeyEcxSpecificationSearch;
|
|
4533
|
-
exports.MonkeyEcxTextTruncatePipe = MonkeyEcxTextTruncatePipe;
|
|
4534
|
-
exports.MonkeyEcxTokenStorageService = MonkeyEcxTokenStorageService;
|
|
4535
|
-
exports.MonkeyEcxTooltipDirective = MonkeyEcxTooltipDirective;
|
|
4536
|
-
exports.MonkeyEcxTruncateQtdPipe = MonkeyEcxTruncateQtdPipe;
|
|
4537
|
-
exports.MonkeyEcxUtils = MonkeyEcxUtils;
|
|
4538
|
-
exports.MonkeyEcxi18nConfigService = MonkeyEcxi18nConfigService;
|
|
4539
|
-
exports.MonkeyFrontCoreModuleModule = MonkeyFrontCoreModuleModule;
|
|
4540
|
-
exports.Statics = statics;
|
|
4541
|
-
exports.ValidateUtils = validateUtils;
|
|
4542
|
-
exports.Validators = Validators;
|
|
4543
|
-
exports.VersionChangedComponent = VersionChangedComponent;
|
|
4544
|
-
exports.VersionChangedModule = VersionChangedModule;
|
|
4545
|
-
exports.comboValidator = comboValidator;
|
|
4546
|
-
exports.dateRangeValidator = dateRangeValidator;
|
|
4547
|
-
exports.dateStartEndValidator = dateStartEndValidator;
|
|
4548
|
-
exports.dateValidator = dateValidator;
|
|
4549
|
-
exports.documentValidator = documentValidator;
|
|
4550
|
-
exports.emailValidator = emailValidator;
|
|
4551
|
-
exports.passwordConfirmValidator = passwordConfirmValidator;
|
|
4552
|
-
exports.registerValidator = registerValidator;
|
|
4553
|
-
exports.trueValidator = trueValidator;
|
|
4554
|
-
exports.urlValidator = urlValidator;
|
|
4555
|
-
exports.zipCodeValidator = zipCodeValidator;
|
|
4556
|
-
|
|
4557
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4558
|
-
|
|
4559
|
-
}));
|
|
4560
|
-
//# sourceMappingURL=monkey-front-core.umd.js.map
|