@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
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Fullscreen service
|
|
6
|
-
*/
|
|
7
|
-
export class FullscreenService {
|
|
8
|
-
_isFullscreenActive = new BehaviorSubject(false);
|
|
9
|
-
constructor() {
|
|
10
|
-
this.listenToFullscreenEvent();
|
|
11
|
-
}
|
|
12
|
-
get fullscreenState() {
|
|
13
|
-
return this._isFullscreenActive.value;
|
|
14
|
-
}
|
|
15
|
-
get fullscreenStateAsObservable() {
|
|
16
|
-
return this._isFullscreenActive.asObservable();
|
|
17
|
-
}
|
|
18
|
-
toggleFullscreen() {
|
|
19
|
-
const elem = document.documentElement;
|
|
20
|
-
if (!this._isFullscreenActive.value) {
|
|
21
|
-
elem.requestFullscreen();
|
|
22
|
-
this._isFullscreenActive.next(true);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
document.exitFullscreen();
|
|
26
|
-
this._isFullscreenActive.next(false);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Event Listener for fullscreen toggle
|
|
31
|
-
*/
|
|
32
|
-
listenToFullscreenEvent() {
|
|
33
|
-
document.addEventListener('fullscreenchange', () => {
|
|
34
|
-
if (document.fullscreenElement) {
|
|
35
|
-
this._isFullscreenActive.next(true);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this._isFullscreenActive.next(false);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FullscreenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FullscreenService, providedIn: 'root' });
|
|
44
|
-
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FullscreenService, decorators: [{
|
|
46
|
-
type: Injectable,
|
|
47
|
-
args: [{
|
|
48
|
-
providedIn: 'root',
|
|
49
|
-
}]
|
|
50
|
-
}], ctorParameters: () => [] });
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVsbHNjcmVlbi5zZ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bHNlKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuIl19
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
|
-
import { Inject, Injectable } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/platform-browser";
|
|
5
|
-
/**
|
|
6
|
-
* SEO service for setting HTML meta data
|
|
7
|
-
*
|
|
8
|
-
* Sets the same tags in the browser and during server-side rendering: crawlers for link previews read the HTML of
|
|
9
|
-
* the server and run no JavaScript. The page URL is taken from the document, which also exists on the server
|
|
10
|
-
* (window does not); pass `url` to set a canonical URL instead, e.g. when the server sits behind a proxy.
|
|
11
|
-
*/
|
|
12
|
-
export class SEOService {
|
|
13
|
-
titleService;
|
|
14
|
-
metaTagService;
|
|
15
|
-
document;
|
|
16
|
-
constructor(titleService, metaTagService, document) {
|
|
17
|
-
this.titleService = titleService;
|
|
18
|
-
this.metaTagService = metaTagService;
|
|
19
|
-
this.document = document;
|
|
20
|
-
}
|
|
21
|
-
initPageForSEO(input) {
|
|
22
|
-
this.setGeneralData(input);
|
|
23
|
-
this.setTwitterData(input);
|
|
24
|
-
this.setFacebookData(input);
|
|
25
|
-
if (input.keywords) {
|
|
26
|
-
this.setPageKeywords(input.keywords);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Set general metadata
|
|
31
|
-
*
|
|
32
|
-
* @param data
|
|
33
|
-
* @private
|
|
34
|
-
*/
|
|
35
|
-
setGeneralData(data) {
|
|
36
|
-
this.titleService.setTitle(data.title);
|
|
37
|
-
this.metaTagService.updateTag({ name: 'description', content: data.description });
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Set metadata for twitter
|
|
41
|
-
*
|
|
42
|
-
* @param data
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
setTwitterData(data) {
|
|
46
|
-
this.metaTagService.updateTag({ name: 'twitter:title', content: data.title });
|
|
47
|
-
this.metaTagService.updateTag({ name: 'twitter:description', content: data.description });
|
|
48
|
-
const url = this.getUrl(data);
|
|
49
|
-
if (url) {
|
|
50
|
-
this.metaTagService.updateTag({ property: 'twitter:url', content: url });
|
|
51
|
-
}
|
|
52
|
-
if (data.image) {
|
|
53
|
-
this.metaTagService.updateTag({
|
|
54
|
-
property: 'twitter:image',
|
|
55
|
-
content: data.image,
|
|
56
|
-
});
|
|
57
|
-
this.metaTagService.updateTag({
|
|
58
|
-
property: 'twitter:card',
|
|
59
|
-
content: 'summary_large_image',
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Set metadata for facebook
|
|
65
|
-
*
|
|
66
|
-
* @param data
|
|
67
|
-
* @private
|
|
68
|
-
*/
|
|
69
|
-
setFacebookData(data) {
|
|
70
|
-
this.metaTagService.updateTag({ property: 'og:title', content: data.title });
|
|
71
|
-
this.metaTagService.updateTag({ property: 'og:description', content: data.description });
|
|
72
|
-
this.metaTagService.updateTag({
|
|
73
|
-
property: 'og:type',
|
|
74
|
-
content: 'website',
|
|
75
|
-
});
|
|
76
|
-
const url = this.getUrl(data);
|
|
77
|
-
if (url) {
|
|
78
|
-
this.metaTagService.updateTag({ property: 'og:url', content: url });
|
|
79
|
-
}
|
|
80
|
-
if (data.image) {
|
|
81
|
-
this.metaTagService.updateTag({
|
|
82
|
-
property: 'og:image',
|
|
83
|
-
content: data.image,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* URL of the page: the given one, otherwise the one of the document (none if neither exists)
|
|
89
|
-
*
|
|
90
|
-
* @param data
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
getUrl(data) {
|
|
94
|
-
return data.url || this.document?.location?.href || undefined;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Set page keywords
|
|
98
|
-
*
|
|
99
|
-
* @param keywords
|
|
100
|
-
* @private
|
|
101
|
-
*/
|
|
102
|
-
setPageKeywords(keywords) {
|
|
103
|
-
this.metaTagService.updateTag({ name: 'keywords', content: keywords });
|
|
104
|
-
}
|
|
105
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SEOService, deps: [{ token: i1.Title }, { token: i1.Meta }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
106
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SEOService, providedIn: 'root' });
|
|
107
|
-
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SEOService, decorators: [{
|
|
109
|
-
type: Injectable,
|
|
110
|
-
args: [{
|
|
111
|
-
providedIn: 'root',
|
|
112
|
-
}]
|
|
113
|
-
}], ctorParameters: () => [{ type: i1.Title }, { type: i1.Meta }, { type: Document, decorators: [{
|
|
114
|
-
type: Inject,
|
|
115
|
-
args: [DOCUMENT]
|
|
116
|
-
}] }] });
|
|
117
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VvLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1iYXNlL3NyYy9zZXJ2aWNlcy9zZW8uc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQVduRDs7Ozs7O0dBTUc7QUFJSCxNQUFNLE9BQU8sVUFBVTtJQUVYO0lBQ0E7SUFDa0I7SUFINUIsWUFDVSxZQUFtQixFQUNuQ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50OiBrZXl3b3JkcyB9KTtcbiAgfVxufVxuIl19
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@lenne.tech/ng-base/shared";
|
|
5
|
-
export class ThemeService {
|
|
6
|
-
storageService;
|
|
7
|
-
_theme = new BehaviorSubject('light');
|
|
8
|
-
get theme() {
|
|
9
|
-
return this._theme.value;
|
|
10
|
-
}
|
|
11
|
-
set theme(theme) {
|
|
12
|
-
this._theme.next(theme);
|
|
13
|
-
this.storageService.save('theme', theme);
|
|
14
|
-
}
|
|
15
|
-
get themeObservable() {
|
|
16
|
-
return this._theme.asObservable();
|
|
17
|
-
}
|
|
18
|
-
constructor(storageService) {
|
|
19
|
-
this.storageService = storageService;
|
|
20
|
-
// Load from storage
|
|
21
|
-
this.theme = this.storageService.load('theme');
|
|
22
|
-
// Use system theme if no theme is set
|
|
23
|
-
if (!this.theme) {
|
|
24
|
-
this.checkSystemTheme();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Check theme from system
|
|
29
|
-
*/
|
|
30
|
-
checkSystemTheme() {
|
|
31
|
-
if (window?.matchMedia) {
|
|
32
|
-
this.theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ThemeService, deps: [{ token: i1.StorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ThemeService, providedIn: 'root' });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: ThemeService, decorators: [{
|
|
39
|
-
type: Injectable,
|
|
40
|
-
args: [{
|
|
41
|
-
providedIn: 'root',
|
|
42
|
-
}]
|
|
43
|
-
}], ctorParameters: () => [{ type: i1.StorageService }] });
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nLWJhc2Uvc3JjL3NlcnZpY2VzL3RoZW1lLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsZUFBZSxFQUFjLE1BQU0sTUFBTSxDQUFDOzs7QUFNbkQsTUFBTSxPQUFPLFlBQVk7SUFnQkg7SUFmcEIsTUFBTSxHQUFHLElBQUksZUFBZSxDQUFTLE9BQU8sQ0FBQyxDQUFDO0lBRTlDLElBQUksS0FBSztRQUNQLE9BQU8sSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7SUFDM0IsQ0FBQztJQUVELElBQUksS0FBSyxDQUFDLEtBQWE7UUFDckIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDeEIsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBQzNDLENBQUM7SUFFRCxJQUFJLGVBQWU7UUFDakIsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksRUFBRSxDQUFDO0lBQ3BDLENBQUM7SUFFRCxZQUFvQixjQUE4QjtRQUE5QixtQkFBYyxHQUFkLGNBQWMsQ0FBZ0I7UUFDaEQsb0JBQW9CO1FBQ3BCLElBQUksQ0FBQyxLQUFL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U7XG4gIH1cblxuICBzZXQgdGhlbWUodGhlbWU6IHN0cmluZykge1xuICAgIHRoaXMuX3RoZW1lLm5leHQodGhlbWUpO1xuICAgIHRoaXMuc3RvcmFnZVNlcnZpY2Uuc2F2ZSgndGhlbWUnLCB0aGVtZSk7XG4gIH1cblxuICBnZXQgdGhlbWVPYnNlcnZhYmxlKCk6IE9ic2VydmFibGU8c3RyaW5nPiB7XG4gICAgcmV0dXJuIHRoaXMuX3RoZW1lLmFzT2JzZXJ2YWJsZSgpO1xuICB9XG5cbiAgY29uc3RydWN0b3IocHJpdmF0ZSBzdG9yYWdlU2VydmljZTogU3RvcmFnZVNlcnZpY2UpIHtcbiAgICAvLyBMb2FkIGZyb20gc3RvcmFnZVxuICAgIHRoaXMudGhlbWUgPSB0aGlzLnN0b3JhZ2VTZXJ2aWNlLmxvYWQoJ3RoZW1lJykgYXMgc3RyaW5nO1xuXG4gICAgLy8gVXNlIHN5c3RlbSB0aGVtZSBpZiBubyB0aGVtZSBpcyBzZXRcbiAgICBpZiAoIXRoaXMudGhlbWUpIHtcbiAgICAgIHRoaXMuY2hlY2tTeXN0ZW1UaGVtZSgpO1xuICAgIH1cbiAgfVxuXG4gIC8qKlxuICAgKiBDaGVjayB0aGVtZSBmcm9tIHN5c3RlbVxuICAgKi9cbiAgY2hlY2tTeXN0ZW1UaGVtZSgpIHtcbiAgICBpZiAod2luZG93Py5tYXRjaE1lZGlhKSB7XG4gICAgICB0aGlzLnRoZW1lID0gd2luZG93Lm1hdGNoTWVkaWEoJyhwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyayknKS5tYXRjaGVzID8gJ2RhcmsnIDogJ2xpZ2h0JztcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Component, Inject } from '@angular/core';
|
|
3
|
-
import * as i1 from '@lenne.tech/ng-base/shared';
|
|
4
|
-
import { BasicUser } from '@lenne.tech/ng-base/shared';
|
|
5
|
-
import * as i2 from '@angular/router';
|
|
6
|
-
import { RouterLink } from '@angular/router';
|
|
7
|
-
import { Subscription } from 'rxjs';
|
|
8
|
-
import { NgStyle, NgClass } from '@angular/common';
|
|
9
|
-
import { ModelTableComponent } from '@lenne.tech/ng-base/base-components';
|
|
10
|
-
|
|
11
|
-
const BASE_CMS_MODULE_CONFIG = new InjectionToken('BASE_CMS_MODULE_CONFIG');
|
|
12
|
-
|
|
13
|
-
class BaseCmsComponent {
|
|
14
|
-
moduleConfig;
|
|
15
|
-
graphQLMetaService;
|
|
16
|
-
route;
|
|
17
|
-
router;
|
|
18
|
-
authService;
|
|
19
|
-
cmsService;
|
|
20
|
-
meta;
|
|
21
|
-
modelName;
|
|
22
|
-
camelModelName;
|
|
23
|
-
id;
|
|
24
|
-
types = [];
|
|
25
|
-
subscription = new Subscription();
|
|
26
|
-
sideBarWidth = '22%';
|
|
27
|
-
responsiveToggle = false;
|
|
28
|
-
constructor(moduleConfig, graphQLMetaService, route, router, authService, cmsService) {
|
|
29
|
-
this.moduleConfig = moduleConfig;
|
|
30
|
-
this.graphQLMetaService = graphQLMetaService;
|
|
31
|
-
this.route = route;
|
|
32
|
-
this.router = router;
|
|
33
|
-
this.authService = authService;
|
|
34
|
-
this.cmsService = cmsService;
|
|
35
|
-
this.calcSideBarWidth();
|
|
36
|
-
this.subscription.add(this.route.params.subscribe((value) => {
|
|
37
|
-
if (value['modelName']) {
|
|
38
|
-
const exclude = this.moduleConfig.modelConfig[value['modelName']]?.exclude;
|
|
39
|
-
if (exclude !== null && !exclude) {
|
|
40
|
-
this.modelName = value['modelName'];
|
|
41
|
-
this.camelModelName = this.toCamelCase(this.modelName);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.init().then((types) => {
|
|
45
|
-
this.router.navigate(['../' + this.toKebabCase(types[0].name)], { relativeTo: this.route });
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (value['id']) {
|
|
50
|
-
this.id = value['id'];
|
|
51
|
-
}
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
async ngOnInit() {
|
|
55
|
-
await this.init();
|
|
56
|
-
}
|
|
57
|
-
ngOnDestroy() {
|
|
58
|
-
this.subscription.unsubscribe();
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* It returns a promise that resolves to an array of GraphqlCrudType objects
|
|
62
|
-
*
|
|
63
|
-
* @returns The types that are available to the user.
|
|
64
|
-
*/
|
|
65
|
-
init() {
|
|
66
|
-
return new Promise((resolve, reject) => {
|
|
67
|
-
this.graphQLMetaService.getMeta().subscribe((meta) => {
|
|
68
|
-
this.meta = meta;
|
|
69
|
-
if (this.route.snapshot?.params?.['modelName']) {
|
|
70
|
-
this.modelName = this.route.snapshot?.params?.['modelName'];
|
|
71
|
-
this.camelModelName = this.toCamelCase(this.modelName);
|
|
72
|
-
}
|
|
73
|
-
if (this.route.snapshot?.params?.['id']) {
|
|
74
|
-
this.id = this.route.snapshot?.params?.['id'];
|
|
75
|
-
}
|
|
76
|
-
const types = meta.getTypes(this.moduleConfig?.logging);
|
|
77
|
-
// Check for excluded types
|
|
78
|
-
let filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.exclude);
|
|
79
|
-
// Sort types
|
|
80
|
-
filteredTypes = filteredTypes.sort((a, b) => {
|
|
81
|
-
return ((this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order
|
|
82
|
-
? this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order
|
|
83
|
-
: 99) -
|
|
84
|
-
(this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order
|
|
85
|
-
? this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order
|
|
86
|
-
: 99));
|
|
87
|
-
});
|
|
88
|
-
// Check for restricted types
|
|
89
|
-
this.types = filteredTypes.filter((e) => {
|
|
90
|
-
if (this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.restricted) {
|
|
91
|
-
if (!this.authService?.currentUser) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
const user = this.authService?.currentUser;
|
|
95
|
-
const mappedUser = BasicUser.map(user);
|
|
96
|
-
return mappedUser?.hasAllRoles(this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.roles);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
if (this.moduleConfig?.logging) {
|
|
103
|
-
console.log('BaseCmsComponent::init->types', this.types);
|
|
104
|
-
console.log('BaseCmsComponent::init->camelModelName', this.camelModelName);
|
|
105
|
-
console.log('BaseCmsComponent::init->fieldConfig', this.moduleConfig?.fieldConfig);
|
|
106
|
-
}
|
|
107
|
-
resolve(this.types);
|
|
108
|
-
if (!this.modelName && this.types) {
|
|
109
|
-
this.router.navigate(['./' + this.toKebabCase(this.types[0].name)], { relativeTo: this.route });
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* If the model name is set and the types are set, then return the type that matches the model name
|
|
116
|
-
*
|
|
117
|
-
* @returns The type object that matches the model name.
|
|
118
|
-
*/
|
|
119
|
-
getTypeByModelName() {
|
|
120
|
-
if (this.modelName && this.types) {
|
|
121
|
-
return this.types.find((e) => this.toKebabCase(e.name) === this.toKebabCase(this.modelName));
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* When the createModeChanged event is emitted, if the createMode is true, navigate to the new route
|
|
129
|
-
*
|
|
130
|
-
* @param createMode - boolean - This is a boolean value that indicates whether the user is in create mode or
|
|
131
|
-
* not.
|
|
132
|
-
*/
|
|
133
|
-
onCreateModeChanged(createMode) {
|
|
134
|
-
if (createMode) {
|
|
135
|
-
this.router.navigate(['./' + 'neu'], { relativeTo: this.route });
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* If the type exists, return the create property of the type, otherwise return false.
|
|
140
|
-
*
|
|
141
|
-
* @returns A boolean value.
|
|
142
|
-
*/
|
|
143
|
-
isCreatePossible() {
|
|
144
|
-
const type = this.getTypeByModelName();
|
|
145
|
-
return type ? type.create : false;
|
|
146
|
-
}
|
|
147
|
-
isImportPossible() {
|
|
148
|
-
let result = false;
|
|
149
|
-
const config = this.moduleConfig?.modelConfig[this.camelModelName]?.import;
|
|
150
|
-
if (config !== null && config !== undefined) {
|
|
151
|
-
result = config;
|
|
152
|
-
}
|
|
153
|
-
return result;
|
|
154
|
-
}
|
|
155
|
-
isExportPossible() {
|
|
156
|
-
let result = false;
|
|
157
|
-
const config = this.moduleConfig?.modelConfig[this.camelModelName]?.export;
|
|
158
|
-
if (config !== null && config !== undefined) {
|
|
159
|
-
result = config;
|
|
160
|
-
}
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* If the model name is found in the type map, return the update property of the type object
|
|
165
|
-
*
|
|
166
|
-
* @returns A boolean value.
|
|
167
|
-
*/
|
|
168
|
-
isUpdatePossible() {
|
|
169
|
-
const type = this.getTypeByModelName();
|
|
170
|
-
return type ? type.update : false;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* If the type is defined, return the delete property of the type, otherwise return false
|
|
174
|
-
*
|
|
175
|
-
* @returns A boolean value.
|
|
176
|
-
*/
|
|
177
|
-
isDeletePossible() {
|
|
178
|
-
const type = this.getTypeByModelName();
|
|
179
|
-
return type ? type.delete : false;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* If the model name is found in the type array, return the duplicate property of the type object
|
|
183
|
-
*
|
|
184
|
-
* @returns A boolean value.
|
|
185
|
-
*/
|
|
186
|
-
isDuplicatePossible() {
|
|
187
|
-
const type = this.getTypeByModelName();
|
|
188
|
-
return type ? type.duplicate : false;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* If the id is truthy, navigate to the id, otherwise navigate to the parent route
|
|
192
|
-
*/
|
|
193
|
-
idSelected(id) {
|
|
194
|
-
if (id) {
|
|
195
|
-
this.router.navigate(['./' + id], { relativeTo: this.route });
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
this.router.navigate(['..'], { relativeTo: this.route });
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Transform string to kebab case
|
|
203
|
-
*/
|
|
204
|
-
toKebabCase(str) {
|
|
205
|
-
return str?.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Transform string to camel case
|
|
209
|
-
*/
|
|
210
|
-
toCamelCase(str) {
|
|
211
|
-
return str?.replace(/-./g, (match) => match[1].toUpperCase());
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Transform first letter to lower case
|
|
215
|
-
*/
|
|
216
|
-
lowerCaseFirstLetter(value) {
|
|
217
|
-
return this.cmsService.lowerCaseFirstLetter(value);
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Calculates sidebar width based on screen size
|
|
221
|
-
*/
|
|
222
|
-
calcSideBarWidth() {
|
|
223
|
-
this.sideBarWidth = window.innerWidth < 768 ? '8%' : '22%';
|
|
224
|
-
}
|
|
225
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: BaseCmsComponent, deps: [{ token: BASE_CMS_MODULE_CONFIG }, { token: i1.GraphQLMetaService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1.AuthService }, { token: i1.CmsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
226
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: BaseCmsComponent, isStandalone: true, selector: "app-base-cms", ngImport: i0, template: "<div class=\"main\">\n <div\n class=\"sidebar\"\n [ngStyle]=\"{\n 'flex-basis': !responsiveToggle ? sideBarWidth : '100%',\n 'min-width': !responsiveToggle ? sideBarWidth : ''\n }\"\n >\n <div class=\"d-none d-md-flex flex-column flex-shrink-0 p-3 h-100\">\n @if (moduleConfig.branding) {\n @if (!moduleConfig?.logoUrl) {\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n }\n @if (moduleConfig?.logoUrl) {\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n }\n <hr />\n }\n @if (types) {\n <ul class=\"nav nav-pills flex-column mb-auto\">\n @for (type of types; track type) {\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n }\n </ul>\n }\n </div>\n <div class=\"d-flex flex-column d-md-none p-3 h-100\">\n <div class=\"d-flex justify-content-end\">\n <i\n class=\"bi\"\n [ngClass]=\"{ 'bi-chevron-left': !responsiveToggle, 'bi-chevron-right': responsiveToggle }\"\n (click)=\"responsiveToggle = !responsiveToggle\"\n ></i>\n </div>\n @if (types) {\n <ul\n class=\"nav nav-pills responsive-pills flex-column mb-auto\"\n [ngClass]=\"{ 'w-100-transition': responsiveToggle }\"\n >\n @for (type of types; track type) {\n <li class=\"nav-item\" (click)=\"responsiveToggle = !responsiveToggle\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n <div class=\"sidebar-content\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? 'unset' : '0' }\">\n <div class=\"p-3 p-md-5 mb-3\">\n <base-model-table\n [modelConfig]=\"moduleConfig?.modelConfig[camelModelName]\"\n [config]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [import]=\"isImportPossible()\"\n [export]=\"isExportPossible()\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n [showFavButton]=\"!responsiveToggle\"\n ></base-model-table>\n </div>\n </div>\n</div>\n", styles: [".active{color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.2)!important;font-weight:700}.nav-link{color:var(--bs-body-color)}.sidebar{box-shadow:#7090b014 14px 17px 40px 4px;transition:all .2s linear 0s;z-index:99}.main{display:flex;flex-direction:row;overflow:hidden;height:100%}.main .sidebar{flex-grow:1}@media only screen and (min-width: 992px){.main .sidebar{max-width:300px}}.main .sidebar-content{flex-grow:999;overflow-y:auto;background-color:#f5f7fe;min-height:100vh}.nav-flush .nav-link{border-radius:0}.responsive-pills{width:0;text-align:center;overflow:hidden}.w-100-transition{width:100%;transition:width .2s}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ModelTableComponent, selector: "base-model-table", inputs: ["modelName", "objectId", "createMode", "logging", "create", "update", "delete", "import", "export", "duplicate", "modelConfig", "config", "showFavButton"], outputs: ["idSelected", "createModeChanged"] }] });
|
|
227
|
-
}
|
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: BaseCmsComponent, decorators: [{
|
|
229
|
-
type: Component,
|
|
230
|
-
args: [{ selector: 'app-base-cms', standalone: true, imports: [
|
|
231
|
-
NgStyle,
|
|
232
|
-
RouterLink,
|
|
233
|
-
NgClass,
|
|
234
|
-
ModelTableComponent
|
|
235
|
-
], template: "<div class=\"main\">\n <div\n class=\"sidebar\"\n [ngStyle]=\"{\n 'flex-basis': !responsiveToggle ? sideBarWidth : '100%',\n 'min-width': !responsiveToggle ? sideBarWidth : ''\n }\"\n >\n <div class=\"d-none d-md-flex flex-column flex-shrink-0 p-3 h-100\">\n @if (moduleConfig.branding) {\n @if (!moduleConfig?.logoUrl) {\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n }\n @if (moduleConfig?.logoUrl) {\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n }\n <hr />\n }\n @if (types) {\n <ul class=\"nav nav-pills flex-column mb-auto\">\n @for (type of types; track type) {\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n }\n </ul>\n }\n </div>\n <div class=\"d-flex flex-column d-md-none p-3 h-100\">\n <div class=\"d-flex justify-content-end\">\n <i\n class=\"bi\"\n [ngClass]=\"{ 'bi-chevron-left': !responsiveToggle, 'bi-chevron-right': responsiveToggle }\"\n (click)=\"responsiveToggle = !responsiveToggle\"\n ></i>\n </div>\n @if (types) {\n <ul\n class=\"nav nav-pills responsive-pills flex-column mb-auto\"\n [ngClass]=\"{ 'w-100-transition': responsiveToggle }\"\n >\n @for (type of types; track type) {\n <li class=\"nav-item\" (click)=\"responsiveToggle = !responsiveToggle\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n <div class=\"sidebar-content\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? 'unset' : '0' }\">\n <div class=\"p-3 p-md-5 mb-3\">\n <base-model-table\n [modelConfig]=\"moduleConfig?.modelConfig[camelModelName]\"\n [config]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [import]=\"isImportPossible()\"\n [export]=\"isExportPossible()\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n [showFavButton]=\"!responsiveToggle\"\n ></base-model-table>\n </div>\n </div>\n</div>\n", styles: [".active{color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.2)!important;font-weight:700}.nav-link{color:var(--bs-body-color)}.sidebar{box-shadow:#7090b014 14px 17px 40px 4px;transition:all .2s linear 0s;z-index:99}.main{display:flex;flex-direction:row;overflow:hidden;height:100%}.main .sidebar{flex-grow:1}@media only screen and (min-width: 992px){.main .sidebar{max-width:300px}}.main .sidebar-content{flex-grow:999;overflow-y:auto;background-color:#f5f7fe;min-height:100vh}.nav-flush .nav-link{border-radius:0}.responsive-pills{width:0;text-align:center;overflow:hidden}.w-100-transition{width:100%;transition:width .2s}\n"] }]
|
|
236
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
237
|
-
type: Inject,
|
|
238
|
-
args: [BASE_CMS_MODULE_CONFIG]
|
|
239
|
-
}] }, { type: i1.GraphQLMetaService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i1.AuthService }, { type: i1.CmsService }] });
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Exports for public API
|
|
243
|
-
*/
|
|
244
|
-
// Pages
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Generated bundle index. Do not edit.
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
|
-
export { BASE_CMS_MODULE_CONFIG, BaseCmsComponent };
|
|
251
|
-
//# sourceMappingURL=lenne.tech-ng-base-base-cms.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lenne.tech-ng-base-base-cms.mjs","sources":["../../../projects/ng-base/base-cms/interfaces/base-cms-module-config.interface.ts","../../../projects/ng-base/base-cms/pages/base-cms/base-cms.component.ts","../../../projects/ng-base/base-cms/pages/base-cms/base-cms.component.html","../../../projects/ng-base/base-cms/public-api.ts","../../../projects/ng-base/base-cms/lenne.tech-ng-base-base-cms.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { CMSFieldConfig, CMSModelConfig } from '@lenne.tech/ng-base/shared';\n\nexport interface BaseCMSModuleConfig {\n modelConfig?: { [key: string]: CMSModelConfig | any };\n fieldConfig?: { [key: string]: { [key: string]: CMSFieldConfig | any } };\n logging?: boolean;\n logoUrl?: string;\n branding?: boolean;\n}\n\nexport const BASE_CMS_MODULE_CONFIG = new InjectionToken('BASE_CMS_MODULE_CONFIG');\n","import { Component, Inject, OnDestroy, OnInit } from '@angular/core';\nimport {\n AuthService,\n BasicUser,\n CmsService,\n GraphqlCrudType,\n GraphQLMeta,\n GraphQLMetaService\n} from '@lenne.tech/ng-base/shared';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { BASE_CMS_MODULE_CONFIG, BaseCMSModuleConfig } from '../../interfaces/base-cms-module-config.interface';\nimport { Subscription } from 'rxjs';\nimport { NgClass, NgStyle } from '@angular/common';\nimport { ModelTableComponent } from '@lenne.tech/ng-base/base-components';\n\n@Component({\n selector: 'app-base-cms',\n templateUrl: './base-cms.component.html',\n styleUrls: ['./base-cms.component.scss'],\n standalone: true,\n imports: [\n NgStyle,\n RouterLink,\n NgClass,\n ModelTableComponent\n ]\n})\nexport class BaseCmsComponent implements OnInit, OnDestroy {\n meta: GraphQLMeta;\n modelName: string;\n camelModelName: string;\n id: string;\n types: GraphqlCrudType[] = [];\n subscription = new Subscription();\n sideBarWidth = '22%';\n responsiveToggle = false;\n\n constructor(\n @Inject(BASE_CMS_MODULE_CONFIG) public moduleConfig: BaseCMSModuleConfig,\n private graphQLMetaService: GraphQLMetaService,\n private route: ActivatedRoute,\n private router: Router,\n private authService: AuthService,\n private cmsService: CmsService\n ) {\n this.calcSideBarWidth();\n this.subscription.add(\n this.route.params.subscribe((value) => {\n if (value['modelName']) {\n const exclude = this.moduleConfig.modelConfig[value['modelName']]?.exclude;\n\n if (exclude !== null && !exclude) {\n this.modelName = value['modelName'];\n this.camelModelName = this.toCamelCase(this.modelName);\n } else {\n this.init().then((types: GraphqlCrudType[]) => {\n this.router.navigate(['../' + this.toKebabCase(types[0].name)], { relativeTo: this.route });\n });\n }\n }\n\n if (value['id']) {\n this.id = value['id'];\n }\n })\n );\n }\n\n async ngOnInit() {\n await this.init();\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n /**\n * It returns a promise that resolves to an array of GraphqlCrudType objects\n *\n * @returns The types that are available to the user.\n */\n init(): Promise<GraphqlCrudType[]> {\n return new Promise((resolve, reject) => {\n this.graphQLMetaService.getMeta().subscribe((meta) => {\n this.meta = meta;\n\n if (this.route.snapshot?.params?.['modelName']) {\n this.modelName = this.route.snapshot?.params?.['modelName'];\n this.camelModelName = this.toCamelCase(this.modelName);\n }\n\n if (this.route.snapshot?.params?.['id']) {\n this.id = this.route.snapshot?.params?.['id'];\n }\n\n const types = meta.getTypes(this.moduleConfig?.logging);\n\n // Check for excluded types\n let filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.exclude);\n\n // Sort types\n filteredTypes = filteredTypes.sort((a, b) => {\n return (\n (this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order\n ? this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order\n : 99) -\n (this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order\n ? this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order\n : 99)\n );\n });\n\n // Check for restricted types\n this.types = filteredTypes.filter((e) => {\n if (this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.restricted) {\n if (!this.authService?.currentUser) {\n return false;\n }\n const user = this.authService?.currentUser;\n const mappedUser = BasicUser.map(user);\n\n return mappedUser?.hasAllRoles(this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.roles);\n } else {\n return true;\n }\n });\n\n if (this.moduleConfig?.logging) {\n console.log('BaseCmsComponent::init->types', this.types);\n console.log('BaseCmsComponent::init->camelModelName', this.camelModelName);\n console.log('BaseCmsComponent::init->fieldConfig', this.moduleConfig?.fieldConfig);\n }\n\n resolve(this.types);\n\n if (!this.modelName && this.types) {\n this.router.navigate(['./' + this.toKebabCase(this.types[0].name)], { relativeTo: this.route });\n }\n });\n });\n }\n\n /**\n * If the model name is set and the types are set, then return the type that matches the model name\n *\n * @returns The type object that matches the model name.\n */\n getTypeByModelName() {\n if (this.modelName && this.types) {\n return this.types.find((e) => this.toKebabCase(e.name) === this.toKebabCase(this.modelName));\n } else {\n return null;\n }\n }\n\n /**\n * When the createModeChanged event is emitted, if the createMode is true, navigate to the new route\n *\n * @param createMode - boolean - This is a boolean value that indicates whether the user is in create mode or\n * not.\n */\n onCreateModeChanged(createMode: boolean) {\n if (createMode) {\n this.router.navigate(['./' + 'neu'], { relativeTo: this.route });\n }\n }\n\n /**\n * If the type exists, return the create property of the type, otherwise return false.\n *\n * @returns A boolean value.\n */\n isCreatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.create : false;\n }\n\n isImportPossible(): boolean {\n let result = false;\n const config = this.moduleConfig?.modelConfig[this.camelModelName]?.import;\n\n if (config !== null && config !== undefined) {\n result = config;\n }\n\n return result;\n }\n\n isExportPossible(): boolean {\n let result = false;\n const config = this.moduleConfig?.modelConfig[this.camelModelName]?.export;\n\n if (config !== null && config !== undefined) {\n result = config;\n }\n\n return result;\n }\n\n /**\n * If the model name is found in the type map, return the update property of the type object\n *\n * @returns A boolean value.\n */\n isUpdatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.update : false;\n }\n\n /**\n * If the type is defined, return the delete property of the type, otherwise return false\n *\n * @returns A boolean value.\n */\n isDeletePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.delete : false;\n }\n\n /**\n * If the model name is found in the type array, return the duplicate property of the type object\n *\n * @returns A boolean value.\n */\n isDuplicatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.duplicate : false;\n }\n\n /**\n * If the id is truthy, navigate to the id, otherwise navigate to the parent route\n */\n idSelected(id: string) {\n if (id) {\n this.router.navigate(['./' + id], { relativeTo: this.route });\n } else {\n this.router.navigate(['..'], { relativeTo: this.route });\n }\n }\n\n /**\n * Transform string to kebab case\n */\n toKebabCase(str: string) {\n return str?.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n }\n\n /**\n * Transform string to camel case\n */\n toCamelCase(str: string) {\n return str?.replace(/-./g, (match) => match[1].toUpperCase());\n }\n\n /**\n * Transform first letter to lower case\n */\n lowerCaseFirstLetter(value: string) {\n return this.cmsService.lowerCaseFirstLetter(value);\n }\n\n /**\n * Calculates sidebar width based on screen size\n */\n calcSideBarWidth() {\n this.sideBarWidth = window.innerWidth < 768 ? '8%' : '22%';\n }\n}\n","<div class=\"main\">\n <div\n class=\"sidebar\"\n [ngStyle]=\"{\n 'flex-basis': !responsiveToggle ? sideBarWidth : '100%',\n 'min-width': !responsiveToggle ? sideBarWidth : ''\n }\"\n >\n <div class=\"d-none d-md-flex flex-column flex-shrink-0 p-3 h-100\">\n @if (moduleConfig.branding) {\n @if (!moduleConfig?.logoUrl) {\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n }\n @if (moduleConfig?.logoUrl) {\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n }\n <hr />\n }\n @if (types) {\n <ul class=\"nav nav-pills flex-column mb-auto\">\n @for (type of types; track type) {\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n }\n </ul>\n }\n </div>\n <div class=\"d-flex flex-column d-md-none p-3 h-100\">\n <div class=\"d-flex justify-content-end\">\n <i\n class=\"bi\"\n [ngClass]=\"{ 'bi-chevron-left': !responsiveToggle, 'bi-chevron-right': responsiveToggle }\"\n (click)=\"responsiveToggle = !responsiveToggle\"\n ></i>\n </div>\n @if (types) {\n <ul\n class=\"nav nav-pills responsive-pills flex-column mb-auto\"\n [ngClass]=\"{ 'w-100-transition': responsiveToggle }\"\n >\n @for (type of types; track type) {\n <li class=\"nav-item\" (click)=\"responsiveToggle = !responsiveToggle\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n <div class=\"sidebar-content\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? 'unset' : '0' }\">\n <div class=\"p-3 p-md-5 mb-3\">\n <base-model-table\n [modelConfig]=\"moduleConfig?.modelConfig[camelModelName]\"\n [config]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [import]=\"isImportPossible()\"\n [export]=\"isExportPossible()\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n [showFavButton]=\"!responsiveToggle\"\n ></base-model-table>\n </div>\n </div>\n</div>\n","/**\n * Exports for public API\n */\n\n// Pages\nexport * from './pages/base-cms/base-cms.component';\n\n// Interface\nexport * from './interfaces/base-cms-module-config.interface';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAWa,sBAAsB,GAAG,IAAI,cAAc,CAAC,wBAAwB;;MCgBpE,gBAAgB,CAAA;AAWc,IAAA,YAAA,CAAA;AAC/B,IAAA,kBAAA,CAAA;AACA,IAAA,KAAA,CAAA;AACA,IAAA,MAAA,CAAA;AACA,IAAA,WAAA,CAAA;AACA,IAAA,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