monkey-front-core 0.0.237 → 0.0.238
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/karma.conf.js +44 -0
- package/monkey-front-core-0.0.238.tgz +0 -0
- package/ng-package.json +8 -0
- package/package.json +4 -24
- package/src/lib/components/alerts/alerts.component.html +18 -0
- package/src/lib/components/alerts/alerts.component.scss +71 -0
- package/src/lib/components/alerts/alerts.component.ts +36 -0
- package/src/lib/components/alerts/alerts.module.ts +12 -0
- package/{lib/components/alerts/index.d.ts → src/lib/components/alerts/index.ts} +2 -2
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.html +25 -0
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.scss +51 -0
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.ts +25 -0
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.module.ts +26 -0
- package/{lib/components/closed-to-maintenance/index.d.ts → src/lib/components/closed-to-maintenance/index.ts} +2 -2
- package/{lib/components/index.d.ts → src/lib/components/index.ts} +4 -4
- package/{lib/components/progress-bar/index.d.ts → src/lib/components/progress-bar/index.ts} +3 -3
- package/src/lib/components/progress-bar/progress-bar.component.html +3 -0
- package/src/lib/components/progress-bar/progress-bar.component.scss +6 -0
- package/src/lib/components/progress-bar/progress-bar.component.ts +22 -0
- package/src/lib/components/progress-bar/progress-bar.module.ts +10 -0
- package/src/lib/components/progress-bar/progress-bar.service.ts +61 -0
- package/{lib/components/version-changed/index.d.ts → src/lib/components/version-changed/index.ts} +2 -2
- package/src/lib/components/version-changed/version-changed.component.html +18 -0
- package/src/lib/components/version-changed/version-changed.component.scss +52 -0
- package/src/lib/components/version-changed/version-changed.component.ts +18 -0
- package/src/lib/components/version-changed/version-changed.module.ts +24 -0
- package/{lib/core/decorators/index.d.ts → src/lib/core/decorators/index.ts} +4 -4
- package/src/lib/core/decorators/monkeyecx-charts-decorators.ts +46 -0
- package/src/lib/core/decorators/monkeyecx-decorators.ts +159 -0
- package/src/lib/core/decorators/monkeyecx-download-decorators.ts +39 -0
- package/src/lib/core/decorators/monkeyecx-upload-decorators.ts +39 -0
- package/{lib/core/directives/index.d.ts → src/lib/core/directives/index.ts} +12 -12
- package/src/lib/core/directives/monkeyecx-directives-module.ts +45 -0
- package/src/lib/core/directives/monkeyecx-drag-drop.ts +40 -0
- package/src/lib/core/directives/monkeyecx-feature-by-program-directive.ts +53 -0
- package/src/lib/core/directives/monkeyecx-feature-directive.ts +72 -0
- package/src/lib/core/directives/monkeyecx-format-currency.ts +44 -0
- package/src/lib/core/directives/monkeyecx-format-upper.ts +54 -0
- package/src/lib/core/directives/monkeyecx-only-alpha-numeric-directive.ts +21 -0
- package/src/lib/core/directives/monkeyecx-only-number-directive.ts +21 -0
- package/src/lib/core/directives/monkeyecx-popover-options.directive.ts +52 -0
- package/src/lib/core/directives/monkeyecx-popover.directive.ts +235 -0
- package/src/lib/core/directives/monkeyecx-security-directive.ts +68 -0
- package/src/lib/core/directives/monkeyecx-tooltip-directive.ts +131 -0
- package/{lib/core/index.d.ts → src/lib/core/index.ts} +9 -9
- package/{lib/core/interceptors/index.d.ts → src/lib/core/interceptors/index.ts} +5 -5
- package/src/lib/core/interceptors/monkeyecx-http-config-error.interceptor.ts +58 -0
- package/src/lib/core/interceptors/monkeyecx-http-config-header.interceptor.ts +78 -0
- package/src/lib/core/interceptors/monkeyecx-http-config-interceptor.module.ts +40 -0
- package/src/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.ts +47 -0
- package/src/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.ts +44 -0
- package/{lib/core/interfaces/index.d.ts → src/lib/core/interfaces/index.ts} +29 -29
- package/src/lib/core/interfaces/monkeyecx-auth-credentials.ts +16 -0
- package/{lib/core/interfaces/monkeyecx-company-pendencies.d.ts → src/lib/core/interfaces/monkeyecx-company-pendencies.ts} +16 -14
- package/src/lib/core/interfaces/monkeyecx-company.ts +10 -0
- package/src/lib/core/interfaces/monkeyecx-config-boostrap.ts +14 -0
- package/src/lib/core/interfaces/monkeyecx-config.ts +139 -0
- package/src/lib/core/interfaces/monkeyecx-country-security.ts +4 -0
- package/src/lib/core/interfaces/monkeyecx-error-response.ts +5 -0
- package/src/lib/core/interfaces/monkeyecx-filter.ts +26 -0
- package/src/lib/core/interfaces/monkeyecx-handled-error-response.ts +11 -0
- package/src/lib/core/interfaces/monkeyecx-header-credentials.ts +4 -0
- package/{lib/core/interfaces/monkeyecx-intercom-options.d.ts → src/lib/core/interfaces/monkeyecx-intercom-options.ts} +4 -4
- package/src/lib/core/interfaces/monkeyecx-me-credentials.ts +23 -0
- package/src/lib/core/interfaces/monkeyecx-navigation.ts +28 -0
- package/src/lib/core/interfaces/monkeyecx-program.ts +10 -0
- package/src/lib/core/interfaces/monkeyecx-releases.ts +9 -0
- package/{lib/core/interfaces/monkeyecx-request-in-progress.d.ts → src/lib/core/interfaces/monkeyecx-request-in-progress.ts} +3 -3
- package/src/lib/core/interfaces/monkeyecx-request-paged.ts +27 -0
- package/src/lib/core/interfaces/monkeyecx-response-links.ts +11 -0
- package/src/lib/core/interfaces/monkeyecx-response-paged.ts +6 -0
- package/src/lib/core/interfaces/monkeyecx-saved-state.ts +5 -0
- package/{lib/core/interfaces/monkeyecx-scroll-options.d.ts → src/lib/core/interfaces/monkeyecx-scroll-options.ts} +6 -5
- package/{lib/core/interfaces/monkeyecx-service-credentials.d.ts → src/lib/core/interfaces/monkeyecx-service-credentials.ts} +13 -12
- package/{lib/core/interfaces/monkeyecx-support-options.d.ts → src/lib/core/interfaces/monkeyecx-support-options.ts} +4 -4
- package/src/lib/core/interfaces/monkeyecx-token-credentials.ts +20 -0
- package/src/lib/core/interfaces/monkeyecx-translate-options.ts +4 -0
- package/{lib/core/interfaces/request-download/index.d.ts → src/lib/core/interfaces/request-download/index.ts} +3 -3
- package/src/lib/core/interfaces/request-download/monkeyecx-request-download.ts +11 -0
- package/src/lib/core/interfaces/request-download/monkeyecx-request-downloaded.ts +8 -0
- package/src/lib/core/interfaces/request-download/monkeyecx-request-item-download.ts +7 -0
- package/{lib/core/interfaces/request-queue/index.d.ts → src/lib/core/interfaces/request-queue/index.ts} +3 -3
- package/src/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.ts +7 -0
- package/src/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.ts +6 -0
- package/{lib/core/interfaces/request-queue/monkeyecx-request-queue.d.ts → src/lib/core/interfaces/request-queue/monkeyecx-request-queue.ts} +9 -8
- package/{lib/core/interfaces/request-upload/index.d.ts → src/lib/core/interfaces/request-upload/index.ts} +2 -2
- package/src/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.ts +5 -0
- package/src/lib/core/interfaces/request-upload/monkeyecx-request-upload.ts +11 -0
- package/{lib/core/interfaces/schedules/index.d.ts → src/lib/core/interfaces/schedules/index.ts} +1 -1
- package/src/lib/core/interfaces/schedules/monkeyecx-request-schedule.ts +14 -0
- package/{lib/core/model/index.d.ts → src/lib/core/model/index.ts} +1 -1
- package/src/lib/core/model/monkeyecx-model.ts +38 -0
- package/{lib/core/pipes/index.d.ts → src/lib/core/pipes/index.ts} +19 -19
- package/src/lib/core/pipes/monkeyecx-display-first-name.ts +12 -0
- package/src/lib/core/pipes/monkeyecx-display-initials.ts +14 -0
- package/src/lib/core/pipes/monkeyecx-display-support-phone.ts +31 -0
- package/src/lib/core/pipes/monkeyecx-format-address.ts +27 -0
- package/src/lib/core/pipes/monkeyecx-format-beautify-json.ts +35 -0
- package/src/lib/core/pipes/monkeyecx-format-currency.ts +20 -0
- package/src/lib/core/pipes/monkeyecx-format-date-group.ts +40 -0
- package/src/lib/core/pipes/monkeyecx-format-date-timelapse.ts +25 -0
- package/src/lib/core/pipes/monkeyecx-format-date-unix-timelapse.ts +31 -0
- package/src/lib/core/pipes/monkeyecx-format-document.ts +12 -0
- package/src/lib/core/pipes/monkeyecx-format-number.ts +14 -0
- package/src/lib/core/pipes/monkeyecx-format-phone.ts +32 -0
- package/src/lib/core/pipes/monkeyecx-format-size.ts +13 -0
- package/src/lib/core/pipes/monkeyecx-format-tax.ts +16 -0
- package/src/lib/core/pipes/monkeyecx-format-type-document.ts +12 -0
- package/src/lib/core/pipes/monkeyecx-format-value.ts +12 -0
- package/src/lib/core/pipes/monkeyecx-format-zipcode.ts +12 -0
- package/src/lib/core/pipes/monkeyecx-pipes.module.ts +65 -0
- package/src/lib/core/pipes/monkeyecx-text-truncate.ts +17 -0
- package/src/lib/core/pipes/monkeyecx-truncate-qtd.ts +10 -0
- package/{lib/core/services/auth/index.d.ts → src/lib/core/services/auth/index.ts} +4 -4
- package/src/lib/core/services/auth/monkeyecx-auth-guard-company.service.ts +27 -0
- package/src/lib/core/services/auth/monkeyecx-auth-guard-login.service.ts +23 -0
- package/src/lib/core/services/auth/monkeyecx-auth-guard.service.ts +25 -0
- package/src/lib/core/services/auth/monkeyecx-authentication.service.ts +87 -0
- package/{lib/core/services/commons/index.d.ts → src/lib/core/services/commons/index.ts} +1 -1
- package/src/lib/core/services/commons/monkeyecx-commons.service.ts +557 -0
- package/src/lib/core/services/config/index.ts +9 -0
- package/src/lib/core/services/config/monkeyecx-alerts-config.service.ts +37 -0
- package/src/lib/core/services/config/monkeyecx-config.module.ts +23 -0
- package/src/lib/core/services/config/monkeyecx-config.service.ts +151 -0
- package/src/lib/core/services/config/monkeyecx-error-config.service.ts +92 -0
- package/src/lib/core/services/config/monkeyecx-feature-toggle.service.ts +71 -0
- package/src/lib/core/services/config/monkeyecx-ga-config.service.ts +56 -0
- package/src/lib/core/services/config/monkeyecx-i18n-config.service.ts +95 -0
- package/src/lib/core/services/config/monkeyecx-logs-config.service.ts +34 -0
- package/src/lib/core/services/config/monkeyecx-maintenance-config.service.ts +33 -0
- package/src/lib/core/services/config/monkeyecx-security-console-config.service.ts +40 -0
- package/src/lib/core/services/config/monkeyecx-service-worker-config.service.ts +50 -0
- package/{lib/core/services/error/index.d.ts → src/lib/core/services/error/index.ts} +4 -4
- package/src/lib/core/services/error/monkeyecx-error-handling.module.ts +20 -0
- package/src/lib/core/services/error/monkeyecx-error-handling.service.ts +33 -0
- package/src/lib/core/services/error/monkeyecx-http-error-handling.service.ts +160 -0
- package/src/lib/core/services/error/monkeyecx-others-errors-handling.service.ts +24 -0
- package/{lib/core/services/index.d.ts → src/lib/core/services/index.ts} +22 -22
- package/{lib/core/services/logged/index.d.ts → src/lib/core/services/logged/index.ts} +1 -1
- package/src/lib/core/services/logged/monkeyecx-logged-handling.service.ts +42 -0
- package/src/lib/core/services/monkeyecx-handling.service.ts +58 -0
- package/src/lib/core/services/monkeyecx-service.service.ts +116 -0
- package/{lib/core/services/pagination/index.d.ts → src/lib/core/services/pagination/index.ts} +1 -1
- package/src/lib/core/services/pagination/monkeyecx-pagination.service.ts +27 -0
- package/{lib/core/services/request-download/index.d.ts → src/lib/core/services/request-download/index.ts} +2 -2
- package/src/lib/core/services/request-download/monkeyecx-request-download-handling.service.ts +100 -0
- package/src/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.ts +65 -0
- package/{lib/core/services/request-paged/index.d.ts → src/lib/core/services/request-paged/index.ts} +1 -1
- package/src/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.ts +58 -0
- package/{lib/core/services/request-queue/index.d.ts → src/lib/core/services/request-queue/index.ts} +2 -2
- package/src/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.ts +125 -0
- package/src/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.ts +136 -0
- package/{lib/core/services/routes/index.d.ts → src/lib/core/services/routes/index.ts} +1 -1
- package/src/lib/core/services/routes/monkeyecx-dicovery-params.service.ts +54 -0
- package/{lib/core/services/schedules/index.d.ts → src/lib/core/services/schedules/index.ts} +1 -1
- package/src/lib/core/services/schedules/monkeyecx-request-schedule.service.ts +224 -0
- package/{lib/core/services/storage/index.d.ts → src/lib/core/services/storage/index.ts} +2 -2
- package/src/lib/core/services/storage/monkeyecx-cookie-storage.service.ts +28 -0
- package/src/lib/core/services/storage/monkeyecx-token-storage.service.ts +151 -0
- package/{lib/core/specification-search/index.d.ts → src/lib/core/specification-search/index.ts} +1 -1
- package/src/lib/core/specification-search/monkeyecx-specification-search.ts +111 -0
- package/src/lib/core/utils/decorators-utils.ts +56 -0
- package/{lib/core/utils/index.d.ts → src/lib/core/utils/index.ts} +8 -6
- package/src/lib/core/utils/statics.ts +36 -0
- package/src/lib/core/utils/utils.ts +237 -0
- package/src/lib/core/utils/validate-utils.ts +221 -0
- package/src/lib/core/utils/validators.ts +251 -0
- package/src/lib/monkey-front-core.module.ts +37 -0
- package/{public-api.d.ts → src/public-api.ts} +6 -3
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2020/lib/components/alerts/alerts.component.mjs +0 -35
- package/esm2020/lib/components/alerts/alerts.module.mjs +0 -21
- package/esm2020/lib/components/alerts/index.mjs +0 -3
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.component.mjs +0 -29
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.module.mjs +0 -43
- package/esm2020/lib/components/closed-to-maintenance/index.mjs +0 -3
- package/esm2020/lib/components/index.mjs +0 -5
- package/esm2020/lib/components/progress-bar/index.mjs +0 -4
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +0 -23
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +0 -18
- package/esm2020/lib/components/progress-bar/progress-bar.service.mjs +0 -50
- package/esm2020/lib/components/version-changed/index.mjs +0 -3
- package/esm2020/lib/components/version-changed/version-changed.component.mjs +0 -24
- package/esm2020/lib/components/version-changed/version-changed.module.mjs +0 -39
- package/esm2020/lib/core/decorators/index.mjs +0 -5
- package/esm2020/lib/core/decorators/monkeyecx-charts-decorators.mjs +0 -40
- package/esm2020/lib/core/decorators/monkeyecx-decorators.mjs +0 -111
- package/esm2020/lib/core/decorators/monkeyecx-download-decorators.mjs +0 -26
- package/esm2020/lib/core/decorators/monkeyecx-upload-decorators.mjs +0 -26
- package/esm2020/lib/core/directives/index.mjs +0 -13
- package/esm2020/lib/core/directives/monkeyecx-directives-module.mjs +0 -73
- package/esm2020/lib/core/directives/monkeyecx-drag-drop.mjs +0 -57
- package/esm2020/lib/core/directives/monkeyecx-feature-by-program-directive.mjs +0 -50
- package/esm2020/lib/core/directives/monkeyecx-feature-directive.mjs +0 -68
- package/esm2020/lib/core/directives/monkeyecx-format-currency.mjs +0 -44
- package/esm2020/lib/core/directives/monkeyecx-format-upper.mjs +0 -67
- package/esm2020/lib/core/directives/monkeyecx-only-alpha-numeric-directive.mjs +0 -28
- package/esm2020/lib/core/directives/monkeyecx-only-number-directive.mjs +0 -28
- package/esm2020/lib/core/directives/monkeyecx-popover-options.directive.mjs +0 -39
- package/esm2020/lib/core/directives/monkeyecx-popover.directive.mjs +0 -212
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +0 -69
- package/esm2020/lib/core/directives/monkeyecx-tooltip-directive.mjs +0 -123
- package/esm2020/lib/core/index.mjs +0 -10
- package/esm2020/lib/core/interceptors/index.mjs +0 -6
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +0 -39
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +0 -60
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-interceptor.module.mjs +0 -47
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.mjs +0 -43
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.mjs +0 -37
- package/esm2020/lib/core/interfaces/index.mjs +0 -30
- package/esm2020/lib/core/interfaces/monkeyecx-auth-credentials.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-company-pendencies.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-company.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-config-boostrap.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-country-security.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-error-response.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-filter.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-handled-error-response.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-header-credentials.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-intercom-options.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-me-credentials.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-navigation.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-program.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-releases.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-request-in-progress.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-response-links.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-response-paged.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-saved-state.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-scroll-options.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-service-credentials.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-support-options.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +0 -2
- package/esm2020/lib/core/interfaces/monkeyecx-translate-options.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-download/index.mjs +0 -4
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-download.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-downloaded.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-item-download.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-queue/index.mjs +0 -4
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-queue.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-upload/index.mjs +0 -3
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.mjs +0 -2
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-upload.mjs +0 -2
- package/esm2020/lib/core/interfaces/schedules/index.mjs +0 -2
- package/esm2020/lib/core/interfaces/schedules/monkeyecx-request-schedule.mjs +0 -2
- package/esm2020/lib/core/model/index.mjs +0 -2
- package/esm2020/lib/core/model/monkeyecx-model.mjs +0 -25
- package/esm2020/lib/core/pipes/index.mjs +0 -20
- package/esm2020/lib/core/pipes/monkeyecx-display-first-name.mjs +0 -19
- package/esm2020/lib/core/pipes/monkeyecx-display-initials.mjs +0 -21
- package/esm2020/lib/core/pipes/monkeyecx-format-address.mjs +0 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-beautify-json.mjs +0 -38
- package/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +0 -27
- package/esm2020/lib/core/pipes/monkeyecx-format-date-group.mjs +0 -45
- package/esm2020/lib/core/pipes/monkeyecx-format-date-timelapse.mjs +0 -32
- package/esm2020/lib/core/pipes/monkeyecx-format-date-unix-timelapse.mjs +0 -36
- package/esm2020/lib/core/pipes/monkeyecx-format-document.mjs +0 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-number.mjs +0 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-phone.mjs +0 -42
- package/esm2020/lib/core/pipes/monkeyecx-format-size.mjs +0 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-tax.mjs +0 -23
- package/esm2020/lib/core/pipes/monkeyecx-format-type-document.mjs +0 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-value.mjs +0 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-zipcode.mjs +0 -19
- package/esm2020/lib/core/pipes/monkeyecx-pipes.module.mjs +0 -107
- package/esm2020/lib/core/pipes/monkeyecx-text-truncate.mjs +0 -23
- package/esm2020/lib/core/pipes/monkeyecx-truncate-qtd.mjs +0 -16
- package/esm2020/lib/core/services/auth/index.mjs +0 -5
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-company.service.mjs +0 -28
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-login.service.mjs +0 -27
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard.service.mjs +0 -26
- package/esm2020/lib/core/services/auth/monkeyecx-authentication.service.mjs +0 -69
- package/esm2020/lib/core/services/commons/index.mjs +0 -2
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +0 -405
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +0 -40
- package/esm2020/lib/core/services/config/monkeyecx-config.module.mjs +0 -28
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +0 -111
- package/esm2020/lib/core/services/config/monkeyecx-error-config.service.mjs +0 -85
- package/esm2020/lib/core/services/config/monkeyecx-feature-toggle.service.mjs +0 -67
- package/esm2020/lib/core/services/config/monkeyecx-ga-config.service.mjs +0 -57
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +0 -92
- package/esm2020/lib/core/services/config/monkeyecx-logs-config.service.mjs +0 -34
- package/esm2020/lib/core/services/config/monkeyecx-maintenance-config.service.mjs +0 -37
- package/esm2020/lib/core/services/config/monkeyecx-security-console-config.service.mjs +0 -42
- package/esm2020/lib/core/services/config/monkeyecx-service-worker-config.service.mjs +0 -53
- package/esm2020/lib/core/services/error/index.mjs +0 -5
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.module.mjs +0 -27
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +0 -37
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +0 -135
- package/esm2020/lib/core/services/error/monkeyecx-others-errors-handling.service.mjs +0 -29
- package/esm2020/lib/core/services/index.mjs +0 -23
- package/esm2020/lib/core/services/logged/index.mjs +0 -2
- package/esm2020/lib/core/services/logged/monkeyecx-logged-handling.service.mjs +0 -40
- package/esm2020/lib/core/services/monkeyecx-handling.service.mjs +0 -50
- package/esm2020/lib/core/services/monkeyecx-service.service.mjs +0 -104
- package/esm2020/lib/core/services/pagination/index.mjs +0 -2
- package/esm2020/lib/core/services/pagination/monkeyecx-pagination.service.mjs +0 -29
- package/esm2020/lib/core/services/request-download/index.mjs +0 -3
- package/esm2020/lib/core/services/request-download/monkeyecx-request-download-handling.service.mjs +0 -93
- package/esm2020/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.mjs +0 -61
- package/esm2020/lib/core/services/request-paged/index.mjs +0 -2
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +0 -42
- package/esm2020/lib/core/services/request-queue/index.mjs +0 -3
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.mjs +0 -114
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.mjs +0 -119
- package/esm2020/lib/core/services/routes/index.mjs +0 -2
- package/esm2020/lib/core/services/routes/monkeyecx-dicovery-params.service.mjs +0 -54
- package/esm2020/lib/core/services/schedules/index.mjs +0 -2
- package/esm2020/lib/core/services/schedules/monkeyecx-request-schedule.service.mjs +0 -188
- package/esm2020/lib/core/services/storage/index.mjs +0 -3
- package/esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs +0 -32
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +0 -127
- package/esm2020/lib/core/specification-search/index.mjs +0 -2
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +0 -108
- package/esm2020/lib/core/utils/decorators-utils.mjs +0 -40
- package/esm2020/lib/core/utils/index.mjs +0 -8
- package/esm2020/lib/core/utils/statics.mjs +0 -38
- package/esm2020/lib/core/utils/utils.mjs +0 -221
- package/esm2020/lib/core/utils/validate-utils.mjs +0 -206
- package/esm2020/lib/core/utils/validators.mjs +0 -208
- package/esm2020/lib/monkey-front-core.module.mjs +0 -64
- package/esm2020/monkey-front-core.mjs +0 -5
- package/esm2020/public-api.mjs +0 -7
- package/fesm2015/monkey-front-core.mjs +0 -5123
- package/fesm2015/monkey-front-core.mjs.map +0 -1
- package/fesm2020/monkey-front-core.mjs +0 -5182
- package/fesm2020/monkey-front-core.mjs.map +0 -1
- package/lib/components/alerts/alerts.component.d.ts +0 -16
- package/lib/components/alerts/alerts.module.d.ts +0 -10
- package/lib/components/closed-to-maintenance/closed-to-maintenance.component.d.ts +0 -13
- package/lib/components/closed-to-maintenance/closed-to-maintenance.module.d.ts +0 -11
- package/lib/components/progress-bar/progress-bar.component.d.ts +0 -11
- package/lib/components/progress-bar/progress-bar.module.d.ts +0 -8
- package/lib/components/progress-bar/progress-bar.service.d.ts +0 -14
- package/lib/components/version-changed/version-changed.component.d.ts +0 -9
- package/lib/components/version-changed/version-changed.module.d.ts +0 -10
- package/lib/core/decorators/monkeyecx-charts-decorators.d.ts +0 -1
- package/lib/core/decorators/monkeyecx-decorators.d.ts +0 -7
- package/lib/core/decorators/monkeyecx-download-decorators.d.ts +0 -2
- package/lib/core/decorators/monkeyecx-upload-decorators.d.ts +0 -2
- package/lib/core/directives/monkeyecx-directives-module.d.ts +0 -19
- package/lib/core/directives/monkeyecx-drag-drop.d.ts +0 -12
- package/lib/core/directives/monkeyecx-feature-by-program-directive.d.ts +0 -15
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +0 -17
- package/lib/core/directives/monkeyecx-format-currency.d.ts +0 -16
- package/lib/core/directives/monkeyecx-format-upper.d.ts +0 -18
- package/lib/core/directives/monkeyecx-only-alpha-numeric-directive.d.ts +0 -9
- package/lib/core/directives/monkeyecx-only-number-directive.d.ts +0 -9
- package/lib/core/directives/monkeyecx-popover-options.directive.d.ts +0 -19
- package/lib/core/directives/monkeyecx-popover.directive.d.ts +0 -43
- package/lib/core/directives/monkeyecx-security-directive.d.ts +0 -17
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +0 -23
- package/lib/core/interceptors/monkeyecx-http-config-error.interceptor.d.ts +0 -17
- package/lib/core/interceptors/monkeyecx-http-config-header.interceptor.d.ts +0 -16
- package/lib/core/interceptors/monkeyecx-http-config-interceptor.module.d.ts +0 -9
- package/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.d.ts +0 -12
- package/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.d.ts +0 -14
- package/lib/core/interfaces/monkeyecx-auth-credentials.d.ts +0 -15
- package/lib/core/interfaces/monkeyecx-company.d.ts +0 -10
- package/lib/core/interfaces/monkeyecx-config-boostrap.d.ts +0 -14
- package/lib/core/interfaces/monkeyecx-config.d.ts +0 -125
- package/lib/core/interfaces/monkeyecx-country-security.d.ts +0 -4
- package/lib/core/interfaces/monkeyecx-error-response.d.ts +0 -5
- package/lib/core/interfaces/monkeyecx-filter.d.ts +0 -24
- package/lib/core/interfaces/monkeyecx-handled-error-response.d.ts +0 -10
- package/lib/core/interfaces/monkeyecx-header-credentials.d.ts +0 -4
- package/lib/core/interfaces/monkeyecx-me-credentials.d.ts +0 -22
- package/lib/core/interfaces/monkeyecx-navigation.d.ts +0 -27
- package/lib/core/interfaces/monkeyecx-program.d.ts +0 -10
- package/lib/core/interfaces/monkeyecx-releases.d.ts +0 -9
- package/lib/core/interfaces/monkeyecx-request-paged.d.ts +0 -23
- package/lib/core/interfaces/monkeyecx-response-links.d.ts +0 -11
- package/lib/core/interfaces/monkeyecx-response-paged.d.ts +0 -6
- package/lib/core/interfaces/monkeyecx-saved-state.d.ts +0 -5
- package/lib/core/interfaces/monkeyecx-token-credentials.d.ts +0 -20
- package/lib/core/interfaces/monkeyecx-translate-options.d.ts +0 -4
- package/lib/core/interfaces/request-download/monkeyecx-request-download.d.ts +0 -10
- package/lib/core/interfaces/request-download/monkeyecx-request-downloaded.d.ts +0 -7
- package/lib/core/interfaces/request-download/monkeyecx-request-item-download.d.ts +0 -7
- package/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.d.ts +0 -7
- package/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.d.ts +0 -6
- package/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.d.ts +0 -5
- package/lib/core/interfaces/request-upload/monkeyecx-request-upload.d.ts +0 -10
- package/lib/core/interfaces/schedules/monkeyecx-request-schedule.d.ts +0 -13
- package/lib/core/model/monkeyecx-model.d.ts +0 -13
- package/lib/core/pipes/monkeyecx-display-first-name.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-display-initials.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-address.d.ts +0 -14
- package/lib/core/pipes/monkeyecx-format-beautify-json.d.ts +0 -8
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +0 -11
- package/lib/core/pipes/monkeyecx-format-date-group.d.ts +0 -11
- package/lib/core/pipes/monkeyecx-format-date-timelapse.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-date-unix-timelapse.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-document.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-number.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-phone.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-size.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-tax.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-value.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-format-zipcode.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +0 -24
- package/lib/core/pipes/monkeyecx-text-truncate.d.ts +0 -7
- package/lib/core/pipes/monkeyecx-truncate-qtd.d.ts +0 -7
- package/lib/core/services/auth/monkeyecx-auth-guard-company.service.d.ts +0 -11
- package/lib/core/services/auth/monkeyecx-auth-guard-login.service.d.ts +0 -11
- package/lib/core/services/auth/monkeyecx-auth-guard.service.d.ts +0 -11
- package/lib/core/services/auth/monkeyecx-authentication.service.d.ts +0 -30
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +0 -124
- package/lib/core/services/config/monkeyecx-alerts-config.service.d.ts +0 -11
- package/lib/core/services/config/monkeyecx-config.module.d.ts +0 -9
- package/lib/core/services/config/monkeyecx-config.service.d.ts +0 -36
- package/lib/core/services/config/monkeyecx-error-config.service.d.ts +0 -8
- package/lib/core/services/config/monkeyecx-feature-toggle.service.d.ts +0 -16
- package/lib/core/services/config/monkeyecx-ga-config.service.d.ts +0 -10
- package/lib/core/services/config/monkeyecx-i18n-config.service.d.ts +0 -16
- package/lib/core/services/config/monkeyecx-logs-config.service.d.ts +0 -7
- package/lib/core/services/config/monkeyecx-maintenance-config.service.d.ts +0 -13
- package/lib/core/services/config/monkeyecx-security-console-config.service.d.ts +0 -11
- package/lib/core/services/config/monkeyecx-service-worker-config.service.d.ts +0 -16
- package/lib/core/services/error/monkeyecx-error-handling.module.d.ts +0 -9
- package/lib/core/services/error/monkeyecx-error-handling.service.d.ts +0 -9
- package/lib/core/services/error/monkeyecx-http-error-handling.service.d.ts +0 -26
- package/lib/core/services/error/monkeyecx-others-errors-handling.service.d.ts +0 -9
- package/lib/core/services/logged/monkeyecx-logged-handling.service.d.ts +0 -14
- package/lib/core/services/monkeyecx-handling.service.d.ts +0 -22
- package/lib/core/services/monkeyecx-service.service.d.ts +0 -18
- package/lib/core/services/pagination/monkeyecx-pagination.service.d.ts +0 -9
- package/lib/core/services/request-download/monkeyecx-request-download-handling.service.d.ts +0 -18
- package/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.d.ts +0 -16
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +0 -11
- package/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.d.ts +0 -21
- package/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.d.ts +0 -23
- package/lib/core/services/routes/monkeyecx-dicovery-params.service.d.ts +0 -13
- package/lib/core/services/schedules/monkeyecx-request-schedule.service.d.ts +0 -47
- package/lib/core/services/storage/monkeyecx-cookie-storage.service.d.ts +0 -11
- package/lib/core/services/storage/monkeyecx-token-storage.service.d.ts +0 -29
- package/lib/core/specification-search/monkeyecx-specification-search.d.ts +0 -20
- package/lib/core/utils/decorators-utils.d.ts +0 -5
- package/lib/core/utils/statics.d.ts +0 -28
- package/lib/core/utils/utils.d.ts +0 -22
- package/lib/core/utils/validate-utils.d.ts +0 -66
- package/lib/core/utils/validators.d.ts +0 -29
- package/lib/monkey-front-core.module.d.ts +0 -17
- package/monkey-front-core-0.0.237.tgz +0 -0
- package/monkey-front-core.d.ts +0 -5
package/{lib/core/services/request-paged/index.d.ts → src/lib/core/services/request-paged/index.ts}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './monkeyecx-request-request-paged-handling';
|
|
1
|
+
export * from './monkeyecx-request-request-paged-handling';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { HttpParams } from '@angular/common/http';
|
|
2
|
+
import { MonkeyEcxRequestPaged } from '../../interfaces/monkeyecx-request-paged';
|
|
3
|
+
import { MonkeyEcxResponseLinks } from '../../interfaces/monkeyecx-response-links';
|
|
4
|
+
|
|
5
|
+
export class MonkeyEcxRequestPagedHandling {
|
|
6
|
+
private url?: string;
|
|
7
|
+
|
|
8
|
+
private pagedParams: MonkeyEcxRequestPaged;
|
|
9
|
+
|
|
10
|
+
private links: MonkeyEcxResponseLinks;
|
|
11
|
+
|
|
12
|
+
private samePage = false;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
url?: string,
|
|
16
|
+
pagedParams?: MonkeyEcxRequestPaged,
|
|
17
|
+
links?: any,
|
|
18
|
+
samePage: boolean = false
|
|
19
|
+
) {
|
|
20
|
+
this.url = url;
|
|
21
|
+
this.pagedParams = pagedParams || {
|
|
22
|
+
page: {},
|
|
23
|
+
};
|
|
24
|
+
this.links = links;
|
|
25
|
+
this.samePage = samePage;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private handlePagedValuesFromApi(url: string = '') {
|
|
29
|
+
if (url.search('\\?') < 0) return url;
|
|
30
|
+
const params = url.substring(url.search('\\?') + 1, url.length);
|
|
31
|
+
url = url.substring(0, url.search('\\?'));
|
|
32
|
+
return `${url}?${new HttpParams({
|
|
33
|
+
fromString: params,
|
|
34
|
+
})
|
|
35
|
+
.delete('size')
|
|
36
|
+
.delete('page')
|
|
37
|
+
.toString()}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private getUrlParams(url: string): string {
|
|
41
|
+
const { pagedParams } = this;
|
|
42
|
+
const { number, size } = pagedParams?.page || {};
|
|
43
|
+
const hasInitialQueryParams = url.search('\\?') > 0;
|
|
44
|
+
return `${!hasInitialQueryParams ? '?' : '&'}page=${number || 0}&size=${size || 20}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public getRequestWithPagedParams(): string {
|
|
48
|
+
const { url, links, samePage } = this;
|
|
49
|
+
if (samePage && links.self) {
|
|
50
|
+
return links.self.href;
|
|
51
|
+
}
|
|
52
|
+
if (links && links.next) {
|
|
53
|
+
return links.next.href;
|
|
54
|
+
}
|
|
55
|
+
const handled = this.handlePagedValuesFromApi(url);
|
|
56
|
+
return `${handled}${this.getUrlParams(handled)}`;
|
|
57
|
+
}
|
|
58
|
+
}
|
package/{lib/core/services/request-queue/index.d.ts → src/lib/core/services/request-queue/index.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './monkeyecx-request-queue-handling.service';
|
|
2
|
-
export * from './monkeyecx-request-queue-modal-handling.service';
|
|
1
|
+
export * from './monkeyecx-request-queue-handling.service';
|
|
2
|
+
export * from './monkeyecx-request-queue-modal-handling.service';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
+
import { map } from 'rxjs/operators';
|
|
4
|
+
import { MonkeyEcxRequestProgressQueue, MonkeyEcxRequestQueue } from '../../interfaces';
|
|
5
|
+
import { Statics } from '../../utils';
|
|
6
|
+
|
|
7
|
+
@Injectable({
|
|
8
|
+
providedIn: 'root'
|
|
9
|
+
})
|
|
10
|
+
export class MonkeyEcxRequestQueueHandlingService {
|
|
11
|
+
private queue: MonkeyEcxRequestQueue[] = [];
|
|
12
|
+
|
|
13
|
+
private queues$: BehaviorSubject<MonkeyEcxRequestQueue[] | any>;
|
|
14
|
+
|
|
15
|
+
private newQueue = new BehaviorSubject(false);
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
this.queues$ = new BehaviorSubject([]);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private addToQueue(q: MonkeyEcxRequestQueue) {
|
|
22
|
+
this.queue.push(q);
|
|
23
|
+
this.queues$.next(this.queue);
|
|
24
|
+
this.newQueue.next(true);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
private markQueueItemAsFinish(q: MonkeyEcxRequestQueue, status?: number, action?: Function) {
|
|
28
|
+
const saved = [...this.queue];
|
|
29
|
+
this.queue = [
|
|
30
|
+
...saved.map((val: any) => {
|
|
31
|
+
const valSaved = {
|
|
32
|
+
...val
|
|
33
|
+
};
|
|
34
|
+
if (val.status === Statics.MonkeyEcxQueueEvents.OnGoing) {
|
|
35
|
+
if (valSaved.item.id === q.item.id) {
|
|
36
|
+
return {
|
|
37
|
+
...valSaved,
|
|
38
|
+
status: status || Statics.MonkeyEcxQueueEvents.Finished,
|
|
39
|
+
action
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return valSaved;
|
|
44
|
+
})
|
|
45
|
+
];
|
|
46
|
+
this.queues$.next(this.queue);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private updateQueue(q: MonkeyEcxRequestQueue, progress: MonkeyEcxRequestProgressQueue) {
|
|
50
|
+
const saved = [...this.queue];
|
|
51
|
+
this.queue = [
|
|
52
|
+
...saved.map((val: any) => {
|
|
53
|
+
const valSaved = {
|
|
54
|
+
...val
|
|
55
|
+
};
|
|
56
|
+
const { total, loaded } = progress;
|
|
57
|
+
const currentPecentage = Math.floor(((loaded||0) / (total || 0)) * 100);
|
|
58
|
+
const totalPercentage = 100;
|
|
59
|
+
if (valSaved.item.id === q.item.id) {
|
|
60
|
+
return {
|
|
61
|
+
...valSaved,
|
|
62
|
+
progress: {
|
|
63
|
+
loaded,
|
|
64
|
+
total,
|
|
65
|
+
currentPercentage: currentPecentage,
|
|
66
|
+
totalPercentage
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return valSaved;
|
|
71
|
+
})
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
this.queues$.next(this.queue);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private deleteQueue(q: MonkeyEcxRequestQueue) {
|
|
78
|
+
const saved = [...this.queue];
|
|
79
|
+
this.queue = [
|
|
80
|
+
...saved.map((val: any) => {
|
|
81
|
+
const valSaved = {
|
|
82
|
+
...val
|
|
83
|
+
};
|
|
84
|
+
if (valSaved.item.id === q.item.id) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
return valSaved;
|
|
88
|
+
})
|
|
89
|
+
].filter((_: any) => {
|
|
90
|
+
return _;
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
this.queues$.next(this.queue);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public setQueue(q: MonkeyEcxRequestQueue | null) {
|
|
97
|
+
if (!q) return;
|
|
98
|
+
this.addToQueue(q);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
public getQueue(): Observable<MonkeyEcxRequestQueue[]> {
|
|
102
|
+
return this.queues$.asObservable();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
public finishQueueItem(q: MonkeyEcxRequestQueue | null, action?: Function, status?: number) {
|
|
106
|
+
if (!q) return;
|
|
107
|
+
this.markQueueItemAsFinish(q, status, action);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
public removeQueueItem(q: MonkeyEcxRequestQueue) {
|
|
111
|
+
this.deleteQueue(q);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
public updateQueueItem(q: MonkeyEcxRequestQueue, progress: MonkeyEcxRequestProgressQueue) {
|
|
115
|
+
this.updateQueue(q, progress);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
public hasNewQueue(): Observable<boolean> {
|
|
119
|
+
return this.newQueue.pipe(
|
|
120
|
+
map((_: any) => {
|
|
121
|
+
return _;
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
+
import { map } from 'rxjs/operators';
|
|
4
|
+
import { MonkeyEcxRequestProgressQueue, MonkeyEcxRequestQueue } from '../../interfaces';
|
|
5
|
+
import { Statics } from '../../utils';
|
|
6
|
+
|
|
7
|
+
@Injectable({
|
|
8
|
+
providedIn: 'root'
|
|
9
|
+
})
|
|
10
|
+
export class MonkeyEcxRequestQueueModalHandlingService {
|
|
11
|
+
private queue: MonkeyEcxRequestQueue[] = [];
|
|
12
|
+
|
|
13
|
+
private queues$: BehaviorSubject<MonkeyEcxRequestQueue[] | any>;
|
|
14
|
+
|
|
15
|
+
private newQueue$ = new BehaviorSubject(false);
|
|
16
|
+
|
|
17
|
+
private allQueueFinished$ = new BehaviorSubject(false);
|
|
18
|
+
|
|
19
|
+
constructor() {
|
|
20
|
+
this.queues$ = new BehaviorSubject([]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private addToQueue(q: MonkeyEcxRequestQueue) {
|
|
24
|
+
this.queue.push(q);
|
|
25
|
+
this.queues$.next(this.queue);
|
|
26
|
+
this.newQueue$.next(true);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private markQueueItemAsFinish(q: MonkeyEcxRequestQueue, status?: number, action?: Function) {
|
|
30
|
+
const saved = [...this.queue];
|
|
31
|
+
this.queue = [
|
|
32
|
+
...saved.map((val: any) => {
|
|
33
|
+
const valSaved = {
|
|
34
|
+
...val
|
|
35
|
+
};
|
|
36
|
+
if (val.status === Statics.MonkeyEcxQueueEvents.OnGoing) {
|
|
37
|
+
if (valSaved.item.id === q.item.id) {
|
|
38
|
+
return {
|
|
39
|
+
...valSaved,
|
|
40
|
+
status: status || Statics.MonkeyEcxQueueEvents.Finished,
|
|
41
|
+
action
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return valSaved;
|
|
46
|
+
})
|
|
47
|
+
];
|
|
48
|
+
this.queues$.next(this.queue);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private updateQueue(q: MonkeyEcxRequestQueue, progress: MonkeyEcxRequestProgressQueue) {
|
|
52
|
+
const saved = [...this.queue];
|
|
53
|
+
this.queue = [
|
|
54
|
+
...saved.map((val: any) => {
|
|
55
|
+
const valSaved = {
|
|
56
|
+
...val
|
|
57
|
+
};
|
|
58
|
+
const { total, loaded } = progress;
|
|
59
|
+
const currentPecentage = Math.floor(((loaded||0) / (total||0)) * 100);
|
|
60
|
+
const totalPercentage = 100;
|
|
61
|
+
if (valSaved.item.id === q.item.id) {
|
|
62
|
+
return {
|
|
63
|
+
...valSaved,
|
|
64
|
+
progress: {
|
|
65
|
+
loaded,
|
|
66
|
+
total,
|
|
67
|
+
currentPercentage: currentPecentage,
|
|
68
|
+
totalPercentage
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return valSaved;
|
|
73
|
+
})
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
this.queues$.next(this.queue);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
private deleteQueue(q: MonkeyEcxRequestQueue) {
|
|
80
|
+
const saved = [...this.queue];
|
|
81
|
+
this.queue = [
|
|
82
|
+
...saved.map((val: any) => {
|
|
83
|
+
const valSaved = {
|
|
84
|
+
...val
|
|
85
|
+
};
|
|
86
|
+
if (valSaved.item.id === q.item.id) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
return valSaved;
|
|
90
|
+
})
|
|
91
|
+
].filter((_: any) => {
|
|
92
|
+
return _;
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
this.queues$.next(this.queue);
|
|
96
|
+
if (this.queue.length <= 0) {
|
|
97
|
+
this.allQueueFinished$.next(true);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
public setQueue(q: MonkeyEcxRequestQueue) {
|
|
102
|
+
this.addToQueue(q);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
public getQueue(): Observable<MonkeyEcxRequestQueue[]> {
|
|
106
|
+
return this.queues$.asObservable();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
public finishQueueItem(q: MonkeyEcxRequestQueue, action?: Function, status?: number) {
|
|
110
|
+
this.markQueueItemAsFinish(q, status, action);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
public removeQueueItem(q: MonkeyEcxRequestQueue) {
|
|
114
|
+
this.deleteQueue(q);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
public updateQueueItem(q: MonkeyEcxRequestQueue, progress: MonkeyEcxRequestProgressQueue) {
|
|
118
|
+
this.updateQueue(q, progress);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
public hasNewQueue(): Observable<boolean> {
|
|
122
|
+
return this.newQueue$.pipe(
|
|
123
|
+
map((_: any) => {
|
|
124
|
+
return _;
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
public hasAllQueueFinished(): Observable<boolean> {
|
|
130
|
+
return this.allQueueFinished$.pipe(
|
|
131
|
+
map((_: any) => {
|
|
132
|
+
return _;
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './monkeyecx-dicovery-params.service';
|
|
1
|
+
export * from './monkeyecx-dicovery-params.service';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Router, ActivatedRouteSnapshot } from '@angular/router';
|
|
3
|
+
import { MonkeyEcxUtils } from '../../utils/utils';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root'
|
|
7
|
+
})
|
|
8
|
+
export class MonkeyEcxDiscoveryParamsService {
|
|
9
|
+
constructor(private router: Router) {
|
|
10
|
+
// not to do
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
private getLastChild(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot {
|
|
14
|
+
if (route.firstChild) {
|
|
15
|
+
return this.getLastChild(route.firstChild);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return route;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public setData(field: string, value: any): any {
|
|
22
|
+
const { root } = this.router.routerState.snapshot;
|
|
23
|
+
const route: ActivatedRouteSnapshot = this.getLastChild(root);
|
|
24
|
+
route.data[field] = value;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public getData(field: string): any {
|
|
28
|
+
const { root } = this.router.routerState.snapshot;
|
|
29
|
+
const route: ActivatedRouteSnapshot = this.getLastChild(root);
|
|
30
|
+
|
|
31
|
+
const found: any = MonkeyEcxUtils.persistNullEmptyUndefined(route) ? route.data[field] : null;
|
|
32
|
+
return found;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public getDataFromCurrentNavigation(field: string): any {
|
|
36
|
+
const navigation = this.router.getCurrentNavigation();
|
|
37
|
+
let state: any = null;
|
|
38
|
+
if (MonkeyEcxUtils.persistNullEmptyUndefined(navigation)) {
|
|
39
|
+
state = navigation?.extras.state;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return state ? state[field] : null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public getParam(param: string): string | null {
|
|
46
|
+
const { root } = this.router.routerState.snapshot;
|
|
47
|
+
const route: ActivatedRouteSnapshot = this.getLastChild(root);
|
|
48
|
+
let found: string = MonkeyEcxUtils.persistNullEmptyUndefined(route)
|
|
49
|
+
? route?.paramMap?.get(param) || ''
|
|
50
|
+
: '';
|
|
51
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(found)) found = this.getData(param);
|
|
52
|
+
return found;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './monkeyecx-request-schedule.service';
|
|
1
|
+
export * from './monkeyecx-request-schedule.service';
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
3
|
+
import { MonkeyEcxCoreService } from '../../decorators/monkeyecx-decorators';
|
|
4
|
+
import { MonkeyEcxUtils } from '../../utils/utils';
|
|
5
|
+
import { MonkeyEcxRequestSchedule } from '../../interfaces';
|
|
6
|
+
import { MonkeyEcxService } from '../monkeyecx-service.service';
|
|
7
|
+
import { MonkeyEcxLoggedHandlingService } from '../logged';
|
|
8
|
+
|
|
9
|
+
@Injectable({
|
|
10
|
+
providedIn: 'root'
|
|
11
|
+
})
|
|
12
|
+
export class MonkeyEcxRequestScheduleService {
|
|
13
|
+
private schedule: MonkeyEcxRequestSchedule[] | any[] = [];
|
|
14
|
+
|
|
15
|
+
private genericSchedule: MonkeyEcxRequestSchedule[] | any[] = [];
|
|
16
|
+
|
|
17
|
+
constructor(
|
|
18
|
+
public monkeyecxService: MonkeyEcxService,
|
|
19
|
+
private monkeyLoggedHandlingService: MonkeyEcxLoggedHandlingService
|
|
20
|
+
) {
|
|
21
|
+
// not to do
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
private addToSchedule(q: MonkeyEcxRequestSchedule) {
|
|
25
|
+
this.schedule.push(q);
|
|
26
|
+
this.monkeyLoggedHandlingService.addSchedule(this.schedule);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private addToGenericSchedule(q: MonkeyEcxRequestSchedule) {
|
|
30
|
+
this.genericSchedule.push(q);
|
|
31
|
+
this.monkeyLoggedHandlingService.addGenericSchedule(this.genericSchedule);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private removeFromSchedule(q: MonkeyEcxRequestSchedule) {
|
|
35
|
+
clearInterval(q.interval);
|
|
36
|
+
const saved = [...this.schedule];
|
|
37
|
+
this.schedule = [
|
|
38
|
+
...saved.map((sch: MonkeyEcxRequestSchedule) => {
|
|
39
|
+
const savedLocal = {
|
|
40
|
+
...sch
|
|
41
|
+
};
|
|
42
|
+
if (sch.id === q.id) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return savedLocal;
|
|
46
|
+
})
|
|
47
|
+
].filter((_: any) => {
|
|
48
|
+
return _;
|
|
49
|
+
});
|
|
50
|
+
this.monkeyLoggedHandlingService.addSchedule(this.schedule);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private removeFromGenericSchedule(q: MonkeyEcxRequestSchedule) {
|
|
54
|
+
clearInterval(q.interval);
|
|
55
|
+
const saved = [...this.genericSchedule];
|
|
56
|
+
this.genericSchedule = [
|
|
57
|
+
...saved.map((sch: MonkeyEcxRequestSchedule) => {
|
|
58
|
+
const savedLocal = {
|
|
59
|
+
...sch
|
|
60
|
+
};
|
|
61
|
+
if (sch.id === q.id) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return savedLocal;
|
|
65
|
+
})
|
|
66
|
+
].filter((_: any) => {
|
|
67
|
+
return _;
|
|
68
|
+
});
|
|
69
|
+
this.monkeyLoggedHandlingService.addGenericSchedule(this.genericSchedule);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private removeFromScheduleById(id: string) {
|
|
73
|
+
const q = this.getScheduleById(id);
|
|
74
|
+
clearInterval(q?.interval);
|
|
75
|
+
const saved = [...this.schedule];
|
|
76
|
+
this.schedule = [
|
|
77
|
+
...saved.map((sch: MonkeyEcxRequestSchedule) => {
|
|
78
|
+
const savedLocal = {
|
|
79
|
+
...sch
|
|
80
|
+
};
|
|
81
|
+
if (sch.id === q?.id) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return savedLocal;
|
|
85
|
+
})
|
|
86
|
+
].filter((_: any) => {
|
|
87
|
+
return _;
|
|
88
|
+
});
|
|
89
|
+
this.monkeyLoggedHandlingService.addSchedule(this.schedule);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@MonkeyEcxCoreService({
|
|
93
|
+
httpResponse: {
|
|
94
|
+
httpCodeIgnore: [400, 403, 404, 500, 503]
|
|
95
|
+
},
|
|
96
|
+
requestInProgress: {
|
|
97
|
+
showProgress: false
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
private doCall(sch: MonkeyEcxRequestSchedule) {
|
|
101
|
+
const { url, method, params, data, action, errorAction } = sch;
|
|
102
|
+
|
|
103
|
+
const errAction = errorAction || ((...args) => {});
|
|
104
|
+
|
|
105
|
+
this.monkeyecxService[method.toLowerCase()]<any>(`${url}`, params).subscribe(
|
|
106
|
+
(resp: any) => {
|
|
107
|
+
action(
|
|
108
|
+
{
|
|
109
|
+
...data,
|
|
110
|
+
...resp
|
|
111
|
+
},
|
|
112
|
+
sch
|
|
113
|
+
);
|
|
114
|
+
},
|
|
115
|
+
(err: HttpErrorResponse) => {
|
|
116
|
+
this.removeFromSchedule(sch);
|
|
117
|
+
errAction(
|
|
118
|
+
{
|
|
119
|
+
...data
|
|
120
|
+
},
|
|
121
|
+
sch,
|
|
122
|
+
err
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@MonkeyEcxCoreService({
|
|
129
|
+
httpResponse: {
|
|
130
|
+
httpCodeIgnore: [400, 401, 403, 404, 500, 503],
|
|
131
|
+
httpCodeIgnoreRedirect: [503]
|
|
132
|
+
},
|
|
133
|
+
requestInProgress: {
|
|
134
|
+
showProgress: false
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
private doGenericCall(sch: MonkeyEcxRequestSchedule) {
|
|
138
|
+
const { url, method, params, data, action, errorAction } = sch;
|
|
139
|
+
|
|
140
|
+
const errAction = errorAction || ((...args) => {});
|
|
141
|
+
|
|
142
|
+
this.monkeyecxService[method.toLowerCase()]<any>(`${url}`, params).subscribe(
|
|
143
|
+
(resp: any) => {
|
|
144
|
+
action(
|
|
145
|
+
{
|
|
146
|
+
...data,
|
|
147
|
+
...resp
|
|
148
|
+
},
|
|
149
|
+
sch
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
(err: HttpErrorResponse) => {
|
|
153
|
+
this.removeFromGenericSchedule(sch);
|
|
154
|
+
errAction(
|
|
155
|
+
{
|
|
156
|
+
...data
|
|
157
|
+
},
|
|
158
|
+
sch,
|
|
159
|
+
err
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
public setSchedule(q: MonkeyEcxRequestSchedule, delay: number = 3000) {
|
|
166
|
+
const id = q?.id || `${MonkeyEcxUtils.getRandomString(40)}`;
|
|
167
|
+
const obj = {
|
|
168
|
+
...q,
|
|
169
|
+
id
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const interval = setInterval(() => {
|
|
173
|
+
this.doCall({
|
|
174
|
+
...obj,
|
|
175
|
+
interval
|
|
176
|
+
});
|
|
177
|
+
}, delay);
|
|
178
|
+
|
|
179
|
+
const sch = {
|
|
180
|
+
...obj,
|
|
181
|
+
interval
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
this.addToSchedule(sch);
|
|
185
|
+
return sch;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public setGenericSchedule(q: MonkeyEcxRequestSchedule, delay: number = 3000) {
|
|
189
|
+
const interval = setInterval(() => {
|
|
190
|
+
this.doGenericCall({
|
|
191
|
+
...q,
|
|
192
|
+
interval
|
|
193
|
+
});
|
|
194
|
+
}, delay);
|
|
195
|
+
|
|
196
|
+
const sch = {
|
|
197
|
+
...q,
|
|
198
|
+
id: `${MonkeyEcxUtils.getRandomString(40)}`,
|
|
199
|
+
interval
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
this.addToGenericSchedule(sch);
|
|
203
|
+
return sch;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
public removeSchedule(q: MonkeyEcxRequestSchedule) {
|
|
207
|
+
this.removeFromSchedule(q);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
public removeGenericSchedule(q: MonkeyEcxRequestSchedule) {
|
|
211
|
+
this.removeFromGenericSchedule(q);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
public removeScheduleById(id: string) {
|
|
215
|
+
this.removeFromScheduleById(id);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
public getScheduleById(id: string) {
|
|
219
|
+
const q = this.schedule.find((sch: MonkeyEcxRequestSchedule) => {
|
|
220
|
+
return sch.id === id;
|
|
221
|
+
});
|
|
222
|
+
return q;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './monkeyecx-token-storage.service';
|
|
2
|
-
export * from './monkeyecx-cookie-storage.service';
|
|
1
|
+
export * from './monkeyecx-token-storage.service';
|
|
2
|
+
export * from './monkeyecx-cookie-storage.service';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { CookieService } from 'ngx-cookie-service';
|
|
3
|
+
|
|
4
|
+
@Injectable({
|
|
5
|
+
providedIn: 'root'
|
|
6
|
+
})
|
|
7
|
+
export class MonkeyEcxCookieStorageService {
|
|
8
|
+
constructor(private cookieService: CookieService) {
|
|
9
|
+
// not to do
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public setCookie(name: string, value: any, environment: any) {
|
|
13
|
+
this.removeCookie(name, environment);
|
|
14
|
+
const { urlDomain } = environment;
|
|
15
|
+
const handledDomain = urlDomain ? `.${urlDomain}` : '';
|
|
16
|
+
this.cookieService.set(name, value, undefined, '/', handledDomain, true, 'None');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public getCookie(name: string) {
|
|
20
|
+
return this.cookieService.get(name);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public removeCookie(name: string, environment: any) {
|
|
24
|
+
const { urlDomain } = environment;
|
|
25
|
+
const handledDomain = urlDomain ? `.${urlDomain}` : '';
|
|
26
|
+
this.cookieService.delete(name, '/', handledDomain, true, 'None');
|
|
27
|
+
}
|
|
28
|
+
}
|