@dereekb/dbx-core 2.1.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/esm2020/lib/action/action.handler.mjs +3 -125
  2. package/esm2020/lib/action/action.machine.mjs +8 -7
  3. package/esm2020/lib/action/action.module.mjs +10 -10
  4. package/esm2020/lib/action/action.store.mjs +3 -3
  5. package/esm2020/lib/action/action.store.source.mjs +3 -3
  6. package/esm2020/lib/action/directive/auto/action.automodify.directive.mjs +4 -4
  7. package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +7 -6
  8. package/esm2020/lib/action/directive/context/action.directive.mjs +3 -3
  9. package/esm2020/lib/action/directive/context/action.source.directive.mjs +3 -3
  10. package/esm2020/lib/action/directive/debug/action.logger.directive.mjs +3 -3
  11. package/esm2020/lib/action/directive/map/action.map.directive.mjs +3 -3
  12. package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +3 -3
  13. package/esm2020/lib/action/directive/map/action.map.source.directive.mjs +3 -3
  14. package/esm2020/lib/action/directive/map/action.map.working.disable.directive.mjs +3 -3
  15. package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +5 -6
  16. package/esm2020/lib/action/directive/state/action.enforce.modified.directive.mjs +6 -6
  17. package/esm2020/lib/action/directive/state/action.handler.directive.mjs +10 -9
  18. package/esm2020/lib/action/directive/state/action.success.directive.mjs +23 -35
  19. package/esm2020/lib/action/directive/state/action.success.handler.directive.mjs +48 -0
  20. package/esm2020/lib/action/directive/state/action.value.directive.mjs +8 -8
  21. package/esm2020/lib/action/directive/state/action.value.stream.directive.mjs +3 -3
  22. package/esm2020/lib/action/directive/state/action.value.trigger.directive.mjs +6 -6
  23. package/esm2020/lib/action/directive/state/action.value.trigger.instance.mjs +2 -1
  24. package/esm2020/lib/action/directive/state/action.working.component.mjs +28 -22
  25. package/esm2020/lib/action/directive/state/index.mjs +2 -2
  26. package/esm2020/lib/auth/auth.module.mjs +26 -0
  27. package/esm2020/lib/auth/auth.role.any.directive.mjs +36 -0
  28. package/esm2020/lib/auth/auth.role.has.directive.mjs +36 -0
  29. package/esm2020/lib/auth/auth.state.module.mjs +28 -0
  30. package/esm2020/lib/auth/auth.state.service.mjs +23 -0
  31. package/esm2020/lib/auth/auth.user.mjs +11 -0
  32. package/esm2020/lib/auth/index.mjs +10 -0
  33. package/esm2020/lib/auth/router/auth.router.mjs +6 -0
  34. package/esm2020/lib/auth/router/auth.router.module.mjs +26 -0
  35. package/esm2020/lib/auth/router/auth.router.service.mjs +61 -0
  36. package/esm2020/lib/auth/router/index.mjs +6 -0
  37. package/esm2020/lib/auth/router/provider/uirouter/auth.hook.mjs +23 -0
  38. package/esm2020/lib/auth/router/provider/uirouter/hook.mjs +65 -0
  39. package/esm2020/lib/auth/router/provider/uirouter/index.mjs +6 -0
  40. package/esm2020/lib/auth/router/provider/uirouter/redirect.mjs +29 -0
  41. package/esm2020/lib/auth/router/provider/uirouter/role.hook.mjs +32 -0
  42. package/esm2020/lib/auth/router/provider/uirouter/state.hook.mjs +53 -0
  43. package/esm2020/lib/auth/router/state/auth.router.state.module.mjs +32 -0
  44. package/esm2020/lib/auth/router/state/effect/auth.router.state.effect.mjs +46 -0
  45. package/esm2020/lib/auth/router/state/effect/index.mjs +2 -0
  46. package/esm2020/lib/auth/router/state/index.mjs +3 -0
  47. package/esm2020/lib/auth/service/auth.service.mjs +6 -0
  48. package/esm2020/lib/auth/service/auth.service.rxjs.mjs +27 -0
  49. package/esm2020/lib/auth/service/index.mjs +3 -0
  50. package/esm2020/lib/auth/state/action/auth.action.mjs +14 -0
  51. package/esm2020/lib/auth/state/action/index.mjs +12 -0
  52. package/esm2020/lib/auth/state/action/user.action.mjs +18 -0
  53. package/esm2020/lib/auth/state/effect/auth.effect.mjs +44 -0
  54. package/esm2020/lib/auth/state/index.mjs +13 -0
  55. package/esm2020/lib/auth/state/reducer/index.mjs +23 -0
  56. package/esm2020/lib/auth/state/reducer/user.reducer.mjs +12 -0
  57. package/esm2020/lib/auth/state/state.mjs +2 -0
  58. package/esm2020/lib/button/action/action.button.directive.mjs +3 -3
  59. package/esm2020/lib/button/action/action.button.trigger.directive.mjs +3 -3
  60. package/esm2020/lib/button/button.directive.mjs +6 -6
  61. package/esm2020/lib/button/button.loading.directive.mjs +3 -3
  62. package/esm2020/lib/button/button.mjs +1 -1
  63. package/esm2020/lib/button/button.module.mjs +4 -4
  64. package/esm2020/lib/button/router/button.segue.directive.mjs +8 -4
  65. package/esm2020/lib/context/context.directive.mjs +41 -0
  66. package/esm2020/lib/context/context.mjs +22 -0
  67. package/esm2020/lib/context/context.module.mjs +28 -0
  68. package/esm2020/lib/context/context.service.mjs +29 -0
  69. package/esm2020/lib/context/index.mjs +6 -0
  70. package/esm2020/lib/context/state/action/data.action.mjs +10 -0
  71. package/esm2020/lib/context/state/action/index.mjs +7 -0
  72. package/esm2020/lib/context/state/effect/index.mjs +38 -0
  73. package/esm2020/lib/context/state/index.mjs +13 -0
  74. package/esm2020/lib/context/state/reducer/data.reducer.mjs +16 -0
  75. package/esm2020/lib/context/state/reducer/index.mjs +25 -0
  76. package/esm2020/lib/context/state/state.mjs +2 -0
  77. package/esm2020/lib/filter/action/action.filter.source.directive.mjs +3 -3
  78. package/esm2020/lib/filter/filter.abstract.connector.directive.mjs +3 -3
  79. package/esm2020/lib/filter/filter.abstract.source.directive.mjs +4 -4
  80. package/esm2020/lib/filter/filter.connector.directive.mjs +3 -3
  81. package/esm2020/lib/filter/filter.map.connector.directive.mjs +3 -3
  82. package/esm2020/lib/filter/filter.map.directive.mjs +3 -3
  83. package/esm2020/lib/filter/filter.map.instance.directive.mjs +3 -3
  84. package/esm2020/lib/filter/filter.map.source.directive.mjs +3 -3
  85. package/esm2020/lib/filter/filter.module.mjs +4 -4
  86. package/esm2020/lib/filter/filter.source.directive.mjs +3 -3
  87. package/esm2020/lib/index.mjs +6 -2
  88. package/esm2020/lib/injection/index.mjs +9 -0
  89. package/esm2020/lib/injection/injection.component.mjs +34 -0
  90. package/esm2020/lib/injection/injection.component.module.mjs +31 -0
  91. package/esm2020/lib/injection/injection.context.directive.mjs +124 -0
  92. package/esm2020/lib/injection/injection.context.forward.directive.mjs +30 -0
  93. package/esm2020/lib/injection/injection.context.mjs +18 -0
  94. package/esm2020/lib/injection/injection.directive.mjs +33 -0
  95. package/esm2020/lib/injection/injection.instance.mjs +116 -0
  96. package/esm2020/lib/injection/injection.mjs +16 -0
  97. package/esm2020/lib/ngrx/index.mjs +2 -0
  98. package/esm2020/lib/ngrx/store.lockset.mjs +64 -0
  99. package/esm2020/lib/pipe/date/date.pipe.module.mjs +4 -4
  100. package/esm2020/lib/pipe/date/datedistance.pipe.mjs +3 -3
  101. package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +3 -3
  102. package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +3 -3
  103. package/esm2020/lib/pipe/date/minutesstring.pipe.mjs +3 -3
  104. package/esm2020/lib/pipe/date/timedistance.pipe.mjs +6 -6
  105. package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +13 -5
  106. package/esm2020/lib/pipe/date/tominutes.pipe.mjs +3 -3
  107. package/esm2020/lib/pipe/index.mjs +3 -1
  108. package/esm2020/lib/pipe/misc/index.mjs +3 -0
  109. package/esm2020/lib/pipe/misc/misc.pipe.module.mjs +20 -0
  110. package/esm2020/lib/pipe/misc/prettyjson.pipe.mjs +27 -0
  111. package/esm2020/lib/pipe/pipe.module.mjs +21 -0
  112. package/esm2020/lib/router/anchor/anchor.directive.mjs +18 -5
  113. package/esm2020/lib/router/anchor/anchor.mjs +1 -1
  114. package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +8 -5
  115. package/esm2020/lib/router/router/provider/angular/angular.router.service.module.mjs +4 -4
  116. package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +32 -10
  117. package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +4 -4
  118. package/esm2020/lib/router/router/service/index.mjs +2 -1
  119. package/esm2020/lib/router/router/service/router.go.mjs +14 -0
  120. package/esm2020/lib/router/router/service/router.service.mjs +1 -1
  121. package/esm2020/lib/router/router/transition/transition.directive.mjs +7 -7
  122. package/esm2020/lib/router/router/transition/transition.watcher.directive.mjs +6 -6
  123. package/esm2020/lib/router/segue.mjs +17 -2
  124. package/esm2020/lib/storage/storage.accessor.simple.factory.mjs +3 -3
  125. package/esm2020/lib/storage/storage.module.mjs +4 -4
  126. package/esm2020/lib/subscription/subscription.directive.mjs +6 -6
  127. package/esm2020/lib/util/view.mjs +18 -2
  128. package/esm2020/lib/view/if.directive.mjs +30 -0
  129. package/esm2020/lib/view/index.mjs +2 -0
  130. package/fesm2015/dereekb-dbx-core.mjs +1672 -575
  131. package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
  132. package/fesm2020/dereekb-dbx-core.mjs +1682 -585
  133. package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
  134. package/lib/action/action.handler.d.ts +4 -72
  135. package/lib/action/action.module.d.ts +3 -3
  136. package/lib/action/directive/auto/action.automodify.directive.d.ts +1 -1
  137. package/lib/action/directive/auto/action.autotrigger.directive.d.ts +3 -3
  138. package/lib/action/directive/state/action.disabled.directive.d.ts +1 -1
  139. package/lib/action/directive/state/action.enforce.modified.directive.d.ts +3 -2
  140. package/lib/action/directive/state/action.success.directive.d.ts +9 -17
  141. package/lib/action/directive/state/action.success.handler.directive.d.ts +24 -0
  142. package/lib/action/directive/state/action.value.directive.d.ts +5 -5
  143. package/lib/action/directive/state/action.value.trigger.instance.d.ts +2 -2
  144. package/lib/action/directive/state/action.working.component.d.ts +11 -5
  145. package/lib/action/directive/state/index.d.ts +1 -1
  146. package/lib/auth/auth.module.d.ts +8 -0
  147. package/lib/auth/auth.role.any.directive.d.ts +20 -0
  148. package/lib/auth/auth.role.has.directive.d.ts +20 -0
  149. package/lib/auth/auth.state.module.d.ts +8 -0
  150. package/lib/auth/auth.state.service.d.ts +13 -0
  151. package/lib/auth/auth.user.d.ts +28 -0
  152. package/lib/auth/index.d.ts +9 -0
  153. package/lib/auth/router/auth.router.d.ts +10 -0
  154. package/lib/auth/router/auth.router.module.d.ts +9 -0
  155. package/lib/auth/router/auth.router.service.d.ts +38 -0
  156. package/lib/auth/router/index.d.ts +5 -0
  157. package/lib/auth/router/provider/uirouter/auth.hook.d.ts +18 -0
  158. package/lib/auth/router/provider/uirouter/hook.d.ts +46 -0
  159. package/lib/auth/router/provider/uirouter/index.d.ts +5 -0
  160. package/lib/auth/router/provider/uirouter/redirect.d.ts +9 -0
  161. package/lib/auth/router/provider/uirouter/role.hook.d.ts +26 -0
  162. package/lib/auth/router/provider/uirouter/state.hook.d.ts +31 -0
  163. package/lib/auth/router/state/auth.router.state.module.d.ts +14 -0
  164. package/lib/auth/router/state/effect/auth.router.state.effect.d.ts +32 -0
  165. package/lib/auth/router/state/effect/index.d.ts +1 -0
  166. package/lib/auth/router/state/index.d.ts +2 -0
  167. package/lib/auth/service/auth.service.d.ts +46 -0
  168. package/lib/auth/service/auth.service.rxjs.d.ts +18 -0
  169. package/lib/auth/service/index.d.ts +2 -0
  170. package/lib/auth/state/action/auth.action.d.ts +12 -0
  171. package/lib/auth/state/action/index.d.ts +11 -0
  172. package/lib/auth/state/action/user.action.d.ts +34 -0
  173. package/lib/auth/state/effect/auth.effect.d.ts +31 -0
  174. package/lib/auth/state/index.d.ts +12 -0
  175. package/lib/auth/state/reducer/index.d.ts +29 -0
  176. package/lib/auth/state/reducer/user.reducer.d.ts +11 -0
  177. package/lib/auth/state/state.d.ts +5 -0
  178. package/lib/button/button.d.ts +3 -3
  179. package/lib/button/router/button.segue.directive.d.ts +1 -0
  180. package/lib/context/context.d.ts +39 -0
  181. package/lib/context/context.directive.d.ts +19 -0
  182. package/lib/context/context.module.d.ts +8 -0
  183. package/lib/context/context.service.d.ts +16 -0
  184. package/lib/context/index.d.ts +5 -0
  185. package/lib/context/state/action/data.action.d.ts +13 -0
  186. package/lib/context/state/action/index.d.ts +6 -0
  187. package/lib/context/state/effect/index.d.ts +39 -0
  188. package/lib/context/state/index.d.ts +12 -0
  189. package/lib/context/state/reducer/data.reducer.d.ts +13 -0
  190. package/lib/context/state/reducer/index.d.ts +34 -0
  191. package/lib/context/state/state.d.ts +9 -0
  192. package/lib/filter/filter.abstract.source.directive.d.ts +2 -2
  193. package/lib/index.d.ts +5 -1
  194. package/lib/injection/index.d.ts +8 -0
  195. package/lib/injection/injection.component.d.ts +15 -0
  196. package/lib/injection/injection.component.module.d.ts +9 -0
  197. package/lib/injection/injection.context.d.ts +39 -0
  198. package/lib/injection/injection.context.directive.d.ts +25 -0
  199. package/lib/injection/injection.context.forward.directive.d.ts +16 -0
  200. package/lib/{injected/injected.d.ts → injection/injection.d.ts} +4 -4
  201. package/lib/injection/injection.directive.d.ts +19 -0
  202. package/lib/{injected/injected.instance.d.ts → injection/injection.instance.d.ts} +8 -8
  203. package/lib/ngrx/index.d.ts +1 -0
  204. package/lib/ngrx/store.lockset.d.ts +36 -0
  205. package/lib/pipe/index.d.ts +2 -0
  206. package/lib/pipe/misc/index.d.ts +2 -0
  207. package/lib/pipe/misc/misc.pipe.module.d.ts +7 -0
  208. package/lib/pipe/misc/prettyjson.pipe.d.ts +9 -0
  209. package/lib/pipe/pipe.module.d.ts +8 -0
  210. package/lib/router/anchor/anchor.d.ts +5 -1
  211. package/lib/router/anchor/anchor.directive.d.ts +10 -2
  212. package/lib/router/router/provider/angular/angular.router.service.d.ts +7 -5
  213. package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +11 -5
  214. package/lib/router/router/service/index.d.ts +1 -0
  215. package/lib/router/router/service/router.go.d.ts +14 -0
  216. package/lib/router/router/service/router.service.d.ts +10 -4
  217. package/lib/router/router/transition/transition.directive.d.ts +2 -2
  218. package/lib/router/router/transition/transition.watcher.directive.d.ts +1 -1
  219. package/lib/router/segue.d.ts +10 -3
  220. package/lib/util/view.d.ts +12 -0
  221. package/lib/view/if.directive.d.ts +19 -0
  222. package/lib/view/index.d.ts +1 -0
  223. package/package.json +6 -13
  224. package/esm2020/lib/action/directive/state/action.success.component.mjs +0 -50
  225. package/esm2020/lib/injected/index.mjs +0 -6
  226. package/esm2020/lib/injected/injected.component.mjs +0 -34
  227. package/esm2020/lib/injected/injected.component.module.mjs +0 -26
  228. package/esm2020/lib/injected/injected.directive.mjs +0 -33
  229. package/esm2020/lib/injected/injected.instance.mjs +0 -116
  230. package/esm2020/lib/injected/injected.mjs +0 -16
  231. package/lib/action/directive/state/action.success.component.d.ts +0 -15
  232. package/lib/injected/index.d.ts +0 -5
  233. package/lib/injected/injected.component.d.ts +0 -15
  234. package/lib/injected/injected.component.module.d.ts +0 -8
  235. package/lib/injected/injected.directive.d.ts +0 -19
@@ -0,0 +1,39 @@
1
+ import { Provider, Type } from "@angular/core";
2
+ import { DbxInjectionComponentConfig } from "./injection";
3
+ /**
4
+ * DbxInjectedViewContext showContext() configuration.
5
+ */
6
+ export interface DbxInjectionContextConfig<T = any, O = any> {
7
+ /**
8
+ * Injected config.
9
+ */
10
+ config: DbxInjectionComponentConfig<T>;
11
+ /**
12
+ * Promise used to retrieve data from the given instance.
13
+ */
14
+ use: (instance: T) => Promise<O>;
15
+ }
16
+ /**
17
+ * View that can switch to show another arbitrary view, then switch back when the promise ends.
18
+ *
19
+ * It is similar to *ngIf/*ngSwitch, but the original child content is retained instead of discarded,
20
+ * and returns once the special context is done being used.
21
+ */
22
+ export declare abstract class DbxInjectionContext {
23
+ /**
24
+ * Shows the given context until the promise ends, then displays the original content.
25
+ *
26
+ * The original content is hidden instead of removed from the context to avoid destruction of children elements.
27
+ */
28
+ abstract showContext<T = any, O = any>(config: DbxInjectionContextConfig<T>): Promise<O>;
29
+ /**
30
+ * Bails out of any current promise, if one is set.
31
+ *
32
+ * Returns true if the bail signal has been sent.
33
+ */
34
+ abstract resetContext(): boolean;
35
+ }
36
+ /**
37
+ * Allows a directive to provide a formly context and form.
38
+ */
39
+ export declare function ProvideDbxInjectionContext<T extends DbxInjectionContext>(type: Type<T>): Provider[];
@@ -0,0 +1,25 @@
1
+ import { Injector, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { DbxInjectionContext, DbxInjectionContextConfig } from './injection.context';
3
+ import { DbxInjectionComponentConfig } from './injection';
4
+ import { Maybe } from '@dereekb/util';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * DbxInjectedViewContext implementation. Acts similar to *ngIf, but instead switches to a different view without destroying the original child view.
8
+ */
9
+ export declare class DbxInjectionContextDirective<O = any> implements DbxInjectionContext {
10
+ private readonly _injector;
11
+ private readonly _templateRef;
12
+ private readonly _viewContainer;
13
+ private _currentPromise;
14
+ private _instance;
15
+ private _embeddedView;
16
+ private _isDetached;
17
+ constructor(_injector: Injector, _templateRef: TemplateRef<O>, _viewContainer: ViewContainerRef);
18
+ set config(config: Maybe<DbxInjectionComponentConfig<any>>);
19
+ ngOnInit(): void;
20
+ ngOnDestroy(): void;
21
+ showContext<T, O>(config: DbxInjectionContextConfig<T>): Promise<O>;
22
+ resetContext(): boolean;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxInjectionContextDirective<any>, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxInjectionContextDirective<any>, "[dbxInjectionContext]", never, { "config": "config"; }, {}, never>;
25
+ }
@@ -0,0 +1,16 @@
1
+ import { DbxInjectionContext, DbxInjectionContextConfig } from "./injection.context";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Abstract DbxInjectionContext implementation that forwards commands to a host DbxInjectionContext.
5
+ *
6
+ * This abstract type is used by related types for dependency injection purposes, so that those types
7
+ * can be injected instead of just any DbxInjectionContext.
8
+ */
9
+ export declare abstract class AbstractForwardDbxInjectionContextDirective implements DbxInjectionContext {
10
+ readonly dbxInjectionContext: DbxInjectionContext;
11
+ constructor(dbxInjectionContext: DbxInjectionContext);
12
+ showContext<T = any, O = any>(config: DbxInjectionContextConfig<T, any>): Promise<O>;
13
+ resetContext(): boolean;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractForwardDbxInjectionContextDirective, [{ host: true; }]>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractForwardDbxInjectionContextDirective, never, never, {}, {}, never>;
16
+ }
@@ -1,7 +1,7 @@
1
1
  import { InjectionToken, Injector, NgModuleRef, StaticProvider, TemplateRef, Type, ViewRef } from "@angular/core";
2
2
  import { Maybe } from "@dereekb/util";
3
- export declare const DBX_INJECTED_COMPONENT_DATA: InjectionToken<unknown>;
4
- export interface DbxInjectedComponentConfig<T = any> {
3
+ export declare const DBX_INJECTION_COMPONENT_DATA: InjectionToken<unknown>;
4
+ export interface DbxInjectionComponentConfig<T = any> {
5
5
  /**
6
6
  * Type of Component to initialize.
7
7
  */
@@ -27,7 +27,7 @@ export interface DbxInjectedComponentConfig<T = any> {
27
27
  */
28
28
  data?: any;
29
29
  }
30
- export interface DbxInjectedTemplateConfig<T = any> {
30
+ export interface DbxInjectionTemplateConfig<T = any> {
31
31
  /**
32
32
  * Template ref to display.
33
33
  */
@@ -43,4 +43,4 @@ export interface DbxInjectedTemplateConfig<T = any> {
43
43
  * @param configs
44
44
  * @returns
45
45
  */
46
- export declare function mergeDbxInjectedComponentConfigs(configs: Maybe<Partial<DbxInjectedComponentConfig>>[]): Partial<DbxInjectedComponentConfig>;
46
+ export declare function mergeDbxInjectionComponentConfigs(configs: Maybe<Partial<DbxInjectionComponentConfig>>[]): Partial<DbxInjectionComponentConfig>;
@@ -0,0 +1,19 @@
1
+ import { ViewContainerRef, OnInit, OnDestroy, Injector } from '@angular/core';
2
+ import { Maybe } from '@dereekb/util';
3
+ import { DbxInjectionComponentConfig, DbxInjectionTemplateConfig } from './injection';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Abstract directive that injects content based on the configuration into the view.
7
+ */
8
+ export declare abstract class AbstractDbxInjectionDirective<T> implements OnInit, OnDestroy {
9
+ private readonly _injector;
10
+ private _instance;
11
+ constructor(_injector: Injector);
12
+ ngOnInit(): void;
13
+ ngOnDestroy(): void;
14
+ setConfig(config: Maybe<DbxInjectionComponentConfig>): void;
15
+ setTemplate(template: Maybe<DbxInjectionTemplateConfig>): void;
16
+ setContent(content: Maybe<ViewContainerRef>): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxInjectionDirective<any>, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxInjectionDirective<any>, never, never, {}, {}, never>;
19
+ }
@@ -1,23 +1,23 @@
1
1
  import { ComponentRef, Injector, ViewContainerRef } from '@angular/core';
2
- import { DbxInjectedComponentConfig, DbxInjectedTemplateConfig } from './injected';
2
+ import { DbxInjectionComponentConfig, DbxInjectionTemplateConfig } from './injection';
3
3
  import { Initialized, Destroyable, Maybe } from '@dereekb/util';
4
4
  /**
5
5
  * Instance used by components to inject content based on the configuration into the view.
6
6
  */
7
- export declare class DbxInjectedComponentInstance<T> implements Initialized, Destroyable {
7
+ export declare class DbxInjectionInstance<T> implements Initialized, Destroyable {
8
8
  private readonly _injector;
9
9
  private _subscriptionObject;
10
10
  private _config;
11
11
  private _template;
12
12
  private _content;
13
13
  private _componentRef;
14
- readonly config$: import("rxjs").Observable<Maybe<DbxInjectedComponentConfig<T>>>;
15
- readonly template$: import("rxjs").Observable<Maybe<DbxInjectedTemplateConfig<T>>>;
14
+ readonly config$: import("rxjs").Observable<Maybe<DbxInjectionComponentConfig<T>>>;
15
+ readonly template$: import("rxjs").Observable<Maybe<DbxInjectionTemplateConfig<T>>>;
16
16
  readonly content$: import("rxjs").Observable<ViewContainerRef>;
17
- get config(): Maybe<DbxInjectedComponentConfig<T>>;
18
- set config(config: Maybe<DbxInjectedComponentConfig<T>>);
19
- get template(): Maybe<DbxInjectedTemplateConfig<T>>;
20
- set template(template: Maybe<DbxInjectedTemplateConfig<T>>);
17
+ get config(): Maybe<DbxInjectionComponentConfig<T>>;
18
+ set config(config: Maybe<DbxInjectionComponentConfig<T>>);
19
+ get template(): Maybe<DbxInjectionTemplateConfig<T>>;
20
+ set template(template: Maybe<DbxInjectionTemplateConfig<T>>);
21
21
  get content(): Maybe<Maybe<ViewContainerRef>>;
22
22
  set content(content: Maybe<Maybe<ViewContainerRef>>);
23
23
  get componentRef(): Maybe<ComponentRef<T>>;
@@ -0,0 +1 @@
1
+ export * from './store.lockset';
@@ -0,0 +1,36 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ComponentStore } from '@ngrx/component-store';
3
+ import { OnDestroy } from '@angular/core';
4
+ import { LockSet, ObservableOrValue } from '@dereekb/rxjs';
5
+ import { Maybe } from '@dereekb/util';
6
+ import * as i0 from "@angular/core";
7
+ export interface LockSetComponent {
8
+ readonly lockSet: LockSet;
9
+ }
10
+ export interface LockSetComponentStoreConfig {
11
+ parent?: Maybe<Observable<LockSetComponent>>;
12
+ locks?: {
13
+ [key: string]: Observable<boolean>;
14
+ };
15
+ }
16
+ /**
17
+ * Abstract ComponentStore extension that provides a LockSet and OnDestroy delaying/cleanup.
18
+ */
19
+ export declare abstract class LockSetComponentStore<S extends object> extends ComponentStore<S> implements OnDestroy {
20
+ protected readonly initialState?: S | undefined;
21
+ readonly lockSet: LockSet;
22
+ protected lockSetDestroyDelayMs: number;
23
+ protected lockSetDestroyTimeoutMs: Maybe<number>;
24
+ protected constructor(initialState?: S | undefined);
25
+ readonly resetStore: () => void;
26
+ protected setupLockSet({ parent, locks }: LockSetComponentStoreConfig): void;
27
+ setParentLockSet(obs: ObservableOrValue<Maybe<LockSetComponent>>): void;
28
+ addLock(key: string, obs: Observable<boolean>): void;
29
+ ngOnDestroy(): void;
30
+ /**
31
+ * Completes the cleanup of the object.
32
+ */
33
+ _destroyNow(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<LockSetComponentStore<any>, [{ optional: true; }]>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<LockSetComponentStore<any>>;
36
+ }
@@ -1 +1,3 @@
1
1
  export * from './date';
2
+ export * from './misc';
3
+ export * from './pipe.module';
@@ -0,0 +1,2 @@
1
+ export * from './prettyjson.pipe';
2
+ export * from './misc.pipe.module';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./prettyjson.pipe";
3
+ export declare class DbxMiscPipeModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxMiscPipeModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxMiscPipeModule, [typeof i1.PrettyJsonPipe], never, [typeof i1.PrettyJsonPipe]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxMiscPipeModule>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { Maybe } from '@dereekb/util';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PrettyJsonPipe implements PipeTransform {
5
+ static toPrettyJson(input: Maybe<any>, spacing?: number): Maybe<string>;
6
+ transform(input: Maybe<any>, spacing?: number): Maybe<string>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrettyJsonPipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<PrettyJsonPipe, "prettyjson">;
9
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./misc/misc.pipe.module";
3
+ import * as i2 from "./date/date.pipe.module";
4
+ export declare class DbxPipesModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxPipesModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxPipesModule, never, never, [typeof i1.DbxMiscPipeModule, typeof i2.DbxDatePipeModule]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxPipesModule>;
8
+ }
@@ -3,13 +3,17 @@ import { SegueRef } from '../segue';
3
3
  import { ExpandTreeFunction, FlattenTreeFunction, Maybe, TreeNode } from '@dereekb/util';
4
4
  import { Type, Provider } from '@angular/core';
5
5
  import { Observable } from 'rxjs';
6
- export interface ClickableAnchor extends ClickableFunction, ClickableUrl, SegueRef {
6
+ export interface ClickableAnchor extends ClickableFunction, ClickableUrl, Partial<SegueRef> {
7
7
  disabled?: boolean;
8
8
  }
9
9
  export interface ClickableAnchorLink extends ClickableAnchor {
10
10
  title: string;
11
11
  icon?: string;
12
12
  }
13
+ /**
14
+ * ClickableAnchorLink that definitely has a SegueRef
15
+ */
16
+ export declare type ClickableAnchorLinkSegueRef = ClickableAnchorLink & SegueRef;
13
17
  export interface ClickableIconAnchorLink extends Omit<ClickableAnchorLink, 'title'> {
14
18
  icon: string;
15
19
  }
@@ -1,20 +1,28 @@
1
1
  import { Observable } from 'rxjs';
2
+ import { OnDestroy } from '@angular/core';
2
3
  import { Maybe } from '@dereekb/util';
3
4
  import { AnchorType, ClickableAnchor, DbxAnchor } from './anchor';
5
+ import { SegueRefOrSegueRefRouterLink } from '../segue';
4
6
  import * as i0 from "@angular/core";
5
7
  /**
6
8
  * Abstract anchor directive.
7
9
  */
8
- export declare class AbstractDbxAnchorDirective<T extends ClickableAnchor = ClickableAnchor> implements DbxAnchor {
10
+ export declare class AbstractDbxAnchorDirective<T extends ClickableAnchor = ClickableAnchor> implements DbxAnchor, OnDestroy {
9
11
  private _disabled;
10
12
  private _anchor;
11
13
  readonly disabled$: Observable<Maybe<boolean>>;
12
14
  readonly anchor$: Observable<Maybe<T>>;
13
15
  readonly type$: Observable<AnchorType>;
16
+ constructor();
17
+ ngOnDestroy(): void;
18
+ /**
19
+ * Convenience input to create an Anchor from the input SegueRef.
20
+ */
21
+ set ref(ref: Maybe<SegueRefOrSegueRefRouterLink>);
14
22
  get anchor(): Maybe<T>;
15
23
  set anchor(anchor: Maybe<T>);
16
24
  get disabled(): Maybe<boolean>;
17
25
  set disabled(disabled: Maybe<boolean>);
18
26
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxAnchorDirective<any>, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxAnchorDirective<any>, never, never, { "anchor": "anchor"; "disabled": "disabled"; }, {}, never>;
27
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxAnchorDirective<any>, never, never, { "ref": "ref"; "anchor": "anchor"; "disabled": "disabled"; }, {}, never>;
20
28
  }
@@ -1,5 +1,6 @@
1
+ import { Observable } from 'rxjs';
1
2
  import { DbxRouterService, DbxRouterTransitionService } from '../../service';
2
- import { SegueRef } from "../../../segue";
3
+ import { SegueRefOrSegueRefRouterLink, SegueRefRawSegueParams } from "../../../segue";
3
4
  import { DbxRouterTransitionEvent } from "../../transition/transition";
4
5
  import { ActivatedRoute, NavigationBehaviorOptions, NavigationExtras, Router } from '@angular/router';
5
6
  import * as i0 from "@angular/core";
@@ -9,11 +10,12 @@ import * as i0 from "@angular/core";
9
10
  export declare class DbxAngularRouterService implements DbxRouterService, DbxRouterTransitionService {
10
11
  readonly router: Router;
11
12
  readonly activatedRoute: ActivatedRoute;
12
- readonly transitions$: import("rxjs").Observable<DbxRouterTransitionEvent>;
13
+ readonly params$: Observable<SegueRefRawSegueParams>;
14
+ readonly transitions$: Observable<DbxRouterTransitionEvent>;
13
15
  constructor(router: Router, activatedRoute: ActivatedRoute);
14
- go(segueRef: SegueRef<NavigationExtras | NavigationBehaviorOptions>): Promise<boolean>;
15
- isActive(segueRef: SegueRef<any>): boolean;
16
- comparePrecision(a: SegueRef, b: SegueRef): number;
16
+ go(input: SegueRefOrSegueRefRouterLink<NavigationExtras | NavigationBehaviorOptions>): Promise<boolean>;
17
+ isActive(segueRef: SegueRefOrSegueRefRouterLink): boolean;
18
+ comparePrecision(a: SegueRefOrSegueRefRouterLink, b: SegueRefOrSegueRefRouterLink): number;
17
19
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxAngularRouterService, never>;
18
20
  static ɵprov: i0.ɵɵInjectableDeclaration<DbxAngularRouterService>;
19
21
  }
@@ -1,21 +1,27 @@
1
1
  import { DbxRouterService, DbxRouterTransitionService } from '../../service';
2
- import { SegueRef } from "../../../segue";
2
+ import { SegueRefOrSegueRefRouterLink, SegueRefRawSegueParams } from "../../../segue";
3
3
  import { StateService, UIRouterGlobals, TransitionOptions, TransitionService } from '@uirouter/core';
4
+ import { OnDestroy } from "@angular/core";
4
5
  import { DbxRouterTransitionEvent } from '../../transition/transition';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * UIRouter implementation of DbxRouterService and DbxRouterTransitionService.
8
9
  */
9
- export declare class DbxUIRouterService implements DbxRouterService, DbxRouterTransitionService {
10
+ export declare class DbxUIRouterService implements DbxRouterService, DbxRouterTransitionService, OnDestroy {
10
11
  readonly state: StateService;
11
12
  readonly transitionService: TransitionService;
12
13
  readonly uiRouterGlobals: UIRouterGlobals;
14
+ private readonly _params;
15
+ readonly params$: import("rxjs").Observable<SegueRefRawSegueParams>;
13
16
  private readonly _transitions;
14
17
  readonly transitions$: import("rxjs").Observable<DbxRouterTransitionEvent>;
15
18
  constructor(state: StateService, transitionService: TransitionService, uiRouterGlobals: UIRouterGlobals);
16
- go(segueRef: SegueRef<TransitionOptions>): Promise<boolean>;
17
- isActive(segueRef: SegueRef): boolean;
18
- comparePrecision(a: SegueRef, b: SegueRef): number;
19
+ ngOnDestroy(): void;
20
+ get params(): import("@uirouter/core").StateParams;
21
+ go(input: SegueRefOrSegueRefRouterLink<TransitionOptions>): Promise<boolean>;
22
+ isActive(input: SegueRefOrSegueRefRouterLink): boolean;
23
+ comparePrecision(aInput: SegueRefOrSegueRefRouterLink, bInput: SegueRefOrSegueRefRouterLink): number;
19
24
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxUIRouterService, never>;
20
25
  static ɵprov: i0.ɵɵInjectableDeclaration<DbxUIRouterService>;
21
26
  }
27
+ export declare function readSegueRefString(input: SegueRefOrSegueRefRouterLink | string): string;
@@ -1,2 +1,3 @@
1
1
  export * from './router.service';
2
+ export * from './router.go';
2
3
  export * from './router.transition.service';
@@ -0,0 +1,14 @@
1
+ import { ObservableOrValue } from "@dereekb/rxjs";
2
+ import { SegueRef } from "../../segue";
3
+ import { DbxRouterService } from "./router.service";
4
+ /**
5
+ * Function that will perform navigation with the input route.
6
+ */
7
+ export declare type GoWithRouter = (route: ObservableOrValue<SegueRef>) => Promise<boolean>;
8
+ /**
9
+ * Creates a GoWithRouter function.
10
+ *
11
+ * @param dbxRouterService
12
+ * @returns
13
+ */
14
+ export declare function goWithRouter(dbxRouterService: DbxRouterService): (route: ObservableOrValue<SegueRef>) => Promise<boolean>;
@@ -1,20 +1,26 @@
1
- import { SegueRef } from "../../segue";
1
+ import { ObservableOrValue } from "@dereekb/rxjs";
2
+ import { Observable } from "rxjs";
3
+ import { SegueRefOrSegueRefRouterLink, SegueRefRawSegueParams } from "../../segue";
2
4
  /**
3
5
  * Router service definition that can route the app and provide routing details.
4
6
  */
5
7
  export declare abstract class DbxRouterService {
8
+ /**
9
+ * Params of the current successfully loaded route.
10
+ */
11
+ abstract readonly params$: Observable<SegueRefRawSegueParams>;
6
12
  /**
7
13
  * Navigates to the target SegueRef.
8
14
  *
9
15
  * @param segueRef
10
16
  */
11
- abstract go(segueRef: SegueRef): Promise<boolean>;
17
+ abstract go(segueRef: ObservableOrValue<SegueRefOrSegueRefRouterLink>): Promise<boolean>;
12
18
  /**
13
19
  * Returns true if the input segue ref is considered active.
14
20
  *
15
21
  * @param segueRef
16
22
  */
17
- abstract isActive(segueRef: SegueRef): boolean;
23
+ abstract isActive(segueRef: SegueRefOrSegueRefRouterLink): boolean;
18
24
  /**
19
25
  * Compares the two refs for precision for a certain route.
20
26
  *
@@ -24,5 +30,5 @@ export declare abstract class DbxRouterService {
24
30
  * @param a
25
31
  * @param b
26
32
  */
27
- abstract comparePrecision(a: SegueRef, b: SegueRef): number;
33
+ abstract comparePrecision(a: SegueRefOrSegueRefRouterLink, b: SegueRefOrSegueRefRouterLink): number;
28
34
  }
@@ -5,10 +5,10 @@ import * as i0 from "@angular/core";
5
5
  * Abstract directive that listens to onSuccess transition events and runs a function.
6
6
  */
7
7
  export declare abstract class AbstractTransitionDirective {
8
- protected readonly dbNgxRouterTransitionService: DbxRouterTransitionService;
8
+ protected readonly dbxRouterTransitionService: DbxRouterTransitionService;
9
9
  readonly transitionSuccess$: Observable<import("@dereekb/dbx-core").DbxRouterTransitionEvent>;
10
10
  readonly initAndUpdateOnTransitionSuccess$: Observable<void>;
11
- constructor(dbNgxRouterTransitionService: DbxRouterTransitionService);
11
+ constructor(dbxRouterTransitionService: DbxRouterTransitionService);
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTransitionDirective, never>;
13
13
  static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractTransitionDirective, never, never, {}, {}, never>;
14
14
  }
@@ -10,7 +10,7 @@ export declare abstract class AbstractTransitionWatcherDirective extends Abstrac
10
10
  private _transitionSub;
11
11
  ngOnInit(): void;
12
12
  ngOnDestroy(): void;
13
- constructor(dbNgxRouterTransitionService: DbxRouterTransitionService, ngZone: NgZone);
13
+ constructor(dbxRouterTransitionService: DbxRouterTransitionService, ngZone: NgZone);
14
14
  protected zoneUpdateForSuccessfulTransition(): void;
15
15
  protected abstract updateForSuccessfulTransition(): void;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTransitionWatcherDirective, never>;
@@ -1,5 +1,6 @@
1
+ import { ArrayOrValue } from '@dereekb/util';
1
2
  import { Observable } from 'rxjs';
2
- export declare type SegueRefRouterLink = string | any[] | any;
3
+ export declare type SegueRefRouterLink = string | ArrayOrValue<any>;
3
4
  export interface SegueRefRawSegueParams {
4
5
  [key: string]: any;
5
6
  }
@@ -20,9 +21,15 @@ export interface SegueRefOptions<O = any> {
20
21
  */
21
22
  export interface SegueRef<O = any> extends SegueRefOptions<O> {
22
23
  /**
23
- * UI Sref reference value.
24
+ * Ref path value.
24
25
  */
25
- ref?: SegueRefRouterLink;
26
+ ref: SegueRefRouterLink;
26
27
  }
28
+ /**
29
+ * A SegueRef object or a different router link representation.
30
+ */
31
+ export declare type SegueRefOrSegueRefRouterLink<O = any> = SegueRef<O> | SegueRefRouterLink;
32
+ export declare function isSegueRef<O = any>(input: SegueRefOrSegueRefRouterLink<O>): input is SegueRef<O>;
33
+ export declare function asSegueRef<O = any>(input: SegueRefOrSegueRefRouterLink<O>): SegueRef<O>;
27
34
  export declare function refStringToSegueRef<O = any>(ref: string, options?: SegueRefOptions<O>): SegueRef<O>;
28
35
  export declare function mapRefStringObsToSegueRefObs<O = any>(obs: Observable<string>, options?: SegueRefOptions<O>): Observable<SegueRef<O>>;
@@ -15,6 +15,18 @@ export declare function tapDetectChanges<T>(cdRef: ChangeDetectorRef, timeout?:
15
15
  * @param cdRef
16
16
  */
17
17
  export declare function safeDetectChanges(cdRef: ChangeDetectorRef): void;
18
+ /**
19
+ * Marks the ChangeDetectorRef for changes as long as the view has not been destroyed.
20
+ *
21
+ * @param cdRef
22
+ */
23
+ export declare function safeMarkForCheck(cdRef: ChangeDetectorRef): void;
24
+ /**
25
+ * Triggers a detection change on the input view as long as the view has not been destroyed.
26
+ *
27
+ * @param cdRef
28
+ */
29
+ export declare function safeUseCdRef(cdRef: ChangeDetectorRef, use: () => void): void;
18
30
  /**
19
31
  * Used to check an injected ElementRef that wraps an ng-content injection point whether or not any content was injected,
20
32
  * or more specifically if the parent component passed any target content to the child. This will still return true if
@@ -0,0 +1,19 @@
1
+ import { TemplateRef, ViewContainerRef } from "@angular/core";
2
+ import { Observable } from "rxjs";
3
+ import { AbstractSubscriptionDirective } from "../subscription";
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Abstract directive class that watches a show$ observable and behaves like *ngIf.
7
+ */
8
+ export declare abstract class AbstractIfDirective extends AbstractSubscriptionDirective {
9
+ private templateRef;
10
+ private viewContainer;
11
+ /**
12
+ * Observable that is watched for showing/hiding.
13
+ */
14
+ readonly abstract show$: Observable<boolean>;
15
+ constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef);
16
+ ngOnInit(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractIfDirective, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractIfDirective, never, never, {}, {}, never>;
19
+ }
@@ -0,0 +1 @@
1
+ export * from './if.directive';
package/package.json CHANGED
@@ -1,25 +1,18 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-core",
3
- "version": "2.1.0",
3
+ "version": "4.0.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",
7
- "rxjs": "^7.0.0",
8
- "@dereekb/util": "2.1.0",
9
- "extra-set": "^2.2.11",
10
- "make-error": "^1.3.0",
11
- "@dereekb/rxjs": "2.1.0",
12
- "ms": "^3.0.0-canary.1",
7
+ "@dereekb/rxjs": "4.0.1",
13
8
  "@ngrx/component-store": "^13.0.2",
14
9
  "@angular/platform-browser": "^13.0.0",
10
+ "@ngrx/effects": "^13.0.2",
11
+ "@ngrx/store": "^13.0.2",
12
+ "@uirouter/core": "^6.0.8",
15
13
  "date-fns": "^2.28.0",
16
- "@dereekb/date": "2.1.0",
17
- "class-transformer": "^0.5.1",
18
- "class-validator": "^0.13.2",
19
- "date-fns-tz": "^1.2.2",
20
- "rrule": "git+https://git@github.com/dereekb/rrule.git#17adf5708d6567b4d01a3a8afd106261421ea492",
14
+ "@dereekb/date": "4.0.1",
21
15
  "@angular/router": "^13.0.0",
22
- "@uirouter/core": "^6.0.8",
23
16
  "@uirouter/angular": "^9.1.0"
24
17
  },
25
18
  "dependencies": {
@@ -1,50 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { of } from 'rxjs';
3
- import { delay, exhaustMap, shareReplay, startWith } from 'rxjs/operators';
4
- import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "../../action.store.source";
7
- import * as i2 from "@angular/common";
8
- /**
9
- * Displays the input content when success is set.
10
- *
11
- * Can be configured to show for a limited time afterwards, etc.
12
- */
13
- export class DbxActionSuccessComponent {
14
- constructor(source) {
15
- this.source = source;
16
- this.show$ = this.source.isSuccess$.pipe(exhaustMap((success) => {
17
- if (success) {
18
- if (this.hideAfter) {
19
- return of(false).pipe(delay(this.hideAfter), startWith(true));
20
- }
21
- else {
22
- return of(true);
23
- }
24
- }
25
- else {
26
- return of(false);
27
- }
28
- }), shareReplay(1));
29
- }
30
- }
31
- DbxActionSuccessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxActionSuccessComponent, deps: [{ token: i1.DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Component });
32
- DbxActionSuccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: DbxActionSuccessComponent, selector: "dbx-action-success", inputs: { hideAfter: "hideAfter" }, ngImport: i0, template: `
33
- <ng-container *ngIf="show$ | async">
34
- <ng-content></ng-content>
35
- </ng-container>
36
- `, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe } });
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxActionSuccessComponent, decorators: [{
38
- type: Component,
39
- args: [{
40
- selector: 'dbx-action-success',
41
- template: `
42
- <ng-container *ngIf="show$ | async">
43
- <ng-content></ng-content>
44
- </ng-container>
45
- `
46
- }]
47
- }], ctorParameters: function () { return [{ type: i1.DbxActionContextStoreSourceInstance }]; }, propDecorators: { hideAfter: [{
48
- type: Input
49
- }] } });
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLnN1Y2Nlc3MuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZGJ4LWNvcmUvc3JjL2xpYi9hY3Rpb24vZGlyZWN0aXZlL3N0YXRlL2FjdGlvbi5zdWNjZXNzLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQzFCLE9BQU8sRUFBRSxLQUFLLEVBQUUsVUFBVSxFQUFFLFdBQVcsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMzRSxPQUFPLEVBQUUsbUNBQW1DLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQzs7OztBQUVoRjs7OztHQUlHO0FBU0gsTUFBTSxPQUFPLHlCQUF5QjtJQXVCcEMsWUFBNEIsTUFBMkM7UUFBM0MsV0FBTSxHQUFOLE1BQU0sQ0FBcUM7UUFsQjlELFVBQUssR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQzFDLFVBQVUsQ0FBQyxDQUFDLE9BQU8sRUFBRSxFQUFFO1lBQ3JCLElBQUksT0FBTyxFQUFFO2dCQUNYLElBQUksSUFBSSxDQUFDLFNBQVMsRUFBRTtvQkFDbEIsT0FBTyxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUMsSUFBSSxDQUNuQixLQUFLLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxFQUNyQixTQUFTLENBQUMsSUFBSSxDQUFDLENBQ2hCLENBQUM7aUJBQ0g7cUJBQU07b0JBQ0wsT0FBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7aUJBQ2pCO2FBQ0Y7aUJBQU07Z0JBQ0wsT0FBTyxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUM7YUFDbEI7UUFDSCxDQUFDLENBQUMsRUFDRixXQUFXLENBQUMsQ0FBQyxDQUFDLENBQ2YsQ0FBQztJQUV5RSxDQUFDOztzSEF2QmpFLHlCQUF5QjswR0FBekIseUJBQXlCLDhGQU4xQjs7OztHQUlUOzJGQUVVLHlCQUF5QjtrQkFSckMsU0FBUzttQkFBQztvQkFDVCxRQUFRLEVBQUUsb0JBQW9CO29CQUM5QixRQUFRLEVBQUU7Ozs7R0FJVDtpQkFDRjswSEFJQyxTQUFTO3NCQURSLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIElucHV0IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBvZiB9IGZyb20gJ3J4anMnO1xuaW1wb3J0IHsgZGVsYXksIGV4aGF1c3RNYXAsIHNoYXJlUmVwbGF5LCBzdGFydFdpdGggfSBmcm9tICdyeGpzL29wZXJhdG9ycyc7XG5pbXBvcnQgeyBEYnhBY3Rpb25Db250ZXh0U3RvcmVTb3VyY2VJbnN0YW5jZSB9IGZyb20gJy4uLy4uL2FjdGlvbi5zdG9yZS5zb3VyY2UnO1xuXG4vKipcbiAqIERpc3BsYXlzIHRoZSBpbnB1dCBjb250ZW50IHdoZW4gc3VjY2VzcyBpcyBzZXQuXG4gKlxuICogQ2FuIGJlIGNvbmZpZ3VyZWQgdG8gc2hvdyBmb3IgYSBsaW1pdGVkIHRpbWUgYWZ0ZXJ3YXJkcywgZXRjLlxuICovXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdkYngtYWN0aW9uLXN1Y2Nlc3MnLFxuICB0ZW1wbGF0ZTogYFxuICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJzaG93JCB8IGFzeW5jXCI+XG4gICAgICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG4gICAgPC9uZy1jb250YWluZXI+XG4gIGBcbn0pXG5leHBvcnQgY2xhc3MgRGJ4QWN0aW9uU3VjY2Vzc0NvbXBvbmVudCB7XG5cbiAgQElucHV0KClcbiAgaGlkZUFmdGVyPzogbnVtYmVyO1xuXG4gIHJlYWRvbmx5IHNob3ckID0gdGhpcy5zb3VyY2UuaXNTdWNjZXNzJC5waXBlKFxuICAgIGV4aGF1c3RNYXAoKHN1Y2Nlc3MpID0+IHtcbiAgICAgIGlmIChzdWNjZXNzKSB7XG4gICAgICAgIGlmICh0aGlzLmhpZGVBZnRlcikge1xuICAgICAgICAgIHJldHVybiBvZihmYWxzZSkucGlwZShcbiAgICAgICAgICAgIGRlbGF5KHRoaXMuaGlkZUFmdGVyKSxcbiAgICAgICAgICAgIHN0YXJ0V2l0aCh0cnVlKVxuICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIG9mKHRydWUpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gb2YoZmFsc2UpO1xuICAgICAgfVxuICAgIH0pLFxuICAgIHNoYXJlUmVwbGF5KDEpXG4gICk7XG5cbiAgY29uc3RydWN0b3IocHVibGljIHJlYWRvbmx5IHNvdXJjZTogRGJ4QWN0aW9uQ29udGV4dFN0b3JlU291cmNlSW5zdGFuY2UpIHsgfVxuXG59XG4iXX0=
@@ -1,6 +0,0 @@
1
- export * from './injected.component.module';
2
- export * from './injected.component';
3
- export * from './injected.instance';
4
- export * from './injected.directive';
5
- export * from './injected';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtY29yZS9zcmMvbGliL2luamVjdGVkL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxZQUFZLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2luamVjdGVkLmNvbXBvbmVudC5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9pbmplY3RlZC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9pbmplY3RlZC5pbnN0YW5jZSc7XG5leHBvcnQgKiBmcm9tICcuL2luamVjdGVkLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL2luamVjdGVkJztcbiJdfQ==