@design-factory/angular 21.1.0-next.0 → 21.1.0-next.1
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/fesm2022/design-factory-angular-drawer.mjs +4 -4
- package/fesm2022/design-factory-angular-drawer.mjs.map +1 -1
- package/fesm2022/design-factory-angular-internals.mjs +5 -5
- package/fesm2022/design-factory-angular-internals.mjs.map +1 -1
- package/fesm2022/design-factory-angular-sidenav.mjs +1 -1
- package/fesm2022/design-factory-angular-sidenav.mjs.map +1 -1
- package/fesm2022/design-factory-angular-topnav.mjs +3 -3
- package/fesm2022/design-factory-angular-topnav.mjs.map +1 -1
- package/package.json +3 -6
- package/types/design-factory-angular-drawer.d.ts +4 -4
- package/types/design-factory-angular-internals.d.ts +3 -3
- package/types/design-factory-angular-sidenav.d.ts +3 -3
- package/node_modules/@agnos-ui/core/README.md +0 -5
- package/node_modules/@agnos-ui/core/accordion-BC_9xn23.cjs +0 -314
- package/node_modules/@agnos-ui/core/accordion-Ca_0T8Bc.js +0 -315
- package/node_modules/@agnos-ui/core/alert-AhaliJ17.cjs +0 -9
- package/node_modules/@agnos-ui/core/alert-Cb9FhbFQ.js +0 -10
- package/node_modules/@agnos-ui/core/collapse-COriZO7o.cjs +0 -94
- package/node_modules/@agnos-ui/core/collapse-CP79atna.js +0 -95
- package/node_modules/@agnos-ui/core/common-B5jS-Ih_.cjs +0 -73
- package/node_modules/@agnos-ui/core/common-DFyZvkII.js +0 -74
- package/node_modules/@agnos-ui/core/components/accordion/accordion.d.ts +0 -333
- package/node_modules/@agnos-ui/core/components/accordion/index.cjs +0 -7
- package/node_modules/@agnos-ui/core/components/accordion/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/accordion/index.js +0 -7
- package/node_modules/@agnos-ui/core/components/alert/alert.d.ts +0 -37
- package/node_modules/@agnos-ui/core/components/alert/common.d.ts +0 -138
- package/node_modules/@agnos-ui/core/components/alert/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/alert/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/alert/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/carousel/carousel.d.ts +0 -247
- package/node_modules/@agnos-ui/core/components/carousel/index.cjs +0 -292
- package/node_modules/@agnos-ui/core/components/carousel/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/carousel/index.js +0 -292
- package/node_modules/@agnos-ui/core/components/collapse/collapse.d.ts +0 -135
- package/node_modules/@agnos-ui/core/components/collapse/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/collapse/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/collapse/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/commonProps.d.ts +0 -11
- package/node_modules/@agnos-ui/core/components/drawer/drawer.d.ts +0 -279
- package/node_modules/@agnos-ui/core/components/drawer/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/drawer/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/drawer/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/modal/index.cjs +0 -8
- package/node_modules/@agnos-ui/core/components/modal/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/modal/index.js +0 -8
- package/node_modules/@agnos-ui/core/components/modal/modal.d.ts +0 -245
- package/node_modules/@agnos-ui/core/components/pagination/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/pagination/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/pagination/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/pagination/pagination.d.ts +0 -313
- package/node_modules/@agnos-ui/core/components/progressbar/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/progressbar/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/progressbar/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/progressbar/progressbar.d.ts +0 -91
- package/node_modules/@agnos-ui/core/components/rating/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/rating/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/rating/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/rating/rating.d.ts +0 -191
- package/node_modules/@agnos-ui/core/components/slider/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/slider/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/slider/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/slider/slider-utils.d.ts +0 -25
- package/node_modules/@agnos-ui/core/components/slider/slider.d.ts +0 -383
- package/node_modules/@agnos-ui/core/components/toast/index.cjs +0 -7
- package/node_modules/@agnos-ui/core/components/toast/index.d.ts +0 -2
- package/node_modules/@agnos-ui/core/components/toast/index.js +0 -7
- package/node_modules/@agnos-ui/core/components/toast/toast.d.ts +0 -66
- package/node_modules/@agnos-ui/core/components/toast/toaster.d.ts +0 -128
- package/node_modules/@agnos-ui/core/components/tree/index.cjs +0 -5
- package/node_modules/@agnos-ui/core/components/tree/index.d.ts +0 -1
- package/node_modules/@agnos-ui/core/components/tree/index.js +0 -5
- package/node_modules/@agnos-ui/core/components/tree/tree.d.ts +0 -143
- package/node_modules/@agnos-ui/core/config.cjs +0 -36
- package/node_modules/@agnos-ui/core/config.d.ts +0 -117
- package/node_modules/@agnos-ui/core/config.js +0 -36
- package/node_modules/@agnos-ui/core/directive-Bsreu2z1.js +0 -523
- package/node_modules/@agnos-ui/core/directive-DCaXmRe_.cjs +0 -522
- package/node_modules/@agnos-ui/core/drawer-BbFAHV07.cjs +0 -328
- package/node_modules/@agnos-ui/core/drawer-C6Qa0xEu.js +0 -329
- package/node_modules/@agnos-ui/core/index.cjs +0 -134
- package/node_modules/@agnos-ui/core/index.d.ts +0 -29
- package/node_modules/@agnos-ui/core/index.js +0 -134
- package/node_modules/@agnos-ui/core/isFocusable-Ckwus82R.js +0 -32
- package/node_modules/@agnos-ui/core/isFocusable-DfzDLeAN.cjs +0 -31
- package/node_modules/@agnos-ui/core/modal-BsNuHhT7.cjs +0 -252
- package/node_modules/@agnos-ui/core/modal-CgzY8ezz.js +0 -253
- package/node_modules/@agnos-ui/core/package.json +0 -57
- package/node_modules/@agnos-ui/core/pagination-ZxGaNWZz.js +0 -255
- package/node_modules/@agnos-ui/core/pagination-xbcOHnhd.cjs +0 -254
- package/node_modules/@agnos-ui/core/progressbar-CRbMKp4b.cjs +0 -86
- package/node_modules/@agnos-ui/core/progressbar-CSEIFnlD.js +0 -87
- package/node_modules/@agnos-ui/core/promise-CxCD3NYv.cjs +0 -118
- package/node_modules/@agnos-ui/core/promise-D-RZVPuv.js +0 -119
- package/node_modules/@agnos-ui/core/rating-BIdiiPUo.js +0 -184
- package/node_modules/@agnos-ui/core/rating-qx1xaBmz.cjs +0 -183
- package/node_modules/@agnos-ui/core/scrollbars-CT87iv_6.cjs +0 -30
- package/node_modules/@agnos-ui/core/scrollbars-CcxSrnCx.js +0 -31
- package/node_modules/@agnos-ui/core/services/extendWidget.cjs +0 -41
- package/node_modules/@agnos-ui/core/services/extendWidget.d.ts +0 -31
- package/node_modules/@agnos-ui/core/services/extendWidget.js +0 -41
- package/node_modules/@agnos-ui/core/services/floatingUI.cjs +0 -111
- package/node_modules/@agnos-ui/core/services/floatingUI.d.ts +0 -76
- package/node_modules/@agnos-ui/core/services/floatingUI.js +0 -111
- package/node_modules/@agnos-ui/core/services/focusElement.cjs +0 -46
- package/node_modules/@agnos-ui/core/services/focusElement.d.ts +0 -9
- package/node_modules/@agnos-ui/core/services/focusElement.js +0 -46
- package/node_modules/@agnos-ui/core/services/focustrack.cjs +0 -47
- package/node_modules/@agnos-ui/core/services/focustrack.d.ts +0 -40
- package/node_modules/@agnos-ui/core/services/focustrack.js +0 -47
- package/node_modules/@agnos-ui/core/services/hash.cjs +0 -15
- package/node_modules/@agnos-ui/core/services/hash.d.ts +0 -3
- package/node_modules/@agnos-ui/core/services/hash.js +0 -15
- package/node_modules/@agnos-ui/core/services/intersection.cjs +0 -53
- package/node_modules/@agnos-ui/core/services/intersection.d.ts +0 -30
- package/node_modules/@agnos-ui/core/services/intersection.js +0 -53
- package/node_modules/@agnos-ui/core/services/matchMedia.cjs +0 -14
- package/node_modules/@agnos-ui/core/services/matchMedia.d.ts +0 -8
- package/node_modules/@agnos-ui/core/services/matchMedia.js +0 -14
- package/node_modules/@agnos-ui/core/services/navManager.cjs +0 -166
- package/node_modules/@agnos-ui/core/services/navManager.d.ts +0 -144
- package/node_modules/@agnos-ui/core/services/navManager.js +0 -166
- package/node_modules/@agnos-ui/core/services/pointerdownPosition.cjs +0 -60
- package/node_modules/@agnos-ui/core/services/pointerdownPosition.d.ts +0 -42
- package/node_modules/@agnos-ui/core/services/pointerdownPosition.js +0 -60
- package/node_modules/@agnos-ui/core/services/portal.cjs +0 -42
- package/node_modules/@agnos-ui/core/services/portal.d.ts +0 -16
- package/node_modules/@agnos-ui/core/services/portal.js +0 -42
- package/node_modules/@agnos-ui/core/services/resizeObserver.cjs +0 -54
- package/node_modules/@agnos-ui/core/services/resizeObserver.d.ts +0 -18
- package/node_modules/@agnos-ui/core/services/resizeObserver.js +0 -54
- package/node_modules/@agnos-ui/core/services/siblingsInert.cjs +0 -44
- package/node_modules/@agnos-ui/core/services/siblingsInert.d.ts +0 -16
- package/node_modules/@agnos-ui/core/services/siblingsInert.js +0 -44
- package/node_modules/@agnos-ui/core/services/transitions/baseTransitions.cjs +0 -186
- package/node_modules/@agnos-ui/core/services/transitions/baseTransitions.d.ts +0 -166
- package/node_modules/@agnos-ui/core/services/transitions/baseTransitions.js +0 -186
- package/node_modules/@agnos-ui/core/services/transitions/collapse.cjs +0 -40
- package/node_modules/@agnos-ui/core/services/transitions/collapse.d.ts +0 -49
- package/node_modules/@agnos-ui/core/services/transitions/collapse.js +0 -40
- package/node_modules/@agnos-ui/core/services/transitions/cssTransitions.cjs +0 -32
- package/node_modules/@agnos-ui/core/services/transitions/cssTransitions.d.ts +0 -25
- package/node_modules/@agnos-ui/core/services/transitions/cssTransitions.js +0 -32
- package/node_modules/@agnos-ui/core/services/transitions/simpleClassTransition.cjs +0 -37
- package/node_modules/@agnos-ui/core/services/transitions/simpleClassTransition.d.ts +0 -47
- package/node_modules/@agnos-ui/core/services/transitions/simpleClassTransition.js +0 -37
- package/node_modules/@agnos-ui/core/slider-B93hE0ag.cjs +0 -807
- package/node_modules/@agnos-ui/core/slider-Cjiq9FgI.js +0 -808
- package/node_modules/@agnos-ui/core/textDirection-cNgt24LJ.js +0 -4
- package/node_modules/@agnos-ui/core/textDirection-zqcZ5-eK.cjs +0 -3
- package/node_modules/@agnos-ui/core/toaster-BQWqxYv-.cjs +0 -190
- package/node_modules/@agnos-ui/core/toaster-BzEkshT2.js +0 -191
- package/node_modules/@agnos-ui/core/tree-DY04XPPg.cjs +0 -228
- package/node_modules/@agnos-ui/core/tree-HwcvZ0_p.js +0 -229
- package/node_modules/@agnos-ui/core/types.cjs +0 -6
- package/node_modules/@agnos-ui/core/types.d.ts +0 -246
- package/node_modules/@agnos-ui/core/types.js +0 -6
- package/node_modules/@agnos-ui/core/utils/directive.cjs +0 -28
- package/node_modules/@agnos-ui/core/utils/directive.d.ts +0 -352
- package/node_modules/@agnos-ui/core/utils/directive.js +0 -28
- package/node_modules/@agnos-ui/core/utils/func.cjs +0 -7
- package/node_modules/@agnos-ui/core/utils/func.d.ts +0 -11
- package/node_modules/@agnos-ui/core/utils/func.js +0 -7
- package/node_modules/@agnos-ui/core/utils/id.cjs +0 -5
- package/node_modules/@agnos-ui/core/utils/id.d.ts +0 -6
- package/node_modules/@agnos-ui/core/utils/id.js +0 -5
- package/node_modules/@agnos-ui/core/utils/internal/assign.d.ts +0 -10
- package/node_modules/@agnos-ui/core/utils/internal/checks.d.ts +0 -57
- package/node_modules/@agnos-ui/core/utils/internal/dom.d.ts +0 -75
- package/node_modules/@agnos-ui/core/utils/internal/isFocusable.d.ts +0 -9
- package/node_modules/@agnos-ui/core/utils/internal/math.d.ts +0 -5
- package/node_modules/@agnos-ui/core/utils/internal/promise.d.ts +0 -98
- package/node_modules/@agnos-ui/core/utils/internal/scrollbars.d.ts +0 -8
- package/node_modules/@agnos-ui/core/utils/internal/sort.d.ts +0 -16
- package/node_modules/@agnos-ui/core/utils/internal/ssrHTMLElement.d.ts +0 -17
- package/node_modules/@agnos-ui/core/utils/internal/textDirection.d.ts +0 -7
- package/node_modules/@agnos-ui/core/utils/internal/traversal.d.ts +0 -54
- package/node_modules/@agnos-ui/core/utils/stores.cjs +0 -172
- package/node_modules/@agnos-ui/core/utils/stores.d.ts +0 -224
- package/node_modules/@agnos-ui/core/utils/stores.js +0 -172
- package/node_modules/@agnos-ui/core/utils/widget.cjs +0 -8
- package/node_modules/@agnos-ui/core/utils/widget.d.ts +0 -11
- package/node_modules/@agnos-ui/core/utils/widget.js +0 -8
- package/node_modules/@agnos-ui/core/utils/writables.cjs +0 -16
- package/node_modules/@agnos-ui/core/utils/writables.d.ts +0 -95
- package/node_modules/@agnos-ui/core/utils/writables.js +0 -16
- package/node_modules/@agnos-ui/core/writables-DYGjj5T3.js +0 -103
- package/node_modules/@agnos-ui/core/writables-Dt68gADJ.cjs +0 -102
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createDrawer } from '@
|
|
2
|
-
import { createNavManager } from '@
|
|
3
|
-
import { createCollapseTransition } from '@
|
|
4
|
-
import { createSimpleClassTransition } from '@
|
|
1
|
+
import { createDrawer } from '@design-factory/core/components/drawer';
|
|
2
|
+
import { createNavManager } from '@design-factory/core/services/navManager';
|
|
3
|
+
import { createCollapseTransition } from '@design-factory/core/services/transitions/collapse';
|
|
4
|
+
import { createSimpleClassTransition } from '@design-factory/core/services/transitions/simpleClassTransition';
|
|
5
5
|
import { NgTemplateOutlet } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, TemplateRef, Directive, contentChild, computed, input, booleanAttribute, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-factory-angular-drawer.mjs","sources":["../../drawer/drawer.ts","../../drawer/design-factory-angular-drawer.ts"],"sourcesContent":["import type { DrawerConfiguration, DrawerPosition, DrawerWidget } from '@agnos-ui/core/components/drawer';\nimport { createDrawer } from '@agnos-ui/core/components/drawer';\nimport type { NavManagerItemConfig } from '@agnos-ui/core/services/navManager';\nimport { createNavManager } from '@agnos-ui/core/services/navManager';\nimport { CollapseConfig, createCollapseTransition } from '@agnos-ui/core/services/transitions/collapse';\nimport { createSimpleClassTransition } from '@agnos-ui/core/services/transitions/simpleClassTransition';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n inject,\n input,\n model,\n output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n AgnosWidgetDirective,\n callWidgetFactory,\n UseDirective,\n UseMultiDirective\n} from '@design-factory/angular/internals';\n\nconst fadeTransition = createSimpleClassTransition({\n animationPendingClasses: ['df-fade'],\n animationPendingShowClasses: ['df-show'],\n showClasses: ['df-show', 'df-fade'],\n hideClasses: ['df-hidden', 'df-fade']\n});\n\nconst verticalConfig: CollapseConfig = {\n dimension: 'height',\n hideClasses: ['df-collapse-hide'],\n showClasses: ['df-collapse-show'],\n animationPendingClasses: ['df-collapse-collapsing']\n};\n\nconst horizontalConfig: CollapseConfig = {\n dimension: 'width',\n hideClasses: ['df-collapse-hide'],\n showClasses: ['df-collapse-show'],\n animationPendingClasses: ['df-collapse-collapsing', 'df-collapse-horizontal']\n};\n\n/**\n * Available drawer positions.\n */\nexport type DfDrawerPosition = DrawerPosition;\n\n/**\n * Available drawer display configurations.\n * - `'overlay'`: the drawer overlays the page content with a backdrop.\n * - `'inline'`: the drawer stays in the document flow and moves content as it expands/resizes.\n */\nexport type DfDrawerConfiguration = DrawerConfiguration;\n\n/**\n * Marks an `<ng-template>` as drawer header content.\n */\n@Directive({\n selector: 'ng-template[dfDrawerHeader]'\n})\nexport class DfDrawerHeaderTemplate {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Marks an `<ng-template>` as drawer body content.\n */\n@Directive({\n selector: 'ng-template[dfDrawerBody]'\n})\nexport class DfDrawerBodyTemplate {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Marks an `<ng-template>` as drawer footer content.\n */\n@Directive({\n selector: 'ng-template[dfDrawerFooter]'\n})\nexport class DfDrawerFooterTemplate {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Enables users to show contextual content via a sliding panel from any screen edge.\n * @experimental\n */\n@Component({\n selector: 'df-drawer',\n imports: [NgTemplateOutlet, UseDirective, UseMultiDirective],\n template: `\n @let isHidden = state.hidden();\n @let backdropHidden = state.backdropHidden();\n @if (!isHidden || keepInDom()) {\n @let isVertical = state.isVertical();\n @let drawerSize = size();\n <div\n class=\"df-drawer\"\n [class]=\"state.className()\"\n [dfUseMulti]=\"[directives.drawerPortalDirective, directives.drawerDirective]\"\n [style.--df-drawer-size]=\"drawerSize !== null ? drawerSize + 'px' : ''\"\n >\n <ng-template #defaultBodyTemplate>\n <ng-content />\n </ng-template>\n @if (hasSectionTemplates()) {\n @if (headerTemplate(); as header) {\n <div class=\"df-drawer-header\">\n <ng-template [ngTemplateOutlet]=\"header.templateRef\" />\n </div>\n }\n <div class=\"df-drawer-body\">\n @if (bodyTemplate(); as body) {\n <ng-template [ngTemplateOutlet]=\"body.templateRef\" />\n } @else {\n <ng-template [ngTemplateOutlet]=\"defaultBodyTemplate\" />\n }\n </div>\n @if (footerTemplate(); as footer) {\n <div class=\"df-drawer-footer\">\n <ng-template [ngTemplateOutlet]=\"footer.templateRef\" />\n </div>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"defaultBodyTemplate\" />\n }\n @if (state.resizable()) {\n <div\n class=\"df-drawer-splitter\"\n tabindex=\"-1\"\n [dfUse]=\"directives.splitterDirective\"\n [style.align-items]=\"!isVertical ? 'center' : undefined\"\n [style.justify-content]=\"isVertical ? 'center' : undefined\"\n >\n <ng-content select=\"df-drawer-splitter-content\">\n <button\n #splitterHandle\n class=\"btn df-btn-icononly df-btn-tertiary df-drawer-splitter-handle\"\n [class]=\"{\n 'fa-grip-lines-vertical': !isVertical,\n 'fa-grip-lines': isVertical,\n 'df-btn-outline-neutral-mirror': !backdropHidden,\n 'btn-outline-primary': backdropHidden\n }\"\n i18n-aria-label=\"@@df.drawer.resize.ariaLabel\"\n aria-label=\"Resize drawer\"\n [dfUse]=\"[navManager.directive, navManagerConfig]\"\n ></button>\n </ng-content>\n </div>\n }\n </div>\n }\n @if (!backdropHidden) {\n <div\n class=\"df-drawer-backdrop\"\n [dfUseMulti]=\"[directives.backdropPortalDirective, directives.backdropDirective]\"\n ></div>\n }\n `,\n styles: \"@use '@design-factory/components-styles/drawer';\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class DfDrawer extends AgnosWidgetDirective<DrawerWidget> {\n protected readonly headerTemplate = contentChild(DfDrawerHeaderTemplate);\n protected readonly bodyTemplate = contentChild(DfDrawerBodyTemplate);\n protected readonly footerTemplate = contentChild(DfDrawerFooterTemplate);\n protected readonly hasSectionTemplates = computed(\n () => !!this.headerTemplate() || !!this.bodyTemplate() || !!this.footerTemplate()\n );\n\n /**\n * CSS classes to be applied on the widget main container\n *\n * @defaultValue ``\n */\n readonly className = input<string>('');\n /**\n * If `true` allows body scrolling when the drawer is open.\n *\n * @defaultValue `false`\n */\n readonly bodyScroll = input(false, { transform: booleanAttribute });\n /**\n * If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable\n *\n * @defaultValue `true`\n */\n readonly backdrop = input(true, { transform: booleanAttribute });\n /**\n * Which element should contain the drawer and backdrop DOM elements.\n * If it is not null, the drawer and backdrop DOM elements are moved to the specified container.\n * Otherwise, they stay where the widget is located.\n *\n * @defaultValue\n * ```ts\n * typeof window !== 'undefined' ? document.body : null\n * ```\n */\n readonly container = input<HTMLElement | null>(null);\n /**\n * The size of the drawer in pixels.\n *\n * @defaultValue `300`\n */\n readonly size = model<number | null>(300);\n /**\n * If `true`, the drawer can be resized by the user.\n *\n * @defaultValue `false`\n */\n readonly resizable = input(false, { transform: booleanAttribute });\n /**\n * If `true`, the drawer is shown; otherwise, it is hidden.\n *\n * @defaultValue `false`\n */\n readonly visible = input(false, { transform: booleanAttribute });\n\n /**\n * If `true`, the drawer element is kept in the DOM when it is not visible.\n * This can be useful to preserve the state of the drawer content when it is hidden.\n *\n * @defaultValue `false`\n */\n readonly keepInDom = input(false, { transform: booleanAttribute });\n\n /**\n * The display configuration of the drawer.\n * - `'overlay'` (default): the drawer overlays the page content with a backdrop.\n * - `'inline'`: the drawer stays in the document flow and moves content as it expands/resizes.\n *\n * @defaultValue `'overlay'`\n */\n readonly configuration = input<DrawerConfiguration>('overlay');\n\n /**\n * The position of the drawer on the screen.\n *\n * @defaultValue `'inline-start'`\n */\n readonly position = input<DfDrawerPosition>('inline-start');\n\n /**\n * An event emitted when the width is changed.\n *\n * Event payload is equal to the newly selected width.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly sizeChange = output<number | null>();\n /**\n * Event to be triggered when the visible property changes.\n *\n * @param visible - new value of the visible propery\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly visibleChange = output<boolean>();\n\n /**\n * Event to be triggered when the minimized state changes.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly minimizedChange = output<boolean>();\n\n /**\n * Event to be triggered when the maximized state changes.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly maximizedChange = output<boolean>();\n\n /**\n * Event to be triggered when the user start or stop moving the drawer.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly resizingChange = output<boolean>();\n\n /**\n * If `true` focuses the drawer when it is opened.\n *\n * @defaultValue `true`\n */\n readonly focusOnInit = input(true, { transform: booleanAttribute });\n\n protected readonly navManager = createNavManager();\n\n protected readonly navManagerConfig: NavManagerItemConfig = {\n keys: {\n Home: this.navManager.focusFirst,\n End: this.navManager.focusLast\n }\n };\n\n /**\n * Event to be triggered when the minimum size is reached.\n *\n * @defaultValue `null`\n */\n readonly minSize = output<void>();\n\n /**\n * Event to be triggered when the maximum size is reached.\n *\n * @defaultValue `null`\n */\n readonly maxSize = output<void>();\n\n constructor() {\n const widget = callWidgetFactory(createDrawer, {\n defaultConfig: {\n bodyScroll: false,\n backdrop: true,\n transition: createCollapseTransition(horizontalConfig),\n verticalTransition: createCollapseTransition(verticalConfig),\n backdropTransition: fadeTransition\n },\n events: {\n onSizeChange: (size) => {\n this.size.set(size);\n this.sizeChange.emit(size);\n },\n onVisibleChange: (visible) => {\n this.visibleChange.emit(visible);\n },\n onMinimizedChange: (isMinimized) => {\n this.minimizedChange.emit(isMinimized);\n },\n onMaximizedChange: (isMaximized) => {\n this.maximizedChange.emit(isMaximized);\n },\n onResizingChange: (isResizing) => {\n this.resizingChange.emit(isResizing);\n }\n }\n });\n super(widget);\n }\n\n /**\n * Trigger the opening of the drawer.\n *\n * @param animated - whether the transition should be animated. If the parameter is not defined, the `animated` is defined by the component input or the default config.\n *\n * @returns A promise that resolves once the opening transition has finished.\n */\n public open(animated?: boolean): Promise<void> {\n return this.api.open(animated);\n }\n\n /**\n * Trigger the closing of the drawer.\n *\n * @param animated - whether the transition should be animated. If the parameter is not defined, the `animated` is defined by the component input or the default config.\n *\n * @returns A promise that resolves once the closing transition has finished.\n */\n public close(animated?: boolean): Promise<void> {\n return this.api.close(animated);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA4BA,MAAM,cAAc,GAAG,2BAA2B,CAAC;IACjD,uBAAuB,EAAE,CAAC,SAAS,CAAC;IACpC,2BAA2B,EAAE,CAAC,SAAS,CAAC;AACxC,IAAA,WAAW,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;AACnC,IAAA,WAAW,EAAE,CAAC,WAAW,EAAE,SAAS;AACrC,CAAA,CAAC;AAEF,MA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EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/KzE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"design-factory-angular-drawer.mjs","sources":["../../drawer/drawer.ts","../../drawer/design-factory-angular-drawer.ts"],"sourcesContent":["import type { DrawerConfiguration, DrawerPosition, DrawerWidget } from '@design-factory/core/components/drawer';\nimport { createDrawer } from '@design-factory/core/components/drawer';\nimport type { NavManagerItemConfig } from '@design-factory/core/services/navManager';\nimport { createNavManager } from '@design-factory/core/services/navManager';\nimport { CollapseConfig, createCollapseTransition } from '@design-factory/core/services/transitions/collapse';\nimport { createSimpleClassTransition } from '@design-factory/core/services/transitions/simpleClassTransition';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n inject,\n input,\n model,\n output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport {\n AgnosWidgetDirective,\n callWidgetFactory,\n UseDirective,\n UseMultiDirective\n} from '@design-factory/angular/internals';\n\nconst fadeTransition = createSimpleClassTransition({\n animationPendingClasses: ['df-fade'],\n animationPendingShowClasses: ['df-show'],\n showClasses: ['df-show', 'df-fade'],\n hideClasses: ['df-hidden', 'df-fade']\n});\n\nconst verticalConfig: CollapseConfig = {\n dimension: 'height',\n hideClasses: ['df-collapse-hide'],\n showClasses: ['df-collapse-show'],\n animationPendingClasses: ['df-collapse-collapsing']\n};\n\nconst horizontalConfig: CollapseConfig = {\n dimension: 'width',\n hideClasses: ['df-collapse-hide'],\n showClasses: ['df-collapse-show'],\n animationPendingClasses: ['df-collapse-collapsing', 'df-collapse-horizontal']\n};\n\n/**\n * Available drawer positions.\n */\nexport type DfDrawerPosition = DrawerPosition;\n\n/**\n * Available drawer display configurations.\n * - `'overlay'`: the drawer overlays the page content with a backdrop.\n * - `'inline'`: the drawer stays in the document flow and moves content as it expands/resizes.\n */\nexport type DfDrawerConfiguration = DrawerConfiguration;\n\n/**\n * Marks an `<ng-template>` as drawer header content.\n */\n@Directive({\n selector: 'ng-template[dfDrawerHeader]'\n})\nexport class DfDrawerHeaderTemplate {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Marks an `<ng-template>` as drawer body content.\n */\n@Directive({\n selector: 'ng-template[dfDrawerBody]'\n})\nexport class DfDrawerBodyTemplate {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Marks an `<ng-template>` as drawer footer content.\n */\n@Directive({\n selector: 'ng-template[dfDrawerFooter]'\n})\nexport class DfDrawerFooterTemplate {\n readonly templateRef = inject(TemplateRef);\n}\n\n/**\n * Enables users to show contextual content via a sliding panel from any screen edge.\n * @experimental\n */\n@Component({\n selector: 'df-drawer',\n imports: [NgTemplateOutlet, UseDirective, UseMultiDirective],\n template: `\n @let isHidden = state.hidden();\n @let backdropHidden = state.backdropHidden();\n @if (!isHidden || keepInDom()) {\n @let isVertical = state.isVertical();\n @let drawerSize = size();\n <div\n class=\"df-drawer\"\n [class]=\"state.className()\"\n [dfUseMulti]=\"[directives.drawerPortalDirective, directives.drawerDirective]\"\n [style.--df-drawer-size]=\"drawerSize !== null ? drawerSize + 'px' : ''\"\n >\n <ng-template #defaultBodyTemplate>\n <ng-content />\n </ng-template>\n @if (hasSectionTemplates()) {\n @if (headerTemplate(); as header) {\n <div class=\"df-drawer-header\">\n <ng-template [ngTemplateOutlet]=\"header.templateRef\" />\n </div>\n }\n <div class=\"df-drawer-body\">\n @if (bodyTemplate(); as body) {\n <ng-template [ngTemplateOutlet]=\"body.templateRef\" />\n } @else {\n <ng-template [ngTemplateOutlet]=\"defaultBodyTemplate\" />\n }\n </div>\n @if (footerTemplate(); as footer) {\n <div class=\"df-drawer-footer\">\n <ng-template [ngTemplateOutlet]=\"footer.templateRef\" />\n </div>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"defaultBodyTemplate\" />\n }\n @if (state.resizable()) {\n <div\n class=\"df-drawer-splitter\"\n tabindex=\"-1\"\n [dfUse]=\"directives.splitterDirective\"\n [style.align-items]=\"!isVertical ? 'center' : undefined\"\n [style.justify-content]=\"isVertical ? 'center' : undefined\"\n >\n <ng-content select=\"df-drawer-splitter-content\">\n <button\n #splitterHandle\n class=\"btn df-btn-icononly df-btn-tertiary df-drawer-splitter-handle\"\n [class]=\"{\n 'fa-grip-lines-vertical': !isVertical,\n 'fa-grip-lines': isVertical,\n 'df-btn-outline-neutral-mirror': !backdropHidden,\n 'btn-outline-primary': backdropHidden\n }\"\n i18n-aria-label=\"@@df.drawer.resize.ariaLabel\"\n aria-label=\"Resize drawer\"\n [dfUse]=\"[navManager.directive, navManagerConfig]\"\n ></button>\n </ng-content>\n </div>\n }\n </div>\n }\n @if (!backdropHidden) {\n <div\n class=\"df-drawer-backdrop\"\n [dfUseMulti]=\"[directives.backdropPortalDirective, directives.backdropDirective]\"\n ></div>\n }\n `,\n styles: \"@use '@design-factory/components-styles/drawer';\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class DfDrawer extends AgnosWidgetDirective<DrawerWidget> {\n protected readonly headerTemplate = contentChild(DfDrawerHeaderTemplate);\n protected readonly bodyTemplate = contentChild(DfDrawerBodyTemplate);\n protected readonly footerTemplate = contentChild(DfDrawerFooterTemplate);\n protected readonly hasSectionTemplates = computed(\n () => !!this.headerTemplate() || !!this.bodyTemplate() || !!this.footerTemplate()\n );\n\n /**\n * CSS classes to be applied on the widget main container\n *\n * @defaultValue ``\n */\n readonly className = input<string>('');\n /**\n * If `true` allows body scrolling when the drawer is open.\n *\n * @defaultValue `false`\n */\n readonly bodyScroll = input(false, { transform: booleanAttribute });\n /**\n * If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable\n *\n * @defaultValue `true`\n */\n readonly backdrop = input(true, { transform: booleanAttribute });\n /**\n * Which element should contain the drawer and backdrop DOM elements.\n * If it is not null, the drawer and backdrop DOM elements are moved to the specified container.\n * Otherwise, they stay where the widget is located.\n *\n * @defaultValue\n * ```ts\n * typeof window !== 'undefined' ? document.body : null\n * ```\n */\n readonly container = input<HTMLElement | null>(null);\n /**\n * The size of the drawer in pixels.\n *\n * @defaultValue `300`\n */\n readonly size = model<number | null>(300);\n /**\n * If `true`, the drawer can be resized by the user.\n *\n * @defaultValue `false`\n */\n readonly resizable = input(false, { transform: booleanAttribute });\n /**\n * If `true`, the drawer is shown; otherwise, it is hidden.\n *\n * @defaultValue `false`\n */\n readonly visible = input(false, { transform: booleanAttribute });\n\n /**\n * If `true`, the drawer element is kept in the DOM when it is not visible.\n * This can be useful to preserve the state of the drawer content when it is hidden.\n *\n * @defaultValue `false`\n */\n readonly keepInDom = input(false, { transform: booleanAttribute });\n\n /**\n * The display configuration of the drawer.\n * - `'overlay'` (default): the drawer overlays the page content with a backdrop.\n * - `'inline'`: the drawer stays in the document flow and moves content as it expands/resizes.\n *\n * @defaultValue `'overlay'`\n */\n readonly configuration = input<DrawerConfiguration>('overlay');\n\n /**\n * The position of the drawer on the screen.\n *\n * @defaultValue `'inline-start'`\n */\n readonly position = input<DfDrawerPosition>('inline-start');\n\n /**\n * An event emitted when the width is changed.\n *\n * Event payload is equal to the newly selected width.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly sizeChange = output<number | null>();\n /**\n * Event to be triggered when the visible property changes.\n *\n * @param visible - new value of the visible propery\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly visibleChange = output<boolean>();\n\n /**\n * Event to be triggered when the minimized state changes.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly minimizedChange = output<boolean>();\n\n /**\n * Event to be triggered when the maximized state changes.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly maximizedChange = output<boolean>();\n\n /**\n * Event to be triggered when the user start or stop moving the drawer.\n *\n * @defaultValue\n * ```ts\n * () => {}\n * ```\n */\n readonly resizingChange = output<boolean>();\n\n /**\n * If `true` focuses the drawer when it is opened.\n *\n * @defaultValue `true`\n */\n readonly focusOnInit = input(true, { transform: booleanAttribute });\n\n protected readonly navManager = createNavManager();\n\n protected readonly navManagerConfig: NavManagerItemConfig = {\n keys: {\n Home: this.navManager.focusFirst,\n End: this.navManager.focusLast\n }\n };\n\n /**\n * Event to be triggered when the minimum size is reached.\n *\n * @defaultValue `null`\n */\n readonly minSize = output<void>();\n\n /**\n * Event to be triggered when the maximum size is reached.\n *\n * @defaultValue `null`\n */\n readonly maxSize = output<void>();\n\n constructor() {\n const widget = callWidgetFactory(createDrawer, {\n defaultConfig: {\n bodyScroll: false,\n backdrop: true,\n transition: createCollapseTransition(horizontalConfig),\n verticalTransition: createCollapseTransition(verticalConfig),\n backdropTransition: fadeTransition\n },\n events: {\n onSizeChange: (size) => {\n this.size.set(size);\n this.sizeChange.emit(size);\n },\n onVisibleChange: (visible) => {\n this.visibleChange.emit(visible);\n },\n onMinimizedChange: (isMinimized) => {\n this.minimizedChange.emit(isMinimized);\n },\n onMaximizedChange: (isMaximized) => {\n this.maximizedChange.emit(isMaximized);\n },\n onResizingChange: (isResizing) => {\n this.resizingChange.emit(isResizing);\n }\n }\n });\n super(widget);\n }\n\n /**\n * Trigger the opening of the drawer.\n *\n * @param animated - whether the transition should be animated. If the parameter is not defined, the `animated` is defined by the component input or the default config.\n *\n * @returns A promise that resolves once the opening transition has finished.\n */\n public open(animated?: boolean): Promise<void> {\n return this.api.open(animated);\n }\n\n /**\n * Trigger the closing of the drawer.\n *\n * @param animated - whether the transition should be animated. If the parameter is not defined, the `animated` is defined by the component input or the default config.\n *\n * @returns A promise that resolves once the closing transition has finished.\n */\n public close(animated?: boolean): Promise<void> {\n return this.api.close(animated);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA4BA,MAAM,cAAc,GAAG,2BAA2B,CAAC;IACjD,uBAAuB,EAAE,CAAC,SAAS,CAAC;IACpC,2BAA2B,EAAE,CAAC,SAAS,CAAC;AACxC,IAAA,WAAW,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;AACnC,IAAA,WAAW,EAAE,CAAC,WAAW,EAAE,SAAS;AACrC,CAAA,CAAC;AAEF,MAAM,cAAc,GAAmB;AACrC,IAAA,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,CAAC,kBAAkB,CAAC;IACjC,WAAW,EAAE,CAAC,kBAAkB,CAAC;IACjC,uBAAuB,EAAE,CAAC,wBAAwB;CACnD;AAED,MAAM,gBAAgB,GAAmB;AACvC,IAAA,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,CAAC,kBAAkB,CAAC;IACjC,WAAW,EAAE,CAAC,kBAAkB,CAAC;AACjC,IAAA,uBAAuB,EAAE,CAAC,wBAAwB,EAAE,wBAAwB;CAC7E;AAcD;;AAEG;MAIU,sBAAsB,CAAA;AAHnC,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC3C,IAAA;8GAFY,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAA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AAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/KzE;;AAEG;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed, asWritable } from '@amadeus-it-group/tansu';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { signal, inject, DestroyRef, Injector, runInInjectionContext, Directive, InjectionToken, SkipSelf, Optional, ElementRef, PLATFORM_ID, afterNextRender, input } from '@angular/core';
|
|
4
|
-
import { createWidgetsConfig } from '@
|
|
5
|
-
import { FACTORY_WIDGET_NAME } from '@
|
|
6
|
-
import { toReadableStore } from '@
|
|
7
|
-
import { multiDirective } from '@
|
|
4
|
+
import { createWidgetsConfig } from '@design-factory/core/config';
|
|
5
|
+
import { FACTORY_WIDGET_NAME } from '@design-factory/core/types';
|
|
6
|
+
import { toReadableStore } from '@design-factory/core/utils/stores';
|
|
7
|
+
import { multiDirective } from '@design-factory/core/utils/directive';
|
|
8
8
|
import { isPlatformServer } from '@angular/common';
|
|
9
|
-
import { createMatchMedia } from '@
|
|
9
|
+
import { createMatchMedia } from '@design-factory/core/services/matchMedia';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Converts a Tansu `ReadableSignal` to an Angular `Signal`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-factory-angular-internals.mjs","sources":["../../internals/utils/stores.ts","../../internals/utils/widget.ts","../../internals/config.ts","../../internals/utils/directive.ts","../../internals/widget.directive.ts","../../internals/breakpoints.ts","../../internals/design-factory-angular-internals.ts"],"sourcesContent":["import type { ReadableSignal, WritableSignal as TansuWritableSignal } from '@amadeus-it-group/tansu';\nimport type { Signal, WritableSignal } from '@angular/core';\nimport { DestroyRef, inject, signal } from '@angular/core';\n\n/**\n * Converts a Tansu `ReadableSignal` to an Angular `Signal`.\n *\n * This function wraps the provided Tansu signal in an Angular signal. It subscribes to the\n * Tansu signal and updates the Angular signal with the received values. The equality function\n * for the Angular signal is set to always return false, ensuring that every new value from the\n * Tansu signal triggers an update.\n *\n * @template T - The type of the value emitted by the signals.\n * @param tansuSignal - The Tansu signal to convert.\n * @returns - The resulting Angular signal.\n */\nexport const toAngularSignal = <T>(tansuSignal: ReadableSignal<T>): Signal<T> => {\n // The equality of objects from 2 sequential emissions is already checked in tansu signal.\n // Here we'll always emit the value received from tansu signal, therefor the equality function\n const res = signal(undefined as any as T, { equal: () => false });\n const subscription = tansuSignal.subscribe((value) => {\n res.set(value);\n });\n inject(DestroyRef).onDestroy(subscription);\n\n return res.asReadonly();\n};\n\n/**\n * Converts a Tansu `WritableSignal` to an Angular `WritableSignal`.\n *\n * This function wraps the provided Tansu signal in an Angular signal. It subscribes to the\n * Tansu signal and updates the Angular signal with the received values. The equality function\n * for the Angular signal is set to always return false, ensuring that every new value from the\n * Tansu signal triggers an update.\n *\n * @template T - The type of the value emitted by the signals.\n * @param tansuSignal - The Tansu signal to convert.\n * @returns - The resulting Angular signal.\n */\nexport const toAngularWritableSignal = <T>(tansuSignal: TansuWritableSignal<T>): WritableSignal<T> => {\n const res = signal(undefined as any as T, { equal: () => false });\n const set = res.set.bind(res);\n const subscription = tansuSignal.subscribe((value) => {\n set(value);\n });\n inject(DestroyRef).onDestroy(subscription);\n res.set = tansuSignal.set;\n res.update = tansuSignal.update;\n return res;\n};\n","import { computed, type ReadableSignal } from '@amadeus-it-group/tansu';\nimport type { OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { Directive, Injector, inject, runInInjectionContext } from '@angular/core';\nimport type { AngularState, AngularWidget } from '../types';\nimport type { Widget, WidgetFactory, WidgetProps } from '@agnos-ui/core/types';\nimport { toAngularSignal } from './stores';\nimport { toReadableStore } from '@agnos-ui/core/utils/stores';\n\n/**\n * Call a widget factory using provided configs.\n *\n * The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.\n *\n * @param factory - the widget factory to call\n * @param options - the options\n * @param options.defaultConfig - the default config of the widget\n * @param options.widgetConfig - the config of the widget, overriding the defaultConfig\n * @param options.events - the events of the widget\n * @param options.afterInit - a callback to call after successful setup of the widget\n * @returns the widget\n */\nexport const callWidgetFactoryWithConfig = <W extends Widget>(\n factory: WidgetFactory<W>,\n options?: {\n defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n widgetConfig?: null | undefined | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n events?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>>;\n afterInit?: (widget: AngularWidget<W>) => void;\n }\n): AngularWidget<W> => {\n const { defaultConfig, widgetConfig, events: eventsProp, afterInit } = options ?? {};\n const injector = inject(Injector);\n const props = {};\n let initDone: () => void;\n\n const res = {\n initialized: new Promise<void>((resolve) => {\n initDone = resolve;\n }),\n patch(newProps: Partial<WidgetProps<W>>) {\n // temporary function replaced in ngInit\n Object.assign(props, newProps);\n },\n ngInit() {\n runInInjectionContext(injector, () => {\n const defaultConfig$ = toReadableStore(defaultConfig);\n const widget = factory({\n config: computed(() => ({\n ...defaultConfig$(),\n ...widgetConfig?.(),\n ...(eventsProp as Partial<WidgetProps<W>>)\n })),\n props\n });\n Object.assign(res, {\n patch: widget.patch,\n directives: widget.directives,\n api: widget.api,\n state: Object.fromEntries(\n Object.entries<ReadableSignal<unknown>>(widget.stores as any).map(([key, val]) => [\n key.slice(0, -1),\n toAngularSignal(val)\n ])\n )\n });\n afterInit?.(res as AngularWidget<W>);\n initDone();\n });\n }\n };\n\n return res as AngularWidget<W>;\n};\n\nfunction patchSimpleChanges(patchFn: (obj: any) => void, changes: SimpleChanges) {\n const obj: any = {};\n for (const [key, simpleChange] of Object.entries(changes)) {\n if (simpleChange !== undefined) {\n obj[key] = simpleChange.currentValue;\n }\n }\n patchFn(obj);\n}\n\n/**\n * An abstract base class for widget directives, providing common functionality\n * for Angular components that interact with widgets.\n *\n * @template W - The type of the widget.\n */\n@Directive()\nexport abstract class BaseWidgetDirective<W extends Widget> implements OnChanges, OnInit {\n constructor(\n // eslint-disable-next-line @angular-eslint/prefer-inject\n private readonly _widget: AngularWidget<W>,\n // eslint-disable-next-line @angular-eslint/prefer-inject\n private readonly propRenames?: Record<string, string>\n ) {}\n\n /**\n * Retrieves the widget api\n * @returns the widget api\n */\n get api(): W['api'] {\n return this._widget.api;\n }\n\n /**\n * Retrieves the widget state. Each property of the state is exposed through an Angular {@link https://angular.dev/api/core/Signal | Signal}\n * @returns the widget state\n */\n get state(): AngularState<W> {\n return this._widget.state;\n }\n\n /**\n * Retrieves the widget directives\n * @returns the widget directives\n */\n get directives(): W['directives'] {\n return this._widget.directives;\n }\n\n /**\n * @inheritdoc\n * @internal\n */\n ngOnChanges(changes: SimpleChanges): void {\n const renamedChanges: SimpleChanges = {};\n if (this.propRenames) {\n for (const [key, simpleChange] of Object.entries(changes)) {\n const renamedKey = this.propRenames[key] ?? key;\n renamedChanges[renamedKey] = simpleChange;\n }\n } else {\n Object.assign(renamedChanges, changes);\n }\n patchSimpleChanges(this._widget.patch, renamedChanges);\n }\n\n /** @internal */\n ngOnInit(): void {\n this._widget.ngInit();\n }\n}\n","import { asWritable, computed, type ReadableSignal } from '@amadeus-it-group/tansu';\nimport type { FactoryProvider } from '@angular/core';\nimport { InjectionToken, Injector, Optional, SkipSelf, inject, runInInjectionContext } from '@angular/core';\nimport type { Partial2Levels, WidgetsConfigStore } from '@agnos-ui/core/config';\nimport { createWidgetsConfig } from '@agnos-ui/core/config';\nimport type { Widget, WidgetFactory, WidgetProps } from '@agnos-ui/core/types';\nimport { FACTORY_WIDGET_NAME } from '@agnos-ui/core/types';\nimport type { AngularWidget } from './types';\nimport { toAngularWritableSignal } from './utils/stores';\nimport { callWidgetFactoryWithConfig } from './utils/widget';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { BaseWidgetDirective } from './utils/widget';\n\ntype AdaptParentConfig<Config> = (config: Partial2Levels<Config>) => Partial2Levels<Config>;\ntype InjectWidgetsConfig<Config> = (config?: Partial2Levels<Config>) => WidgetsConfigStore<Config>;\ntype GenericConfig = Record<string, Record<string, unknown>>;\n\nconst WIDGETS_CONFIG_INJECTION_TOKEN = new InjectionToken<WidgetsConfigStore<GenericConfig>>('widgetsConfig', {\n providedIn: 'root',\n factory: () => createWidgetsConfig()\n});\n\n/**\n * Creates a provider of widgets default configuration that inherits from any widgets default configuration already defined at an upper level\n * in the Angular dependency injection system. It contains its own set of widgets configuration properties that override the same properties form\n * the parent configuration.\n *\n * @remarks\n * The configuration is computed from the parent configuration in two steps:\n * - first step: the parent configuration is transformed by the adaptParentConfig function (if specified).\n * If adaptParentConfig is not specified, this step is skipped.\n * - second step: the configuration from step 1 is merged (2-levels deep) with the own$ store. The own$ store initially contains\n * an empty object (i.e. no property from the parent is overridden). It can be changed by calling set on the store returned by\n * {@link injectWidgetsConfig}.\n *\n * @param adaptParentConfig - optional function that receives a 2-levels copy of the widgets default configuration\n * defined at an upper level in the Angular dependency injection system (or an empty object if there is none) and returns the widgets\n * default configuration to be used.\n * It is called only if the configuration is needed, and was not yet computed for the current value of the parent configuration.\n * It is called in a tansu reactive context, so it can use any tansu store and will be called again if those stores change.\n * It is also called in an Angular injection context, so it can call the Angular inject function to get and use dependencies from the\n * Angular dependency injection system.\n *\n * @returns DI provider to be included a list of `providers` (for example at a component level or\n * any other level of the Angular dependency injection system)\n *\n * @example\n * ```typescript\n * @Component({\n * // ...\n * providers: [\n * provideWidgetsConfig((parentConfig) => {\n * // first step configuration: transforms the parent configuration\n * parentConfig.rating = parentConfig.rating ?? {};\n * parentConfig.rating.className = `${parentConfig.rating.className ?? ''} my-rating-extra-class`\n * return parentConfig;\n * })\n * ]\n * })\n * class MyComponent {\n * widgetsConfig = injectWidgetsConfig();\n * constructor() {\n * this.widgetsConfig.set({\n * // second step configuration: overrides the parent configuration\n * rating: {\n * slotStar: MyCustomSlotStar\n * }\n * });\n * }\n * // ...\n * }\n * ```\n */\nconst provideWidgetsConfig = (adaptParentConfig?: AdaptParentConfig<GenericConfig>): FactoryProvider => ({\n provide: WIDGETS_CONFIG_INJECTION_TOKEN,\n useFactory: (parent: WidgetsConfigStore<GenericConfig> | null) => {\n if (adaptParentConfig) {\n const injector = inject(Injector);\n const originalAdaptParentConfig = adaptParentConfig;\n adaptParentConfig = (value) => runInInjectionContext(injector, () => originalAdaptParentConfig(value));\n }\n return createWidgetsConfig(parent ?? undefined, adaptParentConfig);\n },\n deps: [[new SkipSelf(), new Optional(), WIDGETS_CONFIG_INJECTION_TOKEN]]\n});\n\n/**\n * Returns the widgets default configuration store that was provided in the current injection context.\n * Throws if the no widgets default configuration store was provided.\n *\n * @param defaultConfig - values to set as soon as the config is injected\n * @remarks\n * This function must be called from an injection context, such as a constructor, a factory function, a field initializer or\n * a function used with {@link https://angular.io/api/core/runInInjectionContext | runInInjectionContext}.\n *\n * @returns the widgets default configuration store.\n */\nconst injectWidgetsConfig: InjectWidgetsConfig<GenericConfig> = (defaultConfig?: Partial2Levels<GenericConfig>) => {\n const widgetsConfig = inject(WIDGETS_CONFIG_INJECTION_TOKEN);\n if (defaultConfig) {\n widgetsConfig.set(defaultConfig);\n }\n return widgetsConfig;\n};\n\n/**\n * Injects the configuration for a specific widget.\n *\n * @template T - The type of the widget configuration to be injected.\n * @param widgetName - The name of the widget whose configuration is to be injected.\n * @returns A `ReadableSignal` that provides a partial configuration of the specified widget or `undefined` if the configuration is not available.\n */\nexport const injectWidgetConfig = <T>(widgetName: string): ReadableSignal<Partial<T> | undefined> => {\n const widgetsConfig = inject(WIDGETS_CONFIG_INJECTION_TOKEN, { optional: true });\n return computed(() => widgetsConfig?.()[widgetName] as Partial<T> | undefined);\n};\n\n/**\n * Creates and initializes a widget using the provided factory and configuration options.\n *\n * The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.\n *\n * @template W - The type of the widget.\n * @param factory - The factory function to create the widget.\n * @param options - The options for creating the widget.\n * @param options.defaultConfig - The default configuration for the widget.\n * @param options.events - The event handlers for the widget.\n * @param options.afterInit - A callback function to be called after the widget is initialized.\n * @returns The initialized widget.\n */\nexport const callWidgetFactory = <W extends Widget>(\n factory: WidgetFactory<W>,\n options?: {\n defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n events?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>>;\n afterInit?: (widget: AngularWidget<W>) => void;\n }\n): AngularWidget<W> =>\n callWidgetFactoryWithConfig(factory, {\n widgetConfig: factory[FACTORY_WIDGET_NAME] ? (injectWidgetConfig(factory[FACTORY_WIDGET_NAME]) as any) : undefined,\n defaultConfig: options?.defaultConfig,\n events: options?.events,\n afterInit: options?.afterInit\n });\n\n/**\n * Utility to provide configuration for a specific DF component.\n *\n * @example\n * ```typescript\n * export const provideDfCollapseConfig = provideDfComponentConfig<DfCollapseConfig>(COLLAPSE_CONFIG_KEY);\n * ```\n *\n * @param componentKey the key of the component in the global configuration\n * @returns the component config provider\n */\nexport const provideDfComponentConfig = <T>(componentKey: string) => {\n return (config?: Partial<T> | ((prevConfig: Partial<T>) => Partial<T>)) => {\n const typedProvideWidgetsConfig = provideWidgetsConfig as (\n adaptParentConfig?: (parentConfig: { [componentKey]?: Partial<T> }) => { [componentKey]?: Partial<T> }\n ) => FactoryProvider;\n return typedProvideWidgetsConfig((prevConfig) => ({\n ...prevConfig,\n [componentKey]: {\n ...(prevConfig?.[componentKey] ?? {}),\n ...(typeof config === 'function' ? config(prevConfig?.[componentKey] ?? {}) : (config ?? {}))\n }\n }));\n };\n};\n\n/**\n * Utility to inject writable configuration for a specific DF component.\n *\n * @example\n * ```typescript\n * export const injectDfCollapseConfig = injectDfComponentConfig<DfCollapseConfig>(COLLAPSE_CONFIG_KEY);\n * ```\n *\n * @param componentKey the key of the component in the global configuration\n * @returns the inject function that returns the writable component configuration\n */\nexport const injectDfComponentConfig =\n <T>(componentKey: string) =>\n () => {\n const widgetsConfigStore = injectWidgetsConfig() as WidgetsConfigStore<{ [componentKey]?: Partial<T> }>;\n const componentConfigStore = asWritable(\n computed(() => widgetsConfigStore.own$()[componentKey] ?? {}) as ReadableSignal<Partial<T>>,\n (newConfig: Partial<T>) => {\n widgetsConfigStore.own$.update((currentConfig) => ({ ...currentConfig, [componentKey]: newConfig }));\n }\n );\n return toAngularWritableSignal(componentConfigStore);\n };\n","import type { Directive as AgnosUIDirective, DirectiveAndParam, DirectivesAndOptParam } from '@agnos-ui/core/types';\nimport { multiDirective } from '@agnos-ui/core/utils/directive';\nimport { isPlatformServer } from '@angular/common';\nimport type { OnChanges } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n PLATFORM_ID,\n afterNextRender,\n inject,\n runInInjectionContext,\n input\n} from '@angular/core';\n\n/**\n * A utility function to manage the lifecycle of a directive for a host element.\n *\n * This function handles the creation, updating, and destruction of a directive instance\n * associated with a host element. It ensures that the directive is called appropriately\n * based on the platform (server or client) and manages the directive's lifecycle within\n * the Angular injection context.\n *\n * @template T - The type of parameters that the directive accepts.\n *\n * @param [directive] - The directive to be applied to the host element.\n * @param [params] - The parameters to be passed to the directive.\n *\n * @returns An object containing an `update` function to update the directive and its parameters.\n */\nexport const useDirectiveForHost = <T>(directive?: AgnosUIDirective<T>, params?: T) => {\n const injector = inject(Injector);\n const ref = inject(ElementRef);\n const platform = inject(PLATFORM_ID);\n\n let instance: undefined | ReturnType<AgnosUIDirective<T>>;\n let plannedCallDirective = false;\n\n const callDirective = isPlatformServer(platform)\n ? () => {\n instance = directive?.(ref.nativeElement, params as T);\n }\n : () => {\n if (plannedCallDirective || !directive) {\n return;\n }\n plannedCallDirective = true;\n runInInjectionContext(injector, () => {\n afterNextRender(() => {\n plannedCallDirective = false;\n instance = directive?.(ref.nativeElement, params as T);\n });\n });\n };\n\n function destroyDirectiveInstance() {\n const oldInstance = instance;\n instance = undefined;\n directive = undefined;\n oldInstance?.destroy?.();\n }\n\n inject(DestroyRef).onDestroy(destroyDirectiveInstance);\n\n function update(newDirective?: AgnosUIDirective<T>, newParams?: T) {\n if (newDirective !== directive) {\n void destroyDirectiveInstance();\n directive = newDirective;\n params = newParams;\n callDirective();\n } else if (newParams != params) {\n params = newParams;\n instance?.update?.(params as T);\n }\n }\n\n callDirective();\n return { update };\n};\n\n/**\n * A directive that allows the use of another directive with optional parameters.\n *\n * @template T - The type of the parameter that can be passed to the directive.\n *\n * @remarks\n * This directive uses a private instance of {@link useDirectiveForHost} to manage the directive and its parameter.\n */\n@Directive({\n selector: '[dfUse]'\n})\nexport class UseDirective<T> implements OnChanges {\n readonly use = input.required<AgnosUIDirective | DirectiveAndParam<T>>({ alias: 'dfUse' });\n readonly #useDirective = useDirectiveForHost<T>();\n\n /** @internal */\n ngOnChanges() {\n const use = this.use();\n const [directive, param] = Array.isArray(use) ? use : [use as any];\n this.#useDirective.update(directive, param);\n }\n}\n\n/**\n * A directive that allows the use of multiple directives on a host element.\n *\n * @template T - A tuple type representing the directives and their optional parameters.\n */\n@Directive({\n selector: '[dfUseMulti]'\n})\nexport class UseMultiDirective<T extends any[]> implements OnChanges {\n /**\n * An input property that takes a tuple of directives and their optional parameters.\n */\n readonly useMulti = input.required<DirectivesAndOptParam<T>>({ alias: 'dfUseMulti' });\n\n readonly #useDirective = useDirectiveForHost<DirectivesAndOptParam<T>>();\n\n /** @internal */\n ngOnChanges() {\n this.#useDirective.update(multiDirective, this.useMulti());\n }\n}\n","import type { Widget } from '@agnos-ui/core/types';\nimport type { AngularWidget } from './types';\nimport { Directive, OnChanges, OnInit, SimpleChanges } from '@angular/core';\n\n/**\n * An abstract base class for widget directives, providing common functionality\n * for Angular components that interact with widgets.\n *\n * @template W - The type of the widget.\n */\n@Directive()\nexport abstract class AgnosWidgetDirective<W extends Widget> implements OnChanges, OnInit {\n // eslint-disable-next-line @angular-eslint/prefer-inject\n constructor(protected readonly _agnosWidget: AngularWidget<W>) {}\n\n /** @internal */\n ngOnChanges(changes: SimpleChanges): void {\n const patchData: any = {};\n for (const [key, simpleChange] of Object.entries(changes)) {\n if (simpleChange !== undefined) {\n patchData[key] = simpleChange.currentValue;\n }\n }\n this._agnosWidget.patch(patchData);\n }\n\n /** @internal */\n ngOnInit(): void {\n this._agnosWidget.ngInit();\n }\n\n /**\n * Access to the widget state.\n */\n protected get state(): AngularWidget<W>['state'] {\n return this._agnosWidget.state;\n }\n\n /**\n * Access to the widget API.\n */\n protected get api(): AngularWidget<W>['api'] {\n return this._agnosWidget.api;\n }\n\n /**\n * Access to the widget directives.\n */\n protected get directives(): AngularWidget<W>['directives'] {\n return this._agnosWidget.directives;\n }\n}\n","import { createMatchMedia } from '@agnos-ui/core/services/matchMedia';\n\n// Breakpoints based on Bootstrap 5\n\n/**\n * sm breakpoint,\n * tansu signal that returns true when the viewport is at least 576px wide\n */\nexport const sm$ = createMatchMedia('(min-width: 576px)');\n/**\n * md breakpoint,\n * tansu signal that returns true when the viewport is at least 768px wide\n */\nexport const md$ = createMatchMedia('(min-width: 768px)');\n/**\n * lg breakpoint,\n * tansu signal that returns true when the viewport is at least 992px wide\n */\nexport const lg$ = createMatchMedia('(min-width: 992px)');\n/**\n * xl breakpoint,\n * tansu signal that returns true when the viewport is at least 1200px wide\n */\nexport const xl$ = createMatchMedia('(min-width: 1200px)');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAIA;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAG,CAAI,WAA8B,KAAe;;;AAG9E,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAqB,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,GAAA,EAAA,CAAA,EAAI,KAAK,EAAE,MAAM,KAAK,GAAG;IACjE,MAAM,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AACnD,QAAA,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;AAChB,IAAA,CAAC,CAAC;IACF,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC;AAE1C,IAAA,OAAO,GAAG,CAAC,UAAU,EAAE;AACzB;AAEA;;;;;;;;;;;AAWG;AACI,MAAM,uBAAuB,GAAG,CAAI,WAAmC,KAAuB;AACnG,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAqB,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,GAAA,EAAA,CAAA,EAAI,KAAK,EAAE,MAAM,KAAK,GAAG;IACjE,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAA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,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK;IAChC;AAEA;;AAEG;AACH,IAAA,IAAc,GAAG,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG;IAC9B;AAEA;;AAEG;AACH,IAAA,IAAc,UAAU,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU;IACrC;8GAvCoB,oBAAoB,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADzC;;;ACRD;AAEA;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,oBAAoB;AACxD;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,oBAAoB;AACxD;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,oBAAoB;AACxD;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,qBAAqB;;ACvBzD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"design-factory-angular-internals.mjs","sources":["../../internals/utils/stores.ts","../../internals/utils/widget.ts","../../internals/config.ts","../../internals/utils/directive.ts","../../internals/widget.directive.ts","../../internals/breakpoints.ts","../../internals/design-factory-angular-internals.ts"],"sourcesContent":["import type { ReadableSignal, WritableSignal as TansuWritableSignal } from '@amadeus-it-group/tansu';\nimport type { Signal, WritableSignal } from '@angular/core';\nimport { DestroyRef, inject, signal } from '@angular/core';\n\n/**\n * Converts a Tansu `ReadableSignal` to an Angular `Signal`.\n *\n * This function wraps the provided Tansu signal in an Angular signal. It subscribes to the\n * Tansu signal and updates the Angular signal with the received values. The equality function\n * for the Angular signal is set to always return false, ensuring that every new value from the\n * Tansu signal triggers an update.\n *\n * @template T - The type of the value emitted by the signals.\n * @param tansuSignal - The Tansu signal to convert.\n * @returns - The resulting Angular signal.\n */\nexport const toAngularSignal = <T>(tansuSignal: ReadableSignal<T>): Signal<T> => {\n // The equality of objects from 2 sequential emissions is already checked in tansu signal.\n // Here we'll always emit the value received from tansu signal, therefor the equality function\n const res = signal(undefined as any as T, { equal: () => false });\n const subscription = tansuSignal.subscribe((value) => {\n res.set(value);\n });\n inject(DestroyRef).onDestroy(subscription);\n\n return res.asReadonly();\n};\n\n/**\n * Converts a Tansu `WritableSignal` to an Angular `WritableSignal`.\n *\n * This function wraps the provided Tansu signal in an Angular signal. It subscribes to the\n * Tansu signal and updates the Angular signal with the received values. The equality function\n * for the Angular signal is set to always return false, ensuring that every new value from the\n * Tansu signal triggers an update.\n *\n * @template T - The type of the value emitted by the signals.\n * @param tansuSignal - The Tansu signal to convert.\n * @returns - The resulting Angular signal.\n */\nexport const toAngularWritableSignal = <T>(tansuSignal: TansuWritableSignal<T>): WritableSignal<T> => {\n const res = signal(undefined as any as T, { equal: () => false });\n const set = res.set.bind(res);\n const subscription = tansuSignal.subscribe((value) => {\n set(value);\n });\n inject(DestroyRef).onDestroy(subscription);\n res.set = tansuSignal.set;\n res.update = tansuSignal.update;\n return res;\n};\n","import { computed, type ReadableSignal } from '@amadeus-it-group/tansu';\nimport type { OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { Directive, Injector, inject, runInInjectionContext } from '@angular/core';\nimport type { AngularState, AngularWidget } from '../types';\nimport type { Widget, WidgetFactory, WidgetProps } from '@design-factory/core/types';\nimport { toAngularSignal } from './stores';\nimport { toReadableStore } from '@design-factory/core/utils/stores';\n\n/**\n * Call a widget factory using provided configs.\n *\n * The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.\n *\n * @param factory - the widget factory to call\n * @param options - the options\n * @param options.defaultConfig - the default config of the widget\n * @param options.widgetConfig - the config of the widget, overriding the defaultConfig\n * @param options.events - the events of the widget\n * @param options.afterInit - a callback to call after successful setup of the widget\n * @returns the widget\n */\nexport const callWidgetFactoryWithConfig = <W extends Widget>(\n factory: WidgetFactory<W>,\n options?: {\n defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n widgetConfig?: null | undefined | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n events?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>>;\n afterInit?: (widget: AngularWidget<W>) => void;\n }\n): AngularWidget<W> => {\n const { defaultConfig, widgetConfig, events: eventsProp, afterInit } = options ?? {};\n const injector = inject(Injector);\n const props = {};\n let initDone: () => void;\n\n const res = {\n initialized: new Promise<void>((resolve) => {\n initDone = resolve;\n }),\n patch(newProps: Partial<WidgetProps<W>>) {\n // temporary function replaced in ngInit\n Object.assign(props, newProps);\n },\n ngInit() {\n runInInjectionContext(injector, () => {\n const defaultConfig$ = toReadableStore(defaultConfig);\n const widget = factory({\n config: computed(() => ({\n ...defaultConfig$(),\n ...widgetConfig?.(),\n ...(eventsProp as Partial<WidgetProps<W>>)\n })),\n props\n });\n Object.assign(res, {\n patch: widget.patch,\n directives: widget.directives,\n api: widget.api,\n state: Object.fromEntries(\n Object.entries<ReadableSignal<unknown>>(widget.stores as any).map(([key, val]) => [\n key.slice(0, -1),\n toAngularSignal(val)\n ])\n )\n });\n afterInit?.(res as AngularWidget<W>);\n initDone();\n });\n }\n };\n\n return res as AngularWidget<W>;\n};\n\nfunction patchSimpleChanges(patchFn: (obj: any) => void, changes: SimpleChanges) {\n const obj: any = {};\n for (const [key, simpleChange] of Object.entries(changes)) {\n if (simpleChange !== undefined) {\n obj[key] = simpleChange.currentValue;\n }\n }\n patchFn(obj);\n}\n\n/**\n * An abstract base class for widget directives, providing common functionality\n * for Angular components that interact with widgets.\n *\n * @template W - The type of the widget.\n */\n@Directive()\nexport abstract class BaseWidgetDirective<W extends Widget> implements OnChanges, OnInit {\n constructor(\n // eslint-disable-next-line @angular-eslint/prefer-inject\n private readonly _widget: AngularWidget<W>,\n // eslint-disable-next-line @angular-eslint/prefer-inject\n private readonly propRenames?: Record<string, string>\n ) {}\n\n /**\n * Retrieves the widget api\n * @returns the widget api\n */\n get api(): W['api'] {\n return this._widget.api;\n }\n\n /**\n * Retrieves the widget state. Each property of the state is exposed through an Angular {@link https://angular.dev/api/core/Signal | Signal}\n * @returns the widget state\n */\n get state(): AngularState<W> {\n return this._widget.state;\n }\n\n /**\n * Retrieves the widget directives\n * @returns the widget directives\n */\n get directives(): W['directives'] {\n return this._widget.directives;\n }\n\n /**\n * @inheritdoc\n * @internal\n */\n ngOnChanges(changes: SimpleChanges): void {\n const renamedChanges: SimpleChanges = {};\n if (this.propRenames) {\n for (const [key, simpleChange] of Object.entries(changes)) {\n const renamedKey = this.propRenames[key] ?? key;\n renamedChanges[renamedKey] = simpleChange;\n }\n } else {\n Object.assign(renamedChanges, changes);\n }\n patchSimpleChanges(this._widget.patch, renamedChanges);\n }\n\n /** @internal */\n ngOnInit(): void {\n this._widget.ngInit();\n }\n}\n","import { asWritable, computed, type ReadableSignal } from '@amadeus-it-group/tansu';\nimport type { FactoryProvider } from '@angular/core';\nimport { InjectionToken, Injector, Optional, SkipSelf, inject, runInInjectionContext } from '@angular/core';\nimport type { Partial2Levels, WidgetsConfigStore } from '@design-factory/core/config';\nimport { createWidgetsConfig } from '@design-factory/core/config';\nimport type { Widget, WidgetFactory, WidgetProps } from '@design-factory/core/types';\nimport { FACTORY_WIDGET_NAME } from '@design-factory/core/types';\nimport type { AngularWidget } from './types';\nimport { toAngularWritableSignal } from './utils/stores';\nimport { callWidgetFactoryWithConfig } from './utils/widget';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { BaseWidgetDirective } from './utils/widget';\n\ntype AdaptParentConfig<Config> = (config: Partial2Levels<Config>) => Partial2Levels<Config>;\ntype InjectWidgetsConfig<Config> = (config?: Partial2Levels<Config>) => WidgetsConfigStore<Config>;\ntype GenericConfig = Record<string, Record<string, unknown>>;\n\nconst WIDGETS_CONFIG_INJECTION_TOKEN = new InjectionToken<WidgetsConfigStore<GenericConfig>>('widgetsConfig', {\n providedIn: 'root',\n factory: () => createWidgetsConfig()\n});\n\n/**\n * Creates a provider of widgets default configuration that inherits from any widgets default configuration already defined at an upper level\n * in the Angular dependency injection system. It contains its own set of widgets configuration properties that override the same properties form\n * the parent configuration.\n *\n * @remarks\n * The configuration is computed from the parent configuration in two steps:\n * - first step: the parent configuration is transformed by the adaptParentConfig function (if specified).\n * If adaptParentConfig is not specified, this step is skipped.\n * - second step: the configuration from step 1 is merged (2-levels deep) with the own$ store. The own$ store initially contains\n * an empty object (i.e. no property from the parent is overridden). It can be changed by calling set on the store returned by\n * {@link injectWidgetsConfig}.\n *\n * @param adaptParentConfig - optional function that receives a 2-levels copy of the widgets default configuration\n * defined at an upper level in the Angular dependency injection system (or an empty object if there is none) and returns the widgets\n * default configuration to be used.\n * It is called only if the configuration is needed, and was not yet computed for the current value of the parent configuration.\n * It is called in a tansu reactive context, so it can use any tansu store and will be called again if those stores change.\n * It is also called in an Angular injection context, so it can call the Angular inject function to get and use dependencies from the\n * Angular dependency injection system.\n *\n * @returns DI provider to be included a list of `providers` (for example at a component level or\n * any other level of the Angular dependency injection system)\n *\n * @example\n * ```typescript\n * @Component({\n * // ...\n * providers: [\n * provideWidgetsConfig((parentConfig) => {\n * // first step configuration: transforms the parent configuration\n * parentConfig.rating = parentConfig.rating ?? {};\n * parentConfig.rating.className = `${parentConfig.rating.className ?? ''} my-rating-extra-class`\n * return parentConfig;\n * })\n * ]\n * })\n * class MyComponent {\n * widgetsConfig = injectWidgetsConfig();\n * constructor() {\n * this.widgetsConfig.set({\n * // second step configuration: overrides the parent configuration\n * rating: {\n * slotStar: MyCustomSlotStar\n * }\n * });\n * }\n * // ...\n * }\n * ```\n */\nconst provideWidgetsConfig = (adaptParentConfig?: AdaptParentConfig<GenericConfig>): FactoryProvider => ({\n provide: WIDGETS_CONFIG_INJECTION_TOKEN,\n useFactory: (parent: WidgetsConfigStore<GenericConfig> | null) => {\n if (adaptParentConfig) {\n const injector = inject(Injector);\n const originalAdaptParentConfig = adaptParentConfig;\n adaptParentConfig = (value) => runInInjectionContext(injector, () => originalAdaptParentConfig(value));\n }\n return createWidgetsConfig(parent ?? undefined, adaptParentConfig);\n },\n deps: [[new SkipSelf(), new Optional(), WIDGETS_CONFIG_INJECTION_TOKEN]]\n});\n\n/**\n * Returns the widgets default configuration store that was provided in the current injection context.\n * Throws if the no widgets default configuration store was provided.\n *\n * @param defaultConfig - values to set as soon as the config is injected\n * @remarks\n * This function must be called from an injection context, such as a constructor, a factory function, a field initializer or\n * a function used with {@link https://angular.io/api/core/runInInjectionContext | runInInjectionContext}.\n *\n * @returns the widgets default configuration store.\n */\nconst injectWidgetsConfig: InjectWidgetsConfig<GenericConfig> = (defaultConfig?: Partial2Levels<GenericConfig>) => {\n const widgetsConfig = inject(WIDGETS_CONFIG_INJECTION_TOKEN);\n if (defaultConfig) {\n widgetsConfig.set(defaultConfig);\n }\n return widgetsConfig;\n};\n\n/**\n * Injects the configuration for a specific widget.\n *\n * @template T - The type of the widget configuration to be injected.\n * @param widgetName - The name of the widget whose configuration is to be injected.\n * @returns A `ReadableSignal` that provides a partial configuration of the specified widget or `undefined` if the configuration is not available.\n */\nexport const injectWidgetConfig = <T>(widgetName: string): ReadableSignal<Partial<T> | undefined> => {\n const widgetsConfig = inject(WIDGETS_CONFIG_INJECTION_TOKEN, { optional: true });\n return computed(() => widgetsConfig?.()[widgetName] as Partial<T> | undefined);\n};\n\n/**\n * Creates and initializes a widget using the provided factory and configuration options.\n *\n * The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.\n *\n * @template W - The type of the widget.\n * @param factory - The factory function to create the widget.\n * @param options - The options for creating the widget.\n * @param options.defaultConfig - The default configuration for the widget.\n * @param options.events - The event handlers for the widget.\n * @param options.afterInit - A callback function to be called after the widget is initialized.\n * @returns The initialized widget.\n */\nexport const callWidgetFactory = <W extends Widget>(\n factory: WidgetFactory<W>,\n options?: {\n defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n events?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>>;\n afterInit?: (widget: AngularWidget<W>) => void;\n }\n): AngularWidget<W> =>\n callWidgetFactoryWithConfig(factory, {\n widgetConfig: factory[FACTORY_WIDGET_NAME] ? (injectWidgetConfig(factory[FACTORY_WIDGET_NAME]) as any) : undefined,\n defaultConfig: options?.defaultConfig,\n events: options?.events,\n afterInit: options?.afterInit\n });\n\n/**\n * Utility to provide configuration for a specific DF component.\n *\n * @example\n * ```typescript\n * export const provideDfCollapseConfig = provideDfComponentConfig<DfCollapseConfig>(COLLAPSE_CONFIG_KEY);\n * ```\n *\n * @param componentKey the key of the component in the global configuration\n * @returns the component config provider\n */\nexport const provideDfComponentConfig = <T>(componentKey: string) => {\n return (config?: Partial<T> | ((prevConfig: Partial<T>) => Partial<T>)) => {\n const typedProvideWidgetsConfig = provideWidgetsConfig as (\n adaptParentConfig?: (parentConfig: { [componentKey]?: Partial<T> }) => { [componentKey]?: Partial<T> }\n ) => FactoryProvider;\n return typedProvideWidgetsConfig((prevConfig) => ({\n ...prevConfig,\n [componentKey]: {\n ...(prevConfig?.[componentKey] ?? {}),\n ...(typeof config === 'function' ? config(prevConfig?.[componentKey] ?? {}) : (config ?? {}))\n }\n }));\n };\n};\n\n/**\n * Utility to inject writable configuration for a specific DF component.\n *\n * @example\n * ```typescript\n * export const injectDfCollapseConfig = injectDfComponentConfig<DfCollapseConfig>(COLLAPSE_CONFIG_KEY);\n * ```\n *\n * @param componentKey the key of the component in the global configuration\n * @returns the inject function that returns the writable component configuration\n */\nexport const injectDfComponentConfig =\n <T>(componentKey: string) =>\n () => {\n const widgetsConfigStore = injectWidgetsConfig() as WidgetsConfigStore<{ [componentKey]?: Partial<T> }>;\n const componentConfigStore = asWritable(\n computed(() => widgetsConfigStore.own$()[componentKey] ?? {}) as ReadableSignal<Partial<T>>,\n (newConfig: Partial<T>) => {\n widgetsConfigStore.own$.update((currentConfig) => ({ ...currentConfig, [componentKey]: newConfig }));\n }\n );\n return toAngularWritableSignal(componentConfigStore);\n };\n","import type {\n Directive as AgnosUIDirective,\n DirectiveAndParam,\n DirectivesAndOptParam\n} from '@design-factory/core/types';\nimport { multiDirective } from '@design-factory/core/utils/directive';\nimport { isPlatformServer } from '@angular/common';\nimport type { OnChanges } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n PLATFORM_ID,\n afterNextRender,\n inject,\n runInInjectionContext,\n input\n} from '@angular/core';\n\n/**\n * A utility function to manage the lifecycle of a directive for a host element.\n *\n * This function handles the creation, updating, and destruction of a directive instance\n * associated with a host element. It ensures that the directive is called appropriately\n * based on the platform (server or client) and manages the directive's lifecycle within\n * the Angular injection context.\n *\n * @template T - The type of parameters that the directive accepts.\n *\n * @param [directive] - The directive to be applied to the host element.\n * @param [params] - The parameters to be passed to the directive.\n *\n * @returns An object containing an `update` function to update the directive and its parameters.\n */\nexport const useDirectiveForHost = <T>(directive?: AgnosUIDirective<T>, params?: T) => {\n const injector = inject(Injector);\n const ref = inject(ElementRef);\n const platform = inject(PLATFORM_ID);\n\n let instance: undefined | ReturnType<AgnosUIDirective<T>>;\n let plannedCallDirective = false;\n\n const callDirective = isPlatformServer(platform)\n ? () => {\n instance = directive?.(ref.nativeElement, params as T);\n }\n : () => {\n if (plannedCallDirective || !directive) {\n return;\n }\n plannedCallDirective = true;\n runInInjectionContext(injector, () => {\n afterNextRender(() => {\n plannedCallDirective = false;\n instance = directive?.(ref.nativeElement, params as T);\n });\n });\n };\n\n function destroyDirectiveInstance() {\n const oldInstance = instance;\n instance = undefined;\n directive = undefined;\n oldInstance?.destroy?.();\n }\n\n inject(DestroyRef).onDestroy(destroyDirectiveInstance);\n\n function update(newDirective?: AgnosUIDirective<T>, newParams?: T) {\n if (newDirective !== directive) {\n void destroyDirectiveInstance();\n directive = newDirective;\n params = newParams;\n callDirective();\n } else if (newParams != params) {\n params = newParams;\n instance?.update?.(params as T);\n }\n }\n\n callDirective();\n return { update };\n};\n\n/**\n * A directive that allows the use of another directive with optional parameters.\n *\n * @template T - The type of the parameter that can be passed to the directive.\n *\n * @remarks\n * This directive uses a private instance of {@link useDirectiveForHost} to manage the directive and its parameter.\n */\n@Directive({\n selector: '[dfUse]'\n})\nexport class UseDirective<T> implements OnChanges {\n readonly use = input.required<AgnosUIDirective | DirectiveAndParam<T>>({ alias: 'dfUse' });\n readonly #useDirective = useDirectiveForHost<T>();\n\n /** @internal */\n ngOnChanges() {\n const use = this.use();\n const [directive, param] = Array.isArray(use) ? use : [use as any];\n this.#useDirective.update(directive, param);\n }\n}\n\n/**\n * A directive that allows the use of multiple directives on a host element.\n *\n * @template T - A tuple type representing the directives and their optional parameters.\n */\n@Directive({\n selector: '[dfUseMulti]'\n})\nexport class UseMultiDirective<T extends any[]> implements OnChanges {\n /**\n * An input property that takes a tuple of directives and their optional parameters.\n */\n readonly useMulti = input.required<DirectivesAndOptParam<T>>({ alias: 'dfUseMulti' });\n\n readonly #useDirective = useDirectiveForHost<DirectivesAndOptParam<T>>();\n\n /** @internal */\n ngOnChanges() {\n this.#useDirective.update(multiDirective, this.useMulti());\n }\n}\n","import type { Widget } from '@design-factory/core/types';\nimport type { AngularWidget } from './types';\nimport { Directive, OnChanges, OnInit, SimpleChanges } from '@angular/core';\n\n/**\n * An abstract base class for widget directives, providing common functionality\n * for Angular components that interact with widgets.\n *\n * @template W - The type of the widget.\n */\n@Directive()\nexport abstract class AgnosWidgetDirective<W extends Widget> implements OnChanges, OnInit {\n // eslint-disable-next-line @angular-eslint/prefer-inject\n constructor(protected readonly _agnosWidget: AngularWidget<W>) {}\n\n /** @internal */\n ngOnChanges(changes: SimpleChanges): void {\n const patchData: any = {};\n for (const [key, simpleChange] of Object.entries(changes)) {\n if (simpleChange !== undefined) {\n patchData[key] = simpleChange.currentValue;\n }\n }\n this._agnosWidget.patch(patchData);\n }\n\n /** @internal */\n ngOnInit(): void {\n this._agnosWidget.ngInit();\n }\n\n /**\n * Access to the widget state.\n */\n protected get state(): AngularWidget<W>['state'] {\n return this._agnosWidget.state;\n }\n\n /**\n * Access to the widget API.\n */\n protected get api(): AngularWidget<W>['api'] {\n return this._agnosWidget.api;\n }\n\n /**\n * Access to the widget directives.\n */\n protected get directives(): AngularWidget<W>['directives'] {\n return this._agnosWidget.directives;\n }\n}\n","import { createMatchMedia } from '@design-factory/core/services/matchMedia';\n\n// Breakpoints based on Bootstrap 5\n\n/**\n * sm breakpoint,\n * tansu signal that returns true when the viewport is at least 576px wide\n */\nexport const sm$ = createMatchMedia('(min-width: 576px)');\n/**\n * md breakpoint,\n * tansu signal that returns true when the viewport is at least 768px wide\n */\nexport const md$ = createMatchMedia('(min-width: 768px)');\n/**\n * lg breakpoint,\n * tansu signal that returns true when the viewport is at least 992px wide\n */\nexport const lg$ = createMatchMedia('(min-width: 992px)');\n/**\n * xl breakpoint,\n * tansu signal that returns true when the viewport is at least 1200px wide\n */\nexport const xl$ = createMatchMedia('(min-width: 1200px)');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAIA;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAG,CAAI,WAA8B,KAAe;;;AAG9E,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAqB,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,GAAA,EAAA,CAAA,EAAI,KAAK,EAAE,MAAM,KAAK,GAAG;IACjE,MAAM,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AACnD,QAAA,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;AAChB,IAAA,CAAC,CAAC;IACF,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC;AAE1C,IAAA,OAAO,GAAG,CAAC,UA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zD,YAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,gBAAA,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,YAAY;YAC5C;QACF;AACA,QAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC;IACpC;;IAGA,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;IAC5B;AAEA;;AAEG;AACH,IAAA,IAAc,KAAK,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK;IAChC;AAEA;;AAEG;AACH,IAAA,IAAc,GAAG,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG;IAC9B;AAEA;;AAEG;AACH,IAAA,IAAc,UAAU,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU;IACrC;8GAvCoB,oBAAoB,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADzC;;;ACRD;AAEA;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,oBAAoB;AACxD;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,oBAAoB;AACxD;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,oBAAoB;AACxD;;;AAGG;MACU,GAAG,GAAG,gBAAgB,CAAC,qBAAqB;;ACvBzD;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNavManager } from '@
|
|
1
|
+
import { createNavManager } from '@design-factory/core/services/navManager';
|
|
2
2
|
import { toAngularSignal, md$, lg$, useDirectiveForHost } from '@design-factory/angular/internals';
|
|
3
3
|
import { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|