monkey-front-core 0.0.238 → 0.0.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/alerts/alerts.component.mjs +35 -0
- package/esm2020/lib/components/alerts/alerts.module.mjs +21 -0
- package/esm2020/lib/components/alerts/index.mjs +3 -0
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.component.mjs +29 -0
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.module.mjs +43 -0
- package/esm2020/lib/components/closed-to-maintenance/index.mjs +3 -0
- package/esm2020/lib/components/index.mjs +5 -0
- package/esm2020/lib/components/progress-bar/index.mjs +4 -0
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +23 -0
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +18 -0
- package/esm2020/lib/components/progress-bar/progress-bar.service.mjs +50 -0
- package/esm2020/lib/components/version-changed/index.mjs +3 -0
- package/esm2020/lib/components/version-changed/version-changed.component.mjs +24 -0
- package/esm2020/lib/components/version-changed/version-changed.module.mjs +39 -0
- package/esm2020/lib/core/decorators/index.mjs +5 -0
- package/esm2020/lib/core/decorators/monkeyecx-charts-decorators.mjs +40 -0
- package/esm2020/lib/core/decorators/monkeyecx-decorators.mjs +111 -0
- package/esm2020/lib/core/decorators/monkeyecx-download-decorators.mjs +26 -0
- package/esm2020/lib/core/decorators/monkeyecx-upload-decorators.mjs +26 -0
- package/esm2020/lib/core/directives/index.mjs +13 -0
- package/esm2020/lib/core/directives/monkeyecx-directives-module.mjs +73 -0
- package/esm2020/lib/core/directives/monkeyecx-drag-drop.mjs +57 -0
- package/esm2020/lib/core/directives/monkeyecx-feature-by-program-directive.mjs +50 -0
- package/esm2020/lib/core/directives/monkeyecx-feature-directive.mjs +68 -0
- package/esm2020/lib/core/directives/monkeyecx-format-currency.mjs +44 -0
- package/esm2020/lib/core/directives/monkeyecx-format-upper.mjs +67 -0
- package/esm2020/lib/core/directives/monkeyecx-only-alpha-numeric-directive.mjs +28 -0
- package/esm2020/lib/core/directives/monkeyecx-only-number-directive.mjs +28 -0
- package/esm2020/lib/core/directives/monkeyecx-popover-options.directive.mjs +39 -0
- package/esm2020/lib/core/directives/monkeyecx-popover.directive.mjs +212 -0
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +69 -0
- package/esm2020/lib/core/directives/monkeyecx-tooltip-directive.mjs +123 -0
- package/esm2020/lib/core/index.mjs +10 -0
- package/esm2020/lib/core/interceptors/index.mjs +6 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +39 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +60 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-interceptor.module.mjs +47 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.mjs +43 -0
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.mjs +37 -0
- package/esm2020/lib/core/interfaces/index.mjs +30 -0
- package/esm2020/lib/core/interfaces/monkeyecx-auth-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-company-pendencies.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-company.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-config-boostrap.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-country-security.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-error-response.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-filter.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-handled-error-response.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-header-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-intercom-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-me-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-navigation.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-program.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-releases.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-request-in-progress.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-response-links.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-response-paged.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-saved-state.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-scroll-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-service-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-support-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +2 -0
- package/esm2020/lib/core/interfaces/monkeyecx-translate-options.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-download/index.mjs +4 -0
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-download.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-downloaded.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-item-download.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-queue/index.mjs +4 -0
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-queue.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-upload/index.mjs +3 -0
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.mjs +2 -0
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-upload.mjs +2 -0
- package/esm2020/lib/core/interfaces/schedules/index.mjs +2 -0
- package/esm2020/lib/core/interfaces/schedules/monkeyecx-request-schedule.mjs +2 -0
- package/esm2020/lib/core/model/index.mjs +2 -0
- package/esm2020/lib/core/model/monkeyecx-model.mjs +25 -0
- package/esm2020/lib/core/pipes/index.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-display-first-name.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-display-initials.mjs +21 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-address.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-beautify-json.mjs +38 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +27 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-group.mjs +45 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-timelapse.mjs +32 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-date-unix-timelapse.mjs +36 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-document.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-number.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-phone.mjs +42 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-size.mjs +20 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-tax.mjs +23 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-type-document.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-value.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-zipcode.mjs +19 -0
- package/esm2020/lib/core/pipes/monkeyecx-pipes.module.mjs +107 -0
- package/esm2020/lib/core/pipes/monkeyecx-text-truncate.mjs +23 -0
- package/esm2020/lib/core/pipes/monkeyecx-truncate-qtd.mjs +16 -0
- package/esm2020/lib/core/services/auth/index.mjs +5 -0
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-company.service.mjs +28 -0
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-login.service.mjs +27 -0
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard.service.mjs +26 -0
- package/esm2020/lib/core/services/auth/monkeyecx-authentication.service.mjs +69 -0
- package/esm2020/lib/core/services/commons/index.mjs +2 -0
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +405 -0
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +40 -0
- package/esm2020/lib/core/services/config/monkeyecx-config.module.mjs +28 -0
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +111 -0
- package/esm2020/lib/core/services/config/monkeyecx-error-config.service.mjs +85 -0
- package/esm2020/lib/core/services/config/monkeyecx-feature-toggle.service.mjs +67 -0
- package/esm2020/lib/core/services/config/monkeyecx-ga-config.service.mjs +57 -0
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +92 -0
- package/esm2020/lib/core/services/config/monkeyecx-logs-config.service.mjs +34 -0
- package/esm2020/lib/core/services/config/monkeyecx-maintenance-config.service.mjs +37 -0
- package/esm2020/lib/core/services/config/monkeyecx-security-console-config.service.mjs +42 -0
- package/esm2020/lib/core/services/config/monkeyecx-service-worker-config.service.mjs +53 -0
- package/esm2020/lib/core/services/error/index.mjs +5 -0
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.module.mjs +27 -0
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +37 -0
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +135 -0
- package/esm2020/lib/core/services/error/monkeyecx-others-errors-handling.service.mjs +29 -0
- package/esm2020/lib/core/services/index.mjs +23 -0
- package/esm2020/lib/core/services/logged/index.mjs +2 -0
- package/esm2020/lib/core/services/logged/monkeyecx-logged-handling.service.mjs +40 -0
- package/esm2020/lib/core/services/monkeyecx-handling.service.mjs +50 -0
- package/esm2020/lib/core/services/monkeyecx-service.service.mjs +104 -0
- package/esm2020/lib/core/services/pagination/index.mjs +2 -0
- package/esm2020/lib/core/services/pagination/monkeyecx-pagination.service.mjs +29 -0
- package/esm2020/lib/core/services/request-download/index.mjs +3 -0
- package/esm2020/lib/core/services/request-download/monkeyecx-request-download-handling.service.mjs +93 -0
- package/esm2020/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.mjs +61 -0
- package/esm2020/lib/core/services/request-paged/index.mjs +2 -0
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +42 -0
- package/esm2020/lib/core/services/request-queue/index.mjs +3 -0
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.mjs +114 -0
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.mjs +119 -0
- package/esm2020/lib/core/services/routes/index.mjs +2 -0
- package/esm2020/lib/core/services/routes/monkeyecx-dicovery-params.service.mjs +54 -0
- package/esm2020/lib/core/services/schedules/index.mjs +2 -0
- package/esm2020/lib/core/services/schedules/monkeyecx-request-schedule.service.mjs +188 -0
- package/esm2020/lib/core/services/storage/index.mjs +3 -0
- package/esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs +32 -0
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +127 -0
- package/esm2020/lib/core/specification-search/index.mjs +2 -0
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +108 -0
- package/esm2020/lib/core/utils/decorators-utils.mjs +40 -0
- package/esm2020/lib/core/utils/index.mjs +8 -0
- package/esm2020/lib/core/utils/statics.mjs +38 -0
- package/esm2020/lib/core/utils/utils.mjs +221 -0
- package/esm2020/lib/core/utils/validate-utils.mjs +206 -0
- package/esm2020/lib/core/utils/validators.mjs +208 -0
- package/esm2020/lib/monkey-front-core.module.mjs +64 -0
- package/esm2020/monkey-front-core.mjs +5 -0
- package/esm2020/public-api.mjs +7 -0
- package/fesm2015/monkey-front-core.mjs +5123 -0
- package/fesm2015/monkey-front-core.mjs.map +1 -0
- package/fesm2020/monkey-front-core.mjs +5182 -0
- package/fesm2020/monkey-front-core.mjs.map +1 -0
- package/lib/components/alerts/alerts.component.d.ts +16 -0
- package/lib/components/alerts/alerts.module.d.ts +10 -0
- package/{src/lib/components/alerts/index.ts → lib/components/alerts/index.d.ts} +2 -2
- package/lib/components/closed-to-maintenance/closed-to-maintenance.component.d.ts +13 -0
- package/lib/components/closed-to-maintenance/closed-to-maintenance.module.d.ts +11 -0
- package/{src/lib/components/closed-to-maintenance/index.ts → lib/components/closed-to-maintenance/index.d.ts} +2 -2
- package/{src/lib/components/index.ts → lib/components/index.d.ts} +4 -4
- package/{src/lib/components/progress-bar/index.ts → lib/components/progress-bar/index.d.ts} +3 -3
- package/lib/components/progress-bar/progress-bar.component.d.ts +11 -0
- package/lib/components/progress-bar/progress-bar.module.d.ts +8 -0
- package/lib/components/progress-bar/progress-bar.service.d.ts +14 -0
- package/{src/lib/components/version-changed/index.ts → lib/components/version-changed/index.d.ts} +2 -2
- package/lib/components/version-changed/version-changed.component.d.ts +9 -0
- package/lib/components/version-changed/version-changed.module.d.ts +10 -0
- package/{src/lib/core/decorators/index.ts → lib/core/decorators/index.d.ts} +4 -4
- package/lib/core/decorators/monkeyecx-charts-decorators.d.ts +1 -0
- package/lib/core/decorators/monkeyecx-decorators.d.ts +7 -0
- package/lib/core/decorators/monkeyecx-download-decorators.d.ts +2 -0
- package/lib/core/decorators/monkeyecx-upload-decorators.d.ts +2 -0
- package/{src/lib/core/directives/index.ts → lib/core/directives/index.d.ts} +12 -12
- package/lib/core/directives/monkeyecx-directives-module.d.ts +19 -0
- package/lib/core/directives/monkeyecx-drag-drop.d.ts +12 -0
- package/lib/core/directives/monkeyecx-feature-by-program-directive.d.ts +15 -0
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +17 -0
- package/lib/core/directives/monkeyecx-format-currency.d.ts +16 -0
- package/lib/core/directives/monkeyecx-format-upper.d.ts +18 -0
- package/lib/core/directives/monkeyecx-only-alpha-numeric-directive.d.ts +9 -0
- package/lib/core/directives/monkeyecx-only-number-directive.d.ts +9 -0
- package/lib/core/directives/monkeyecx-popover-options.directive.d.ts +19 -0
- package/lib/core/directives/monkeyecx-popover.directive.d.ts +43 -0
- package/lib/core/directives/monkeyecx-security-directive.d.ts +17 -0
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +23 -0
- package/{src/lib/core/index.ts → lib/core/index.d.ts} +9 -9
- package/{src/lib/core/interceptors/index.ts → lib/core/interceptors/index.d.ts} +5 -5
- package/lib/core/interceptors/monkeyecx-http-config-error.interceptor.d.ts +17 -0
- package/lib/core/interceptors/monkeyecx-http-config-header.interceptor.d.ts +16 -0
- package/lib/core/interceptors/monkeyecx-http-config-interceptor.module.d.ts +9 -0
- package/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.d.ts +12 -0
- package/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.d.ts +14 -0
- package/{src/lib/core/interfaces/index.ts → lib/core/interfaces/index.d.ts} +29 -29
- package/lib/core/interfaces/monkeyecx-auth-credentials.d.ts +15 -0
- package/{src/lib/core/interfaces/monkeyecx-company-pendencies.ts → lib/core/interfaces/monkeyecx-company-pendencies.d.ts} +14 -16
- package/lib/core/interfaces/monkeyecx-company.d.ts +10 -0
- package/lib/core/interfaces/monkeyecx-config-boostrap.d.ts +14 -0
- package/lib/core/interfaces/monkeyecx-config.d.ts +125 -0
- package/lib/core/interfaces/monkeyecx-country-security.d.ts +4 -0
- package/lib/core/interfaces/monkeyecx-error-response.d.ts +5 -0
- package/lib/core/interfaces/monkeyecx-filter.d.ts +24 -0
- package/lib/core/interfaces/monkeyecx-handled-error-response.d.ts +10 -0
- package/lib/core/interfaces/monkeyecx-header-credentials.d.ts +4 -0
- package/{src/lib/core/interfaces/monkeyecx-intercom-options.ts → lib/core/interfaces/monkeyecx-intercom-options.d.ts} +4 -4
- package/lib/core/interfaces/monkeyecx-me-credentials.d.ts +22 -0
- package/lib/core/interfaces/monkeyecx-navigation.d.ts +27 -0
- package/lib/core/interfaces/monkeyecx-program.d.ts +10 -0
- package/lib/core/interfaces/monkeyecx-releases.d.ts +9 -0
- package/{src/lib/core/interfaces/monkeyecx-request-in-progress.ts → lib/core/interfaces/monkeyecx-request-in-progress.d.ts} +3 -3
- package/lib/core/interfaces/monkeyecx-request-paged.d.ts +23 -0
- package/lib/core/interfaces/monkeyecx-response-links.d.ts +11 -0
- package/lib/core/interfaces/monkeyecx-response-paged.d.ts +6 -0
- package/lib/core/interfaces/monkeyecx-saved-state.d.ts +5 -0
- package/{src/lib/core/interfaces/monkeyecx-scroll-options.ts → lib/core/interfaces/monkeyecx-scroll-options.d.ts} +5 -6
- package/{src/lib/core/interfaces/monkeyecx-service-credentials.ts → lib/core/interfaces/monkeyecx-service-credentials.d.ts} +12 -13
- package/{src/lib/core/interfaces/monkeyecx-support-options.ts → lib/core/interfaces/monkeyecx-support-options.d.ts} +4 -4
- package/lib/core/interfaces/monkeyecx-token-credentials.d.ts +20 -0
- package/lib/core/interfaces/monkeyecx-translate-options.d.ts +4 -0
- package/{src/lib/core/interfaces/request-download/index.ts → lib/core/interfaces/request-download/index.d.ts} +3 -3
- package/lib/core/interfaces/request-download/monkeyecx-request-download.d.ts +10 -0
- package/lib/core/interfaces/request-download/monkeyecx-request-downloaded.d.ts +7 -0
- package/lib/core/interfaces/request-download/monkeyecx-request-item-download.d.ts +7 -0
- package/{src/lib/core/interfaces/request-queue/index.ts → lib/core/interfaces/request-queue/index.d.ts} +3 -3
- package/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.d.ts +7 -0
- package/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.d.ts +6 -0
- package/{src/lib/core/interfaces/request-queue/monkeyecx-request-queue.ts → lib/core/interfaces/request-queue/monkeyecx-request-queue.d.ts} +8 -9
- package/{src/lib/core/interfaces/request-upload/index.ts → lib/core/interfaces/request-upload/index.d.ts} +2 -2
- package/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.d.ts +5 -0
- package/lib/core/interfaces/request-upload/monkeyecx-request-upload.d.ts +10 -0
- package/{src/lib/core/interfaces/schedules/index.ts → lib/core/interfaces/schedules/index.d.ts} +1 -1
- package/lib/core/interfaces/schedules/monkeyecx-request-schedule.d.ts +13 -0
- package/{src/lib/core/model/index.ts → lib/core/model/index.d.ts} +1 -1
- package/lib/core/model/monkeyecx-model.d.ts +13 -0
- package/{src/lib/core/pipes/index.ts → lib/core/pipes/index.d.ts} +19 -19
- package/lib/core/pipes/monkeyecx-display-first-name.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-display-initials.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-address.d.ts +14 -0
- package/lib/core/pipes/monkeyecx-format-beautify-json.d.ts +8 -0
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +11 -0
- package/lib/core/pipes/monkeyecx-format-date-group.d.ts +11 -0
- package/lib/core/pipes/monkeyecx-format-date-timelapse.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-date-unix-timelapse.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-document.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-number.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-phone.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-size.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-tax.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-value.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-zipcode.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +24 -0
- package/lib/core/pipes/monkeyecx-text-truncate.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-truncate-qtd.d.ts +7 -0
- package/{src/lib/core/services/auth/index.ts → lib/core/services/auth/index.d.ts} +4 -4
- package/lib/core/services/auth/monkeyecx-auth-guard-company.service.d.ts +11 -0
- package/lib/core/services/auth/monkeyecx-auth-guard-login.service.d.ts +11 -0
- package/lib/core/services/auth/monkeyecx-auth-guard.service.d.ts +11 -0
- package/lib/core/services/auth/monkeyecx-authentication.service.d.ts +30 -0
- package/{src/lib/core/services/commons/index.ts → lib/core/services/commons/index.d.ts} +1 -1
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +124 -0
- package/lib/core/services/config/monkeyecx-alerts-config.service.d.ts +11 -0
- package/lib/core/services/config/monkeyecx-config.module.d.ts +9 -0
- package/lib/core/services/config/monkeyecx-config.service.d.ts +36 -0
- package/lib/core/services/config/monkeyecx-error-config.service.d.ts +8 -0
- package/lib/core/services/config/monkeyecx-feature-toggle.service.d.ts +16 -0
- package/lib/core/services/config/monkeyecx-ga-config.service.d.ts +10 -0
- package/lib/core/services/config/monkeyecx-i18n-config.service.d.ts +16 -0
- package/lib/core/services/config/monkeyecx-logs-config.service.d.ts +7 -0
- package/lib/core/services/config/monkeyecx-maintenance-config.service.d.ts +13 -0
- package/lib/core/services/config/monkeyecx-security-console-config.service.d.ts +11 -0
- package/lib/core/services/config/monkeyecx-service-worker-config.service.d.ts +16 -0
- package/{src/lib/core/services/error/index.ts → lib/core/services/error/index.d.ts} +4 -4
- package/lib/core/services/error/monkeyecx-error-handling.module.d.ts +9 -0
- package/lib/core/services/error/monkeyecx-error-handling.service.d.ts +9 -0
- package/lib/core/services/error/monkeyecx-http-error-handling.service.d.ts +26 -0
- package/lib/core/services/error/monkeyecx-others-errors-handling.service.d.ts +9 -0
- package/{src/lib/core/services/index.ts → lib/core/services/index.d.ts} +22 -22
- package/{src/lib/core/services/logged/index.ts → lib/core/services/logged/index.d.ts} +1 -1
- package/lib/core/services/logged/monkeyecx-logged-handling.service.d.ts +14 -0
- package/lib/core/services/monkeyecx-handling.service.d.ts +22 -0
- package/lib/core/services/monkeyecx-service.service.d.ts +18 -0
- package/{src/lib/core/services/pagination/index.ts → lib/core/services/pagination/index.d.ts} +1 -1
- package/lib/core/services/pagination/monkeyecx-pagination.service.d.ts +9 -0
- package/{src/lib/core/services/request-download/index.ts → lib/core/services/request-download/index.d.ts} +2 -2
- package/lib/core/services/request-download/monkeyecx-request-download-handling.service.d.ts +18 -0
- package/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.d.ts +16 -0
- package/{src/lib/core/services/request-paged/index.ts → lib/core/services/request-paged/index.d.ts} +1 -1
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +11 -0
- package/{src/lib/core/services/request-queue/index.ts → lib/core/services/request-queue/index.d.ts} +2 -2
- package/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.d.ts +21 -0
- package/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.d.ts +23 -0
- package/{src/lib/core/services/routes/index.ts → lib/core/services/routes/index.d.ts} +1 -1
- package/lib/core/services/routes/monkeyecx-dicovery-params.service.d.ts +13 -0
- package/{src/lib/core/services/schedules/index.ts → lib/core/services/schedules/index.d.ts} +1 -1
- package/lib/core/services/schedules/monkeyecx-request-schedule.service.d.ts +47 -0
- package/{src/lib/core/services/storage/index.ts → lib/core/services/storage/index.d.ts} +2 -2
- package/lib/core/services/storage/monkeyecx-cookie-storage.service.d.ts +11 -0
- package/lib/core/services/storage/monkeyecx-token-storage.service.d.ts +29 -0
- package/{src/lib/core/specification-search/index.ts → lib/core/specification-search/index.d.ts} +1 -1
- package/lib/core/specification-search/monkeyecx-specification-search.d.ts +20 -0
- package/lib/core/utils/decorators-utils.d.ts +5 -0
- package/{src/lib/core/utils/index.ts → lib/core/utils/index.d.ts} +6 -8
- package/lib/core/utils/statics.d.ts +28 -0
- package/lib/core/utils/utils.d.ts +22 -0
- package/lib/core/utils/validate-utils.d.ts +66 -0
- package/lib/core/utils/validators.d.ts +29 -0
- package/lib/monkey-front-core.module.d.ts +17 -0
- package/monkey-front-core-0.0.239.tgz +0 -0
- package/monkey-front-core.d.ts +5 -0
- package/package.json +24 -4
- package/{src/public-api.ts → public-api.d.ts} +3 -6
- package/karma.conf.js +0 -44
- package/monkey-front-core-0.0.238.tgz +0 -0
- package/ng-package.json +0 -8
- package/src/lib/components/alerts/alerts.component.html +0 -18
- package/src/lib/components/alerts/alerts.component.scss +0 -71
- package/src/lib/components/alerts/alerts.component.ts +0 -36
- package/src/lib/components/alerts/alerts.module.ts +0 -12
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.html +0 -25
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.scss +0 -51
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.component.ts +0 -25
- package/src/lib/components/closed-to-maintenance/closed-to-maintenance.module.ts +0 -26
- package/src/lib/components/progress-bar/progress-bar.component.html +0 -3
- package/src/lib/components/progress-bar/progress-bar.component.scss +0 -6
- package/src/lib/components/progress-bar/progress-bar.component.ts +0 -22
- package/src/lib/components/progress-bar/progress-bar.module.ts +0 -10
- package/src/lib/components/progress-bar/progress-bar.service.ts +0 -61
- package/src/lib/components/version-changed/version-changed.component.html +0 -18
- package/src/lib/components/version-changed/version-changed.component.scss +0 -52
- package/src/lib/components/version-changed/version-changed.component.ts +0 -18
- package/src/lib/components/version-changed/version-changed.module.ts +0 -24
- package/src/lib/core/decorators/monkeyecx-charts-decorators.ts +0 -46
- package/src/lib/core/decorators/monkeyecx-decorators.ts +0 -159
- package/src/lib/core/decorators/monkeyecx-download-decorators.ts +0 -39
- package/src/lib/core/decorators/monkeyecx-upload-decorators.ts +0 -39
- package/src/lib/core/directives/monkeyecx-directives-module.ts +0 -45
- package/src/lib/core/directives/monkeyecx-drag-drop.ts +0 -40
- package/src/lib/core/directives/monkeyecx-feature-by-program-directive.ts +0 -53
- package/src/lib/core/directives/monkeyecx-feature-directive.ts +0 -72
- package/src/lib/core/directives/monkeyecx-format-currency.ts +0 -44
- package/src/lib/core/directives/monkeyecx-format-upper.ts +0 -54
- package/src/lib/core/directives/monkeyecx-only-alpha-numeric-directive.ts +0 -21
- package/src/lib/core/directives/monkeyecx-only-number-directive.ts +0 -21
- package/src/lib/core/directives/monkeyecx-popover-options.directive.ts +0 -52
- package/src/lib/core/directives/monkeyecx-popover.directive.ts +0 -235
- package/src/lib/core/directives/monkeyecx-security-directive.ts +0 -68
- package/src/lib/core/directives/monkeyecx-tooltip-directive.ts +0 -131
- package/src/lib/core/interceptors/monkeyecx-http-config-error.interceptor.ts +0 -58
- package/src/lib/core/interceptors/monkeyecx-http-config-header.interceptor.ts +0 -78
- package/src/lib/core/interceptors/monkeyecx-http-config-interceptor.module.ts +0 -40
- package/src/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.ts +0 -47
- package/src/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.ts +0 -44
- package/src/lib/core/interfaces/monkeyecx-auth-credentials.ts +0 -16
- package/src/lib/core/interfaces/monkeyecx-company.ts +0 -10
- package/src/lib/core/interfaces/monkeyecx-config-boostrap.ts +0 -14
- package/src/lib/core/interfaces/monkeyecx-config.ts +0 -139
- package/src/lib/core/interfaces/monkeyecx-country-security.ts +0 -4
- package/src/lib/core/interfaces/monkeyecx-error-response.ts +0 -5
- package/src/lib/core/interfaces/monkeyecx-filter.ts +0 -26
- package/src/lib/core/interfaces/monkeyecx-handled-error-response.ts +0 -11
- package/src/lib/core/interfaces/monkeyecx-header-credentials.ts +0 -4
- package/src/lib/core/interfaces/monkeyecx-me-credentials.ts +0 -23
- package/src/lib/core/interfaces/monkeyecx-navigation.ts +0 -28
- package/src/lib/core/interfaces/monkeyecx-program.ts +0 -10
- package/src/lib/core/interfaces/monkeyecx-releases.ts +0 -9
- package/src/lib/core/interfaces/monkeyecx-request-paged.ts +0 -27
- package/src/lib/core/interfaces/monkeyecx-response-links.ts +0 -11
- package/src/lib/core/interfaces/monkeyecx-response-paged.ts +0 -6
- package/src/lib/core/interfaces/monkeyecx-saved-state.ts +0 -5
- package/src/lib/core/interfaces/monkeyecx-token-credentials.ts +0 -20
- package/src/lib/core/interfaces/monkeyecx-translate-options.ts +0 -4
- package/src/lib/core/interfaces/request-download/monkeyecx-request-download.ts +0 -11
- package/src/lib/core/interfaces/request-download/monkeyecx-request-downloaded.ts +0 -8
- package/src/lib/core/interfaces/request-download/monkeyecx-request-item-download.ts +0 -7
- package/src/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.ts +0 -7
- package/src/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.ts +0 -6
- package/src/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.ts +0 -5
- package/src/lib/core/interfaces/request-upload/monkeyecx-request-upload.ts +0 -11
- package/src/lib/core/interfaces/schedules/monkeyecx-request-schedule.ts +0 -14
- package/src/lib/core/model/monkeyecx-model.ts +0 -38
- package/src/lib/core/pipes/monkeyecx-display-first-name.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-display-initials.ts +0 -14
- package/src/lib/core/pipes/monkeyecx-display-support-phone.ts +0 -31
- package/src/lib/core/pipes/monkeyecx-format-address.ts +0 -27
- package/src/lib/core/pipes/monkeyecx-format-beautify-json.ts +0 -35
- package/src/lib/core/pipes/monkeyecx-format-currency.ts +0 -20
- package/src/lib/core/pipes/monkeyecx-format-date-group.ts +0 -40
- package/src/lib/core/pipes/monkeyecx-format-date-timelapse.ts +0 -25
- package/src/lib/core/pipes/monkeyecx-format-date-unix-timelapse.ts +0 -31
- package/src/lib/core/pipes/monkeyecx-format-document.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-format-number.ts +0 -14
- package/src/lib/core/pipes/monkeyecx-format-phone.ts +0 -32
- package/src/lib/core/pipes/monkeyecx-format-size.ts +0 -13
- package/src/lib/core/pipes/monkeyecx-format-tax.ts +0 -16
- package/src/lib/core/pipes/monkeyecx-format-type-document.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-format-value.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-format-zipcode.ts +0 -12
- package/src/lib/core/pipes/monkeyecx-pipes.module.ts +0 -65
- package/src/lib/core/pipes/monkeyecx-text-truncate.ts +0 -17
- package/src/lib/core/pipes/monkeyecx-truncate-qtd.ts +0 -10
- package/src/lib/core/services/auth/monkeyecx-auth-guard-company.service.ts +0 -27
- package/src/lib/core/services/auth/monkeyecx-auth-guard-login.service.ts +0 -23
- package/src/lib/core/services/auth/monkeyecx-auth-guard.service.ts +0 -25
- package/src/lib/core/services/auth/monkeyecx-authentication.service.ts +0 -87
- package/src/lib/core/services/commons/monkeyecx-commons.service.ts +0 -557
- package/src/lib/core/services/config/index.ts +0 -9
- package/src/lib/core/services/config/monkeyecx-alerts-config.service.ts +0 -37
- package/src/lib/core/services/config/monkeyecx-config.module.ts +0 -23
- package/src/lib/core/services/config/monkeyecx-config.service.ts +0 -151
- package/src/lib/core/services/config/monkeyecx-error-config.service.ts +0 -92
- package/src/lib/core/services/config/monkeyecx-feature-toggle.service.ts +0 -71
- package/src/lib/core/services/config/monkeyecx-ga-config.service.ts +0 -56
- package/src/lib/core/services/config/monkeyecx-i18n-config.service.ts +0 -95
- package/src/lib/core/services/config/monkeyecx-logs-config.service.ts +0 -34
- package/src/lib/core/services/config/monkeyecx-maintenance-config.service.ts +0 -33
- package/src/lib/core/services/config/monkeyecx-security-console-config.service.ts +0 -40
- package/src/lib/core/services/config/monkeyecx-service-worker-config.service.ts +0 -50
- package/src/lib/core/services/error/monkeyecx-error-handling.module.ts +0 -20
- package/src/lib/core/services/error/monkeyecx-error-handling.service.ts +0 -33
- package/src/lib/core/services/error/monkeyecx-http-error-handling.service.ts +0 -160
- package/src/lib/core/services/error/monkeyecx-others-errors-handling.service.ts +0 -24
- package/src/lib/core/services/logged/monkeyecx-logged-handling.service.ts +0 -42
- package/src/lib/core/services/monkeyecx-handling.service.ts +0 -58
- package/src/lib/core/services/monkeyecx-service.service.ts +0 -116
- package/src/lib/core/services/pagination/monkeyecx-pagination.service.ts +0 -27
- package/src/lib/core/services/request-download/monkeyecx-request-download-handling.service.ts +0 -100
- package/src/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.ts +0 -65
- package/src/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.ts +0 -58
- package/src/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.ts +0 -125
- package/src/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.ts +0 -136
- package/src/lib/core/services/routes/monkeyecx-dicovery-params.service.ts +0 -54
- package/src/lib/core/services/schedules/monkeyecx-request-schedule.service.ts +0 -224
- package/src/lib/core/services/storage/monkeyecx-cookie-storage.service.ts +0 -28
- package/src/lib/core/services/storage/monkeyecx-token-storage.service.ts +0 -151
- package/src/lib/core/specification-search/monkeyecx-specification-search.ts +0 -111
- package/src/lib/core/utils/decorators-utils.ts +0 -56
- package/src/lib/core/utils/statics.ts +0 -36
- package/src/lib/core/utils/utils.ts +0 -237
- package/src/lib/core/utils/validate-utils.ts +0 -221
- package/src/lib/core/utils/validators.ts +0 -251
- package/src/lib/monkey-front-core.module.ts +0 -37
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
3
|
-
|
|
4
|
-
export enum OpSearch {
|
|
5
|
-
LIKE = ':*:value*',
|
|
6
|
-
BETWEEN = ':first AND :last',
|
|
7
|
-
OR = 'OR',
|
|
8
|
-
AND = 'AND',
|
|
9
|
-
GT = '>:value',
|
|
10
|
-
LT = '<:value',
|
|
11
|
-
EQUAL = '::value',
|
|
12
|
-
IN = ' IN :value',
|
|
13
|
-
NOT = ' !:value'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export class MonkeyEcxSpecificationSearch {
|
|
17
|
-
constructor() {
|
|
18
|
-
// not to do
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private handleValue(value: any) {
|
|
22
|
-
return Object.entries(value).map(([key, value1]) => {
|
|
23
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(value1)) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(value1)) {
|
|
27
|
-
if (key === OpSearch.BETWEEN) {
|
|
28
|
-
return `${key}`.replace(':first', value1[0]).replace(':last', value1[1]);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return `${key}`.replace(':value', `${value1}`);
|
|
32
|
-
})[0];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private queryVisitor(value: any): any {
|
|
36
|
-
const okay = Object.entries(value).map(([key1, value1]) => {
|
|
37
|
-
if (key1 === OpSearch.OR || key1 === OpSearch.AND) {
|
|
38
|
-
const join = (value1 as any[])
|
|
39
|
-
.map((_: any) => {
|
|
40
|
-
return Object.entries(_).map(([key2, value2]) => {
|
|
41
|
-
if (value2 instanceof Object) {
|
|
42
|
-
value2 = this.handleValue(value2);
|
|
43
|
-
}
|
|
44
|
-
return this.criteriaParser(key2, value2);
|
|
45
|
-
})[0];
|
|
46
|
-
})
|
|
47
|
-
.filter((_: any) => {
|
|
48
|
-
return _;
|
|
49
|
-
})
|
|
50
|
-
.join(` ${key1} `);
|
|
51
|
-
return `${join ? `(${join})` : ''}`;
|
|
52
|
-
}
|
|
53
|
-
if (value1 instanceof Object) {
|
|
54
|
-
value1 = this.handleValue(value1);
|
|
55
|
-
}
|
|
56
|
-
return this.criteriaParser(key1, value1);
|
|
57
|
-
});
|
|
58
|
-
return okay
|
|
59
|
-
.filter((_: any) => {
|
|
60
|
-
return _;
|
|
61
|
-
})
|
|
62
|
-
.join(' AND ');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
private criteriaParser(key: string, value: any | any[]) {
|
|
66
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
67
|
-
return '';
|
|
68
|
-
}
|
|
69
|
-
if (value instanceof Object) {
|
|
70
|
-
return this.queryVisitor(value);
|
|
71
|
-
}
|
|
72
|
-
return `${key}${value}`;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
public build(spec: any): string {
|
|
76
|
-
try {
|
|
77
|
-
return this.queryVisitor(spec);
|
|
78
|
-
} catch (e) {
|
|
79
|
-
throw new Error(`MonkeyEcxSpecificationSearch Error ${e}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
public buildMoreThanOne(field: string, op = OpSearch.EQUAL, addSingleQuotes = false) {
|
|
84
|
-
const self: any = this;
|
|
85
|
-
try {
|
|
86
|
-
if (!self[field]) return [];
|
|
87
|
-
|
|
88
|
-
const filters = self[field]?.split(',')?.map((filter: string) => {
|
|
89
|
-
if (!filter) return null;
|
|
90
|
-
return {
|
|
91
|
-
[field]: {
|
|
92
|
-
[op]: addSingleQuotes ? `'${filter}'` : `${filter}`
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
}).filter((val: any) => { return val; });
|
|
96
|
-
return filters || [];
|
|
97
|
-
} catch (e) {
|
|
98
|
-
throw new Error(`MonkeyEcxSpecificationSearch Error ${e}`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
public handleFieldSeparatedBy(field: string, signal = ',', op = OpSearch.EQUAL) {
|
|
103
|
-
return this[field]?.split(signal)?.map((_) => {
|
|
104
|
-
return {
|
|
105
|
-
[field]: {
|
|
106
|
-
[op]: _
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MonkeyEcxRequestDownload,
|
|
3
|
-
MonkeyEcxRequestItemQueue,
|
|
4
|
-
MonkeyEcxRequestQueue,
|
|
5
|
-
MonkeyEcxRequestUpload
|
|
6
|
-
} from '../interfaces';
|
|
7
|
-
import * as Statics from './statics';
|
|
8
|
-
import { MonkeyEcxUtils } from './utils';
|
|
9
|
-
|
|
10
|
-
export function buildQueuePropertys(queue: MonkeyEcxRequestItemQueue): MonkeyEcxRequestQueue {
|
|
11
|
-
const params: MonkeyEcxRequestQueue = {
|
|
12
|
-
item: {
|
|
13
|
-
...queue,
|
|
14
|
-
id: MonkeyEcxUtils.getRandomString(40)
|
|
15
|
-
},
|
|
16
|
-
status: Statics.MonkeyEcxQueueEvents.OnGoing
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
return params;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function buildDownloadPropertys(
|
|
23
|
-
name: string,
|
|
24
|
-
description?: string,
|
|
25
|
-
size?: number
|
|
26
|
-
): MonkeyEcxRequestDownload {
|
|
27
|
-
const params: MonkeyEcxRequestDownload = {
|
|
28
|
-
item: {
|
|
29
|
-
name,
|
|
30
|
-
description,
|
|
31
|
-
id: `${MonkeyEcxUtils.getRandomString(40)}`,
|
|
32
|
-
size,
|
|
33
|
-
createdAt: new Date()
|
|
34
|
-
},
|
|
35
|
-
status: Statics.MonkeyEcxQueueEvents.OnGoing
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return params;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function buildUploadPropertys(name: string, description?: string): MonkeyEcxRequestUpload {
|
|
42
|
-
const params: MonkeyEcxRequestUpload = {
|
|
43
|
-
item: {
|
|
44
|
-
name,
|
|
45
|
-
description,
|
|
46
|
-
id: `${MonkeyEcxUtils.getRandomString(40)}`
|
|
47
|
-
},
|
|
48
|
-
status: Statics.MonkeyEcxUploadEvents.OnGoing
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return params;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function hasMonkeyEcxServiceAndHandlingProperties(context: any): boolean {
|
|
55
|
-
return Object.prototype.hasOwnProperty.call(context, 'monkeyecxService');
|
|
56
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
|
-
/* eslint-disable no-shadow */
|
|
3
|
-
export enum MonkeyEcxQueueEvents {
|
|
4
|
-
OnGoing,
|
|
5
|
-
Finished,
|
|
6
|
-
FinishedWithError
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum MonkeyEcxDownloadEvents {
|
|
10
|
-
OnGoing,
|
|
11
|
-
Finished,
|
|
12
|
-
FinishedWithError
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export enum MonkeyEcxUploadEvents {
|
|
16
|
-
OnGoing,
|
|
17
|
-
Finished,
|
|
18
|
-
FinishedWithError
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// TODO pegar do json de config
|
|
22
|
-
export enum ApiEndPointsTokenNotMandatory {
|
|
23
|
-
Assets = 'assets/',
|
|
24
|
-
MonkeyEcx = '/monkeyecx',
|
|
25
|
-
ViaCep = 'viacep.com.br/'
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// TODO pegar do json de config
|
|
29
|
-
export enum ApiEndPointsHeaderNotMandatory {
|
|
30
|
-
Assets = '/assets',
|
|
31
|
-
PayablesUpload = 'payables-upload',
|
|
32
|
-
PictureUser = '/user-pictures',
|
|
33
|
-
Documents = 'documents/',
|
|
34
|
-
BuyerTaxFile = '/buyer-tax-file',
|
|
35
|
-
ViaCep = 'viacep.com.br/'
|
|
36
|
-
}
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
/* eslint-disable comma-dangle */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
/* eslint-disable no-useless-escape */
|
|
4
|
-
/* eslint-disable no-plusplus */
|
|
5
|
-
/* eslint-disable no-cond-assign */
|
|
6
|
-
/* eslint-disable eqeqeq */
|
|
7
|
-
/* eslint-disable no-redeclare */
|
|
8
|
-
/* eslint-disable vars-on-top */
|
|
9
|
-
/* eslint-disable no-var */
|
|
10
|
-
/* eslint-disable block-scoped-var */
|
|
11
|
-
export class MonkeyEcxUtils {
|
|
12
|
-
static persistNullEmptyUndefined(tp: any): boolean {
|
|
13
|
-
return tp !== null && tp !== undefined && tp !== '';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
static getDocumentType(doc: string, country?: string) {
|
|
17
|
-
if (!doc) return '';
|
|
18
|
-
if (country === 'cl') return 'RUT';
|
|
19
|
-
return doc.length <= 11 ? 'CPF' : 'CNPJ';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static getDocumentMask(type: string) {
|
|
23
|
-
if (type === 'CPF') return '000.000.000-00';
|
|
24
|
-
return '00.000.000/0000-00';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
static formatDocumentWithMask(doc: string, withType?: boolean, country?: string): string {
|
|
28
|
-
if (!doc) return doc;
|
|
29
|
-
let formated: string = '';
|
|
30
|
-
if (country === 'cl') {
|
|
31
|
-
formated = doc.replace(/^(\d{1,2})(\d{3})(\d{3})(\w{1})$/, '$1.$2.$3-$4');
|
|
32
|
-
return `${formated}`;
|
|
33
|
-
}
|
|
34
|
-
if (doc.length === 14) {
|
|
35
|
-
formated = doc
|
|
36
|
-
.replace(/^(\d{2})(\d)/, '$1.$2')
|
|
37
|
-
.replace(/^(\d{2})\.(\d{3})(\d)/, '$1.$2.$3')
|
|
38
|
-
.replace(/\.(\d{3})(\d)/, '.$1/$2')
|
|
39
|
-
.replace(/(\d{4})(\d)/, '$1-$2');
|
|
40
|
-
} else {
|
|
41
|
-
formated = doc
|
|
42
|
-
.replace(/^(\d{3})(\d)/, '$1.$2')
|
|
43
|
-
.replace(/^(\d{3})\.(\d{3})(\d)/, '$1.$2.$3')
|
|
44
|
-
.replace(/\.(\d{3})(\d)/, '.$1-$2');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return `${withType ? `${this.getDocumentType(doc)}:` : ''} ${formated}`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static cutFirstLastName(value: string, tp: string = 'first') {
|
|
51
|
-
const split = value?.trim()?.split(' ');
|
|
52
|
-
|
|
53
|
-
if (tp === 'first') return split[0];
|
|
54
|
-
return split?.splice(1, split.length)?.join(' ');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static isCPFCNPJValid(document: any): boolean {
|
|
58
|
-
document = document.replace(/[^\d]/g, '');
|
|
59
|
-
|
|
60
|
-
const handled = document.replace(new RegExp(document.charAt(0), 'g'), '');
|
|
61
|
-
if (!handled) return false;
|
|
62
|
-
|
|
63
|
-
if (document.length === 11) {
|
|
64
|
-
let base = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0];
|
|
65
|
-
for (var i = 0, n = 0; i < 9; n += document[i] * base[i++]);
|
|
66
|
-
if (document[9] != ((n %= 11) <= 1 ? 0 : 11 - n)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
base = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0];
|
|
70
|
-
for (var i = 0, n = 0; i <= 9; n += document[i] * base[i++]);
|
|
71
|
-
if (document[10] != ((n %= 11) <= 1 ? 0 : 11 - n)) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
if (document.length === 14 || /0{14}/.test(document)) {
|
|
77
|
-
const base = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
78
|
-
for (var i = 0, n = 0; i < 12; n += document[i] * base[++i]);
|
|
79
|
-
if (document[12] != ((n %= 11) < 2 ? 0 : 11 - n)) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
for (var i = 0, n = 0; i <= 12; n += document[i] * base[i++]);
|
|
84
|
-
if (document[13] != ((n %= 11) < 2 ? 0 : 11 - n)) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
public static isValidRUT(document: string): boolean {
|
|
94
|
-
if (!document || document.trim().length < 3) return false;
|
|
95
|
-
const documentHandled = document.replace(/[^0-9kK]/g, '');
|
|
96
|
-
|
|
97
|
-
if (documentHandled.length < 3) return false;
|
|
98
|
-
|
|
99
|
-
const calcDv = (rut: string) => {
|
|
100
|
-
const value: string = `${rut}`;
|
|
101
|
-
let sum = 0;
|
|
102
|
-
let mult = 2;
|
|
103
|
-
|
|
104
|
-
for (let i = 1; i <= value.length; i++) {
|
|
105
|
-
const index = mult * Number(value.charAt(value.length - i));
|
|
106
|
-
|
|
107
|
-
sum += index;
|
|
108
|
-
|
|
109
|
-
if (mult < 7) {
|
|
110
|
-
mult += 1;
|
|
111
|
-
} else {
|
|
112
|
-
mult = 2;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const dvEsperado = 11 - (sum % 11);
|
|
117
|
-
if (dvEsperado === 10) return 'K';
|
|
118
|
-
if (dvEsperado === 11) return '0';
|
|
119
|
-
return `${dvEsperado}`;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const num = documentHandled.slice(0, -1);
|
|
123
|
-
const dgv = documentHandled.slice(-1).toUpperCase();
|
|
124
|
-
|
|
125
|
-
const dvCalc = calcDv(num);
|
|
126
|
-
return dvCalc === dgv;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
static isValidUrl(txt: string): boolean {
|
|
130
|
-
const regex = new RegExp(
|
|
131
|
-
/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)+[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,10}(:[0-9]{1,5})?(\/.*)?$/gm
|
|
132
|
-
);
|
|
133
|
-
return regex.test(txt);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
static isValidZipCode(zipCode: string): boolean {
|
|
137
|
-
return `${this.handleOnlyNumbers(zipCode)}`.length === 8;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
static getRandomString(len: number, charSet?: string): string {
|
|
141
|
-
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
142
|
-
|
|
143
|
-
const randomString: string = new Array(len)
|
|
144
|
-
.fill('1')
|
|
145
|
-
.map(() => {
|
|
146
|
-
return charSet?.charAt(Math.floor(Math.random() * charSet?.length));
|
|
147
|
-
})
|
|
148
|
-
.join('');
|
|
149
|
-
return randomString;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
static handleOnlyNumbers(value: any) {
|
|
153
|
-
if (!value) return null;
|
|
154
|
-
return value.replace(new RegExp(/[^0-9]/g), '');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
static handleOnlyAlphaNumeric(value: any) {
|
|
158
|
-
if (!value) return '';
|
|
159
|
-
return value.replace(new RegExp(/[^0-9A-Za-z]/, 'g'), '');
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
static capitalize(value: string) {
|
|
163
|
-
return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
static formatZipCode(zipCode: string): string {
|
|
167
|
-
if (!zipCode) return zipCode;
|
|
168
|
-
const formated: string = zipCode
|
|
169
|
-
.replace(/^(\d{5})(\d)/, '$1-$2')
|
|
170
|
-
.replace(/\.(\d{3})(\d)/, '.$1-$2');
|
|
171
|
-
|
|
172
|
-
return `${formated}`;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
static formatFileSize(size: number): string {
|
|
176
|
-
const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
177
|
-
let l = 0;
|
|
178
|
-
while (size >= 1024 && ++l) {
|
|
179
|
-
size /= 1024;
|
|
180
|
-
}
|
|
181
|
-
return `${size.toFixed(size < 10 && l > 0 ? 1 : 0)} ${units[l]}`;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
static sufflue(data: any[]): any[] {
|
|
185
|
-
for (let i = data.length - 1; i > 0; i--) {
|
|
186
|
-
const j = Math.floor(Math.random() * i);
|
|
187
|
-
const temp = data[i];
|
|
188
|
-
data[i] = data[j];
|
|
189
|
-
data[j] = temp;
|
|
190
|
-
}
|
|
191
|
-
return data;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
static handleBlobFile(theBlob: any, fileName: string, fileType: string) {
|
|
195
|
-
function blobToFile(theBlob: any, fileName: string) {
|
|
196
|
-
const b = theBlob;
|
|
197
|
-
b.lastModifiedDate = new Date();
|
|
198
|
-
b.name = fileName;
|
|
199
|
-
return b;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
let file: any;
|
|
203
|
-
if (!(navigator as any).msSaveBlob) {
|
|
204
|
-
file = new File([theBlob], fileName, {
|
|
205
|
-
type: fileType,
|
|
206
|
-
});
|
|
207
|
-
} else {
|
|
208
|
-
file = new Blob([theBlob], {
|
|
209
|
-
type: fileType,
|
|
210
|
-
});
|
|
211
|
-
file = blobToFile(file, fileName);
|
|
212
|
-
}
|
|
213
|
-
return file;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
static truncate(text: string, maxLength: number = 25): string {
|
|
217
|
-
const midChar = '...';
|
|
218
|
-
if (!text) return midChar;
|
|
219
|
-
if (text && text.length <= maxLength) return text;
|
|
220
|
-
|
|
221
|
-
const left = Math.ceil(maxLength / 2);
|
|
222
|
-
const right = text.length - left + 1;
|
|
223
|
-
|
|
224
|
-
return `${text.substr(0, left)} ${midChar} ${text.substring(right)}`;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
static isLocalhost() {
|
|
228
|
-
const { href } = window?.location;
|
|
229
|
-
if (!href) return false;
|
|
230
|
-
return href?.search('localhost') >= 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
static isSameOrigin(frontend: string): boolean {
|
|
234
|
-
const initialPath: string = window.location.origin;
|
|
235
|
-
return (initialPath || '') === frontend;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-classes-per-file */
|
|
2
|
-
import * as moment_ from 'moment';
|
|
3
|
-
import { AbstractControl } from '@angular/forms';
|
|
4
|
-
import { MonkeyEcxUtils } from './utils';
|
|
5
|
-
|
|
6
|
-
const moment: any = moment_;
|
|
7
|
-
|
|
8
|
-
export class DateValidator {
|
|
9
|
-
static do(control: AbstractControl) {
|
|
10
|
-
if (!control.parent || !control) return null;
|
|
11
|
-
if (control && control.value) {
|
|
12
|
-
const dateFormat = 'MM-DD-YYYY';
|
|
13
|
-
if (
|
|
14
|
-
!moment
|
|
15
|
-
.default(
|
|
16
|
-
moment.default(control.value).format(dateFormat),
|
|
17
|
-
['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'],
|
|
18
|
-
true
|
|
19
|
-
)
|
|
20
|
-
.isValid()
|
|
21
|
-
) {
|
|
22
|
-
return {
|
|
23
|
-
invalidDate: true,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export class DocumentValidator {
|
|
32
|
-
static do(control: AbstractControl) {
|
|
33
|
-
if (!control.parent || !control) return null;
|
|
34
|
-
if (control && control.value) {
|
|
35
|
-
if (!MonkeyEcxUtils.isCPFCNPJValid(control.value)) {
|
|
36
|
-
return {
|
|
37
|
-
invalidCpfCnpj: true,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export class DocumentRutValidator {
|
|
46
|
-
static do(control: AbstractControl) {
|
|
47
|
-
if (!control.parent || !control) return null;
|
|
48
|
-
if (control && control.value) {
|
|
49
|
-
if (!MonkeyEcxUtils.isValidRUT(control.value)) {
|
|
50
|
-
return {
|
|
51
|
-
invalidRut: true,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export class ZipCodeValidator {
|
|
60
|
-
static do(control: AbstractControl) {
|
|
61
|
-
if (!control.parent || !control) return null;
|
|
62
|
-
if (control && control.value) {
|
|
63
|
-
if (!MonkeyEcxUtils.isValidZipCode(control.value)) {
|
|
64
|
-
return {
|
|
65
|
-
invalidZipCode: true,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export class ComboValidator {
|
|
74
|
-
static do(control: AbstractControl) {
|
|
75
|
-
if (!control.parent || !control) return null;
|
|
76
|
-
if (control && control.value !== '0') return null;
|
|
77
|
-
return {
|
|
78
|
-
invalidCombo: true,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export class isTrueValidator {
|
|
84
|
-
static do(control: AbstractControl) {
|
|
85
|
-
if (!control.parent || !control) return null;
|
|
86
|
-
if (control && control.value !== false) return null;
|
|
87
|
-
return {
|
|
88
|
-
invalidTrue: true,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export class PasswordMatchValidation {
|
|
94
|
-
static do(control: AbstractControl) {
|
|
95
|
-
if (!control.parent || !control) return null;
|
|
96
|
-
const { parent } = control;
|
|
97
|
-
const password = parent?.get('password')?.value;
|
|
98
|
-
const passwordConfirm = parent?.get('passwordConfirm')?.value;
|
|
99
|
-
if (!password || !passwordConfirm) return null;
|
|
100
|
-
if (password === passwordConfirm) return null;
|
|
101
|
-
return {
|
|
102
|
-
passwordsNotMatching: true,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export class UrlValidator {
|
|
108
|
-
static do(control: AbstractControl) {
|
|
109
|
-
if (!control.parent || !control) return null;
|
|
110
|
-
if (control && control.value) {
|
|
111
|
-
if (!MonkeyEcxUtils.isValidUrl(control.value)) {
|
|
112
|
-
return {
|
|
113
|
-
invalidUrl: true,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export class CustomDatesStartValidator {
|
|
122
|
-
static do(control: AbstractControl) {
|
|
123
|
-
if (!control.parent || !control) return null;
|
|
124
|
-
const { parent } = control;
|
|
125
|
-
|
|
126
|
-
const valueStart = parent?.get('dateStart')?.value;
|
|
127
|
-
const valueEnd = parent?.get('dateEnd')?.value;
|
|
128
|
-
let dateStart: Date | null = null;
|
|
129
|
-
let dateEnd: Date | null = null;
|
|
130
|
-
if (valueStart) {
|
|
131
|
-
dateStart = new Date(valueStart);
|
|
132
|
-
}
|
|
133
|
-
if (valueEnd) {
|
|
134
|
-
dateEnd = new Date(valueEnd);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (!dateStart || !dateEnd) return null;
|
|
138
|
-
if (dateStart > dateEnd) {
|
|
139
|
-
return {
|
|
140
|
-
dateStartMustBeLessThanAnd: true,
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export class CustomDatesEndValidator {
|
|
148
|
-
static do(control: AbstractControl) {
|
|
149
|
-
if (!control.parent || !control) return null;
|
|
150
|
-
const { parent } = control;
|
|
151
|
-
|
|
152
|
-
const valueStart = parent?.get('dateStart')?.value;
|
|
153
|
-
const valueEnd = parent?.get('dateEnd')?.value;
|
|
154
|
-
let dateStart: Date | null = null;
|
|
155
|
-
let dateEnd: Date | null = null;
|
|
156
|
-
if (valueStart) {
|
|
157
|
-
dateStart = new Date(valueStart);
|
|
158
|
-
}
|
|
159
|
-
if (valueEnd) {
|
|
160
|
-
dateEnd = new Date(valueEnd);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (!dateEnd || !dateStart) return null;
|
|
164
|
-
if (dateEnd < dateStart) {
|
|
165
|
-
return {
|
|
166
|
-
dateEndMustBeGreaterThanStart: true,
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export class UnlockRegisterBuyerValidator {
|
|
174
|
-
static do(control: AbstractControl) {
|
|
175
|
-
if (!control.parent || !control) return null;
|
|
176
|
-
|
|
177
|
-
if (control && control.value !== '#MONKEYBUYER') {
|
|
178
|
-
return {
|
|
179
|
-
invalidUnlockRegister: true,
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export class UnlockRegisterSponsorValidator {
|
|
188
|
-
static do(control: AbstractControl) {
|
|
189
|
-
if (!control.parent || !control) return null;
|
|
190
|
-
|
|
191
|
-
if (control && control.value !== '#MONKEYSPONSOR') {
|
|
192
|
-
return {
|
|
193
|
-
invalidUnlockRegister: true,
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return null;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export class DateRangeValidator {
|
|
202
|
-
static do(control: AbstractControl) {
|
|
203
|
-
if (!control.parent || !control) {
|
|
204
|
-
return null;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const dates = control?.parent?.get('dates')?.value;
|
|
208
|
-
|
|
209
|
-
if (
|
|
210
|
-
dates &&
|
|
211
|
-
(!MonkeyEcxUtils.persistNullEmptyUndefined(dates.startDate) ||
|
|
212
|
-
!MonkeyEcxUtils.persistNullEmptyUndefined(dates.endDate))
|
|
213
|
-
) {
|
|
214
|
-
return {
|
|
215
|
-
invalidDateRange: true,
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
}
|