@agnos-ui/angular-headless 0.0.1-alpha.4 → 0.0.1-alpha.6
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/components/accordion/accordion.d.ts +11 -0
- package/components/alert/alert.d.ts +7 -0
- package/components/modal/modal.d.ts +7 -0
- package/components/pagination/pagination.d.ts +8 -0
- package/components/progressbar/progressbar.d.ts +7 -0
- package/components/rating/rating.d.ts +6 -0
- package/components/select/select.d.ts +8 -0
- package/components/slider/slider.d.ts +1 -0
- package/config.d.ts +36 -0
- package/esm2022/agnos-ui-angular-headless.mjs +2 -2
- package/esm2022/components/accordion/accordion.mjs +4 -0
- package/esm2022/components/alert/alert.mjs +4 -0
- package/esm2022/components/modal/modal.mjs +4 -0
- package/esm2022/components/pagination/pagination.mjs +4 -0
- package/esm2022/components/progressbar/progressbar.mjs +4 -0
- package/esm2022/components/rating/rating.mjs +4 -0
- package/esm2022/components/select/select.mjs +4 -0
- package/esm2022/components/slider/slider.mjs +2 -0
- package/esm2022/config.mjs +104 -0
- package/esm2022/generated/config.mjs +2 -0
- package/esm2022/generated/index.mjs +23 -0
- package/esm2022/generated/services/extendWidget.mjs +2 -0
- package/esm2022/generated/services/floatingUI.mjs +2 -0
- package/esm2022/generated/services/focustrack.mjs +2 -0
- package/esm2022/generated/services/intersection.mjs +2 -0
- package/esm2022/generated/services/navManager.mjs +2 -0
- package/esm2022/generated/services/portal.mjs +2 -0
- package/esm2022/generated/services/siblingsInert.mjs +2 -0
- package/esm2022/generated/services/transitions/baseTransitions.mjs +2 -0
- package/esm2022/generated/services/transitions/bootstrap.mjs +2 -0
- package/esm2022/generated/services/transitions/collapse.mjs +2 -0
- package/esm2022/generated/services/transitions/cssTransitions.mjs +2 -0
- package/esm2022/generated/services/transitions/simpleClassTransition.mjs +2 -0
- package/esm2022/generated/slot.directive.mjs +2 -0
- package/esm2022/generated/slotDefault.directive.mjs +2 -0
- package/esm2022/generated/types.mjs +2 -0
- package/esm2022/generated/utils/coercion.mjs +2 -0
- package/esm2022/generated/utils/directive.mjs +2 -0
- package/esm2022/generated/utils/stores.mjs +2 -0
- package/esm2022/generated/utils/widget.mjs +2 -0
- package/esm2022/generated/utils/writables.mjs +2 -0
- package/esm2022/generated/utils/zone.mjs +2 -0
- package/esm2022/index.mjs +13 -0
- package/esm2022/slot.directive.mjs +199 -0
- package/esm2022/slotDefault.directive.mjs +20 -0
- package/esm2022/types.mjs +21 -0
- package/esm2022/utils/coercion.mjs +34 -0
- package/esm2022/utils/directive.mjs +63 -0
- package/esm2022/utils/stores.mjs +14 -0
- package/esm2022/utils/widget.mjs +114 -0
- package/esm2022/utils/zone.mjs +67 -0
- package/fesm2022/agnos-ui-angular-headless.mjs +300 -154
- package/fesm2022/agnos-ui-angular-headless.mjs.map +1 -1
- package/generated/config.d.ts +1 -0
- package/generated/index.d.ts +22 -0
- package/generated/services/extendWidget.d.ts +1 -0
- package/generated/services/floatingUI.d.ts +1 -0
- package/generated/services/focustrack.d.ts +1 -0
- package/generated/services/intersection.d.ts +1 -0
- package/generated/services/navManager.d.ts +1 -0
- package/generated/services/portal.d.ts +1 -0
- package/generated/services/siblingsInert.d.ts +1 -0
- package/generated/services/transitions/baseTransitions.d.ts +1 -0
- package/generated/services/transitions/bootstrap.d.ts +1 -0
- package/generated/services/transitions/collapse.d.ts +1 -0
- package/generated/services/transitions/cssTransitions.d.ts +1 -0
- package/generated/services/transitions/simpleClassTransition.d.ts +1 -0
- package/generated/slot.directive.d.ts +1 -0
- package/generated/slotDefault.directive.d.ts +1 -0
- package/generated/types.d.ts +1 -0
- package/generated/utils/coercion.d.ts +1 -0
- package/generated/utils/directive.d.ts +1 -0
- package/generated/utils/stores.d.ts +1 -0
- package/generated/utils/widget.d.ts +1 -0
- package/generated/utils/writables.d.ts +1 -0
- package/generated/utils/zone.d.ts +1 -0
- package/index.d.ts +9 -5
- package/package.json +15 -14
- package/{lib/slot.directive.d.ts → slot.directive.d.ts} +1 -1
- package/{lib/slotDefault.directive.d.ts → slotDefault.directive.d.ts} +1 -1
- package/{lib/slotTypes.d.ts → types.d.ts} +19 -2
- package/utils/coercion.d.ts +22 -0
- package/{lib/use.directive.d.ts → utils/directive.d.ts} +2 -1
- package/utils/stores.d.ts +4 -0
- package/utils/widget.d.ts +27 -0
- package/utils/zone.d.ts +16 -0
- package/esm2022/lib/config.mjs +0 -102
- package/esm2022/lib/slot.directive.mjs +0 -199
- package/esm2022/lib/slotDefault.directive.mjs +0 -20
- package/esm2022/lib/slotTypes.mjs +0 -7
- package/esm2022/lib/use.directive.mjs +0 -62
- package/esm2022/lib/utils.mjs +0 -127
- package/esm2022/public-api.mjs +0 -19
- package/lib/config.d.ts +0 -50
- package/lib/utils.d.ts +0 -17
- package/public-api.d.ts +0 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agnos-ui-angular-headless.mjs","sources":["../../../headless/src/lib/utils.ts","../../../headless/src/lib/config.ts","../../../headless/src/lib/slotTypes.ts","../../../headless/src/lib/slot.directive.ts","../../../headless/src/lib/slotDefault.directive.ts","../../../headless/src/lib/use.directive.ts","../../../headless/src/public-api.ts","../../../headless/src/agnos-ui-angular-headless.ts"],"sourcesContent":["import type {Widget, WidgetFactory, WidgetProps} from '@agnos-ui/core';\nimport {toReadableStore} from '@agnos-ui/core';\nimport type {ReadableSignal} from '@amadeus-it-group/tansu';\nimport {computed, writable} from '@amadeus-it-group/tansu';\nimport type {Signal, SimpleChanges, TemplateRef} from '@angular/core';\nimport {DestroyRef, Injectable, NgZone, inject, signal} from '@angular/core';\nimport type {SlotContent} from './slotTypes';\n\nconst createPatchSlots = <T extends object>(set: (object: Partial<T>) => void) => {\n\tlet lastValue: Partial<T> = {};\n\treturn (object: T) => {\n\t\tconst newValue: Partial<T> = {};\n\t\tlet hasChange = false;\n\t\tfor (const key of Object.keys(object) as (string & keyof T)[]) {\n\t\t\tconst objectKey = (object as any)[key];\n\t\t\tif (objectKey != null) {\n\t\t\t\t// only use defined slots\n\t\t\t\tnewValue[key] = objectKey;\n\t\t\t}\n\t\t\tif (objectKey != lastValue[key]) {\n\t\t\t\thasChange = true;\n\t\t\t}\n\t\t}\n\t\tif (hasChange) {\n\t\t\tlastValue = newValue;\n\t\t\tset(newValue);\n\t\t}\n\t};\n};\n\nconst noop = () => {};\nconst identity = <T>(a: T) => a;\n\ntype Wrapper = <T>(fn: T) => T;\n\nconst createObjectWrapper =\n\t(wrap: Wrapper): Wrapper =>\n\t(object) => {\n\t\tif (!object || typeof object !== 'object') {\n\t\t\treturn object;\n\t\t}\n\t\tconst res = {} as any;\n\t\tfor (const key of Object.keys(object)) {\n\t\t\tres[key] = wrap((object as any)[key]);\n\t\t}\n\t\treturn res;\n\t};\n\nconst createReturnValueWrapper =\n\t(wrapReturnValue: Wrapper, wrapResult: Wrapper): Wrapper =>\n\t(fn) =>\n\t\twrapResult(typeof fn === 'function' ? (((...args: any[]) => wrapReturnValue(fn(...args))) as any) : fn);\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nclass ZoneWrapper {\n\treadonly #zone = inject(NgZone);\n\treadonly #hasZone = this.#zone.run(() => NgZone.isInAngularZone()); // check if zone is enabled (can be NoopZone, cf https://angular.io/guide/zone#noopzone)\n\t#runNeeded = false;\n\t#runPlanned = false;\n\n\tplanNgZoneRun = this.#hasZone\n\t\t? () => {\n\t\t\t\tif (this.#zone.isStable) {\n\t\t\t\t\tthis.#runNeeded = true;\n\t\t\t\t\tif (!this.#runPlanned) {\n\t\t\t\t\t\tthis.#runPlanned = true;\n\t\t\t\t\t\t(async () => {\n\t\t\t\t\t\t\tawait 0;\n\t\t\t\t\t\t\tthis.#runPlanned = false;\n\t\t\t\t\t\t\tif (this.#runNeeded) {\n\t\t\t\t\t\t\t\tthis.ngZoneRun(noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t: noop;\n\n\tngZoneRun<T>(fn: () => T): T {\n\t\tthis.#runNeeded = false;\n\t\treturn this.#zone.run(fn);\n\t}\n\n\tinsideNgZone: Wrapper = this.#hasZone\n\t\t? (fn) => (typeof fn === 'function' ? (((...args: any[]) => this.ngZoneRun(() => fn(...args))) as any) : fn)\n\t\t: identity;\n\tinsideNgZoneWrapFunctionsObject = createObjectWrapper(this.insideNgZone);\n\n\toutsideNgZone: Wrapper = this.#hasZone\n\t\t? (fn) => (typeof fn === 'function' ? (((...args: any[]) => this.#zone.runOutsideAngular(() => fn(...args))) as any) : fn)\n\t\t: identity;\n\n\toutsideNgZoneWrapFunctionsObject = createObjectWrapper(this.outsideNgZone);\n\toutsideNgZoneWrapDirective = createReturnValueWrapper(this.outsideNgZoneWrapFunctionsObject, this.outsideNgZone);\n\toutsideNgZoneWrapDirectivesObject = createObjectWrapper(this.outsideNgZoneWrapDirective);\n}\n\nexport const toAngularSignal = <T>(tansuSignal: ReadableSignal<T>): Signal<T> => {\n\tconst zoneWrapper = inject(ZoneWrapper);\n\tconst res = signal(undefined as any as T);\n\tconst subscription = zoneWrapper.outsideNgZone(tansuSignal.subscribe)((value) => {\n\t\tres.set(value);\n\t\tzoneWrapper.planNgZoneRun();\n\t});\n\tinject(DestroyRef).onDestroy(zoneWrapper.outsideNgZone(subscription));\n\treturn res;\n};\n\nexport type WithPatchSlots<W extends Widget> = W & {\n\tpatchSlots(slots: {\n\t\t[K in keyof WidgetProps<W> & `slot${string}`]: WidgetProps<W>[K] extends SlotContent<infer U> ? TemplateRef<U> | undefined : never;\n\t}): void;\n};\n\nexport const callWidgetFactoryWithConfig = <W extends Widget>({\n\tfactory,\n\tdefaultConfig,\n\twidgetConfig,\n\tevents,\n}: {\n\tfactory: WidgetFactory<W>;\n\tdefaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n\twidgetConfig?: null | undefined | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n\tevents: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>;\n}): WithPatchSlots<W> => {\n\tconst zoneWrapper = inject(ZoneWrapper);\n\tfactory = zoneWrapper.outsideNgZone(factory);\n\tconst defaultConfig$ = toReadableStore(defaultConfig);\n\tconst slots$ = writable({});\n\tevents = zoneWrapper.insideNgZoneWrapFunctionsObject(events);\n\tconst widget = factory({\n\t\tconfig: computed(() => ({...defaultConfig$(), ...widgetConfig?.(), ...slots$(), ...(events as Partial<WidgetProps<W>>)})),\n\t});\n\treturn {\n\t\t...widget,\n\t\tpatch: zoneWrapper.outsideNgZone(widget.patch),\n\t\tdirectives: zoneWrapper.outsideNgZoneWrapDirectivesObject(widget.directives),\n\t\tactions: zoneWrapper.outsideNgZoneWrapFunctionsObject(widget.actions),\n\t\tapi: zoneWrapper.outsideNgZoneWrapFunctionsObject(widget.api),\n\t\tpatchSlots: createPatchSlots(slots$.set),\n\t};\n};\n\nexport function patchSimpleChanges(patchFn: (obj: any) => void, changes: SimpleChanges) {\n\tconst obj: any = {};\n\tfor (const [key, simpleChange] of Object.entries(changes)) {\n\t\tif (simpleChange !== undefined) {\n\t\t\tobj[key] = simpleChange.currentValue;\n\t\t}\n\t}\n\tpatchFn(obj);\n}\n","import type {Partial2Levels, Widget, WidgetFactory, WidgetProps, WidgetsConfigStore} from '@agnos-ui/core';\nimport {createWidgetsConfig} from '@agnos-ui/core';\nimport type {ReadableSignal} from '@amadeus-it-group/tansu';\nimport {computed} from '@amadeus-it-group/tansu';\nimport type {FactoryProvider} from '@angular/core';\nimport {InjectionToken, Injector, Optional, SkipSelf, inject, runInInjectionContext} from '@angular/core';\nimport type {AdaptPropsSlots} from './slotTypes';\nimport type {WithPatchSlots} from './utils';\nimport {callWidgetFactoryWithConfig} from './utils';\n\nexport type WidgetsConfig = {\n\t[WidgetName in keyof import('@agnos-ui/core').WidgetsConfig]: AdaptPropsSlots<import('@agnos-ui/core').WidgetsConfig[WidgetName]>;\n};\n\nexport const widgetsConfigFactory = <Config extends {[widgetName: string]: object} = WidgetsConfig>(\n\twidgetsConfigInjectionToken = new InjectionToken<WidgetsConfigStore<Config>>('widgetsConfig')\n) => {\n\t/**\n\t * Creates a provider of widgets default configuration that inherits from any widgets default configuration already defined at an upper level\n\t * in the Angular dependency injection system. It contains its own set of widgets configuration properties that override the same properties form\n\t * the parent configuration.\n\t *\n\t * @remarks\n\t * The configuration is computed from the parent configuration in two steps:\n\t * - first step: the parent configuration is transformed by the adaptParentConfig function (if specified).\n\t * If adaptParentConfig is not specified, this step is skipped.\n\t * - second step: the configuration from step 1 is merged (2-levels deep) with the own$ store. The own$ store initially contains\n\t * 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\t * {@link injectWidgetsConfig}.\n\t *\n\t * @param adaptParentConfig - optional function that receives a 2-levels copy of the widgets default configuration\n\t * defined at an upper level in the Angular dependency injection system (or an empty object if there is none) and returns the widgets\n\t * default configuration to be used.\n\t * It is called only if the configuration is needed, and was not yet computed for the current value of the parent configuration.\n\t * 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\t * 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\t * Angular dependency injection system.\n\n\t* @returns DI provider to be included a list of `providers` (for example at a component level or\n\t* any other level of the Angular dependency injection system)\n\t*\n\t* @example\n\t* ```typescript\n\t* @Component({\n\t* // ...\n\t* providers: [\n\t* provideWidgetsConfig((parentConfig) => {\n\t* // first step configuration: transforms the parent configuration\n\t* parentConfig.rating = parentConfig.rating ?? {};\n\t* parentConfig.rating.className = `${parentConfig.rating.className ?? ''} my-rating-extra-class`\n\t* return parentConfig;\n\t* })\n\t* ]\n\t* })\n\t* class MyComponent {\n\t* widgetsConfig = injectWidgetsConfig();\n\t* constructor() {\n\t* this.widgetsConfig.set({\n\t* // second step configuration: overrides the parent configuration\n\t* rating: {\n\t* slotStar: MyCustomSlotStar\n\t* }\n\t* });\n\t* }\n\t* // ...\n\t* }\n\t* ```\n\t*/\n\tconst provideWidgetsConfig = (adaptParentConfig?: (config: Partial2Levels<Config>) => Partial2Levels<Config>): FactoryProvider => ({\n\t\tprovide: widgetsConfigInjectionToken,\n\t\tuseFactory: (parent: WidgetsConfigStore<Config> | null) => {\n\t\t\tif (adaptParentConfig) {\n\t\t\t\tconst injector = inject(Injector);\n\t\t\t\tconst originalAdaptParentConfig = adaptParentConfig;\n\t\t\t\tadaptParentConfig = (value) => runInInjectionContext(injector, () => originalAdaptParentConfig(value));\n\t\t\t}\n\t\t\treturn createWidgetsConfig(parent ?? undefined, adaptParentConfig);\n\t\t},\n\t\tdeps: [[new SkipSelf(), new Optional(), widgetsConfigInjectionToken]],\n\t});\n\n\t/**\n\t * Returns the widgets default configuration store that was provided in the current injection context.\n\t * Throws if the no widgets default configuration store was provided.\n\t *\n\t * @remarks\n\t * This function must be called from an injection context, such as a constructor, a factory function, a field initializer or\n\t * a function used with {@link https://angular.io/api/core/runInInjectionContext | runInInjectionContext}.\n\t *\n\t * @returns the widgets default configuration store.\n\t */\n\tconst injectWidgetsConfig = () => inject(widgetsConfigInjectionToken);\n\n\tconst injectWidgetConfig = <N extends keyof Config>(widgetName: N): ReadableSignal<Partial<Config[N]> | undefined> => {\n\t\tconst widgetsConfig = inject(widgetsConfigInjectionToken, {optional: true});\n\t\treturn computed(() => widgetsConfig?.()[widgetName]);\n\t};\n\n\tconst callWidgetFactory = <W extends Widget>({\n\t\tfactory,\n\t\twidgetName = null,\n\t\tdefaultConfig = {},\n\t\tevents,\n\t}: {\n\t\tfactory: WidgetFactory<W>;\n\t\twidgetName?: null | keyof Config;\n\t\tdefaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n\t\tevents: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>;\n\t}): WithPatchSlots<W> =>\n\t\tcallWidgetFactoryWithConfig({\n\t\t\tfactory,\n\t\t\twidgetConfig: widgetName ? (injectWidgetConfig(widgetName) as any) : null,\n\t\t\tdefaultConfig,\n\t\t\tevents,\n\t\t});\n\n\treturn {\n\t\t/**\n\t\t * Dependency Injection token which can be used to provide or inject the widgets default configuration store.\n\t\t */\n\t\twidgetsConfigInjectionToken,\n\t\tprovideWidgetsConfig,\n\t\tinjectWidgetsConfig,\n\t\tinjectWidgetConfig,\n\t\tcallWidgetFactory,\n\t};\n};\n\nexport const {widgetsConfigInjectionToken, provideWidgetsConfig, injectWidgetConfig, injectWidgetsConfig, callWidgetFactory} =\n\twidgetsConfigFactory<WidgetsConfig>();\n","import type {SlotContent as CoreSlotContent, Widget, WidgetFactory, WidgetProps, WidgetSlotContext, WidgetState} from '@agnos-ui/core';\nimport type {TemplateRef, Type} from '@angular/core';\n\nexport class ComponentTemplate<Props, K extends string, T extends {[key in K]: TemplateRef<Props>}> {\n\tconstructor(public readonly component: Type<T>, public readonly templateProp: K) {}\n}\n\nexport type SlotContent<Props extends object = object> =\n\t| CoreSlotContent<Props>\n\t| TemplateRef<Props>\n\t| Type<unknown>\n\t| ComponentTemplate<Props, any, any>;\n\nexport type AdaptSlotContentProps<Props extends Record<string, any>> = Props extends WidgetSlotContext<infer U>\n\t? WidgetSlotContext<AdaptWidgetSlots<U>> & AdaptPropsSlots<Omit<Props, keyof WidgetSlotContext<any>>>\n\t: AdaptPropsSlots<Props>;\n\nexport type AdaptPropsSlots<Props> = Omit<Props, `slot${string}`> & {\n\t[K in keyof Props & `slot${string}`]: Props[K] extends CoreSlotContent<infer U> ? SlotContent<AdaptSlotContentProps<U>> : Props[K];\n};\n\nexport type AdaptWidgetFactories<T> = {\n\t[K in keyof T]: T[K] extends WidgetFactory<infer U> ? WidgetFactory<AdaptWidgetSlots<U>> : T[K];\n};\n\nexport type AdaptWidgetSlots<W extends Widget> = Widget<\n\tAdaptPropsSlots<WidgetProps<W>>,\n\tAdaptPropsSlots<WidgetState<W>>,\n\tAdaptWidgetFactories<W['api']>,\n\tW['actions'],\n\tW['directives']\n>;\n","import {DOCUMENT} from '@angular/common';\nimport type {ComponentRef, EmbeddedViewRef, OnChanges, OnDestroy, SimpleChanges, Type} from '@angular/core';\nimport {Directive, EnvironmentInjector, Input, TemplateRef, ViewContainerRef, createComponent, inject, reflectComponentType} from '@angular/core';\nimport type {SlotContent} from './slotTypes';\nimport {ComponentTemplate} from './slotTypes';\n\nabstract class SlotHandler<Props extends Record<string, any>, Slot extends SlotContent<Props> = SlotContent<Props>> {\n\tconstructor(public viewContainerRef: ViewContainerRef, public document: Document) {}\n\tslotChange(slot: Slot, props: Props) {}\n\tpropsChange(slot: Slot, props: Props) {}\n\tdestroy() {}\n}\n\nclass StringSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, string> {\n\t#nodeRef: Text | undefined;\n\t#previousText = '';\n\n\toverride slotChange(slot: string): void {\n\t\tif (slot === this.#previousText) {\n\t\t\treturn;\n\t\t}\n\t\tthis.#previousText = slot;\n\t\tif (this.#nodeRef) {\n\t\t\tthis.#nodeRef.textContent = slot;\n\t\t} else {\n\t\t\tconst viewContainerElement: Comment | undefined = this.viewContainerRef.element.nativeElement;\n\t\t\tif (this.document && viewContainerElement?.parentNode) {\n\t\t\t\tthis.#nodeRef = viewContainerElement.parentNode.insertBefore(this.document.createTextNode(slot), viewContainerElement);\n\t\t\t}\n\t\t}\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#nodeRef?.parentNode?.removeChild(this.#nodeRef);\n\t\tthis.#nodeRef = undefined;\n\t}\n}\n\nclass FunctionSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, (props: Props) => string> {\n\t#stringSlotHandler = new StringSlotHandler(this.viewContainerRef, this.document);\n\n\toverride slotChange(slot: (props: Props) => string, props: Props): void {\n\t\tthis.#stringSlotHandler.slotChange(slot(props));\n\t}\n\n\toverride propsChange(slot: (props: Props) => string, props: Props): void {\n\t\tthis.#stringSlotHandler.slotChange(slot(props));\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#stringSlotHandler.destroy();\n\t}\n}\n\nclass ComponentSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, Type<unknown>> {\n\t#componentRef: ComponentRef<any> | undefined;\n\t#properties: string[];\n\n\toverride slotChange(slot: Type<unknown>, props: Props): void {\n\t\tif (this.#componentRef) {\n\t\t\tthis.destroy();\n\t\t}\n\t\tthis.#componentRef = this.viewContainerRef.createComponent(slot);\n\t\tthis.#applyProperties(props);\n\t}\n\n\t#applyProperties(props: Props, oldProperties?: Set<string>) {\n\t\tconst properties = Object.keys(props);\n\t\tthis.#properties = properties;\n\t\tconst componentRef = this.#componentRef!;\n\t\tfor (const property of properties) {\n\t\t\tcomponentRef.setInput(property, props[property]);\n\t\t\toldProperties?.delete(property);\n\t\t}\n\t}\n\n\toverride propsChange(slot: Type<unknown>, props: Props): void {\n\t\tconst oldProperties = new Set(this.#properties);\n\t\tthis.#applyProperties(props, oldProperties);\n\t\tconst componentRef = this.#componentRef!;\n\t\tfor (const property of oldProperties) {\n\t\t\tcomponentRef.setInput(property, undefined);\n\t\t}\n\t}\n\n\toverride destroy(): void {\n\t\tthis.viewContainerRef.clear();\n\t\tthis.#componentRef = undefined;\n\t}\n}\n\nclass TemplateRefSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, TemplateRef<Props>> {\n\t#viewRef: EmbeddedViewRef<Props> | undefined;\n\t#props: Props;\n\n\toverride slotChange(slot: TemplateRef<Props>, props: Props): void {\n\t\tif (this.#viewRef) {\n\t\t\tthis.destroy();\n\t\t}\n\t\tprops = {...props};\n\t\tthis.#props = props;\n\t\tthis.#viewRef = this.viewContainerRef.createEmbeddedView(slot, props);\n\t}\n\n\toverride propsChange(slot: TemplateRef<Props>, props: Props): void {\n\t\tif (this.#viewRef) {\n\t\t\tconst templateProps = this.#props;\n\t\t\tconst oldProperties = new Set<keyof Props>(Object.keys(templateProps));\n\t\t\tfor (const property of Object.keys(props) as (keyof Props)[]) {\n\t\t\t\ttemplateProps[property] = props[property];\n\t\t\t\toldProperties.delete(property);\n\t\t\t}\n\t\t\tfor (const oldProperty of oldProperties) {\n\t\t\t\tdelete templateProps[oldProperty];\n\t\t\t}\n\t\t\tthis.#viewRef.markForCheck();\n\t\t}\n\t}\n\n\toverride destroy(): void {\n\t\tthis.viewContainerRef.clear();\n\t}\n}\n\nclass ComponentTemplateSlotHandler<\n\tProps extends Record<string, any>,\n\tK extends string,\n\tT extends {[key in K]: TemplateRef<Props>}\n> extends SlotHandler<Props, ComponentTemplate<Props, K, T>> {\n\t#componentRef: ComponentRef<T> | undefined;\n\t#templateSlotHandler = new TemplateRefSlotHandler(this.viewContainerRef, this.document);\n\t#templateRef: TemplateRef<Props> | undefined;\n\n\toverride slotChange(slot: ComponentTemplate<Props, K, T>, props: Props): void {\n\t\tif (this.#componentRef) {\n\t\t\tthis.destroy();\n\t\t}\n\t\tthis.#componentRef = createComponent(slot.component, {\n\t\t\telementInjector: this.viewContainerRef.injector,\n\t\t\tenvironmentInjector: this.viewContainerRef.injector.get(EnvironmentInjector),\n\t\t});\n\t\tthis.#templateRef = this.#componentRef.instance[slot.templateProp];\n\t\tthis.#templateSlotHandler.slotChange(this.#templateRef, props);\n\t}\n\n\toverride propsChange(slot: ComponentTemplate<Props, K, T>, props: Props): void {\n\t\tthis.#templateSlotHandler.propsChange(this.#templateRef!, props);\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#templateSlotHandler.destroy();\n\t\tthis.#componentRef?.destroy();\n\t\tthis.#componentRef = undefined;\n\t}\n}\n\nconst getSlotType = (value: any): undefined | {new (viewContainerRef: ViewContainerRef, document: Document): SlotHandler<any>} => {\n\tif (!value) return undefined;\n\tconst type = typeof value;\n\tswitch (type) {\n\t\tcase 'string':\n\t\t\treturn StringSlotHandler;\n\t\tcase 'function':\n\t\t\tif (reflectComponentType(value)) {\n\t\t\t\treturn ComponentSlotHandler;\n\t\t\t}\n\t\t\treturn FunctionSlotHandler;\n\t\tcase 'object':\n\t\t\tif (value instanceof TemplateRef) {\n\t\t\t\treturn TemplateRefSlotHandler;\n\t\t\t}\n\t\t\tif (value instanceof ComponentTemplate) {\n\t\t\t\treturn ComponentTemplateSlotHandler;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn undefined;\n};\n\n@Directive({\n\tselector: '[auSlot]',\n\tstandalone: true,\n})\nexport class SlotDirective<Props extends Record<string, any>> implements OnChanges, OnDestroy {\n\t@Input('auSlot') slot: SlotContent<Props>;\n\t@Input('auSlotProps') props: Props;\n\n\tprivate _viewContainerRef = inject(ViewContainerRef);\n\tprivate _document = inject(DOCUMENT);\n\tprivate _slotType: ReturnType<typeof getSlotType>;\n\tprivate _slotHandler: SlotHandler<Props> | undefined;\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tconst slotChange = changes['slot'];\n\t\tconst propsChange = changes['props'];\n\t\tconst slot = this.slot;\n\t\tif (slotChange) {\n\t\t\tconst newSlotType = getSlotType(slot);\n\t\t\tif (newSlotType !== this._slotType) {\n\t\t\t\tthis._slotHandler?.destroy();\n\t\t\t\tthis._slotHandler = newSlotType ? new newSlotType(this._viewContainerRef, this._document) : undefined;\n\t\t\t\tthis._slotType = newSlotType;\n\t\t\t}\n\t\t\tthis._slotHandler?.slotChange(slot, this.props);\n\t\t} else if (propsChange) {\n\t\t\tthis._slotHandler?.propsChange(slot, this.props);\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._slotHandler?.destroy();\n\t\tthis._slotHandler = undefined;\n\t}\n}\n","import type {WritableSignal} from '@amadeus-it-group/tansu';\nimport type {OnInit} from '@angular/core';\nimport {Directive, Input, TemplateRef, inject} from '@angular/core';\nimport type {SlotContent} from './slotTypes';\n\n@Directive({selector: '[auSlotDefault]', standalone: true})\nexport class SlotDefaultDirective<T extends object> implements OnInit {\n\t@Input('auSlotDefault') auSlotDefault: WritableSignal<{slotDefault?: SlotContent<T>}>;\n\n\ttemplateRef = inject(TemplateRef<T>);\n\n\tngOnInit(): void {\n\t\tthis.auSlotDefault.update((value) => ({...value, slotDefault: this.templateRef}));\n\t}\n}\n","import type {OnChanges} from '@angular/core';\nimport {DestroyRef, Directive, ElementRef, inject, Input} from '@angular/core';\nimport type {Directive as AgnosUIDirective} from '@agnos-ui/core';\n\n// All calls of the directive in this class are done asynchronously (with await 0)\n// in order to avoid ExpressionChangedAfterItHasBeenCheckedError\n// or the corresponding issue with signals (https://github.com/angular/angular/issues/50320)\n// This is relevant especially if calling the directive changes variables used in a template.\n\nexport const useDirectiveForHost = <T>(use?: AgnosUIDirective<T>, params?: T) => {\n\tconst ref = inject(ElementRef);\n\n\tlet instance = use?.(ref.nativeElement, params as T);\n\n\tasync function destroyDirectiveInstance() {\n\t\tconst oldInstance = instance;\n\t\tinstance = undefined;\n\t\tuse = undefined;\n\t\tif (oldInstance?.destroy) {\n\t\t\tawait 0;\n\t\t\toldInstance.destroy?.();\n\t\t}\n\t}\n\n\tinject(DestroyRef).onDestroy(destroyDirectiveInstance);\n\n\tasync function update(newUse?: AgnosUIDirective<T>, newParams?: T) {\n\t\tif (newUse !== use) {\n\t\t\tdestroyDirectiveInstance();\n\t\t\tuse = newUse;\n\t\t\tparams = newParams;\n\t\t\tif (newUse) {\n\t\t\t\tawait 0;\n\t\t\t\t// checks that the directive did not change while waiting:\n\t\t\t\tif (use === newUse && !instance) {\n\t\t\t\t\tinstance = use(ref.nativeElement, params as T);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (newParams != params) {\n\t\t\tparams = newParams;\n\t\t\tawait 0;\n\t\t\tinstance?.update?.(params as T);\n\t\t}\n\t}\n\n\treturn {update};\n};\n\n@Directive({\n\tstandalone: true,\n\tselector: '[auUse]',\n})\nexport class UseDirective<T> implements OnChanges {\n\t@Input('auUse')\n\tuse: AgnosUIDirective<T> | undefined;\n\n\t@Input('auUseParams')\n\tparams: T | undefined;\n\n\t#useDirective = useDirectiveForHost<T>();\n\n\tngOnChanges() {\n\t\tthis.#useDirective.update(this.use, this.params);\n\t}\n}\n","/*\n * Public API Surface of @agnos-ui/angular-headless\n */\n\nexport * from '@agnos-ui/core';\nexport * from './lib/config';\nexport type {WidgetsConfig} from './lib/config';\nexport * from './lib/slot.directive';\nexport * from './lib/slotDefault.directive';\nexport * from './lib/slotTypes';\nexport type {SlotContent} from './lib/slotTypes';\nexport * from './lib/use.directive';\nexport * from './lib/utils';\n\nimport type {PropsConfig, WidgetFactory, WidgetProps, WidgetState} from '@agnos-ui/core';\nimport {\n\tcreateAccordion as coreCreateAccordion,\n\tcreateAlert as coreCreateAlert,\n\tcreateModal as coreCreateModal,\n\tcreatePagination as coreCreatePagination,\n\tcreateProgressbar as coreCreateProgressbar,\n\tcreateRating as coreCreateRating,\n\tcreateSelect as coreCreateSelect,\n} from '@agnos-ui/core';\nimport type {AdaptSlotContentProps, AdaptWidgetSlots} from './lib/slotTypes';\n\nexport type AccordionWidget = AdaptWidgetSlots<import('@agnos-ui/core').AccordionWidget>;\nexport type AccordionProps = WidgetProps<AccordionWidget>;\nexport type AccordionState = WidgetState<AccordionWidget>;\nexport type AccordionApi = AccordionWidget['api'];\nexport type AccordionItemWidget = AdaptWidgetSlots<import('@agnos-ui/core').AccordionItemWidget>;\nexport type AccordionItemProps = WidgetProps<AccordionItemWidget>;\nexport type AccordionItemState = WidgetState<AccordionItemWidget>;\nexport type AccordionItemContext = AdaptSlotContentProps<import('@agnos-ui/core').AccordionItemContext>;\nexport const createAccordion: WidgetFactory<AccordionWidget> = coreCreateAccordion as any;\n\nexport type AlertWidget = AdaptWidgetSlots<import('@agnos-ui/core').AlertWidget>;\nexport type AlertProps = WidgetProps<AlertWidget>;\nexport type AlertState = WidgetState<AlertWidget>;\nexport type AlertContext = AdaptSlotContentProps<import('@agnos-ui/core').AlertContext>;\nexport const createAlert: WidgetFactory<AlertWidget> = coreCreateAlert as any;\n\nexport type ModalWidget = AdaptWidgetSlots<import('@agnos-ui/core').ModalWidget>;\nexport type ModalProps = WidgetProps<ModalWidget>;\nexport type ModalState = WidgetState<ModalWidget>;\nexport type ModalContext = AdaptSlotContentProps<import('@agnos-ui/core').ModalContext>;\nexport const createModal: WidgetFactory<ModalWidget> = coreCreateModal as any;\n\nexport type PaginationWidget = AdaptWidgetSlots<import('@agnos-ui/core').PaginationWidget>;\nexport type PaginationProps = WidgetProps<PaginationWidget>;\nexport type PaginationState = WidgetState<PaginationWidget>;\nexport type PaginationContext = AdaptSlotContentProps<import('@agnos-ui/core').PaginationContext>;\nexport type PaginationNumberContext = AdaptSlotContentProps<import('@agnos-ui/core').PaginationNumberContext>;\nexport const createPagination: WidgetFactory<PaginationWidget> = coreCreatePagination as any;\n\nexport type RatingWidget = AdaptWidgetSlots<import('@agnos-ui/core').RatingWidget>;\nexport type RatingProps = WidgetProps<RatingWidget>;\nexport type RatingState = WidgetState<RatingWidget>;\nexport const createRating: WidgetFactory<RatingWidget> = coreCreateRating as any;\n\nexport type SelectWidget<Item> = AdaptWidgetSlots<import('@agnos-ui/core').SelectWidget<Item>>;\nexport type SelectProps<Item> = WidgetProps<SelectWidget<Item>>;\nexport type SelectState<Item> = WidgetState<SelectWidget<Item>>;\nexport const createSelect: <Item>(propsConfig?: PropsConfig<SelectProps<Item>>) => SelectWidget<Item> = coreCreateSelect as any;\n\nexport type SliderWidget = AdaptWidgetSlots<import('@agnos-ui/core').SliderWidget>;\nexport type SliderProps = WidgetProps<SliderWidget>;\nexport type SliderState = WidgetState<SliderWidget>;\n\nexport type ProgressbarWidget = AdaptWidgetSlots<import('@agnos-ui/core').ProgressbarWidget>;\nexport type ProgressbarProps = WidgetProps<ProgressbarWidget>;\nexport type ProgressbarState = WidgetState<ProgressbarWidget>;\nexport type ProgressbarContext = AdaptSlotContentProps<import('@agnos-ui/core').ProgressbarContext>;\nexport const createProgressbar: WidgetFactory<ProgressbarWidget> = coreCreateProgressbar as any;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["coreCreateAccordion","coreCreateAlert","coreCreateModal","coreCreatePagination","coreCreateRating","coreCreateSelect","coreCreateProgressbar"],"mappings":";;;;;;;AAQA,MAAM,gBAAgB,GAAG,CAAmB,GAAiC,KAAI;IAChF,IAAI,SAAS,G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AAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,CAAA,OAAA,EAAA,KAAA,CAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,QAAA,CAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,SAAS;AACnB,iBAAA,CAAA;8BAGA,GAAG,EAAA,CAAA;sBADF,KAAK;uBAAC,OAAO,CAAA;gBAId,MAAM,EAAA,CAAA;sBADL,KAAK;uBAAC,aAAa,CAAA;;;ACxDrB;;AAEG;AAgCI,MAAM,eAAe,GAAmCA,kBAA2B;AAMnF,MAAM,WAAW,GAA+BC,cAAuB;AAMvE,MAAM,WAAW,GAA+BC,cAAuB;AAOvE,MAAM,gBAAgB,GAAoCC,mBAA4B;AAKtF,MAAM,YAAY,GAAgCC,eAAwB;AAK1E,MAAM,YAAY,GAA+EC,eAAwB;AAUzH,MAAM,iBAAiB,GAAqCC;;ACzEnE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agnos-ui-angular-headless.mjs","sources":["../../src/components/accordion/accordion.ts","../../src/components/alert/alert.ts","../../src/components/modal/modal.ts","../../src/components/pagination/pagination.ts","../../src/components/progressbar/progressbar.ts","../../src/components/rating/rating.ts","../../src/components/select/select.ts","../../src/utils/zone.ts","../../src/utils/stores.ts","../../src/utils/directive.ts","../../src/types.ts","../../src/utils/widget.ts","../../src/config.ts","../../src/utils/coercion.ts","../../src/slotDefault.directive.ts","../../src/slot.directive.ts","../../src/index.ts","../../src/agnos-ui-angular-headless.ts"],"sourcesContent":["import type {AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, WidgetFactory} from '../../types';\nimport {createAccordion as coreCreateAccordion} from '@agnos-ui/core/components/accordion';\n\nexport * from '@agnos-ui/core/components/accordion';\n\nexport type AccordionWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/accordion').AccordionWidget>;\nexport type AccordionProps = WidgetProps<AccordionWidget>;\nexport type AccordionState = WidgetState<AccordionWidget>;\nexport type AccordionApi = AccordionWidget['api'];\nexport type AccordionItemWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/accordion').AccordionItemWidget>;\nexport type AccordionItemProps = WidgetProps<AccordionItemWidget>;\nexport type AccordionItemState = WidgetState<AccordionItemWidget>;\nexport type AccordionItemContext = AdaptSlotContentProps<import('@agnos-ui/core/components/accordion').AccordionItemContext>;\nexport const createAccordion: WidgetFactory<AccordionWidget> = coreCreateAccordion as any;\n","import type {AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, WidgetFactory} from '../../types';\nimport {createAlert as coreCreateAlert} from '@agnos-ui/core/components/alert';\n\nexport * from '@agnos-ui/core/components/alert';\n\nexport type AlertWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/alert').AlertWidget>;\nexport type AlertProps = WidgetProps<AlertWidget>;\nexport type AlertState = WidgetState<AlertWidget>;\nexport type AlertContext = AdaptSlotContentProps<import('@agnos-ui/core/components/alert').AlertContext>;\nexport const createAlert: WidgetFactory<AlertWidget> = coreCreateAlert as any;\n","import type {AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, PropsConfig} from '../../types';\nimport {createModal as coreCreateModal} from '@agnos-ui/core/components/modal';\n\nexport * from '@agnos-ui/core/components/modal';\n\nexport type ModalWidget<Data> = AdaptWidgetSlots<import('@agnos-ui/core/components/modal').ModalWidget<Data>>;\nexport type ModalProps<Data> = WidgetProps<ModalWidget<Data>>;\nexport type ModalState<Data> = WidgetState<ModalWidget<Data>>;\nexport type ModalContext<Data> = AdaptSlotContentProps<import('@agnos-ui/core/components/modal').ModalContext<Data>>;\nexport const createModal: <Data>(props?: PropsConfig<ModalProps<Data>>) => ModalWidget<Data> = coreCreateModal as any;\n","import type {AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, WidgetFactory} from '../../types';\nimport {createPagination as coreCreatePagination} from '@agnos-ui/core/components/pagination';\n\nexport * from '@agnos-ui/core/components/pagination';\n\nexport type PaginationWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/pagination').PaginationWidget>;\nexport type PaginationProps = WidgetProps<PaginationWidget>;\nexport type PaginationState = WidgetState<PaginationWidget>;\nexport type PaginationContext = AdaptSlotContentProps<import('@agnos-ui/core/components/pagination').PaginationContext>;\nexport type PaginationNumberContext = AdaptSlotContentProps<import('@agnos-ui/core/components/pagination').PaginationNumberContext>;\nexport const createPagination: WidgetFactory<PaginationWidget> = coreCreatePagination as any;\n","import type {AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, WidgetFactory} from '../../types';\nimport {createProgressbar as coreCreateProgressbar} from '@agnos-ui/core/components/progressbar';\n\nexport * from '@agnos-ui/core/components/progressbar';\n\nexport type ProgressbarWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/progressbar').ProgressbarWidget>;\nexport type ProgressbarProps = WidgetProps<ProgressbarWidget>;\nexport type ProgressbarState = WidgetState<ProgressbarWidget>;\nexport type ProgressbarContext = AdaptSlotContentProps<import('@agnos-ui/core/components/progressbar').ProgressbarContext>;\nexport const createProgressbar: WidgetFactory<ProgressbarWidget> = coreCreateProgressbar as any;\n","import type {AdaptWidgetSlots, WidgetProps, WidgetState, WidgetFactory} from '../../types';\nimport {createRating as coreCreateRating} from '@agnos-ui/core/components/rating';\n\nexport * from '@agnos-ui/core/components/rating';\n\nexport type RatingWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/rating').RatingWidget>;\nexport type RatingProps = WidgetProps<RatingWidget>;\nexport type RatingState = WidgetState<RatingWidget>;\nexport const createRating: WidgetFactory<RatingWidget> = coreCreateRating as any;\n","import type {AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, PropsConfig} from '../../types';\nimport {createSelect as coreCreateSelect} from '@agnos-ui/core/components/select';\n\nexport * from '@agnos-ui/core/components/select';\n\nexport type SelectWidget<Item> = AdaptWidgetSlots<import('@agnos-ui/core/components/select').SelectWidget<Item>>;\nexport type SelectProps<Item> = WidgetProps<SelectWidget<Item>>;\nexport type SelectState<Item> = WidgetState<SelectWidget<Item>>;\nexport type SelectContext<Item> = AdaptSlotContentProps<import('@agnos-ui/core/components/select').SelectContext<Item>>;\nexport type SelectItemContext<Item> = AdaptSlotContentProps<import('@agnos-ui/core/components/select').SelectItemContext<Item>>;\nexport const createSelect: <Item>(propsConfig?: PropsConfig<SelectProps<Item>>) => SelectWidget<Item> = coreCreateSelect as any;\n","import {Injectable, NgZone, inject} from '@angular/core';\n\nconst noop = () => {};\nconst identity = <T>(a: T) => a;\n\ntype Wrapper = <T>(fn: T) => T;\n\nconst createObjectWrapper =\n\t(wrap: Wrapper): Wrapper =>\n\t(object) => {\n\t\tif (!object || typeof object !== 'object') {\n\t\t\treturn object;\n\t\t}\n\t\tconst res = {} as any;\n\t\tfor (const key of Object.keys(object)) {\n\t\t\tres[key] = wrap((object as any)[key]);\n\t\t}\n\t\treturn res;\n\t};\n\nconst createReturnValueWrapper =\n\t(wrapReturnValue: Wrapper, wrapResult: Wrapper): Wrapper =>\n\t(fn) =>\n\t\twrapResult(typeof fn === 'function' ? (((...args: any[]) => wrapReturnValue(fn(...args))) as any) : fn);\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ZoneWrapper {\n\treadonly #zone = inject(NgZone);\n\treadonly #hasZone = this.#zone.run(() => NgZone.isInAngularZone()); // check if zone is enabled (can be NoopZone, cf https://angular.io/guide/zone#noopzone)\n\t#runNeeded = false;\n\t#runPlanned = false;\n\n\tplanNgZoneRun = this.#hasZone\n\t\t? () => {\n\t\t\t\tif (this.#zone.isStable) {\n\t\t\t\t\tthis.#runNeeded = true;\n\t\t\t\t\tif (!this.#runPlanned) {\n\t\t\t\t\t\tthis.#runPlanned = true;\n\t\t\t\t\t\tvoid (async () => {\n\t\t\t\t\t\t\tawait 0;\n\t\t\t\t\t\t\tthis.#runPlanned = false;\n\t\t\t\t\t\t\tif (this.#runNeeded) {\n\t\t\t\t\t\t\t\tthis.ngZoneRun(noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t: noop;\n\n\tngZoneRun<T>(fn: () => T): T {\n\t\tthis.#runNeeded = false;\n\t\treturn this.#zone.run(fn);\n\t}\n\n\tinsideNgZone: Wrapper = this.#hasZone\n\t\t? (fn) => (typeof fn === 'function' ? (((...args: any[]) => this.ngZoneRun(() => fn(...args))) as any) : fn)\n\t\t: identity;\n\tinsideNgZoneWrapFunctionsObject = createObjectWrapper(this.insideNgZone);\n\n\toutsideNgZone: Wrapper = this.#hasZone\n\t\t? (fn) => (typeof fn === 'function' ? (((...args: any[]) => this.#zone.runOutsideAngular(() => fn(...args))) as any) : fn)\n\t\t: identity;\n\n\toutsideNgZoneWrapFunctionsObject = createObjectWrapper(this.outsideNgZone);\n\toutsideNgZoneWrapDirective = createReturnValueWrapper(this.outsideNgZoneWrapFunctionsObject, this.outsideNgZone);\n\toutsideNgZoneWrapDirectivesObject = createObjectWrapper(this.outsideNgZoneWrapDirective);\n}\n","import type {ReadableSignal} from '@amadeus-it-group/tansu';\nimport type {Signal} from '@angular/core';\nimport {DestroyRef, inject, signal} from '@angular/core';\nimport {ZoneWrapper} from './zone';\n\nexport * from '@agnos-ui/core/utils/stores';\n\nexport const toAngularSignal = <T>(tansuSignal: ReadableSignal<T>): Signal<T> => {\n\tconst zoneWrapper = inject(ZoneWrapper);\n\tconst res = signal(undefined as any as T);\n\tconst subscription = zoneWrapper.outsideNgZone(tansuSignal.subscribe)((value) => {\n\t\tres.set(value);\n\t\tzoneWrapper.planNgZoneRun();\n\t});\n\tinject(DestroyRef).onDestroy(zoneWrapper.outsideNgZone(subscription));\n\treturn res;\n};\n","import type {Directive as AgnosUIDirective} from '@agnos-ui/core/types';\nimport type {OnChanges} from '@angular/core';\nimport {DestroyRef, Directive, ElementRef, Input, inject} from '@angular/core';\n\nexport * from '@agnos-ui/core/utils/directive';\n\n// All calls of the directive in this class are done asynchronously (with await 0)\n// in order to avoid ExpressionChangedAfterItHasBeenCheckedError\n// or the corresponding issue with signals (https://github.com/angular/angular/issues/50320)\n// This is relevant especially if calling the directive changes variables used in a template.\n\nexport const useDirectiveForHost = <T>(use?: AgnosUIDirective<T>, params?: T) => {\n\tconst ref = inject(ElementRef);\n\n\tlet instance = use?.(ref.nativeElement, params as T);\n\n\tasync function destroyDirectiveInstance() {\n\t\tconst oldInstance = instance;\n\t\tinstance = undefined;\n\t\tuse = undefined;\n\t\tif (oldInstance?.destroy) {\n\t\t\tawait 0;\n\t\t\toldInstance.destroy?.();\n\t\t}\n\t}\n\n\tinject(DestroyRef).onDestroy(destroyDirectiveInstance);\n\n\tasync function update(newUse?: AgnosUIDirective<T>, newParams?: T) {\n\t\tif (newUse !== use) {\n\t\t\tvoid destroyDirectiveInstance();\n\t\t\tuse = newUse;\n\t\t\tparams = newParams;\n\t\t\tif (newUse) {\n\t\t\t\tawait 0;\n\t\t\t\t// checks that the directive did not change while waiting:\n\t\t\t\tif (use === newUse && !instance) {\n\t\t\t\t\tinstance = use(ref.nativeElement, params as T);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (newParams != params) {\n\t\t\tparams = newParams;\n\t\t\tawait 0;\n\t\t\tinstance?.update?.(params as T);\n\t\t}\n\t}\n\n\treturn {update};\n};\n\n@Directive({\n\tstandalone: true,\n\tselector: '[auUse]',\n})\nexport class UseDirective<T> implements OnChanges {\n\t@Input('auUse')\n\tuse: AgnosUIDirective<T> | undefined;\n\n\t@Input('auUseParams')\n\tparams: T | undefined;\n\n\t#useDirective = useDirectiveForHost<T>();\n\n\tngOnChanges() {\n\t\tvoid this.#useDirective.update(this.use, this.params);\n\t}\n}\n","import type {\n\tContextWidget,\n\tSlotContent as CoreSlotContent,\n\tWidget,\n\tWidgetFactory,\n\tWidgetProps,\n\tWidgetSlotContext,\n\tWidgetState,\n} from '@agnos-ui/core/types';\nimport type {Signal, TemplateRef, Type} from '@angular/core';\nimport {Directive, Input} from '@angular/core';\n\nexport * from '@agnos-ui/core/types';\n\nexport class ComponentTemplate<Props, K extends string, T extends {[key in K]: TemplateRef<Props>}> {\n\tconstructor(\n\t\tpublic readonly component: Type<T>,\n\t\tpublic readonly templateProp: K,\n\t) {}\n}\n\nexport type SlotContent<Props extends object = object> =\n\t| CoreSlotContent<Props>\n\t| TemplateRef<Props>\n\t| Type<unknown>\n\t| ComponentTemplate<Props, any, any>;\n\nexport type AdaptSlotContentProps<Props extends Record<string, any>> =\n\tProps extends WidgetSlotContext<infer U>\n\t\t? WidgetSlotContext<AdaptWidgetSlots<U>> & AdaptPropsSlots<Omit<Props, keyof WidgetSlotContext<any>>>\n\t\t: AdaptPropsSlots<Props>;\n\nexport type AdaptPropsSlots<Props> = Omit<Props, `slot${string}`> & {\n\t[K in keyof Props & `slot${string}`]: Props[K] extends CoreSlotContent<infer U> ? SlotContent<AdaptSlotContentProps<U>> : Props[K];\n};\n\nexport type AdaptWidgetFactories<T> = {\n\t[K in keyof T]: T[K] extends WidgetFactory<infer U> ? WidgetFactory<AdaptWidgetSlots<U>> : T[K];\n};\n\nexport type AdaptWidgetSlots<W extends Widget> = Widget<\n\tAdaptPropsSlots<WidgetProps<W>>,\n\tAdaptPropsSlots<WidgetState<W>>,\n\tAdaptWidgetFactories<W['api']>,\n\tW['actions'],\n\tW['directives']\n>;\n\n@Directive()\nexport abstract class SlotComponent<W extends Widget> {\n\t@Input()\n\tstate!: WidgetState<W>;\n\t@Input()\n\twidget!: ContextWidget<W>;\n}\n\nexport type AngularWidget<W extends Widget> = W & {\n\tinitialized: Promise<void>;\n\twidget: ContextWidget<W>;\n\tngState: Signal<WidgetState<W>>;\n\tngInit: () => void;\n\tpatchSlots(slots: {\n\t\t[K in keyof WidgetProps<W> & `slot${string}`]: WidgetProps<W>[K] extends SlotContent<infer U> ? TemplateRef<U> | undefined : never;\n\t}): void;\n};\n","import {computed, writable, type ReadableSignal} from '@amadeus-it-group/tansu';\nimport type {OnChanges, OnInit, Signal, SimpleChanges} from '@angular/core';\nimport {Directive, Injector, inject, runInInjectionContext} from '@angular/core';\nimport {\n\ttoSlotContextWidget,\n\ttype AngularWidget,\n\ttype ContextWidget,\n\ttype Widget,\n\ttype WidgetFactory,\n\ttype WidgetProps,\n\ttype WidgetState,\n} from '../types';\nimport {toAngularSignal, toReadableStore} from './stores';\nimport {ZoneWrapper} from './zone';\n\nconst createPatchSlots = <T extends object>(set: (object: Partial<T>) => void) => {\n\tlet lastValue: Partial<T> = {};\n\treturn (object: T) => {\n\t\tconst newValue: Partial<T> = {};\n\t\tlet hasChange = false;\n\t\tfor (const key of Object.keys(object) as (string & keyof T)[]) {\n\t\t\tconst objectKey = (object as any)[key];\n\t\t\tif (objectKey != null) {\n\t\t\t\t// only use defined slots\n\t\t\t\tnewValue[key] = objectKey;\n\t\t\t}\n\t\t\tif (objectKey != lastValue[key]) {\n\t\t\t\thasChange = true;\n\t\t\t}\n\t\t}\n\t\tif (hasChange) {\n\t\t\tlastValue = newValue;\n\t\t\tset(newValue);\n\t\t}\n\t};\n};\n\nexport const callWidgetFactoryWithConfig = <W extends Widget>({\n\tfactory,\n\tdefaultConfig,\n\twidgetConfig,\n\tevents,\n\tafterInit,\n}: {\n\tfactory: WidgetFactory<W>;\n\tdefaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n\twidgetConfig?: null | undefined | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n\tevents: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>;\n\tafterInit?: () => void;\n}): AngularWidget<W> => {\n\tconst injector = inject(Injector);\n\tconst slots$ = writable({});\n\tconst props = {};\n\tlet initDone: () => void;\n\tconst res = {\n\t\tinitialized: new Promise((resolve) => {\n\t\t\tinitDone = resolve;\n\t\t}),\n\t\tpatchSlots: createPatchSlots(slots$.set),\n\t\tpatch(newProps) {\n\t\t\t// temporary function replaced in ngInit\n\t\t\tObject.assign(props, newProps);\n\t\t},\n\t\tngInit() {\n\t\t\trunInInjectionContext(injector, () => {\n\t\t\t\tconst zoneWrapper = inject(ZoneWrapper);\n\t\t\t\tfactory = zoneWrapper.outsideNgZone(factory);\n\t\t\t\tconst defaultConfig$ = toReadableStore(defaultConfig);\n\t\t\t\tevents = zoneWrapper.insideNgZoneWrapFunctionsObject(events);\n\t\t\t\tconst widget = factory({\n\t\t\t\t\tconfig: computed(() => ({...defaultConfig$(), ...widgetConfig?.(), ...slots$(), ...(events as Partial<WidgetProps<W>>)})),\n\t\t\t\t\tprops,\n\t\t\t\t});\n\t\t\t\tconst wrappedWidget: W = {\n\t\t\t\t\t...widget,\n\t\t\t\t\tpatch: zoneWrapper.outsideNgZone(widget.patch),\n\t\t\t\t\tdirectives: zoneWrapper.outsideNgZoneWrapDirectivesObject(widget.directives),\n\t\t\t\t\tactions: zoneWrapper.outsideNgZoneWrapFunctionsObject(widget.actions),\n\t\t\t\t\tapi: zoneWrapper.outsideNgZoneWrapFunctionsObject(widget.api),\n\t\t\t\t};\n\t\t\t\tObject.assign(res, wrappedWidget, {\n\t\t\t\t\twidget: toSlotContextWidget(wrappedWidget),\n\t\t\t\t\tngState: toAngularSignal(wrappedWidget.state$ as ReadableSignal<WidgetState<W>>),\n\t\t\t\t});\n\t\t\t\tafterInit?.();\n\t\t\t\tinitDone();\n\t\t\t});\n\t\t},\n\t} as AngularWidget<W>;\n\n\treturn res;\n};\n\nfunction patchSimpleChanges(patchFn: (obj: any) => void, changes: SimpleChanges) {\n\tconst obj: any = {};\n\tfor (const [key, simpleChange] of Object.entries(changes)) {\n\t\tif (simpleChange !== undefined) {\n\t\t\tobj[key] = simpleChange.currentValue;\n\t\t}\n\t}\n\tpatchFn(obj);\n}\n\n/**\n * Stores the result of the first call to the getter and returns that result directly for subsequent calls\n *\n * Applies to: class getters\n */\nexport const CachedProperty = (target: any, property: PropertyKey, descriptor: PropertyDescriptor) => {\n\tconst originalGet = descriptor.get;\n\tdescriptor.get = function (this: any) {\n\t\tconst value = originalGet?.call(this);\n\t\tObject.defineProperty(this, property, {value, writable: false});\n\t\treturn value;\n\t};\n};\n\n@Directive()\nexport abstract class BaseWidgetDirective<W extends Widget> implements OnChanges, OnInit {\n\tprotected abstract readonly _widget: AngularWidget<W>;\n\n\tget api(): W['api'] {\n\t\treturn this._widget.api;\n\t}\n\n\tget state(): Signal<WidgetState<W>> {\n\t\treturn this._widget.ngState;\n\t}\n\n\tget widget(): ContextWidget<W> {\n\t\treturn this._widget.widget;\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tpatchSimpleChanges(this._widget.patch, changes);\n\t}\n\n\tngOnInit(): void {\n\t\tthis._widget.ngInit();\n\t}\n}\n","import type {Widget, WidgetFactory, WidgetProps} from '@agnos-ui/core/types';\nimport type {Partial2Levels, WidgetsConfigStore, WidgetsConfig as CoreWidgetsConfig} from '@agnos-ui/core/config';\nimport {createWidgetsConfig} from '@agnos-ui/core/config';\nimport type {ReadableSignal} from '@amadeus-it-group/tansu';\nimport {computed} from '@amadeus-it-group/tansu';\nimport type {FactoryProvider} from '@angular/core';\nimport {InjectionToken, Injector, Optional, SkipSelf, inject, runInInjectionContext} from '@angular/core';\nimport type {AdaptPropsSlots, AngularWidget} from './types';\nimport {callWidgetFactoryWithConfig} from './utils/widget';\n\nexport * from '@agnos-ui/core/config';\n\nexport type WidgetsConfig = {\n\t[WidgetName in keyof CoreWidgetsConfig]: AdaptPropsSlots<CoreWidgetsConfig[WidgetName]>;\n};\ntype AdaptParentConfig<Config> = (config: Partial2Levels<Config>) => Partial2Levels<Config>;\n\nexport const widgetsConfigFactory = <Config extends {[widgetName: string]: object} = WidgetsConfig>(\n\twidgetsConfigInjectionToken = new InjectionToken<WidgetsConfigStore<Config>>('widgetsConfig'),\n) => {\n\t/**\n\t * Creates a provider of widgets default configuration that inherits from any widgets default configuration already defined at an upper level\n\t * in the Angular dependency injection system. It contains its own set of widgets configuration properties that override the same properties form\n\t * the parent configuration.\n\t *\n\t * @remarks\n\t * The configuration is computed from the parent configuration in two steps:\n\t * - first step: the parent configuration is transformed by the adaptParentConfig function (if specified).\n\t * If adaptParentConfig is not specified, this step is skipped.\n\t * - second step: the configuration from step 1 is merged (2-levels deep) with the own$ store. The own$ store initially contains\n\t * 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\t * {@link injectWidgetsConfig}.\n\t *\n\t * @param adaptParentConfig - optional function that receives a 2-levels copy of the widgets default configuration\n\t * defined at an upper level in the Angular dependency injection system (or an empty object if there is none) and returns the widgets\n\t * default configuration to be used.\n\t * It is called only if the configuration is needed, and was not yet computed for the current value of the parent configuration.\n\t * 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\t * 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\t * Angular dependency injection system.\n\n\t* @returns DI provider to be included a list of `providers` (for example at a component level or\n\t* any other level of the Angular dependency injection system)\n\t*\n\t* @example\n\t* ```typescript\n\t* @Component({\n\t* // ...\n\t* providers: [\n\t* provideWidgetsConfig((parentConfig) => {\n\t* // first step configuration: transforms the parent configuration\n\t* parentConfig.rating = parentConfig.rating ?? {};\n\t* parentConfig.rating.className = `${parentConfig.rating.className ?? ''} my-rating-extra-class`\n\t* return parentConfig;\n\t* })\n\t* ]\n\t* })\n\t* class MyComponent {\n\t* widgetsConfig = injectWidgetsConfig();\n\t* constructor() {\n\t* this.widgetsConfig.set({\n\t* // second step configuration: overrides the parent configuration\n\t* rating: {\n\t* slotStar: MyCustomSlotStar\n\t* }\n\t* });\n\t* }\n\t* // ...\n\t* }\n\t* ```\n\t*/\n\tconst provideWidgetsConfig = (adaptParentConfig?: AdaptParentConfig<Config>): FactoryProvider => ({\n\t\tprovide: widgetsConfigInjectionToken,\n\t\tuseFactory: (parent: WidgetsConfigStore<Config> | null) => {\n\t\t\tif (adaptParentConfig) {\n\t\t\t\tconst injector = inject(Injector);\n\t\t\t\tconst originalAdaptParentConfig = adaptParentConfig;\n\t\t\t\tadaptParentConfig = (value) => runInInjectionContext(injector, () => originalAdaptParentConfig(value));\n\t\t\t}\n\t\t\treturn createWidgetsConfig(parent ?? undefined, adaptParentConfig);\n\t\t},\n\t\tdeps: [[new SkipSelf(), new Optional(), widgetsConfigInjectionToken]],\n\t});\n\n\t/**\n\t * Returns the widgets default configuration store that was provided in the current injection context.\n\t * Throws if the no widgets default configuration store was provided.\n\t *\n\t * @remarks\n\t * This function must be called from an injection context, such as a constructor, a factory function, a field initializer or\n\t * a function used with {@link https://angular.io/api/core/runInInjectionContext | runInInjectionContext}.\n\t *\n\t * @returns the widgets default configuration store.\n\t */\n\tconst injectWidgetsConfig = () => inject(widgetsConfigInjectionToken);\n\n\tconst injectWidgetConfig = <N extends keyof Config>(widgetName: N): ReadableSignal<Partial<Config[N]> | undefined> => {\n\t\tconst widgetsConfig = inject(widgetsConfigInjectionToken, {optional: true});\n\t\treturn computed(() => widgetsConfig?.()[widgetName]);\n\t};\n\n\tconst callWidgetFactory = <W extends Widget>({\n\t\tfactory,\n\t\twidgetName = null,\n\t\tdefaultConfig = {},\n\t\tevents,\n\t\tafterInit,\n\t}: {\n\t\tfactory: WidgetFactory<W>;\n\t\twidgetName?: null | keyof Config;\n\t\tdefaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined>;\n\t\tevents: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>;\n\t\tafterInit?: () => void;\n\t}): AngularWidget<W> =>\n\t\tcallWidgetFactoryWithConfig({\n\t\t\tfactory,\n\t\t\twidgetConfig: widgetName ? (injectWidgetConfig(widgetName) as any) : null,\n\t\t\tdefaultConfig,\n\t\t\tevents,\n\t\t\tafterInit,\n\t\t});\n\n\treturn {\n\t\t/**\n\t\t * Dependency Injection token which can be used to provide or inject the widgets default configuration store.\n\t\t */\n\t\twidgetsConfigInjectionToken,\n\t\tprovideWidgetsConfig,\n\t\tinjectWidgetsConfig,\n\t\tinjectWidgetConfig,\n\t\tcallWidgetFactory,\n\t};\n};\n\nexport const {widgetsConfigInjectionToken, provideWidgetsConfig, injectWidgetConfig, injectWidgetsConfig, callWidgetFactory} =\n\twidgetsConfigFactory<WidgetsConfig>();\n","import {booleanAttribute, numberAttribute} from '@angular/core';\n\n/**\n * Transforms a value (typically a string) to a boolean.\n * Intended to be used as a transform function of an input.\n *\n * @usageNotes\n * ```typescript\n * @Input({ transform: auBooleanAttribute }) status: boolean | undefined;\n * ```\n * @param value Value to be transformed.\n */\nexport function auBooleanAttribute(value: unknown): boolean | undefined {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\treturn booleanAttribute(value);\n}\n\n/**\n * Transforms a value (typically a string) to a number.\n * Intended to be used as a transform function of an input.\n * @param value Value to be transformed.\n *\n * @usageNotes\n * ```typescript\n * @Input({ transform: auNumberAttribute }) id: number | undefined;\n * ```\n */\nexport function auNumberAttribute(value: unknown): number | undefined {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\treturn numberAttribute(value);\n}\n","import type {WritableSignal} from '@amadeus-it-group/tansu';\nimport type {OnInit} from '@angular/core';\nimport {Directive, Input, TemplateRef, inject} from '@angular/core';\nimport type {SlotContent} from './types';\n\n@Directive({selector: '[auSlotDefault]', standalone: true})\nexport class SlotDefaultDirective<T extends object> implements OnInit {\n\t@Input('auSlotDefault') auSlotDefault: WritableSignal<{slotDefault?: SlotContent<T>}>;\n\n\ttemplateRef = inject(TemplateRef<T>);\n\n\tngOnInit(): void {\n\t\tthis.auSlotDefault.update((value) => ({...value, slotDefault: this.templateRef}));\n\t}\n}\n","import {DOCUMENT} from '@angular/common';\nimport type {ComponentRef, EmbeddedViewRef, OnChanges, OnDestroy, SimpleChanges, Type} from '@angular/core';\nimport {Directive, EnvironmentInjector, Input, TemplateRef, ViewContainerRef, createComponent, inject, reflectComponentType} from '@angular/core';\nimport type {SlotContent} from './types';\nimport {ComponentTemplate} from './types';\n\nabstract class SlotHandler<Props extends Record<string, any>, Slot extends SlotContent<Props> = SlotContent<Props>> {\n\tconstructor(\n\t\tpublic viewContainerRef: ViewContainerRef,\n\t\tpublic document: Document,\n\t) {}\n\tslotChange(slot: Slot, props: Props) {}\n\tpropsChange(slot: Slot, props: Props) {}\n\tdestroy() {}\n}\n\nclass StringSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, string> {\n\t#nodeRef: Text | undefined;\n\t#previousText = '';\n\n\toverride slotChange(slot: string): void {\n\t\tif (slot === this.#previousText) {\n\t\t\treturn;\n\t\t}\n\t\tthis.#previousText = slot;\n\t\tif (this.#nodeRef) {\n\t\t\tthis.#nodeRef.textContent = slot;\n\t\t} else {\n\t\t\tconst viewContainerElement: Comment | undefined = this.viewContainerRef.element.nativeElement;\n\t\t\tif (this.document && viewContainerElement?.parentNode) {\n\t\t\t\tthis.#nodeRef = viewContainerElement.parentNode.insertBefore(this.document.createTextNode(slot), viewContainerElement);\n\t\t\t}\n\t\t}\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#nodeRef?.parentNode?.removeChild(this.#nodeRef);\n\t\tthis.#nodeRef = undefined;\n\t}\n}\n\nclass FunctionSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, (props: Props) => string> {\n\t#stringSlotHandler = new StringSlotHandler(this.viewContainerRef, this.document);\n\n\toverride slotChange(slot: (props: Props) => string, props: Props): void {\n\t\tthis.#stringSlotHandler.slotChange(slot(props));\n\t}\n\n\toverride propsChange(slot: (props: Props) => string, props: Props): void {\n\t\tthis.#stringSlotHandler.slotChange(slot(props));\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#stringSlotHandler.destroy();\n\t}\n}\n\nclass ComponentSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, Type<unknown>> {\n\t#componentRef: ComponentRef<any> | undefined;\n\t#properties: string[];\n\n\toverride slotChange(slot: Type<unknown>, props: Props): void {\n\t\tif (this.#componentRef) {\n\t\t\tthis.destroy();\n\t\t}\n\t\tthis.#componentRef = this.viewContainerRef.createComponent(slot);\n\t\tthis.#applyProperties(props);\n\t}\n\n\t#applyProperties(props: Props, oldProperties?: Set<string>) {\n\t\tconst properties = Object.keys(props);\n\t\tthis.#properties = properties;\n\t\tconst componentRef = this.#componentRef!;\n\t\tfor (const property of properties) {\n\t\t\tcomponentRef.setInput(property, props[property]);\n\t\t\toldProperties?.delete(property);\n\t\t}\n\t}\n\n\toverride propsChange(slot: Type<unknown>, props: Props): void {\n\t\tconst oldProperties = new Set(this.#properties);\n\t\tthis.#applyProperties(props, oldProperties);\n\t\tconst componentRef = this.#componentRef!;\n\t\tfor (const property of oldProperties) {\n\t\t\tcomponentRef.setInput(property, undefined);\n\t\t}\n\t}\n\n\toverride destroy(): void {\n\t\tthis.viewContainerRef.clear();\n\t\tthis.#componentRef = undefined;\n\t}\n}\n\nclass TemplateRefSlotHandler<Props extends Record<string, any>> extends SlotHandler<Props, TemplateRef<Props>> {\n\t#viewRef: EmbeddedViewRef<Props> | undefined;\n\t#props: Props;\n\n\toverride slotChange(slot: TemplateRef<Props>, props: Props): void {\n\t\tif (this.#viewRef) {\n\t\t\tthis.destroy();\n\t\t}\n\t\tprops = {...props};\n\t\tthis.#props = props;\n\t\tthis.#viewRef = this.viewContainerRef.createEmbeddedView(slot, props);\n\t}\n\n\toverride propsChange(slot: TemplateRef<Props>, props: Props): void {\n\t\tif (this.#viewRef) {\n\t\t\tconst templateProps = this.#props;\n\t\t\tconst oldProperties = new Set<keyof Props>(Object.keys(templateProps));\n\t\t\tfor (const property of Object.keys(props) as (keyof Props)[]) {\n\t\t\t\ttemplateProps[property] = props[property];\n\t\t\t\toldProperties.delete(property);\n\t\t\t}\n\t\t\tfor (const oldProperty of oldProperties) {\n\t\t\t\tdelete templateProps[oldProperty];\n\t\t\t}\n\t\t\tthis.#viewRef.markForCheck();\n\t\t}\n\t}\n\n\toverride destroy(): void {\n\t\tthis.viewContainerRef.clear();\n\t}\n}\n\nclass ComponentTemplateSlotHandler<\n\tProps extends Record<string, any>,\n\tK extends string,\n\tT extends {[key in K]: TemplateRef<Props>},\n> extends SlotHandler<Props, ComponentTemplate<Props, K, T>> {\n\t#componentRef: ComponentRef<T> | undefined;\n\t#templateSlotHandler = new TemplateRefSlotHandler(this.viewContainerRef, this.document);\n\t#templateRef: TemplateRef<Props> | undefined;\n\n\toverride slotChange(slot: ComponentTemplate<Props, K, T>, props: Props): void {\n\t\tif (this.#componentRef) {\n\t\t\tthis.destroy();\n\t\t}\n\t\tthis.#componentRef = createComponent(slot.component, {\n\t\t\telementInjector: this.viewContainerRef.injector,\n\t\t\tenvironmentInjector: this.viewContainerRef.injector.get(EnvironmentInjector),\n\t\t});\n\t\tthis.#templateRef = this.#componentRef.instance[slot.templateProp];\n\t\tthis.#templateSlotHandler.slotChange(this.#templateRef, props);\n\t}\n\n\toverride propsChange(slot: ComponentTemplate<Props, K, T>, props: Props): void {\n\t\tthis.#templateSlotHandler.propsChange(this.#templateRef!, props);\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#templateSlotHandler.destroy();\n\t\tthis.#componentRef?.destroy();\n\t\tthis.#componentRef = undefined;\n\t}\n}\n\nconst getSlotType = (value: any): undefined | {new (viewContainerRef: ViewContainerRef, document: Document): SlotHandler<any>} => {\n\tif (!value) return undefined;\n\tconst type = typeof value;\n\tswitch (type) {\n\t\tcase 'string':\n\t\t\treturn StringSlotHandler;\n\t\tcase 'function':\n\t\t\tif (reflectComponentType(value)) {\n\t\t\t\treturn ComponentSlotHandler;\n\t\t\t}\n\t\t\treturn FunctionSlotHandler;\n\t\tcase 'object':\n\t\t\tif (value instanceof TemplateRef) {\n\t\t\t\treturn TemplateRefSlotHandler;\n\t\t\t}\n\t\t\tif (value instanceof ComponentTemplate) {\n\t\t\t\treturn ComponentTemplateSlotHandler;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn undefined;\n};\n\n@Directive({\n\tselector: '[auSlot]',\n\tstandalone: true,\n})\nexport class SlotDirective<Props extends Record<string, any>> implements OnChanges, OnDestroy {\n\t@Input('auSlot') slot: SlotContent<Props>;\n\t@Input('auSlotProps') props: Props;\n\n\tprivate _viewContainerRef = inject(ViewContainerRef);\n\tprivate _document = inject(DOCUMENT);\n\tprivate _slotType: ReturnType<typeof getSlotType>;\n\tprivate _slotHandler: SlotHandler<Props> | undefined;\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tconst slotChange = changes['slot'];\n\t\tconst propsChange = changes['props'];\n\t\tconst slot = this.slot;\n\t\tif (slotChange) {\n\t\t\tconst newSlotType = getSlotType(slot);\n\t\t\tif (newSlotType !== this._slotType) {\n\t\t\t\tthis._slotHandler?.destroy();\n\t\t\t\tthis._slotHandler = newSlotType ? new newSlotType(this._viewContainerRef, this._document) : undefined;\n\t\t\t\tthis._slotType = newSlotType;\n\t\t\t}\n\t\t\tthis._slotHandler?.slotChange(slot, this.props);\n\t\t} else if (propsChange) {\n\t\t\tthis._slotHandler?.propsChange(slot, this.props);\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._slotHandler?.destroy();\n\t\tthis._slotHandler = undefined;\n\t}\n}\n","/*\n * Public API Surface of @agnos-ui/angular-headless\n */\nexport * from './components/accordion/accordion';\nexport * from './components/alert/alert';\nexport * from './components/modal/modal';\nexport * from './components/pagination/pagination';\nexport * from './components/progressbar/progressbar';\nexport * from './components/rating/rating';\nexport * from './components/select/select';\nexport * from './components/slider/slider';\n\nexport * from './generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["coreCreateAccordion","coreCreateAlert","coreCreateModal","coreCreatePagination","coreCreate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,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AACjD,SAAA;KACD;IAED,WAAW,GAAA;AACV,QAAA,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;KAC9B;8EA7BW,aAAa,GAAA,CAAA,EAAA,CAAA,EAAA;oEAAb,aAAa,EAAA,SAAA,EAAA,CAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,CAAA,QAAA,EAAA,MAAA,CAAA,EAAA,KAAA,EAAA,CAAA,aAAA,EAAA,OAAA,CAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,CAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;iFAAb,aAAa,EAAA,CAAA;cAJzB,SAAS;AAAC,QAAA,IAAA,EAAA,CAAA;AACV,gBAAA,QAAQ,EAAE,UAAU;AACpB,gBAAA,UAAU,EAAE,IAAI;AAChB,aAAA,CAAA;gBAEiB,IAAI,EAAA,CAAA;kBAApB,KAAK;mBAAC,QAAQ,CAAA;YACO,KAAK,EAAA,CAAA;kBAA1B,KAAK;mBAAC,aAAa,CAAA;;;AC5LrB;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../config';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './services/siblingsInert';
|
|
2
|
+
export * from './services/portal';
|
|
3
|
+
export * from './services/navManager';
|
|
4
|
+
export * from './services/intersection';
|
|
5
|
+
export * from './services/focustrack';
|
|
6
|
+
export * from './services/floatingUI';
|
|
7
|
+
export * from './services/extendWidget';
|
|
8
|
+
export * from './services/transitions/simpleClassTransition';
|
|
9
|
+
export * from './services/transitions/cssTransitions';
|
|
10
|
+
export * from './services/transitions/collapse';
|
|
11
|
+
export * from './services/transitions/bootstrap';
|
|
12
|
+
export * from './services/transitions/baseTransitions';
|
|
13
|
+
export * from './utils/writables';
|
|
14
|
+
export * from './utils/stores';
|
|
15
|
+
export * from './utils/directive';
|
|
16
|
+
export * from './types';
|
|
17
|
+
export * from './config';
|
|
18
|
+
export * from './utils/zone';
|
|
19
|
+
export * from './utils/widget';
|
|
20
|
+
export * from './utils/coercion';
|
|
21
|
+
export * from './slotDefault.directive';
|
|
22
|
+
export * from './slot.directive';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/extendWidget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/floatingUI';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/focustrack';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/intersection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/navManager';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/portal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/siblingsInert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/transitions/baseTransitions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/transitions/bootstrap';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/transitions/collapse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/transitions/cssTransitions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/transitions/simpleClassTransition';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../slot.directive';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../slotDefault.directive';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../../utils/coercion';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../../utils/directive';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../../utils/stores';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../../utils/widget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/utils/writables';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './../../utils/zone';
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './components/accordion/accordion';
|
|
2
|
+
export * from './components/alert/alert';
|
|
3
|
+
export * from './components/modal/modal';
|
|
4
|
+
export * from './components/pagination/pagination';
|
|
5
|
+
export * from './components/progressbar/progressbar';
|
|
6
|
+
export * from './components/rating/rating';
|
|
7
|
+
export * from './components/select/select';
|
|
8
|
+
export * from './components/slider/slider';
|
|
9
|
+
export * from './generated';
|
package/package.json
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/angular-headless",
|
|
3
3
|
"description": "Headless widget library for Angular.",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"esm2022": "./esm2022/agnos-ui-angular-headless.mjs",
|
|
9
|
+
"esm": "./esm2022/agnos-ui-angular-headless.mjs",
|
|
10
|
+
"default": "./fesm2022/agnos-ui-angular-headless.mjs"
|
|
11
|
+
},
|
|
12
|
+
"./package.json": {
|
|
13
|
+
"default": "./package.json"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
4
16
|
"peerDependencies": {
|
|
5
17
|
"@angular/common": "*",
|
|
6
18
|
"@angular/core": "*"
|
|
7
19
|
},
|
|
8
20
|
"dependencies": {
|
|
9
|
-
"@agnos-ui/core": "0.0.1-alpha.
|
|
10
|
-
"@amadeus-it-group/tansu": "0.0.
|
|
21
|
+
"@agnos-ui/core": "0.0.1-alpha.6",
|
|
22
|
+
"@amadeus-it-group/tansu": "0.0.24",
|
|
11
23
|
"tslib": "^2.6.2"
|
|
12
24
|
},
|
|
13
25
|
"sideEffects": false,
|
|
14
|
-
"version": "0.0.1-alpha.
|
|
26
|
+
"version": "0.0.1-alpha.6",
|
|
15
27
|
"module": "fesm2022/agnos-ui-angular-headless.mjs",
|
|
16
28
|
"typings": "index.d.ts",
|
|
17
|
-
"exports": {
|
|
18
|
-
"./package.json": {
|
|
19
|
-
"default": "./package.json"
|
|
20
|
-
},
|
|
21
|
-
".": {
|
|
22
|
-
"types": "./index.d.ts",
|
|
23
|
-
"esm2022": "./esm2022/agnos-ui-angular-headless.mjs",
|
|
24
|
-
"esm": "./esm2022/agnos-ui-angular-headless.mjs",
|
|
25
|
-
"default": "./fesm2022/agnos-ui-angular-headless.mjs"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
29
|
"homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
|
|
29
30
|
"bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
|
|
30
31
|
"license": "MIT",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import type { SlotContent } from './
|
|
2
|
+
import type { SlotContent } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SlotDirective<Props extends Record<string, any>> implements OnChanges, OnDestroy {
|
|
5
5
|
slot: SlotContent<Props>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WritableSignal } from '@amadeus-it-group/tansu';
|
|
2
2
|
import type { OnInit } from '@angular/core';
|
|
3
3
|
import { TemplateRef } from '@angular/core';
|
|
4
|
-
import type { SlotContent } from './
|
|
4
|
+
import type { SlotContent } from './types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class SlotDefaultDirective<T extends object> implements OnInit {
|
|
7
7
|
auSlotDefault: WritableSignal<{
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { SlotContent as CoreSlotContent, Widget, WidgetFactory, WidgetProps, WidgetSlotContext, WidgetState } from '@agnos-ui/core';
|
|
2
|
-
import type { TemplateRef, Type } from '@angular/core';
|
|
1
|
+
import type { ContextWidget, SlotContent as CoreSlotContent, Widget, WidgetFactory, WidgetProps, WidgetSlotContext, WidgetState } from '@agnos-ui/core/types';
|
|
2
|
+
import type { Signal, TemplateRef, Type } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export * from '@agnos-ui/core/types';
|
|
3
5
|
export declare class ComponentTemplate<Props, K extends string, T extends {
|
|
4
6
|
[key in K]: TemplateRef<Props>;
|
|
5
7
|
}> {
|
|
@@ -16,3 +18,18 @@ export type AdaptWidgetFactories<T> = {
|
|
|
16
18
|
[K in keyof T]: T[K] extends WidgetFactory<infer U> ? WidgetFactory<AdaptWidgetSlots<U>> : T[K];
|
|
17
19
|
};
|
|
18
20
|
export type AdaptWidgetSlots<W extends Widget> = Widget<AdaptPropsSlots<WidgetProps<W>>, AdaptPropsSlots<WidgetState<W>>, AdaptWidgetFactories<W['api']>, W['actions'], W['directives']>;
|
|
21
|
+
export declare abstract class SlotComponent<W extends Widget> {
|
|
22
|
+
state: WidgetState<W>;
|
|
23
|
+
widget: ContextWidget<W>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlotComponent<any>, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SlotComponent<any>, never, never, { "state": { "alias": "state"; "required": false; }; "widget": { "alias": "widget"; "required": false; }; }, {}, never, never, false, never>;
|
|
26
|
+
}
|
|
27
|
+
export type AngularWidget<W extends Widget> = W & {
|
|
28
|
+
initialized: Promise<void>;
|
|
29
|
+
widget: ContextWidget<W>;
|
|
30
|
+
ngState: Signal<WidgetState<W>>;
|
|
31
|
+
ngInit: () => void;
|
|
32
|
+
patchSlots(slots: {
|
|
33
|
+
[K in keyof WidgetProps<W> & `slot${string}`]: WidgetProps<W>[K] extends SlotContent<infer U> ? TemplateRef<U> | undefined : never;
|
|
34
|
+
}): void;
|
|
35
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a value (typically a string) to a boolean.
|
|
3
|
+
* Intended to be used as a transform function of an input.
|
|
4
|
+
*
|
|
5
|
+
* @usageNotes
|
|
6
|
+
* ```typescript
|
|
7
|
+
* @Input({ transform: auBooleanAttribute }) status: boolean | undefined;
|
|
8
|
+
* ```
|
|
9
|
+
* @param value Value to be transformed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function auBooleanAttribute(value: unknown): boolean | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Transforms a value (typically a string) to a number.
|
|
14
|
+
* Intended to be used as a transform function of an input.
|
|
15
|
+
* @param value Value to be transformed.
|
|
16
|
+
*
|
|
17
|
+
* @usageNotes
|
|
18
|
+
* ```typescript
|
|
19
|
+
* @Input({ transform: auNumberAttribute }) id: number | undefined;
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function auNumberAttribute(value: unknown): number | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Directive as AgnosUIDirective } from '@agnos-ui/core/types';
|
|
1
2
|
import type { OnChanges } from '@angular/core';
|
|
2
|
-
import type { Directive as AgnosUIDirective } from '@agnos-ui/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export * from '@agnos-ui/core/utils/directive';
|
|
4
5
|
export declare const useDirectiveForHost: <T>(use?: AgnosUIDirective<T> | undefined, params?: T | undefined) => {
|
|
5
6
|
update: (newUse?: AgnosUIDirective<T> | undefined, newParams?: T | undefined) => Promise<void>;
|
|
6
7
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReadableSignal } from '@amadeus-it-group/tansu';
|
|
2
|
+
import type { OnChanges, OnInit, Signal, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { type AngularWidget, type ContextWidget, type Widget, type WidgetFactory, type WidgetProps, type WidgetState } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare const callWidgetFactoryWithConfig: <W extends Widget<object, object, object, object, object>>({ factory, defaultConfig, widgetConfig, events, afterInit, }: {
|
|
6
|
+
factory: WidgetFactory<W>;
|
|
7
|
+
defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined> | undefined;
|
|
8
|
+
widgetConfig?: ReadableSignal<Partial<WidgetProps<W>> | undefined> | null | undefined;
|
|
9
|
+
events: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>;
|
|
10
|
+
afterInit?: (() => void) | undefined;
|
|
11
|
+
}) => AngularWidget<W>;
|
|
12
|
+
/**
|
|
13
|
+
* Stores the result of the first call to the getter and returns that result directly for subsequent calls
|
|
14
|
+
*
|
|
15
|
+
* Applies to: class getters
|
|
16
|
+
*/
|
|
17
|
+
export declare const CachedProperty: (target: any, property: PropertyKey, descriptor: PropertyDescriptor) => void;
|
|
18
|
+
export declare abstract class BaseWidgetDirective<W extends Widget> implements OnChanges, OnInit {
|
|
19
|
+
protected abstract readonly _widget: AngularWidget<W>;
|
|
20
|
+
get api(): W['api'];
|
|
21
|
+
get state(): Signal<WidgetState<W>>;
|
|
22
|
+
get widget(): ContextWidget<W>;
|
|
23
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseWidgetDirective<any>, never>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseWidgetDirective<any>, never, never, {}, {}, never, never, false, never>;
|
|
27
|
+
}
|
package/utils/zone.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
type Wrapper = <T>(fn: T) => T;
|
|
3
|
+
export declare class ZoneWrapper {
|
|
4
|
+
#private;
|
|
5
|
+
planNgZoneRun: () => void;
|
|
6
|
+
ngZoneRun<T>(fn: () => T): T;
|
|
7
|
+
insideNgZone: Wrapper;
|
|
8
|
+
insideNgZoneWrapFunctionsObject: Wrapper;
|
|
9
|
+
outsideNgZone: Wrapper;
|
|
10
|
+
outsideNgZoneWrapFunctionsObject: Wrapper;
|
|
11
|
+
outsideNgZoneWrapDirective: Wrapper;
|
|
12
|
+
outsideNgZoneWrapDirectivesObject: Wrapper;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZoneWrapper, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ZoneWrapper>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|