@ng-atomic/core 19.0.0-preview.20 → 19.0.0-preview.21
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.
|
@@ -418,7 +418,11 @@ function updateInput(instance, propName, updater) {
|
|
|
418
418
|
async function wrapLoadChildren(loadChildrenCallback) {
|
|
419
419
|
const children = await loadChildrenCallback();
|
|
420
420
|
const _children = isObservable(children) ? await lastValueFrom(children) : children;
|
|
421
|
-
const __children = 'default' in _children
|
|
421
|
+
const __children = 'default' in _children
|
|
422
|
+
? _children.default
|
|
423
|
+
: 'routes' in _children
|
|
424
|
+
? _children.routes
|
|
425
|
+
: _children;
|
|
422
426
|
return __children;
|
|
423
427
|
}
|
|
424
428
|
function recursiveWrapRoute(route, ...wrappers) {
|
|
@@ -434,6 +438,7 @@ function recursiveWrapRoute(route, ...wrappers) {
|
|
|
434
438
|
};
|
|
435
439
|
}
|
|
436
440
|
function recursiveWrapRoutes(routes, ...wrappers) {
|
|
441
|
+
console.debug('recursiveWrapRoutes:', routes);
|
|
437
442
|
return routes.map(route => recursiveWrapRoute(route, ...wrappers));
|
|
438
443
|
}
|
|
439
444
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-atomic-core.mjs","sources":["../../../../../packages/@ng-atomic/core/src/lib/effect.ts","../../../../../packages/@ng-atomic/core/src/lib/action-store.ts","../../../../../packages/@ng-atomic/core/src/lib/action.ts","../../../../../packages/@ng-atomic/core/src/lib/signals.ts","../../../../../packages/@ng-atomic/core/src/lib/injectable-component.ts","../../../../../packages/@ng-atomic/core/src/lib/input.ts","../../../../../packages/@ng-atomic/core/src/lib/route.ts","../../../../../packages/@ng-atomic/core/src/lib/ng-atomic-debug.ts","../../../../../packages/@ng-atomic/core/src/lib/debug/debug.directive.ts","../../../../../packages/@ng-atomic/core/src/lib/ng-atomic-component.ts","../../../../../packages/@ng-atomic/core/src/lib/ng-atomic-core.ts"],"sourcesContent":["import { InjectionToken, Injector, Provider, inject, runInInjectionContext } from \"@angular/core\";\nimport { Action } from \"./action\";\n\nexport interface EffectProps {\n dispatch: boolean;\n scope: string;\n accessor: (action: Action) => any;\n}\n\nexport class EffectMap extends Map<string, {key: string, props: EffectProps}> {\n override get(key: string, scope = 'host'): { key: string; props: EffectProps; } {\n return super.get(this.makeKey(key, scope))!; \n }\n\n override set(key: string, value: { key: string; props: EffectProps; }): this {\n return super.set(this.makeKey(key, value.props.scope), value);\n }\n\n override has(key: string, scope = 'host'): boolean {\n return super.has(this.makeKey(key, scope));\n }\n\n private makeKey(key: string, scope = 'host') {\n return `[${scope}]#${key}`;\n }\n}\n\nexport function Effect(id: string, {\n dispatch = false,\n scope = 'host',\n accessor = (action: Action) => action.payload,\n}: Partial<EffectProps> = {}) {\n return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n target['_effectMap'] ??= new EffectMap();\n target['_effectMap'].set(id, {key: propertyKey, props: {dispatch, scope, accessor}});\n };\n}\n\nexport interface EffectFunctionOptions {\n dispatch?: boolean;\n}\n\nexport interface EffectContext {\n injector?: Injector;\n}\n\nexport type EffectFunction = (payload?: any, context?: EffectContext) => any | Promise<any>;\nexport type EffectFunctionFactory = (hostInjector?: Injector) => EffectFunction;\n\nexport interface EffectEntry {\n\tactionIds: string | string[];\n effectFactory?: EffectFunctionFactory;\n options?: EffectFunctionOptions;\n}\n\nexport const EFFECT_ENTRY = new InjectionToken<EffectEntry>('[@ng-atomic/core] EFFECT_ENTRY');\n\nexport function provideEffect(\n ActionIds: string[] | string,\n _effectFactory: (injector: Injector) => EffectFunction,\n options: EffectFunctionOptions = {dispatch: false},\n): Provider {\n\treturn {\n\t\tprovide: EFFECT_ENTRY,\n\t\tuseFactory: (injector: Injector) => {\n return {\n actionIds: ActionIds,\n effectFactory: (hostInjector: Injector) => {\n return runInInjectionContext(hostInjector, () => {\n return _effectFactory(injector);\n });\n },\n options\n };\n },\n\t\tmulti: true,\n\t\tdeps: [Injector]\n\t};\n}\n\nexport function injectEffectReducer(injector: Injector = inject(Injector)) {\n\tconst effectEntries = injector.get<EffectEntry[]>(EFFECT_ENTRY, [], { optional: true });\n const effectEntryMap = new Map<string, {effectFactory: EffectFunction, options: EffectFunctionOptions}>();\n\n for (const entry of effectEntries) {\n const ids = Array.isArray(entry.actionIds) ? entry.actionIds : [entry.actionIds];\n for (const id of ids) {\n const effectFactory = () => entry.effectFactory(injector);\n effectEntryMap.set(id, { effectFactory, options: entry.options });\n }\n }\n\n return async (action: Action, hostInjector: Injector): Promise<{dispatch: boolean}> => {\n const entry = effectEntryMap.get(action.id);\n if (entry) {\n await runInInjectionContext(hostInjector, () => {\n const effect = entry?.effectFactory();\n return effect(action.payload, { injector });\n });\n return { dispatch: false };\n }\n return { dispatch: true };\n\t}\n}\n","import { EventEmitter, inject, Injectable, Injector } from \"@angular/core\";\nimport { Action } from \"./action\";\nimport { injectEffectReducer } from \"./effect\";\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicActionLogger {\n log(action: Action, scope = 'default') {\n console.info(`[NgAtomicActionLogger] ${action?.name}`, {action, scope});\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicRootActionStore {\n protected logger = inject(NgAtomicActionLogger);\n protected readonly _actions$ = new EventEmitter<Action>();\n readonly actions$ = this._actions$.asObservable();\n\n constructor() {\n this.actions$.subscribe(action => this.logger.log(action, 'root'));\n }\n\n dispatch(action: Action) {\n this._actions$.emit(action);\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicInjectorActionStore {\n protected logger = inject(NgAtomicActionLogger);\n #rootActionStore = inject(NgAtomicRootActionStore);\n\n async dispatch(injector: Injector, action: Action, hostInjector: Injector = injector) {\n const _action = {...action, meta: { injector }};\n this.logger.log(_action, 'injector');\n\n const reducer = injectEffectReducer(injector);\n const effect = await reducer(_action, hostInjector);\n\n if (effect.dispatch) {\n const injector_ = injector.get(Injector, null, {skipSelf: true});\n if (injector_ && injector_ !== Injector.NULL) {\n await this.dispatch(injector_, _action, hostInjector);\n } else {\n await this.#rootActionStore.dispatch(_action);\n }\n }\n }\n}","import Ajv from \"ajv\";\nimport { ClassConstructor, plainToInstance } from \"class-transformer\";\nimport { validateSync } from \"class-validator\";\nimport { JsonSchema } from \"json-schema-library\";\n\nexport interface Action<T = any> {\n id: string;\n payload?: T;\n name?: string;\n icon?: string;\n color?: string;\n disabled?: boolean;\n children?: Action<T>[],\n meta?: {componentId?: string | number | null} | any;\n}\n\nexport type ActionsFactory<T = any> = (...args: any[]) => Action<T>[];\n\n/** @deprecated */\nexport type Actions = ActionsFactory | Action[];\n\nexport function resolveActions(actions: Actions, ...args: any[]) {\n if (typeof actions === 'function') {\n return actions(...args);\n }\n return actions;\n}\n\nexport function wrapActions(actions: Actions): ActionsFactory {\n return typeof actions === 'function' ? actions : () => actions;\n}\n\nexport interface CreateActionsOptions<P extends object = any> {\n validator?: (item: P) => null | string | string[];\n name?: string;\n icon?: string;\n}\n\nexport type ActionFactory<P extends object = any> = (payload?: P, meta?: CreateActionsOptions) => Action<P>;\n\nexport function createAction<P extends object = any>(\n type: string,\n schema: JsonSchema | ClassConstructor<P>,\n options: CreateActionsOptions<P> = {},\n): {validate: (item: P) => null | string | string[], create: ActionFactory<P>} { \n const defaultValidator = (item: P) => {\n if (typeof schema === 'object') {\n const _schema = {\n ...schema,\n required: schema.required.filter((key: string) => key in item),\n };\n const isValid = new Ajv().compile(_schema)(item);\n if (!isValid) return 'invalid';\n return null;\n } else {\n const errors = validateSync(plainToInstance(schema, {...item}) as object);\n if (errors.length) return 'invalid';\n return null;\n }\n }\n return {\n validate: options?.validator ?? defaultValidator,\n create: (payload: P = {} as any, meta: {name?: string, icon?: string} = {}): Action => ({\n id: type,\n payload,\n name: options.name ?? type,\n icon: options.icon,\n ...meta,\n }),\n }\n}\n","import { CreateComputedOptions, Pipe, Signal, computed, isSignal, PipeTransform } from \"@angular/core\";\n\nfunction call<T>(valueOrSignal: Signal<T> | T): T {\n return isSignal(valueOrSignal) ? call(valueOrSignal()) : valueOrSignal;\n}\n\nexport function proxyFakeComputedInputValueFn(inputValueFn: any) {\n return new Proxy(inputValueFn, {\n apply: function (target, _, args) {\n return computeFake(target(...args));\n }\n });\n}\n\nexport function computeFake<T>(valueOrFakeComputed: T): T {\n return isFakeComputed(valueOrFakeComputed) ? valueOrFakeComputed() as T : valueOrFakeComputed;\n}\n\nexport function proxyFakeComputedInputs(target: any, inputs: string[]) {\n inputs.filter(input => isSignal(target[input])).forEach(input => {\n target[input] = proxyFakeComputedInputValueFn(target[input]);\n });\n}\n\nexport const FAKE_COMPUTED = /* @__PURE__ */ Symbol('FAKE_COMPUTED');\n\nexport function compute(target: any, propName: string) {\n let inputValueFn: any;\n Object.defineProperty(target, propName, {\n get() {\n return new Proxy(inputValueFn, {\n apply: function (target, _, args) {\n const valueOrSignal: any = target(...args);\n return isSignal(valueOrSignal) ? valueOrSignal() : valueOrSignal;\n }\n });\n },\n set(value) {\n inputValueFn = value;\n },\n });\n}\n\nexport function fakeComputed<T>(computation: () => T, options?: CreateComputedOptions<T>): T {\n const _computed = computed(computation, options) as never as T;\n _computed[FAKE_COMPUTED] = true;\n return _computed;\n}\n\nexport function _computed<T>(computation: () => T, options?: CreateComputedOptions<T>): T {\n return fakeComputed(computation, options);\n}\n\nexport function isFakeComputed(_computed: any): _computed is ReturnType<typeof computed> {\n return !!_computed?.[FAKE_COMPUTED];\n}\n\n@Pipe({ name: 'call', standalone: true, pure: true})\nexport class CallPipe implements PipeTransform {\n transform<T>(value: Signal<T> | T): T {\n return call(value);\n }\n}\n","import {\n ComponentMirror, ComponentRef, DestroyRef,\n Directive,\n // ɵoutput,\n ElementRef, EmbeddedViewRef,\n InjectionToken, Injector, SimpleChange, SimpleChanges,\n Type, ViewContainerRef, inject, input, PLATFORM_ID,\n Output, EventEmitter\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { reflectComponentType, OnInit, OnChanges } from \"@angular/core\";\nimport { Action } from \"./action\";\n\nexport type TypeFactoryAsync<T> = () => Promise<Type<T>>;\n\nexport type TypeFactory<T> = () => (Type<T> | Promise<Type<T>>);\nimport { proxyFakeComputedInputs } from \"./signals\";\nimport { isPlatformBrowser } from \"@angular/common\";\n\nexport const TOKEN = 'Δtkn';\n\nexport function provideComponent<ABS = any, IMPL = any>(\n abstract: Type<ABS>,\n typeOrFactory: Type<IMPL> | TypeFactory<IMPL>,\n) {\n async function loadComponentType(): Promise<Type<IMPL>> {\n if (typeof typeOrFactory === 'function' && !typeOrFactory.prototype) {\n return await (typeOrFactory as TypeFactory<IMPL>)();\n } else {\n return typeOrFactory as Type<IMPL>;\n }\n }\n return { provide: (abstract as any)[TOKEN], useValue: loadComponentType };\n}\n\nexport function TokenizedType() {\n return function <T extends Type<any>>(type: T) {\n (type as any)[TOKEN] = new InjectionToken<T>(type.name);\n };\n}\n\nexport function getToken(type: Type<any>) {\n return (type as any)[TOKEN];\n}\n\nexport enum HostType {\n Dir = 'ɵdir',\n Cmp = 'ɵcmp',\n}\n\ntype IO = {propName: string, templateName: string};\n\nexport function getMeta<T>(type: Type<T>) {\n if (HostType.Cmp in type) {\n return type[HostType.Cmp];\n } else if (HostType.Dir in type) {\n return type[HostType.Dir];\n }\n}\n\nexport function getInputs<T>(type: Type<T>): IO[] {\n const meta = getMeta(type);\n return Object.entries<string>(meta['inputs'])\n .map(([templateName, [propName]]) => ({propName, templateName}));\n}\n\nexport function getOutputs<T>(type: Type<T>): IO[] {\n const meta = getMeta(type);\n return Object.entries<string>(meta['outputs'])\n .map(([templateName, propName]) => ({propName, templateName}));\n}\n\nexport function getInputsByComponentRef<T extends {} = any>(cmp: ComponentRef<T>): IO[] {\n return getInputs(cmp.instance.constructor as Type<T>);\n}\n\nexport function getOutputsByInstance<T extends {} = any>(cmp: ComponentRef<T>): IO[] {\n return getOutputs(cmp.instance.constructor as Type<T>);\n}\n\n@Directive({\n standalone: true,\n // host: {ngSkipHydration: 'true'}\n})\nexport class InjectableComponent<T = any> implements OnInit, OnChanges {\n readonly #platformId = inject(PLATFORM_ID);\n readonly #viewContainerRef = inject(ViewContainerRef);\n readonly #injector = inject(Injector);\n readonly #destroyRef = inject(DestroyRef);\n readonly #el: ElementRef<HTMLElement> = inject(ElementRef);\n #component: ComponentRef<T> | null = null;\n #componentMirror: ComponentMirror<T> | null = null;\n\n readonly injectable = input(false, {transform: (value: any) => value === '' ? true : value});\n // readonly __action = ɵoutput<Action>({alias: 'action'});\n @Output('action') readonly __action = new EventEmitter<Action>();\n\n dispatch(action: Action) {\n this.__action.emit(action);\n }\n\n get #inputs(): IO[] {\n return getInputs(this.constructor as Type<T>);\n }\n\n get #outputs(): IO[] {\n return getOutputs(this.constructor as Type<T>);\n // const impl = this.#componentMirror!.outputs;\n // return abs.filter(abstractOutput => impl.some(implOutput => implOutput.templateName === abstractOutput.templateName));\n }\n\n #setAttribute() {\n const hostElement = (this.#component!.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n const attributes: NamedNodeMap = this.#el.nativeElement.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i)!;\n if (attr.name === 'injectable') {\n hostElement.setAttribute('injected', '');\n } else {\n hostElement.setAttribute(attr.name, attr.value);\n }\n }\n }\n\n #bindInputs() {\n for (const input of this.#inputs) {\n if (input.propName === 'injectable') continue;\n const valueOrInputValueFn = this[input.propName];\n const value = typeof valueOrInputValueFn === 'function' ? valueOrInputValueFn() : valueOrInputValueFn;\n this.#setInput(input, value);\n }\n }\n\n get propNames() {\n return this.#inputs.map(input => input.propName);\n }\n\n proxyFakeComputedInputs() {\n proxyFakeComputedInputs(this, this.propNames);\n }\n\n #bindOutputs() {\n for (const output of this.#outputs) {\n (this.#component!.instance as any)[output.propName]?.pipe(\n takeUntilDestroyed(this.#destroyRef)\n ).subscribe((value: any) => this[output.propName].emit(value));\n }\n }\n\n #bindEvents() {\n for (const name of ['click']) {\n this.#component.injector.get(ElementRef).nativeElement.addEventListener(name, (event) => {\n this.#el.nativeElement.dispatchEvent(new Event(name, {}));\n });\n }\n }\n\n #setInput(input: {propName: string, templateName: string}, value: any) {\n this.#component!.setInput(input?.templateName, value);\n }\n \n constructor() {\n this.proxyFakeComputedInputs();\n }\n\n ngOnInit() {\n if (this.injectable() && isPlatformBrowser(this.#platformId)) {\n this.#injector.get<TypeFactoryAsync<T>>(getToken(this.constructor as any))().then(type => {\n this.#component = this.#viewContainerRef.createComponent(type, {\n projectableNodes: [\n Array.from(this.#el.nativeElement.childNodes)\n ],\n });\n this.#componentMirror = reflectComponentType(type);\n this.#bindInputs();\n this.#bindOutputs();\n this.#bindEvents();\n this.#setAttribute();\n // this.#viewContainerRef.remove(0);\n this.#component.changeDetectorRef.detectChanges();\n this.#el.nativeElement.style.display = 'none';\n // this.#el.nativeElement.remove();\n });\n }\n this.proxyFakeComputedInputs();\n }\n\n ngOnChanges(simpleChanges: SimpleChanges) {\n if (this.injectable() && this.#componentMirror) {\n for (const input of this.#inputs) {\n if (input.propName === 'injectable') return;\n const change = simpleChanges[input.propName] as SimpleChange;\n if (change) {\n this.#setInput(input, change.currentValue);\n }\n }\n }\n }\n}\n","import { InputSignal, Signal } from '@angular/core';\nimport { SIGNAL, SignalNode, signalSetFn } from '@angular/core/primitives/signals';\n\ninterface InputSignalNode<T, TransformT> extends SignalNode<T> {\n /**\n * User-configured transform that will run whenever a new value is applied\n * to the input signal node.\n */\n transformFn: ((value: TransformT) => T) | undefined;\n\n /**\n * Applies a new value to the input signal. Expects transforms to be run\n * manually before.\n *\n * This function is called by the framework runtime code whenever a binding\n * changes. The value can in practice be anything at runtime, but for typing\n * purposes we assume it's a valid `T` value. Type-checking will enforce that.\n */\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;\n}\n\nfunction applyValueToInputField<T>(\n instance: T,\n inputSignalNode: null | InputSignalNode<unknown, unknown>,\n privateName: string,\n value: unknown,\n) {\n if (inputSignalNode !== null) {\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n (instance as any)[privateName] = value;\n }\n}\n\ntype InputSignalType<T> = T extends InputSignal<infer U> ? U : never;\n\nexport function applyToInput<T, K extends keyof T>(\n instance: T,\n propName: K,\n value: InputSignalType<T[K]>,\n) {\n\tconst inputSignalNode = (instance as any)[propName][SIGNAL] as InputSignalNode<unknown, unknown>;\n\tif (inputSignalNode !== null) {\n\t\tinputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n\t} else {\n\t\t(instance as any)[propName] = value;\n\t}\n}\n\nexport function updateInput<T, K extends keyof T>(\n instance: T,\n propName: K,\n updater: (value: InputSignalType<T[K]>) => InputSignalType<T[K]>,\n) {\n const inputSignalNode = (instance as any)[propName][SIGNAL] as InputSignalNode<unknown, unknown>;\n if (inputSignalNode !== null) {\n const value = updater((instance as any)[propName]());\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n (instance as any)[propName] = updater((instance as any)[propName]);\n }\n}\n","import { LoadChildrenCallback, Route, Routes } from '@angular/router';\nimport { isObservable, lastValueFrom } from 'rxjs';\n\nexport async function wrapLoadChildren(\n loadChildrenCallback: LoadChildrenCallback\n): Promise<Routes> {\n const children = await loadChildrenCallback();\n const _children = isObservable(children) ? await lastValueFrom(children) : children;\n const __children = 'default' in _children ? _children.default : _children;\n return __children as never as Promise<Routes>;\n}\n\nexport function recursiveWrapRoute(route: Route, ...wrappers: ((route: Route) => Route)[]): Route {\n const wrappedRoute = wrappers.reduce((acc, wrapper) => wrapper(acc), route);\n return {\n ...wrappedRoute,\n children: wrappedRoute.children \n ? recursiveWrapRoutes(wrappedRoute.children, ...wrappers)\n : undefined,\n loadChildren: wrappedRoute.loadChildren \n ? () => wrapLoadChildren(wrappedRoute.loadChildren).then(routes => recursiveWrapRoutes(routes, ...wrappers))\n : undefined,\n };\n}\n\nexport function recursiveWrapRoutes(routes: Routes, ...wrappers: ((route: Route) => Route)[]): Routes {\n return routes.map(route => recursiveWrapRoute(route, ...wrappers));\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport const NG_ATOMIC_DEBUG = new InjectionToken<boolean>('NG_ATOMIC_DEBUG');\nexport function withNgAtomicDebug() {\n return {provide: NG_ATOMIC_DEBUG, useValue: true};\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, inject, OnInit, input } from '@angular/core';\nimport { NG_ATOMIC_DEBUG } from '../ng-atomic-debug';\n\nconst DEBUG_CONFIG = {\n outline: '1px',\n colors: {\n 'templates': '#f00',\n 'organisms': '#0f0',\n 'molecules': '#00f',\n 'atoms': '#ff0',\n 'frames': 'transparent',\n 'default': '#000',\n },\n excludes: ['frames', 'app', 'pages', 'atoms'],\n};\n\nfunction getType(element: HTMLElement): string {\n return element.tagName.toLowerCase().split('-')[0];\n}\n\nfunction getName(element: HTMLElement): string {\n return element.tagName.toLowerCase();\n}\n\nfunction getLabel(element: HTMLElement): string {\n const name = getName(element);\n const type = getType(element);\n if (DEBUG_CONFIG.excludes.includes(type)) return;\n return `${name}${element.hasAttribute('injected') ? '[injected]' : ''}`;\n}\n\n@Directive({standalone: true, selector: 'debug'})\nexport class DebugDirective implements OnInit {\n protected el: ElementRef<HTMLElement> = inject(ElementRef);\n protected platformId = inject(PLATFORM_ID);\n protected isDebug = input(inject(NG_ATOMIC_DEBUG, {optional: true}) ?? false);\n protected label = input(getLabel(this.el.nativeElement));\n\n ngOnInit() {\n if (isPlatformBrowser(this.platformId) && this.isDebug()) {\n const type = getType(this.el.nativeElement);\n const color = DEBUG_CONFIG.colors?.[type] ?? DEBUG_CONFIG.colors.default;\n this.createLabelElement({ label: this.label(), color });\n this.createOutline(color);\n }\n }\n\n protected createLabelElement(options: {\n label: string\n color: string\n }) {\n const el = document.createElement('span');\n el.textContent = options.label;\n el.style.backgroundColor = `${options.color}`;\n el.style.color = '#fff';\n el.style.padding = '2px 4px';\n el.style.position = 'absolute';\n el.style.fontSize = '10px';\n el.style.top = '0';\n el.style.left = '0';\n el.style.zIndex = '9999';\n el.style.lineHeight = '1.5em';\n el.style.whiteSpace = 'nowrap';\n this.el.nativeElement.appendChild(el);\n }\n\n protected createOutline(color: string) {\n this.el.nativeElement.style.outline = `${DEBUG_CONFIG.outline} solid ${color}`;\n this.el.nativeElement.style.outlineOffset = '-1px';\n this.el.nativeElement.style.position = 'relative';\n }\n}","import { ApplicationRef, DestroyRef, Directive, ElementRef, inject, Injector } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { Action } from \"./action\";\nimport { InjectableComponent } from \"./injectable-component\";\nimport { EffectMap } from \"./effect\";\nimport { NgAtomicActionLogger, NgAtomicInjectorActionStore, NgAtomicRootActionStore } from \"./action-store\";\nimport { DebugDirective } from './debug';\nimport { ActivatedRoute } from \"@angular/router\";\n\n\nfunction injectIsRouteComponent(component) {\n const route = inject(ActivatedRoute);\n const currentComponent = route.snapshot.component;\n return currentComponent === component.constructor;\n}\n\n@Directive({\n standalone: true,\n hostDirectives: [\n DebugDirective,\n ],\n})\nexport class NgAtomicComponent<T = any> extends InjectableComponent<T> {\n #rootActionStore = inject(NgAtomicRootActionStore);\n #injectorActionStore = inject(NgAtomicInjectorActionStore);\n #destroyRef = inject(DestroyRef);\n #el = inject(ElementRef);\n #injector = inject(Injector);\n #logger = inject(NgAtomicActionLogger);\n #isRouteComponent = injectIsRouteComponent(this);\n #appRef = inject(ApplicationRef);\n __injector = inject(Injector);\n\n get selector() {\n return this.#el.nativeElement.tagName.toLowerCase();\n }\n\n get #isBootstrapComponent() {\n return this.#appRef.components.some(component => component.instance === this);\n }\n\n constructor() {\n super();\n this.#rootActionStore.actions$.pipe(\n takeUntilDestroyed(this.#destroyRef),\n ).subscribe(action => this.effect(action, 'root'));\n }\n\n async dispatch(\n action: Action,\n scope = 'host',\n componentId: string | number | null = null,\n ) {\n const _action = {...action, meta: { componentId, selector: this.selector }};\n this.#logger.log(_action, scope);\n const dispatch = await this.effect(_action, scope);\n\n if (dispatch) {\n if (scope === 'root') {\n return this.#rootActionStore.dispatch(_action);\n } else if (this.#isRouteComponent || this.#isBootstrapComponent) {\n return this.#injectorActionStore.dispatch(this.#injector, _action);\n } else {\n return super.dispatch(_action);\n }\n }\n }\n\n protected async effect(action: Action, scope = 'host'): Promise<boolean> {\n // MEMO(@nontangent): _effectMapをpropertyに持つとEffectが機能しなくなる\n const effectMap: EffectMap = (this['_effectMap'] ?? new EffectMap());\n const effect = effectMap.get(action.id, scope);\n if (effect?.key && effect?.props?.scope === scope) {\n await this[effect.key](effect.props.accessor(action));\n return !!effect?.props?.dispatch;\n }\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DebugDirective"],"mappings":";;;;;;;;;;;AASM,MAAO,SAAU,SAAQ,GAA8C,CAAA;AAClE,IAAA,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,MAAM,EAAA;AACtC,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAE;;IAGpC,GAAG,CAAC,GAAW,EAAE,KAA2C,EAAA;AACnE,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;;AAGtD,IAAA,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,MAAM,EAAA;AACtC,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;;AAGpC,IAAA,OAAO,CAAC,GAAW,EAAE,KAAK,GAAG,MAAM,EAAA;AACzC,QAAA,OAAO,CAAI,CAAA,EAAA,KAAK,CAAK,EAAA,EAAA,GAAG,EAAE;;AAE7B;AAEK,SAAU,MAAM,CAAC,EAAU,EAAE,EACjC,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,MAAM,EACd,QA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;AACpE,QAAA,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC;AAC9C,QAAA,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,EAAE;AACjD,YAAA,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrD,YAAA,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ;;AAElC,QAAA,OAAO,IAAI;;uGAtDF,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,cAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;wBACd,cAAc;AACf,qBAAA;AACF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-atomic-core.mjs","sources":["../../../../../packages/@ng-atomic/core/src/lib/effect.ts","../../../../../packages/@ng-atomic/core/src/lib/action-store.ts","../../../../../packages/@ng-atomic/core/src/lib/action.ts","../../../../../packages/@ng-atomic/core/src/lib/signals.ts","../../../../../packages/@ng-atomic/core/src/lib/injectable-component.ts","../../../../../packages/@ng-atomic/core/src/lib/input.ts","../../../../../packages/@ng-atomic/core/src/lib/route.ts","../../../../../packages/@ng-atomic/core/src/lib/ng-atomic-debug.ts","../../../../../packages/@ng-atomic/core/src/lib/debug/debug.directive.ts","../../../../../packages/@ng-atomic/core/src/lib/ng-atomic-component.ts","../../../../../packages/@ng-atomic/core/src/lib/ng-atomic-core.ts"],"sourcesContent":["import { InjectionToken, Injector, Provider, inject, runInInjectionContext } from \"@angular/core\";\nimport { Action } from \"./action\";\n\nexport interface EffectProps {\n dispatch: boolean;\n scope: string;\n accessor: (action: Action) => any;\n}\n\nexport class EffectMap extends Map<string, {key: string, props: EffectProps}> {\n override get(key: string, scope = 'host'): { key: string; props: EffectProps; } {\n return super.get(this.makeKey(key, scope))!; \n }\n\n override set(key: string, value: { key: string; props: EffectProps; }): this {\n return super.set(this.makeKey(key, value.props.scope), value);\n }\n\n override has(key: string, scope = 'host'): boolean {\n return super.has(this.makeKey(key, scope));\n }\n\n private makeKey(key: string, scope = 'host') {\n return `[${scope}]#${key}`;\n }\n}\n\nexport function Effect(id: string, {\n dispatch = false,\n scope = 'host',\n accessor = (action: Action) => action.payload,\n}: Partial<EffectProps> = {}) {\n return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n target['_effectMap'] ??= new EffectMap();\n target['_effectMap'].set(id, {key: propertyKey, props: {dispatch, scope, accessor}});\n };\n}\n\nexport interface EffectFunctionOptions {\n dispatch?: boolean;\n}\n\nexport interface EffectContext {\n injector?: Injector;\n}\n\nexport type EffectFunction = (payload?: any, context?: EffectContext) => any | Promise<any>;\nexport type EffectFunctionFactory = (hostInjector?: Injector) => EffectFunction;\n\nexport interface EffectEntry {\n\tactionIds: string | string[];\n effectFactory?: EffectFunctionFactory;\n options?: EffectFunctionOptions;\n}\n\nexport const EFFECT_ENTRY = new InjectionToken<EffectEntry>('[@ng-atomic/core] EFFECT_ENTRY');\n\nexport function provideEffect(\n ActionIds: string[] | string,\n _effectFactory: (injector: Injector) => EffectFunction,\n options: EffectFunctionOptions = {dispatch: false},\n): Provider {\n\treturn {\n\t\tprovide: EFFECT_ENTRY,\n\t\tuseFactory: (injector: Injector) => {\n return {\n actionIds: ActionIds,\n effectFactory: (hostInjector: Injector) => {\n return runInInjectionContext(hostInjector, () => {\n return _effectFactory(injector);\n });\n },\n options\n };\n },\n\t\tmulti: true,\n\t\tdeps: [Injector]\n\t};\n}\n\nexport function injectEffectReducer(injector: Injector = inject(Injector)) {\n\tconst effectEntries = injector.get<EffectEntry[]>(EFFECT_ENTRY, [], { optional: true });\n const effectEntryMap = new Map<string, {effectFactory: EffectFunction, options: EffectFunctionOptions}>();\n\n for (const entry of effectEntries) {\n const ids = Array.isArray(entry.actionIds) ? entry.actionIds : [entry.actionIds];\n for (const id of ids) {\n const effectFactory = () => entry.effectFactory(injector);\n effectEntryMap.set(id, { effectFactory, options: entry.options });\n }\n }\n\n return async (action: Action, hostInjector: Injector): Promise<{dispatch: boolean}> => {\n const entry = effectEntryMap.get(action.id);\n if (entry) {\n await runInInjectionContext(hostInjector, () => {\n const effect = entry?.effectFactory();\n return effect(action.payload, { injector });\n });\n return { dispatch: false };\n }\n return { dispatch: true };\n\t}\n}\n","import { EventEmitter, inject, Injectable, Injector } from \"@angular/core\";\nimport { Action } from \"./action\";\nimport { injectEffectReducer } from \"./effect\";\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicActionLogger {\n log(action: Action, scope = 'default') {\n console.info(`[NgAtomicActionLogger] ${action?.name}`, {action, scope});\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicRootActionStore {\n protected logger = inject(NgAtomicActionLogger);\n protected readonly _actions$ = new EventEmitter<Action>();\n readonly actions$ = this._actions$.asObservable();\n\n constructor() {\n this.actions$.subscribe(action => this.logger.log(action, 'root'));\n }\n\n dispatch(action: Action) {\n this._actions$.emit(action);\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class NgAtomicInjectorActionStore {\n protected logger = inject(NgAtomicActionLogger);\n #rootActionStore = inject(NgAtomicRootActionStore);\n\n async dispatch(injector: Injector, action: Action, hostInjector: Injector = injector) {\n const _action = {...action, meta: { injector }};\n this.logger.log(_action, 'injector');\n\n const reducer = injectEffectReducer(injector);\n const effect = await reducer(_action, hostInjector);\n\n if (effect.dispatch) {\n const injector_ = injector.get(Injector, null, {skipSelf: true});\n if (injector_ && injector_ !== Injector.NULL) {\n await this.dispatch(injector_, _action, hostInjector);\n } else {\n await this.#rootActionStore.dispatch(_action);\n }\n }\n }\n}","import Ajv from \"ajv\";\nimport { ClassConstructor, plainToInstance } from \"class-transformer\";\nimport { validateSync } from \"class-validator\";\nimport { JsonSchema } from \"json-schema-library\";\n\nexport interface Action<T = any> {\n id: string;\n payload?: T;\n name?: string;\n icon?: string;\n color?: string;\n disabled?: boolean;\n children?: Action<T>[],\n meta?: {componentId?: string | number | null} | any;\n}\n\nexport type ActionsFactory<T = any> = (...args: any[]) => Action<T>[];\n\n/** @deprecated */\nexport type Actions = ActionsFactory | Action[];\n\nexport function resolveActions(actions: Actions, ...args: any[]) {\n if (typeof actions === 'function') {\n return actions(...args);\n }\n return actions;\n}\n\nexport function wrapActions(actions: Actions): ActionsFactory {\n return typeof actions === 'function' ? actions : () => actions;\n}\n\nexport interface CreateActionsOptions<P extends object = any> {\n validator?: (item: P) => null | string | string[];\n name?: string;\n icon?: string;\n}\n\nexport type ActionFactory<P extends object = any> = (payload?: P, meta?: CreateActionsOptions) => Action<P>;\n\nexport function createAction<P extends object = any>(\n type: string,\n schema: JsonSchema | ClassConstructor<P>,\n options: CreateActionsOptions<P> = {},\n): {validate: (item: P) => null | string | string[], create: ActionFactory<P>} { \n const defaultValidator = (item: P) => {\n if (typeof schema === 'object') {\n const _schema = {\n ...schema,\n required: schema.required.filter((key: string) => key in item),\n };\n const isValid = new Ajv().compile(_schema)(item);\n if (!isValid) return 'invalid';\n return null;\n } else {\n const errors = validateSync(plainToInstance(schema, {...item}) as object);\n if (errors.length) return 'invalid';\n return null;\n }\n }\n return {\n validate: options?.validator ?? defaultValidator,\n create: (payload: P = {} as any, meta: {name?: string, icon?: string} = {}): Action => ({\n id: type,\n payload,\n name: options.name ?? type,\n icon: options.icon,\n ...meta,\n }),\n }\n}\n","import { CreateComputedOptions, Pipe, Signal, computed, isSignal, PipeTransform } from \"@angular/core\";\n\nfunction call<T>(valueOrSignal: Signal<T> | T): T {\n return isSignal(valueOrSignal) ? call(valueOrSignal()) : valueOrSignal;\n}\n\nexport function proxyFakeComputedInputValueFn(inputValueFn: any) {\n return new Proxy(inputValueFn, {\n apply: function (target, _, args) {\n return computeFake(target(...args));\n }\n });\n}\n\nexport function computeFake<T>(valueOrFakeComputed: T): T {\n return isFakeComputed(valueOrFakeComputed) ? valueOrFakeComputed() as T : valueOrFakeComputed;\n}\n\nexport function proxyFakeComputedInputs(target: any, inputs: string[]) {\n inputs.filter(input => isSignal(target[input])).forEach(input => {\n target[input] = proxyFakeComputedInputValueFn(target[input]);\n });\n}\n\nexport const FAKE_COMPUTED = /* @__PURE__ */ Symbol('FAKE_COMPUTED');\n\nexport function compute(target: any, propName: string) {\n let inputValueFn: any;\n Object.defineProperty(target, propName, {\n get() {\n return new Proxy(inputValueFn, {\n apply: function (target, _, args) {\n const valueOrSignal: any = target(...args);\n return isSignal(valueOrSignal) ? valueOrSignal() : valueOrSignal;\n }\n });\n },\n set(value) {\n inputValueFn = value;\n },\n });\n}\n\nexport function fakeComputed<T>(computation: () => T, options?: CreateComputedOptions<T>): T {\n const _computed = computed(computation, options) as never as T;\n _computed[FAKE_COMPUTED] = true;\n return _computed;\n}\n\nexport function _computed<T>(computation: () => T, options?: CreateComputedOptions<T>): T {\n return fakeComputed(computation, options);\n}\n\nexport function isFakeComputed(_computed: any): _computed is ReturnType<typeof computed> {\n return !!_computed?.[FAKE_COMPUTED];\n}\n\n@Pipe({ name: 'call', standalone: true, pure: true})\nexport class CallPipe implements PipeTransform {\n transform<T>(value: Signal<T> | T): T {\n return call(value);\n }\n}\n","import {\n ComponentMirror, ComponentRef, DestroyRef,\n Directive,\n // ɵoutput,\n ElementRef, EmbeddedViewRef,\n InjectionToken, Injector, SimpleChange, SimpleChanges,\n Type, ViewContainerRef, inject, input, PLATFORM_ID,\n Output, EventEmitter\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { reflectComponentType, OnInit, OnChanges } from \"@angular/core\";\nimport { Action } from \"./action\";\n\nexport type TypeFactoryAsync<T> = () => Promise<Type<T>>;\n\nexport type TypeFactory<T> = () => (Type<T> | Promise<Type<T>>);\nimport { proxyFakeComputedInputs } from \"./signals\";\nimport { isPlatformBrowser } from \"@angular/common\";\n\nexport const TOKEN = 'Δtkn';\n\nexport function provideComponent<ABS = any, IMPL = any>(\n abstract: Type<ABS>,\n typeOrFactory: Type<IMPL> | TypeFactory<IMPL>,\n) {\n async function loadComponentType(): Promise<Type<IMPL>> {\n if (typeof typeOrFactory === 'function' && !typeOrFactory.prototype) {\n return await (typeOrFactory as TypeFactory<IMPL>)();\n } else {\n return typeOrFactory as Type<IMPL>;\n }\n }\n return { provide: (abstract as any)[TOKEN], useValue: loadComponentType };\n}\n\nexport function TokenizedType() {\n return function <T extends Type<any>>(type: T) {\n (type as any)[TOKEN] = new InjectionToken<T>(type.name);\n };\n}\n\nexport function getToken(type: Type<any>) {\n return (type as any)[TOKEN];\n}\n\nexport enum HostType {\n Dir = 'ɵdir',\n Cmp = 'ɵcmp',\n}\n\ntype IO = {propName: string, templateName: string};\n\nexport function getMeta<T>(type: Type<T>) {\n if (HostType.Cmp in type) {\n return type[HostType.Cmp];\n } else if (HostType.Dir in type) {\n return type[HostType.Dir];\n }\n}\n\nexport function getInputs<T>(type: Type<T>): IO[] {\n const meta = getMeta(type);\n return Object.entries<string>(meta['inputs'])\n .map(([templateName, [propName]]) => ({propName, templateName}));\n}\n\nexport function getOutputs<T>(type: Type<T>): IO[] {\n const meta = getMeta(type);\n return Object.entries<string>(meta['outputs'])\n .map(([templateName, propName]) => ({propName, templateName}));\n}\n\nexport function getInputsByComponentRef<T extends {} = any>(cmp: ComponentRef<T>): IO[] {\n return getInputs(cmp.instance.constructor as Type<T>);\n}\n\nexport function getOutputsByInstance<T extends {} = any>(cmp: ComponentRef<T>): IO[] {\n return getOutputs(cmp.instance.constructor as Type<T>);\n}\n\n@Directive({\n standalone: true,\n // host: {ngSkipHydration: 'true'}\n})\nexport class InjectableComponent<T = any> implements OnInit, OnChanges {\n readonly #platformId = inject(PLATFORM_ID);\n readonly #viewContainerRef = inject(ViewContainerRef);\n readonly #injector = inject(Injector);\n readonly #destroyRef = inject(DestroyRef);\n readonly #el: ElementRef<HTMLElement> = inject(ElementRef);\n #component: ComponentRef<T> | null = null;\n #componentMirror: ComponentMirror<T> | null = null;\n\n readonly injectable = input(false, {transform: (value: any) => value === '' ? true : value});\n // readonly __action = ɵoutput<Action>({alias: 'action'});\n @Output('action') readonly __action = new EventEmitter<Action>();\n\n dispatch(action: Action) {\n this.__action.emit(action);\n }\n\n get #inputs(): IO[] {\n return getInputs(this.constructor as Type<T>);\n }\n\n get #outputs(): IO[] {\n return getOutputs(this.constructor as Type<T>);\n // const impl = this.#componentMirror!.outputs;\n // return abs.filter(abstractOutput => impl.some(implOutput => implOutput.templateName === abstractOutput.templateName));\n }\n\n #setAttribute() {\n const hostElement = (this.#component!.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n const attributes: NamedNodeMap = this.#el.nativeElement.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i)!;\n if (attr.name === 'injectable') {\n hostElement.setAttribute('injected', '');\n } else {\n hostElement.setAttribute(attr.name, attr.value);\n }\n }\n }\n\n #bindInputs() {\n for (const input of this.#inputs) {\n if (input.propName === 'injectable') continue;\n const valueOrInputValueFn = this[input.propName];\n const value = typeof valueOrInputValueFn === 'function' ? valueOrInputValueFn() : valueOrInputValueFn;\n this.#setInput(input, value);\n }\n }\n\n get propNames() {\n return this.#inputs.map(input => input.propName);\n }\n\n proxyFakeComputedInputs() {\n proxyFakeComputedInputs(this, this.propNames);\n }\n\n #bindOutputs() {\n for (const output of this.#outputs) {\n (this.#component!.instance as any)[output.propName]?.pipe(\n takeUntilDestroyed(this.#destroyRef)\n ).subscribe((value: any) => this[output.propName].emit(value));\n }\n }\n\n #bindEvents() {\n for (const name of ['click']) {\n this.#component.injector.get(ElementRef).nativeElement.addEventListener(name, (event) => {\n this.#el.nativeElement.dispatchEvent(new Event(name, {}));\n });\n }\n }\n\n #setInput(input: {propName: string, templateName: string}, value: any) {\n this.#component!.setInput(input?.templateName, value);\n }\n \n constructor() {\n this.proxyFakeComputedInputs();\n }\n\n ngOnInit() {\n if (this.injectable() && isPlatformBrowser(this.#platformId)) {\n this.#injector.get<TypeFactoryAsync<T>>(getToken(this.constructor as any))().then(type => {\n this.#component = this.#viewContainerRef.createComponent(type, {\n projectableNodes: [\n Array.from(this.#el.nativeElement.childNodes)\n ],\n });\n this.#componentMirror = reflectComponentType(type);\n this.#bindInputs();\n this.#bindOutputs();\n this.#bindEvents();\n this.#setAttribute();\n // this.#viewContainerRef.remove(0);\n this.#component.changeDetectorRef.detectChanges();\n this.#el.nativeElement.style.display = 'none';\n // this.#el.nativeElement.remove();\n });\n }\n this.proxyFakeComputedInputs();\n }\n\n ngOnChanges(simpleChanges: SimpleChanges) {\n if (this.injectable() && this.#componentMirror) {\n for (const input of this.#inputs) {\n if (input.propName === 'injectable') return;\n const change = simpleChanges[input.propName] as SimpleChange;\n if (change) {\n this.#setInput(input, change.currentValue);\n }\n }\n }\n }\n}\n","import { InputSignal, Signal } from '@angular/core';\nimport { SIGNAL, SignalNode, signalSetFn } from '@angular/core/primitives/signals';\n\ninterface InputSignalNode<T, TransformT> extends SignalNode<T> {\n /**\n * User-configured transform that will run whenever a new value is applied\n * to the input signal node.\n */\n transformFn: ((value: TransformT) => T) | undefined;\n\n /**\n * Applies a new value to the input signal. Expects transforms to be run\n * manually before.\n *\n * This function is called by the framework runtime code whenever a binding\n * changes. The value can in practice be anything at runtime, but for typing\n * purposes we assume it's a valid `T` value. Type-checking will enforce that.\n */\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;\n}\n\nfunction applyValueToInputField<T>(\n instance: T,\n inputSignalNode: null | InputSignalNode<unknown, unknown>,\n privateName: string,\n value: unknown,\n) {\n if (inputSignalNode !== null) {\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n (instance as any)[privateName] = value;\n }\n}\n\ntype InputSignalType<T> = T extends InputSignal<infer U> ? U : never;\n\nexport function applyToInput<T, K extends keyof T>(\n instance: T,\n propName: K,\n value: InputSignalType<T[K]>,\n) {\n\tconst inputSignalNode = (instance as any)[propName][SIGNAL] as InputSignalNode<unknown, unknown>;\n\tif (inputSignalNode !== null) {\n\t\tinputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n\t} else {\n\t\t(instance as any)[propName] = value;\n\t}\n}\n\nexport function updateInput<T, K extends keyof T>(\n instance: T,\n propName: K,\n updater: (value: InputSignalType<T[K]>) => InputSignalType<T[K]>,\n) {\n const inputSignalNode = (instance as any)[propName][SIGNAL] as InputSignalNode<unknown, unknown>;\n if (inputSignalNode !== null) {\n const value = updater((instance as any)[propName]());\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n (instance as any)[propName] = updater((instance as any)[propName]);\n }\n}\n","import { LoadChildrenCallback, Route, Routes } from '@angular/router';\nimport { isObservable, lastValueFrom } from 'rxjs';\n\nexport async function wrapLoadChildren(\n loadChildrenCallback: LoadChildrenCallback\n): Promise<Routes> {\n const children = await loadChildrenCallback();\n const _children = isObservable(children) ? await lastValueFrom(children) : children;\n const __children = 'default' in _children \n ? _children.default\n : 'routes' in _children\n ? _children.routes\n : _children;\n return __children as never as Promise<Routes>;\n}\n\nexport function recursiveWrapRoute(route: Route, ...wrappers: ((route: Route) => Route)[]): Route {\n const wrappedRoute = wrappers.reduce((acc, wrapper) => wrapper(acc), route);\n return {\n ...wrappedRoute,\n children: wrappedRoute.children \n ? recursiveWrapRoutes(wrappedRoute.children, ...wrappers)\n : undefined,\n loadChildren: wrappedRoute.loadChildren \n ? () => wrapLoadChildren(wrappedRoute.loadChildren).then(routes => recursiveWrapRoutes(routes, ...wrappers))\n : undefined,\n };\n}\n\nexport function recursiveWrapRoutes(routes: Routes, ...wrappers: ((route: Route) => Route)[]): Routes {\n console.debug('recursiveWrapRoutes:', routes); \n return routes.map(route => recursiveWrapRoute(route, ...wrappers));\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport const NG_ATOMIC_DEBUG = new InjectionToken<boolean>('NG_ATOMIC_DEBUG');\nexport function withNgAtomicDebug() {\n return {provide: NG_ATOMIC_DEBUG, useValue: true};\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, inject, OnInit, input } from '@angular/core';\nimport { NG_ATOMIC_DEBUG } from '../ng-atomic-debug';\n\nconst DEBUG_CONFIG = {\n outline: '1px',\n colors: {\n 'templates': '#f00',\n 'organisms': '#0f0',\n 'molecules': '#00f',\n 'atoms': '#ff0',\n 'frames': 'transparent',\n 'default': '#000',\n },\n excludes: ['frames', 'app', 'pages', 'atoms'],\n};\n\nfunction getType(element: HTMLElement): string {\n return element.tagName.toLowerCase().split('-')[0];\n}\n\nfunction getName(element: HTMLElement): string {\n return element.tagName.toLowerCase();\n}\n\nfunction getLabel(element: HTMLElement): string {\n const name = getName(element);\n const type = getType(element);\n if (DEBUG_CONFIG.excludes.includes(type)) return;\n return `${name}${element.hasAttribute('injected') ? '[injected]' : ''}`;\n}\n\n@Directive({standalone: true, selector: 'debug'})\nexport class DebugDirective implements OnInit {\n protected el: ElementRef<HTMLElement> = inject(ElementRef);\n protected platformId = inject(PLATFORM_ID);\n protected isDebug = input(inject(NG_ATOMIC_DEBUG, {optional: true}) ?? false);\n protected label = input(getLabel(this.el.nativeElement));\n\n ngOnInit() {\n if (isPlatformBrowser(this.platformId) && this.isDebug()) {\n const type = getType(this.el.nativeElement);\n const color = DEBUG_CONFIG.colors?.[type] ?? DEBUG_CONFIG.colors.default;\n this.createLabelElement({ label: this.label(), color });\n this.createOutline(color);\n }\n }\n\n protected createLabelElement(options: {\n label: string\n color: string\n }) {\n const el = document.createElement('span');\n el.textContent = options.label;\n el.style.backgroundColor = `${options.color}`;\n el.style.color = '#fff';\n el.style.padding = '2px 4px';\n el.style.position = 'absolute';\n el.style.fontSize = '10px';\n el.style.top = '0';\n el.style.left = '0';\n el.style.zIndex = '9999';\n el.style.lineHeight = '1.5em';\n el.style.whiteSpace = 'nowrap';\n this.el.nativeElement.appendChild(el);\n }\n\n protected createOutline(color: string) {\n this.el.nativeElement.style.outline = `${DEBUG_CONFIG.outline} solid ${color}`;\n this.el.nativeElement.style.outlineOffset = '-1px';\n this.el.nativeElement.style.position = 'relative';\n }\n}","import { ApplicationRef, DestroyRef, Directive, ElementRef, inject, Injector } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { Action } from \"./action\";\nimport { InjectableComponent } from \"./injectable-component\";\nimport { EffectMap } from \"./effect\";\nimport { NgAtomicActionLogger, NgAtomicInjectorActionStore, NgAtomicRootActionStore } from \"./action-store\";\nimport { DebugDirective } from './debug';\nimport { ActivatedRoute } from \"@angular/router\";\n\n\nfunction injectIsRouteComponent(component) {\n const route = inject(ActivatedRoute);\n const currentComponent = route.snapshot.component;\n return currentComponent === component.constructor;\n}\n\n@Directive({\n standalone: true,\n hostDirectives: [\n DebugDirective,\n ],\n})\nexport class NgAtomicComponent<T = any> extends InjectableComponent<T> {\n #rootActionStore = inject(NgAtomicRootActionStore);\n #injectorActionStore = inject(NgAtomicInjectorActionStore);\n #destroyRef = inject(DestroyRef);\n #el = inject(ElementRef);\n #injector = inject(Injector);\n #logger = inject(NgAtomicActionLogger);\n #isRouteComponent = injectIsRouteComponent(this);\n #appRef = inject(ApplicationRef);\n __injector = inject(Injector);\n\n get selector() {\n return this.#el.nativeElement.tagName.toLowerCase();\n }\n\n get #isBootstrapComponent() {\n return this.#appRef.components.some(component => component.instance === this);\n }\n\n constructor() {\n super();\n this.#rootActionStore.actions$.pipe(\n takeUntilDestroyed(this.#destroyRef),\n ).subscribe(action => this.effect(action, 'root'));\n }\n\n async dispatch(\n action: Action,\n scope = 'host',\n componentId: string | number | null = null,\n ) {\n const _action = {...action, meta: { componentId, selector: this.selector }};\n this.#logger.log(_action, scope);\n const dispatch = await this.effect(_action, scope);\n\n if (dispatch) {\n if (scope === 'root') {\n return this.#rootActionStore.dispatch(_action);\n } else if (this.#isRouteComponent || this.#isBootstrapComponent) {\n return this.#injectorActionStore.dispatch(this.#injector, _action);\n } else {\n return super.dispatch(_action);\n }\n }\n }\n\n protected async effect(action: Action, scope = 'host'): Promise<boolean> {\n // MEMO(@nontangent): _effectMapをpropertyに持つとEffectが機能しなくなる\n const effectMap: EffectMap = (this['_effectMap'] ?? new EffectMap());\n const effect = effectMap.get(action.id, scope);\n if (effect?.key && effect?.props?.scope === scope) {\n await this[effect.key](effect.props.accessor(action));\n return !!effect?.props?.dispatch;\n }\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DebugDirective"],"mappings":";;;;;;;;;;;AASM,MAAO,SAAU,SAAQ,GAA8C,CAAA;AAClE,IAAA,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,MAAM,EAAA;AACtC,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAE;;IAGpC,GAAG,CAAC,GAAW,EAAE,KAA2C,EAAA;AACnE,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;;AAGtD,IAAA,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,MAAM,EAAA;AACtC,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;;AAGpC,IAAA,OAAO,CAAC,GAAW,EAAE,KAAK,GAAG,MAAM,EAAA;AACzC,QAAA,OAA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