aril 0.0.46 → 0.0.48
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/boot/config/api/{index.ts → index.d.ts} +1 -1
- package/boot/config/api/src/api.service.d.ts +14 -0
- package/boot/config/api/src/interfaces.d.ts +9 -0
- package/boot/config/apps/{index.ts → index.d.ts} +2 -2
- package/boot/config/apps/src/apps.service.d.ts +16 -0
- package/boot/config/apps/src/interfaces.d.ts +23 -0
- package/boot/config/apps/src/showdowDOMWrapper.d.ts +10 -0
- package/boot/config/plugins/{index.ts → index.d.ts} +2 -2
- package/boot/config/plugins/src/getNgZone.d.ts +5 -0
- package/boot/config/plugins/src/interfaces.d.ts +18 -0
- package/boot/config/plugins/src/plugins.service.d.ts +9 -0
- package/boot/host/{index.ts → index.d.ts} +1 -1
- package/boot/host/src/app.component.d.ts +8 -0
- package/boot/host/src/bootstrap.d.ts +2 -0
- package/boot/index.d.ts +1 -0
- package/boot/mfe/{index.ts → index.d.ts} +1 -1
- package/boot/mfe/src/app.component.d.ts +12 -0
- package/boot/mfe/src/appComponentLoader.d.ts +1 -0
- package/boot/mfe/src/bootstrap.d.ts +6 -0
- package/boot/mfe/src/loadStyles.d.ts +3 -0
- package/esm2022/aril.mjs +5 -0
- package/esm2022/boot/aril-boot.mjs +5 -0
- package/esm2022/boot/config/api/aril-boot-config-api.mjs +5 -0
- package/esm2022/boot/config/api/index.mjs +2 -0
- package/esm2022/boot/config/api/src/api.service.mjs +42 -0
- package/esm2022/boot/config/api/src/interfaces.mjs +11 -0
- package/esm2022/boot/config/apps/aril-boot-config-apps.mjs +5 -0
- package/esm2022/boot/config/apps/index.mjs +3 -0
- package/esm2022/boot/config/apps/src/apps.service.mjs +51 -0
- package/esm2022/boot/config/apps/src/interfaces.mjs +17 -0
- package/esm2022/boot/config/apps/src/showdowDOMWrapper.mjs +35 -0
- package/esm2022/boot/config/plugins/aril-boot-config-plugins.mjs +5 -0
- package/esm2022/boot/config/plugins/index.mjs +3 -0
- package/esm2022/boot/config/plugins/src/getNgZone.mjs +12 -0
- package/esm2022/boot/config/plugins/src/interfaces.mjs +3 -0
- package/esm2022/boot/config/plugins/src/plugins.service.mjs +65 -0
- package/esm2022/boot/host/aril-boot-host.mjs +5 -0
- package/esm2022/boot/host/index.mjs +2 -0
- package/esm2022/boot/host/src/app.component.mjs +32 -0
- package/esm2022/boot/host/src/bootstrap.mjs +50 -0
- package/esm2022/boot/index.mjs +2 -0
- package/esm2022/boot/mfe/aril-boot-mfe.mjs +5 -0
- package/esm2022/boot/mfe/index.mjs +2 -0
- package/esm2022/boot/mfe/src/app.component.mjs +60 -0
- package/esm2022/boot/mfe/src/appComponentLoader.mjs +5 -0
- package/esm2022/boot/mfe/src/bootstrap.mjs +64 -0
- package/esm2022/boot/mfe/src/loadStyles.mjs +16 -0
- package/esm2022/http/aril-http.mjs +5 -0
- package/esm2022/http/index.mjs +12 -0
- package/esm2022/http/lib/enums.mjs +16 -0
- package/esm2022/http/lib/interfaces.mjs +15 -0
- package/esm2022/http/src/httpBackend.mjs +17 -0
- package/esm2022/http/src/httpClient.mjs +14 -0
- package/esm2022/http/src/interceptor/state-machine.interceptor.mjs +8 -0
- package/esm2022/http/src/serviceBase.mjs +60 -0
- package/esm2022/http/src/serviceMockBase.mjs +5 -0
- package/esm2022/http/src/serviceRequest.mjs +21 -0
- package/esm2022/http/src/serviceStateMethods.mjs +118 -0
- package/esm2022/i18n/aril-i18n.mjs +5 -0
- package/esm2022/i18n/index.mjs +6 -0
- package/esm2022/i18n/src/folder-name-token.mjs +3 -0
- package/esm2022/i18n/src/i18n.module.mjs +17 -0
- package/esm2022/i18n/src/loader.mjs +20 -0
- package/esm2022/i18n/src/provideI18n.mjs +16 -0
- package/esm2022/i18n/src/provideScope.mjs +18 -0
- package/esm2022/keycloak/aril-keycloak.mjs +5 -0
- package/esm2022/keycloak/index.mjs +4 -0
- package/esm2022/keycloak/src/auth.guard.mjs +39 -0
- package/esm2022/keycloak/src/auth.interceptor.mjs +10 -0
- package/esm2022/keycloak/src/keycloak.manager.mjs +76 -0
- package/esm2022/public-api.mjs +3 -0
- package/esm2022/theme/aril-theme.mjs +5 -0
- package/esm2022/theme/index.mjs +2 -0
- package/esm2022/theme/layout/app/breadcrumb/app.breadcrumb.component.mjs +41 -0
- package/esm2022/theme/layout/app/config/app.config.component.mjs +132 -0
- package/esm2022/theme/layout/app/layout/app.layout.component.mjs +147 -0
- package/esm2022/theme/layout/app/layout/mfe.layout.component.mjs +67 -0
- package/esm2022/theme/layout/app/menu/app.menu.component.mjs +398 -0
- package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +28 -0
- package/esm2022/theme/layout/app/sidebar/app.sidebar.component.mjs +41 -0
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +34 -0
- package/esm2022/theme/layout/aril-theme-layout.mjs +5 -0
- package/esm2022/theme/layout/index.mjs +4 -0
- package/esm2022/theme/layout/service/app.layout.service.mjs +127 -0
- package/esm2022/theme/layout/service/app.menu.service.mjs +53 -0
- package/esm2022/theme/layout/service/menuchangeevent.mjs +2 -0
- package/esm2022/ui/aril-ui.mjs +5 -0
- package/esm2022/ui/autoComplete/aril-ui-autoComplete.mjs +5 -0
- package/esm2022/ui/autoComplete/index.mjs +2 -0
- package/esm2022/ui/autoComplete/src/auto-complete.component.mjs +81 -0
- package/esm2022/ui/autoComplete/src/interfaces.mjs +2 -0
- package/esm2022/ui/badge/aril-ui-badge.mjs +5 -0
- package/esm2022/ui/badge/index.mjs +2 -0
- package/esm2022/ui/badge/src/badge.component.mjs +19 -0
- package/esm2022/ui/button/aril-ui-button.mjs +5 -0
- package/esm2022/ui/button/index.mjs +3 -0
- package/esm2022/ui/button/src/button.component.mjs +37 -0
- package/esm2022/ui/button/src/split-button.component.mjs +18 -0
- package/esm2022/ui/calendar/aril-ui-calendar.mjs +5 -0
- package/esm2022/ui/calendar/index.mjs +2 -0
- package/esm2022/ui/calendar/src/calendar.component.mjs +119 -0
- package/esm2022/ui/checkbox/aril-ui-checkbox.mjs +5 -0
- package/esm2022/ui/checkbox/index.mjs +3 -0
- package/esm2022/ui/checkbox/src/check-box.component.mjs +24 -0
- package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +24 -0
- package/esm2022/ui/dxField/aril-ui-dxField.mjs +5 -0
- package/esm2022/ui/dxField/index.mjs +2 -0
- package/esm2022/ui/dxField/src/dx-field.component.mjs +18 -0
- package/esm2022/ui/field/aril-ui-field.mjs +5 -0
- package/esm2022/ui/field/index.mjs +2 -0
- package/esm2022/ui/field/src/field.component.mjs +39 -0
- package/esm2022/ui/fileUpload/aril-ui-fileUpload.mjs +5 -0
- package/esm2022/ui/fileUpload/index.mjs +2 -0
- package/esm2022/ui/fileUpload/src/file-upload.component.mjs +61 -0
- package/esm2022/ui/form/aril-ui-form.mjs +5 -0
- package/esm2022/ui/form/index.mjs +22 -0
- package/esm2022/ui/form/src/form-submit-button.component.mjs +40 -0
- package/esm2022/ui/form/src/form.component.mjs +27 -0
- package/esm2022/ui/index.mjs +2 -0
- package/esm2022/ui/lib/aril-ui-lib.mjs +5 -0
- package/esm2022/ui/lib/index.mjs +15 -0
- package/esm2022/ui/lib/src/form/form-error-message.component.mjs +33 -0
- package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +34 -0
- package/esm2022/ui/lib/src/form/form-field-builder.mjs +23 -0
- package/esm2022/ui/lib/src/form/form-validation.mjs +14 -0
- package/esm2022/ui/lib/src/grid/flex-grid.directive.mjs +21 -0
- package/esm2022/ui/lib/src/input/baseInput.mjs +24 -0
- package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +49 -0
- package/esm2022/ui/lib/src/input/dx-input-error-message.pipe.mjs +22 -0
- package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +25 -0
- package/esm2022/ui/lib/src/input/input-error-message.pipe.mjs +42 -0
- package/esm2022/ui/lib/src/input/input-transforms.mjs +8 -0
- package/esm2022/ui/lib/src/input/value-accessor.directive.mjs +38 -0
- package/esm2022/ui/mask/aril-ui-mask.mjs +5 -0
- package/esm2022/ui/mask/index.mjs +2 -0
- package/esm2022/ui/mask/src/mask.component.mjs +35 -0
- package/esm2022/ui/number/aril-ui-number.mjs +5 -0
- package/esm2022/ui/number/index.mjs +2 -0
- package/esm2022/ui/number/src/number.component.mjs +36 -0
- package/esm2022/ui/overlayPanel/aril-ui-overlayPanel.mjs +5 -0
- package/esm2022/ui/overlayPanel/index.mjs +2 -0
- package/esm2022/ui/overlayPanel/src/overlay-panel.component.mjs +20 -0
- package/esm2022/ui/panel/aril-ui-panel.mjs +5 -0
- package/esm2022/ui/panel/index.mjs +2 -0
- package/esm2022/ui/panel/src/panel.component.mjs +24 -0
- package/esm2022/ui/password/aril-ui-password.mjs +5 -0
- package/esm2022/ui/password/index.mjs +2 -0
- package/esm2022/ui/password/src/password.component.mjs +29 -0
- package/esm2022/ui/radioButton/aril-ui-radioButton.mjs +5 -0
- package/esm2022/ui/radioButton/index.mjs +2 -0
- package/esm2022/ui/radioButton/src/radio-button.component.mjs +30 -0
- package/esm2022/ui/selectBox/aril-ui-selectBox.mjs +5 -0
- package/esm2022/ui/selectBox/index.mjs +2 -0
- package/esm2022/ui/selectBox/src/interfaces.mjs +2 -0
- package/esm2022/ui/selectBox/src/select-box.component.mjs +54 -0
- package/esm2022/ui/switch/aril-ui-switch.mjs +5 -0
- package/esm2022/ui/switch/index.mjs +2 -0
- package/esm2022/ui/switch/src/switch.component.mjs +23 -0
- package/esm2022/ui/table/aril-ui-table.mjs +5 -0
- package/esm2022/ui/table/index.mjs +49 -0
- package/esm2022/ui/table/src/i18n.mjs +56 -0
- package/esm2022/ui/table/src/table-column.component.mjs +23 -0
- package/esm2022/ui/table/src/table.component.mjs +94 -0
- package/esm2022/ui/tagBox/aril-ui-tagBox.mjs +5 -0
- package/esm2022/ui/tagBox/index.mjs +2 -0
- package/esm2022/ui/tagBox/src/tag-box.component.mjs +50 -0
- package/esm2022/ui/text/aril-ui-text.mjs +5 -0
- package/esm2022/ui/text/index.mjs +2 -0
- package/esm2022/ui/text/src/text.component.mjs +40 -0
- package/esm2022/ui/textArea/aril-ui-textArea.mjs +5 -0
- package/esm2022/ui/textArea/index.mjs +2 -0
- package/esm2022/ui/textArea/src/text-area.component.mjs +26 -0
- package/esm2022/ui/toggle-button/aril-ui-toggle-button.mjs +5 -0
- package/esm2022/ui/toggle-button/index.mjs +2 -0
- package/esm2022/ui/toggle-button/src/toggle-button.component.mjs +25 -0
- package/esm2022/ui/tree/aril-ui-tree.mjs +5 -0
- package/esm2022/ui/tree/index.mjs +2 -0
- package/esm2022/ui/tree/src/tree.component.mjs +34 -0
- package/esm2022/ui/treeTable/aril-ui-treeTable.mjs +5 -0
- package/esm2022/ui/treeTable/index.mjs +2 -0
- package/esm2022/ui/treeTable/src/tree-table.component.mjs +55 -0
- package/esm2022/ui/value/aril-ui-value.mjs +5 -0
- package/esm2022/ui/value/index.mjs +2 -0
- package/esm2022/ui/value/src/value.component.mjs +35 -0
- package/esm2022/util/aril-util.mjs +5 -0
- package/esm2022/util/block/aril-util-block.mjs +5 -0
- package/esm2022/util/block/index.mjs +2 -0
- package/esm2022/util/block/src/block.mjs +64 -0
- package/esm2022/util/custom_pages/aril-util-custom_pages.mjs +5 -0
- package/esm2022/util/custom_pages/index.mjs +2 -0
- package/esm2022/util/custom_pages/src/notFound.component.mjs +65 -0
- package/esm2022/util/index.mjs +2 -0
- package/esm2022/util/init-event/aril-util-init-event.mjs +5 -0
- package/esm2022/util/init-event/index.mjs +2 -0
- package/esm2022/util/init-event/src/init-event.directive.mjs +22 -0
- package/esm2022/util/lib/aril-util-lib.mjs +5 -0
- package/esm2022/util/lib/index.mjs +4 -0
- package/esm2022/util/lib/src/interfaces.mjs +4 -0
- package/esm2022/util/lib/src/module-router.mjs +17 -0
- package/esm2022/util/lib/src/types.mjs +3 -0
- package/esm2022/util/loaders/aril-util-loaders.mjs +5 -0
- package/esm2022/util/loaders/index.mjs +3 -0
- package/esm2022/util/loaders/script/script.loader.service.mjs +61 -0
- package/esm2022/util/loaders/style/style.loader.service.mjs +61 -0
- package/esm2022/util/primitive-extensions/aril-util-primitive-extensions.mjs +5 -0
- package/esm2022/util/primitive-extensions/index.mjs +5 -0
- package/esm2022/util/primitive-extensions/src/boolean.extensions.mjs +2 -0
- package/esm2022/util/primitive-extensions/src/date.extensions.mjs +116 -0
- package/esm2022/util/primitive-extensions/src/number.extensions.mjs +39 -0
- package/esm2022/util/primitive-extensions/src/string.extensions.mjs +23 -0
- package/esm2022/util/pub-sub/aril-util-pub-sub.mjs +5 -0
- package/esm2022/util/pub-sub/index.mjs +2 -0
- package/esm2022/util/pub-sub/src/pub-sub.service.mjs +29 -0
- package/fesm2022/aril-app.component-c363Er6g.mjs +76 -0
- package/fesm2022/aril-app.component-c363Er6g.mjs.map +1 -0
- package/fesm2022/aril-boot-config-api.mjs +59 -0
- package/fesm2022/aril-boot-config-api.mjs.map +1 -0
- package/fesm2022/aril-boot-config-apps.mjs +106 -0
- package/fesm2022/aril-boot-config-apps.mjs.map +1 -0
- package/fesm2022/aril-boot-config-plugins.mjs +84 -0
- package/fesm2022/aril-boot-config-plugins.mjs.map +1 -0
- package/fesm2022/aril-boot-host.mjs +86 -0
- package/fesm2022/aril-boot-host.mjs.map +1 -0
- package/fesm2022/aril-boot-mfe-app.component-WWRmTfs5.mjs +75 -0
- package/fesm2022/aril-boot-mfe-app.component-WWRmTfs5.mjs.map +1 -0
- package/fesm2022/aril-boot-mfe-aril-boot-mfe-PwAGdNZE.mjs +90 -0
- package/fesm2022/aril-boot-mfe-aril-boot-mfe-PwAGdNZE.mjs.map +1 -0
- package/fesm2022/aril-boot-mfe.mjs +16 -0
- package/fesm2022/aril-boot-mfe.mjs.map +1 -0
- package/fesm2022/aril-boot.mjs +8 -0
- package/fesm2022/aril-boot.mjs.map +1 -0
- package/fesm2022/aril-http.mjs +273 -0
- package/fesm2022/aril-http.mjs.map +1 -0
- package/fesm2022/aril-i18n.mjs +72 -0
- package/fesm2022/aril-i18n.mjs.map +1 -0
- package/fesm2022/aril-keycloak.mjs +129 -0
- package/fesm2022/aril-keycloak.mjs.map +1 -0
- package/fesm2022/aril-theme-layout.mjs +1010 -0
- package/fesm2022/aril-theme-layout.mjs.map +1 -0
- package/fesm2022/aril-theme.mjs +8 -0
- package/fesm2022/aril-theme.mjs.map +1 -0
- package/fesm2022/aril-ui-autoComplete.mjs +88 -0
- package/fesm2022/aril-ui-autoComplete.mjs.map +1 -0
- package/fesm2022/aril-ui-badge.mjs +26 -0
- package/fesm2022/aril-ui-badge.mjs.map +1 -0
- package/fesm2022/aril-ui-button.mjs +59 -0
- package/fesm2022/aril-ui-button.mjs.map +1 -0
- package/fesm2022/aril-ui-calendar.mjs +125 -0
- package/fesm2022/aril-ui-calendar.mjs.map +1 -0
- package/fesm2022/aril-ui-checkbox.mjs +47 -0
- package/fesm2022/aril-ui-checkbox.mjs.map +1 -0
- package/fesm2022/aril-ui-dxField.mjs +25 -0
- package/fesm2022/aril-ui-dxField.mjs.map +1 -0
- package/fesm2022/aril-ui-field.mjs +46 -0
- package/fesm2022/aril-ui-field.mjs.map +1 -0
- package/fesm2022/aril-ui-fileUpload.mjs +68 -0
- package/fesm2022/aril-ui-fileUpload.mjs.map +1 -0
- package/fesm2022/aril-ui-form.mjs +86 -0
- package/fesm2022/aril-ui-form.mjs.map +1 -0
- package/fesm2022/aril-ui-lib.mjs +322 -0
- package/fesm2022/aril-ui-lib.mjs.map +1 -0
- package/fesm2022/aril-ui-mask.mjs +42 -0
- package/fesm2022/aril-ui-mask.mjs.map +1 -0
- package/fesm2022/aril-ui-number.mjs +43 -0
- package/fesm2022/aril-ui-number.mjs.map +1 -0
- package/fesm2022/aril-ui-overlayPanel.mjs +27 -0
- package/fesm2022/aril-ui-overlayPanel.mjs.map +1 -0
- package/fesm2022/aril-ui-panel.mjs +31 -0
- package/fesm2022/aril-ui-panel.mjs.map +1 -0
- package/fesm2022/aril-ui-password.mjs +36 -0
- package/fesm2022/aril-ui-password.mjs.map +1 -0
- package/fesm2022/aril-ui-radioButton.mjs +37 -0
- package/fesm2022/aril-ui-radioButton.mjs.map +1 -0
- package/fesm2022/aril-ui-selectBox.mjs +61 -0
- package/fesm2022/aril-ui-selectBox.mjs.map +1 -0
- package/fesm2022/aril-ui-switch.mjs +30 -0
- package/fesm2022/aril-ui-switch.mjs.map +1 -0
- package/fesm2022/aril-ui-table.mjs +219 -0
- package/fesm2022/aril-ui-table.mjs.map +1 -0
- package/fesm2022/aril-ui-tagBox.mjs +57 -0
- package/fesm2022/aril-ui-tagBox.mjs.map +1 -0
- package/fesm2022/aril-ui-text.mjs +47 -0
- package/fesm2022/aril-ui-text.mjs.map +1 -0
- package/fesm2022/aril-ui-textArea.mjs +33 -0
- package/fesm2022/aril-ui-textArea.mjs.map +1 -0
- package/fesm2022/aril-ui-toggle-button.mjs +32 -0
- package/fesm2022/aril-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/aril-ui-tree.mjs +41 -0
- package/fesm2022/aril-ui-tree.mjs.map +1 -0
- package/fesm2022/aril-ui-treeTable.mjs +62 -0
- package/fesm2022/aril-ui-treeTable.mjs.map +1 -0
- package/fesm2022/aril-ui-value.mjs +42 -0
- package/fesm2022/aril-ui-value.mjs.map +1 -0
- package/fesm2022/aril-ui.mjs +8 -0
- package/fesm2022/aril-ui.mjs.map +1 -0
- package/fesm2022/aril-util-block.mjs +71 -0
- package/fesm2022/aril-util-block.mjs.map +1 -0
- package/fesm2022/aril-util-custom_pages.mjs +72 -0
- package/fesm2022/aril-util-custom_pages.mjs.map +1 -0
- package/fesm2022/aril-util-init-event.mjs +29 -0
- package/fesm2022/aril-util-init-event.mjs.map +1 -0
- package/fesm2022/aril-util-lib.mjs +29 -0
- package/fesm2022/aril-util-lib.mjs.map +1 -0
- package/fesm2022/aril-util-loaders.mjs +126 -0
- package/fesm2022/aril-util-loaders.mjs.map +1 -0
- package/fesm2022/aril-util-primitive-extensions.mjs +179 -0
- package/fesm2022/aril-util-primitive-extensions.mjs.map +1 -0
- package/fesm2022/aril-util-pub-sub.mjs +36 -0
- package/fesm2022/aril-util-pub-sub.mjs.map +1 -0
- package/fesm2022/aril-util.mjs +8 -0
- package/fesm2022/aril-util.mjs.map +1 -0
- package/fesm2022/aril.mjs +157 -0
- package/fesm2022/aril.mjs.map +1 -0
- package/http/{index.ts → index.d.ts} +8 -13
- package/http/lib/enums.d.ts +13 -0
- package/http/lib/interfaces.d.ts +21 -0
- package/http/src/httpBackend.d.ts +8 -0
- package/http/src/httpClient.d.ts +8 -0
- package/http/src/interceptor/state-machine.interceptor.d.ts +2 -0
- package/http/src/serviceBase.d.ts +5 -0
- package/http/src/serviceMockBase.d.ts +6 -0
- package/http/src/serviceRequest.d.ts +4 -0
- package/http/src/serviceStateMethods.d.ts +14 -0
- package/i18n/{index.ts → index.d.ts} +5 -5
- package/i18n/src/folder-name-token.d.ts +2 -0
- package/i18n/src/i18n.module.d.ts +7 -0
- package/i18n/src/loader.d.ts +9 -0
- package/i18n/src/provideI18n.d.ts +2 -0
- package/i18n/src/provideScope.d.ts +5 -0
- package/index.d.ts +5 -0
- package/keycloak/{index.ts → index.d.ts} +3 -3
- package/keycloak/src/auth.guard.d.ts +11 -0
- package/keycloak/src/auth.interceptor.d.ts +2 -0
- package/keycloak/src/keycloak.manager.d.ts +25 -0
- package/package.json +314 -31
- package/{public-api.ts → public-api.d.ts} +2 -2
- package/theme/index.d.ts +1 -0
- package/theme/layout/app/breadcrumb/app.breadcrumb.component.d.ts +16 -0
- package/theme/layout/app/config/app.config.component.d.ts +36 -0
- package/theme/layout/app/layout/app.layout.component.d.ts +48 -0
- package/theme/layout/app/layout/mfe.layout.component.d.ts +8 -0
- package/theme/layout/app/menu/app.menu.component.d.ts +50 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +13 -0
- package/theme/layout/app/sidebar/app.sidebar.component.d.ts +15 -0
- package/theme/layout/app/topbar/app.topbar.component.d.ts +16 -0
- package/theme/layout/index.d.ts +3 -0
- package/theme/layout/service/app.layout.service.d.ts +51 -0
- package/theme/layout/service/app.menu.service.d.ts +23 -0
- package/theme/layout/service/menuchangeevent.d.ts +4 -0
- package/ui/autoComplete/{index.ts → index.d.ts} +1 -1
- package/ui/autoComplete/src/auto-complete.component.d.ts +24 -0
- package/ui/autoComplete/src/interfaces.d.ts +24 -0
- package/ui/badge/{index.ts → index.d.ts} +1 -1
- package/ui/badge/src/badge.component.d.ts +11 -0
- package/ui/button/{index.ts → index.d.ts} +2 -2
- package/ui/button/src/button.component.d.ts +24 -0
- package/ui/button/src/split-button.component.d.ts +8 -0
- package/ui/calendar/{index.ts → index.d.ts} +1 -1
- package/ui/calendar/src/calendar.component.d.ts +38 -0
- package/ui/checkbox/{index.ts → index.d.ts} +2 -2
- package/ui/checkbox/src/check-box.component.d.ts +9 -0
- package/ui/checkbox/src/tri-state-checkbox.component.d.ts +9 -0
- package/ui/dxField/{index.ts → index.d.ts} +1 -1
- package/ui/dxField/src/dx-field.component.d.ts +9 -0
- package/ui/field/{index.ts → index.d.ts} +1 -1
- package/ui/field/src/field.component.d.ts +25 -0
- package/ui/fileUpload/{index.ts → index.d.ts} +1 -1
- package/ui/fileUpload/src/file-upload.component.d.ts +47 -0
- package/ui/form/index.d.ts +11 -0
- package/ui/form/src/form-submit-button.component.d.ts +14 -0
- package/ui/form/src/form.component.d.ts +8 -0
- package/ui/index.d.ts +1 -0
- package/ui/lib/{index.ts → index.d.ts} +11 -16
- package/ui/lib/src/form/form-error-message.component.d.ts +9 -0
- package/ui/lib/src/form/form-error-message.directive.d.ts +14 -0
- package/ui/lib/src/form/form-field-builder.d.ts +8 -0
- package/ui/lib/src/form/form-validation.d.ts +2 -0
- package/ui/lib/src/grid/flex-grid.directive.d.ts +6 -0
- package/ui/lib/src/input/baseInput.d.ts +7 -0
- package/ui/lib/src/input/common-input-validators.service.d.ts +20 -0
- package/ui/lib/src/input/dx-input-error-message.pipe.d.ts +11 -0
- package/ui/lib/src/input/input-disabled.directive.d.ts +9 -0
- package/ui/lib/src/input/input-error-message.pipe.d.ts +7 -0
- package/ui/lib/src/input/input-transforms.d.ts +5 -0
- package/ui/lib/src/input/value-accessor.directive.d.ts +9 -0
- package/ui/mask/{index.ts → index.d.ts} +1 -1
- package/ui/mask/src/mask.component.d.ts +21 -0
- package/ui/number/{index.ts → index.d.ts} +1 -1
- package/ui/number/src/number.component.d.ts +27 -0
- package/ui/overlayPanel/{index.ts → index.d.ts} +1 -1
- package/ui/overlayPanel/src/overlay-panel.component.d.ts +8 -0
- package/ui/panel/{index.ts → index.d.ts} +1 -1
- package/ui/panel/src/panel.component.d.ts +10 -0
- package/ui/password/{index.ts → index.d.ts} +1 -1
- package/ui/password/src/password.component.d.ts +11 -0
- package/ui/radioButton/{index.ts → index.d.ts} +1 -1
- package/ui/radioButton/src/radio-button.component.d.ts +20 -0
- package/ui/selectBox/{index.ts → index.d.ts} +1 -1
- package/ui/selectBox/src/interfaces.d.ts +32 -0
- package/ui/selectBox/src/select-box.component.d.ts +25 -0
- package/ui/switch/{index.ts → index.d.ts} +1 -1
- package/ui/switch/src/switch.component.d.ts +8 -0
- package/ui/table/index.d.ts +16 -0
- package/ui/table/src/i18n.d.ts +42 -0
- package/ui/table/src/table-column.component.d.ts +24 -0
- package/ui/table/src/table.component.d.ts +41 -0
- package/ui/tagBox/{index.ts → index.d.ts} +1 -1
- package/ui/tagBox/src/tag-box.component.d.ts +15 -0
- package/ui/text/{index.ts → index.d.ts} +1 -1
- package/ui/text/src/text.component.d.ts +17 -0
- package/ui/textArea/{index.ts → index.d.ts} +1 -1
- package/ui/textArea/src/text-area.component.d.ts +11 -0
- package/ui/toggle-button/index.d.ts +1 -0
- package/ui/toggle-button/src/toggle-button.component.d.ts +10 -0
- package/ui/tree/{index.ts → index.d.ts} +1 -1
- package/ui/tree/src/tree.component.d.ts +19 -0
- package/ui/treeTable/{index.ts → index.d.ts} +1 -1
- package/ui/treeTable/src/tree-table.component.d.ts +21 -0
- package/ui/value/{index.ts → index.d.ts} +1 -1
- package/ui/value/src/value.component.d.ts +13 -0
- package/util/block/{index.ts → index.d.ts} +1 -1
- package/util/block/src/block.d.ts +28 -0
- package/util/custom_pages/{index.ts → index.d.ts} +1 -1
- package/util/custom_pages/src/notFound.component.d.ts +5 -0
- package/util/index.d.ts +1 -0
- package/util/init-event/{index.ts → index.d.ts} +1 -1
- package/util/init-event/src/init-event.directive.d.ts +8 -0
- package/util/lib/{index.ts → index.d.ts} +3 -3
- package/util/lib/src/interfaces.d.ts +41 -0
- package/util/lib/src/module-router.d.ts +5 -0
- package/util/lib/src/types.d.ts +29 -0
- package/util/loaders/{index.ts → index.d.ts} +2 -2
- package/util/loaders/script/script.loader.service.d.ts +13 -0
- package/util/loaders/style/style.loader.service.d.ts +13 -0
- package/util/primitive-extensions/{index.ts → index.d.ts} +4 -4
- package/util/primitive-extensions/src/{boolean.extensions.ts → boolean.extensions.d.ts} +1 -1
- package/util/primitive-extensions/src/date.extensions.d.ts +8 -0
- package/util/primitive-extensions/src/number.extensions.d.ts +12 -0
- package/util/primitive-extensions/src/string.extensions.d.ts +11 -0
- package/util/pub-sub/{index.ts → index.d.ts} +1 -1
- package/util/pub-sub/src/pub-sub.service.d.ts +20 -0
- package/.eslintrc.json +0 -41
- package/boot/config/api/ng-package.json +0 -6
- package/boot/config/api/src/api.service.ts +0 -57
- package/boot/config/api/src/interfaces.ts +0 -13
- package/boot/config/apps/ng-package.json +0 -6
- package/boot/config/apps/src/apps.service.ts +0 -64
- package/boot/config/apps/src/interfaces.ts +0 -27
- package/boot/config/apps/src/showdowDOMWrapper.ts +0 -28
- package/boot/config/plugins/ng-package.json +0 -6
- package/boot/config/plugins/src/getNgZone.ts +0 -9
- package/boot/config/plugins/src/interfaces.ts +0 -11
- package/boot/config/plugins/src/plugins.service.ts +0 -82
- package/boot/host/ng-package.json +0 -6
- package/boot/host/src/app.component.ts +0 -27
- package/boot/host/src/bootstrap.ts +0 -61
- package/boot/index.ts +0 -1
- package/boot/mfe/ng-package.json +0 -6
- package/boot/mfe/src/app.component.ts +0 -57
- package/boot/mfe/src/appComponentLoader.ts +0 -4
- package/boot/mfe/src/bootstrap.ts +0 -78
- package/boot/mfe/src/loadStyles.ts +0 -19
- package/boot/ng-package.json +0 -6
- package/http/lib/enums.ts +0 -13
- package/http/lib/interfaces.ts +0 -38
- package/http/ng-package.json +0 -6
- package/http/src/httpBackend.ts +0 -12
- package/http/src/httpClient.ts +0 -20
- package/http/src/interceptor/state-machine.interceptor.ts +0 -9
- package/http/src/serviceBase.ts +0 -91
- package/http/src/serviceMockBase.ts +0 -12
- package/http/src/serviceRequest.ts +0 -26
- package/http/src/serviceStateMethods.ts +0 -155
- package/i18n/ng-package.json +0 -6
- package/i18n/src/folder-name-token.ts +0 -3
- package/i18n/src/i18n.module.ts +0 -11
- package/i18n/src/loader.ts +0 -16
- package/i18n/src/provideI18n.ts +0 -18
- package/i18n/src/provideScope.ts +0 -20
- package/keycloak/ng-package.json +0 -6
- package/keycloak/src/auth.guard.ts +0 -37
- package/keycloak/src/auth.interceptor.ts +0 -13
- package/keycloak/src/keycloak.manager.ts +0 -89
- package/ng-package.json +0 -14
- package/project.json +0 -39
- package/tsconfig.lib.json +0 -12
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -9
- package/ui/autoComplete/ng-package.json +0 -6
- package/ui/autoComplete/src/auto-complete.component.html +0 -11
- package/ui/autoComplete/src/auto-complete.component.ts +0 -92
- package/ui/autoComplete/src/interfaces.ts +0 -30
- package/ui/badge/ng-package.json +0 -6
- package/ui/badge/src/badge.component.html +0 -3
- package/ui/badge/src/badge.component.ts +0 -19
- package/ui/button/ng-package.json +0 -6
- package/ui/button/src/button.component.html +0 -10
- package/ui/button/src/button.component.ts +0 -43
- package/ui/button/src/split-button.component.html +0 -2
- package/ui/button/src/split-button.component.ts +0 -17
- package/ui/calendar/ng-package.json +0 -6
- package/ui/calendar/src/calendar.component.html +0 -31
- package/ui/calendar/src/calendar.component.ts +0 -136
- package/ui/checkbox/ng-package.json +0 -6
- package/ui/checkbox/src/check-box.component.html +0 -9
- package/ui/checkbox/src/check-box.component.ts +0 -19
- package/ui/checkbox/src/tri-state-checkbox.component.html +0 -7
- package/ui/checkbox/src/tri-state-checkbox.component.ts +0 -20
- package/ui/dxField/ng-package.json +0 -6
- package/ui/dxField/src/dx-field.component.html +0 -8
- package/ui/dxField/src/dx-field.component.ts +0 -16
- package/ui/field/ng-package.json +0 -6
- package/ui/field/src/field.component.html +0 -22
- package/ui/field/src/field.component.ts +0 -46
- package/ui/fileUpload/ng-package.json +0 -6
- package/ui/fileUpload/src/file-upload.component.html +0 -38
- package/ui/fileUpload/src/file-upload.component.ts +0 -72
- package/ui/form/index.ts +0 -18
- package/ui/form/ng-package.json +0 -6
- package/ui/form/src/form-submit-button.component.html +0 -12
- package/ui/form/src/form-submit-button.component.ts +0 -36
- package/ui/form/src/form.component.ts +0 -20
- package/ui/index.ts +0 -1
- package/ui/lib/ng-package.json +0 -6
- package/ui/lib/src/form/form-error-message.component.ts +0 -25
- package/ui/lib/src/form/form-error-message.directive.ts +0 -32
- package/ui/lib/src/form/form-field-builder.ts +0 -31
- package/ui/lib/src/form/form-validation.ts +0 -14
- package/ui/lib/src/grid/flex-grid.directive.ts +0 -10
- package/ui/lib/src/input/baseInput.ts +0 -30
- package/ui/lib/src/input/common-input-validators.service.ts +0 -57
- package/ui/lib/src/input/dx-input-error-message.pipe.ts +0 -16
- package/ui/lib/src/input/input-disabled.directive.ts +0 -15
- package/ui/lib/src/input/input-error-message.pipe.ts +0 -39
- package/ui/lib/src/input/input-transforms.ts +0 -11
- package/ui/lib/src/input/value-accessor.directive.ts +0 -27
- package/ui/mask/ng-package.json +0 -6
- package/ui/mask/src/mask.component.css +0 -23
- package/ui/mask/src/mask.component.html +0 -17
- package/ui/mask/src/mask.component.ts +0 -34
- package/ui/ng-package.json +0 -6
- package/ui/number/ng-package.json +0 -6
- package/ui/number/src/number.component.html +0 -25
- package/ui/number/src/number.component.ts +0 -34
- package/ui/overlayPanel/ng-package.json +0 -6
- package/ui/overlayPanel/src/overlay-panel.component.html +0 -5
- package/ui/overlayPanel/src/overlay-panel.component.ts +0 -16
- package/ui/panel/ng-package.json +0 -6
- package/ui/panel/src/panel.component.css +0 -25
- package/ui/panel/src/panel.component.html +0 -38
- package/ui/panel/src/panel.component.ts +0 -24
- package/ui/password/ng-package.json +0 -6
- package/ui/password/src/password.component.html +0 -24
- package/ui/password/src/password.component.ts +0 -22
- package/ui/radioButton/ng-package.json +0 -6
- package/ui/radioButton/src/radio-button.component.html +0 -17
- package/ui/radioButton/src/radio-button.component.ts +0 -36
- package/ui/selectBox/ng-package.json +0 -6
- package/ui/selectBox/src/interfaces.ts +0 -41
- package/ui/selectBox/src/select-box.component.html +0 -17
- package/ui/selectBox/src/select-box.component.ts +0 -69
- package/ui/switch/ng-package.json +0 -6
- package/ui/switch/src/switch.component.html +0 -7
- package/ui/switch/src/switch.component.ts +0 -18
- package/ui/table/index.ts +0 -34
- package/ui/table/ng-package.json +0 -6
- package/ui/table/src/i18n.ts +0 -55
- package/ui/table/src/table-column.component.ts +0 -28
- package/ui/table/src/table.component.html +0 -136
- package/ui/table/src/table.component.ts +0 -99
- package/ui/tagBox/ng-package.json +0 -6
- package/ui/tagBox/src/tag-box.component.html +0 -21
- package/ui/tagBox/src/tag-box.component.ts +0 -53
- package/ui/text/ng-package.json +0 -6
- package/ui/text/src/text.component.html +0 -21
- package/ui/text/src/text.component.ts +0 -47
- package/ui/textArea/ng-package.json +0 -6
- package/ui/textArea/src/text-area.component.html +0 -11
- package/ui/textArea/src/text-area.component.ts +0 -21
- package/ui/toggle-button/index.ts +0 -1
- package/ui/toggle-button/ng-package.json +0 -6
- package/ui/toggle-button/src/toggle-button.component.html +0 -13
- package/ui/toggle-button/src/toggle-button.component.scss +0 -19
- package/ui/toggle-button/src/toggle-button.component.ts +0 -22
- package/ui/tree/ng-package.json +0 -6
- package/ui/tree/src/tree.component.html +0 -16
- package/ui/tree/src/tree.component.ts +0 -52
- package/ui/treeTable/ng-package.json +0 -6
- package/ui/treeTable/src/tree-table.component.html +0 -88
- package/ui/treeTable/src/tree-table.component.ts +0 -57
- package/ui/value/ng-package.json +0 -6
- package/ui/value/src/value.component.html +0 -19
- package/ui/value/src/value.component.ts +0 -39
- package/util/block/ng-package.json +0 -6
- package/util/block/src/block.ts +0 -65
- package/util/custom_pages/ng-package.json +0 -6
- package/util/custom_pages/src/notFound.component.ts +0 -34
- package/util/index.ts +0 -1
- package/util/init-event/ng-package.json +0 -6
- package/util/init-event/src/init-event.directive.ts +0 -13
- package/util/lib/ng-package.json +0 -6
- package/util/lib/src/interfaces.ts +0 -44
- package/util/lib/src/module-router.ts +0 -10
- package/util/lib/src/types.ts +0 -49
- package/util/loaders/ng-package.json +0 -6
- package/util/loaders/script/script.loader.service.ts +0 -69
- package/util/loaders/style/style.loader.service.ts +0 -69
- package/util/ng-package.json +0 -6
- package/util/primitive-extensions/ng-package.json +0 -6
- package/util/primitive-extensions/src/date.extensions.ts +0 -135
- package/util/primitive-extensions/src/number.extensions.ts +0 -57
- package/util/primitive-extensions/src/string.extensions.ts +0 -39
- package/util/pub-sub/ng-package.json +0 -6
- package/util/pub-sub/src/pub-sub.service.ts +0 -34
- /package/boot/config/{api/src/api.sample.json → api.sample.json} +0 -0
- /package/{util/block/src → scripts/util}/blockui.min.js +0 -0
- /package/{ui/styles → styles/ui}/ui.common.scss +0 -0
- /package/{util/block/src → styles/util}/blockui.css +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-http.mjs","sources":["../../projects/aril/http/lib/enums.ts","../../projects/aril/http/lib/interfaces.ts","../../projects/aril/http/src/httpBackend.ts","../../projects/aril/http/src/httpClient.ts","../../projects/aril/http/src/serviceRequest.ts","../../projects/aril/http/src/serviceStateMethods.ts","../../projects/aril/http/src/serviceBase.ts","../../projects/aril/http/src/serviceMockBase.ts","../../projects/aril/http/src/interceptor/state-machine.interceptor.ts","../../projects/aril/http/index.ts","../../projects/aril/http/aril-http.ts"],"sourcesContent":["export enum HTTPMethods {\r\n\tGET = 'GET',\r\n\tGETBYPARAMS = 'GETBYPARAMS',\r\n\tPOST = 'POST',\r\n\tPUT = 'PUT',\r\n\tDELETE = 'DELETE',\r\n\tDELETEBYPARAMS = 'DELETEBYPARAMS'\r\n}\r\nexport enum ProxyTypes {\r\n\tNative,\r\n\tServerSide,\r\n\tClientSide\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\n/* eslint-disable @typescript-eslint/ban-types */\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\n\r\nimport { ProxyTypes } from './enums';\r\n\r\nexport interface ServiceCallStates {\r\n\tserviceCalled: boolean;\r\n\twaitingForResponse: boolean;\r\n\tresponseIsRecieved: boolean;\r\n\tserviceCallFailed: boolean;\r\n}\r\n\r\nexport type ServiceCallStateMap<T> = {\r\n\t[K in keyof T]?: T[K] extends Function ? ServiceCallStates : never;\r\n};\r\n\r\nexport class ErrorResponse {\r\n\terror: HttpErrorResponse | undefined;\r\n\r\n\tconstructor(err: HttpErrorResponse | undefined) {\r\n\t\tthis.error = err;\r\n\t}\r\n}\r\n\r\nexport class ServiceResponse<T> extends ErrorResponse {\r\n\trequest: any;\r\n\tresponse: T;\r\n\tproxy: ProxyTypes;\r\n\r\n\tconstructor(request: any, response: T, proxy: ProxyTypes) {\r\n\t\tsuper(undefined);\r\n\t\tthis.request = request;\r\n\t\tthis.response = response;\r\n\t\tthis.proxy = proxy;\r\n\t}\r\n}\r\n","import { HttpBackend, HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\n\r\n// WithoutInterceptorHttpClient\r\n@Injectable({ providedIn: 'root' })\r\nexport class HttpBackendService {\r\n\tpublic httpClient: HttpClient;\r\n\r\n\tconstructor(handler: HttpBackend) {\r\n\t\tthis.httpClient = new HttpClient(handler);\r\n\t}\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injector, inject } from '@angular/core';\r\n\r\nimport { MessageService } from 'primeng/api';\r\n\r\nimport { TranslocoService } from '@ngneat/transloco';\r\n\r\n// import { KeycloakService } from 'keycloak-angular';\r\nimport { ServiceCallStateMap } from '../lib/interfaces';\r\n\r\nexport abstract class RestClient {\r\n\tprivate readonly httpClient = inject(HttpClient);\r\n\tprivate readonly injector = inject(Injector);\r\n\tprivate readonly messageService = inject(MessageService);\r\n\tprivate readonly translocoService = inject(TranslocoService);\r\n\t// private readonly keycloak = inject(KeycloakService);\r\n\r\n\tabstract states: ServiceCallStateMap<any>;\r\n}\r\n","import { HttpParams } from '@angular/common/http';\r\n\r\nimport { Interfaces } from 'aril/util/lib';\r\n\r\nimport { HTTPMethods } from '../lib/enums';\r\n\r\nexport function getRequest(httpMethod: HTTPMethods, args: any[]): HttpParams | Interfaces.MapStringAny | undefined {\r\n\tif (!args.length) return undefined;\r\n\r\n\tswitch (httpMethod) {\r\n\t\tcase HTTPMethods.PUT:\r\n\t\t\treturn args[1];\r\n\t\tcase HTTPMethods.GETBYPARAMS:\r\n\t\tcase HTTPMethods.DELETEBYPARAMS:\r\n\t\t\tconst dto = args[0];\r\n\t\t\tlet queryParams = new HttpParams();\r\n\r\n\t\t\tfor (const [key, value] of Object.entries(dto)) {\r\n\t\t\t\tqueryParams = queryParams.append(key, value as any);\r\n\t\t\t}\r\n\r\n\t\t\treturn queryParams;\r\n\t\tdefault:\r\n\t\t\treturn args[0];\r\n\t}\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\n\r\nimport { MessageService } from 'primeng/api';\r\n\r\nimport { TranslocoService } from '@ngneat/transloco';\r\n\r\nimport { ServiceCallStateMap } from '../lib/interfaces';\r\n\r\nexport const callState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\r\n\tstates[serviceName] = {\r\n\t\tserviceCalled: true,\r\n\t\twaitingForResponse: true,\r\n\t\tresponseIsRecieved: false,\r\n\t\tserviceCallFailed: false\r\n\t};\r\n};\r\n\r\nexport const successState = (\r\n\tstates: ServiceCallStateMap<any>,\r\n\tserviceName: any,\r\n\ttranslocoService: TranslocoService,\r\n\tmessageService: MessageService,\r\n\tmessage?: { success?: string; error?: string },\r\n\tresponse?: any\r\n): void => {\r\n\tstates[serviceName] = {\r\n\t\tserviceCalled: true,\r\n\t\twaitingForResponse: false,\r\n\t\tresponseIsRecieved: true,\r\n\t\tserviceCallFailed: false\r\n\t};\r\n\r\n\tif (message?.success) {\r\n\t\tmessageService.add({\r\n\t\t\tkey: 'toast-root',\r\n\t\t\tseverity: 'success',\r\n\t\t\tsummary: getTranslatedMessage(<string>message.success, translocoService, response)\r\n\t\t});\r\n\t}\r\n};\r\n\r\nexport const errorState = (\r\n\tstates: ServiceCallStateMap<any>,\r\n\tserviceName: any,\r\n\terror: HttpErrorResponse,\r\n\ttranslocoService: TranslocoService,\r\n\tmessageService: MessageService,\r\n\tmessage?: { success?: string; error?: string, display?:string }\r\n): void => {\r\n\tstates[serviceName] = {\r\n\t\tserviceCalled: true,\r\n\t\twaitingForResponse: false,\r\n\t\tresponseIsRecieved: true,\r\n\t\tserviceCallFailed: true\r\n\t};\r\n\r\n\tlet httpError: string;\r\n\r\n\tswitch (error.status) {\r\n\t\tcase 400:\r\n\t\t\thttpError = 'Bad Request';\r\n\t\t\tbreak;\r\n\t\tcase 401:\r\n\t\t\thttpError = 'Unauthorized';\r\n\t\t\tbreak;\r\n\t\tcase 403:\r\n\t\t\thttpError = 'Forbidden';\r\n\t\t\tbreak;\r\n\t\tcase 404:\r\n\t\t\thttpError = 'Not Found';\r\n\t\t\tbreak;\r\n\t\tcase 405:\r\n\t\t\thttpError = 'Method Not Allowed';\r\n\t\t\tbreak;\r\n\t\tcase 406:\r\n\t\t\thttpError = 'Not Acceptable';\r\n\t\t\tbreak;\r\n\t\tcase 408:\r\n\t\t\thttpError = 'Request Timeout';\r\n\t\t\tbreak;\r\n\t\tcase 409:\r\n\t\t\thttpError = 'Conflict';\r\n\t\t\tbreak;\r\n\t\tcase 500:\r\n\t\t\thttpError = 'Internal Server Error';\r\n\t\t\tbreak;\r\n\t\tcase 501:\r\n\t\t\thttpError = 'Not Implemented';\r\n\t\t\tbreak;\r\n\t\tcase 502:\r\n\t\t\thttpError = 'Bad Gateway';\r\n\t\t\tbreak;\r\n\t\tcase 503:\r\n\t\t\thttpError = 'Service Unavailable';\r\n\t\t\tbreak;\r\n\t\tcase 504:\r\n\t\t\thttpError = 'Gateway Timeout';\r\n\t\t\tbreak;\r\n\t\tcase 505:\r\n\t\t\thttpError = 'HTTP Version Not Supported';\r\n\t\t\tbreak;\r\n\t\tcase 511:\r\n\t\t\thttpError = 'Network Authentication Required';\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\thttpError = error?.error?.message;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tmessageService.add({\r\n\t\tkey: 'toast-root',\r\n\t\tseverity: 'error',\r\n\t\tsummary: httpError,\r\n\t\tdetail: error?.error?.display ? error?.error?.display : error?.error?.message\r\n\t});\r\n\r\n\tif (message?.error) {\r\n\t\tmessageService.add({\r\n\t\t\tkey: 'toast-root',\r\n\t\t\tseverity: 'error',\r\n\t\t\tsummary: error?.error?.display ? error?.error?.display : getTranslatedMessage(<string>message.error, translocoService)\r\n\t\t});\r\n\t}\r\n\r\n};\r\n\r\nconst getTranslatedMessage = (messageCode: string, translocoService: TranslocoService, response?: any): string => {\r\n\tconst translateObject = translocoService.getTranslation().get(translocoService.getActiveLang());\r\n\tlet translatedMessage = translateObject?.[messageCode] ?? messageCode;\r\n\r\n\tconst paramStartSymbol = '{{';\r\n\tconst paramEndSymbol = '}}';\r\n\r\n\tif (response && translatedMessage.includes(paramStartSymbol) && translatedMessage.includes(paramEndSymbol)) {\r\n\t\tdo {\r\n\t\t\tlet paramStartIndex = translatedMessage.indexOf(paramStartSymbol);\r\n\t\t\tlet paramEndIndex = translatedMessage.indexOf(paramEndSymbol);\r\n\t\t\tlet paramKey = translatedMessage.slice(paramStartIndex + paramStartSymbol.length, paramEndIndex);\r\n\r\n\t\t\t// Splitting the key to get nested object values\r\n\t\t\tlet paramKeyList = paramKey.split('.');\r\n\t\t\tlet paramValue;\r\n\r\n\t\t\tfor (let key of paramKeyList) {\r\n\t\t\t\tparamValue = paramValue ? paramValue[key] : response[key];\r\n\t\t\t}\r\n\r\n\t\t\tlet replacePattern = `${paramStartSymbol}${paramKey}${paramEndSymbol}`;\r\n\t\t\ttranslatedMessage = translatedMessage.replace(replacePattern, paramValue);\r\n\t\t} while (translatedMessage.includes(paramStartSymbol));\r\n\t}\r\n\r\n\treturn translatedMessage;\r\n};\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { runInInjectionContext } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\nimport { Observable, of } from 'rxjs';\r\nimport { catchError, map, tap } from 'rxjs/operators';\r\n\r\nimport { API_CONFIGS } from 'aril/boot/config/api';\r\n\r\nimport { HTTPMethods, ProxyTypes } from '../lib/enums';\r\nimport { ErrorResponse, ServiceCallStateMap, ServiceResponse } from '../lib/interfaces';\r\nimport { getRequest } from './serviceRequest';\r\nimport { callState, errorState, successState } from './serviceStateMethods';\r\n\r\nexport function ServiceCall(\r\n\thttpMethod: HTTPMethods,\r\n\tproxy: ProxyTypes,\r\n\tserviceURL: string,\r\n\tmessage?: { success?: string; error?: string },\r\n\tremoteAPI?: string,\r\n\tisMockAPI = false\r\n): MethodDecorator {\r\n\treturn function (serviceClass: object, serviceName: string | symbol, descriptor: PropertyDescriptor) {\r\n\t\t// const originalFunction = descriptor.value;\r\n\r\n\t\tdescriptor.value = function (...args: any[]) {\r\n\t\t\treturn runInInjectionContext((<any>this).injector, () => {\r\n\t\t\t\tconst httpClient: HttpClient = (<any>this).httpClient;\r\n\r\n\t\t\t\tlet api = '';\r\n\t\t\t\tif (isMockAPI) api = <string>remoteAPI;\r\n\t\t\t\telse if (remoteAPI) {\r\n\t\t\t\t\tconst url = new URL(API_CONFIGS.api);\r\n\t\t\t\t\tapi = url.origin + '/' + remoteAPI;\r\n\t\t\t\t} else api = API_CONFIGS.api;\r\n\r\n\t\t\t\tconst endPoint = api + '/' + serviceURL;\r\n\t\t\t\tconst request = getRequest(httpMethod, args);\r\n\t\t\t\tconst states: ServiceCallStateMap<any> = (<any>this).states;\r\n\r\n\t\t\t\tcallState(states, serviceName);\r\n\r\n\t\t\t\tlet observable: Observable<any> = new Observable<any>();\r\n\r\n\t\t\t\tswitch (httpMethod) {\r\n\t\t\t\t\tcase HTTPMethods.GET:\r\n\t\t\t\t\t\tlet getReq = args.length ? '/' + args[0] : '';\r\n\t\t\t\t\t\tobservable = httpClient.get<any>(endPoint + getReq, { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.GETBYPARAMS:\r\n\t\t\t\t\t\tobservable = httpClient.get<any>(endPoint, { params: request as HttpParams, responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.POST:\r\n\t\t\t\t\t\tobservable = httpClient.post<any>(endPoint, args[0], { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.PUT:\r\n\t\t\t\t\t\tobservable = httpClient.put<any>(endPoint + '/' + args[0], request, { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.DELETE:\r\n\t\t\t\t\t\tobservable = httpClient.delete<any>(endPoint + '/' + args[0], { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.DELETEBYPARAMS:\r\n\t\t\t\t\t\tobservable = httpClient.delete<any>(endPoint, { params: request as HttpParams, responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tobservable = observable.pipe(\r\n\t\t\t\t\tmap((response) => new ServiceResponse(request, response, proxy)),\r\n\t\t\t\t\ttap((resp) =>\r\n\t\t\t\t\t\tsuccessState(\r\n\t\t\t\t\t\t\tstates,\r\n\t\t\t\t\t\t\tserviceName,\r\n\t\t\t\t\t\t\t(<any>this).translocoService,\r\n\t\t\t\t\t\t\t(<any>this).messageService,\r\n\t\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\t\tresp.response\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t),\r\n\t\t\t\t\tcatchError((error: HttpErrorResponse) => {\r\n\t\t\t\t\t\terrorState(states, serviceName, error, (<any>this).translocoService, (<any>this).messageService, message);\r\n\t\t\t\t\t\treturn of(new ErrorResponse(error));\r\n\t\t\t\t\t}),\r\n\t\t\t\t\ttakeUntilDestroyed()\r\n\t\t\t\t);\r\n\r\n\t\t\t\treturn observable;\r\n\t\t\t});\r\n\t\t};\r\n\t};\r\n}\r\n","import { HTTPMethods, ProxyTypes } from '../lib/enums';\r\nimport { ServiceCall } from './serviceBase';\r\n\r\nexport function ServiceCallMock(\r\n\thttpMethod: HTTPMethods,\r\n\tproxy: ProxyTypes,\r\n\tserviceURL: string,\r\n\tmockAPI: string,\r\n\tmessage?: { success?: string; error?: string; useDefault: boolean }\r\n) {\r\n\treturn ServiceCall(httpMethod, proxy, serviceURL, message, mockAPI, true);\r\n}\r\n","import { HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http';\r\n\r\nexport const stateMachineInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => {\r\n\tlet clone = req;\r\n\tif (req.url.includes('state-machine/v1')) {\r\n\t\tclone = req.clone({ url: req.url.split('/host/v1').join('') });\r\n\t}\r\n\treturn next(clone);\r\n};\r\n","/* lib */\r\nexport * from './lib/enums';\r\nexport * from './lib/interfaces';\r\n\r\n/* src */\r\nexport * from './src/httpBackend';\r\nexport * from './src/httpClient';\r\nexport * from './src/serviceBase';\r\nexport * from './src/serviceMockBase';\r\nexport * from './src/serviceStateMethods';\r\n\r\n/* interceptor */\r\nexport * from './src/interceptor/state-machine.interceptor';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;IAAY,YAOX;AAPD,CAAA,UAAY,WAAW,EAAA;AACtB,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,WAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,WAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EAPW,WAAW,KAAX,WAAW,GAOtB,EAAA,CAAA,CAAA,CAAA;IACW,WAIX;AAJD,CAAA,UAAY,UAAU,EAAA;AACrB,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,UAAA,CAAA,UAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,UAAA,CAAA,UAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACX,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA;;ACZD;MAkBa,aAAa,CAAA;AAGzB,IAAA,WAAA,CAAY,GAAkC,EAAA;AAC7C,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;KACjB;AACD,CAAA;AAEK,MAAO,eAAmB,SAAQ,aAAa,CAAA;AAKpD,IAAA,WAAA,CAAY,OAAY,EAAE,QAAW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AK,CAAC,CAAC,CAAC;AACrC,iBAAC,CAAC,EACF,kBAAkB,EAAE,CACpB,CAAC;AAEF,gBAAA,OAAO,UAAU,CAAC;AACnB,aAAC,CAAC,CAAC;AACJ,SAAC,CAAC;AACH,KAAC,CAAC;AACH;;ACvFM,SAAU,eAAe,CAC9B,UAAuB,EACvB,KAAiB,EACjB,UAAkB,EAClB,OAAe,EACf,OAAmE,EAAA;AAEnE,IAAA,OAAO,WAAW,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3E;;MCTa,uBAAuB,GAAsB,CAAC,GAAyB,EAAE,IAAmB,KAAI;IAC5G,IAAI,KAAK,GAAG,GAAG,CAAC;IAChB,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QACzC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KAC/D;AACD,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;AACpB;;ACRA;;ACAA;;AAEG;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, inject, Injectable, isDevMode, NgModule } from '@angular/core';
|
|
4
|
+
import { provideTransloco, provideTranslocoScope, TranslocoModule } from '@ngneat/transloco';
|
|
5
|
+
|
|
6
|
+
const i18nFolderName = new InjectionToken('i18nFolderName');
|
|
7
|
+
|
|
8
|
+
class TranslocoHttpLoader {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.http = inject(HttpClient);
|
|
11
|
+
this.folderUrl = inject(i18nFolderName);
|
|
12
|
+
}
|
|
13
|
+
getTranslation(lang) {
|
|
14
|
+
return this.http.get(`./assets/${this.folderUrl}/i18n/${lang}.json`);
|
|
15
|
+
}
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TranslocoHttpLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
17
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TranslocoHttpLoader, providedIn: 'root' }); }
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TranslocoHttpLoader, decorators: [{
|
|
20
|
+
type: Injectable,
|
|
21
|
+
args: [{ providedIn: 'root' }]
|
|
22
|
+
}] });
|
|
23
|
+
|
|
24
|
+
const i18nProvider = () => {
|
|
25
|
+
return provideTransloco({
|
|
26
|
+
config: {
|
|
27
|
+
availableLangs: ['tr', 'en'],
|
|
28
|
+
defaultLang: 'tr',
|
|
29
|
+
fallbackLang: 'tr',
|
|
30
|
+
reRenderOnLangChange: true,
|
|
31
|
+
prodMode: !isDevMode()
|
|
32
|
+
},
|
|
33
|
+
loader: TranslocoHttpLoader
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const languages = ['tr', 'en'];
|
|
38
|
+
/**
|
|
39
|
+
* @param loader `(lang: string) => import(`./i18n/${lang}.json`)` to create a relative import to the correct dir
|
|
40
|
+
*/
|
|
41
|
+
function i18nLoaderFactory(loader) {
|
|
42
|
+
return languages.reduce((acc, lang) => {
|
|
43
|
+
acc[lang] = () => loader(lang);
|
|
44
|
+
return acc;
|
|
45
|
+
}, {});
|
|
46
|
+
}
|
|
47
|
+
const providei18nScope = (scopeName, loader) => {
|
|
48
|
+
return provideTranslocoScope({
|
|
49
|
+
scope: scopeName,
|
|
50
|
+
loader: i18nLoaderFactory(loader)
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
class i18nModule {
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
56
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, exports: [TranslocoModule] }); }
|
|
57
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, providers: [i18nProvider()], imports: [TranslocoModule] }); }
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, decorators: [{
|
|
60
|
+
type: NgModule,
|
|
61
|
+
args: [{
|
|
62
|
+
exports: [TranslocoModule],
|
|
63
|
+
providers: [i18nProvider()]
|
|
64
|
+
}]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Generated bundle index. Do not edit.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
export { TranslocoHttpLoader, i18nFolderName, i18nModule, i18nProvider, providei18nScope };
|
|
72
|
+
//# sourceMappingURL=aril-i18n.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-i18n.mjs","sources":["../../projects/aril/i18n/src/folder-name-token.ts","../../projects/aril/i18n/src/loader.ts","../../projects/aril/i18n/src/provideI18n.ts","../../projects/aril/i18n/src/provideScope.ts","../../projects/aril/i18n/src/i18n.module.ts","../../projects/aril/i18n/aril-i18n.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const i18nFolderName = new InjectionToken<string>('i18nFolderName');\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\n\r\nimport { Translation, TranslocoLoader } from '@ngneat/transloco';\r\n\r\nimport { i18nFolderName } from './folder-name-token';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TranslocoHttpLoader implements TranslocoLoader {\r\n\tprivate http = inject(HttpClient);\r\n\tprivate folderUrl = inject(i18nFolderName);\r\n\r\n\tgetTranslation(lang: string) {\r\n\t\treturn this.http.get<Translation>(`./assets/${this.folderUrl}/i18n/${lang}.json`);\r\n\t}\r\n}\r\n","import { EnvironmentProviders, isDevMode } from '@angular/core';\r\n\r\nimport { provideTransloco } from '@ngneat/transloco';\r\n\r\nimport { TranslocoHttpLoader } from './loader';\r\n\r\nexport const i18nProvider = (): EnvironmentProviders[] => {\r\n\treturn provideTransloco({\r\n\t\tconfig: {\r\n\t\t\tavailableLangs: ['tr', 'en'],\r\n\t\t\tdefaultLang: 'tr',\r\n\t\t\tfallbackLang: 'tr',\r\n\t\t\treRenderOnLangChange: true,\r\n\t\t\tprodMode: !isDevMode()\r\n\t\t},\r\n\t\tloader: TranslocoHttpLoader\r\n\t});\r\n};\r\n","import { provideTranslocoScope } from '@ngneat/transloco';\r\n\r\nconst languages = ['tr', 'en'];\r\n\r\n/**\r\n * @param loader `(lang: string) => import(`./i18n/${lang}.json`)` to create a relative import to the correct dir\r\n */\r\nfunction i18nLoaderFactory(loader: (lang: string) => Promise<any>) {\r\n\treturn languages.reduce((acc: any, lang) => {\r\n\t\tacc[lang] = () => loader(lang);\r\n\t\treturn acc;\r\n\t}, {});\r\n}\r\n\r\nexport const providei18nScope = (scopeName: string, loader: (lang: string) => Promise<any>) => {\r\n\treturn provideTranslocoScope({\r\n\t\tscope: scopeName,\r\n\t\tloader: i18nLoaderFactory(loader)\r\n\t});\r\n};\r\n","import { NgModule } from '@angular/core';\r\n\r\nimport { TranslocoModule } from '@ngneat/transloco';\r\n\r\nimport { i18nProvider } from './provideI18n';\r\n\r\n@NgModule({\r\n\texports: [TranslocoModule],\r\n\tproviders: [i18nProvider()]\r\n})\r\nexport class i18nModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[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AC;AAC3B,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable } from '@angular/core';
|
|
3
|
+
import * as i2 from 'keycloak-angular';
|
|
4
|
+
import { KeycloakService, KeycloakEventType, KeycloakAuthGuard } from 'keycloak-angular';
|
|
5
|
+
import * as i1 from '@angular/router';
|
|
6
|
+
|
|
7
|
+
class KeycloakManager {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.keycloak = inject(KeycloakService);
|
|
10
|
+
this.defaultOptions = {
|
|
11
|
+
loadUserProfileAtStartUp: true,
|
|
12
|
+
initOptions: { onLoad: 'login-required' },
|
|
13
|
+
bearerExcludedUrls: ['/assets']
|
|
14
|
+
};
|
|
15
|
+
this.keycloak.keycloakEvents$.subscribe((event) => {
|
|
16
|
+
console.log('keycloakEvents', event);
|
|
17
|
+
switch (event.type) {
|
|
18
|
+
case KeycloakEventType.OnReady:
|
|
19
|
+
globalThis.keycloakService = this.keycloak;
|
|
20
|
+
break;
|
|
21
|
+
case KeycloakEventType.OnAuthError:
|
|
22
|
+
case KeycloakEventType.OnAuthLogout:
|
|
23
|
+
case KeycloakEventType.OnAuthRefreshError:
|
|
24
|
+
globalThis.keycloakService = null;
|
|
25
|
+
// this.keycloak.clearToken();
|
|
26
|
+
break;
|
|
27
|
+
// case KeycloakEventType.OnTokenExpired:
|
|
28
|
+
// this.keycloak.updateToken();
|
|
29
|
+
// break;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
init(configs) {
|
|
34
|
+
return this.keycloak.init({ ...this.defaultOptions, config: configs });
|
|
35
|
+
}
|
|
36
|
+
login(options) {
|
|
37
|
+
return this.keycloak.login(options);
|
|
38
|
+
}
|
|
39
|
+
logout(redirectUri) {
|
|
40
|
+
return this.keycloak.logout(redirectUri); // window.location.origin
|
|
41
|
+
}
|
|
42
|
+
isUserInRole(role, resource) {
|
|
43
|
+
return this.keycloak.isUserInRole(role, resource);
|
|
44
|
+
}
|
|
45
|
+
getUserRoles(realmRoles, resource) {
|
|
46
|
+
return this.keycloak.getUserRoles(realmRoles, resource);
|
|
47
|
+
}
|
|
48
|
+
isLoggedIn() {
|
|
49
|
+
return this.keycloak.isLoggedIn();
|
|
50
|
+
}
|
|
51
|
+
isTokenExpired(minValidity) {
|
|
52
|
+
return this.keycloak.isTokenExpired(minValidity);
|
|
53
|
+
}
|
|
54
|
+
updateToken(minValidity) {
|
|
55
|
+
return this.keycloak.updateToken(minValidity);
|
|
56
|
+
}
|
|
57
|
+
loadUserProfile(forceReload) {
|
|
58
|
+
return this.keycloak.loadUserProfile(forceReload);
|
|
59
|
+
}
|
|
60
|
+
getToken() {
|
|
61
|
+
return this.keycloak.getToken();
|
|
62
|
+
}
|
|
63
|
+
getUsername() {
|
|
64
|
+
return this.keycloak.getUsername();
|
|
65
|
+
}
|
|
66
|
+
clearToken() {
|
|
67
|
+
this.keycloak.clearToken();
|
|
68
|
+
}
|
|
69
|
+
addTokenToHeader(headers) {
|
|
70
|
+
return this.keycloak.addTokenToHeader(headers);
|
|
71
|
+
}
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: KeycloakManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
73
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: KeycloakManager, providedIn: 'root' }); }
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: KeycloakManager, decorators: [{
|
|
76
|
+
type: Injectable,
|
|
77
|
+
args: [{ providedIn: 'root' }]
|
|
78
|
+
}], ctorParameters: () => [] });
|
|
79
|
+
|
|
80
|
+
const authInterceptor = (req, next) => {
|
|
81
|
+
const token = globalThis.keycloakService?._instance?.token;
|
|
82
|
+
const authReq = req.clone({
|
|
83
|
+
setHeaders: {
|
|
84
|
+
Authorization: `Bearer ${token}`
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return next(authReq);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
class AuthGuard extends KeycloakAuthGuard {
|
|
91
|
+
constructor(router, keycloak) {
|
|
92
|
+
super(router, keycloak);
|
|
93
|
+
this.router = router;
|
|
94
|
+
this.keycloak = keycloak;
|
|
95
|
+
}
|
|
96
|
+
async isAccessAllowed(route, state) {
|
|
97
|
+
if (!this.authenticated) {
|
|
98
|
+
await this.keycloak.login({
|
|
99
|
+
redirectUri: window.location.origin + state.url
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const requiredRoles = route.data['roles'];
|
|
103
|
+
if (!Array.isArray(requiredRoles) || requiredRoles.length === 0) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
const authorized = requiredRoles.every((role) => this.roles.includes(role));
|
|
107
|
+
if (!authorized) {
|
|
108
|
+
console.error('User not authorized to access this route');
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
else
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, deps: [{ token: i1.Router }, { token: i2.KeycloakService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
115
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthGuard, decorators: [{
|
|
118
|
+
type: Injectable,
|
|
119
|
+
args: [{
|
|
120
|
+
providedIn: 'root'
|
|
121
|
+
}]
|
|
122
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.KeycloakService }] });
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Generated bundle index. Do not edit.
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
export { AuthGuard, KeycloakManager, authInterceptor };
|
|
129
|
+
//# sourceMappingURL=aril-keycloak.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-keycloak.mjs","sources":["../../projects/aril/keycloak/src/keycloak.manager.ts","../../projects/aril/keycloak/src/auth.interceptor.ts","../../projects/aril/keycloak/src/auth.guard.ts","../../projects/aril/keycloak/aril-keycloak.ts"],"sourcesContent":["import { HttpHeaders } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\n\r\nimport { KeycloakEventType, KeycloakOptions, KeycloakService } from 'keycloak-angular';\r\nimport { KeycloakLoginOptions } from 'keycloak-js';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class KeycloakManager {\r\n\tconstructor() {\r\n\t\tthis.keycloak.keycloakEvents$.subscribe((event) => {\r\n\t\t\tconsole.log('keycloakEvents', event);\r\n\r\n\t\t\tswitch (event.type) {\r\n\t\t\t\tcase KeycloakEventType.OnReady:\r\n\t\t\t\t\t(<any>globalThis).keycloakService = this.keycloak;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KeycloakEventType.OnAuthError:\r\n\t\t\t\tcase KeycloakEventType.OnAuthLogout:\r\n\t\t\t\tcase KeycloakEventType.OnAuthRefreshError:\r\n\t\t\t\t\t(<any>globalThis).keycloakService = null;\r\n\t\t\t\t\t// this.keycloak.clearToken();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t// case KeycloakEventType.OnTokenExpired:\r\n\t\t\t\t// \tthis.keycloak.updateToken();\r\n\t\t\t\t// \tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tpublic readonly keycloak = inject(KeycloakService);\r\n\r\n\tprivate defaultOptions: KeycloakOptions = {\r\n\t\tloadUserProfileAtStartUp: true,\r\n\t\tinitOptions: { onLoad: 'login-required' },\r\n\t\tbearerExcludedUrls: ['/assets']\r\n\t};\r\n\r\n\tinit(configs: any): Promise<boolean> {\r\n\t\treturn this.keycloak.init({ ...this.defaultOptions, config: configs });\r\n\t}\r\n\r\n\tlogin(options?: KeycloakLoginOptions): Promise<void> {\r\n\t\treturn this.keycloak.login(options);\r\n\t}\r\n\r\n\tlogout(redirectUri?: string): Promise<void> {\r\n\t\treturn this.keycloak.logout(redirectUri); // window.location.origin\r\n\t}\r\n\r\n\tisUserInRole(role: string, resource?: string): boolean {\r\n\t\treturn this.keycloak.isUserInRole(role, resource);\r\n\t}\r\n\r\n\tgetUserRoles(realmRoles?: boolean, resource?: string): string[] {\r\n\t\treturn this.keycloak.getUserRoles(realmRoles, resource);\r\n\t}\r\n\r\n\tisLoggedIn(): boolean {\r\n\t\treturn this.keycloak.isLoggedIn();\r\n\t}\r\n\r\n\tisTokenExpired(minValidity?: number): boolean {\r\n\t\treturn this.keycloak.isTokenExpired(minValidity);\r\n\t}\r\n\r\n\tupdateToken(minValidity?: number): Promise<boolean> {\r\n\t\treturn this.keycloak.updateToken(minValidity);\r\n\t}\r\n\r\n\tloadUserProfile(forceReload?: boolean): Promise<any> {\r\n\t\treturn this.keycloak.loadUserProfile(forceReload);\r\n\t}\r\n\r\n\tgetToken(): Promise<string> {\r\n\t\treturn this.keycloak.getToken();\r\n\t}\r\n\r\n\tgetUsername(): string {\r\n\t\treturn this.keycloak.getUsername();\r\n\t}\r\n\r\n\tclearToken(): void {\r\n\t\tthis.keycloak.clearToken();\r\n\t}\r\n\r\n\taddTokenToHeader(headers?: HttpHeaders): Observable<HttpHeaders> {\r\n\t\treturn this.keycloak.addTokenToHeader(headers);\r\n\t}\r\n}\r\n","import { HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http';\r\n\r\nexport const authInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => {\r\n\tconst token = (<any>globalThis).keycloakService?._instance?.token;\r\n\r\n\tconst authReq = req.clone({\r\n\t\tsetHeaders: {\r\n\t\t\tAuthorization: `Bearer ${token}`\r\n\t\t}\r\n\t});\r\n\r\n\treturn next(authReq);\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';\r\n\r\nimport { KeycloakAuthGuard, KeycloakService } from 'keycloak-angular';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class AuthGuard extends KeycloakAuthGuard {\r\n\tconstructor(\r\n\t\tprotected override readonly router: Router,\r\n\t\tprotected readonly keycloak: KeycloakService\r\n\t) {\r\n\t\tsuper(router, keycloak);\r\n\t}\r\n\r\n\tpublic async isAccessAllowed(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n\t\tif (!this.authenticated) {\r\n\t\t\tawait this.keycloak.login({\r\n\t\t\t\tredirectUri: window.location.origin + state.url\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst requiredRoles = route.data['roles'];\r\n\r\n\t\tif (!Array.isArray(requiredRoles) || requiredRoles.length === 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst authorized = requiredRoles.every((role) => this.roles.includes(role));\r\n\r\n\t\tif (!authorized) {\r\n\t\t\tconsole.error('User not authorized to access this route');\r\n\t\t\treturn false;\r\n\t\t} else return true;\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,eAAe,CAAA;AAC3B,IAAA,WAAA,GAAA;AAoBgB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAE3C,QAAA,IAAA,CAAA,cAAc,GAAoB;AACzC,YAAA,wBAAwB,EAAE,IAAI;AAC9B,YAAA,WAAW,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE;YACzC,kBAAkB,EAA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