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,46 +0,0 @@
|
|
|
1
|
-
/* eslint-disable space-before-function-paren */
|
|
2
|
-
/* eslint-disable func-names */
|
|
3
|
-
export function MonkeyEcxCoreCharts(render = true) {
|
|
4
|
-
return (
|
|
5
|
-
target: Object,
|
|
6
|
-
propertyName: string,
|
|
7
|
-
propertyDescriptor: PropertyDescriptor
|
|
8
|
-
): PropertyDescriptor => {
|
|
9
|
-
const method = propertyDescriptor.value;
|
|
10
|
-
|
|
11
|
-
propertyDescriptor.value = function(...args: any[]) {
|
|
12
|
-
const context = this;
|
|
13
|
-
if (render) {
|
|
14
|
-
const scriptsLoaded = Array.from(document.scripts);
|
|
15
|
-
scriptsLoaded.forEach((script: any) => {
|
|
16
|
-
const { src } = script;
|
|
17
|
-
if (src.search('www.gstatic.com/charts') > 0) {
|
|
18
|
-
document.getElementsByTagName('head')[0].removeChild(script);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const node = document.createElement('script');
|
|
23
|
-
node.src = 'https://www.gstatic.com/charts/loader.js';
|
|
24
|
-
node.type = 'text/javascript';
|
|
25
|
-
node.async = true;
|
|
26
|
-
node.id = 'monkeyecx-charts-settings';
|
|
27
|
-
node.onload = () => {
|
|
28
|
-
method.apply(context, args);
|
|
29
|
-
};
|
|
30
|
-
document.getElementsByTagName('head')[0].appendChild(node);
|
|
31
|
-
} else {
|
|
32
|
-
const scriptsLoaded = Array.from(document.scripts);
|
|
33
|
-
scriptsLoaded.forEach((script: any) => {
|
|
34
|
-
const { src } = script;
|
|
35
|
-
if (src.search('www.gstatic.com/charts') > 0) {
|
|
36
|
-
document.getElementsByTagName('head')[0].removeChild(script);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
method.apply(context, args);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return propertyDescriptor;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
/* eslint-disable space-before-function-paren */
|
|
3
|
-
/* eslint-disable func-names */
|
|
4
|
-
/* eslint-disable max-len */
|
|
5
|
-
import { MonkeyEcxServiceCredentials } from '../interfaces';
|
|
6
|
-
import { DecoratorsUtils } from '../utils';
|
|
7
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
8
|
-
|
|
9
|
-
export function MonkeyEcxCoreServiceConstructor() {
|
|
10
|
-
return (target: any) => {
|
|
11
|
-
Object.entries(target.prototype).forEach(([key, value]) => {
|
|
12
|
-
const method = target.prototype[key];
|
|
13
|
-
if (key !== 'constructor') {
|
|
14
|
-
target.prototype[key] = function (...args: any[]) {
|
|
15
|
-
const context = this;
|
|
16
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
17
|
-
context.monkeyecxService.monkeyecxHandlingService.clearAll();
|
|
18
|
-
}
|
|
19
|
-
const result = method.apply(context, args);
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return target;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function MonkeyEcxCoreLog(tp: string) {
|
|
29
|
-
return function (
|
|
30
|
-
target: Object,
|
|
31
|
-
propertyName: string,
|
|
32
|
-
propertyDescriptor: PropertyDescriptor
|
|
33
|
-
): PropertyDescriptor {
|
|
34
|
-
const method = propertyDescriptor.value;
|
|
35
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
36
|
-
const params = args
|
|
37
|
-
.map((a: any) => {
|
|
38
|
-
return JSON.stringify(a);
|
|
39
|
-
})
|
|
40
|
-
.join();
|
|
41
|
-
const result = method.apply(this, args);
|
|
42
|
-
const r = JSON.stringify(result);
|
|
43
|
-
console.log(`Call: ${propertyName}(${params}) => ${r}`);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return propertyDescriptor;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function MonkeyEcxCoreClearDecorators() {
|
|
52
|
-
return function (
|
|
53
|
-
target: Object,
|
|
54
|
-
propertyName: string,
|
|
55
|
-
propertyDescriptor: PropertyDescriptor
|
|
56
|
-
): PropertyDescriptor {
|
|
57
|
-
const method = propertyDescriptor.value;
|
|
58
|
-
|
|
59
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
60
|
-
const context: any = this;
|
|
61
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
62
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
63
|
-
}
|
|
64
|
-
const result = method.apply(context, args);
|
|
65
|
-
return result;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
return propertyDescriptor;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function MonkeyEcxCoreService(params: MonkeyEcxServiceCredentials) {
|
|
73
|
-
return function (
|
|
74
|
-
target: Object,
|
|
75
|
-
propertyName: string,
|
|
76
|
-
propertyDescriptor: PropertyDescriptor
|
|
77
|
-
): PropertyDescriptor {
|
|
78
|
-
const method = propertyDescriptor.value;
|
|
79
|
-
|
|
80
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
81
|
-
const context: any = this;
|
|
82
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
83
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
84
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials(params);
|
|
85
|
-
}
|
|
86
|
-
const result = method.apply(context, args);
|
|
87
|
-
return result;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
return propertyDescriptor;
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function MonkeyEcxCoreServicePaged(params: MonkeyEcxServiceCredentials) {
|
|
95
|
-
return function (
|
|
96
|
-
target: Object,
|
|
97
|
-
propertyName: string,
|
|
98
|
-
propertyDescriptor: PropertyDescriptor
|
|
99
|
-
): PropertyDescriptor {
|
|
100
|
-
const method = propertyDescriptor.value;
|
|
101
|
-
|
|
102
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
103
|
-
const context: any = this;
|
|
104
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
105
|
-
const credentials =
|
|
106
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.getMonkeyEcxServiceCredentials();
|
|
107
|
-
let requestPaged = null;
|
|
108
|
-
if (credentials) {
|
|
109
|
-
requestPaged = credentials.requestPaged;
|
|
110
|
-
}
|
|
111
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
112
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials({
|
|
113
|
-
...params,
|
|
114
|
-
...(requestPaged || {}),
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
const result = method.apply(context, args);
|
|
118
|
-
return result;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
return propertyDescriptor;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export function MonkeyEcxCoreServiceQueue(
|
|
126
|
-
name: string,
|
|
127
|
-
description?: string,
|
|
128
|
-
params?: MonkeyEcxServiceCredentials
|
|
129
|
-
) {
|
|
130
|
-
return function (
|
|
131
|
-
target: Object,
|
|
132
|
-
propertyName: string,
|
|
133
|
-
propertyDescriptor: PropertyDescriptor
|
|
134
|
-
): PropertyDescriptor {
|
|
135
|
-
const method = propertyDescriptor.value;
|
|
136
|
-
|
|
137
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
138
|
-
const context: any = this;
|
|
139
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
140
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(params)) {
|
|
141
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
142
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials(
|
|
143
|
-
params
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
context?.monkeyecxService.monkeyecxHandlingService.setMonkeyEcxRequestQueue(
|
|
147
|
-
DecoratorsUtils.buildQueuePropertys({
|
|
148
|
-
name,
|
|
149
|
-
description,
|
|
150
|
-
})
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
const result = method.apply(context, args);
|
|
154
|
-
return result;
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
return propertyDescriptor;
|
|
158
|
-
};
|
|
159
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* eslint-disable space-before-function-paren */
|
|
2
|
-
/* eslint-disable func-names */
|
|
3
|
-
/* eslint-disable max-len */
|
|
4
|
-
import { MonkeyUtils } from 'monkey-style-guide';
|
|
5
|
-
import { MonkeyEcxServiceCredentials } from '../interfaces';
|
|
6
|
-
import { DecoratorsUtils } from '../utils';
|
|
7
|
-
|
|
8
|
-
export function MonkeyEcxServiceDownload(
|
|
9
|
-
name: string,
|
|
10
|
-
description?: string,
|
|
11
|
-
params?: MonkeyEcxServiceCredentials
|
|
12
|
-
) {
|
|
13
|
-
return function (
|
|
14
|
-
target: Object,
|
|
15
|
-
propertyName: string,
|
|
16
|
-
propertyDescriptor: PropertyDescriptor
|
|
17
|
-
): PropertyDescriptor {
|
|
18
|
-
const method = propertyDescriptor.value;
|
|
19
|
-
|
|
20
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
21
|
-
const context: any = this;
|
|
22
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
23
|
-
if (MonkeyUtils.persistNullEmptyUndefined(params)) {
|
|
24
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
25
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials(
|
|
26
|
-
params
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxRequestDownload({
|
|
30
|
-
...DecoratorsUtils.buildDownloadPropertys(name, description),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
const result = method.apply(context, args);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return propertyDescriptor;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* eslint-disable space-before-function-paren */
|
|
2
|
-
/* eslint-disable func-names */
|
|
3
|
-
/* eslint-disable max-len */
|
|
4
|
-
import { MonkeyUtils } from 'monkey-style-guide';
|
|
5
|
-
import { MonkeyEcxServiceCredentials } from '../interfaces';
|
|
6
|
-
import { DecoratorsUtils } from '../utils';
|
|
7
|
-
|
|
8
|
-
export function MonkeyEcxServiceUpload(
|
|
9
|
-
name: string,
|
|
10
|
-
description?: string,
|
|
11
|
-
params?: MonkeyEcxServiceCredentials
|
|
12
|
-
) {
|
|
13
|
-
return function (
|
|
14
|
-
target: Object,
|
|
15
|
-
propertyName: string,
|
|
16
|
-
propertyDescriptor: PropertyDescriptor
|
|
17
|
-
): PropertyDescriptor {
|
|
18
|
-
const method = propertyDescriptor.value;
|
|
19
|
-
|
|
20
|
-
propertyDescriptor.value = function (...args: any[]) {
|
|
21
|
-
const context: any = this;
|
|
22
|
-
if (DecoratorsUtils.hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
23
|
-
if (MonkeyUtils.persistNullEmptyUndefined(params)) {
|
|
24
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
25
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials(
|
|
26
|
-
params
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxRequestUpload({
|
|
30
|
-
...DecoratorsUtils.buildUploadPropertys(name, description),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
const result = method.apply(context, args);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return propertyDescriptor;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { MonkeyEcxDragDropDirective } from './monkeyecx-drag-drop';
|
|
5
|
-
import { MonkeyEcxFeatureByProgramDirective } from './monkeyecx-feature-by-program-directive';
|
|
6
|
-
import { MonkeyEcxFeatureDirective } from './monkeyecx-feature-directive';
|
|
7
|
-
import { MonkeyEcxFormatCurrency } from './monkeyecx-format-currency';
|
|
8
|
-
import { MonkeyEcxFormatUpper } from './monkeyecx-format-upper';
|
|
9
|
-
import { MonkeyEcxOnlyAlphaNumericDirective } from './monkeyecx-only-alpha-numeric-directive';
|
|
10
|
-
import { MonkeyEcxOnlyNumbersDirective } from './monkeyecx-only-number-directive';
|
|
11
|
-
import { MonkeyEcxPopoverOptionsDirective } from './monkeyecx-popover-options.directive';
|
|
12
|
-
import { MonkeyEcxPopoverDirective } from './monkeyecx-popover.directive';
|
|
13
|
-
import { MonkeyEcxSecurityDirective } from './monkeyecx-security-directive';
|
|
14
|
-
import { MonkeyEcxTooltipDirective } from './monkeyecx-tooltip-directive';
|
|
15
|
-
|
|
16
|
-
@NgModule({
|
|
17
|
-
declarations: [
|
|
18
|
-
MonkeyEcxDragDropDirective,
|
|
19
|
-
MonkeyEcxFormatCurrency,
|
|
20
|
-
MonkeyEcxFeatureDirective,
|
|
21
|
-
MonkeyEcxFeatureByProgramDirective,
|
|
22
|
-
MonkeyEcxFormatUpper,
|
|
23
|
-
MonkeyEcxOnlyAlphaNumericDirective,
|
|
24
|
-
MonkeyEcxOnlyNumbersDirective,
|
|
25
|
-
MonkeyEcxSecurityDirective,
|
|
26
|
-
MonkeyEcxTooltipDirective,
|
|
27
|
-
MonkeyEcxPopoverDirective,
|
|
28
|
-
MonkeyEcxPopoverOptionsDirective
|
|
29
|
-
],
|
|
30
|
-
imports: [CommonModule, OverlayModule],
|
|
31
|
-
exports: [
|
|
32
|
-
MonkeyEcxDragDropDirective,
|
|
33
|
-
MonkeyEcxFormatCurrency,
|
|
34
|
-
MonkeyEcxFeatureDirective,
|
|
35
|
-
MonkeyEcxFeatureByProgramDirective,
|
|
36
|
-
MonkeyEcxFormatUpper,
|
|
37
|
-
MonkeyEcxOnlyAlphaNumericDirective,
|
|
38
|
-
MonkeyEcxOnlyNumbersDirective,
|
|
39
|
-
MonkeyEcxSecurityDirective,
|
|
40
|
-
MonkeyEcxTooltipDirective,
|
|
41
|
-
MonkeyEcxPopoverDirective,
|
|
42
|
-
MonkeyEcxPopoverOptionsDirective
|
|
43
|
-
]
|
|
44
|
-
})
|
|
45
|
-
export class MonkeyEcxDirectivesModule {}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Directive, HostListener, Output, HostBinding, EventEmitter } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[monkeyecxDragDrop]',
|
|
5
|
-
})
|
|
6
|
-
export class MonkeyEcxDragDropDirective {
|
|
7
|
-
@Output() onFileDropped: EventEmitter<any> = new EventEmitter<any>();
|
|
8
|
-
|
|
9
|
-
@HostBinding('style.background-color') private background = '#f5fcff';
|
|
10
|
-
|
|
11
|
-
@HostBinding('style.opacity') private opacity = '1';
|
|
12
|
-
|
|
13
|
-
@HostListener('dragover', ['$event'])
|
|
14
|
-
onDragOver(evt: any) {
|
|
15
|
-
evt?.preventDefault();
|
|
16
|
-
evt?.stopPropagation();
|
|
17
|
-
this.background = '#9ecbec';
|
|
18
|
-
this.opacity = '0.8';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@HostListener('dragleave', ['$event'])
|
|
22
|
-
public onDragLeave(evt: any) {
|
|
23
|
-
evt?.preventDefault();
|
|
24
|
-
evt?.stopPropagation();
|
|
25
|
-
this.background = '#f5fcff';
|
|
26
|
-
this.opacity = '1';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@HostListener('drop', ['$event'])
|
|
30
|
-
public ondrop(evt: any) {
|
|
31
|
-
evt?.preventDefault();
|
|
32
|
-
evt?.stopPropagation();
|
|
33
|
-
this.background = '#f5fcff';
|
|
34
|
-
this.opacity = '1';
|
|
35
|
-
const { files } = evt?.dataTransfer;
|
|
36
|
-
if (files.length > 0) {
|
|
37
|
-
this.onFileDropped.emit(files);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Directive, ElementRef, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { MonkeyEcxConfig } from '../interfaces';
|
|
3
|
-
import { MonkeyEcxConfigService } from '../services';
|
|
4
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
5
|
-
|
|
6
|
-
@Directive({
|
|
7
|
-
selector: '[monkeyecxFeatureByProgram]'
|
|
8
|
-
})
|
|
9
|
-
export class MonkeyEcxFeatureByProgramDirective implements OnInit {
|
|
10
|
-
@Input('feature') feature: string = '';
|
|
11
|
-
|
|
12
|
-
private config?: MonkeyEcxConfig;
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
private cdr: ChangeDetectorRef,
|
|
16
|
-
private elementRef: ElementRef,
|
|
17
|
-
private monkeyConfigService: MonkeyEcxConfigService
|
|
18
|
-
) {
|
|
19
|
-
this.monkeyConfigService.config().subscribe((_: MonkeyEcxConfig) => {
|
|
20
|
-
this.config = _;
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
private handleDisplay(): void {
|
|
25
|
-
const { feature, config } = this;
|
|
26
|
-
let display = 'none';
|
|
27
|
-
|
|
28
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(feature) ||
|
|
29
|
-
!MonkeyEcxUtils.persistNullEmptyUndefined(config?.program?.settings)) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const disabled = config?.program?.settings?.[feature];
|
|
34
|
-
|
|
35
|
-
if (!disabled) {
|
|
36
|
-
display = 'block';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
this.elementRef.nativeElement.style.display = display;
|
|
40
|
-
|
|
41
|
-
if (display === 'none') {
|
|
42
|
-
this.elementRef.nativeElement.remove();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
this.cdr.detectChanges();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
ngOnInit() {
|
|
49
|
-
if (!this.feature) return;
|
|
50
|
-
this.cdr.detectChanges();
|
|
51
|
-
this.handleDisplay();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { takeUntil } from 'rxjs/operators';
|
|
4
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
5
|
-
import { MonkeyEcxFeatureToggleService } from '../services/config/monkeyecx-feature-toggle.service';
|
|
6
|
-
|
|
7
|
-
@Directive({
|
|
8
|
-
selector: '[monkeyecxFeature]'
|
|
9
|
-
})
|
|
10
|
-
export class MonkeyEcxFeatureDirective implements OnDestroy, OnInit {
|
|
11
|
-
@Input('featureName') feature?: string;
|
|
12
|
-
|
|
13
|
-
private unsubscribeAll = new Subject();
|
|
14
|
-
|
|
15
|
-
constructor(
|
|
16
|
-
private cdr: ChangeDetectorRef,
|
|
17
|
-
private elementRef: ElementRef,
|
|
18
|
-
private monkeyecxFeatureToggleService: MonkeyEcxFeatureToggleService
|
|
19
|
-
) {
|
|
20
|
-
// not to do
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
private getFeature(feature: string): boolean {
|
|
24
|
-
const { monkeyecxFeatureToggleService } = this;
|
|
25
|
-
|
|
26
|
-
if (!monkeyecxFeatureToggleService) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return monkeyecxFeatureToggleService?.getFlag(feature) || false;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private handleDisplay(): void {
|
|
34
|
-
if (!this.feature) return;
|
|
35
|
-
const flag = this.getFeature(this.feature);
|
|
36
|
-
let display = 'none';
|
|
37
|
-
|
|
38
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(flag)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (flag) {
|
|
43
|
-
display = 'block';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (display === 'none') {
|
|
47
|
-
this.elementRef.nativeElement.remove();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
this.elementRef.nativeElement.style.display = display;
|
|
51
|
-
this.cdr.detectChanges();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
ngOnDestroy() {
|
|
55
|
-
this.unsubscribeAll.next();
|
|
56
|
-
this.unsubscribeAll.complete();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
ngOnInit() {
|
|
60
|
-
if (!this.feature) return;
|
|
61
|
-
this.elementRef.nativeElement.style.display = 'none';
|
|
62
|
-
this.cdr.detectChanges();
|
|
63
|
-
|
|
64
|
-
this.monkeyecxFeatureToggleService.onFlags
|
|
65
|
-
.pipe(takeUntil(this.unsubscribeAll))
|
|
66
|
-
.subscribe((val: boolean) => {
|
|
67
|
-
if (val) {
|
|
68
|
-
this.handleDisplay();
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener, OnInit, Injector } from '@angular/core';
|
|
2
|
-
import { CurrencyPipe } from '@angular/common';
|
|
3
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
5
|
-
|
|
6
|
-
@Directive({
|
|
7
|
-
selector: '[monkeyecxFormatCurrency]',
|
|
8
|
-
providers: [CurrencyPipe]
|
|
9
|
-
})
|
|
10
|
-
export class MonkeyEcxFormatCurrency implements OnInit {
|
|
11
|
-
private el: HTMLInputElement;
|
|
12
|
-
|
|
13
|
-
private currency: any;
|
|
14
|
-
|
|
15
|
-
private currencyCode: string = 'BRL';
|
|
16
|
-
|
|
17
|
-
private currentLocale: string = 'pt-BR';
|
|
18
|
-
|
|
19
|
-
constructor(private elementRef: ElementRef, private injector: Injector) {
|
|
20
|
-
this.el = this.elementRef.nativeElement;
|
|
21
|
-
this.currency = this.injector.get(CurrencyPipe);
|
|
22
|
-
|
|
23
|
-
const translateService = this.injector.get(TranslateService);
|
|
24
|
-
translateService.get('MONKEY-CURRENCY-CODE').subscribe((_: any) => {
|
|
25
|
-
this.currencyCode = _;
|
|
26
|
-
this.currentLocale = translateService.getDefaultLang();
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
private handle(value: any): string {
|
|
31
|
-
const { currencyCode, currentLocale } = this;
|
|
32
|
-
const newValue = MonkeyEcxUtils.handleOnlyNumbers(value);
|
|
33
|
-
return this.currency.transform(newValue / 100, currencyCode, 'symbol', '', currentLocale);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ngOnInit() {
|
|
37
|
-
this.el.value = this.handle(this.el.value);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@HostListener('input', ['$event.target.value'])
|
|
41
|
-
onInput(value: any) {
|
|
42
|
-
this.el.value = this.handle(value);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, forwardRef, HostListener, Renderer2, Self } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[monkeyecxFormatUpper]',
|
|
6
|
-
providers: [
|
|
7
|
-
{
|
|
8
|
-
provide: NG_VALUE_ACCESSOR,
|
|
9
|
-
useExisting: forwardRef(() => {
|
|
10
|
-
// eslint-disable-next-line no-use-before-define
|
|
11
|
-
return MonkeyEcxFormatUpper;
|
|
12
|
-
}),
|
|
13
|
-
multi: true,
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
})
|
|
17
|
-
export class MonkeyEcxFormatUpper implements ControlValueAccessor {
|
|
18
|
-
_onChange?: (_: any) => void;
|
|
19
|
-
|
|
20
|
-
_touched?: () => void;
|
|
21
|
-
|
|
22
|
-
constructor(@Self() private _el: ElementRef, private _renderer: Renderer2) {
|
|
23
|
-
// not to do
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@HostListener('keyup', ['$event'])
|
|
27
|
-
onKeyDown(evt: KeyboardEvent) {
|
|
28
|
-
const value = this._el.nativeElement.value.toUpperCase();
|
|
29
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', value);
|
|
30
|
-
this._onChange?.(value);
|
|
31
|
-
evt.preventDefault();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@HostListener('blur', ['$event'])
|
|
35
|
-
onBlur() {
|
|
36
|
-
this._touched?.();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
writeValue(value: any): void {
|
|
40
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', value);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
registerOnChange(fn: (_: any) => void): void {
|
|
44
|
-
this._onChange = fn;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
registerOnTouched(fn: () => void): void {
|
|
48
|
-
this._touched = fn;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
setDisabledState(isDisabled: boolean): void {
|
|
52
|
-
this._renderer.setProperty(this._el.nativeElement, 'disabled', isDisabled);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener } from '@angular/core';
|
|
2
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[monkeyecxOnlyAlphaNumeric]'
|
|
6
|
-
})
|
|
7
|
-
export class MonkeyEcxOnlyAlphaNumericDirective {
|
|
8
|
-
constructor(private elementRef: ElementRef) {
|
|
9
|
-
// not to do
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@HostListener('input', ['$event'])
|
|
13
|
-
onInputChange(event: Event) {
|
|
14
|
-
const initalValue = this.elementRef.nativeElement.value;
|
|
15
|
-
|
|
16
|
-
this.elementRef.nativeElement.value = MonkeyEcxUtils.handleOnlyAlphaNumeric(initalValue);
|
|
17
|
-
if (initalValue !== this.elementRef.nativeElement.value) {
|
|
18
|
-
event.stopPropagation();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener } from '@angular/core';
|
|
2
|
-
import { MonkeyEcxUtils } from '../utils/utils';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[monkeyecxOnlyNumbers]'
|
|
6
|
-
})
|
|
7
|
-
export class MonkeyEcxOnlyNumbersDirective {
|
|
8
|
-
constructor(private elementRef: ElementRef) {
|
|
9
|
-
// not to do
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@HostListener('input', ['$event'])
|
|
13
|
-
onInputChange(event: Event) {
|
|
14
|
-
const initalValue = this.elementRef.nativeElement.value;
|
|
15
|
-
|
|
16
|
-
this.elementRef.nativeElement.value = MonkeyEcxUtils.handleOnlyNumbers(initalValue);
|
|
17
|
-
if (initalValue !== this.elementRef.nativeElement.value) {
|
|
18
|
-
event.stopPropagation();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Directive, forwardRef, InjectionToken, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export const POPOVER_OPTIONS = new InjectionToken('POPOVER_OPTIONS');
|
|
4
|
-
|
|
5
|
-
export type PopoverDir =
|
|
6
|
-
| 'rtl'
|
|
7
|
-
| 'ltr'
|
|
8
|
-
| 'trtl'
|
|
9
|
-
| 'tltr'
|
|
10
|
-
| 'ct'
|
|
11
|
-
| 'cc'
|
|
12
|
-
| 'cr'
|
|
13
|
-
| 'rt'
|
|
14
|
-
| 'rb'
|
|
15
|
-
| 'lt'
|
|
16
|
-
| 'lb';
|
|
17
|
-
|
|
18
|
-
export interface MonkeyEcxPopoverOptions {
|
|
19
|
-
dir?: PopoverDir;
|
|
20
|
-
minwidth?: boolean;
|
|
21
|
-
backdrop?: boolean;
|
|
22
|
-
contextmenu?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@Directive({
|
|
26
|
-
selector: '[monkeyecxPopoverOptions]',
|
|
27
|
-
providers: [
|
|
28
|
-
{
|
|
29
|
-
provide: POPOVER_OPTIONS,
|
|
30
|
-
useExisting: forwardRef(() => {
|
|
31
|
-
// eslint-disable-next-line no-use-before-define
|
|
32
|
-
return MonkeyEcxPopoverOptionsDirective;
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
})
|
|
37
|
-
export class MonkeyEcxPopoverOptionsDirective implements MonkeyEcxPopoverOptions {
|
|
38
|
-
@Input('monkeyecxPopoverOptions')
|
|
39
|
-
set options(options: MonkeyEcxPopoverOptions) {
|
|
40
|
-
Object.entries(options).forEach(([k, v]) => {
|
|
41
|
-
this[k] = v;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
minwidth?: boolean;
|
|
46
|
-
|
|
47
|
-
dir?: PopoverDir;
|
|
48
|
-
|
|
49
|
-
backdrop?: boolean;
|
|
50
|
-
|
|
51
|
-
contextmenu?: boolean;
|
|
52
|
-
}
|