UNPKG

@rx-signals/angular-provider

Version:
1 lines 22.7 kB
{"version":3,"file":"rx-signals-angular-provider.mjs","sources":["../../../../projects/rx-signals/angular-provider/src/lib/rx-signals-store.module.ts","../../../../projects/rx-signals/angular-provider/src/lib/pipes/rxs-no-value-to-undefined.pipe.ts","../../../../projects/rx-signals/angular-provider/src/lib/pipes/pick.pipe.ts","../../../../projects/rx-signals/angular-provider/src/lib/pipes/any-lens-key.pipe.ts","../../../../projects/rx-signals/angular-provider/src/lib/pipes/lens-key.pipe.ts","../../../../projects/rx-signals/angular-provider/src/lib/pipes/lens.pipe.ts","../../../../projects/rx-signals/angular-provider/src/lib/directives/rxs-validation.directive.ts","../../../../projects/rx-signals/angular-provider/src/public-api.ts","../../../../projects/rx-signals/angular-provider/src/rx-signals-angular-provider.ts"],"sourcesContent":["import {\r\n EnvironmentProviders,\r\n makeEnvironmentProviders,\r\n ModuleWithProviders,\r\n NgModule\r\n} from '@angular/core';\r\nimport { Store } from '@rx-signals/store';\r\n\r\n/**\r\n * The argument type for store providers\r\n */\r\nexport type SetupWithStore = (store: Store) => void;\r\n\r\n// The root store is a singleton that should live as long as the whole application\r\n// In case other lifecycles are required (e.g. restricted to the lifecycle of\r\n// a certain module), corresponding child-stores should be derived from the\r\n// root store\r\nconst rootStore = new Store();\r\n\r\n@NgModule({\r\n providers: [{ provide: Store, useValue: rootStore }] // default to rootStore, if none of the static providers is used\r\n})\r\nexport class RxSignalsStoreModule {\r\n \r\n /**\r\n * Use withRootStore, if you want the root store (the store that shares the lifecycle of the whole application).\r\n * If your module is a lazy-loaded feature module, it will still receive the same root-store instance, if you use withRootStore.\r\n * This should be the standard case.\r\n * Pass as many setup functions as you like.\r\n *\r\n * @param {SetupWithStore[]} setups - 0 to n optional setup functions (that will be called with the store instance)\r\n * @returns {ModuleWithProviders<RxSignalsStoreModule>} the module providing the root-store\r\n */\r\n static withRootStore(...setups: SetupWithStore[]): ModuleWithProviders<RxSignalsStoreModule> {\r\n let doSetup = true;\r\n return {\r\n ngModule: RxSignalsStoreModule,\r\n providers: [{ provide: Store, useFactory: () => {\r\n // It's necessary to use a factory instead of useValue, because otherwise the doSetup block would not run in ngZone\r\n if (doSetup) {\r\n doSetup = false;\r\n setups.forEach(setup => setup(rootStore));\r\n }\r\n return rootStore;\r\n }}],\r\n };\r\n }\r\n\r\n /**\r\n * Use withChildStore, if you need a child store that is derived from the root-store.\r\n * See store.createChildStore() for further documentation on child stores.\r\n *\r\n * @param {SetupWithStore[]} setups - 0 to n optional setup functions (that will be called with the child-store instance)\r\n * @returns {ModuleWithProviders<RxSignalsStoreModule>} the module providing the child-store\r\n */\r\n static withChildStore(...setups: SetupWithStore[]): ModuleWithProviders<RxSignalsStoreModule> {\r\n let doSetup = true;\r\n const childStore = rootStore.createChildStore();\r\n return {\r\n ngModule: RxSignalsStoreModule,\r\n providers: [{ provide: Store, useFactory: () => {\r\n if (doSetup) {\r\n doSetup = false;\r\n setups.forEach(setup => setup(childStore));\r\n }\r\n return childStore;\r\n }}],\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * Use provideStore, in bootstrapApplication to provide the rx-signals root-store (the store that shares the lifecycle of the whole application).\r\n * Pass as many setup functions as you like.\r\n *\r\n * @param {SetupWithStore[]} setups - 0 to n optional setup functions (that will be called with the store instance)\r\n */\r\nexport const provideStore = (...setups: SetupWithStore[]): EnvironmentProviders => {\r\n let doSetup = true;\r\n return makeEnvironmentProviders([\r\n { provide: Store, useFactory: () => {\r\n // It's necessary to use a factory instead of useValue, because otherwise the doSetup block would not run in ngZone\r\n if (doSetup) {\r\n doSetup = false;\r\n setups.forEach(setup => setup(rootStore));\r\n }\r\n return rootStore;\r\n }}\r\n ]);\r\n};\r\n\r\n/**\r\n * Use provideChildStore, in Route.providers to provide a rx-signals child-store to the route.\r\n * See store.createChildStore() for further documentation on child stores.\r\n * Pass as many setup functions as you like.\r\n *\r\n * @param {SetupWithStore[]} setups - 0 to n optional setup functions (that will be called with the child-store instance)\r\n */\r\nexport const provideChildStore = (...setups: SetupWithStore[]): EnvironmentProviders => {\r\n let doSetup = true;\r\n const childStore = rootStore.createChildStore();\r\n return makeEnvironmentProviders([\r\n { provide: Store, useFactory: () => {\r\n // It's necessary to use a factory instead of useValue, because otherwise the doSetup block would not run in ngZone\r\n if (doSetup) {\r\n doSetup = false;\r\n setups.forEach(setup => setup(childStore));\r\n }\r\n return childStore;\r\n }}\r\n ]);\r\n};\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { isNotNoValueType, NoValueType } from '@rx-signals/store';\r\n\r\n/**\r\n * Use this pipe to transform the rx-signals NoValueType to undefined\r\n */\r\n@Pipe({\r\n name: 'rxsNoValueToUndefined',\r\n standalone: true,\r\n})\r\nexport class RxsNoValueToUndefinedPipe implements PipeTransform {\r\n transform<T>(value: T | NoValueType): T | undefined {\r\n return isNotNoValueType(value) ? value : undefined;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { PickReturn, toGetter, ToKeys } from \"@rx-signals/store\";\r\n\r\n/**\r\n * Use this pipe to get a property from a union that might contain a value with the property.\r\n * E.g., if you have a value of type `T = number | { a: string | { b: boolean } }`,\r\n * you can use `value | pick:'a' | pick:'b'` to get `boolean | undefined`.\r\n * If your IDE complains about \"Type argument cannot be inferred from usage\", the reason is, that it infers `'a'` as type `string`\r\n * and not as type `'a'`.\r\n * Future versions of Angular will hopefully treat string literals in templates as literal types (just like in code), or at least allow for casting.\r\n * As long as this is not the case, you have three options: (a) you could create a `readonly aKey: 'a' = 'a'` and use `pick:aKey`,\r\n * or (b) you create a lens `readonly myLens = getLens<T>().k('a').k('b')` and use either `myLens | lens:value`, or `value | lens:myLens`\r\n * or (c) you can use the anyLensKey pipe (that accepts any key) like `myLens | anyLensKey:'a' | anyLensKey:'b' | lens:value`, though the latter will return unknown | undefined,\r\n * while the first to options will return the correct type (boolean | undefined).\r\n *\r\n * @deprecated use LensPipe instead\r\n */\r\n@Pipe({\r\n name: 'pick',\r\n standalone: true,\r\n})\r\nexport class PickPipe implements PipeTransform {\r\n transform<T, K extends ToKeys<T>>(value: T, key: K): PickReturn<T, K> {\r\n return toGetter(value).k(key).get();\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { OptionalLens, ToLensInputType } from '@rx-signals/store';\n\n/**\n * This pipe can be used to get a new `OptionalLens<T, unknown>` from an `OptionalLens<T, P>` and a key `K`.\n * It is a workaround you can use instead of the lensKey pipe, as long as Angular does not treat string literals in\n * templates as literal types (see `LensKeyPipe` for further information).\n */\n@Pipe({\n name: 'anyLensKey',\n standalone: true,\n})\nexport class AnyLensKeyPipe implements PipeTransform {\n transform<L extends OptionalLens<any, any>, K>(l: L, k: K): OptionalLens<ToLensInputType<L>, unknown> {\n return l.k(k as any) as OptionalLens<ToLensInputType<L>, unknown>;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n OptionalLens,\n PickReturn,\n ToKeys,\n ToLensInputType,\n ToLensOutputType\n} from '@rx-signals/store';\n\n/**\n * This pipe can be used to get a new `OptionalLens<T, P[K]>` from an `OptionalLens<T, P>` and a key `K`.\n * E.g., if you have a `value` of type `T = number | { a: string | { b: boolean } }` and you have\n * a lens `myLens: OptionalLens<T, boolean> = getLens<T>().k('a).k('b)`,\n * you could use `myLens | lensKey:'a' | lensKey:'b' | lens:value` to get a result of type `boolean | undefined`.\n * If your IDE complains about \"Type argument cannot be inferred from usage\", the reason is, that it infers `'a'` as type `string`\n * and not as type `'a'`.\n * Future versions of Angular will hopefully treat string literals in templates as literal types (just like in code), or at least allow for casting.\n * As long as this is not the case, you have two options:\n * (a) you create a lens `readonly myLens = getLens<T>().k('a').k('b')` and use either `myLens | lens:value`, or `value | lens:myLens`\n * or (c) you can use the anyLensKey pipe (that accepts any key) like `myLens | anyLensKey:'a' | anyLensKey:'b' | lens:value`, though the latter will return unknown | undefined,\n * while the first to options will return the correct type (boolean | undefined).\n */\n@Pipe({\n name: 'lensKey',\n standalone: true,\n})\nexport class LensKeyPipe implements PipeTransform {\n transform<L extends OptionalLens<any, any>, K extends ToKeys<ToLensOutputType<L>>>(\n l: L,\n k: K,\n ): OptionalLens<ToLensInputType<L>, PickReturn<ToLensOutputType<L>, K>> {\n return l.k(k) as OptionalLens<ToLensInputType<L>, PickReturn<ToLensOutputType<L>, K>>;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { FromLensReturn, isOptionalLens, OptionalLens, ValueOrLens } from '@rx-signals/store';\n\n/**\n * This pipe can be used to get a value of type `P | undefined` from an `OptionalLens<T, P>`.\n * E.g., if you have a `value` of type `T = number | { a: string | { b: boolean } }` and you have\n * a lens `myLens: OptionalLens<T, boolean> = getLens<T>().k('a).k('b)`,\n * you could either use `myLens | lens:value`, or `value | lens:myLens` to get a result of type `boolean | undefined`.\n * This access is fully type-safe.\n */\n@Pipe({\n name: 'lens',\n standalone: true,\n})\nexport class LensPipe implements PipeTransform {\n transform<X, Y extends ValueOrLens<X>>(valueOrLens1: X, valueOrLens2: Y): FromLensReturn<X, Y> {\n return isOptionalLens(valueOrLens1)\n ? valueOrLens1.get(valueOrLens2)\n : (<OptionalLens<X, any>>valueOrLens2).get(valueOrLens1);\n }\n}\n","import { Directive, ElementRef, HostListener, Input, Output, Renderer2 } from '@angular/core';\nimport { isValidModelValidationResult } from '@rx-signals/store';\nimport { BehaviorSubject, first } from 'rxjs';\n\nexport type ValidationState<VR> = {\n value: VR | undefined;\n valid: boolean;\n hasFocus: boolean;\n touched: boolean;\n};\n\n/**\n * Use this directive to couple a validation result `VR` for a certain property with the corresponding\n * isValid-status and the hasFocus- and touched-status of the corresponding control.\n * The isValid-status is determined using `isValidModelValidationResult()` from rx-signals/store.\n * E.g. given a model `type Model = { name: 'string'; };` you might have the following control (showing\n * only the attributes/properties relevant to this example):\n * ```ts\n * <div>\n * <label for=\"name\">Name</label>\n * <input\n * id=\"name\"\n * [rxsValidation]=\"model.validation | pick : 'name'\"\n * #nameValidation=\"rxsValidation\"\n * />\n * </div>\n * <ng-container *ngIf=\"nameValidation.rxsValidationState | async as validation\">\n * <div *ngIf=\"!validation.valid && validation.touched\" class=\"error\">\n * {{ validation.value }}\n * </div>\n * </ng-container>\n * </div>\n * ```\n *\n * Analogously to standard Angular forms, this directive will set classes `ng-touched`, `ng-untouched`, `ng-valid` and `ng-invalid`\n * (it will not set classes for pristine- or dirty-status. cause these are attributes you can derive from your model behaviors)\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[rxsValidation]',\n exportAs: 'rxsValidation',\n standalone: true,\n})\nexport class RxsValidationDirective<VR> {\n private validationState$ = new BehaviorSubject<ValidationState<VR>>({\n value: undefined,\n valid: false,\n hasFocus: false,\n touched: false,\n });\n private hasFocus = false;\n private touched = false;\n private value: VR | undefined = undefined;\n private valid = false;\n\n @Input() set rxsValidation(validationResult: VR) {\n this.valid = isValidModelValidationResult(validationResult);\n this.value = validationResult;\n this.update();\n }\n\n @Output() readonly rxsValidationState = this.validationState$.asObservable();\n\n constructor(private el: ElementRef, private renderer: Renderer2) {\n this.update();\n }\n\n @HostListener('focusin')\n protected onGotFocus(): void {\n this.hasFocus = true;\n this.touched = true;\n this.update();\n }\n\n private update() {\n this.validationState$.pipe(first()).subscribe(state => {\n if (this.touched && state.touched !== this.touched) {\n this.renderer.removeClass(this.el.nativeElement, 'ng-untouched');\n this.renderer.addClass(this.el.nativeElement, 'ng-touched');\n } else if (!state.touched) {\n this.renderer.addClass(this.el.nativeElement, 'ng-untouched');\n }\n if (state.valid !== this.valid) {\n if (this.valid) {\n this.renderer.removeClass(this.el.nativeElement, 'ng-invalid');\n this.renderer.addClass(this.el.nativeElement, 'ng-valid');\n } else {\n this.renderer.removeClass(this.el.nativeElement, 'ng-valid');\n this.renderer.addClass(this.el.nativeElement, 'ng-invalid');\n }\n }\n if (\n state.touched !== this.touched ||\n state.valid !== this.valid ||\n state.hasFocus !== this.hasFocus ||\n state.value !== this.value\n ) {\n this.validationState$.next({\n touched: this.touched,\n hasFocus: this.hasFocus,\n valid: this.valid,\n value: this.value,\n });\n }\n });\n }\n}\n","/*\n * Public API Surface of angular-provider\n */\n\nexport * from './lib/rx-signals-store.module';\nexport * from './lib/pipes/rxs-no-value-to-undefined.pipe';\nexport * from './lib/pipes/pick.pipe';\nexport * from './lib/pipes/any-lens-key.pipe';\nexport * from './lib/pipes/lens-key.pipe';\nexport * from './lib/pipes/lens.pipe';\nexport * from './lib/directives/rxs-validation.directive';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAaA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,IAAI,KAAK,EAAE,CAAC;MAKjB,oBAAoB,CAAA;AAE/B;;;;;;;;AAQG;AACH,IAAA,OAAO,aAAa,CAAC,GAAG,MAAwB,EAAA;QAC9C,IAAI,OAAO,GAAG,IAAI,CAAC;QACnB,OAAO;AACL,YAAA,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAK;;AAE7C,wBAAA,IAAI,OAAO,EAAE;4BACX,OAAO,GAAG,KAAK,CAAC;AAChB,4BAAA,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAC3C,yBAAA;AACD,wBAAA,OAAO,SAAS,CAAC;AACnB,qBAAC,EAAC,CAAC;SACJ,CAAC;KACH;AAED;;;;;;AAMG;AACH,IAAA,OAAO,cAAc,CAAC,GAAG,MAAwB,EAAA;QAC/C,IAAI,OAAO,GAAG,IAAI,CAAC;AACnB,QAAA,MAAM,UAAU,GAAG,SAAS,CAAC,gBAAgB,EAAE,CAAC;QAChD,OAAO;AACL,YAAA,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAK;AAC7C,wBAAA,IAAI,OAAO,EAAE;4BACX,OAAO,G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