monkey-front-core 0.0.500 → 0.0.501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/esm2020/lib/components/alerts/alerts.component.mjs +45 -45
- package/esm2020/lib/components/alerts/alerts.module.mjs +21 -21
- package/esm2020/lib/components/alerts/index.mjs +3 -3
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.component.mjs +29 -29
- package/esm2020/lib/components/closed-to-maintenance/closed-to-maintenance.module.mjs +43 -43
- package/esm2020/lib/components/closed-to-maintenance/index.mjs +3 -3
- package/esm2020/lib/components/currency-config/currency-config.component.mjs +39 -39
- package/esm2020/lib/components/currency-config/currency-config.module.mjs +39 -39
- package/esm2020/lib/components/currency-config/index.mjs +3 -3
- package/esm2020/lib/components/index.mjs +6 -6
- package/esm2020/lib/components/progress-bar/index.mjs +4 -4
- package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +23 -23
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +18 -18
- package/esm2020/lib/components/progress-bar/progress-bar.service.mjs +50 -50
- package/esm2020/lib/components/version-changed/index.mjs +3 -3
- package/esm2020/lib/components/version-changed/version-changed.component.mjs +24 -24
- package/esm2020/lib/components/version-changed/version-changed.module.mjs +39 -39
- package/esm2020/lib/core/decorators/index.mjs +5 -5
- package/esm2020/lib/core/decorators/monkeyecx-charts-decorators.mjs +40 -40
- package/esm2020/lib/core/decorators/monkeyecx-decorators.mjs +111 -111
- package/esm2020/lib/core/decorators/monkeyecx-download-decorators.mjs +26 -26
- package/esm2020/lib/core/decorators/monkeyecx-upload-decorators.mjs +26 -26
- package/esm2020/lib/core/directives/index.mjs +13 -13
- package/esm2020/lib/core/directives/monkeyecx-directives-module.mjs +73 -73
- package/esm2020/lib/core/directives/monkeyecx-drag-drop.mjs +57 -57
- package/esm2020/lib/core/directives/monkeyecx-feature-by-program-directive.mjs +54 -54
- package/esm2020/lib/core/directives/monkeyecx-feature-directive.mjs +68 -68
- package/esm2020/lib/core/directives/monkeyecx-format-currency.mjs +44 -44
- package/esm2020/lib/core/directives/monkeyecx-format-upper.mjs +67 -67
- package/esm2020/lib/core/directives/monkeyecx-only-alpha-numeric-directive.mjs +28 -28
- package/esm2020/lib/core/directives/monkeyecx-only-number-directive.mjs +28 -28
- package/esm2020/lib/core/directives/monkeyecx-popover-options.directive.mjs +39 -39
- package/esm2020/lib/core/directives/monkeyecx-popover.directive.mjs +212 -212
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +75 -75
- package/esm2020/lib/core/directives/monkeyecx-tooltip-directive.mjs +123 -123
- package/esm2020/lib/core/index.mjs +10 -10
- package/esm2020/lib/core/injectors/index.mjs +4 -4
- package/esm2020/lib/core/interceptors/index.mjs +6 -6
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +49 -49
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +59 -59
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-interceptor.module.mjs +47 -47
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.mjs +43 -43
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.mjs +37 -37
- package/esm2020/lib/core/interfaces/index.mjs +35 -35
- package/esm2020/lib/core/interfaces/monkeyecx-auth-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-company-pendencies.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-company.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-config-bootstrap.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-country-security.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-error-response.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-filter.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-handled-error-response.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-header-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-intercom-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-interface.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-me-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-navigation.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-pagination.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-program.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-releases.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-request-in-progress.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-request-paged.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-resolver.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-response-links.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-response-paged.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-saved-state.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-scroll-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-service-credentials.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-storage.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-store.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-support-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-translate-options.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-download/index.mjs +4 -4
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-download.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-downloaded.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-download/monkeyecx-request-item-download.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-queue/index.mjs +4 -4
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-queue/monkeyecx-request-queue.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-upload/index.mjs +3 -3
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.mjs +2 -2
- package/esm2020/lib/core/interfaces/request-upload/monkeyecx-request-upload.mjs +2 -2
- package/esm2020/lib/core/interfaces/schedules/index.mjs +2 -2
- package/esm2020/lib/core/interfaces/schedules/monkeyecx-request-schedule.mjs +2 -2
- package/esm2020/lib/core/model/index.mjs +3 -3
- package/esm2020/lib/core/model/monkeyecx-links.model.mjs +8 -8
- package/esm2020/lib/core/model/monkeyecx-model.mjs +26 -26
- package/esm2020/lib/core/pipes/index.mjs +22 -22
- package/esm2020/lib/core/pipes/monkeyecx-blob-secure.mjs +26 -26
- package/esm2020/lib/core/pipes/monkeyecx-display-first-name.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-display-initials.mjs +21 -21
- package/esm2020/lib/core/pipes/monkeyecx-display-support-phone.mjs +33 -33
- package/esm2020/lib/core/pipes/monkeyecx-format-address.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-beautify-json.mjs +38 -38
- package/esm2020/lib/core/pipes/monkeyecx-format-currency.mjs +42 -42
- package/esm2020/lib/core/pipes/monkeyecx-format-date-group.mjs +45 -45
- package/esm2020/lib/core/pipes/monkeyecx-format-date-timelapse.mjs +32 -32
- package/esm2020/lib/core/pipes/monkeyecx-format-date-unix-timelapse.mjs +36 -36
- package/esm2020/lib/core/pipes/monkeyecx-format-date.mjs +29 -29
- package/esm2020/lib/core/pipes/monkeyecx-format-document.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-number.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-phone.mjs +42 -42
- package/esm2020/lib/core/pipes/monkeyecx-format-size.mjs +20 -20
- package/esm2020/lib/core/pipes/monkeyecx-format-tax.mjs +23 -23
- package/esm2020/lib/core/pipes/monkeyecx-format-type-document.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-value.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-format-zipcode.mjs +19 -19
- package/esm2020/lib/core/pipes/monkeyecx-pipes.module.mjs +121 -121
- package/esm2020/lib/core/pipes/monkeyecx-text-truncate.mjs +23 -23
- package/esm2020/lib/core/pipes/monkeyecx-truncate-qtd.mjs +16 -16
- package/esm2020/lib/core/services/alerts/index.mjs +2 -2
- package/esm2020/lib/core/services/alerts/monkeyecx-alerts.service.mjs +42 -42
- package/esm2020/lib/core/services/auth/index.mjs +6 -6
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-company.service.mjs +28 -28
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-login.service.mjs +27 -27
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard-role.service.mjs +79 -79
- package/esm2020/lib/core/services/auth/monkeyecx-auth-guard.service.mjs +26 -26
- package/esm2020/lib/core/services/auth/monkeyecx-authentication.service.mjs +78 -78
- package/esm2020/lib/core/services/commons/index.mjs +3 -3
- package/esm2020/lib/core/services/commons/monkeyecx-commons-resolve-base.service.mjs +108 -108
- package/esm2020/lib/core/services/commons/monkeyecx-commons-resolve.service.mjs +126 -126
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +362 -362
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +42 -42
- package/esm2020/lib/core/services/config/monkeyecx-config.module.mjs +28 -28
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +106 -106
- package/esm2020/lib/core/services/config/monkeyecx-currency-config.service.mjs +84 -84
- package/esm2020/lib/core/services/config/monkeyecx-error-config.service.mjs +85 -85
- package/esm2020/lib/core/services/config/monkeyecx-feature-toggle.service.mjs +76 -76
- package/esm2020/lib/core/services/config/monkeyecx-gtm-config.service.mjs +50 -50
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +138 -138
- package/esm2020/lib/core/services/config/monkeyecx-logs-config.service.mjs +34 -34
- package/esm2020/lib/core/services/config/monkeyecx-maintenance-config.service.mjs +37 -37
- package/esm2020/lib/core/services/config/monkeyecx-security-console-config.service.mjs +47 -47
- package/esm2020/lib/core/services/config/monkeyecx-service-worker-config.service.mjs +53 -53
- package/esm2020/lib/core/services/error/index.mjs +5 -5
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.module.mjs +27 -27
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +37 -37
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +138 -138
- package/esm2020/lib/core/services/error/monkeyecx-others-errors-handling.service.mjs +29 -29
- package/esm2020/lib/core/services/index.mjs +26 -26
- package/esm2020/lib/core/services/logged/index.mjs +2 -2
- package/esm2020/lib/core/services/logged/monkeyecx-logged-handling.service.mjs +40 -40
- package/esm2020/lib/core/services/monkeyecx-handling.service.mjs +50 -50
- package/esm2020/lib/core/services/monkeyecx-service.service.mjs +104 -104
- package/esm2020/lib/core/services/pagination/index.mjs +2 -2
- package/esm2020/lib/core/services/pagination/monkeyecx-pagination.service.mjs +29 -29
- package/esm2020/lib/core/services/request-download/index.mjs +3 -3
- package/esm2020/lib/core/services/request-download/monkeyecx-request-download-handling.service.mjs +93 -93
- package/esm2020/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.mjs +61 -61
- package/esm2020/lib/core/services/request-paged/index.mjs +2 -2
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +42 -42
- package/esm2020/lib/core/services/request-queue/index.mjs +3 -3
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.mjs +114 -114
- package/esm2020/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.mjs +119 -119
- package/esm2020/lib/core/services/routes/index.mjs +2 -2
- package/esm2020/lib/core/services/routes/monkeyecx-dicovery-params.service.mjs +54 -54
- package/esm2020/lib/core/services/schedules/index.mjs +2 -2
- package/esm2020/lib/core/services/schedules/monkeyecx-request-schedule.service.mjs +188 -188
- package/esm2020/lib/core/services/storage/index.mjs +3 -3
- package/esm2020/lib/core/services/storage/monkeyecx-cookie-storage.service.mjs +32 -32
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +236 -236
- package/esm2020/lib/core/services/store/index.mjs +4 -4
- package/esm2020/lib/core/services/store/monkeyecx-store-base.service.mjs +170 -170
- package/esm2020/lib/core/services/store/monkeyecx-store.actions.mjs +25 -25
- package/esm2020/lib/core/services/store/monkeyecx-store.selector.mjs +80 -80
- package/esm2020/lib/core/services/store/monkeyecx-store.service.mjs +189 -189
- package/esm2020/lib/core/specification-search/index.mjs +2 -2
- package/esm2020/lib/core/specification-search/monkeyecx-specification-search.mjs +108 -108
- package/esm2020/lib/core/utils/decorators-utils.mjs +40 -40
- package/esm2020/lib/core/utils/index.mjs +8 -8
- package/esm2020/lib/core/utils/statics.mjs +45 -45
- package/esm2020/lib/core/utils/utils.mjs +267 -267
- package/esm2020/lib/core/utils/validate-utils.mjs +205 -205
- package/esm2020/lib/core/utils/validators.mjs +268 -268
- package/esm2020/lib/monkey-front-core.module.mjs +71 -71
- package/esm2020/lib/store/actions/index.mjs +2 -2
- package/esm2020/lib/store/actions/monkeyecx-storage.actions.mjs +8 -8
- package/esm2020/lib/store/index.mjs +4 -4
- package/esm2020/lib/store/reducers/index.mjs +3 -3
- package/esm2020/lib/store/reducers/monkeyecx-seeder.reducer.mjs +53 -53
- package/esm2020/lib/store/reducers/monkeyecx-storage.reducer.mjs +40 -40
- package/esm2020/lib/store/selectors/index.mjs +2 -2
- package/esm2020/lib/store/selectors/monkeyecx-storage.selector.mjs +17 -17
- package/esm2020/monkey-front-core.mjs +4 -4
- package/esm2020/public-api.mjs +8 -8
- package/fesm2015/monkey-front-core.mjs +6296 -6296
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +6324 -6324
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/components/alerts/alerts.component.d.ts +22 -22
- package/lib/components/alerts/alerts.module.d.ts +10 -10
- package/lib/components/alerts/index.d.ts +2 -2
- package/lib/components/closed-to-maintenance/closed-to-maintenance.component.d.ts +13 -13
- package/lib/components/closed-to-maintenance/closed-to-maintenance.module.d.ts +11 -11
- package/lib/components/closed-to-maintenance/index.d.ts +2 -2
- package/lib/components/currency-config/currency-config.component.d.ts +17 -17
- package/lib/components/currency-config/currency-config.module.d.ts +10 -10
- package/lib/components/currency-config/index.d.ts +2 -2
- package/lib/components/index.d.ts +5 -5
- package/lib/components/progress-bar/index.d.ts +3 -3
- package/lib/components/progress-bar/progress-bar.component.d.ts +11 -11
- package/lib/components/progress-bar/progress-bar.module.d.ts +8 -8
- package/lib/components/progress-bar/progress-bar.service.d.ts +14 -14
- package/lib/components/version-changed/index.d.ts +2 -2
- package/lib/components/version-changed/version-changed.component.d.ts +9 -9
- package/lib/components/version-changed/version-changed.module.d.ts +10 -10
- package/lib/core/decorators/index.d.ts +4 -4
- package/lib/core/decorators/monkeyecx-charts-decorators.d.ts +1 -1
- package/lib/core/decorators/monkeyecx-decorators.d.ts +7 -7
- package/lib/core/decorators/monkeyecx-download-decorators.d.ts +2 -2
- package/lib/core/decorators/monkeyecx-upload-decorators.d.ts +2 -2
- package/lib/core/directives/index.d.ts +12 -12
- package/lib/core/directives/monkeyecx-directives-module.d.ts +19 -19
- package/lib/core/directives/monkeyecx-drag-drop.d.ts +12 -12
- package/lib/core/directives/monkeyecx-feature-by-program-directive.d.ts +16 -16
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +17 -17
- package/lib/core/directives/monkeyecx-format-currency.d.ts +16 -16
- package/lib/core/directives/monkeyecx-format-upper.d.ts +18 -18
- package/lib/core/directives/monkeyecx-only-alpha-numeric-directive.d.ts +9 -9
- package/lib/core/directives/monkeyecx-only-number-directive.d.ts +9 -9
- package/lib/core/directives/monkeyecx-popover-options.directive.d.ts +19 -19
- package/lib/core/directives/monkeyecx-popover.directive.d.ts +43 -43
- package/lib/core/directives/monkeyecx-security-directive.d.ts +18 -18
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +23 -23
- package/lib/core/index.d.ts +10 -10
- package/lib/core/injectors/index.d.ts +4 -4
- package/lib/core/interceptors/index.d.ts +5 -5
- package/lib/core/interceptors/monkeyecx-http-config-error.interceptor.d.ts +18 -18
- package/lib/core/interceptors/monkeyecx-http-config-header.interceptor.d.ts +16 -16
- package/lib/core/interceptors/monkeyecx-http-config-interceptor.module.d.ts +9 -9
- package/lib/core/interceptors/monkeyecx-http-config-loading-in-progress.interceptor.d.ts +12 -12
- package/lib/core/interceptors/monkeyecx-http-config-queue.interceptor.d.ts +14 -14
- package/lib/core/interfaces/index.d.ts +34 -34
- package/lib/core/interfaces/monkeyecx-auth-credentials.d.ts +15 -15
- package/lib/core/interfaces/monkeyecx-company-pendencies.d.ts +14 -14
- package/lib/core/interfaces/monkeyecx-company.d.ts +10 -10
- package/lib/core/interfaces/monkeyecx-config-bootstrap.d.ts +14 -14
- package/lib/core/interfaces/monkeyecx-config.d.ts +132 -132
- package/lib/core/interfaces/monkeyecx-country-security.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-error-response.d.ts +5 -5
- package/lib/core/interfaces/monkeyecx-filter.d.ts +42 -42
- package/lib/core/interfaces/monkeyecx-handled-error-response.d.ts +10 -10
- package/lib/core/interfaces/monkeyecx-header-credentials.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-intercom-options.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-interface.d.ts +11 -11
- package/lib/core/interfaces/monkeyecx-me-credentials.d.ts +22 -22
- package/lib/core/interfaces/monkeyecx-navigation.d.ts +27 -27
- package/lib/core/interfaces/monkeyecx-pagination.d.ts +26 -26
- package/lib/core/interfaces/monkeyecx-program.d.ts +10 -10
- package/lib/core/interfaces/monkeyecx-releases.d.ts +9 -9
- package/lib/core/interfaces/monkeyecx-request-in-progress.d.ts +3 -3
- package/lib/core/interfaces/monkeyecx-request-paged.d.ts +23 -23
- package/lib/core/interfaces/monkeyecx-resolver.d.ts +39 -39
- package/lib/core/interfaces/monkeyecx-response-links.d.ts +11 -11
- package/lib/core/interfaces/monkeyecx-response-paged.d.ts +6 -6
- package/lib/core/interfaces/monkeyecx-saved-state.d.ts +5 -5
- package/lib/core/interfaces/monkeyecx-scroll-options.d.ts +5 -5
- package/lib/core/interfaces/monkeyecx-service-credentials.d.ts +12 -12
- package/lib/core/interfaces/monkeyecx-storage.d.ts +38 -38
- package/lib/core/interfaces/monkeyecx-store.d.ts +35 -35
- package/lib/core/interfaces/monkeyecx-support-options.d.ts +4 -4
- package/lib/core/interfaces/monkeyecx-token-credentials.d.ts +21 -21
- package/lib/core/interfaces/monkeyecx-translate-options.d.ts +4 -4
- package/lib/core/interfaces/request-download/index.d.ts +3 -3
- package/lib/core/interfaces/request-download/monkeyecx-request-download.d.ts +10 -10
- package/lib/core/interfaces/request-download/monkeyecx-request-downloaded.d.ts +7 -7
- package/lib/core/interfaces/request-download/monkeyecx-request-item-download.d.ts +7 -7
- package/lib/core/interfaces/request-queue/index.d.ts +3 -3
- package/lib/core/interfaces/request-queue/monkeyecx-request-item-queue.d.ts +7 -7
- package/lib/core/interfaces/request-queue/monkeyecx-request-progress-queue.d.ts +6 -6
- package/lib/core/interfaces/request-queue/monkeyecx-request-queue.d.ts +8 -8
- package/lib/core/interfaces/request-upload/index.d.ts +2 -2
- package/lib/core/interfaces/request-upload/monkeyecx-request-item-upload.d.ts +5 -5
- package/lib/core/interfaces/request-upload/monkeyecx-request-upload.d.ts +10 -10
- package/lib/core/interfaces/schedules/index.d.ts +1 -1
- package/lib/core/interfaces/schedules/monkeyecx-request-schedule.d.ts +13 -13
- package/lib/core/model/index.d.ts +2 -2
- package/lib/core/model/monkeyecx-links.model.d.ts +4 -4
- package/lib/core/model/monkeyecx-model.d.ts +14 -14
- package/lib/core/pipes/index.d.ts +22 -22
- package/lib/core/pipes/monkeyecx-blob-secure.d.ts +13 -13
- package/lib/core/pipes/monkeyecx-display-first-name.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-display-initials.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-display-support-phone.d.ts +18 -18
- package/lib/core/pipes/monkeyecx-format-address.d.ts +14 -14
- package/lib/core/pipes/monkeyecx-format-beautify-json.d.ts +8 -8
- package/lib/core/pipes/monkeyecx-format-currency.d.ts +12 -12
- package/lib/core/pipes/monkeyecx-format-date-group.d.ts +11 -11
- package/lib/core/pipes/monkeyecx-format-date-timelapse.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-date-unix-timelapse.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-date.d.ts +12 -12
- package/lib/core/pipes/monkeyecx-format-document.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-number.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-phone.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-size.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-tax.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-value.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-format-zipcode.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +27 -27
- package/lib/core/pipes/monkeyecx-text-truncate.d.ts +7 -7
- package/lib/core/pipes/monkeyecx-truncate-qtd.d.ts +7 -7
- package/lib/core/services/alerts/index.d.ts +1 -1
- package/lib/core/services/alerts/monkeyecx-alerts.service.d.ts +21 -21
- package/lib/core/services/auth/index.d.ts +5 -5
- package/lib/core/services/auth/monkeyecx-auth-guard-company.service.d.ts +10 -10
- package/lib/core/services/auth/monkeyecx-auth-guard-login.service.d.ts +10 -10
- package/lib/core/services/auth/monkeyecx-auth-guard-role.service.d.ts +16 -16
- package/lib/core/services/auth/monkeyecx-auth-guard.service.d.ts +10 -10
- package/lib/core/services/auth/monkeyecx-authentication.service.d.ts +35 -35
- package/lib/core/services/commons/index.d.ts +3 -3
- package/lib/core/services/commons/monkeyecx-commons-resolve-base.service.d.ts +46 -46
- package/lib/core/services/commons/monkeyecx-commons-resolve.service.d.ts +60 -60
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +120 -120
- package/lib/core/services/config/monkeyecx-alerts-config.service.d.ts +11 -11
- package/lib/core/services/config/monkeyecx-config.module.d.ts +9 -9
- package/lib/core/services/config/monkeyecx-config.service.d.ts +36 -36
- package/lib/core/services/config/monkeyecx-currency-config.service.d.ts +15 -15
- package/lib/core/services/config/monkeyecx-error-config.service.d.ts +8 -8
- package/lib/core/services/config/monkeyecx-feature-toggle.service.d.ts +16 -16
- package/lib/core/services/config/monkeyecx-gtm-config.service.d.ts +8 -8
- package/lib/core/services/config/monkeyecx-i18n-config.service.d.ts +21 -21
- package/lib/core/services/config/monkeyecx-logs-config.service.d.ts +7 -7
- package/lib/core/services/config/monkeyecx-maintenance-config.service.d.ts +13 -13
- package/lib/core/services/config/monkeyecx-security-console-config.service.d.ts +12 -12
- package/lib/core/services/config/monkeyecx-service-worker-config.service.d.ts +16 -16
- package/lib/core/services/error/index.d.ts +4 -4
- package/lib/core/services/error/monkeyecx-error-handling.module.d.ts +9 -9
- package/lib/core/services/error/monkeyecx-error-handling.service.d.ts +9 -9
- package/lib/core/services/error/monkeyecx-http-error-handling.service.d.ts +26 -26
- package/lib/core/services/error/monkeyecx-others-errors-handling.service.d.ts +9 -9
- package/lib/core/services/index.d.ts +25 -25
- package/lib/core/services/logged/index.d.ts +1 -1
- package/lib/core/services/logged/monkeyecx-logged-handling.service.d.ts +14 -14
- package/lib/core/services/monkeyecx-handling.service.d.ts +22 -22
- package/lib/core/services/monkeyecx-service.service.d.ts +18 -18
- package/lib/core/services/pagination/index.d.ts +1 -1
- package/lib/core/services/pagination/monkeyecx-pagination.service.d.ts +9 -9
- package/lib/core/services/request-download/index.d.ts +2 -2
- package/lib/core/services/request-download/monkeyecx-request-download-handling.service.d.ts +18 -18
- package/lib/core/services/request-download/monkeyecx-request-downloaded-handling.service.d.ts +16 -16
- package/lib/core/services/request-paged/index.d.ts +1 -1
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +11 -11
- package/lib/core/services/request-queue/index.d.ts +2 -2
- package/lib/core/services/request-queue/monkeyecx-request-queue-handling.service.d.ts +21 -21
- package/lib/core/services/request-queue/monkeyecx-request-queue-modal-handling.service.d.ts +23 -23
- package/lib/core/services/routes/index.d.ts +1 -1
- package/lib/core/services/routes/monkeyecx-dicovery-params.service.d.ts +13 -13
- package/lib/core/services/schedules/index.d.ts +1 -1
- package/lib/core/services/schedules/monkeyecx-request-schedule.service.d.ts +47 -47
- package/lib/core/services/storage/index.d.ts +2 -2
- package/lib/core/services/storage/monkeyecx-cookie-storage.service.d.ts +11 -11
- package/lib/core/services/storage/monkeyecx-token-storage.service.d.ts +30 -30
- package/lib/core/services/store/index.d.ts +4 -4
- package/lib/core/services/store/monkeyecx-store-base.service.d.ts +47 -47
- package/lib/core/services/store/monkeyecx-store.actions.d.ts +56 -56
- package/lib/core/services/store/monkeyecx-store.selector.d.ts +31 -31
- package/lib/core/services/store/monkeyecx-store.service.d.ts +50 -50
- package/lib/core/specification-search/index.d.ts +1 -1
- package/lib/core/specification-search/monkeyecx-specification-search.d.ts +20 -20
- package/lib/core/utils/decorators-utils.d.ts +5 -5
- package/lib/core/utils/index.d.ts +6 -6
- package/lib/core/utils/statics.d.ts +34 -34
- package/lib/core/utils/utils.d.ts +26 -26
- package/lib/core/utils/validate-utils.d.ts +66 -66
- package/lib/core/utils/validators.d.ts +36 -36
- package/lib/monkey-front-core.module.d.ts +19 -19
- package/lib/store/actions/index.d.ts +1 -1
- package/lib/store/actions/monkeyecx-storage.actions.d.ts +23 -23
- package/lib/store/index.d.ts +3 -3
- package/lib/store/reducers/index.d.ts +2 -2
- package/lib/store/reducers/monkeyecx-seeder.reducer.d.ts +2 -2
- package/lib/store/reducers/monkeyecx-storage.reducer.d.ts +13 -13
- package/lib/store/selectors/index.d.ts +1 -1
- package/lib/store/selectors/monkeyecx-storage.selector.d.ts +8 -8
- package/monkey-front-core-0.0.501.tgz +0 -0
- package/monkey-front-core.d.ts +5 -5
- package/package.json +3 -3
- package/public-api.d.ts +4 -4
- package/monkey-front-core-0.0.500.tgz +0 -0
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "ngx-cookie-service";
|
|
4
|
-
export class MonkeyEcxCookieStorageService {
|
|
5
|
-
constructor(cookieService) {
|
|
6
|
-
this.cookieService = cookieService;
|
|
7
|
-
// not to do
|
|
8
|
-
}
|
|
9
|
-
setCookie(name, value, environment) {
|
|
10
|
-
this.removeCookie(name, environment);
|
|
11
|
-
const { urlDomain } = environment;
|
|
12
|
-
const handledDomain = urlDomain ? `.${urlDomain}` : '';
|
|
13
|
-
this.cookieService.set(name, value, undefined, '/', handledDomain, true, 'None');
|
|
14
|
-
}
|
|
15
|
-
getCookie(name) {
|
|
16
|
-
return this.cookieService.get(name);
|
|
17
|
-
}
|
|
18
|
-
removeCookie(name, environment) {
|
|
19
|
-
const { urlDomain } = environment;
|
|
20
|
-
const handledDomain = urlDomain ? `.${urlDomain}` : '';
|
|
21
|
-
this.cookieService.delete(name, '/', handledDomain, true, 'None');
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
MonkeyEcxCookieStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxCookieStorageService, deps: [{ token: i1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
-
MonkeyEcxCookieStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxCookieStorageService, providedIn: 'root' });
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxCookieStorageService, decorators: [{
|
|
27
|
-
type: Injectable,
|
|
28
|
-
args: [{
|
|
29
|
-
providedIn: 'root'
|
|
30
|
-
}]
|
|
31
|
-
}], ctorParameters: function () { return [{ type: i1.CookieService }]; } });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "ngx-cookie-service";
|
|
4
|
+
export class MonkeyEcxCookieStorageService {
|
|
5
|
+
constructor(cookieService) {
|
|
6
|
+
this.cookieService = cookieService;
|
|
7
|
+
// not to do
|
|
8
|
+
}
|
|
9
|
+
setCookie(name, value, environment) {
|
|
10
|
+
this.removeCookie(name, environment);
|
|
11
|
+
const { urlDomain } = environment;
|
|
12
|
+
const handledDomain = urlDomain ? `.${urlDomain}` : '';
|
|
13
|
+
this.cookieService.set(name, value, undefined, '/', handledDomain, true, 'None');
|
|
14
|
+
}
|
|
15
|
+
getCookie(name) {
|
|
16
|
+
return this.cookieService.get(name);
|
|
17
|
+
}
|
|
18
|
+
removeCookie(name, environment) {
|
|
19
|
+
const { urlDomain } = environment;
|
|
20
|
+
const handledDomain = urlDomain ? `.${urlDomain}` : '';
|
|
21
|
+
this.cookieService.delete(name, '/', handledDomain, true, 'None');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
MonkeyEcxCookieStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxCookieStorageService, deps: [{ token: i1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
MonkeyEcxCookieStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxCookieStorageService, providedIn: 'root' });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxCookieStorageService, decorators: [{
|
|
27
|
+
type: Injectable,
|
|
28
|
+
args: [{
|
|
29
|
+
providedIn: 'root'
|
|
30
|
+
}]
|
|
31
|
+
}], ctorParameters: function () { return [{ type: i1.CookieService }]; } });
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LWNvb2tpZS1zdG9yYWdlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9tb25rZXktZnJvbnQtY29yZS9zcmMvbGliL2NvcmUvc2VydmljZXMvc3RvcmFnZS9tb25rZXllY3gtY29va2llLXN0b3JhZ2Uuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7QUFNM0MsTUFBTSxPQUFPLDZCQUE2QjtJQUN4QyxZQUFvQixhQUE0QjtRQUE1QixrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQUM5QyxZQUFZO0lBQ2QsQ0FBQztJQUVNLFNBQVMsQ0FBQyxJQUFZLEVBQUUsS0FBVSxFQUFFLFdBQWdCO1FBQ3pELElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFLFdBQVcsQ0FBQyxDQUFDO1FBQ3JDLE1BQU0sRUFBRSxTQUFTLEVBQUUsR0FBRyxXQUFXLENBQUM7UUFDbEMsTUFBTSxhQUFhLEdBQUcsU0FBUyxDQUFDLENBQUMsQ0FBQyxJQUFJLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUM7UUFDdkQsSUFBSSxDQUFDLGFBQWEsQ0FBQyxHQUFHLENBQUMsSUFBSSxFQUFFLEtBQUssRUFBRSxTQU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vb2tpZShuYW1lOiBzdHJpbmcsIHZhbHVlOiBhbnksIGVudmlyb25tZW50OiBhbnkpIHtcbiAgICB0aGlzLnJlbW92ZUNvb2tpZShuYW1lLCBlbnZpcm9ubWVudCk7XG4gICAgY29uc3QgeyB1cmxEb21haW4gfSA9IGVudmlyb25tZW50O1xuICAgIGNvbnN0IGhhbmRsZWREb21haW4gPSB1cmxEb21haW4gPyBgLiR7dXJsRG9tYWlufWAgOiAnJztcbiAgICB0aGlzLmNvb2tpZVNlcnZpY2Uuc2V0KG5hbWUsIHZhbHVlLCB1bmRlZmluZWQsICcvJywgaGFuZGxlZERvbWFpbiwgdHJ1ZSwgJ05vbmUnKTtcbiAgfVxuXG4gIHB1YmxpYyBnZXRDb29raWUobmFtZTogc3RyaW5nKSB7XG4gICAgcmV0dXJuIHRoaXMuY29va2llU2VydmljZS5nZXQobmFtZSk7XG4gIH1cblxuICBwdWJsaWMgcmVtb3ZlQ29va2llKG5hbWU6IHN0cmluZywgZW52aXJvbm1lbnQ6IGFueSkge1xuICAgIGNvbnN0IHsgdXJsRG9tYWluIH0gPSBlbnZpcm9ubWVudDtcbiAgICBjb25zdCBoYW5kbGVkRG9tYWluID0gdXJsRG9tYWluID8gYC4ke3VybERvbWFpbn1gIDogJyc7XG4gICAgdGhpcy5jb29raWVTZXJ2aWNlLmRlbGV0ZShuYW1lLCAnLycsIGhhbmRsZWREb21haW4sIHRydWUsICdOb25lJyk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,237 +1,237 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject, of } from 'rxjs';
|
|
3
|
-
import { take } from 'rxjs/operators';
|
|
4
|
-
import { actions, selectors } from '../../../store';
|
|
5
|
-
import { MonkeyEcxUtils } from '../../utils/utils';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "../config/monkeyecx-config.service";
|
|
8
|
-
import * as i2 from "@ngrx/store";
|
|
9
|
-
export class MonkeyEcxTokenStorageService {
|
|
10
|
-
constructor(monkeyecxConfigService, store) {
|
|
11
|
-
this.monkeyecxConfigService = monkeyecxConfigService;
|
|
12
|
-
this.store = store;
|
|
13
|
-
this.token = {
|
|
14
|
-
username: '',
|
|
15
|
-
program: '',
|
|
16
|
-
accessToken: '',
|
|
17
|
-
refreshToken: '',
|
|
18
|
-
companyId: '',
|
|
19
|
-
governmentId: '',
|
|
20
|
-
companyTypeUrl: '',
|
|
21
|
-
companyType: '',
|
|
22
|
-
programAdmin: false,
|
|
23
|
-
programType: '',
|
|
24
|
-
accessType: '',
|
|
25
|
-
role: '',
|
|
26
|
-
ownerGovernmentId: '',
|
|
27
|
-
name: '',
|
|
28
|
-
_clearIgnore: {
|
|
29
|
-
ignore: ['username', 'program', 'accessType']
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
this.token$ = new BehaviorSubject(null);
|
|
33
|
-
this.me$ = new BehaviorSubject(null);
|
|
34
|
-
}
|
|
35
|
-
setAllTokens(token) {
|
|
36
|
-
const { token$, store } = this;
|
|
37
|
-
// #TODO - Remover esse código e apenas deixar o username
|
|
38
|
-
// todo o restante ficou salvo na store com a keu sendo o username
|
|
39
|
-
Object.entries(token).forEach(([key, value]) => {
|
|
40
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
41
|
-
localStorage.setItem(key, value);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
const username = token.username || localStorage.getItem('username');
|
|
45
|
-
if (username) {
|
|
46
|
-
store.dispatch(actions.monkeyecxStorage.create({
|
|
47
|
-
data: [
|
|
48
|
-
{
|
|
49
|
-
username,
|
|
50
|
-
...token
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
token$.next(token);
|
|
56
|
-
}
|
|
57
|
-
async getAllTokens() {
|
|
58
|
-
try {
|
|
59
|
-
const { store, monkeyecxConfigService } = this;
|
|
60
|
-
const username = localStorage.getItem('username');
|
|
61
|
-
let data = {
|
|
62
|
-
username: username || '',
|
|
63
|
-
program: '',
|
|
64
|
-
accessToken: ''
|
|
65
|
-
};
|
|
66
|
-
if (username) {
|
|
67
|
-
data = await store.select(selectors.monkeyecxStorage.select({ username })).pipe(take(1)).toPromise();
|
|
68
|
-
if (!data?.program) {
|
|
69
|
-
const program = localStorage.getItem('program');
|
|
70
|
-
data = {
|
|
71
|
-
...data,
|
|
72
|
-
program
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
const config = await monkeyecxConfigService.config()
|
|
77
|
-
.pipe(take(1)).toPromise();
|
|
78
|
-
const accessType = localStorage.getItem('accessType');
|
|
79
|
-
const companyType = localStorage.getItem('companyType');
|
|
80
|
-
if (!data.accessToken) {
|
|
81
|
-
const accessToken = localStorage.getItem('accessToken');
|
|
82
|
-
const refreshToken = localStorage.getItem('refreshToken');
|
|
83
|
-
data = {
|
|
84
|
-
...data,
|
|
85
|
-
accessToken,
|
|
86
|
-
refreshToken
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
if (!data.role) {
|
|
90
|
-
const role = localStorage.getItem('role');
|
|
91
|
-
data = {
|
|
92
|
-
...data,
|
|
93
|
-
role
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
const handledData = {
|
|
97
|
-
...data,
|
|
98
|
-
accessType,
|
|
99
|
-
companyType
|
|
100
|
-
};
|
|
101
|
-
if (!data?.program && config?.program) {
|
|
102
|
-
handledData.program = config?.program?.token;
|
|
103
|
-
}
|
|
104
|
-
delete handledData?.me;
|
|
105
|
-
return handledData;
|
|
106
|
-
}
|
|
107
|
-
catch (e) {
|
|
108
|
-
// not to do
|
|
109
|
-
}
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
setAllMe(me) {
|
|
113
|
-
const { me$, store } = this;
|
|
114
|
-
let previousMe = JSON.parse(localStorage?.getItem('me') || '{}');
|
|
115
|
-
Object.entries(me).forEach(([key, value]) => {
|
|
116
|
-
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
117
|
-
previousMe = {
|
|
118
|
-
...previousMe,
|
|
119
|
-
[key]: value
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
const username = me.username || localStorage.getItem('username');
|
|
124
|
-
if (username) {
|
|
125
|
-
store.dispatch(actions.monkeyecxStorage.create({
|
|
126
|
-
data: [
|
|
127
|
-
{
|
|
128
|
-
username,
|
|
129
|
-
me
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
}));
|
|
133
|
-
}
|
|
134
|
-
localStorage.setItem('me', JSON.stringify(previousMe));
|
|
135
|
-
me$.next(previousMe);
|
|
136
|
-
}
|
|
137
|
-
async getAllMe() {
|
|
138
|
-
const { store } = this;
|
|
139
|
-
const username = localStorage.getItem('username');
|
|
140
|
-
let data = {
|
|
141
|
-
username: username || '',
|
|
142
|
-
program: ''
|
|
143
|
-
};
|
|
144
|
-
if (username) {
|
|
145
|
-
data = await store.select(selectors.monkeyecxStorage.select({ username })).pipe(take(1)).toPromise();
|
|
146
|
-
}
|
|
147
|
-
let handledData = {
|
|
148
|
-
...data
|
|
149
|
-
};
|
|
150
|
-
if (!handledData.me) {
|
|
151
|
-
try {
|
|
152
|
-
handledData = {
|
|
153
|
-
me: JSON.parse(localStorage.getItem('me') || '{}')
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
catch (e) {
|
|
157
|
-
// not to do
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return handledData?.me;
|
|
161
|
-
}
|
|
162
|
-
tokenHasChanged() {
|
|
163
|
-
return this.token$.asObservable();
|
|
164
|
-
}
|
|
165
|
-
meHasChanged() {
|
|
166
|
-
return this.me$.asObservable() || null;
|
|
167
|
-
}
|
|
168
|
-
async getToken() {
|
|
169
|
-
return this.getAllTokens();
|
|
170
|
-
}
|
|
171
|
-
async getMe() {
|
|
172
|
-
return this.getAllMe();
|
|
173
|
-
}
|
|
174
|
-
setToken(token) {
|
|
175
|
-
this.setAllTokens(token);
|
|
176
|
-
}
|
|
177
|
-
setMe(me) {
|
|
178
|
-
this.setAllMe(me);
|
|
179
|
-
}
|
|
180
|
-
clear(force) {
|
|
181
|
-
const { token, store } = this;
|
|
182
|
-
try {
|
|
183
|
-
Object.entries(token || {}).forEach(([key, value]) => {
|
|
184
|
-
if ((token?._clearIgnore?.ignore || []).filter((val) => {
|
|
185
|
-
return val === key;
|
|
186
|
-
}).length <= 0 ||
|
|
187
|
-
force === true) {
|
|
188
|
-
localStorage.removeItem(key);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
localStorage.removeItem('me');
|
|
192
|
-
localStorage.removeItem('mecx-store');
|
|
193
|
-
const username = localStorage.getItem('username');
|
|
194
|
-
if (username) {
|
|
195
|
-
store.dispatch(actions.monkeyecxStorage.deleteOne({ data: { username } }));
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
catch (error) {
|
|
199
|
-
return of(false);
|
|
200
|
-
}
|
|
201
|
-
return of(true);
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* @param fields (the name of fields you want to clear. ie: ['companyId', 'role', ...])
|
|
205
|
-
*/
|
|
206
|
-
clearCredentials(fields = ['companyId', 'governmentId', 'companyType', 'programAdmin', 'role']) {
|
|
207
|
-
const { store } = this;
|
|
208
|
-
let obj = null;
|
|
209
|
-
fields?.forEach((key) => {
|
|
210
|
-
obj = {
|
|
211
|
-
...obj,
|
|
212
|
-
[key]: null
|
|
213
|
-
};
|
|
214
|
-
localStorage.removeItem(key);
|
|
215
|
-
});
|
|
216
|
-
const username = localStorage.getItem('username');
|
|
217
|
-
if (username) {
|
|
218
|
-
store.dispatch(actions.monkeyecxStorage.create({
|
|
219
|
-
data: [
|
|
220
|
-
{
|
|
221
|
-
username,
|
|
222
|
-
...obj
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}));
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
MonkeyEcxTokenStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTokenStorageService, deps: [{ token: i1.MonkeyEcxConfigService }, { token: i2.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
230
|
-
MonkeyEcxTokenStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTokenStorageService, providedIn: 'root' });
|
|
231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTokenStorageService, decorators: [{
|
|
232
|
-
type: Injectable,
|
|
233
|
-
args: [{
|
|
234
|
-
providedIn: 'root'
|
|
235
|
-
}]
|
|
236
|
-
}], ctorParameters: function () { return [{ type: i1.MonkeyEcxConfigService }, { type: i2.Store }]; } });
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, of } from 'rxjs';
|
|
3
|
+
import { take } from 'rxjs/operators';
|
|
4
|
+
import { actions, selectors } from '../../../store';
|
|
5
|
+
import { MonkeyEcxUtils } from '../../utils/utils';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../config/monkeyecx-config.service";
|
|
8
|
+
import * as i2 from "@ngrx/store";
|
|
9
|
+
export class MonkeyEcxTokenStorageService {
|
|
10
|
+
constructor(monkeyecxConfigService, store) {
|
|
11
|
+
this.monkeyecxConfigService = monkeyecxConfigService;
|
|
12
|
+
this.store = store;
|
|
13
|
+
this.token = {
|
|
14
|
+
username: '',
|
|
15
|
+
program: '',
|
|
16
|
+
accessToken: '',
|
|
17
|
+
refreshToken: '',
|
|
18
|
+
companyId: '',
|
|
19
|
+
governmentId: '',
|
|
20
|
+
companyTypeUrl: '',
|
|
21
|
+
companyType: '',
|
|
22
|
+
programAdmin: false,
|
|
23
|
+
programType: '',
|
|
24
|
+
accessType: '',
|
|
25
|
+
role: '',
|
|
26
|
+
ownerGovernmentId: '',
|
|
27
|
+
name: '',
|
|
28
|
+
_clearIgnore: {
|
|
29
|
+
ignore: ['username', 'program', 'accessType']
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.token$ = new BehaviorSubject(null);
|
|
33
|
+
this.me$ = new BehaviorSubject(null);
|
|
34
|
+
}
|
|
35
|
+
setAllTokens(token) {
|
|
36
|
+
const { token$, store } = this;
|
|
37
|
+
// #TODO - Remover esse código e apenas deixar o username
|
|
38
|
+
// todo o restante ficou salvo na store com a keu sendo o username
|
|
39
|
+
Object.entries(token).forEach(([key, value]) => {
|
|
40
|
+
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
41
|
+
localStorage.setItem(key, value);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const username = token.username || localStorage.getItem('username');
|
|
45
|
+
if (username) {
|
|
46
|
+
store.dispatch(actions.monkeyecxStorage.create({
|
|
47
|
+
data: [
|
|
48
|
+
{
|
|
49
|
+
username,
|
|
50
|
+
...token
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
token$.next(token);
|
|
56
|
+
}
|
|
57
|
+
async getAllTokens() {
|
|
58
|
+
try {
|
|
59
|
+
const { store, monkeyecxConfigService } = this;
|
|
60
|
+
const username = localStorage.getItem('username');
|
|
61
|
+
let data = {
|
|
62
|
+
username: username || '',
|
|
63
|
+
program: '',
|
|
64
|
+
accessToken: ''
|
|
65
|
+
};
|
|
66
|
+
if (username) {
|
|
67
|
+
data = await store.select(selectors.monkeyecxStorage.select({ username })).pipe(take(1)).toPromise();
|
|
68
|
+
if (!data?.program) {
|
|
69
|
+
const program = localStorage.getItem('program');
|
|
70
|
+
data = {
|
|
71
|
+
...data,
|
|
72
|
+
program
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const config = await monkeyecxConfigService.config()
|
|
77
|
+
.pipe(take(1)).toPromise();
|
|
78
|
+
const accessType = localStorage.getItem('accessType');
|
|
79
|
+
const companyType = localStorage.getItem('companyType');
|
|
80
|
+
if (!data.accessToken) {
|
|
81
|
+
const accessToken = localStorage.getItem('accessToken');
|
|
82
|
+
const refreshToken = localStorage.getItem('refreshToken');
|
|
83
|
+
data = {
|
|
84
|
+
...data,
|
|
85
|
+
accessToken,
|
|
86
|
+
refreshToken
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (!data.role) {
|
|
90
|
+
const role = localStorage.getItem('role');
|
|
91
|
+
data = {
|
|
92
|
+
...data,
|
|
93
|
+
role
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const handledData = {
|
|
97
|
+
...data,
|
|
98
|
+
accessType,
|
|
99
|
+
companyType
|
|
100
|
+
};
|
|
101
|
+
if (!data?.program && config?.program) {
|
|
102
|
+
handledData.program = config?.program?.token;
|
|
103
|
+
}
|
|
104
|
+
delete handledData?.me;
|
|
105
|
+
return handledData;
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
// not to do
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
setAllMe(me) {
|
|
113
|
+
const { me$, store } = this;
|
|
114
|
+
let previousMe = JSON.parse(localStorage?.getItem('me') || '{}');
|
|
115
|
+
Object.entries(me).forEach(([key, value]) => {
|
|
116
|
+
if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
117
|
+
previousMe = {
|
|
118
|
+
...previousMe,
|
|
119
|
+
[key]: value
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
const username = me.username || localStorage.getItem('username');
|
|
124
|
+
if (username) {
|
|
125
|
+
store.dispatch(actions.monkeyecxStorage.create({
|
|
126
|
+
data: [
|
|
127
|
+
{
|
|
128
|
+
username,
|
|
129
|
+
me
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
localStorage.setItem('me', JSON.stringify(previousMe));
|
|
135
|
+
me$.next(previousMe);
|
|
136
|
+
}
|
|
137
|
+
async getAllMe() {
|
|
138
|
+
const { store } = this;
|
|
139
|
+
const username = localStorage.getItem('username');
|
|
140
|
+
let data = {
|
|
141
|
+
username: username || '',
|
|
142
|
+
program: ''
|
|
143
|
+
};
|
|
144
|
+
if (username) {
|
|
145
|
+
data = await store.select(selectors.monkeyecxStorage.select({ username })).pipe(take(1)).toPromise();
|
|
146
|
+
}
|
|
147
|
+
let handledData = {
|
|
148
|
+
...data
|
|
149
|
+
};
|
|
150
|
+
if (!handledData.me) {
|
|
151
|
+
try {
|
|
152
|
+
handledData = {
|
|
153
|
+
me: JSON.parse(localStorage.getItem('me') || '{}')
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
// not to do
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return handledData?.me;
|
|
161
|
+
}
|
|
162
|
+
tokenHasChanged() {
|
|
163
|
+
return this.token$.asObservable();
|
|
164
|
+
}
|
|
165
|
+
meHasChanged() {
|
|
166
|
+
return this.me$.asObservable() || null;
|
|
167
|
+
}
|
|
168
|
+
async getToken() {
|
|
169
|
+
return this.getAllTokens();
|
|
170
|
+
}
|
|
171
|
+
async getMe() {
|
|
172
|
+
return this.getAllMe();
|
|
173
|
+
}
|
|
174
|
+
setToken(token) {
|
|
175
|
+
this.setAllTokens(token);
|
|
176
|
+
}
|
|
177
|
+
setMe(me) {
|
|
178
|
+
this.setAllMe(me);
|
|
179
|
+
}
|
|
180
|
+
clear(force) {
|
|
181
|
+
const { token, store } = this;
|
|
182
|
+
try {
|
|
183
|
+
Object.entries(token || {}).forEach(([key, value]) => {
|
|
184
|
+
if ((token?._clearIgnore?.ignore || []).filter((val) => {
|
|
185
|
+
return val === key;
|
|
186
|
+
}).length <= 0 ||
|
|
187
|
+
force === true) {
|
|
188
|
+
localStorage.removeItem(key);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
localStorage.removeItem('me');
|
|
192
|
+
localStorage.removeItem('mecx-store');
|
|
193
|
+
const username = localStorage.getItem('username');
|
|
194
|
+
if (username) {
|
|
195
|
+
store.dispatch(actions.monkeyecxStorage.deleteOne({ data: { username } }));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
return of(false);
|
|
200
|
+
}
|
|
201
|
+
return of(true);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @param fields (the name of fields you want to clear. ie: ['companyId', 'role', ...])
|
|
205
|
+
*/
|
|
206
|
+
clearCredentials(fields = ['companyId', 'governmentId', 'companyType', 'programAdmin', 'role']) {
|
|
207
|
+
const { store } = this;
|
|
208
|
+
let obj = null;
|
|
209
|
+
fields?.forEach((key) => {
|
|
210
|
+
obj = {
|
|
211
|
+
...obj,
|
|
212
|
+
[key]: null
|
|
213
|
+
};
|
|
214
|
+
localStorage.removeItem(key);
|
|
215
|
+
});
|
|
216
|
+
const username = localStorage.getItem('username');
|
|
217
|
+
if (username) {
|
|
218
|
+
store.dispatch(actions.monkeyecxStorage.create({
|
|
219
|
+
data: [
|
|
220
|
+
{
|
|
221
|
+
username,
|
|
222
|
+
...obj
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
MonkeyEcxTokenStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTokenStorageService, deps: [{ token: i1.MonkeyEcxConfigService }, { token: i2.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
230
|
+
MonkeyEcxTokenStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTokenStorageService, providedIn: 'root' });
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTokenStorageService, decorators: [{
|
|
232
|
+
type: Injectable,
|
|
233
|
+
args: [{
|
|
234
|
+
providedIn: 'root'
|
|
235
|
+
}]
|
|
236
|
+
}], ctorParameters: function () { return [{ type: i1.MonkeyEcxConfigService }, { type: i2.Store }]; } });
|
|
237
237
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ua2V5ZWN4LXRva2VuLXN0b3JhZ2Uuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21vbmtleS1mcm9udC1jb3JlL3NyYy9saWIvY29yZS9zZXJ2aWNlcy9zdG9yYWdlL21vbmtleWVjeC10b2tlbi1zdG9yYWdlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUUsZUFBZSxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN2RCxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDdEMsT0FBTyxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQU1wRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7Ozs7QUFNbkQsTUFBTSxPQUFPLDRCQUE0QjtJQU92QyxZQUNVLHNCQUE4QyxFQUM5QyxLQUFZO1FBRFosMkJBQXNCLEdBQXRCLHNCQUFzQixDQUF3QjtRQUM5QyxVQUFLLEdBQUwsS0FBSyxDQUFPO1FBRXBCLElBQUksQ0FBQyxLQUFLLEdBQUc7WUFDWCxRQUFRLEVBQUUsRUFBRTtZQ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m1vbmtleWVjeFN0b3JhZ2UuY3JlYXRlKHtcbiAgICAgICAgICBkYXRhOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHVzZXJuYW1lLFxuICAgICAgICAgICAgICAuLi50b2tlblxuICAgICAgICAgICAgfVxuICAgICAgICAgIF1cbiAgICAgICAgfSlcbiAgICAgICk7XG4gICAgfVxuXG4gICAgdG9rZW4kLm5leHQodG9rZW4pO1xuICB9XG5cbiAgcHJpdmF0ZSBhc3luYyBnZXRBbGxUb2tlbnMoKSB7XG4gICAgdHJ5IHtcbiAgICAgIGNvbnN0IHsgc3RvcmUsIG1vbmtleWVjeENvbmZpZ1NlcnZpY2UgfSA9IHRoaXM7XG4gICAgICBjb25zdCB1c2VybmFtZSA9IGxvY2FsU3RvcmFnZS5nZXRJdGVtKCd1c2VybmFtZScpO1xuXG4gICAgICBsZXQgZGF0YTogYW55ID0ge1xuICAgICAgICB1c2VybmFtZTogdXNlcm5hbWUgfHwgJycsXG4gICAgICAgIHByb2dyYW06ICcnLFxuICAgICAgICBhY2Nlc3NUb2tlbjogJydcbiAgICAgIH07XG5cbiAgICAgIGlmICh1c2VybmFtZSkge1xuICAgICAgICBkYXRhID0gYXdhaXQgc3RvcmUuc2VsZWN0KFxuICAgICAgICAgIHNlbGVjdG9ycy5tb25rZXllY3hTdG9yYWdlLnNlbGVjdCh7IHVzZXJuYW1lIH0pXG4gICAgICAgICkucGlwZSh0YWtlKDEpKS50b1Byb21pc2UoKTtcbiAgICAgICAgaWYgKCFkYXRhPy5wcm9ncmFtKSB7XG4gICAgICAgICAgY29uc3QgcHJvZ3JhbSA9IGxvY2FsU3RvcmFnZS5nZXRJdGVtKCdwcm9ncmFtJyk7XG4gICAgICAgICAgZGF0YSA9IHtcbiAgICAgICAgICAgIC4uLmRhdGEsXG4gICAgICAgICAgICBwcm9ncmFtXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBjb25zdCBjb25maWcgPSBhd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udG9rZW47XG4gICAgICB9XG4gICAgICBkZWxldGUgaGFuZGxlZERhdGE/Lm1lO1xuXG4gICAgICByZXR1cm4gaGFuZGxlZERhdGE7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgLy8gbm90IHRvIGRvXG4gICAgfVxuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgcHJpdmF0ZSBzZXRBbGxNZShtZTogTW9ua2V5RWN4TWVDcmVkZW50aWFscykge1xuICAgIGNvbnN0IHsgbWUkLCBzdG9yZSB9ID0gdGhpcztcbiAgICBsZXQgcHJldmlvdXNNZSA9IEpTT04ucGFyc2UobG9jYWxTdG9yYWdlPy5nZXRJdGVtKCdtZScpIHx8ICd7fScpO1xuICAgIE9iamVjdC5lbnRyaWVzKG1lKS5mb3JFYWNoKChba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgIGlmIChNb25rZXlFY3hVdGlscy5wZXJzaXN0TnVsbEVtcHR5VW5kZWZpbmVkKHZhbHVlKSkge1xuICAgICAgICBwcmV2aW91c01lID0ge1xuICAgICAgICAgIC4uLnByZXZpb3VzTWUsXG4gICAgICAgICAgW2tleV06IHZhbHVlXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICBjb25zdCB1c2VybmFtZSA9IG1lLnVzZXJuYW1lIHx8IGxvY2FsU3RvcmFnZS5nZXRJdGVtKCd1c2VybmFtZScpO1xuICAgIGlmICh1c2VybmFtZSkge1xuICAgICAgc3RvcmUuZGlzcGF0Y2goXG4gICAgICAgIGFjdGlvbnMubW9ua2V5ZWN4U3RvcmFnZS5jcmVhdGUoe1xuICAgICAgICAgIGRhdGE6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdXNlcm5hbWUsXG4gICAgICAgICAgICAgIG1lXG4gICAgICAgICAgICB9XG4gICAgICAgICAgXVxuICAgICAgICB9KVxuICAgICAgKTtcbiAgICB9XG5cbiAgICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbSgnbWU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IHVzZXJuYW1lID0gbG9jYWxTdG9yYWdlLmdldEl0ZW0oJ3VzZXJuYW1lJyk7XG4gICAgaWYgKHVzZXJuYW1lKSB7XG4gICAgICBzdG9yZS5kaXNwYXRjaChcbiAgICAgICAgYWN0aW9ucy5tb25rZXllY3hTdG9yYWdlLmNyZWF0ZSh7XG4gICAgICAgICAgZGF0YTogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB1c2VybmFtZSxcbiAgICAgICAgICAgICAgLi4ub2JqXG4gICAgICAgICAgICB9XG4gICAgICAgICAgXVxuICAgICAgICB9KVxuICAgICAgKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './monkeyecx-store-base.service';
|
|
2
|
-
export * from './monkeyecx-store.actions';
|
|
3
|
-
export * from './monkeyecx-store.selector';
|
|
4
|
-
export * from './monkeyecx-store.service';
|
|
1
|
+
export * from './monkeyecx-store-base.service';
|
|
2
|
+
export * from './monkeyecx-store.actions';
|
|
3
|
+
export * from './monkeyecx-store.selector';
|
|
4
|
+
export * from './monkeyecx-store.service';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9tb25rZXktZnJvbnQtY29yZS9zcmMvbGliL2NvcmUvc2VydmljZXMvc3RvcmUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYywyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbW9ua2V5ZWN4LXN0b3JlLWJhc2Uuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL21vbmtleWVjeC1zdG9yZS5hY3Rpb25zJztcbmV4cG9ydCAqIGZyb20gJy4vbW9ua2V5ZWN4LXN0b3JlLnNlbGVjdG9yJztcbmV4cG9ydCAqIGZyb20gJy4vbW9ua2V5ZWN4LXN0b3JlLnNlcnZpY2UnO1xuIl19
|