@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,288 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Status of an upload item
|
|
5
|
+
*/
|
|
6
|
+
type LtUploadStatus = 'completed' | 'error' | 'idle' | 'paused' | 'uploading';
|
|
7
|
+
/**
|
|
8
|
+
* Progress information for an upload
|
|
9
|
+
*/
|
|
10
|
+
interface LtUploadProgress {
|
|
11
|
+
/** Total bytes to upload */
|
|
12
|
+
bytesTotal: number;
|
|
13
|
+
/** Bytes already uploaded */
|
|
14
|
+
bytesUploaded: number;
|
|
15
|
+
/** Percentage complete (0-100) */
|
|
16
|
+
percentage: number;
|
|
17
|
+
/** Estimated remaining time in seconds */
|
|
18
|
+
remainingTime: number;
|
|
19
|
+
/** Current upload speed in bytes/second */
|
|
20
|
+
speed: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Individual upload item with progress tracking
|
|
24
|
+
*/
|
|
25
|
+
interface LtUploadItem {
|
|
26
|
+
/** Timestamp when upload completed */
|
|
27
|
+
completedAt?: Date;
|
|
28
|
+
/** Error message if upload failed */
|
|
29
|
+
error?: string;
|
|
30
|
+
/** The file being uploaded */
|
|
31
|
+
file: File;
|
|
32
|
+
/**
|
|
33
|
+
* Id of the stored file, from the `X-File-Id` header of the response that completed the upload
|
|
34
|
+
* (nest-server 11.42.13+). Use it for file links and references — not the last segment of `url`,
|
|
35
|
+
* which is the TUS upload id. Undefined when the backend sends no such header: an older
|
|
36
|
+
* nest-server, or an `onUploadComplete()` override that never calls `super.onUploadComplete()`.
|
|
37
|
+
*/
|
|
38
|
+
fileId?: string;
|
|
39
|
+
/** Unique identifier for this upload */
|
|
40
|
+
id: string;
|
|
41
|
+
/** Custom metadata to include with the upload */
|
|
42
|
+
metadata?: Record<string, string>;
|
|
43
|
+
/** Current progress information */
|
|
44
|
+
progress: LtUploadProgress;
|
|
45
|
+
/** Timestamp when upload started */
|
|
46
|
+
startedAt?: Date;
|
|
47
|
+
/** Current status of the upload */
|
|
48
|
+
status: LtUploadStatus;
|
|
49
|
+
/** URL of the TUS upload resource (available after completion) — not a file URL; see `fileId` */
|
|
50
|
+
url?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Configuration options for TUS uploads
|
|
54
|
+
*/
|
|
55
|
+
interface LtUploadOptions {
|
|
56
|
+
/** Automatically start uploads when files are added (default: true) */
|
|
57
|
+
autoStart?: boolean;
|
|
58
|
+
/** Chunk size in bytes (default: 5MB) */
|
|
59
|
+
chunkSize?: number;
|
|
60
|
+
/** TUS upload endpoint URL; a relative path is resolved against the API (see `tus.resolveAgainstApi`) */
|
|
61
|
+
endpoint?: string;
|
|
62
|
+
/** Additional headers to include with requests */
|
|
63
|
+
headers?: Record<string, string>;
|
|
64
|
+
/** Default metadata to include with all uploads */
|
|
65
|
+
metadata?: Record<string, string>;
|
|
66
|
+
/** Callback when an upload fails */
|
|
67
|
+
onError?: (item: LtUploadItem, error: Error) => void;
|
|
68
|
+
/** Callback when upload progress updates */
|
|
69
|
+
onProgress?: (item: LtUploadItem) => void;
|
|
70
|
+
/** Callback when an upload completes successfully */
|
|
71
|
+
onSuccess?: (item: LtUploadItem) => void;
|
|
72
|
+
/** Maximum number of concurrent uploads (default: 3) */
|
|
73
|
+
parallelUploads?: number;
|
|
74
|
+
/** Retry delays in milliseconds (default: [0, 1000, 3000, 5000, 10000]) */
|
|
75
|
+
retryDelays?: number[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Return type for injectLtTusUpload()
|
|
79
|
+
*/
|
|
80
|
+
interface LtTusUploadState {
|
|
81
|
+
/** Add files to the upload queue, returns array of upload IDs */
|
|
82
|
+
addFiles: (files: File | File[]) => Promise<string[]>;
|
|
83
|
+
/** Cancel all uploads */
|
|
84
|
+
cancelAll: () => void;
|
|
85
|
+
/** Cancel a specific upload by ID */
|
|
86
|
+
cancelUpload: (id: string) => void;
|
|
87
|
+
/** Remove all completed uploads from the list */
|
|
88
|
+
clearCompleted: () => void;
|
|
89
|
+
/** Get an upload item by ID */
|
|
90
|
+
getUpload: (id: string) => LtUploadItem | undefined;
|
|
91
|
+
/** Pause all active uploads */
|
|
92
|
+
pauseAll: () => void;
|
|
93
|
+
/** Pause a specific upload by ID */
|
|
94
|
+
pauseUpload: (id: string) => void;
|
|
95
|
+
/** Remove an upload from the list (also cancels if active) */
|
|
96
|
+
removeUpload: (id: string) => void;
|
|
97
|
+
/** Resume all paused uploads */
|
|
98
|
+
resumeAll: () => void;
|
|
99
|
+
/** Resume a specific upload by ID */
|
|
100
|
+
resumeUpload: (id: string) => void;
|
|
101
|
+
/** Retry a failed upload by ID */
|
|
102
|
+
retryUpload: (id: string) => void;
|
|
103
|
+
/** Start all idle uploads */
|
|
104
|
+
startAll: () => void;
|
|
105
|
+
/** Start a specific upload by ID */
|
|
106
|
+
startUpload: (id: string) => void;
|
|
107
|
+
/** Whether any uploads are currently in progress */
|
|
108
|
+
isUploading: Signal<boolean>;
|
|
109
|
+
/** Aggregated progress of all uploads */
|
|
110
|
+
totalProgress: Signal<LtUploadProgress>;
|
|
111
|
+
/** List of all upload items */
|
|
112
|
+
uploads: Signal<LtUploadItem[]>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* File info returned from the server
|
|
116
|
+
*/
|
|
117
|
+
interface LtFileInfo {
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
filename: string;
|
|
120
|
+
id: string;
|
|
121
|
+
mimetype: string;
|
|
122
|
+
size: number;
|
|
123
|
+
url?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Return type for LtFileService
|
|
127
|
+
*/
|
|
128
|
+
interface LtFileState {
|
|
129
|
+
/** Format duration in seconds to human readable string */
|
|
130
|
+
formatDuration: (seconds: number) => string;
|
|
131
|
+
/** Format bytes to human readable string (e.g., "1.5 MB") */
|
|
132
|
+
formatFileSize: (bytes: number) => string;
|
|
133
|
+
/** Get download URL for a file by ID */
|
|
134
|
+
getDownloadUrl: (id: string, filename?: string) => string;
|
|
135
|
+
/** Get file info from the server by ID */
|
|
136
|
+
getFileInfo: (id: string | undefined) => Promise<LtFileInfo | null | string>;
|
|
137
|
+
/** Get direct file URL by ID */
|
|
138
|
+
getFileUrl: (id: string) => string;
|
|
139
|
+
/** Check if a string is a valid MongoDB ObjectId */
|
|
140
|
+
isValidMongoID: (id: string) => boolean;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* nest-server file helpers (counterpart of `useLtFile()`). URLs are resolved against the API base URL (fix: the Nuxt
|
|
144
|
+
* version built them relative to the app origin), under `filesBasePath` of `provideLtFiles()` (default `/files`).
|
|
145
|
+
*/
|
|
146
|
+
export declare class LtFileService implements LtFileState {
|
|
147
|
+
private readonly api;
|
|
148
|
+
private readonly fetch;
|
|
149
|
+
private readonly options;
|
|
150
|
+
/** `GET <api>/files/info/:id` with credentials; `null` for empty ids or on error, a non-ObjectId string is returned as is. */
|
|
151
|
+
getFileInfo(id: string | undefined): Promise<LtFileInfo | null | string>;
|
|
152
|
+
/**
|
|
153
|
+
* `<api>/files/id/:id` — nest-server's `GET files/id/:id` (CoreFileController), which streams the file (or redirects
|
|
154
|
+
* to a presigned S3 URL) after the rights check (`file.downloadRoles`, default admin).
|
|
155
|
+
*/
|
|
156
|
+
getFileUrl(id: string): string;
|
|
157
|
+
/**
|
|
158
|
+
* Download URL. nest-server sets `Content-Disposition` from the stored filename on `GET files/id/:id`, so this is the
|
|
159
|
+
* same URL as {@link getFileUrl}; `filename` is accepted for API compatibility with nuxt-extensions and ignored (the
|
|
160
|
+
* server has no rename parameter — nuxt-extensions' `/files/download/:id` does not exist in nest-server 12.5).
|
|
161
|
+
*/
|
|
162
|
+
getDownloadUrl(id: string, _filename?: string): string;
|
|
163
|
+
/** 1024-based `B`/`KB`/`MB`/`GB`/`TB` with two decimals. */
|
|
164
|
+
formatFileSize(bytes: number): string;
|
|
165
|
+
/** `Ns`, `Nm Ns`, `Nh Nm`. */
|
|
166
|
+
formatDuration(seconds: number): string;
|
|
167
|
+
/** `/^[a-f\d]{24}$/i`. */
|
|
168
|
+
isValidMongoID(id: string): boolean;
|
|
169
|
+
/** `<api><filesBasePath>` without a trailing slash; an absolute `filesBasePath` is used as is. */
|
|
170
|
+
private baseUrl;
|
|
171
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LtFileService, never>;
|
|
172
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
173
|
+
}
|
|
174
|
+
/** 1024-based file size with two decimals (`0 B` for non-positive input). */
|
|
175
|
+
export declare function formatLtFileSize(bytes: number): string;
|
|
176
|
+
/** Human readable duration (`45s`, `2m 5s`, `1h 3m`). */
|
|
177
|
+
export declare function formatLtDuration(seconds: number): string;
|
|
178
|
+
/** Whether `id` is a MongoDB ObjectId (24 hex characters). */
|
|
179
|
+
export declare function isLtMongoId(id: string): boolean;
|
|
180
|
+
/** TUS options of `provideLtFiles({ tus })`; runtime overrides `NG_PUBLIC_LT_TUS_*`. */
|
|
181
|
+
interface LtTusOptions {
|
|
182
|
+
/** Chunk size in bytes (default 5 MB). */
|
|
183
|
+
defaultChunkSize?: number;
|
|
184
|
+
/**
|
|
185
|
+
* TUS endpoint (default **`/tus`**, nest-server's default; nuxt-extensions defaulted to `/files/upload`). Relative values
|
|
186
|
+
* are paths on the API while `resolveAgainstApi` is on; absolute URLs are used as they are.
|
|
187
|
+
*/
|
|
188
|
+
defaultEndpoint?: string;
|
|
189
|
+
/** Resolve a relative endpoint against the API base URL (default `true`). Turn off only behind an own same-origin proxy. */
|
|
190
|
+
resolveAgainstApi?: boolean;
|
|
191
|
+
}
|
|
192
|
+
/** Options of `provideLtFiles()`. */
|
|
193
|
+
interface LtFilesOptions {
|
|
194
|
+
/** Base path of nest-server's file controller for info/download URLs (default `/files`). */
|
|
195
|
+
filesBasePath?: string;
|
|
196
|
+
/** TUS upload options. */
|
|
197
|
+
tus?: LtTusOptions;
|
|
198
|
+
}
|
|
199
|
+
/** Resolved files options. */
|
|
200
|
+
interface LtResolvedFilesOptions {
|
|
201
|
+
filesBasePath: string;
|
|
202
|
+
tus: Required<LtTusOptions>;
|
|
203
|
+
}
|
|
204
|
+
/** Defaults of {@link LtFilesOptions}. */
|
|
205
|
+
export declare const LT_FILES_DEFAULTS: LtResolvedFilesOptions;
|
|
206
|
+
/** Resolved files options (defaults ← `provideLtFiles(options)` ← runtime `NG_PUBLIC_LT_TUS_*`). */
|
|
207
|
+
export declare const LT_FILES_OPTIONS: InjectionToken<LtResolvedFilesOptions>;
|
|
208
|
+
/** Files providers (TUS upload defaults, file info/download base path). Optional when the defaults fit. */
|
|
209
|
+
export declare function provideLtFiles(options?: LtFilesOptions): EnvironmentProviders;
|
|
210
|
+
/** The request object tus-js-client hands to `onBeforeRequest` / `onAfterResponse`. */
|
|
211
|
+
interface LtTusHttpRequest {
|
|
212
|
+
getUnderlyingObject(): unknown;
|
|
213
|
+
setHeader(header: string, value: string): void;
|
|
214
|
+
}
|
|
215
|
+
/** The response object tus-js-client hands to `onAfterResponse` (and inside `DetailedError.originalResponse`). */
|
|
216
|
+
interface LtTusHttpResponse {
|
|
217
|
+
getHeader(header: string): null | string | undefined;
|
|
218
|
+
getStatus(): number;
|
|
219
|
+
}
|
|
220
|
+
/** A previous upload of the same file found in tus-js-client's URL storage. */
|
|
221
|
+
interface LtTusPreviousUpload {
|
|
222
|
+
creationTime?: string;
|
|
223
|
+
}
|
|
224
|
+
/** The tus-js-client upload options `injectLtTusUpload()` sets. */
|
|
225
|
+
interface LtTusClientUploadOptions {
|
|
226
|
+
chunkSize?: number;
|
|
227
|
+
endpoint?: string;
|
|
228
|
+
headers?: Record<string, string>;
|
|
229
|
+
metadata?: Record<string, string>;
|
|
230
|
+
onAfterResponse?: (req: LtTusHttpRequest, res: LtTusHttpResponse) => void;
|
|
231
|
+
onBeforeRequest?: (req: LtTusHttpRequest) => void;
|
|
232
|
+
onError?: (error: Error) => void;
|
|
233
|
+
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
234
|
+
onShouldRetry?: (error: Error & {
|
|
235
|
+
originalResponse?: LtTusHttpResponse | null;
|
|
236
|
+
}, retryAttempt: number, options: unknown) => boolean;
|
|
237
|
+
onSuccess?: () => void;
|
|
238
|
+
removeFingerprintOnSuccess?: boolean;
|
|
239
|
+
retryDelays?: number[];
|
|
240
|
+
}
|
|
241
|
+
/** The part of a tus-js-client `Upload` instance `injectLtTusUpload()` uses. */
|
|
242
|
+
interface LtTusClientUpload {
|
|
243
|
+
url: null | string;
|
|
244
|
+
abort(shouldTerminate?: boolean): Promise<void>;
|
|
245
|
+
findPreviousUploads(): Promise<LtTusPreviousUpload[]>;
|
|
246
|
+
resumeFromPreviousUpload(previousUpload: LtTusPreviousUpload): void;
|
|
247
|
+
start(): void;
|
|
248
|
+
}
|
|
249
|
+
/** The part of the `tus-js-client` module `injectLtTusUpload()` uses (structural, so the peer stays optional). */
|
|
250
|
+
interface LtTusClient {
|
|
251
|
+
Upload: new (file: File, options: LtTusClientUploadOptions) => LtTusClientUpload;
|
|
252
|
+
}
|
|
253
|
+
/** Error text when the optional peer `tus-js-client` is missing. */
|
|
254
|
+
export declare const LT_TUS_CLIENT_MISSING_MESSAGE = "[@lenne.tech/ng-base] tus-js-client is not installed. Install it to use uploads: pnpm add tus-js-client (or npm install tus-js-client).";
|
|
255
|
+
/** Load `tus-js-client` lazily (once); rejects with an install hint when the optional peer is missing. */
|
|
256
|
+
export declare function loadLtTusClient(): Promise<LtTusClient>;
|
|
257
|
+
/**
|
|
258
|
+
* Loader of the `tus-js-client` module used by `injectLtTusUpload()` (default: lazy `import('tus-js-client')`).
|
|
259
|
+
* Replace it in tests with a fake client, or to supply a preconfigured build.
|
|
260
|
+
*/
|
|
261
|
+
export declare const LT_TUS_CLIENT_LOADER: InjectionToken<() => Promise<LtTusClient>>;
|
|
262
|
+
/** A TUS upload queue with signal state, created by {@link injectLtTusUpload}. */
|
|
263
|
+
type LtTusUpload = LtTusUploadState;
|
|
264
|
+
/**
|
|
265
|
+
* Response header in which nest-server (11.42.13+, `TUS_FILE_ID_HEADER`) names the stored file. Sent on the response that
|
|
266
|
+
* completes the upload and listed in `Access-Control-Expose-Headers`.
|
|
267
|
+
*/
|
|
268
|
+
export declare const LT_TUS_FILE_ID_HEADER = "X-File-Id";
|
|
269
|
+
/** Default retry delays of a TUS upload in milliseconds. */
|
|
270
|
+
export declare const LT_TUS_RETRY_DELAYS: readonly number[];
|
|
271
|
+
/**
|
|
272
|
+
* Create a TUS upload queue (counterpart of `useLtTusUpload()`), bound to the current injection context: running
|
|
273
|
+
* uploads are aborted when the component/service is destroyed.
|
|
274
|
+
*
|
|
275
|
+
* `tus-js-client` (optional peer) is loaded lazily; without it `addFiles` rejects with an install hint.
|
|
276
|
+
* Defaults: `autoStart` true, chunk size and endpoint from `provideLtFiles()`, 3 parallel uploads, retries
|
|
277
|
+
* `[0, 1000, 3000, 5000, 10000]` (none on 4xx except 429), `withCredentials` for the session cookie, Bearer token
|
|
278
|
+
* in JWT mode, the nest-server file id from the `X-File-Id` response header, resume via fingerprints.
|
|
279
|
+
*
|
|
280
|
+
* Options are read whenever an upload is created or started, so an object with getters (e.g. over component inputs)
|
|
281
|
+
* stays current. `undefined` values keep the default. Uploads beyond `parallelUploads` wait in a queue and start as
|
|
282
|
+
* soon as a slot is free; `startUpload`/`resumeUpload`/`retryUpload` of a single item start it right away.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* protected readonly upload = injectLtTusUpload({ onSuccess: (item) => this.attach(item.fileId) });
|
|
286
|
+
*/
|
|
287
|
+
export declare function injectLtTusUpload(options?: LtUploadOptions): LtTusUpload;
|
|
288
|
+
export type { LtFileInfo, LtFileState, LtFilesOptions, LtResolvedFilesOptions, LtTusClient, LtTusClientUpload, LtTusClientUploadOptions, LtTusHttpRequest, LtTusHttpResponse, LtTusOptions, LtTusPreviousUpload, LtTusUpload, LtTusUploadState, LtUploadItem, LtUploadOptions, LtUploadProgress, LtUploadStatus };
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import { LtRequestContext, LtRuntimeConfig, LtServerRuntimeConfig } from "@lenne.tech/ng-base";
|
|
3
|
+
import { EnvironmentProviders } from "@angular/core";
|
|
4
|
+
/** Environment map (`process.env` shape). */
|
|
5
|
+
type LtEnv = Record<string, string | undefined>;
|
|
6
|
+
/**
|
|
7
|
+
* Feature options that may be overridden at runtime via `NG_PUBLIC_LT_<FEATURE>_<OPTION>` (camelCase ↔ SCREAMING_SNAKE).
|
|
8
|
+
* Only listed keys are read, so an env name maps to exactly one option. Values are parsed by the type of the default:
|
|
9
|
+
* booleans (`true`/`false`), numbers, string arrays (comma-separated), strings.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LT_RUNTIME_FEATURE_KEYS: Readonly<Record<string, Readonly<Record<string, 'array' | 'boolean' | 'number' | 'string'>>>>;
|
|
12
|
+
/** `loginPath` → `LOGIN_PATH`. */
|
|
13
|
+
export declare function toLtEnvKey(camel: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Read the runtime configuration from the server environment (default `process.env`), the counterpart of Nuxt's
|
|
16
|
+
* `NUXT_*` → `runtimeConfig` mapping:
|
|
17
|
+
*
|
|
18
|
+
* | Variable | Target |
|
|
19
|
+
* |---|---|
|
|
20
|
+
* | `NG_PUBLIC_API_URL` | `apiUrl` |
|
|
21
|
+
* | `NG_API_URL` | `serverApiUrl` (SSR only, never transferred) |
|
|
22
|
+
* | `NG_PUBLIC_SITE_URL` | `siteUrl` |
|
|
23
|
+
* | `NG_PUBLIC_STORAGE_PREFIX` | `storagePrefix` |
|
|
24
|
+
* | `NG_PUBLIC_COOKIE_PREFIX` | `cookiePrefix` |
|
|
25
|
+
* | `NG_PUBLIC_API_PROXY` | `apiProxy` (`true`/`false`; unset = `null`) |
|
|
26
|
+
* | `NG_PUBLIC_APP_ENV` | `appEnv` |
|
|
27
|
+
* | `NG_PUBLIC_APP_COMMIT`, fallback `APP_VERSION_COMMIT` | `appCommit` |
|
|
28
|
+
* | `NG_PUBLIC_APP_VERSION` | `appVersion` (or `options.appVersion`) |
|
|
29
|
+
* | `NG_PUBLIC_LT_<FEATURE>_<OPTION>` | `lt.<feature>.<option>` (see {@link LT_RUNTIME_FEATURE_KEYS}) |
|
|
30
|
+
*
|
|
31
|
+
* Unset variables stay `undefined`, so code defaults keep applying.
|
|
32
|
+
*/
|
|
33
|
+
export declare function readLtRuntimeConfigFromEnv(env?: LtEnv, options?: LtRuntimeEnvOptions): LtServerRuntimeConfig;
|
|
34
|
+
/** Options of {@link readLtRuntimeConfigFromEnv} / {@link readLtRequestContext}. */
|
|
35
|
+
interface LtRuntimeEnvOptions {
|
|
36
|
+
/** Version of the running build (e.g. from package.json); overrides `NG_PUBLIC_APP_VERSION`. */
|
|
37
|
+
appVersion?: string;
|
|
38
|
+
/** Additional public values of the project (e.g. `{ plausibleApiHost: env.NG_PUBLIC_PLAUSIBLE_API_HOST }`). */
|
|
39
|
+
extend?: (env: LtEnv) => Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Build the request context for `AngularNodeAppEngine.handle(req, context)` from the environment, per request (a
|
|
43
|
+
* changed env needs no rebuild). Angular code reads it through `REQUEST_CONTEXT` (`LT_SERVER_RUNTIME_CONFIG`), and the
|
|
44
|
+
* public part must be written into the HTML with `injectLtRuntimeConfigScript()` / `ltAngularRequestHandler()`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readLtRequestContext(env?: LtEnv, options?: LtRuntimeEnvOptions): LtRequestContext;
|
|
47
|
+
/** Parse one env value by its option type (`undefined` for unset or unparsable values). */
|
|
48
|
+
export declare function parseLtEnvValue(raw: string | undefined, type: 'array' | 'boolean' | 'number' | 'string'): unknown;
|
|
49
|
+
/**
|
|
50
|
+
* Alternative to the request context for servers that call `handle(req)` without one: reads the `NG_*` environment
|
|
51
|
+
* at request time in the app (every SSR render bootstraps it) and provides `LT_SERVER_RUNTIME_CONFIG`. The browser
|
|
52
|
+
* still needs `<script id="ng-runtime-config">` in the HTML, so prefer `ltAngularRequestHandler()`, which does both.
|
|
53
|
+
*/
|
|
54
|
+
export declare function provideLtServerRuntimeConfig(env?: LtEnv | (() => LtEnv)): EnvironmentProviders;
|
|
55
|
+
/** Express-compatible middleware (`(req, res, next)`), also usable with plain `node:http`. */
|
|
56
|
+
type LtNodeMiddleware = (req: IncomingMessage, res: ServerResponse, next: (error?: unknown) => void) => void;
|
|
57
|
+
/** HSTS header value set on HTTPS requests. */
|
|
58
|
+
export declare const LT_HSTS_VALUE = "max-age=31536000; includeSubDomains";
|
|
59
|
+
/** Whether the request came in over HTTPS (`X-Forwarded-Proto` first, then the socket). */
|
|
60
|
+
export declare function isLtSecureRequest(req: Pick<IncomingMessage, 'headers'> & {
|
|
61
|
+
socket?: unknown;
|
|
62
|
+
}): boolean;
|
|
63
|
+
/** The security headers for a request (same set as nuxt-base-starter; no CSP by design). */
|
|
64
|
+
export declare function buildLtSecurityHeaders(options: {
|
|
65
|
+
secure: boolean;
|
|
66
|
+
}): Record<string, string>;
|
|
67
|
+
/**
|
|
68
|
+
* Security headers on every response: `nosniff`, `X-Frame-Options: DENY`, `Referrer-Policy: strict-origin`,
|
|
69
|
+
* `Permissions-Policy`, `X-DNS-Prefetch-Control: off`, `X-Permitted-Cross-Domain-Policies: none`, HSTS on HTTPS;
|
|
70
|
+
* removes `X-Powered-By`; never overwrites a header a route already set.
|
|
71
|
+
*/
|
|
72
|
+
export declare function ltSecurityHeaders(): LtNodeMiddleware;
|
|
73
|
+
/**
|
|
74
|
+
* Cache headers for SSR HTML: `Cache-Control: private, no-cache` and `Vary: Cookie` (the page depends on the auth
|
|
75
|
+
* cookie), unless the response already has a `Cache-Control`. Apply it to the `Response` of `AngularNodeAppEngine.handle()`
|
|
76
|
+
* before `writeResponseToNodeResponse()`. Returns whether the headers were set.
|
|
77
|
+
*/
|
|
78
|
+
export declare function applyLtHtmlCacheHeaders(response: Response): boolean;
|
|
79
|
+
/** Options of {@link ltSecurityTxt}. Values can be overridden per stage via `NG_LT_SECURITY_TXT_*`. */
|
|
80
|
+
interface LtSecurityTxtHandlerOptions {
|
|
81
|
+
/** Contact URI(s) (`mailto:`, `https://`, `tel:`), default `mailto:security@lenne.tech`. Env `NG_LT_SECURITY_TXT_CONTACT` (comma-separated). */
|
|
82
|
+
contact?: string | string[];
|
|
83
|
+
/** Hostnames served without redirect; a request for one adds a second `Canonical` line. Env `NG_LT_SECURITY_TXT_HOSTS`. */
|
|
84
|
+
hosts?: string[];
|
|
85
|
+
/** Policy URI or path (resolved against the site URL). Env `NG_LT_SECURITY_TXT_POLICY`. */
|
|
86
|
+
policy?: string;
|
|
87
|
+
/** Language tags (default `de, en`). Env `NG_LT_SECURITY_TXT_PREFERRED_LANGUAGES`. */
|
|
88
|
+
preferredLanguages?: string[];
|
|
89
|
+
/** Site URL for `Canonical` (default `NG_PUBLIC_SITE_URL`). */
|
|
90
|
+
siteUrl?: string;
|
|
91
|
+
/** Days until `Expires` (default 180, max 365). Env `NG_LT_SECURITY_TXT_VALID_DAYS`. */
|
|
92
|
+
validDays?: number;
|
|
93
|
+
/** Environment to read the overrides from (default `process.env`). */
|
|
94
|
+
env?: LtEnv;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Serve `/.well-known/security.txt` (RFC 9116), built per request: GET/HEAD, `text/plain`, `no-store`; 404 when no
|
|
98
|
+
* valid contact is configured. Register it only where somebody reads the contact address.
|
|
99
|
+
*
|
|
100
|
+
* @example server.ts: app.use(ltSecurityTxt({ contact: 'mailto:security@customer.example' }))
|
|
101
|
+
*/
|
|
102
|
+
export declare function ltSecurityTxt(options?: LtSecurityTxtHandlerOptions): LtNodeMiddleware;
|
|
103
|
+
/** Options of {@link ltBuildIdentity}. */
|
|
104
|
+
interface LtBuildIdentityOptions {
|
|
105
|
+
/** Route (default `/api/build-identity`). */
|
|
106
|
+
path?: string;
|
|
107
|
+
/** App version (default `NG_PUBLIC_APP_VERSION`, else `0.0.0`). */
|
|
108
|
+
version?: string;
|
|
109
|
+
/** Environment (default `process.env`). */
|
|
110
|
+
env?: LtEnv;
|
|
111
|
+
}
|
|
112
|
+
/** Commit of the running build: `NG_PUBLIC_APP_COMMIT`, else `APP_VERSION_COMMIT` (TurboOps), else `unknown`. */
|
|
113
|
+
export declare function resolveLtBuildCommit(env?: LtEnv): string;
|
|
114
|
+
/** `GET /api/build-identity` → `{ commit, version }` (no-store), used by the admin system page to detect drift. */
|
|
115
|
+
export declare function ltBuildIdentity(options?: LtBuildIdentityOptions): LtNodeMiddleware;
|
|
116
|
+
/** The part of `AngularNodeAppEngine` the handler needs. */
|
|
117
|
+
interface LtAngularEngine {
|
|
118
|
+
handle(request: IncomingMessage, requestContext?: unknown): Promise<Response | null>;
|
|
119
|
+
}
|
|
120
|
+
/** Options of {@link ltAngularRequestHandler}. */
|
|
121
|
+
interface LtAngularRequestHandlerOptions extends LtRuntimeEnvOptions {
|
|
122
|
+
/** Set `Cache-Control: private, no-cache` + `Vary: Cookie` on HTML without own cache header (default `true`). */
|
|
123
|
+
htmlNoCache?: boolean;
|
|
124
|
+
/** Write the pre-hydration submit guard into the HTML (default `true`, see `LT_PRE_HYDRATION_SUBMIT_GUARD_SCRIPT`). */
|
|
125
|
+
submitGuard?: boolean;
|
|
126
|
+
/** Environment (default `process.env`, read per request). */
|
|
127
|
+
env?: LtEnv;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Write the public runtime configuration as `<script id="ng-runtime-config">` into an HTML response (SSR and
|
|
131
|
+
* client-rendered routes alike). Non-HTML responses are returned unchanged.
|
|
132
|
+
*/
|
|
133
|
+
export declare function withLtRuntimeConfigScript(response: Response, config: Partial<LtRuntimeConfig>, options?: {
|
|
134
|
+
submitGuard?: boolean;
|
|
135
|
+
}): Promise<Response>;
|
|
136
|
+
/**
|
|
137
|
+
* The Angular render handler for `server.ts`: per request it reads the `NG_*` environment into an
|
|
138
|
+
* {@link LtRequestContext}, renders with `engine.handle(req, context)`, adds the HTML cache headers and the runtime
|
|
139
|
+
* config script, and writes the response. Unhandled requests go to `next()`.
|
|
140
|
+
*
|
|
141
|
+
* @example server.ts
|
|
142
|
+
* app.use(ltAngularRequestHandler(new AngularNodeAppEngine(), { appVersion: packageJson.version }));
|
|
143
|
+
*/
|
|
144
|
+
export declare function ltAngularRequestHandler(engine: LtAngularEngine, options?: LtAngularRequestHandlerOptions): LtNodeMiddleware;
|
|
145
|
+
/** Options of {@link ltApiProxy}. */
|
|
146
|
+
interface LtApiProxyOptions {
|
|
147
|
+
/**
|
|
148
|
+
* Serve the proxy (default: only when `NG_PUBLIC_API_PROXY=true`). On deployed stages the browser talks to the API
|
|
149
|
+
* directly; the proxy is for same-origin cookies and WebAuthn on `localhost` (SSR dev server, `lt dev`, E2E).
|
|
150
|
+
*/
|
|
151
|
+
enabled?: boolean;
|
|
152
|
+
/** Environment (default `process.env`). */
|
|
153
|
+
env?: LtEnv;
|
|
154
|
+
/** Path prefix that is stripped (default `/api`). */
|
|
155
|
+
prefix?: string;
|
|
156
|
+
/** Target API (default `NG_API_URL`, then `NG_PUBLIC_API_URL`). */
|
|
157
|
+
target?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Rewrite a backend `Set-Cookie` for the app origin: drop `Domain`, drop `Secure` on plain HTTP, force `Path=/`.
|
|
161
|
+
* Without it the session cookie of `localhost:3000` never reaches the app on `localhost:3001`.
|
|
162
|
+
*/
|
|
163
|
+
export declare function rewriteLtProxyCookie(cookie: string, secure: boolean): string;
|
|
164
|
+
/**
|
|
165
|
+
* Rewrite a backend `Location` / `Content-Location` for the browser: a URL on the proxy target (`http://api:3000/tus/1`)
|
|
166
|
+
* or an API path (`/tus/1`) becomes the proxied path (`/api/tus/1`); other origins (OAuth redirects) stay unchanged.
|
|
167
|
+
* Without it a TUS upload continues against the internal `NG_API_URL`, which the browser can neither reach nor should
|
|
168
|
+
* ever learn.
|
|
169
|
+
*/
|
|
170
|
+
export declare function rewriteLtProxyLocation(location: string, target: string, prefix: string): string;
|
|
171
|
+
/**
|
|
172
|
+
* Same-origin API proxy for the Angular SSR server: `/api/<path>` → `<target>/<path>` (method, body and the auth
|
|
173
|
+
* headers forwarded, streaming both ways, `Set-Cookie` rewritten). The counterpart of nuxt-base-starter's
|
|
174
|
+
* `server/api/iam/[...path].ts`, covering every API path (auth, TUS, AI SSE, sync).
|
|
175
|
+
*
|
|
176
|
+
* `ng serve` uses `proxy.conf.mjs` instead; this is for the built server (`.output/server/index.mjs`).
|
|
177
|
+
*/
|
|
178
|
+
export declare function ltApiProxy(options?: LtApiProxyOptions): LtNodeMiddleware;
|
|
179
|
+
/**
|
|
180
|
+
* security.txt according to RFC 9116, built per request.
|
|
181
|
+
*
|
|
182
|
+
* Ported from the lenne.Tech website (DEV-3602), where it has been live since 2026-10-13.
|
|
183
|
+
* Pure functions only, so the route stays a thin adapter and everything that decides the
|
|
184
|
+
* file's content is unit-testable without a Nitro context.
|
|
185
|
+
*/
|
|
186
|
+
export declare const SECURITY_TXT_PATH = "/.well-known/security.txt";
|
|
187
|
+
export declare const SECURITY_TXT_DEFAULT_CONTACT = "mailto:security@lenne.tech";
|
|
188
|
+
export declare const SECURITY_TXT_DEFAULT_LANGUAGES: string[];
|
|
189
|
+
export declare const SECURITY_TXT_DEFAULT_VALID_DAYS = 180;
|
|
190
|
+
interface SecurityTxtOptions {
|
|
191
|
+
/** Contact URIs (`mailto:`, `https:` or `tel:`), in order of preference. */
|
|
192
|
+
contacts: string[];
|
|
193
|
+
/** Point in time the file is built for; `Expires` is derived from it. */
|
|
194
|
+
now: Date;
|
|
195
|
+
/** Origins the file is served from; each becomes one `Canonical` line. */
|
|
196
|
+
origins: string[];
|
|
197
|
+
/** URI of the vulnerability disclosure policy, or a path resolved against the first origin. */
|
|
198
|
+
policy?: string;
|
|
199
|
+
/** Language tags in order of preference. */
|
|
200
|
+
preferredLanguages?: string[];
|
|
201
|
+
/** Days between `now` and `Expires`. */
|
|
202
|
+
validDays?: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Normalises the configured contact(s). Accepts a string or an array (`ltSecurityTxt()` splits the comma-separated
|
|
206
|
+
* runtime override `NG_LT_SECURITY_TXT_CONTACT`).
|
|
207
|
+
*
|
|
208
|
+
* Whatever is not a usable URI is dropped. `security@example.com` is the obvious typo, and scanners
|
|
209
|
+
* treat the file it would produce as invalid; with no contact left, the route answers 404 instead.
|
|
210
|
+
*/
|
|
211
|
+
export declare function normalizeSecurityTxtContacts(contact: unknown): string[];
|
|
212
|
+
/**
|
|
213
|
+
* Normalises a list option (languages, hosts). A runtime override via an environment variable
|
|
214
|
+
* arrives as a string, so `"de, en"` is accepted as well as `['de', 'en']`.
|
|
215
|
+
*/
|
|
216
|
+
export declare function normalizeSecurityTxtList(value: unknown): string[];
|
|
217
|
+
/**
|
|
218
|
+
* Clamps `validDays` into the window RFC 9116 recommends. A non-finite or non-positive value
|
|
219
|
+
* falls back to the default instead of producing an `Expires` in the past.
|
|
220
|
+
*/
|
|
221
|
+
export declare function normalizeSecurityTxtValidDays(validDays: unknown): number;
|
|
222
|
+
/**
|
|
223
|
+
* Turns a configured site URL into an origin (`https://example.com`), dropping path, query and
|
|
224
|
+
* trailing slash. Anything that is not an absolute http(s) URL yields `undefined`.
|
|
225
|
+
*/
|
|
226
|
+
export declare function toSecurityTxtOrigin(url: string | undefined): string | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* Turns the requested host into an origin, but only if it is one the site is known to be served
|
|
229
|
+
* from. The host comes from a request header, so anything else must not end up in the file.
|
|
230
|
+
*/
|
|
231
|
+
export declare function allowedRequestOrigin(host: string | undefined, allowedHosts: string[]): string | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* Builds a security.txt according to RFC 9116.
|
|
234
|
+
*
|
|
235
|
+
* `Expires` is relative to `now`, so a file built per request never goes stale, no matter how
|
|
236
|
+
* long ago the last deployment was. It is cut to midnight UTC, which makes the file valid for up
|
|
237
|
+
* to a day less than `validDays` and keeps it byte-identical for a whole day.
|
|
238
|
+
*/
|
|
239
|
+
declare function buildSecurityTxt(options: SecurityTxtOptions): string;
|
|
240
|
+
/** The server-only runtime config the module writes to `runtimeConfig.ltExtensions.securityTxt`. */
|
|
241
|
+
interface SecurityTxtRuntimeConfig {
|
|
242
|
+
contact?: string | string[];
|
|
243
|
+
hosts?: string | string[];
|
|
244
|
+
policy?: string;
|
|
245
|
+
preferredLanguages?: string | string[];
|
|
246
|
+
validDays?: number | string;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Turns the runtime config and the request into the file's content, or `undefined` when no
|
|
250
|
+
* usable contact is left (the route then answers 404).
|
|
251
|
+
*
|
|
252
|
+
* `Canonical` names the configured site URL and, in addition, the requested host if it is one of
|
|
253
|
+
* the configured `hosts`. A site served under several hostnames without a redirect needs the
|
|
254
|
+
* second line: RFC 9116 expects the URI a file was fetched from among its Canonical lines.
|
|
255
|
+
*/
|
|
256
|
+
declare function resolveSecurityTxt(input: {
|
|
257
|
+
config: SecurityTxtRuntimeConfig | undefined;
|
|
258
|
+
now: Date;
|
|
259
|
+
requestHost: string | undefined;
|
|
260
|
+
siteUrl: string | undefined;
|
|
261
|
+
}): string | undefined;
|
|
262
|
+
export { type LtAngularEngine, type LtAngularRequestHandlerOptions, type LtApiProxyOptions, type LtBuildIdentityOptions, type LtEnv, type LtNodeMiddleware, type LtRuntimeEnvOptions, type LtSecurityTxtHandlerOptions, type SecurityTxtOptions as LtSecurityTxtOptions, type SecurityTxtRuntimeConfig as LtSecurityTxtRuntimeConfig, buildSecurityTxt as buildLtSecurityTxt, resolveSecurityTxt as resolveLtSecurityTxt };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Result of {@link LtShareService.share}. */
|
|
3
|
+
type LtShareResult = 'aborted' | 'copied' | 'failed' | 'shared' | 'unavailable';
|
|
4
|
+
/**
|
|
5
|
+
* Web Share API with clipboard fallback (counterpart of `useLtShare()`). Browser only.
|
|
6
|
+
*
|
|
7
|
+
* `share()` uses `navigator.share({ title, text, url })` where available; otherwise the URL is copied to the clipboard
|
|
8
|
+
* and a success toast (`lt.share.copied`) is shown. The URL defaults to the current page.
|
|
9
|
+
*/
|
|
10
|
+
export declare class LtShareService {
|
|
11
|
+
private readonly i18n;
|
|
12
|
+
private readonly toast;
|
|
13
|
+
private readonly isBrowser;
|
|
14
|
+
/** Whether the native share sheet is available. */
|
|
15
|
+
canShare(): boolean;
|
|
16
|
+
/** Share a link (native share sheet, else clipboard + toast). */
|
|
17
|
+
share(title?: string, text?: string, url?: string): Promise<LtShareResult>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LtShareService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
20
|
+
}
|
|
21
|
+
export type { LtShareResult };
|