@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
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @lenne.tech/ng-base — notes for AI coding agents in consuming apps
|
|
2
|
+
|
|
3
|
+
This file ships with the package. It tells an agent working in an app (ng-base-starter, a generated lt project, or a
|
|
4
|
+
vendored copy in `projects/app/src/core/`) how to use the library correctly.
|
|
5
|
+
|
|
6
|
+
## Where things are
|
|
7
|
+
|
|
8
|
+
| Need | Import |
|
|
9
|
+
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------- |
|
|
10
|
+
| Runtime config, API URLs, cookies, i18n, toasts, error translation | `@lenne.tech/ng-base` |
|
|
11
|
+
| Providers, guards, interceptor, auth state (`LtAuthStore`), first-admin setup — for `app.config.ts`/routes | `@lenne.tech/ng-base/auth/provide` |
|
|
12
|
+
| Sign-in/up, 2FA, passkeys, password/e-mail flows (`LtAuthService`, loads Better Auth lazily) | `@lenne.tech/ng-base/auth` |
|
|
13
|
+
| `provideLtUi()`, color mode — for `app.config.ts` | `@lenne.tech/ng-base/ui/provide` |
|
|
14
|
+
| Spartan helm (`Hlm*`), `lt-*` components, overlays, transitions | `@lenne.tech/ng-base/ui` |
|
|
15
|
+
| TUS upload, file URLs (`<lt-tus-upload>`: `@lenne.tech/ng-base/files/ui`) | `@lenne.tech/ng-base/files` |
|
|
16
|
+
| AI services and chat | `@lenne.tech/ng-base/ai` |
|
|
17
|
+
| Offline sync | `@lenne.tech/ng-base/sync` |
|
|
18
|
+
| Bug reporter `provideLtBug()`, `LT_BUG_ACTIVE` — for `app.config.ts` and the app shell | `@lenne.tech/ng-base/bug/provide` |
|
|
19
|
+
| `<lt-bug-report>`, `LtBugReportService`; report endpoint for `server.ts`: `…/bug/server` | `@lenne.tech/ng-base/bug` |
|
|
20
|
+
| SSR server helpers (`server.ts` only) | `@lenne.tech/ng-base/server` |
|
|
21
|
+
| Playwright helpers (E2E only) | `@lenne.tech/ng-base/testing` |
|
|
22
|
+
| SEO, storage, scroll, form focus, model mapping | `@lenne.tech/ng-base/utils` |
|
|
23
|
+
|
|
24
|
+
In vendor mode the same specifiers resolve to `src/core/` through `tsconfig` `paths`; never import `src/core/...`
|
|
25
|
+
relatively. Changes to the vendored core belong upstream in `lenneTech/ng-base`.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- Auth goes through `LtAuthService` only. Never send a plaintext password: the service hashes every credential
|
|
30
|
+
(SHA-256) itself, so pass the raw form value once and never hash it yourself as well.
|
|
31
|
+
- `lt-auth-state` is a UI cache. Guards (`ltAuthGuard`, `ltRoleGuard`) gate UI only; the backend authorises every
|
|
32
|
+
request. Do not build security decisions on `isAdmin()`.
|
|
33
|
+
- Redirect/callback URLs for auth mails are absolute app URLs from `NG_PUBLIC_SITE_URL` (`LtAuthService.absoluteAppUrl`),
|
|
34
|
+
never derived from user input or the request.
|
|
35
|
+
- `HttpClient` calls to the API need `ltAuthInterceptor` in `provideHttpClient(withInterceptors([...]))`; raw `fetch`
|
|
36
|
+
calls should use `inject(LT_FETCH)` to get cookie/JWT handling.
|
|
37
|
+
- Configuration is runtime only (`NG_*` env read by `ltAngularRequestHandler()` per request). Do not add Angular
|
|
38
|
+
`environment.ts` files for API URLs.
|
|
39
|
+
- Use the `lt-*` components and helm directives with the theme tokens (`bg-primary`, `text-muted-foreground`,
|
|
40
|
+
`text-error` …) instead of raw colors, so dark mode and the lenne.Tech palette keep working.
|
|
41
|
+
- Backend error messages carry `#LTNS_xxxx:` codes: show them with `LtErrorTranslationService.translateError()` /
|
|
42
|
+
`showErrorToast()`.
|
|
43
|
+
- Per-call state comes from `inject…()` factories (`injectLtTusUpload()`, `injectLtAiChat()`,
|
|
44
|
+
`injectLtOfflineSync()`): call them in a field initializer or constructor (injection context).
|
|
45
|
+
- Bundle size: `app.config.ts` and the route config import only from the `…/provide` entry points
|
|
46
|
+
(`@lenne.tech/ng-base/auth/provide`, `@lenne.tech/ng-base/ui/provide`, `@lenne.tech/ng-base/bug/provide`), render
|
|
47
|
+
`<hlm-toaster>` in a `@defer` block, call `provideLtFiles()`/`provideLtAi()` only with options, and import `core.css`
|
|
48
|
+
plus the `components/<name>.css` files of the components the app renders instead of `theme.css` when the CLI budget
|
|
49
|
+
is tight.
|
|
50
|
+
- Bug reporter: `provideLtBug()` from `…/bug/provide` in `app.config.ts`; in the app shell
|
|
51
|
+
`@if (bugActive) { @defer (on immediate) { <lt-bug-report /> } }` with `bugActive = inject(LT_BUG_ACTIVE)`;
|
|
52
|
+
`app.use(ltBugReport())` in `server.ts` before `express.json()`. It is off in production and fails closed without
|
|
53
|
+
`NG_PUBLIC_APP_ENV`; `NG_PUBLIC_LT_BUG_ENABLED` switches it per stage. Linear credentials (`NG_LINEAR_API_KEY` …)
|
|
54
|
+
stay server env and never go into the runtime config.
|
|
55
|
+
- E2E: wait with `gotoAndWaitForHydration()` / `waitForHydration()` before interacting with SSR pages.
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 lenne.Tech GmbH
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,63 +1,256 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lenne.tech/ng-base
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular library of the lenne.Tech stack, the Angular counterpart of [`@lenne.tech/nuxt-extensions`](https://github.com/lenneTech/nuxt-extensions).
|
|
4
|
+
It connects an Angular 22 app to [`@lenne.tech/nest-server`](https://github.com/lenneTech/nest-server) (Better Auth, TUS
|
|
5
|
+
upload, AI, offline sync), ships a Spartan-based UI layer for Tailwind CSS 4, SSR server helpers and Playwright helpers.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
- Angular `^22.2` (standalone, zoneless, OnPush, signals), Tailwind CSS `4.3`, Spartan UI `1.9`
|
|
8
|
+
- Version scheme: major = Angular major. `22.0.0` is a rebuild; versions up to `18.x` are reachable via tag `v18.1.3`.
|
|
9
|
+
- Template: [`ng-base-starter`](https://github.com/lenneTech/ng-base-starter) (`lt fullstack init --frontend angular`).
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
## Entry points
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
13
|
+
| Import | Content | Needs nest-server |
|
|
14
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- |
|
|
15
|
+
| `@lenne.tech/ng-base` | `provideLtNgBase()`, runtime config (`LT_RUNTIME_CONFIG`), `LtApiUrlService`, `LT_FETCH`, `LtCookieService`, `ltSha256` + base64url, `tw`, `LtI18nService` (+ `LT_I18N_ADAPTER`), `LtToastService` (+ `LT_TOAST_ADAPTER`), `LtErrorTranslationService` | partly |
|
|
16
|
+
| `@lenne.tech/ng-base/auth` | `LtAuthService` (sign-in/up, 2FA, passkeys, password and email; Better Auth loaded on first use), `createLtAuthClient()`, and everything of `/auth/provide` | yes |
|
|
17
|
+
| `@lenne.tech/ng-base/auth/provide` | `provideLtAuth()`, `ltAuthInterceptor`, `ltAuthGuard`, `ltGuestGuard()`, `ltRoleGuard()`, `ltSystemSetupGuard`, `LtAuthStore` (session signals, cookie/JWT transport, `validateSession()`, `signOut()`), `LtSystemSetupService`, `LtAuthStateService`, without Better Auth | yes |
|
|
18
|
+
| `@lenne.tech/ng-base/ui` | Spartan helm (`Hlm*`), `LtOverlayService`, `provideLtUiOverlayDefaults()`, `LT_TRANSITIONS`, `lt-*` components, and everything of `/ui/provide` | no |
|
|
19
|
+
| `@lenne.tech/ng-base/ui/provide` | `provideLtUi()` (Sonner toasts loaded lazily), `LtColorModeService`, `LT_COLOR_MODE_SCRIPT`, for `app.config.ts` without the component layer | no |
|
|
20
|
+
| `@lenne.tech/ng-base/files` | `provideLtFiles()`, `injectLtTusUpload()`, `LtFileService` (TUS default `/tus`, works without the provider) | yes |
|
|
21
|
+
| `@lenne.tech/ng-base/files/ui` | `<lt-tus-upload>` (`LtTusUploadComponent`), kept apart so `/files` does not pull the ui layer | yes |
|
|
22
|
+
| `@lenne.tech/ng-base/share` | `LtShareService` (Web Share API, clipboard fallback) | no |
|
|
23
|
+
| `@lenne.tech/ng-base/ai` | `provideLtAi()`, `LtAiService`, `injectLtAiChat()`, connections/settings/status/usage/prompts/placeholders/admin services, `parseLtAiSseStream()` | yes |
|
|
24
|
+
| `@lenne.tech/ng-base/sync` | `provideLtSync()`, `injectLtOfflineSync()`, protocol engine (`createLtSyncEngine()`), IndexedDB store, hint stream | yes |
|
|
25
|
+
| `@lenne.tech/ng-base/bug` | `<lt-bug-report>` (`LtBugReport`, starts the capture), `LtBugReportService`, and everything of `/bug/provide`; capture engine, dialog and texts load lazily — bug reporter of `@lenne.tech/bug.lt` | no |
|
|
26
|
+
| `@lenne.tech/ng-base/bug/provide` | `provideLtBug()` (options only), `LT_BUG_ACTIVE` (on in this stage), `isLtBugActive()`, option types, for `app.config.ts` and the app shell; defaults and `resolveLtBugOptions()` are in `/bug` | no |
|
|
27
|
+
| `@lenne.tech/ng-base/bug/server` | `ltBugReport()` (`POST /_bug-lt/report` → Linear issue), `LtLinearClient`, `validateLtBugReport()`, `formatLtBugReportForLinear()`, redaction helpers (Node only) | – |
|
|
28
|
+
| `@lenne.tech/ng-base/server` | `ltAngularRequestHandler()` (request context, runtime config and submit guard in the HTML), `provideLtServerRuntimeConfig()`, `readLtRuntimeConfigFromEnv()`, `ltSecurityHeaders()`, `applyLtHtmlCacheHeaders()`, `ltSecurityTxt()`, `ltBuildIdentity()`, `ltApiProxy()` (Node only) | – |
|
|
29
|
+
| `@lenne.tech/ng-base/testing` | Playwright helpers: `waitForHydration()`, `gotoAndWaitForHydration()`, `fillInput()`, `generateTestUser()`, `generateTOTP()`, `createTestUser()`, `loginTestUser()` … | – |
|
|
30
|
+
| `@lenne.tech/ng-base/utils` | `LtSeoService`, `LtStorageService`, `LtScrollService`, `ltFocusFirstInvalid()`, `LtStandard` / `ltMap()` | no |
|
|
17
31
|
|
|
18
|
-
|
|
32
|
+
Every feature is opt-in through its `provideLt…()` function; entry points you do not import are not bundled.
|
|
19
33
|
|
|
20
|
-
##
|
|
34
|
+
## Installation
|
|
21
35
|
|
|
22
|
-
|
|
36
|
+
```bash
|
|
37
|
+
pnpm add @lenne.tech/ng-base better-auth @angular/cdk @spartan-ng/brain @ng-icons/core @ng-icons/lucide tw-animate-css
|
|
38
|
+
pnpm add tus-js-client # optional: uploads (add "url-parse" to allowedCommonJsDependencies in angular.json)
|
|
39
|
+
pnpm add modern-screenshot # optional: screenshots of the bug reporter (/bug)
|
|
40
|
+
pnpm add -D @playwright/test # optional: /testing
|
|
41
|
+
```
|
|
23
42
|
|
|
24
|
-
|
|
43
|
+
Peers: `@angular/*` `^22.2`, `@angular/cdk` `^22.2`, `@spartan-ng/brain` `>=1.9 <2`, `@ng-icons/core` + `@ng-icons/lucide` `>=36`,
|
|
44
|
+
`rxjs` `^7.8`, `better-auth` `>=1.7.16 <1.8.0` (lock-step with nest-server), optional `@better-auth/passkey` (same range),
|
|
45
|
+
`tus-js-client` `>=4`, `modern-screenshot` `>=4.6`, `@playwright/test`. Dependencies: `clsx`, `tailwind-merge`, `class-variance-authority`.
|
|
25
46
|
|
|
26
|
-
|
|
47
|
+
## Setup
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
scrollDetectionOffset: 200, // should be >= scrollOffset, optional (default: 200)
|
|
44
|
-
scrollOffset: 100, // optional (default: 100)
|
|
45
|
-
storageType: 'local' as StorageType, // optional (default: 'local')
|
|
46
|
-
version: '0.1', // to set version for storage keys, optional (default: '')
|
|
47
|
-
})
|
|
49
|
+
`src/app/app.config.ts`:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
export const appConfig: ApplicationConfig = {
|
|
53
|
+
providers: [
|
|
54
|
+
provideBrowserGlobalErrorListeners(),
|
|
55
|
+
provideRouter(routes, withComponentInputBinding()),
|
|
56
|
+
provideClientHydration(withEventReplay()),
|
|
57
|
+
provideHttpClient(withInterceptors([ltAuthInterceptor])), // ltAuthInterceptor from '@lenne.tech/ng-base/auth/provide'
|
|
58
|
+
provideLtNgBase(),
|
|
59
|
+
provideLtAuth({ systemSetup: { enabled: true } }), // from '@lenne.tech/ng-base/auth/provide' (keeps LtAuthService out of the initial bundle)
|
|
60
|
+
// provideLtFiles({ tus: { … } }) / provideLtAi({ basePath: … }): only with options — the defaults (/tus, /ai)
|
|
61
|
+
// apply without them, and a call without options only adds the entry point to the initial bundle.
|
|
62
|
+
provideLtSync(), // opt-in offline sync
|
|
63
|
+
provideLtUi(), // from '@lenne.tech/ng-base/ui/provide': Sonner toasts (lazy), color mode; <hlm-toaster /> in a @defer block
|
|
48
64
|
],
|
|
49
|
-
}
|
|
65
|
+
};
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`src/server.ts` (Express + `AngularNodeAppEngine`):
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
app.use(ltSecurityHeaders());
|
|
72
|
+
app.use(ltSecurityTxt()); // only where somebody reads the contact address
|
|
73
|
+
app.use(ltBuildIdentity()); // GET /api/build-identity
|
|
74
|
+
app.use(ltApiProxy()); // /api/* → NG_API_URL, only with NG_PUBLIC_API_PROXY=true
|
|
75
|
+
app.use(express.static(browserDistFolder, { index: false, maxAge: '1y', redirect: false }));
|
|
76
|
+
app.use(ltAngularRequestHandler(new AngularNodeAppEngine(), { appVersion: packageJson.version }));
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`ltAngularRequestHandler()` reads the `NG_*` environment per request into a request context
|
|
80
|
+
(`AngularNodeAppEngine.handle(req, context)`, read in the app through `REQUEST_CONTEXT`), adds the HTML cache headers
|
|
81
|
+
and writes the public part as `<script id="ng-runtime-config">` into every HTML response, client-rendered routes
|
|
82
|
+
included. The browser reads that script, so one build runs on every stage. `NG_API_URL` never leaves the server.
|
|
83
|
+
|
|
84
|
+
`src/styles.css`:
|
|
85
|
+
|
|
86
|
+
```css
|
|
87
|
+
@import 'tailwindcss';
|
|
88
|
+
@import '@lenne.tech/ng-base/ui/styles/theme.css'; /* vendor mode: './core/ui/styles/theme.css' */
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The theme brings the Spartan preset, the lenne.Tech palette (primary, secondary, success, info, warning, error, neutral
|
|
92
|
+
— as in nuxt-base-starter), the semantic tokens of the helm layer and the classes of every component, so nothing else
|
|
93
|
+
needs configuring. That is about 172 kB raw / 20 kB gzip of CSS. To stay within the CLI budget, import the core and only
|
|
94
|
+
the components the app renders (each file pulls the components it builds on):
|
|
95
|
+
|
|
96
|
+
```css
|
|
97
|
+
@import 'tailwindcss';
|
|
98
|
+
@import '@lenne.tech/ng-base/ui/styles/core.css';
|
|
99
|
+
@import '@lenne.tech/ng-base/ui/styles/components/sonner.css'; /* <hlm-toaster> */
|
|
100
|
+
@import '@lenne.tech/ng-base/ui/styles/components/lt-text-field.css'; /* + input, input-group, lt-form-field */
|
|
101
|
+
@import '@lenne.tech/ng-base/ui/styles/components/lt-header.css';
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Measured: core 15 kB, core + five typical components 62 kB raw / 9 kB gzip. The files are generated from the
|
|
105
|
+
component sources (`scripts/generate-ui-sources.mjs`, checked by `pnpm run check`).
|
|
106
|
+
|
|
107
|
+
Bundle size: import providers from `@lenne.tech/ng-base/ui/provide` and render the toaster deferred, so the component
|
|
108
|
+
layer stays out of the initial bundle. Toasts above open dialogs: add `provideLtUiOverlayDefaults()` (from
|
|
109
|
+
`@lenne.tech/ng-base/ui`) to the providers of the lazy routes that open overlays, not to `app.config.ts` (it lives in
|
|
110
|
+
the CDK overlay module):
|
|
111
|
+
|
|
112
|
+
```html
|
|
113
|
+
@defer (on idle) { <app-toaster />
|
|
114
|
+
<!-- a tiny component that renders <hlm-toaster /> -->
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Runtime configuration
|
|
119
|
+
|
|
120
|
+
| Variable | Scope | Purpose |
|
|
121
|
+
| --------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
122
|
+
| `NG_PUBLIC_API_URL` | browser + SSR fallback | Public API URL |
|
|
123
|
+
| `NG_API_URL` | SSR only | Internal API URL for server-side requests (never sent to the browser) |
|
|
124
|
+
| `NG_PUBLIC_SITE_URL` | public | App URL for redirect/callback URLs, SEO, security.txt |
|
|
125
|
+
| `NG_PUBLIC_API_PROXY` | browser | `true`: browser calls go to `/api/*` (dev proxy / `ltApiProxy()`); unset: on in dev mode with a warning |
|
|
126
|
+
| `NG_PUBLIC_COOKIE_PREFIX` | public | Cookie namespace (`<prefix>-auth-state`), mirror the backend `COOKIE_PREFIX` |
|
|
127
|
+
| `NG_PUBLIC_STORAGE_PREFIX` | public | `localStorage` prefix of `LtStorageService` |
|
|
128
|
+
| `NG_PUBLIC_LT_<FEATURE>_<OPTION>` | public | Feature options, e.g. `NG_PUBLIC_LT_TUS_DEFAULT_ENDPOINT`, `NG_PUBLIC_LT_AUTH_LOGIN_PATH`, `NG_PUBLIC_LT_AUTH_SYSTEM_SETUP_ENABLED` |
|
|
129
|
+
| `NG_LT_SECURITY_TXT_*` | server | `CONTACT`, `HOSTS`, `POLICY`, `PREFERRED_LANGUAGES`, `VALID_DAYS` |
|
|
130
|
+
| `NG_PUBLIC_APP_COMMIT`, `APP_VERSION_COMMIT`, `NG_PUBLIC_APP_VERSION` | server | Build identity |
|
|
131
|
+
|
|
132
|
+
Without SSR (static hosting, foreign backend) pass the values in code: `provideLtNgBase({ runtime: { apiUrl: '…' } })`.
|
|
133
|
+
|
|
134
|
+
## Auth in short
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
protected readonly auth = inject(LtAuthService);
|
|
138
|
+
|
|
139
|
+
await this.auth.signIn.email({ email, password }); // password is SHA-256 hashed before it leaves the browser
|
|
140
|
+
this.auth.user(); // signal
|
|
141
|
+
this.auth.isAdmin(); // computed signal (UX gate only)
|
|
142
|
+
await this.auth.twoFactor.verifyTotp({ code }); // sets the user on success
|
|
143
|
+
await this.auth.authenticateWithPasskey(); // WebAuthn with nest-server challengeId
|
|
144
|
+
await this.auth.signOut(); // flushes and wipes offline data when provideLtSync() is active
|
|
50
145
|
```
|
|
51
146
|
|
|
52
|
-
|
|
147
|
+
Routes: `canActivate: [ltAuthGuard]`, `canActivate: [ltGuestGuard('/app')]`, `canActivate: [ltRoleGuard('admin')]`,
|
|
148
|
+
root route `canActivateChild: [ltSystemSetupGuard]`. Import the guards, `ltAuthInterceptor` and `provideLtAuth()` from
|
|
149
|
+
`@lenne.tech/ng-base/auth/provide`, and `LtAuthStore` where a shell only reads the user or signs out: that entry carries
|
|
150
|
+
no Better Auth, 2FA or passkey code. `LtAuthService` (`/auth`) shares the same state and belongs on the pages that sign
|
|
151
|
+
in, register, verify 2FA or manage passkeys. `/auth` re-exports everything of `/auth/provide`, so either import works.
|
|
152
|
+
|
|
153
|
+
## Texts (de/en)
|
|
154
|
+
|
|
155
|
+
Library texts are German and English, chosen by the browser language, `LtI18nService.setLocale()` or an app i18n
|
|
156
|
+
library bound through `LT_I18N_ADAPTER` (Transloco, ngx-translate). Every entry point brings its own keys and registers
|
|
157
|
+
them on first use, so the initial bundle carries only the core's `lt.error.*`: `lt.ui.*`, `lt.auth.*`, `lt.files.*`,
|
|
158
|
+
`lt.share.*`, `lt.bug.*`. The same texts ship as JSON for the app's translation files: `i18n/{de,en}.json` (core) and
|
|
159
|
+
`i18n/<entry>/{de,en}.json`. App texts always win: `provideLtNgBase({ i18n: { messages } })`, `registerMessages()` or the
|
|
160
|
+
adapter override any key.
|
|
161
|
+
|
|
162
|
+
## Bug reporting
|
|
163
|
+
|
|
164
|
+
`@lenne.tech/ng-base/bug` is the Angular counterpart of `@lenne.tech/bug.lt` 1.6.9: a floating button takes a screenshot,
|
|
165
|
+
the dialog collects title, type, description, steps and attachments plus console output, network requests, user journey
|
|
166
|
+
and browser details, and the app's own SSR server creates the Linear issue.
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
// app.config.ts: all bug.lt options (position, buttonColor/Text/Icon, enable*, autoOpenOnError, theme, max*, userJourney)
|
|
170
|
+
import { provideLtBug } from '@lenne.tech/ng-base/bug/provide';
|
|
171
|
+
provideLtBug({ autoOpenOnError: true }),
|
|
172
|
+
|
|
173
|
+
// app.ts (imports: [LtBugReport] from '@lenne.tech/ng-base/bug')
|
|
174
|
+
protected readonly bugActive = inject(LT_BUG_ACTIVE); // from '@lenne.tech/ng-base/bug/provide'
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```html
|
|
178
|
+
<!-- app.html: loaded only where the reporter is on; it starts the capture right after the first render -->
|
|
179
|
+
@if (bugActive) { @defer (on immediate) { <lt-bug-report /> } }
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
// server.ts, before express.json() and the Angular handler
|
|
184
|
+
app.use(ltBugReport()); // POST /_bug-lt/report
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Only `@lenne.tech/ng-base/bug/provide` (`provideLtBug()`, `LT_BUG_ACTIVE`, about 1 kB) is in the initial bundle. Production
|
|
188
|
+
loads nothing else; in the other stages `<lt-bug-report>` brings the state service and the button and starts the capture
|
|
189
|
+
engine, the dialog (ui layer) and the texts (`lt.bug.*`, also shipped as `i18n/bug/{de,en}.json`) load on first use. Styles: `theme.css` includes the components; with `core.css` add `components/lt-bug-report.css`. Server env (never sent
|
|
190
|
+
to the browser): `NG_LINEAR_API_KEY`, `NG_LINEAR_TEAM_NAME` (name or key), `NG_LINEAR_PROJECT_NAME` (optional).
|
|
191
|
+
Screenshots need the optional peer `modern-screenshot`; without it the screenshot is skipped.
|
|
192
|
+
|
|
193
|
+
Off in production, decided at runtime per stage: the browser reads `NG_PUBLIC_APP_ENV` from the runtime config, the
|
|
194
|
+
endpoint from the environment. Without `NG_PUBLIC_APP_ENV` both fail closed (browser part only in dev mode, endpoint
|
|
195
|
+
`404`; set `NG_PUBLIC_APP_ENV=local` locally). `enabled` overrides on both sides; while off no capture hook is installed.
|
|
196
|
+
Per stage without a rebuild: `NG_PUBLIC_LT_BUG_ENABLED`, `NG_PUBLIC_LT_BUG_AUTO_SHOW`, `NG_PUBLIC_LT_BUG_AUTO_OPEN_ON_ERROR`,
|
|
197
|
+
`NG_PUBLIC_LT_BUG_ENABLE_SCREENSHOT`, `NG_PUBLIC_LT_BUG_POSITION`, `NG_PUBLIC_LT_BUG_BUTTON_COLOR`, `NG_PUBLIC_LT_BUG_BUTTON_TEXT`
|
|
198
|
+
(browser part; the endpoint keeps its own `enabled` option).
|
|
199
|
+
|
|
200
|
+
Redaction before sending (and again on the server before Linear): `Authorization`, `Cookie`, `Set-Cookie`,
|
|
201
|
+
`X-System-Setup-Token` and similar headers become `[redacted]`; bodies of `/iam/`, `/system-setup/` and other auth
|
|
202
|
+
endpoints are never recorded; `token`, `code`, `password`, `secret`, `otp` … are redacted in every URL (nested
|
|
203
|
+
`callbackURL` included), console line and journey entry; values of password, one-time-code and card fields are never
|
|
204
|
+
recorded, not even with `captureInputValues`. Answers never contain the API key or Linear's error messages.
|
|
205
|
+
|
|
206
|
+
Differences to bug.lt 1.6.9:
|
|
207
|
+
|
|
208
|
+
- `enabled` is a runtime decision (one image for all stages) and fails closed; env names `NG_LINEAR_*`.
|
|
209
|
+
- bug.lt recorded auth bodies, query tokens and Option/AltGr characters; it fetched any URL given as attachment data
|
|
210
|
+
(SSRF); here files are base64 data URLs only, the body is validated by hand, size-capped and rate-limited.
|
|
211
|
+
- Fixed: SSE/stream responses no longer wait for the body, XHR with non-text `responseType` no longer throws, `%c`
|
|
212
|
+
removes only its style arguments, Edge/Safari/iOS detection, Linear lookups are paginated and reuse workspace labels,
|
|
213
|
+
the screenshot is sent once (bug.lt: three copies).
|
|
214
|
+
- One UI on Spartan/lt components (no `ui: false` variant), Lucide bug icon, default color `#dc2626` (WCAG AA with
|
|
215
|
+
text), submit validates and focuses the first invalid field, the reporter's own UI is left out of journey and
|
|
216
|
+
screenshot, dialogs are recorded (`captureModalEvents` was a no-op in bug.lt).
|
|
217
|
+
- `theme` sets the screenshot background; the dialog follows the app color mode. No `<ErrorBoundary>` component (Angular
|
|
218
|
+
has no subtree error capture): the app's `ErrorHandler` is wrapped (it keeps handling every error) and
|
|
219
|
+
`LtBugReportService.reportError()` reports by hand; `LtBugReportService.open()` replaces `useBugReport().openModal()`.
|
|
220
|
+
|
|
221
|
+
## Differences to nuxt-extensions 1.25.0
|
|
53
222
|
|
|
54
|
-
|
|
223
|
+
- Composables with per-call state are `inject…()` factories bound to the injection context (`injectLtTusUpload()`,
|
|
224
|
+
`injectLtAiChat()`, `injectLtOfflineSync()`); shared state lives in root services (`LtAuthService`, `LtAi…Service`).
|
|
225
|
+
- Bugs not ported: the user is set after 2FA verification; one shared auth fetch (`LT_FETCH`) refreshes a stale JWT for
|
|
226
|
+
AI, SSE and sync too; file URLs resolve against the API; the TUS endpoint defaults to `/tus`; the missing
|
|
227
|
+
`passkeyAlreadyRegistered` text exists; transitions use Angular `animate.enter`/`animate.leave` classes.
|
|
228
|
+
- nest-server's real JWT mode (`cookies: false`, env `NSC__COOKIES=false`) works end to end: a JWT in a sign-in, 2FA or
|
|
229
|
+
passkey answer puts the store into JWT mode, session checks keep the mode (a bearer-proven session never falls back to
|
|
230
|
+
cookie mode), and a JWT expiring within 60 s is refreshed with itself as bearer before it is sent (nest-server's JWTs
|
|
231
|
+
live 15 minutes and there is no cookie to mint a new one). An opaque Better Auth session token is never stored. Before
|
|
232
|
+
nest-server 12.7.0 the browser must reach the API same-origin in this mode (`NG_PUBLIC_API_PROXY=true`).
|
|
233
|
+
- The Better Auth admin plugin is off by default (`enableAdmin`), nest-server does not serve it.
|
|
234
|
+
- Passkeys work without `@better-auth/passkey` (WebAuthn calls go straight to `/iam/passkey/*`); the plugin can still be
|
|
235
|
+
passed via `provideLtAuth({ plugins })`.
|
|
236
|
+
- Pre-hydration input is preserved (`provideLtNgBase({ preHydrationInput })`, on by default): the first change
|
|
237
|
+
detection after hydration overwrites typed text even with `withEventReplay()` (measured in the playground E2E), so
|
|
238
|
+
fields are snapshot before and restored after hydration. `ltAngularRequestHandler()` also writes a guard into the
|
|
239
|
+
HTML that blocks the native submit of forms without `action` before hydration (no password in a GET URL).
|
|
240
|
+
- Not ported: the form-label association repair (a Nuxt UI/reka-ui id divergence that Angular's id handling does not
|
|
241
|
+
have).
|
|
242
|
+
- File URLs use nest-server 12.5's real routes (`/files/id/:id`, `/files/info/:id`); nuxt-extensions built
|
|
243
|
+
`/files/:id` and `/files/download/:id`, which answer 404.
|
|
55
244
|
|
|
56
|
-
##
|
|
245
|
+
## Vendor mode
|
|
57
246
|
|
|
58
|
-
|
|
59
|
-
and
|
|
247
|
+
`lt fullstack init --frontend angular` vendors `projects/ng-base/` into `projects/app/src/core/` (without specs,
|
|
248
|
+
`test-setup.ts`, the library `package.json`/tsconfigs and the library README/CLAUDE.md). Every `ng-package.json` is kept:
|
|
249
|
+
the CLI derives one `tsconfig` `paths` entry per entry point from its `lib.entryFile`, e.g. `@lenne.tech/ng-base` →
|
|
250
|
+
`src/core/src/public-api.ts`, `@lenne.tech/ng-base/auth` → `src/core/auth/src/public-api.ts`,
|
|
251
|
+
`@lenne.tech/ng-base/ui/provide` → `src/core/ui/provide/src/public-api.ts` (see `VENDOR.md` in `src/core/`). Imports
|
|
252
|
+
therefore stay the same in both modes. Entry points import each other only through the package specifier.
|
|
60
253
|
|
|
61
254
|
## License
|
|
62
255
|
|
|
63
|
-
MIT
|
|
256
|
+
MIT, © lenne.Tech GmbH
|