@lenne.tech/ng-base 18.1.3 → 22.0.0
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/CLAUDE.md +55 -0
- package/LICENSE +2 -2
- package/README.md +237 -44
- package/fesm2022/lenne.tech-ng-base-ai.mjs +767 -0
- package/fesm2022/lenne.tech-ng-base-ai.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-auth-provide.mjs +939 -0
- package/fesm2022/lenne.tech-ng-base-auth-provide.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-auth.mjs +454 -0
- package/fesm2022/lenne.tech-ng-base-auth.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-bug-report-dialog-BRzVmKJr.mjs +825 -0
- package/fesm2022/lenne.tech-ng-base-bug-bug-report-dialog-BRzVmKJr.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-bug-report-service-DWoTb_iw.mjs +351 -0
- package/fesm2022/lenne.tech-ng-base-bug-bug-report-service-DWoTb_iw.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-capture-engine-TkjMDdqj.mjs +1046 -0
- package/fesm2022/lenne.tech-ng-base-bug-capture-engine-TkjMDdqj.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-constants-Brm2KGHi.mjs +4 -0
- package/fesm2022/lenne.tech-ng-base-bug-constants-Brm2KGHi.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-messages-BsP4fRQU.mjs +179 -0
- package/fesm2022/lenne.tech-ng-base-bug-messages-BsP4fRQU.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-provide.mjs +26 -0
- package/fesm2022/lenne.tech-ng-base-bug-provide.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-report-Tzlhe1Cm.mjs +62 -0
- package/fesm2022/lenne.tech-ng-base-bug-report-Tzlhe1Cm.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug-server.mjs +818 -0
- package/fesm2022/lenne.tech-ng-base-bug-server.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-bug.mjs +196 -0
- package/fesm2022/lenne.tech-ng-base-bug.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-files-ui.mjs +445 -0
- package/fesm2022/lenne.tech-ng-base-files-ui.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-files.mjs +474 -0
- package/fesm2022/lenne.tech-ng-base-files.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-server.mjs +408 -0
- package/fesm2022/lenne.tech-ng-base-server.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-share.mjs +76 -0
- package/fesm2022/lenne.tech-ng-base-share.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-sync.mjs +1096 -0
- package/fesm2022/lenne.tech-ng-base-sync.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-testing.mjs +171 -0
- package/fesm2022/lenne.tech-ng-base-testing.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-ui-provide.mjs +124 -0
- package/fesm2022/lenne.tech-ng-base-ui-provide.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-ui.mjs +34611 -0
- package/fesm2022/lenne.tech-ng-base-ui.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base-utils.mjs +287 -0
- package/fesm2022/lenne.tech-ng-base-utils.mjs.map +1 -0
- package/fesm2022/lenne.tech-ng-base.mjs +615 -910
- package/fesm2022/lenne.tech-ng-base.mjs.map +1 -1
- package/i18n/auth/de.json +17 -0
- package/i18n/auth/en.json +17 -0
- package/i18n/bug/de.json +85 -0
- package/i18n/bug/en.json +85 -0
- package/i18n/de.json +8 -0
- package/i18n/en.json +8 -0
- package/i18n/files/de.json +27 -0
- package/i18n/files/en.json +27 -0
- package/i18n/share/de.json +8 -0
- package/i18n/share/en.json +8 -0
- package/i18n/ui/de.json +38 -0
- package/i18n/ui/en.json +38 -0
- package/package.json +127 -58
- package/types/lenne.tech-ng-base-ai.d.ts +830 -0
- package/types/lenne.tech-ng-base-auth-provide.d.ts +603 -0
- package/types/lenne.tech-ng-base-auth.d.ts +320 -0
- package/types/lenne.tech-ng-base-bug-provide.d.ts +272 -0
- package/types/lenne.tech-ng-base-bug-rolldown-runtime-C25Le4-w.d.ts +1 -0
- package/types/lenne.tech-ng-base-bug-server.d.ts +316 -0
- package/types/lenne.tech-ng-base-bug.d.ts +202 -0
- package/types/lenne.tech-ng-base-files-ui.d.ts +116 -0
- package/types/lenne.tech-ng-base-files.d.ts +288 -0
- package/types/lenne.tech-ng-base-server.d.ts +262 -0
- package/types/lenne.tech-ng-base-share.d.ts +21 -0
- package/types/lenne.tech-ng-base-sync.d.ts +380 -0
- package/types/lenne.tech-ng-base-testing.d.ts +327 -0
- package/types/lenne.tech-ng-base-ui-provide.d.ts +65 -0
- package/types/lenne.tech-ng-base-ui.d.ts +7732 -0
- package/types/lenne.tech-ng-base-utils.d.ts +150 -0
- package/types/lenne.tech-ng-base.d.ts +503 -0
- package/ui/styles/components/accordion.css +3 -0
- package/ui/styles/components/alert-dialog.css +4 -0
- package/ui/styles/components/alert.css +3 -0
- package/ui/styles/components/aspect-ratio.css +3 -0
- package/ui/styles/components/attachment.css +4 -0
- package/ui/styles/components/autocomplete.css +4 -0
- package/ui/styles/components/avatar.css +3 -0
- package/ui/styles/components/badge.css +3 -0
- package/ui/styles/components/breadcrumb.css +3 -0
- package/ui/styles/components/bubble.css +3 -0
- package/ui/styles/components/button-group.css +3 -0
- package/ui/styles/components/button.css +3 -0
- package/ui/styles/components/calendar.css +5 -0
- package/ui/styles/components/card.css +3 -0
- package/ui/styles/components/checkbox.css +3 -0
- package/ui/styles/components/code-block.css +4 -0
- package/ui/styles/components/collapsible.css +3 -0
- package/ui/styles/components/combobox.css +5 -0
- package/ui/styles/components/command.css +5 -0
- package/ui/styles/components/context-menu.css +3 -0
- package/ui/styles/components/date-picker.css +7 -0
- package/ui/styles/components/dialog.css +4 -0
- package/ui/styles/components/drawer.css +3 -0
- package/ui/styles/components/dropdown-menu.css +3 -0
- package/ui/styles/components/empty.css +3 -0
- package/ui/styles/components/field.css +5 -0
- package/ui/styles/components/hover-card.css +3 -0
- package/ui/styles/components/index.css +91 -0
- package/ui/styles/components/input-group.css +6 -0
- package/ui/styles/components/input-otp.css +3 -0
- package/ui/styles/components/input.css +3 -0
- package/ui/styles/components/item.css +4 -0
- package/ui/styles/components/kbd.css +3 -0
- package/ui/styles/components/label.css +3 -0
- package/ui/styles/components/lt-breadcrumb.css +3 -0
- package/ui/styles/components/lt-bug-attachments.css +5 -0
- package/ui/styles/components/lt-bug-journey-timeline.css +5 -0
- package/ui/styles/components/lt-bug-report-dialog.css +15 -0
- package/ui/styles/components/lt-bug-report.css +4 -0
- package/ui/styles/components/lt-color-mode-button.css +3 -0
- package/ui/styles/components/lt-confirm-dialog.css +4 -0
- package/ui/styles/components/lt-data-view.css +5 -0
- package/ui/styles/components/lt-date-picker.css +3 -0
- package/ui/styles/components/lt-date-time-picker.css +5 -0
- package/ui/styles/components/lt-enter-action.css +2 -0
- package/ui/styles/components/lt-footer.css +3 -0
- package/ui/styles/components/lt-form-field.css +4 -0
- package/ui/styles/components/lt-header.css +5 -0
- package/ui/styles/components/lt-imports.css +21 -0
- package/ui/styles/components/lt-navigation-menu.css +3 -0
- package/ui/styles/components/lt-notice.css +3 -0
- package/ui/styles/components/lt-overlay-defaults.css +3 -0
- package/ui/styles/components/lt-page-card.css +3 -0
- package/ui/styles/components/lt-page-title.css +2 -0
- package/ui/styles/components/lt-password-input.css +4 -0
- package/ui/styles/components/lt-readonly-field.css +2 -0
- package/ui/styles/components/lt-select.css +4 -0
- package/ui/styles/components/lt-text-field.css +5 -0
- package/ui/styles/components/lt-toolbar-item.css +2 -0
- package/ui/styles/components/lt-toolbar.css +3 -0
- package/ui/styles/components/lt-tus-upload-component.css +5 -0
- package/ui/styles/components/marker.css +3 -0
- package/ui/styles/components/menubar.css +3 -0
- package/ui/styles/components/message-scroller.css +4 -0
- package/ui/styles/components/message.css +3 -0
- package/ui/styles/components/native-select.css +3 -0
- package/ui/styles/components/navigation-menu.css +3 -0
- package/ui/styles/components/pagination.css +4 -0
- package/ui/styles/components/popover.css +3 -0
- package/ui/styles/components/progress.css +3 -0
- package/ui/styles/components/questionnaire.css +4 -0
- package/ui/styles/components/radio-group.css +3 -0
- package/ui/styles/components/resizable.css +3 -0
- package/ui/styles/components/select.css +3 -0
- package/ui/styles/components/separator.css +3 -0
- package/ui/styles/components/sheet.css +4 -0
- package/ui/styles/components/sidebar.css +9 -0
- package/ui/styles/components/skeleton.css +3 -0
- package/ui/styles/components/slider.css +3 -0
- package/ui/styles/components/sonner.css +4 -0
- package/ui/styles/components/spinner.css +3 -0
- package/ui/styles/components/switch.css +3 -0
- package/ui/styles/components/table.css +3 -0
- package/ui/styles/components/tabs.css +4 -0
- package/ui/styles/components/textarea.css +3 -0
- package/ui/styles/components/toggle-group.css +4 -0
- package/ui/styles/components/toggle.css +3 -0
- package/ui/styles/components/tooltip.css +3 -0
- package/ui/styles/components/trace.css +3 -0
- package/ui/styles/components/typography.css +3 -0
- package/ui/styles/components/utils.css +2 -0
- package/ui/styles/core.css +137 -0
- package/ui/styles/palette.css +94 -0
- package/ui/styles/theme.css +14 -0
- package/ui/styles/transitions.css +131 -0
- package/base-cms/index.d.ts +0 -5
- package/base-cms/interfaces/base-cms-module-config.interface.d.ts +0 -16
- package/base-cms/pages/base-cms/base-cms.component.d.ts +0 -92
- package/base-cms/public-api.d.ts +0 -5
- package/base-components/components/breadcrumb/breadcrumb.component.d.ts +0 -10
- package/base-components/components/change-password/change-password.component.d.ts +0 -24
- package/base-components/components/checkbox/checkbox.component.d.ts +0 -12
- package/base-components/components/delete-account/delete-account.component.d.ts +0 -15
- package/base-components/components/fab-button/fab-button.component.d.ts +0 -16
- package/base-components/components/input/input.component.d.ts +0 -27
- package/base-components/components/loading-bar/loading-bar.component.d.ts +0 -17
- package/base-components/components/model-form/model-form-base.component.d.ts +0 -64
- package/base-components/components/model-form/model-form.component.d.ts +0 -139
- package/base-components/components/model-form-sub/model-form-sub.component.d.ts +0 -56
- package/base-components/components/model-table/model-table.component.d.ts +0 -115
- package/base-components/components/refence-input/refence-input.component.d.ts +0 -84
- package/base-components/components/select/select.component.d.ts +0 -25
- package/base-components/components/skeleton-loader/skeleton-loader.component.d.ts +0 -10
- package/base-components/components/tags/tags.component.d.ts +0 -60
- package/base-components/components/textarea/textarea.component.d.ts +0 -21
- package/base-components/components/toast/toast.component.d.ts +0 -19
- package/base-components/components/upload-image/upload-image.component.d.ts +0 -111
- package/base-components/directives/back-button.directive.d.ts +0 -9
- package/base-components/directives/context-menu.directive.d.ts +0 -22
- package/base-components/directives/sort.directive.d.ts +0 -15
- package/base-components/directives/stop-propagation.directive.d.ts +0 -10
- package/base-components/index.d.ts +0 -5
- package/base-components/pipes/ellipses.pipe.d.ts +0 -10
- package/base-components/public-api.d.ts +0 -26
- package/base-prototype/index.d.ts +0 -5
- package/base-prototype/pages/email-verification/email-verification.component.d.ts +0 -18
- package/base-prototype/pages/forgot-password/forgot-password.component.d.ts +0 -26
- package/base-prototype/pages/login/login.component.d.ts +0 -33
- package/base-prototype/pages/profile/profile.component.d.ts +0 -24
- package/base-prototype/pages/register/register.component.d.ts +0 -31
- package/base-prototype/pages/set-password/set-password.component.d.ts +0 -29
- package/base-prototype/public-api.d.ts +0 -9
- package/esm2022/base-cms/interfaces/base-cms-module-config.interface.mjs +0 -3
- package/esm2022/base-cms/lenne.tech-ng-base-base-cms.mjs +0 -5
- package/esm2022/base-cms/pages/base-cms/base-cms.component.mjs +0 -238
- package/esm2022/base-cms/public-api.mjs +0 -8
- package/esm2022/base-components/components/breadcrumb/breadcrumb.component.mjs +0 -23
- package/esm2022/base-components/components/change-password/change-password.component.mjs +0 -97
- package/esm2022/base-components/components/checkbox/checkbox.component.mjs +0 -38
- package/esm2022/base-components/components/delete-account/delete-account.component.mjs +0 -59
- package/esm2022/base-components/components/fab-button/fab-button.component.mjs +0 -24
- package/esm2022/base-components/components/input/input.component.mjs +0 -75
- package/esm2022/base-components/components/loading-bar/loading-bar.component.mjs +0 -37
- package/esm2022/base-components/components/model-form/model-form-base.component.mjs +0 -145
- package/esm2022/base-components/components/model-form/model-form.component.mjs +0 -591
- package/esm2022/base-components/components/model-form-sub/model-form-sub.component.mjs +0 -117
- package/esm2022/base-components/components/model-table/model-table.component.mjs +0 -478
- package/esm2022/base-components/components/refence-input/refence-input.component.mjs +0 -278
- package/esm2022/base-components/components/select/select.component.mjs +0 -62
- package/esm2022/base-components/components/skeleton-loader/skeleton-loader.component.mjs +0 -33
- package/esm2022/base-components/components/tags/tags.component.mjs +0 -227
- package/esm2022/base-components/components/textarea/textarea.component.mjs +0 -79
- package/esm2022/base-components/components/toast/toast.component.mjs +0 -69
- package/esm2022/base-components/components/upload-image/upload-image.component.mjs +0 -346
- package/esm2022/base-components/directives/back-button.directive.mjs +0 -25
- package/esm2022/base-components/directives/context-menu.directive.mjs +0 -112
- package/esm2022/base-components/directives/sort.directive.mjs +0 -61
- package/esm2022/base-components/directives/stop-propagation.directive.mjs +0 -24
- package/esm2022/base-components/lenne.tech-ng-base-base-components.mjs +0 -5
- package/esm2022/base-components/pipes/ellipses.pipe.mjs +0 -23
- package/esm2022/base-components/public-api.mjs +0 -30
- package/esm2022/base-prototype/lenne.tech-ng-base-base-prototype.mjs +0 -5
- package/esm2022/base-prototype/pages/email-verification/email-verification.component.mjs +0 -60
- package/esm2022/base-prototype/pages/forgot-password/forgot-password.component.mjs +0 -78
- package/esm2022/base-prototype/pages/login/login.component.mjs +0 -114
- package/esm2022/base-prototype/pages/profile/profile.component.mjs +0 -87
- package/esm2022/base-prototype/pages/register/register.component.mjs +0 -100
- package/esm2022/base-prototype/pages/set-password/set-password.component.mjs +0 -91
- package/esm2022/base-prototype/public-api.mjs +0 -11
- package/esm2022/lenne.tech-ng-base.mjs +0 -5
- package/esm2022/public-api.mjs +0 -25
- package/esm2022/shared/classes/auth.class.mjs +0 -14
- package/esm2022/shared/classes/basic-user.class.mjs +0 -49
- package/esm2022/shared/classes/graphql-enum.class.mjs +0 -10
- package/esm2022/shared/classes/graphql-meta.class.mjs +0 -345
- package/esm2022/shared/classes/graphql-type.class.mjs +0 -14
- package/esm2022/shared/classes/helper.class.mjs +0 -307
- package/esm2022/shared/classes/sort.class.mjs +0 -38
- package/esm2022/shared/classes/standard.class.mjs +0 -40
- package/esm2022/shared/decorators/debounce.decorator.mjs +0 -12
- package/esm2022/shared/enums/comparison-operator.enum.mjs +0 -16
- package/esm2022/shared/enums/graphql-request-type.enum.mjs +0 -10
- package/esm2022/shared/enums/logical-operator.enum.mjs +0 -10
- package/esm2022/shared/enums/skeleton-type.enum.mjs +0 -7
- package/esm2022/shared/enums/sort-order.enum.mjs +0 -6
- package/esm2022/shared/enums/toast-type.enum.mjs +0 -8
- package/esm2022/shared/functions/ws-client.function.mjs +0 -39
- package/esm2022/shared/interfaces/base-module-config.interface.mjs +0 -3
- package/esm2022/shared/interfaces/breadcrumb.interface.mjs +0 -2
- package/esm2022/shared/interfaces/can-component-deactivate.interface.mjs +0 -2
- package/esm2022/shared/interfaces/cms-enum-values.interface.mjs +0 -2
- package/esm2022/shared/interfaces/cms-field-config.interface.mjs +0 -2
- package/esm2022/shared/interfaces/cms-model-config.interface.mjs +0 -2
- package/esm2022/shared/interfaces/cms-table-field.interface.mjs +0 -2
- package/esm2022/shared/interfaces/combined-filter-input.interface.mjs +0 -2
- package/esm2022/shared/interfaces/compress-options.interface.mjs +0 -2
- package/esm2022/shared/interfaces/cropping-options.interface.mjs +0 -2
- package/esm2022/shared/interfaces/field-object.interface.mjs +0 -2
- package/esm2022/shared/interfaces/field.interface.mjs +0 -2
- package/esm2022/shared/interfaces/filter-input.interface.mjs +0 -2
- package/esm2022/shared/interfaces/find-args.interface.mjs +0 -2
- package/esm2022/shared/interfaces/graphql-crud-type.interface.mjs +0 -2
- package/esm2022/shared/interfaces/graphql-fields-object.interface.mjs +0 -2
- package/esm2022/shared/interfaces/graphql-options.interface.mjs +0 -2
- package/esm2022/shared/interfaces/graphql-plus-options.interfacen.mjs +0 -2
- package/esm2022/shared/interfaces/graphql-type-collection.interface.mjs +0 -2
- package/esm2022/shared/interfaces/login-config.interface.mjs +0 -2
- package/esm2022/shared/interfaces/register-config.interface.mjs +0 -2
- package/esm2022/shared/interfaces/single-filter-input.interface.mjs +0 -2
- package/esm2022/shared/interfaces/sort-input.interface.mjs +0 -2
- package/esm2022/shared/interfaces/time-components.interface.mjs +0 -2
- package/esm2022/shared/interfaces/toast.interface.mjs +0 -2
- package/esm2022/shared/lenne.tech-ng-base-shared.mjs +0 -5
- package/esm2022/shared/public-api.mjs +0 -74
- package/esm2022/shared/services/auth.service.mjs +0 -152
- package/esm2022/shared/services/breadcrumb.service.mjs +0 -69
- package/esm2022/shared/services/cms.service.mjs +0 -82
- package/esm2022/shared/services/file.service.mjs +0 -86
- package/esm2022/shared/services/forms.service.mjs +0 -61
- package/esm2022/shared/services/graphql-meta.service.mjs +0 -132
- package/esm2022/shared/services/graphql-plus.service.mjs +0 -93
- package/esm2022/shared/services/graphql.service.mjs +0 -510
- package/esm2022/shared/services/image.service.mjs +0 -102
- package/esm2022/shared/services/loader.service.mjs +0 -78
- package/esm2022/shared/services/navigation.service.mjs +0 -38
- package/esm2022/shared/services/scroll.service.mjs +0 -207
- package/esm2022/shared/services/storage.service.mjs +0 -149
- package/esm2022/shared/services/toast.service.mjs +0 -39
- package/esm2022/shared/services/user.service.mjs +0 -160
- package/esm2022/shared/services/ws.service.mjs +0 -17
- package/esm2022/shared/types/graphql-fields.type.mjs +0 -2
- package/esm2022/shared/types/storage.type.mjs +0 -2
- package/esm2022/shared/validators/email.validator.mjs +0 -7
- package/esm2022/shared/validators/match.validator.mjs +0 -22
- package/esm2022/shared/validators/secure-password.validator.mjs +0 -7
- package/esm2022/src/base.module.mjs +0 -64
- package/esm2022/src/decorators/auto-unsubscribe.decorator.mjs +0 -23
- package/esm2022/src/directives/lazy-load.directive.mjs +0 -48
- package/esm2022/src/directives/match-height.directive.mjs +0 -92
- package/esm2022/src/directives/resizable.directive.mjs +0 -92
- package/esm2022/src/factories/apollo-options.factory.mjs +0 -108
- package/esm2022/src/functions/extract-files.function.mjs +0 -87
- package/esm2022/src/guards/auth.guard.mjs +0 -91
- package/esm2022/src/guards/can-deactivate.guard.mjs +0 -16
- package/esm2022/src/guards/logout.guard.mjs +0 -34
- package/esm2022/src/pipes/date-ago.pipe.mjs +0 -64
- package/esm2022/src/pipes/safe-html.pipe.mjs +0 -22
- package/esm2022/src/services/fullscreen.service.mjs +0 -51
- package/esm2022/src/services/seo.service.mjs +0 -117
- package/esm2022/src/services/theme.service.mjs +0 -44
- package/fesm2022/lenne.tech-ng-base-base-cms.mjs +0 -251
- package/fesm2022/lenne.tech-ng-base-base-cms.mjs.map +0 -1
- package/fesm2022/lenne.tech-ng-base-base-components.mjs +0 -2917
- package/fesm2022/lenne.tech-ng-base-base-components.mjs.map +0 -1
- package/fesm2022/lenne.tech-ng-base-base-prototype.mjs +0 -505
- package/fesm2022/lenne.tech-ng-base-base-prototype.mjs.map +0 -1
- package/fesm2022/lenne.tech-ng-base-shared.mjs +0 -2863
- package/fesm2022/lenne.tech-ng-base-shared.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/public-api.d.ts +0 -17
- package/shared/classes/auth.class.d.ts +0 -10
- package/shared/classes/basic-user.class.d.ts +0 -27
- package/shared/classes/graphql-enum.class.d.ts +0 -7
- package/shared/classes/graphql-meta.class.d.ts +0 -66
- package/shared/classes/graphql-type.class.d.ts +0 -13
- package/shared/classes/helper.class.d.ts +0 -99
- package/shared/classes/sort.class.d.ts +0 -12
- package/shared/classes/standard.class.d.ts +0 -32
- package/shared/decorators/debounce.decorator.d.ts +0 -1
- package/shared/enums/comparison-operator.enum.d.ts +0 -14
- package/shared/enums/graphql-request-type.enum.d.ts +0 -8
- package/shared/enums/logical-operator.enum.d.ts +0 -8
- package/shared/enums/skeleton-type.enum.d.ts +0 -5
- package/shared/enums/sort-order.enum.d.ts +0 -4
- package/shared/enums/toast-type.enum.d.ts +0 -6
- package/shared/functions/ws-client.function.d.ts +0 -5
- package/shared/index.d.ts +0 -5
- package/shared/interfaces/base-module-config.interface.d.ts +0 -61
- package/shared/interfaces/breadcrumb.interface.d.ts +0 -4
- package/shared/interfaces/can-component-deactivate.interface.d.ts +0 -7
- package/shared/interfaces/cms-enum-values.interface.d.ts +0 -4
- package/shared/interfaces/cms-field-config.interface.d.ts +0 -45
- package/shared/interfaces/cms-model-config.interface.d.ts +0 -14
- package/shared/interfaces/cms-table-field.interface.d.ts +0 -10
- package/shared/interfaces/combined-filter-input.interface.d.ts +0 -9
- package/shared/interfaces/compress-options.interface.d.ts +0 -15
- package/shared/interfaces/cropping-options.interface.d.ts +0 -12
- package/shared/interfaces/field-object.interface.d.ts +0 -6
- package/shared/interfaces/field.interface.d.ts +0 -5
- package/shared/interfaces/filter-input.interface.d.ts +0 -9
- package/shared/interfaces/find-args.interface.d.ts +0 -11
- package/shared/interfaces/graphql-crud-type.interface.d.ts +0 -7
- package/shared/interfaces/graphql-fields-object.interface.d.ts +0 -6
- package/shared/interfaces/graphql-options.interface.d.ts +0 -11
- package/shared/interfaces/graphql-plus-options.interfacen.d.ts +0 -9
- package/shared/interfaces/graphql-type-collection.interface.d.ts +0 -7
- package/shared/interfaces/login-config.interface.d.ts +0 -6
- package/shared/interfaces/register-config.interface.d.ts +0 -4
- package/shared/interfaces/single-filter-input.interface.d.ts +0 -11
- package/shared/interfaces/sort-input.interface.d.ts +0 -5
- package/shared/interfaces/time-components.interface.d.ts +0 -6
- package/shared/interfaces/toast.interface.d.ts +0 -8
- package/shared/public-api.d.ts +0 -65
- package/shared/services/auth.service.d.ts +0 -44
- package/shared/services/breadcrumb.service.d.ts +0 -32
- package/shared/services/cms.service.d.ts +0 -27
- package/shared/services/file.service.d.ts +0 -22
- package/shared/services/forms.service.d.ts +0 -14
- package/shared/services/graphql-meta.service.d.ts +0 -45
- package/shared/services/graphql-plus.service.d.ts +0 -27
- package/shared/services/graphql.service.d.ts +0 -71
- package/shared/services/image.service.d.ts +0 -27
- package/shared/services/loader.service.d.ts +0 -32
- package/shared/services/navigation.service.d.ts +0 -15
- package/shared/services/scroll.service.d.ts +0 -85
- package/shared/services/storage.service.d.ts +0 -49
- package/shared/services/toast.service.d.ts +0 -15
- package/shared/services/user.service.d.ts +0 -77
- package/shared/services/ws.service.d.ts +0 -8
- package/shared/types/graphql-fields.type.d.ts +0 -5
- package/shared/types/storage.type.d.ts +0 -4
- package/shared/validators/email.validator.d.ts +0 -1
- package/shared/validators/match.validator.d.ts +0 -4
- package/shared/validators/secure-password.validator.d.ts +0 -1
- package/src/base.module.d.ts +0 -16
- package/src/decorators/auto-unsubscribe.decorator.d.ts +0 -5
- package/src/directives/lazy-load.directive.d.ts +0 -17
- package/src/directives/match-height.directive.d.ts +0 -20
- package/src/directives/resizable.directive.d.ts +0 -26
- package/src/factories/apollo-options.factory.d.ts +0 -16
- package/src/functions/extract-files.function.d.ts +0 -15
- package/src/guards/auth.guard.d.ts +0 -27
- package/src/guards/can-deactivate.guard.d.ts +0 -10
- package/src/guards/logout.guard.d.ts +0 -16
- package/src/pipes/date-ago.pipe.d.ts +0 -34
- package/src/pipes/safe-html.pipe.d.ts +0 -13
- package/src/services/fullscreen.service.d.ts +0 -18
- package/src/services/seo.service.d.ts +0 -61
- package/src/services/theme.service.d.ts +0 -17
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { LtAuthCallOptions, LtAuthFeatures, LtAuthMode, LtAuthResponse, LtNoStrayCredential, LtPasskey, LtPasskeyAuthResult, LtPasskeyRegisterResult, LtTwoFactorEnableResult, LtUser, LtUserInput } from "@lenne.tech/ng-base/auth/provide";
|
|
2
|
+
import { createAuthClient } from "better-auth/client";
|
|
3
|
+
import { LtApiUrlResolution, LtFetch } from "@lenne.tech/ng-base";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { Signal } from "@angular/core";
|
|
6
|
+
export * from "@lenne.tech/ng-base/auth/provide";
|
|
7
|
+
/** Configuration of {@link createLtAuthClient}. */
|
|
8
|
+
interface LtAuthClientConfig {
|
|
9
|
+
/** API origin (`''` for same-origin / proxy). */
|
|
10
|
+
baseURL: string;
|
|
11
|
+
/** Better Auth base path, e.g. `/iam` or `/api/iam` behind the dev proxy. */
|
|
12
|
+
basePath: string;
|
|
13
|
+
/** Register `adminClient()` (default `false`, see `LtAuthOptions.enableAdmin`). */
|
|
14
|
+
enableAdmin?: boolean;
|
|
15
|
+
/** Register `twoFactorClient()` (default `true`). */
|
|
16
|
+
enableTwoFactor?: boolean;
|
|
17
|
+
/** Fetch implementation (the auth-aware `LT_FETCH`). */
|
|
18
|
+
fetch?: LtFetch;
|
|
19
|
+
/** Called when a sign-in answers `twoFactorRedirect` (navigate to the 2FA page). */
|
|
20
|
+
onTwoFactorRedirect?: () => void | Promise<void>;
|
|
21
|
+
/** Additional Better Auth client plugins (e.g. `passkeyClient()` from `@better-auth/passkey/client`). */
|
|
22
|
+
plugins?: unknown[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The Better Auth client surface ng-base exposes. Every method that sends a credential hashes it with SHA-256 first
|
|
26
|
+
* (`{ ...params, field: sha256(field) }`, never a whitelist), so a plaintext password never leaves the browser.
|
|
27
|
+
*/
|
|
28
|
+
interface LtAuthClient {
|
|
29
|
+
/** The underlying Better Auth client (escape hatch; its methods do NOT hash). */
|
|
30
|
+
readonly raw: ReturnType<typeof createAuthClient>;
|
|
31
|
+
changePassword<T extends {
|
|
32
|
+
currentPassword: string;
|
|
33
|
+
newPassword: string;
|
|
34
|
+
revokeOtherSessions?: boolean;
|
|
35
|
+
}>(params: LtNoStrayCredential<T, 'currentPassword' | 'newPassword'>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
36
|
+
getSession(options?: LtAuthCallOptions): Promise<LtAuthResponse<{
|
|
37
|
+
session: Record<string, unknown>;
|
|
38
|
+
user: LtUser;
|
|
39
|
+
} | null>>;
|
|
40
|
+
passkey: {
|
|
41
|
+
deletePasskey(params: {
|
|
42
|
+
id: string;
|
|
43
|
+
}, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
44
|
+
listUserPasskeys(options?: LtAuthCallOptions): Promise<LtAuthResponse<LtPasskey[]>>;
|
|
45
|
+
updatePasskey(params: {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
}, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
49
|
+
};
|
|
50
|
+
requestPasswordReset<T extends {
|
|
51
|
+
email: string;
|
|
52
|
+
redirectTo?: string;
|
|
53
|
+
}>(params: LtNoStrayCredential<T, never>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
54
|
+
resetPassword<T extends {
|
|
55
|
+
newPassword: string;
|
|
56
|
+
token: string;
|
|
57
|
+
}>(params: LtNoStrayCredential<T, 'newPassword'>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
58
|
+
sendVerificationEmail<T extends {
|
|
59
|
+
callbackURL?: string;
|
|
60
|
+
email: string;
|
|
61
|
+
}>(params: LtNoStrayCredential<T, never>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
62
|
+
signIn: {
|
|
63
|
+
email<T extends {
|
|
64
|
+
callbackURL?: string;
|
|
65
|
+
email: string;
|
|
66
|
+
password: string;
|
|
67
|
+
rememberMe?: boolean;
|
|
68
|
+
}>(params: LtNoStrayCredential<T, 'password'>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
69
|
+
};
|
|
70
|
+
signOut(options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
71
|
+
signUp: {
|
|
72
|
+
email<T extends {
|
|
73
|
+
callbackURL?: string;
|
|
74
|
+
email: string;
|
|
75
|
+
name: string;
|
|
76
|
+
password: string;
|
|
77
|
+
}>(params: LtNoStrayCredential<T, 'password'>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
78
|
+
};
|
|
79
|
+
twoFactor: {
|
|
80
|
+
disable<T extends {
|
|
81
|
+
password: string;
|
|
82
|
+
}>(params: LtNoStrayCredential<T, 'password'>, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
83
|
+
enable<T extends {
|
|
84
|
+
issuer?: string;
|
|
85
|
+
password: string;
|
|
86
|
+
}>(params: LtNoStrayCredential<T, 'password'>, options?: LtAuthCallOptions): Promise<LtAuthResponse<LtTwoFactorEnableResult>>;
|
|
87
|
+
generateBackupCodes<T extends {
|
|
88
|
+
password: string;
|
|
89
|
+
}>(params: LtNoStrayCredential<T, 'password'>, options?: LtAuthCallOptions): Promise<LtAuthResponse<{
|
|
90
|
+
backupCodes: string[];
|
|
91
|
+
}>>;
|
|
92
|
+
verifyBackupCode(params: {
|
|
93
|
+
code: string;
|
|
94
|
+
disableSession?: boolean;
|
|
95
|
+
trustDevice?: boolean;
|
|
96
|
+
}, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
97
|
+
verifyTotp(params: {
|
|
98
|
+
code: string;
|
|
99
|
+
trustDevice?: boolean;
|
|
100
|
+
}, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
101
|
+
};
|
|
102
|
+
verifyEmail(params: {
|
|
103
|
+
callbackURL?: string;
|
|
104
|
+
token: string;
|
|
105
|
+
}, options?: LtAuthCallOptions): Promise<LtAuthResponse>;
|
|
106
|
+
}
|
|
107
|
+
/** Register extra Better Auth client plugins for every client created afterwards (prefer `provideLtAuth({ plugins })`). */
|
|
108
|
+
export declare function registerLtAuthPlugins(plugins: unknown[]): void;
|
|
109
|
+
/** Plugins registered via {@link registerLtAuthPlugins}. */
|
|
110
|
+
export declare function getLtAuthPluginRegistry(): readonly unknown[];
|
|
111
|
+
/** Clear the plugin registry (tests). */
|
|
112
|
+
export declare function clearLtAuthPluginRegistry(): void;
|
|
113
|
+
/**
|
|
114
|
+
* `baseURL` / `basePath` of the Better Auth client for an API URL resolution: behind the dev proxy the origin is the
|
|
115
|
+
* app itself (`''`) and the path gets the `/api` prefix (`/iam` → `/api/iam`), otherwise the API base URL with the
|
|
116
|
+
* configured path.
|
|
117
|
+
*/
|
|
118
|
+
export declare function resolveLtAuthClientBase(resolution: Pick<LtApiUrlResolution, 'baseUrl' | 'proxy'>, basePath: string): {
|
|
119
|
+
basePath: string;
|
|
120
|
+
baseURL: string;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Absolute Better Auth URL for `baseURL` + `basePath`.
|
|
124
|
+
*
|
|
125
|
+
* Better Auth rejects a relative `baseURL` ("Invalid base URL"), so an empty origin (same-origin deployment, dev proxy
|
|
126
|
+
* `/api/iam`) is resolved against the browser origin. Without a usable origin (server without API URL) the path is
|
|
127
|
+
* returned unchanged; such a client cannot reach the backend anyway.
|
|
128
|
+
*/
|
|
129
|
+
export declare function resolveLtAuthClientUrl(baseURL: string, basePath: string): string;
|
|
130
|
+
/**
|
|
131
|
+
* Create the hashing Better Auth client wrapper.
|
|
132
|
+
*
|
|
133
|
+
* Uses the framework-agnostic `better-auth/client` (`createAuthClient`) with `twoFactorClient()` (and `adminClient()` when
|
|
134
|
+
* enabled), the plugins of `config.plugins` and the registry, and the given fetch. Async because Better Auth is loaded
|
|
135
|
+
* on first use (see `LtAuthService.getClient()`, which shares one client per app).
|
|
136
|
+
*/
|
|
137
|
+
export declare function createLtAuthClient(config: LtAuthClientConfig): Promise<LtAuthClient>;
|
|
138
|
+
/**
|
|
139
|
+
* Authentication against nest-server's Better Auth integration (`/iam`), the Angular counterpart of `useLtAuth()`.
|
|
140
|
+
*
|
|
141
|
+
* A facade over {@link LtAuthStore} (`@lenne.tech/ng-base/auth/provide`): state, transport, session validation and
|
|
142
|
+
* sign-out are the store's (same signals, same methods), this service adds the flows that need Better Auth or WebAuthn
|
|
143
|
+
* — sign-in/up, 2FA, passkeys, password and email. Guards, the interceptor and `provideLtAuth()` use the store only, so
|
|
144
|
+
* this service (and Better Auth, loaded on first use) stays out of the initial bundle until a page injects it.
|
|
145
|
+
*
|
|
146
|
+
* State is signal-based and backed by the client-readable `lt-auth-state` cookie, so SSR renders the signed-in shell
|
|
147
|
+
* from the request cookie (UI gating only; the session itself is the httpOnly `iam.session_token`).
|
|
148
|
+
*
|
|
149
|
+
* Transport: session cookie first; when cookies do not work (401 while the state says signed in) the service switches
|
|
150
|
+
* to JWT mode (`GET /iam/token`, Bearer header) and refreshes a stale JWT once per burst. All credentials are SHA-256
|
|
151
|
+
* hashed before they leave the browser.
|
|
152
|
+
*/
|
|
153
|
+
export declare class LtAuthService {
|
|
154
|
+
private readonly store;
|
|
155
|
+
private readonly api;
|
|
156
|
+
private readonly options;
|
|
157
|
+
private readonly i18n;
|
|
158
|
+
private clientRequest;
|
|
159
|
+
/** Signed-in user (from the auth-state cookie, refreshed by `validateSession()` and every sign-in). */
|
|
160
|
+
readonly user: Signal<LtUser | null>;
|
|
161
|
+
/** Whether a user is signed in (UI gating; the backend decides). */
|
|
162
|
+
readonly isAuthenticated: Signal<boolean>;
|
|
163
|
+
/** Current transport. */
|
|
164
|
+
readonly authMode: Signal<LtAuthMode>;
|
|
165
|
+
/** Whether the JWT fallback is active. */
|
|
166
|
+
readonly isJwtMode: Signal<boolean>;
|
|
167
|
+
/** Whether a sign-in/up/out or passkey flow is running. */
|
|
168
|
+
readonly isLoading: Signal<boolean>;
|
|
169
|
+
/** Whether the user has the `admin` role (UX gate only). */
|
|
170
|
+
readonly isAdmin: Signal<boolean>;
|
|
171
|
+
/** Whether two-factor authentication is enabled for the user. */
|
|
172
|
+
readonly is2FAEnabled: Signal<boolean>;
|
|
173
|
+
/** nest-server feature flags (`GET /iam/features`); fetched on the server and transferred to the browser. */
|
|
174
|
+
readonly features: Signal<LtAuthFeatures>;
|
|
175
|
+
/** Whether passkeys can be used: enabled in the options, backend feature on and WebAuthn available in this browser. */
|
|
176
|
+
readonly passkeySupported: Signal<boolean>;
|
|
177
|
+
/**
|
|
178
|
+
* The hashing Better Auth client (see {@link LtAuthClient}), created once per app on first use. Better Auth is loaded
|
|
179
|
+
* lazily (dynamic import), so it is not part of the initial bundle; session state, guards, the interceptor and
|
|
180
|
+
* {@link fetchWithAuth} never need it. The client sends every request through {@link fetchWithAuth} (the same
|
|
181
|
+
* auth-aware fetch as `LT_FETCH`). During SSR it never carries the request's cookies, so do not use it on the
|
|
182
|
+
* server for anything that needs the user's session. A failed load is retried on the next call.
|
|
183
|
+
*/
|
|
184
|
+
getClient(): Promise<LtAuthClient>;
|
|
185
|
+
/** The current JWT (JWT mode only), or `null`. */
|
|
186
|
+
jwtToken(): string | null;
|
|
187
|
+
/** `user.role === role` or `user.roles` contains it (case-sensitive). */
|
|
188
|
+
hasRole(role: string): boolean;
|
|
189
|
+
/** Whether the user has any of the roles. */
|
|
190
|
+
hasAnyRole(...roles: string[]): boolean;
|
|
191
|
+
/** Fetch the feature flags (`GET /iam/features`, see {@link LtAuthStore.fetchFeatures}). */
|
|
192
|
+
fetchFeatures(): Promise<LtAuthFeatures>;
|
|
193
|
+
/** The feature flags, fetched at most once (transferred from SSR, or fetched on first call). */
|
|
194
|
+
ensureFeatures(): Promise<LtAuthFeatures>;
|
|
195
|
+
/**
|
|
196
|
+
* Email sign-in (password hashed). A second factor (`requiresTwoFactor` from nest-server or `twoFactorRedirect` from
|
|
197
|
+
* Better Auth) navigates to `twoFactorRedirectPath` (keeping the current `redirect` query parameter) and sets no user. A JWT-shaped body token (nest-server
|
|
198
|
+
* `cookies: false`) switches to JWT mode; otherwise the session cookie is used and a JWT is fetched in the background.
|
|
199
|
+
*/
|
|
200
|
+
readonly signIn: {
|
|
201
|
+
email: <T extends {
|
|
202
|
+
callbackURL?: string;
|
|
203
|
+
email: string;
|
|
204
|
+
password: string;
|
|
205
|
+
rememberMe?: boolean;
|
|
206
|
+
}>(params: LtNoStrayCredential<T, "password">, options?: LtAuthCallOptions) => Promise<LtAuthResponse>;
|
|
207
|
+
/** Passkey sign-in (same as {@link authenticateWithPasskey}). */
|
|
208
|
+
passkey: () => Promise<LtPasskeyAuthResult>;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Email sign-up (password hashed), same token handling as sign-in. With email verification nest-server answers
|
|
212
|
+
* `emailVerificationRequired: true` and revokes the session: no user is set, the caller leads to the verify page.
|
|
213
|
+
*/
|
|
214
|
+
readonly signUp: {
|
|
215
|
+
email: <T extends {
|
|
216
|
+
callbackURL?: string;
|
|
217
|
+
email: string;
|
|
218
|
+
name: string;
|
|
219
|
+
password: string;
|
|
220
|
+
}>(params: LtNoStrayCredential<T, "password">, options?: LtAuthCallOptions) => Promise<LtAuthResponse>;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Sign out: sign-out hooks (offline sync flush), `POST /iam/sign-out`, local state cleared, after-hooks (sync wipe).
|
|
224
|
+
* The local state is cleared even when the request fails (offline device). See {@link LtAuthStore.signOut}.
|
|
225
|
+
*/
|
|
226
|
+
signOut(options?: LtAuthCallOptions): Promise<void>;
|
|
227
|
+
/** Store the user in state and cookie (browser always; SSR never writes). `image: null` becomes `undefined`. */
|
|
228
|
+
setUser(user: LtUserInput | null, mode?: LtAuthMode): void;
|
|
229
|
+
/** Clear local auth state and cookies (browser). Does not delete offline data (use `signOut()` for that). */
|
|
230
|
+
clearUser(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Validate the session (app start / hard reload). Server: answers from the cookie, no backend call. Browser:
|
|
233
|
+
* `GET /iam/get-session` (≤ 10 s); a user is merged with the cached one (nest-server-only fields kept, authz keys
|
|
234
|
+
* fail-closed); no user but a cached one → `true` (e.g. right after 2FA); else `false`.
|
|
235
|
+
*/
|
|
236
|
+
validateSession(): Promise<boolean>;
|
|
237
|
+
/** The auth-aware fetch, also provided as `LT_FETCH` (see {@link LtAuthStore.fetchWithAuth}). */
|
|
238
|
+
fetchWithAuth(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
239
|
+
/** Token to retry a request with after a 401 (see {@link LtAuthStore.recoverFrom401}). */
|
|
240
|
+
recoverFrom401(url: string, sentToken: string | null): Promise<string | null>;
|
|
241
|
+
/** Session-loss handling for a 401 from `url` (see `LtUnauthorizedHandler`). */
|
|
242
|
+
handleUnauthorized(url?: string): Promise<boolean>;
|
|
243
|
+
/** `GET /iam/token` → store the JWT and switch to JWT mode. One request per burst. Browser only. */
|
|
244
|
+
switchToJwtMode(): Promise<boolean>;
|
|
245
|
+
/** Re-mint the JWT (JWT mode only). */
|
|
246
|
+
refreshJwtToken(): Promise<boolean>;
|
|
247
|
+
/** Passkey sign-in: options → `navigator.credentials.get` → `verify-authentication` (`challengeId`) → user set. */
|
|
248
|
+
authenticateWithPasskey(): Promise<LtPasskeyAuthResult>;
|
|
249
|
+
/** Register a passkey for the signed-in user (`challengeId` body as nest-server expects). */
|
|
250
|
+
registerPasskey(name?: string): Promise<LtPasskeyRegisterResult>;
|
|
251
|
+
/** Passkey management of the signed-in user. */
|
|
252
|
+
readonly passkey: {
|
|
253
|
+
delete: (id: string) => Promise<LtAuthResponse>;
|
|
254
|
+
list: () => Promise<LtAuthResponse<LtPasskey[]>>;
|
|
255
|
+
update: (id: string, name: string) => Promise<LtAuthResponse>;
|
|
256
|
+
};
|
|
257
|
+
/** Two-factor methods (passwords hashed). `verifyTotp` / `verifyBackupCode` set the user on success (fix vs. Nuxt). */
|
|
258
|
+
readonly twoFactor: {
|
|
259
|
+
disable: <T extends {
|
|
260
|
+
password: string;
|
|
261
|
+
}>(params: LtNoStrayCredential<T, "password">) => Promise<LtAuthResponse>;
|
|
262
|
+
enable: <T extends {
|
|
263
|
+
issuer?: string;
|
|
264
|
+
password: string;
|
|
265
|
+
}>(params: LtNoStrayCredential<T, "password">) => Promise<LtAuthResponse<LtTwoFactorEnableResult>>;
|
|
266
|
+
generateBackupCodes: <T extends {
|
|
267
|
+
password: string;
|
|
268
|
+
}>(params: LtNoStrayCredential<T, "password">) => Promise<LtAuthResponse<{
|
|
269
|
+
backupCodes: string[];
|
|
270
|
+
}>>;
|
|
271
|
+
verifyBackupCode: (params: {
|
|
272
|
+
code: string;
|
|
273
|
+
trustDevice?: boolean;
|
|
274
|
+
}) => Promise<LtAuthResponse>;
|
|
275
|
+
verifyTotp: (params: {
|
|
276
|
+
code: string;
|
|
277
|
+
trustDevice?: boolean;
|
|
278
|
+
}) => Promise<LtAuthResponse>;
|
|
279
|
+
};
|
|
280
|
+
/** `POST /iam/change-password` (both passwords hashed; `revokeOtherSessions` forwarded). */
|
|
281
|
+
changePassword<T extends {
|
|
282
|
+
currentPassword: string;
|
|
283
|
+
newPassword: string;
|
|
284
|
+
revokeOtherSessions?: boolean;
|
|
285
|
+
}>(params: LtNoStrayCredential<T, 'currentPassword' | 'newPassword'>): Promise<LtAuthResponse>;
|
|
286
|
+
/** `POST /iam/request-password-reset`; `redirectTo` defaults to `<siteUrl>/auth/reset-password` (absolute, never user-derived). */
|
|
287
|
+
requestPasswordReset<T extends {
|
|
288
|
+
email: string;
|
|
289
|
+
redirectTo?: string;
|
|
290
|
+
}>(params: LtNoStrayCredential<T, never>): Promise<LtAuthResponse>;
|
|
291
|
+
/** `POST /iam/reset-password` with `{ newPassword (hashed), token }`. */
|
|
292
|
+
resetPassword<T extends {
|
|
293
|
+
newPassword: string;
|
|
294
|
+
token: string;
|
|
295
|
+
}>(params: LtNoStrayCredential<T, 'newPassword'>): Promise<LtAuthResponse>;
|
|
296
|
+
/** `POST /iam/send-verification-email`; `callbackURL` defaults to `<siteUrl>/auth/login` (absolute). */
|
|
297
|
+
sendVerificationEmail<T extends {
|
|
298
|
+
callbackURL?: string;
|
|
299
|
+
email: string;
|
|
300
|
+
}>(params: LtNoStrayCredential<T, never>): Promise<LtAuthResponse>;
|
|
301
|
+
/** `GET /iam/verify-email?token=` (JSON answer without `callbackURL`). */
|
|
302
|
+
verifyEmail(params: {
|
|
303
|
+
callbackURL?: string;
|
|
304
|
+
token: string;
|
|
305
|
+
}): Promise<LtAuthResponse>;
|
|
306
|
+
/**
|
|
307
|
+
* Build an absolute app URL from `NG_PUBLIC_SITE_URL` (or the browser origin), for `redirectTo` / `callbackURL`.
|
|
308
|
+
* Never derived from the request: on the server without a site URL it throws. Absolute input is returned unchanged.
|
|
309
|
+
*/
|
|
310
|
+
absoluteAppUrl(path: string): string;
|
|
311
|
+
/**
|
|
312
|
+
* After a successful 2FA verification: see {@link LtAuthStore.adoptVerifiedSession} (a JWT in the answer → JWT mode,
|
|
313
|
+
* else cookie mode; Better Auth's opaque session token is never stored as JWT, that would put the session into a
|
|
314
|
+
* script-readable cookie).
|
|
315
|
+
*/
|
|
316
|
+
private adoptVerifiedSession;
|
|
317
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LtAuthService, never>;
|
|
318
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
319
|
+
}
|
|
320
|
+
export type { LtAuthClient, LtAuthClientConfig };
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { EnvironmentProviders, InjectionToken } from "@angular/core";
|
|
2
|
+
/** Kind of report; mapped onto a Linear label (`bug`, `feature`, `enhancement`, `other`). */
|
|
3
|
+
type LtBugReportType = 'bug' | 'enhancement' | 'feature' | 'other';
|
|
4
|
+
/** Corner of the floating report button. */
|
|
5
|
+
type LtBugPosition = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
6
|
+
/** Background of the screenshot: `auto` follows the app color mode (`html.dark`, `color-scheme`, system preference). */
|
|
7
|
+
type LtBugTheme = 'auto' | 'dark' | 'light';
|
|
8
|
+
/** Browser, system and performance details attached to a report. URLs are redacted. */
|
|
9
|
+
interface LtBrowserInfo {
|
|
10
|
+
browser: {
|
|
11
|
+
name: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
};
|
|
14
|
+
cookieEnabled: boolean;
|
|
15
|
+
language: string;
|
|
16
|
+
languages: string[];
|
|
17
|
+
onLine: boolean;
|
|
18
|
+
os: {
|
|
19
|
+
name: string;
|
|
20
|
+
version: string;
|
|
21
|
+
};
|
|
22
|
+
performance?: {
|
|
23
|
+
domComplete: number;
|
|
24
|
+
domContentLoaded: number;
|
|
25
|
+
firstContentfulPaint: number | null;
|
|
26
|
+
firstPaint: number | null;
|
|
27
|
+
loadTime: number;
|
|
28
|
+
navigationStart: number;
|
|
29
|
+
responseEnd: number;
|
|
30
|
+
};
|
|
31
|
+
platform: string;
|
|
32
|
+
referrer: string;
|
|
33
|
+
screen: {
|
|
34
|
+
colorDepth: number;
|
|
35
|
+
height: number;
|
|
36
|
+
pixelDepth: number;
|
|
37
|
+
width: number;
|
|
38
|
+
};
|
|
39
|
+
timestamp: string;
|
|
40
|
+
timezone: string;
|
|
41
|
+
title: string;
|
|
42
|
+
url: string;
|
|
43
|
+
userAgent: string;
|
|
44
|
+
vendor: string;
|
|
45
|
+
viewport: {
|
|
46
|
+
height: number;
|
|
47
|
+
width: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** One captured console call (CSS `%c` styling removed, secrets redacted). */
|
|
51
|
+
interface LtConsoleLogEntry {
|
|
52
|
+
level: 'debug' | 'error' | 'info' | 'log' | 'warn';
|
|
53
|
+
message: string[];
|
|
54
|
+
stack?: string;
|
|
55
|
+
timestamp: string;
|
|
56
|
+
}
|
|
57
|
+
/** One captured `fetch` / `XMLHttpRequest` call (sensitive headers and auth bodies are never recorded). */
|
|
58
|
+
interface LtNetworkRequestEntry {
|
|
59
|
+
duration?: number;
|
|
60
|
+
error?: string;
|
|
61
|
+
method: string;
|
|
62
|
+
requestBody?: string;
|
|
63
|
+
requestHeaders?: Record<string, string>;
|
|
64
|
+
responseBody?: string;
|
|
65
|
+
responseHeaders?: Record<string, string>;
|
|
66
|
+
status: number;
|
|
67
|
+
statusText: string;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
type: 'fetch' | 'xhr';
|
|
70
|
+
url: string;
|
|
71
|
+
}
|
|
72
|
+
/** Kind of a user journey event. */
|
|
73
|
+
type LtUserInteractionType = 'click' | 'error' | 'form_change' | 'form_submit' | 'hover' | 'input_change' | 'keyboard' | 'modal_close' | 'modal_open' | 'navigation' | 'scroll';
|
|
74
|
+
/** Details of a user journey event. */
|
|
75
|
+
interface LtUserInteractionMetadata {
|
|
76
|
+
[key: string]: unknown;
|
|
77
|
+
classes?: string[];
|
|
78
|
+
element?: string;
|
|
79
|
+
errorMessage?: string;
|
|
80
|
+
fromUrl?: string;
|
|
81
|
+
id?: string;
|
|
82
|
+
key?: string;
|
|
83
|
+
scrollPosition?: number;
|
|
84
|
+
tag?: string;
|
|
85
|
+
text?: string;
|
|
86
|
+
toUrl?: string;
|
|
87
|
+
url?: string;
|
|
88
|
+
value?: string;
|
|
89
|
+
}
|
|
90
|
+
/** One user journey event (click, navigation, form interaction, keyboard shortcut, error, dialog). */
|
|
91
|
+
interface LtUserInteractionEvent {
|
|
92
|
+
metadata?: LtUserInteractionMetadata;
|
|
93
|
+
target: string;
|
|
94
|
+
timestamp: string;
|
|
95
|
+
type: LtUserInteractionType;
|
|
96
|
+
}
|
|
97
|
+
/** A captured error (Angular `ErrorHandler`, uncaught error, unhandled rejection or `reportError()`). */
|
|
98
|
+
interface LtBugErrorInfo {
|
|
99
|
+
/** Where the error came from (`ErrorHandler`, `window`, or the source passed to `reportError()`). */
|
|
100
|
+
componentName?: string;
|
|
101
|
+
message: string;
|
|
102
|
+
stack?: string;
|
|
103
|
+
timestamp: string;
|
|
104
|
+
url?: string;
|
|
105
|
+
userAgent?: string;
|
|
106
|
+
}
|
|
107
|
+
/** A file attached to a report (`data` is a base64 data URL). */
|
|
108
|
+
interface LtBugAttachment {
|
|
109
|
+
data: string;
|
|
110
|
+
id: string;
|
|
111
|
+
isScreenshot?: boolean;
|
|
112
|
+
name: string;
|
|
113
|
+
/** Data URL for the thumbnail (images only); never sent to the server. */
|
|
114
|
+
preview?: string;
|
|
115
|
+
size: number;
|
|
116
|
+
type: string;
|
|
117
|
+
}
|
|
118
|
+
/** The report sent to the server endpoint (`POST /_bug-lt/report`). */
|
|
119
|
+
interface LtBugReportData {
|
|
120
|
+
attachments?: Omit<LtBugAttachment, 'preview'>[];
|
|
121
|
+
browserInfo?: LtBrowserInfo;
|
|
122
|
+
consoleLogs?: LtConsoleLogEntry[];
|
|
123
|
+
description: string;
|
|
124
|
+
expectedBehavior?: string;
|
|
125
|
+
networkRequests?: LtNetworkRequestEntry[];
|
|
126
|
+
/** Legacy single screenshot (data URL); the browser sends the screenshot as an attachment instead. */
|
|
127
|
+
screenshot?: string;
|
|
128
|
+
stepsToReproduce?: string;
|
|
129
|
+
title: string;
|
|
130
|
+
type: LtBugReportType;
|
|
131
|
+
userInteractions?: LtUserInteractionEvent[];
|
|
132
|
+
}
|
|
133
|
+
/** Answer of the server endpoint. */
|
|
134
|
+
interface LtBugReportResponse {
|
|
135
|
+
error?: string;
|
|
136
|
+
identifier?: string;
|
|
137
|
+
issueId?: string;
|
|
138
|
+
issueUrl?: string;
|
|
139
|
+
message?: string;
|
|
140
|
+
success: boolean;
|
|
141
|
+
}
|
|
142
|
+
/** User journey options (`provideLtBug({ userJourney })`). */
|
|
143
|
+
interface LtBugUserJourneyOptions {
|
|
144
|
+
/** Record clicks (default `true`). */
|
|
145
|
+
captureClicks?: boolean;
|
|
146
|
+
/** Record errors (default `true`). */
|
|
147
|
+
captureErrors?: boolean;
|
|
148
|
+
/** Record submit and change events of form fields (default `true`). */
|
|
149
|
+
captureFormInteractions?: boolean;
|
|
150
|
+
/** Record hovered elements, throttled (default `false`, noisy). */
|
|
151
|
+
captureHover?: boolean;
|
|
152
|
+
/** Record typing in text fields, throttled (default `false`; values only with `captureInputValues`). */
|
|
153
|
+
captureInputChanges?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Record the values of form fields (default `false`). Values of password fields, of fields with `autocomplete`
|
|
156
|
+
* `current-password` / `new-password` / `one-time-code` / `cc-*` and of fields named like tokens, secrets, PINs or card
|
|
157
|
+
* numbers are never recorded, not even with this option.
|
|
158
|
+
*/
|
|
159
|
+
captureInputValues?: boolean;
|
|
160
|
+
/** Record keyboard shortcuts (with Ctrl/Meta/Alt); typed text is never recorded (default `true`). */
|
|
161
|
+
captureKeyboard?: boolean;
|
|
162
|
+
/** Record dialogs that open and close (`role="dialog"`, `role="alertdialog"`, `<dialog open>`) (default `true`). */
|
|
163
|
+
captureModalEvents?: boolean;
|
|
164
|
+
/** Record navigation (`Router` events, `popstate` without a router) (default `true`). */
|
|
165
|
+
captureNavigation?: boolean;
|
|
166
|
+
/** Record the scroll position, throttled (default `false`, noisy). */
|
|
167
|
+
captureScroll?: boolean;
|
|
168
|
+
/** Record the user journey at all (default `true`). */
|
|
169
|
+
enabled?: boolean;
|
|
170
|
+
/** Ring buffer size (default `50`). */
|
|
171
|
+
maxEvents?: number;
|
|
172
|
+
/** Throttle interval of hover, scroll and input events in ms (default `100`). */
|
|
173
|
+
throttleRate?: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Options of `provideLtBug()`, the counterpart of the `bug` block of `@lenne.tech/bug.lt` in `nuxt.config.ts`.
|
|
177
|
+
* Linear credentials are not part of it: they live on the server only (`ltBugReport()` from
|
|
178
|
+
* `@lenne.tech/ng-base/bug/server`).
|
|
179
|
+
*/
|
|
180
|
+
interface LtBugOptions {
|
|
181
|
+
/** Open the dialog automatically when an error is captured (default `false`). */
|
|
182
|
+
autoOpenOnError?: boolean;
|
|
183
|
+
/** Render the floating button of `<lt-bug-report>` (default `true`); `false` keeps only programmatic opening. */
|
|
184
|
+
autoShow?: boolean;
|
|
185
|
+
/** Button background color (default `#dc2626`, white text on it meets WCAG AA). */
|
|
186
|
+
buttonColor?: string;
|
|
187
|
+
/** ng-icons name of the button icon (default the Lucide bug icon); register custom icons with `provideIcons()`. */
|
|
188
|
+
buttonIcon?: string;
|
|
189
|
+
/** Text next to the icon (default none: round icon button). */
|
|
190
|
+
buttonText?: string;
|
|
191
|
+
/** Capture browser, OS, viewport and performance details (default `true`). */
|
|
192
|
+
enableBrowserInfo?: boolean;
|
|
193
|
+
/** Capture console output (default `true`). */
|
|
194
|
+
enableConsoleLogs?: boolean;
|
|
195
|
+
/** Capture errors through the app's `ErrorHandler` and window error events (default `true`). */
|
|
196
|
+
enableErrorBoundary?: boolean;
|
|
197
|
+
/** Capture `fetch` and `XMLHttpRequest` calls (default `true`). */
|
|
198
|
+
enableNetworkRequests?: boolean;
|
|
199
|
+
/** Take a viewport screenshot before the dialog opens (default `true`; needs the optional peer `modern-screenshot`). */
|
|
200
|
+
enableScreenshot?: boolean;
|
|
201
|
+
/** Capture the user journey (default `true`; see {@link userJourney}). */
|
|
202
|
+
enableUserJourney?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Force the reporter on or off. Default: decided at runtime, on unless the app env (`NG_PUBLIC_APP_ENV`) is
|
|
205
|
+
* `production`; without an app env only in dev mode (`isDevMode()`), so a production build fails closed.
|
|
206
|
+
*/
|
|
207
|
+
enabled?: boolean;
|
|
208
|
+
/** Server endpoint (default `/_bug-lt/report`, outside `/api` so an API proxy does not swallow it). */
|
|
209
|
+
endpoint?: string;
|
|
210
|
+
/** Console ring buffer size (default `50`). */
|
|
211
|
+
maxConsoleLogs?: number;
|
|
212
|
+
/** Network ring buffer size (default `50`). */
|
|
213
|
+
maxNetworkRequests?: number;
|
|
214
|
+
/** Button corner (default `bottom-right`). */
|
|
215
|
+
position?: LtBugPosition;
|
|
216
|
+
/** Screenshot background (default `auto`). */
|
|
217
|
+
theme?: LtBugTheme;
|
|
218
|
+
/** User journey options. */
|
|
219
|
+
userJourney?: LtBugUserJourneyOptions;
|
|
220
|
+
}
|
|
221
|
+
/** {@link LtBugOptions} with every default applied. */
|
|
222
|
+
interface LtResolvedBugOptions extends Required<Omit<LtBugOptions, 'buttonIcon' | 'buttonText' | 'enabled' | 'userJourney'>> {
|
|
223
|
+
buttonIcon?: string;
|
|
224
|
+
buttonText?: string;
|
|
225
|
+
enabled?: boolean;
|
|
226
|
+
userJourney: Required<LtBugUserJourneyOptions>;
|
|
227
|
+
}
|
|
228
|
+
/** Options passed to `provideLtBug()`; `null` when the provider is missing (the reporter stays off). */
|
|
229
|
+
export declare const LT_BUG_INPUT_OPTIONS: InjectionToken<LtBugOptions | null>;
|
|
230
|
+
/** Dev mode flag used for the fail-closed decision (a token so tests can simulate a production build). */
|
|
231
|
+
export declare const LT_BUG_DEV_MODE: InjectionToken<boolean>;
|
|
232
|
+
/**
|
|
233
|
+
* Whether the bug reporter is on in this app and stage: `provideLtBug()` is present and the runtime decision
|
|
234
|
+
* ({@link isLtBugActive}) says on. The same on the server and in the browser (no hydration mismatch), so the app
|
|
235
|
+
* shell can keep the reporter's chunk out of production entirely:
|
|
236
|
+
*
|
|
237
|
+
* @example app.html
|
|
238
|
+
* @if (bugActive) { @defer (on immediate) { <lt-bug-report /> } }
|
|
239
|
+
*/
|
|
240
|
+
export declare const LT_BUG_ACTIVE: InjectionToken<boolean>;
|
|
241
|
+
/**
|
|
242
|
+
* Whether the reporter is active (decided at runtime, so one build serves every stage):
|
|
243
|
+
*
|
|
244
|
+
* 1. `enabled` set explicitly wins.
|
|
245
|
+
* 2. App env (`NG_PUBLIC_APP_ENV`) `production` / `prod` → off, any other value → on.
|
|
246
|
+
* 3. No app env → only in dev mode (`isDevMode()`): a production build without the variable fails closed.
|
|
247
|
+
*/
|
|
248
|
+
export declare function isLtBugActive(options: Pick<LtBugOptions, 'enabled'>, appEnv: unknown, devMode: boolean): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Opt-in bug reporter (the Angular counterpart of the `@lenne.tech/bug.lt` Nuxt module): captures console output,
|
|
251
|
+
* `fetch`/`XMLHttpRequest` calls, the user journey and errors, and lets the user send a report with screenshot to
|
|
252
|
+
* Linear through `ltBugReport()` from `@lenne.tech/ng-base/bug/server`.
|
|
253
|
+
*
|
|
254
|
+
* Active only when the app env (`LT_RUNTIME_CONFIG.appEnv`, `NG_PUBLIC_APP_ENV`) is not `production`, decided at
|
|
255
|
+
* runtime so one image serves every stage; without an app env only in dev mode (a production build fails closed).
|
|
256
|
+
* `enabled` (or `NG_PUBLIC_LT_BUG_ENABLED`) overrides the decision.
|
|
257
|
+
*
|
|
258
|
+
* This provider carries only the options: nothing of the reporter is in the initial bundle. `<lt-bug-report>` (from
|
|
259
|
+
* `@lenne.tech/ng-base/bug`) starts the capture when it is created, so render it deferred and only while
|
|
260
|
+
* {@link LT_BUG_ACTIVE} is `true`: production then never loads the reporter, the other stages start capturing right
|
|
261
|
+
* after the first render (`on immediate`).
|
|
262
|
+
*
|
|
263
|
+
* @example app.config.ts
|
|
264
|
+
* import { provideLtBug } from '@lenne.tech/ng-base/bug/provide';
|
|
265
|
+
* providers: [provideLtNgBase(), provideLtUi(), provideLtBug({ autoOpenOnError: true })]
|
|
266
|
+
*
|
|
267
|
+
* @example app.ts / app.html
|
|
268
|
+
* protected readonly bugActive = inject(LT_BUG_ACTIVE);
|
|
269
|
+
* @if (bugActive) { @defer (on immediate) { <lt-bug-report /> } }
|
|
270
|
+
*/
|
|
271
|
+
export declare function provideLtBug(options?: LtBugOptions): EnvironmentProviders;
|
|
272
|
+
export type { LtBrowserInfo, LtBugAttachment, LtBugErrorInfo, LtBugOptions, LtBugPosition, LtBugReportData, LtBugReportResponse, LtBugReportType, LtBugTheme, LtBugUserJourneyOptions, LtConsoleLogEntry, LtNetworkRequestEntry, LtResolvedBugOptions, LtUserInteractionEvent, LtUserInteractionMetadata, LtUserInteractionType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { __reExport as n, __exportAll as t };
|