{"version":3,"file":"melodic-rx.mjs","sources":["../../../projects/melodic-rx/src/lib/injection.tokens.ts","../../../projects/melodic-rx/src/lib/services/signal-store.service.ts","../../../projects/melodic-rx/src/lib/configuration/provide-mdrx.function.ts","../../../projects/melodic-rx/src/lib/functions/create-action.function.ts","../../../projects/melodic-rx/src/lib/functions/create-app-state.function.ts","../../../projects/melodic-rx/src/lib/functions/create-reducer.function.ts","../../../projects/melodic-rx/src/lib/functions/on-action.function.ts","../../../projects/melodic-rx/src/lib/services/effects.base.class.ts","../../../projects/melodic-rx/src/melodic-rx.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ActionEffectsMap } from './types/action-effect.types';\nimport { ActionReducerMap } from './types/reducer-config.type';\nimport { State } from './types/state.type';\n\nexport const MD_INIT_STATE = new InjectionToken<State<object>>('MD_INIT_STATE');\nexport const MD_ACTION_PROVIDERS = new InjectionToken<ActionReducerMap<object>>('MD_ACTION_PROVIDERS');\nexport const MD_EFFECTS_PROVIDERS = new InjectionToken<ActionEffectsMap<object>>('MD_EFFECTS_PROVIDERS');\nexport const MD_STATE_DEBUG = new InjectionToken<boolean>('MD_STATE_DEBUG');\n","import { computed, Signal, WritableSignal, Injectable, inject, Injector } from '@angular/core';\nimport { State } from '../types/state.type';\nimport { Action, TypedAction } from '../types/action.types';\nimport { ActionEffect, ActionEffects, ActionEffectsMap } from '../types/action-effect.types';\nimport { ActionReducerMap } from '../types/reducer-config.type';\nimport { MD_INIT_STATE, MD_ACTION_PROVIDERS, MD_EFFECTS_PROVIDERS, MD_STATE_DEBUG } from '../injection.tokens';\nimport { ActionReducer } from '../types/action-reducer.type';\n\n@Injectable()\nexport class SignalStoreService<S extends object> {\n\tprivate _injector: Injector = inject(Injector);\n\tprivate _state: State<S> = inject(MD_INIT_STATE) as State<S>;\n\tprivate _reducerMap: ActionReducerMap<S> = inject(MD_ACTION_PROVIDERS) as ActionReducerMap<S>;\n\tprivate _effectMap: ActionEffectsMap<S> = inject(MD_EFFECTS_PROVIDERS) as ActionEffectsMap<S>;\n\tprivate _debug: boolean = inject(MD_STATE_DEBUG) as boolean;\n\n\tconstructor() {\n\t\tif (this._debug) {\n\t\t\tconsole.info('Melodic RX State Debugging: Enabled');\n\t\t}\n\t}\n\n\tselect<T, K extends keyof S>(key: K, selectFn: (state: S[K]) => T): Signal<T> {\n\t\treturn computed(() => {\n\t\t\treturn selectFn(this._state[key]());\n\t\t});\n\t}\n\n\tlogState(): void {\n\t\tconsole.log(this.getCurrentState());\n\t}\n\n\tdispatch<T extends string, P extends object>(action: TypedAction<T, P>): void;\n\tdispatch<K extends keyof S, T extends string, P extends object>(key: K, action: TypedAction<T, P>): void;\n\tdispatch<K extends keyof S, T extends string, P extends object>(x: K | TypedAction<T, P>, y?: TypedAction<T, P>): void {\n\t\tconst key = typeof x === 'string' ? x : undefined;\n\t\tconst action: TypedAction<T, P> = (typeof x === 'string' ? y : x) as TypedAction<T, P>;\n\n\t\tif (this._debug) {\n\t\t\tconsole.log(`Action: ${action.type}`);\n\t\t\tconsole.log(`Payload:`, action.payload);\n\t\t\tconsole.log(`Current State:`, this.getCurrentState());\n\t\t}\n\n\t\tif (key) {\n\t\t\tthis.dispatchWithKey(key, action);\n\t\t} else {\n\t\t\tthis.dispatchWithoutKey(action);\n\t\t}\n\t}\n\n\tprivate dispatchWithKey<K extends keyof S, T extends string, P extends object>(key: K, action: TypedAction<T, P>): void {\n\t\tif (!this._reducerMap[key]) {\n\t\t\tthrow new Error(`Reducer not found for key: ${key as string}`);\n\t\t}\n\n\t\tconst reducers = this._reducerMap[key].reducers;\n\n\t\tconst reducer = reducers.find((reducer) => reducer.action.type === action.type);\n\t\tif (reducer !== undefined) {\n\t\t\tconst newState = reducer.reducer(this._state[key](), action);\n\t\t\t(this._state[key] as WritableSignal<S[K]>).set(newState);\n\n\t\t\tif (this._debug) {\n\t\t\t\tconsole.log(`New State:`, this.getCurrentState());\n\t\t\t}\n\t\t}\n\n\t\tconst actionEffects: ActionEffect[] = this.getEffectsForAction(key, action);\n\t\tactionEffects.forEach((effect) => {\n\t\t\teffect.effect(action).then((newAction) => {\n\t\t\t\tif (!Array.isArray(newAction)) {\n\t\t\t\t\tnewAction = [newAction];\n\t\t\t\t}\n\n\t\t\t\tnewAction.forEach((na) => {\n\t\t\t\t\tthis.dispatch(na as TypedAction<string, object>);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate dispatchWithoutKey<T extends string, P extends object>(action: TypedAction<T, P>): void {\n\t\tconst reducerWithKey = this.getReducerForAction(action);\n\t\tif (reducerWithKey !== undefined) {\n\t\t\tconst newState = reducerWithKey.actionReducer.reducer(this._state[reducerWithKey.key](), action);\n\t\t\t(this._state[reducerWithKey.key] as WritableSignal<S[keyof S]>).set(newState);\n\n\t\t\tif (this._debug) {\n\t\t\t\tconsole.log(`New State:`, this.getCurrentState());\n\t\t\t}\n\t\t}\n\n\t\tconst effectsWithKey = this.getEffectsForAction(action);\n\t\tif (effectsWithKey !== undefined) {\n\t\t\teffectsWithKey.actionEffects.forEach((effect) => {\n\t\t\t\teffect.effect(action).then((newAction) => {\n\t\t\t\t\tif (!Array.isArray(newAction)) {\n\t\t\t\t\t\tnewAction = [newAction];\n\t\t\t\t\t}\n\n\t\t\t\t\tnewAction.forEach((na) => {\n\t\t\t\t\t\tthis.dispatch(na as TypedAction<string, object>);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate getReducerForAction<T extends string, P extends object>(\n\t\taction: TypedAction<T, P>\n\t): { key: keyof S; actionReducer: ActionReducer<S[keyof S], Action> } | undefined {\n\t\tconst keys: (keyof S)[] = Object.keys(this._reducerMap) as (keyof S)[];\n\n\t\tfor (let key of keys) {\n\t\t\tconst reducers = this._reducerMap[key]?.reducers || [];\n\t\t\tconst reducer = reducers.find((reducer) => reducer.action.type === action.type);\n\n\t\t\tif (reducer) {\n\t\t\t\treturn { key, actionReducer: reducer };\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate getEffectsForAction<T extends string, P extends object>(action: TypedAction<T, P>): { key: keyof S; actionEffects: ActionEffect[] } | undefined;\n\tprivate getEffectsForAction<K extends keyof S, T extends string, P extends object>(key: K, action: TypedAction<T, P>): ActionEffect[];\n\tprivate getEffectsForAction<K extends keyof S, T extends string, P extends object>(\n\t\tkey: K | TypedAction<T, P>,\n\t\taction?: TypedAction<T, P>\n\t): ActionEffect[] | { key: keyof S; actionEffects: ActionEffect[] } | undefined {\n\t\tif (typeof key === 'string') {\n\t\t\treturn this.getEffectsForActionWithKey(key as K, action as TypedAction<T, P>);\n\t\t} else {\n\t\t\treturn this.getEffectsForActionWithoutKey(key as TypedAction<T, P>);\n\t\t}\n\t}\n\n\tprivate getEffectsForActionWithoutKey<T extends string, P extends object>(\n\t\taction: TypedAction<T, P>\n\t): { key: keyof S; actionEffects: ActionEffect[] } | undefined {\n\t\tconst keys: (keyof S)[] = Object.keys(this._reducerMap) as (keyof S)[];\n\n\t\tfor (let key of keys) {\n\t\t\tconst effectClass = this._effectMap[key];\n\n\t\t\tif (effectClass) {\n\t\t\t\tconst effectService: ActionEffects = this._injector.get(effectClass);\n\t\t\t\tconst effects = effectService.getEffects().filter((effect) => effect.actions.some((a) => a.type === action.type));\n\n\t\t\t\tif (effects.length > 0) {\n\t\t\t\t\treturn { key, actionEffects: effects };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate getEffectsForActionWithKey<K extends keyof S, T extends string, P extends object>(key: K, action: TypedAction<T, P>): ActionEffect[] {\n\t\tconst effectClass = this._effectMap[key as keyof S];\n\t\tif (effectClass) {\n\t\t\tconst effectService: ActionEffects = this._injector.get(effectClass);\n\t\t\treturn effectService.getEffects().filter((effect) => effect.actions.some((a) => a.type === action.type));\n\t\t}\n\n\t\treturn [];\n\t}\n\n\tprivate getCurrentState(): S {\n\t\treturn Object.keys(this._state).reduce((acc, key) => {\n\t\t\tacc[key as keyof S] = this._state[key as keyof S]();\n\t\t\treturn acc;\n\t\t}, {} as S);\n\t}\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { SignalStoreService } from '../services/signal-store.service';\nimport { State } from '../types/state.type';\nimport { MD_INIT_STATE, MD_ACTION_PROVIDERS, MD_EFFECTS_PROVIDERS, MD_STATE_DEBUG } from '../injection.tokens';\nimport { ActionReducerMap, ActionEffectsMap } from '../types';\n\nexport function provideMDRX<S extends object>(\n\tinitState: State<S>,\n\tactionReducers: ActionReducerMap<S>,\n\teffects: ActionEffectsMap<S>,\n\tdebug: boolean = false\n): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\t{ provide: MD_INIT_STATE, useValue: initState },\n\t\t{ provide: MD_ACTION_PROVIDERS, useValue: actionReducers },\n\t\t{ provide: MD_EFFECTS_PROVIDERS, useValue: effects },\n\t\t{ provide: MD_STATE_DEBUG, useValue: debug },\n\t\t{ provide: SignalStoreService, useClass: SignalStoreService, deps: [MD_INIT_STATE, MD_ACTION_PROVIDERS, MD_EFFECTS_PROVIDERS] }\n\t]);\n}\n","import { TypedAction } from '../types/action.types';\n\nexport const props = <P extends object>(): (() => P) => {\n\treturn () => ({}) as P;\n};\n\nexport const createAction = <T extends string, P extends object>(type: T, payloadFn: () => P): ((payload?: P) => TypedAction<T, P>) => {\n\treturn (payload?: P) => ({ type, payload: payload || payloadFn() });\n};\n","import { signal } from '@angular/core';\nimport { State } from '../types/state.type';\n\nexport const createAppState = <P extends object>(initState: P): State<P> => {\n\tconst state: State<P> = {} as State<P>;\n\n\tObject.keys(initState).forEach((key) => {\n\t\tstate[key as keyof P] = signal(initState[key as keyof P]);\n\t});\n\n\treturn state;\n};\n","import { ActionReducer } from '../types/action-reducer.type';\nimport { Action } from '../types/action.types';\nimport { ReducerConfig } from '../types/reducer-config.type';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const createReducer = <S, K extends keyof S>(...actionReducers: ActionReducer<S[K], any>[]): ReducerConfig<S[K], Action> => {\n\treturn { reducers: actionReducers };\n};\n","import { ActionReducer } from '../types/action-reducer.type';\nimport { Action } from '../types/action.types';\n\nexport const onAction = <S, V extends Action>(action: V, reducer: (state: S, action: V) => S): ActionReducer<S, V> => {\n\treturn {\n\t\taction,\n\t\treducer\n\t};\n};\n","import { ActionEffect, ActionEffects } from '../types/action-effect.types';\nimport { Action } from '../types/action.types';\n\nexport abstract class EffectsBase implements ActionEffects {\n\tprivate _effects: ActionEffect[] = [];\n\n\tprotected addEffect(actions: Action[], effect: (action: Action) => Promise<Action | Action[]>): void {\n\t\tthis._effects.push({ actions, effect });\n\t}\n\n\tpublic getEffects(): ActionEffect[] {\n\t\treturn this._effects;\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,aAAa,GAAG,IAAI,cAAc,CAAgB,eAAe,EAAE;MACnE,mBAAmB,GAAG,IAAI,cAAc,CAA2B,qBAAqB,EAAE;MAC1F,oBAAoB,GAAG,IAAI,cAAc,CAA2B,sBAAsB,EAAE;MAC5F,cAAc,GAAG,IAAI,cAAc,CAAU,gBAAgB;;MCC7D,kBAAkB,CAAA;AACtB,IAAA,SAAS,GAAa,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvC,IAAA,MAAM,GAAa,MAAM,CAAC,aAAa,CAAa,CAAC;AACrD,IAAA,WAAW,GAAwB,MAAM,CAAC,mBAAmB,CAAwB,CAAC;AACtF,IAAA,UAAU,GAAwB,MAAM,CAAC,oBAAoB,CAAwB,CAAC;AACtF,IAAA,MAAM,GAAY,MAAM,CAAC,cAAc,CAAY,CAAC;AAE5D,IAAA,WAAA,GAAA;AACC,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AAChB,YAAA,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;SACpD;KACD;IAED,MAAM,CAAuB,GAAM,EAAE,QAA4B,EAAA;QAChE,OAAO,QAAQ,CAAC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