@dereekb/dbx-form 0.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 (217) hide show
  1. package/README.md +6 -0
  2. package/dereekb-dbx-form.d.ts +5 -0
  3. package/esm2020/dereekb-dbx-form.mjs +5 -0
  4. package/esm2020/index.mjs +2 -0
  5. package/esm2020/lib/form/action/form.action.directive.mjs +131 -0
  6. package/esm2020/lib/form/action/form.action.module.mjs +30 -0
  7. package/esm2020/lib/form/action/index.mjs +3 -0
  8. package/esm2020/lib/form/form.changes.directive.mjs +33 -0
  9. package/esm2020/lib/form/form.input.directive.mjs +49 -0
  10. package/esm2020/lib/form/form.mjs +20 -0
  11. package/esm2020/lib/form/form.module.mjs +36 -0
  12. package/esm2020/lib/form/index.mjs +7 -0
  13. package/esm2020/lib/form/loading/form.loading.directive.mjs +52 -0
  14. package/esm2020/lib/form/loading/index.mjs +2 -0
  15. package/esm2020/lib/formly/field/checklist/checklist.item.field.component.mjs +91 -0
  16. package/esm2020/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +38 -0
  17. package/esm2020/lib/formly/field/checklist/checklist.item.field.mjs +119 -0
  18. package/esm2020/lib/formly/field/checklist/checklist.item.field.module.mjs +81 -0
  19. package/esm2020/lib/formly/field/checklist/checklist.item.mjs +2 -0
  20. package/esm2020/lib/formly/field/checklist/index.mjs +6 -0
  21. package/esm2020/lib/formly/field/component/component.field.component.mjs +35 -0
  22. package/esm2020/lib/formly/field/component/component.field.mjs +7 -0
  23. package/esm2020/lib/formly/field/component/component.field.module.mjs +42 -0
  24. package/esm2020/lib/formly/field/component/index.mjs +4 -0
  25. package/esm2020/lib/formly/field/field.mjs +21 -0
  26. package/esm2020/lib/formly/field/index.mjs +7 -0
  27. package/esm2020/lib/formly/field/selection/index.mjs +4 -0
  28. package/esm2020/lib/formly/field/selection/pickable/index.mjs +6 -0
  29. package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +30 -0
  30. package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +244 -0
  31. package/esm2020/lib/formly/field/selection/pickable/pickable.field.module.mjs +96 -0
  32. package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +30 -0
  33. package/esm2020/lib/formly/field/selection/pickable/pickable.mjs +2 -0
  34. package/esm2020/lib/formly/field/selection/searchable/index.mjs +9 -0
  35. package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +45 -0
  36. package/esm2020/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +73 -0
  37. package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +237 -0
  38. package/esm2020/lib/formly/field/selection/searchable/searchable.field.mjs +45 -0
  39. package/esm2020/lib/formly/field/selection/searchable/searchable.field.module.mjs +107 -0
  40. package/esm2020/lib/formly/field/selection/searchable/searchable.mjs +2 -0
  41. package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +31 -0
  42. package/esm2020/lib/formly/field/selection/searchable/text.chip.field.mjs +15 -0
  43. package/esm2020/lib/formly/field/selection/selection.mjs +2 -0
  44. package/esm2020/lib/formly/field/value/array/array.field.component.mjs +87 -0
  45. package/esm2020/lib/formly/field/value/array/array.field.module.mjs +52 -0
  46. package/esm2020/lib/formly/field/value/array/index.mjs +3 -0
  47. package/esm2020/lib/formly/field/value/boolean/boolean.field.mjs +50 -0
  48. package/esm2020/lib/formly/field/value/boolean/boolean.field.module.mjs +16 -0
  49. package/esm2020/lib/formly/field/value/boolean/index.mjs +3 -0
  50. package/esm2020/lib/formly/field/value/date/date.field.mjs +36 -0
  51. package/esm2020/lib/formly/field/value/date/date.field.module.mjs +87 -0
  52. package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +226 -0
  53. package/esm2020/lib/formly/field/value/date/index.mjs +4 -0
  54. package/esm2020/lib/formly/field/value/enum/enum.field.mjs +18 -0
  55. package/esm2020/lib/formly/field/value/enum/enum.mjs +2 -0
  56. package/esm2020/lib/formly/field/value/enum/index.mjs +4 -0
  57. package/esm2020/lib/formly/field/value/hidden.field.mjs +8 -0
  58. package/esm2020/lib/formly/field/value/index.mjs +8 -0
  59. package/esm2020/lib/formly/field/value/phone/index.mjs +4 -0
  60. package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +44 -0
  61. package/esm2020/lib/formly/field/value/phone/phone.field.mjs +64 -0
  62. package/esm2020/lib/formly/field/value/phone/phone.field.module.mjs +67 -0
  63. package/esm2020/lib/formly/field/value/text/index.mjs +4 -0
  64. package/esm2020/lib/formly/field/value/text/text.address.field.mjs +65 -0
  65. package/esm2020/lib/formly/field/value/text/text.field.mjs +125 -0
  66. package/esm2020/lib/formly/field/value/text/text.field.module.mjs +19 -0
  67. package/esm2020/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +26 -0
  68. package/esm2020/lib/formly/field/wrapper/expandable.wrapper.component.mjs +83 -0
  69. package/esm2020/lib/formly/field/wrapper/flex.wrapper.component.mjs +22 -0
  70. package/esm2020/lib/formly/field/wrapper/flex.wrapper.layout.mjs +20 -0
  71. package/esm2020/lib/formly/field/wrapper/form.wrapper.module.mjs +84 -0
  72. package/esm2020/lib/formly/field/wrapper/index.mjs +11 -0
  73. package/esm2020/lib/formly/field/wrapper/info.wrapper.component.mjs +47 -0
  74. package/esm2020/lib/formly/field/wrapper/section.wrapper.component.mjs +35 -0
  75. package/esm2020/lib/formly/field/wrapper/subsection.wrapper.component.mjs +35 -0
  76. package/esm2020/lib/formly/field/wrapper/toggle.wrapper.component.mjs +58 -0
  77. package/esm2020/lib/formly/field/wrapper/toggle.wrapper.mjs +10 -0
  78. package/esm2020/lib/formly/formly.component.mjs +134 -0
  79. package/esm2020/lib/formly/formly.context.mjs +111 -0
  80. package/esm2020/lib/formly/formly.directive.mjs +101 -0
  81. package/esm2020/lib/formly/formly.module.mjs +59 -0
  82. package/esm2020/lib/formly/index.mjs +6 -0
  83. package/esm2020/lib/index.mjs +5 -0
  84. package/esm2020/lib/layout/form.layout.module.mjs +26 -0
  85. package/esm2020/lib/layout/form.spacer.component.mjs +17 -0
  86. package/esm2020/lib/layout/index.mjs +3 -0
  87. package/esm2020/lib/validator/boolean.mjs +12 -0
  88. package/esm2020/lib/validator/email.mjs +6 -0
  89. package/esm2020/lib/validator/index.mjs +4 -0
  90. package/esm2020/lib/validator/number.mjs +21 -0
  91. package/fesm2015/dereekb-dbx-form.mjs +3295 -0
  92. package/fesm2015/dereekb-dbx-form.mjs.map +1 -0
  93. package/fesm2020/dereekb-dbx-form.mjs +3289 -0
  94. package/fesm2020/dereekb-dbx-form.mjs.map +1 -0
  95. package/index.d.ts +1 -0
  96. package/lib/form/action/form.action.directive.d.ts +44 -0
  97. package/lib/form/action/form.action.module.d.ts +9 -0
  98. package/lib/form/action/index.d.ts +2 -0
  99. package/lib/form/form.changes.directive.d.ts +15 -0
  100. package/lib/form/form.d.ts +51 -0
  101. package/lib/form/form.input.directive.d.ts +18 -0
  102. package/lib/form/form.module.d.ts +10 -0
  103. package/lib/form/index.d.ts +6 -0
  104. package/lib/form/loading/form.loading.directive.d.ts +19 -0
  105. package/lib/form/loading/index.d.ts +1 -0
  106. package/lib/formly/field/checklist/checklist.item.d.ts +38 -0
  107. package/lib/formly/field/checklist/checklist.item.field.component.d.ts +48 -0
  108. package/lib/formly/field/checklist/checklist.item.field.content.default.component.d.ts +10 -0
  109. package/lib/formly/field/checklist/checklist.item.field.d.ts +50 -0
  110. package/lib/formly/field/checklist/checklist.item.field.module.d.ts +18 -0
  111. package/lib/formly/field/checklist/index.d.ts +5 -0
  112. package/lib/formly/field/component/component.field.component.d.ts +22 -0
  113. package/lib/formly/field/component/component.field.d.ts +6 -0
  114. package/lib/formly/field/component/component.field.module.d.ts +10 -0
  115. package/lib/formly/field/component/index.d.ts +3 -0
  116. package/lib/formly/field/field.d.ts +31 -0
  117. package/lib/formly/field/index.d.ts +6 -0
  118. package/lib/formly/field/selection/index.d.ts +3 -0
  119. package/lib/formly/field/selection/pickable/index.d.ts +5 -0
  120. package/lib/formly/field/selection/pickable/pickable.chip.field.component.d.ts +10 -0
  121. package/lib/formly/field/selection/pickable/pickable.d.ts +28 -0
  122. package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +155 -0
  123. package/lib/formly/field/selection/pickable/pickable.field.module.d.ts +20 -0
  124. package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +11 -0
  125. package/lib/formly/field/selection/searchable/index.d.ts +8 -0
  126. package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +16 -0
  127. package/lib/formly/field/selection/searchable/searchable.d.ts +40 -0
  128. package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +20 -0
  129. package/lib/formly/field/selection/searchable/searchable.field.d.ts +16 -0
  130. package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +131 -0
  131. package/lib/formly/field/selection/searchable/searchable.field.module.d.ts +21 -0
  132. package/lib/formly/field/selection/searchable/searchable.text.field.component.d.ts +15 -0
  133. package/lib/formly/field/selection/searchable/text.chip.field.d.ts +9 -0
  134. package/lib/formly/field/selection/selection.d.ts +25 -0
  135. package/lib/formly/field/value/array/array.field.component.d.ts +22 -0
  136. package/lib/formly/field/value/array/array.field.module.d.ts +13 -0
  137. package/lib/formly/field/value/array/index.d.ts +2 -0
  138. package/lib/formly/field/value/boolean/boolean.field.d.ts +8 -0
  139. package/lib/formly/field/value/boolean/boolean.field.module.d.ts +6 -0
  140. package/lib/formly/field/value/boolean/index.d.ts +2 -0
  141. package/lib/formly/field/value/date/date.field.d.ts +13 -0
  142. package/lib/formly/field/value/date/date.field.module.d.ts +21 -0
  143. package/lib/formly/field/value/date/datetime.field.component.d.ts +105 -0
  144. package/lib/formly/field/value/date/index.d.ts +3 -0
  145. package/lib/formly/field/value/enum/enum.d.ts +4 -0
  146. package/lib/formly/field/value/enum/enum.field.d.ts +14 -0
  147. package/lib/formly/field/value/enum/index.d.ts +2 -0
  148. package/lib/formly/field/value/hidden.field.d.ts +5 -0
  149. package/lib/formly/field/value/index.d.ts +7 -0
  150. package/lib/formly/field/value/phone/index.d.ts +3 -0
  151. package/lib/formly/field/value/phone/phone.field.component.d.ts +24 -0
  152. package/lib/formly/field/value/phone/phone.field.d.ts +26 -0
  153. package/lib/formly/field/value/phone/phone.field.module.d.ts +16 -0
  154. package/lib/formly/field/value/text/index.d.ts +3 -0
  155. package/lib/formly/field/value/text/text.address.field.d.ts +12 -0
  156. package/lib/formly/field/value/text/text.field.d.ts +42 -0
  157. package/lib/formly/field/value/text/text.field.module.d.ts +7 -0
  158. package/lib/formly/field/wrapper/autotouch.wrapper.component.d.ts +11 -0
  159. package/lib/formly/field/wrapper/expandable.wrapper.component.d.ts +43 -0
  160. package/lib/formly/field/wrapper/flex.wrapper.component.d.ts +6 -0
  161. package/lib/formly/field/wrapper/flex.wrapper.layout.d.ts +10 -0
  162. package/lib/formly/field/wrapper/form.wrapper.module.d.ts +19 -0
  163. package/lib/formly/field/wrapper/index.d.ts +10 -0
  164. package/lib/formly/field/wrapper/info.wrapper.component.d.ts +17 -0
  165. package/lib/formly/field/wrapper/section.wrapper.component.d.ts +8 -0
  166. package/lib/formly/field/wrapper/subsection.wrapper.component.d.ts +8 -0
  167. package/lib/formly/field/wrapper/toggle.wrapper.component.d.ts +24 -0
  168. package/lib/formly/field/wrapper/toggle.wrapper.d.ts +7 -0
  169. package/lib/formly/formly.component.d.ts +36 -0
  170. package/lib/formly/formly.context.d.ts +57 -0
  171. package/lib/formly/formly.directive.d.ts +50 -0
  172. package/lib/formly/formly.module.d.ts +11 -0
  173. package/lib/formly/index.d.ts +5 -0
  174. package/lib/index.d.ts +4 -0
  175. package/lib/layout/form.layout.module.d.ts +8 -0
  176. package/lib/layout/form.spacer.component.d.ts +8 -0
  177. package/lib/layout/index.d.ts +2 -0
  178. package/lib/validator/boolean.d.ts +2 -0
  179. package/lib/validator/email.d.ts +3 -0
  180. package/lib/validator/index.d.ts +3 -0
  181. package/lib/validator/number.d.ts +2 -0
  182. package/package.json +67 -0
  183. package/src/_index.scss +11 -0
  184. package/src/lib/form/_form.scss +26 -0
  185. package/src/lib/formly/_formly.scss +26 -0
  186. package/src/lib/formly/field/_field.scss +33 -0
  187. package/src/lib/formly/field/checklist/_checklist.scss +26 -0
  188. package/src/lib/formly/field/checklist/checklist.item_TODO.scss +57 -0
  189. package/src/lib/formly/field/component/_component.scss +26 -0
  190. package/src/lib/formly/field/fields_TODO.scss +4 -0
  191. package/src/lib/formly/field/selection/_selection.scss +17 -0
  192. package/src/lib/formly/field/selection/generic_TODO.scss +36 -0
  193. package/src/lib/formly/field/selection/pickable/_pickable.scss +26 -0
  194. package/src/lib/formly/field/selection/searchable/_searchable.scss +26 -0
  195. package/src/lib/formly/field/texteditor/_texteditor.scss +26 -0
  196. package/src/lib/formly/field/texteditor/texteditor_TODO.scss +32 -0
  197. package/src/lib/formly/field/value/_value.scss +33 -0
  198. package/src/lib/formly/field/value/array/_array.scss +26 -0
  199. package/src/lib/formly/field/value/boolean/_boolean.scss +26 -0
  200. package/src/lib/formly/field/value/date/_date.scss +26 -0
  201. package/src/lib/formly/field/value/date/date_TODO.scss +27 -0
  202. package/src/lib/formly/field/value/enum/_enum.scss +26 -0
  203. package/src/lib/formly/field/value/phone/_phone.scss +26 -0
  204. package/src/lib/formly/field/value/phone/phone_TODO.scss +10 -0
  205. package/src/lib/formly/field/value/text/_text.scss +26 -0
  206. package/src/lib/formly/field/wrapper/_wrapper.scss +26 -0
  207. package/src/lib/formly/field/wrapper/wrapper_TODO.scss +34 -0
  208. package/src/lib/formly/form_TODO.scss +153 -0
  209. package/src/lib/layout/_layout.scss +26 -0
  210. package/src/lib/style/_all-core.scss +12 -0
  211. package/src/lib/style/_all-theme.scss +12 -0
  212. package/src/lib/style/_all-typography.scss +12 -0
  213. package/src/lib/style/_config.scss +20 -0
  214. package/src/lib/style/_core.scss +9 -0
  215. package/src/lib/style/_mixin.scss +3 -0
  216. package/src/lib/style/_theming.scss +19 -0
  217. package/src/lib/style/_variables.scss +1 -0
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./form.action.directive";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/material/dialog";
5
+ export declare class DbxFormlyActionModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormlyActionModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormlyActionModule, [typeof i1.DbxActionFormDirective], [typeof i2.CommonModule, typeof i3.MatDialogModule], [typeof i1.DbxActionFormDirective]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormlyActionModule>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './form.action.module';
2
+ export * from './form.action.directive';
@@ -0,0 +1,15 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
+ import { DbxForm } from './form';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Used to see form value changes.
7
+ */
8
+ export declare class DbxFormValueChangesDirective<T extends object = any> extends AbstractSubscriptionDirective implements OnInit {
9
+ readonly form: DbxForm;
10
+ readonly dbxFormValueChange: EventEmitter<T>;
11
+ constructor(form: DbxForm);
12
+ ngOnInit(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormValueChangesDirective<any>, [{ host: true; }]>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormValueChangesDirective<any>, "[dbxFormValueChange]", never, {}, { "dbxFormValueChange": "dbxFormValueChange"; }, never>;
15
+ }
@@ -0,0 +1,51 @@
1
+ import { Provider, Type } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { LockSet } from '@dereekb/rxjs';
4
+ /**
5
+ * Current state of a DbxForm
6
+ */
7
+ export declare enum DbxFormState {
8
+ INITIALIZING = -1,
9
+ INCOMPLETE = 0,
10
+ COMPLETE = 1,
11
+ RESET = 2
12
+ }
13
+ /**
14
+ * DbxForm stream event
15
+ */
16
+ export interface DbxFormEvent {
17
+ readonly isComplete: boolean;
18
+ readonly state: DbxFormState;
19
+ readonly pristine?: boolean;
20
+ readonly untouched?: boolean;
21
+ readonly lastResetAt?: Date;
22
+ readonly changesCount?: number;
23
+ }
24
+ /**
25
+ * Form that has an event stream, value, and state items.
26
+ */
27
+ export declare abstract class DbxForm {
28
+ /**
29
+ * LockSet for the form.
30
+ */
31
+ abstract readonly lockSet: LockSet;
32
+ /**
33
+ * True if the form is complete/valid.
34
+ */
35
+ abstract readonly isComplete: boolean;
36
+ abstract readonly state: DbxFormState;
37
+ abstract readonly stream$: Observable<DbxFormEvent>;
38
+ abstract readonly value: any;
39
+ abstract setValue(value: any): void;
40
+ abstract resetForm(): void;
41
+ abstract forceFormUpdate(): void;
42
+ }
43
+ /**
44
+ * A typed DbxForm
45
+ */
46
+ export interface TypedDbxForm<T> extends DbxForm {
47
+ readonly value: T;
48
+ setValue(value: T): void;
49
+ resetForm(): void;
50
+ }
51
+ export declare function ProvideDbxForm<S extends DbxForm>(sourceType: Type<S>): Provider[];
@@ -0,0 +1,18 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
+ import { DbxForm } from '../form/form';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Used with a FormComponent to set the value based on the input value.
7
+ */
8
+ export declare class DbxFormSourceDirective<T extends object = any> extends AbstractSubscriptionDirective {
9
+ readonly form: DbxForm;
10
+ constructor(form: DbxForm);
11
+ /**
12
+ * Sets a LoadingContext that is watched for the loading state.
13
+ */
14
+ set obs(obs: Observable<T>);
15
+ private _setObs;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormSourceDirective<any>, [{ host: true; }]>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormSourceDirective<any>, "[dbxFormSource]", never, { "obs": "dbxFormSource"; }, {}, never>;
18
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./form.input.directive";
3
+ import * as i2 from "./form.changes.directive";
4
+ import * as i3 from "./loading/form.loading.directive";
5
+ import * as i4 from "@angular/common";
6
+ export declare class DbxFormModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormModule, [typeof i1.DbxFormSourceDirective, typeof i2.DbxFormValueChangesDirective, typeof i3.DbxFormLoadingPairSourceDirective], [typeof i4.CommonModule], [typeof i1.DbxFormSourceDirective, typeof i2.DbxFormValueChangesDirective, typeof i3.DbxFormLoadingPairSourceDirective]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormModule>;
10
+ }
@@ -0,0 +1,6 @@
1
+ export * from './action';
2
+ export * from './loading';
3
+ export * from './form.changes.directive';
4
+ export * from './form.input.directive';
5
+ export * from './form.module';
6
+ export * from './form';
@@ -0,0 +1,19 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
+ import { DbxForm } from '../../form/form';
4
+ import { LoadingState } from '@dereekb/rxjs';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Used with a FormComponent to set the value from a LoadingState when the value is available.
8
+ */
9
+ export declare class DbxFormLoadingPairSourceDirective<T extends object = any> extends AbstractSubscriptionDirective {
10
+ readonly form: DbxForm;
11
+ constructor(form: DbxForm);
12
+ /**
13
+ * Sets a LoadingContext that is watched for the loading state.
14
+ */
15
+ set obs(obs: Observable<LoadingState<T>>);
16
+ private _setObs;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormLoadingPairSourceDirective<any>, [{ host: true; }]>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormLoadingPairSourceDirective<any>, "[dbxFormLoadingPairSource]", never, { "obs": "dbxFormLoadingPairSource"; }, {}, never>;
19
+ }
@@ -0,0 +1 @@
1
+ export * from './form.loading.directive';
@@ -0,0 +1,38 @@
1
+ import { ClickableAnchor } from "@dereekb/dbx-core";
2
+ import { Maybe } from "@dereekb/util";
3
+ import { Observable } from "rxjs";
4
+ export interface ChecklistItemDisplayContent<T = any> {
5
+ /**
6
+ * Label to display.
7
+ */
8
+ label?: Maybe<string>;
9
+ /**
10
+ * Secondary label/value to display. May be used as the string value.
11
+ */
12
+ sublabel?: Maybe<string>;
13
+ /**
14
+ * Hint/description to display.
15
+ */
16
+ description?: Maybe<string>;
17
+ /**
18
+ * Whether or not to display the ripple. Is true by default if the anchor is present.
19
+ */
20
+ ripple?: Maybe<boolean>;
21
+ /**
22
+ * Optional anchor to apply on the visible content.
23
+ */
24
+ anchor?: Maybe<ClickableAnchor>;
25
+ /**
26
+ * Value metadata. How it is used depends on the display component used.
27
+ */
28
+ meta?: Maybe<T>;
29
+ }
30
+ /**
31
+ * Component used for rendering checklist content.
32
+ *
33
+ * Content is injected.
34
+ */
35
+ export interface ChecklistItemFieldDisplayComponent<T = any> {
36
+ displayContent?: ChecklistItemDisplayContent<T>;
37
+ }
38
+ export declare type ChecklistItemFieldDisplayContentObs<T = any> = Observable<ChecklistItemDisplayContent<T>>;
@@ -0,0 +1,48 @@
1
+ import { ComponentFactoryResolver, NgZone, OnDestroy, OnInit, Type, ViewContainerRef } from '@angular/core';
2
+ import { ValidationErrors, FormGroup } from '@angular/forms';
3
+ import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
4
+ import { ChecklistItemFieldDisplayComponent, ChecklistItemFieldDisplayContentObs } from './checklist.item';
5
+ import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
6
+ import { Maybe } from '@dereekb/util';
7
+ import * as i0 from "@angular/core";
8
+ export interface DbxChecklistItemFieldConfig<T = any> {
9
+ /**
10
+ * Observable used to retrieve content to display for the item.
11
+ */
12
+ displayContentObs: ChecklistItemFieldDisplayContentObs<T>;
13
+ /**
14
+ * Custom component class to use by default.
15
+ */
16
+ componentClass?: Type<ChecklistItemFieldDisplayComponent<T>>;
17
+ }
18
+ export interface ChecklistItemFormlyFieldConfig<T = any> extends DbxChecklistItemFieldConfig<T>, FormlyFieldConfig {
19
+ }
20
+ export declare class DbxChecklistItemFieldComponent<T = any> extends FieldType<ChecklistItemFormlyFieldConfig<T>> implements OnInit, OnDestroy {
21
+ private _displayContent;
22
+ readonly displayContent$: import("rxjs").Observable<import("./checklist.item").ChecklistItemDisplayContent<T>>;
23
+ readonly anchor$: import("rxjs").Observable<Maybe<import("@dereekb/dbx-core").ClickableAnchor>>;
24
+ readonly rippleDisabled$: import("rxjs").Observable<boolean>;
25
+ get formGroup(): FormGroup;
26
+ get checkboxFieldKey(): string;
27
+ get label(): Maybe<string>;
28
+ get description(): Maybe<string>;
29
+ get required(): Maybe<boolean>;
30
+ get errors(): Maybe<ValidationErrors>;
31
+ get componentClass(): Type<ChecklistItemFieldDisplayComponent<T>>;
32
+ ngOnInit(): void;
33
+ ngOnDestroy(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemFieldComponent<any>, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxChecklistItemFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
36
+ }
37
+ export declare class DbxChecklistItemContentComponent<T = any> extends AbstractSubscriptionDirective implements OnInit {
38
+ readonly checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>;
39
+ readonly resolver: ComponentFactoryResolver;
40
+ readonly ngZone: NgZone;
41
+ readonly displayContent$: import("rxjs").Observable<import("./checklist.item").ChecklistItemDisplayContent<T>>;
42
+ readonly isLoading$: import("rxjs").Observable<import("./checklist.item").ChecklistItemDisplayContent<T>>;
43
+ contentRef: ViewContainerRef;
44
+ constructor(checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>, resolver: ComponentFactoryResolver, ngZone: NgZone);
45
+ ngOnInit(): void;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemContentComponent<any>, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxChecklistItemContentComponent<any>, "dbx-checklist-item-content-component", never, {}, {}, never, never>;
48
+ }
@@ -0,0 +1,10 @@
1
+ import { ChecklistItemDisplayContent, ChecklistItemFieldDisplayComponent } from './checklist.item';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DbxDefaultChecklistItemFieldDisplayComponent implements ChecklistItemFieldDisplayComponent<any> {
4
+ displayContent?: ChecklistItemDisplayContent<any>;
5
+ get label(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
6
+ get sublabel(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
7
+ get description(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxDefaultChecklistItemFieldDisplayComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxDefaultChecklistItemFieldDisplayComponent, "ng-component", never, { "displayContent": "displayContent"; }, {}, never, never>;
10
+ }
@@ -0,0 +1,50 @@
1
+ import { Observable } from 'rxjs';
2
+ import { FormlyFieldConfig } from '@ngx-formly/core';
3
+ import { FieldConfig } from '../field';
4
+ import { DbxChecklistItemFieldConfig, ChecklistItemFormlyFieldConfig } from './checklist.item.field.component';
5
+ import { ChecklistItemDisplayContent, ChecklistItemFieldDisplayContentObs } from './checklist.item';
6
+ import { KeyValueTransformMap, Maybe } from '@dereekb/util';
7
+ export interface ChecklistItemFieldConfig<T = any> extends FieldConfig, DbxChecklistItemFieldConfig<T> {
8
+ }
9
+ export declare type ChecklistItemFieldBuilderInput<T = any> = Partial<ChecklistItemFieldConfig<T>> & Pick<ChecklistItemFieldConfig<T>, 'key' | 'displayContentObs'>;
10
+ export declare function checklistItemField<T = any>({ key, label, placeholder, displayContentObs, componentClass, required }: ChecklistItemFieldBuilderInput<T>): ChecklistItemFormlyFieldConfig<T>;
11
+ export declare type ChecklistItemFieldDataSetFieldKey<D> = keyof D & string;
12
+ export declare type ChecklistItemFieldDataSetFieldValueForKey<D, K extends keyof D = keyof D> = D[K];
13
+ export declare type ChecklistType<D> = KeyValueTransformMap<D, boolean>;
14
+ export declare type ChecklistItemFieldDataSetBuilderInput<D, T> = {
15
+ key: ChecklistItemFieldDataSetFieldKey<D>;
16
+ } & ChecklistItemFieldBuilderInput<T>;
17
+ export interface ChecklistItemFieldDataSetItem<D, T extends ChecklistType<D>> {
18
+ /**
19
+ * Key for the field.
20
+ */
21
+ key: ChecklistItemFieldDataSetFieldKey<T>;
22
+ /**
23
+ * Base field configuration to use.
24
+ */
25
+ field: ChecklistItemFieldBuilderInput<T>;
26
+ }
27
+ /**
28
+ * Used for building a set of configurations for a data-type object that has as second object that is used as a checklist.
29
+ */
30
+ export declare class ChecklistItemFieldDataSetBuilder<D extends object, C extends ChecklistType<D> = ChecklistType<D>> {
31
+ readonly dataObs: Observable<D>;
32
+ private _fields;
33
+ readonly dataObs$: Observable<D>;
34
+ constructor(dataObs: Observable<D>);
35
+ /**
36
+ * Merges the input config with existing configuration.
37
+ *
38
+ * The displayContentObs, if provided, will merge with the existing observable and the two objects merged.
39
+ */
40
+ merge<T>(key: ChecklistItemFieldDataSetFieldKey<D>, config: Partial<ChecklistItemFieldBuilderInput<T>>): void;
41
+ override<T>(key: ChecklistItemFieldDataSetFieldKey<D>, config: Partial<ChecklistItemFieldBuilderInput<T>>): void;
42
+ _assertFieldExists(key: ChecklistItemFieldDataSetFieldKey<D>): ChecklistItemFieldDataSetItem<D, any>;
43
+ showValueFieldArrayCount<T extends ChecklistItemFieldDataSetFieldValueForKey<D> & Array<any>>(key: ChecklistItemFieldDataSetFieldKey<D>, config?: Partial<ChecklistItemFieldDataSetBuilderInput<D, T>>): void;
44
+ showValueField<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: ChecklistItemFieldDataSetFieldKey<D>, config?: Partial<ChecklistItemFieldDataSetBuilderInput<D, T>>, labelFn?: (value: T) => Maybe<string>): void;
45
+ field<T>(config: ChecklistItemFieldDataSetBuilderInput<D, T>): void;
46
+ build(): FormlyFieldConfig[];
47
+ customContentFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(mapFn: (data: D) => ChecklistItemDisplayContent): ChecklistItemFieldDisplayContentObs<T>;
48
+ contentWithValueFromData<K extends keyof D = keyof D, T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: K, contentFn?: (value: T) => ChecklistItemDisplayContent): ChecklistItemFieldDisplayContentObs<T>;
49
+ contentWithDisplayValueFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: ChecklistItemFieldDataSetFieldKey<D>, labelFn?: (value: T) => Maybe<string>): ChecklistItemFieldDisplayContentObs<T>;
50
+ }
@@ -0,0 +1,18 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./checklist.item.field.component";
3
+ import * as i2 from "./checklist.item.field.content.default.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@dereekb/dbx-web";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "@angular/material/core";
8
+ import * as i7 from "@angular/material/checkbox";
9
+ import * as i8 from "@angular/material/button";
10
+ import * as i9 from "@angular/material/icon";
11
+ import * as i10 from "@dereekb/dbx-core";
12
+ import * as i11 from "../wrapper/form.wrapper.module";
13
+ import * as i12 from "@ngx-formly/core";
14
+ export declare class DbxFormFormlyChecklistItemFieldModule {
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyChecklistItemFieldModule, never>;
16
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyChecklistItemFieldModule, [typeof i1.DbxChecklistItemFieldComponent, typeof i1.DbxChecklistItemContentComponent, typeof i2.DbxDefaultChecklistItemFieldDisplayComponent], [typeof i3.CommonModule, typeof i4.DbxTextModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatRippleModule, typeof i7.MatCheckboxModule, typeof i8.MatButtonModule, typeof i9.MatIconModule, typeof i4.DbxAnchorModule, typeof i10.DbxInjectedComponentModule, typeof i11.DbxFormFormlyWrapperModule, typeof i12.FormlyModule], [typeof i11.DbxFormFormlyWrapperModule]>;
17
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyChecklistItemFieldModule>;
18
+ }
@@ -0,0 +1,5 @@
1
+ export * from './checklist.item.field.component';
2
+ export * from './checklist.item.field.content.default.component';
3
+ export * from './checklist.item.field.module';
4
+ export * from './checklist.item.field';
5
+ export * from './checklist.item';
@@ -0,0 +1,22 @@
1
+ import { OnInit, Type } from '@angular/core';
2
+ import { DbxInjectedComponentConfig } from '@dereekb/dbx-core';
3
+ import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
4
+ import { Maybe } from '@dereekb/util';
5
+ import * as i0 from "@angular/core";
6
+ export interface FormComponentFieldWrappedComponent {
7
+ field: FieldType<FormComponentFieldFieldConfig>;
8
+ }
9
+ export declare abstract class AbstractFormComponentFieldWrappedComponent implements FormComponentFieldWrappedComponent {
10
+ abstract field: FieldType<FormComponentFieldFieldConfig>;
11
+ }
12
+ export interface FormComponentFieldFieldConfig<T extends FormComponentFieldWrappedComponent = any> extends FormlyFieldConfig {
13
+ componentClass: Type<T>;
14
+ }
15
+ export declare class FormComponentFieldComponent<T extends FormComponentFieldWrappedComponent = any> extends FieldType<FormComponentFieldFieldConfig<T>> implements OnInit {
16
+ private _config?;
17
+ get config(): Maybe<DbxInjectedComponentConfig>;
18
+ constructor();
19
+ ngOnInit(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormComponentFieldComponent<any>, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormComponentFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
22
+ }
@@ -0,0 +1,6 @@
1
+ import { Type } from "@angular/core";
2
+ import { FormComponentFieldWrappedComponent, FormComponentFieldFieldConfig } from "./component.field.component";
3
+ export interface ComponentFieldConfig<T> {
4
+ componentClass: Type<T>;
5
+ }
6
+ export declare function componentField<T extends FormComponentFieldWrappedComponent>({ componentClass }: ComponentFieldConfig<T>): FormComponentFieldFieldConfig<T>;
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./component.field.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@dereekb/dbx-core";
5
+ import * as i4 from "@ngx-formly/core";
6
+ export declare class DbxFormFormlyComponentFieldModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyComponentFieldModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyComponentFieldModule, [typeof i1.FormComponentFieldComponent], [typeof i2.CommonModule, typeof i3.DbxInjectedComponentModule, typeof i4.FormlyModule], [typeof i1.FormComponentFieldComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyComponentFieldModule>;
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from './component.field.component';
2
+ export * from './component.field.module';
3
+ export * from './component.field';
@@ -0,0 +1,31 @@
1
+ import { FormlyFieldConfig } from '@ngx-formly/core';
2
+ export interface FieldConfig {
3
+ key: string;
4
+ label?: string;
5
+ placeholder?: string;
6
+ required?: boolean;
7
+ readonly?: boolean;
8
+ autocomplete?: string;
9
+ }
10
+ export interface DefaultValueFieldConfig<T = any> {
11
+ defaultValue?: T;
12
+ }
13
+ export interface AttributesFieldConfig {
14
+ attributes?: {
15
+ [key: string]: string | number;
16
+ };
17
+ }
18
+ export interface DescriptionFieldConfig {
19
+ description?: string;
20
+ }
21
+ /**
22
+ * Validates the configuration on the input field.
23
+ */
24
+ export declare function formlyField<T extends FormlyFieldConfig = FormlyFieldConfig>(fieldConfig: T): T;
25
+ /**
26
+ * Returns configuration for a formlyField that will disable autofill/autocomplete for a field.
27
+ */
28
+ export declare function disableFormlyFieldAutofill(): {
29
+ name: string;
30
+ autocomplete: string;
31
+ };
@@ -0,0 +1,6 @@
1
+ export * from './checklist';
2
+ export * from './component';
3
+ export * from './selection';
4
+ export * from './value';
5
+ export * from './wrapper';
6
+ export * from './field';
@@ -0,0 +1,3 @@
1
+ export * from './pickable';
2
+ export * from './searchable';
3
+ export * from './selection';
@@ -0,0 +1,5 @@
1
+ export * from './pickable.chip.field.component';
2
+ export * from './pickable.field.directive';
3
+ export * from './pickable.field.module';
4
+ export * from './pickable.list.field.component';
5
+ export * from './pickable';
@@ -0,0 +1,10 @@
1
+ import { AbstractDbxPickableItemFieldDirective, PickableItemFieldItem } from "./pickable.field.directive";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Used for picking pre-set values using chips as the presentation.
5
+ */
6
+ export declare class DbxPickableChipFieldComponent<T> extends AbstractDbxPickableItemFieldDirective<T> {
7
+ itemClicked(item: PickableItemFieldItem<T>): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxPickableChipFieldComponent<any>, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxPickableChipFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
10
+ }
@@ -0,0 +1,28 @@
1
+ import { Maybe } from "@dereekb/util";
2
+ import { Observable } from "rxjs";
3
+ import { SelectionDisplayValue, SelectionValue, SelectionValueHashFn } from "../selection";
4
+ export interface PickableValueFieldValue<T, M = any> extends SelectionValue<T, M> {
5
+ }
6
+ export interface PickableValueFieldDisplayValue<T, M = any> extends SelectionDisplayValue<T, M> {
7
+ }
8
+ /**
9
+ * PickableValueField function for retrieving all values.
10
+ */
11
+ export declare type PickableValueFieldLoadValuesFn<T, M = any> = () => Observable<PickableValueFieldValue<T, M>[]>;
12
+ /**
13
+ * PickableValueField function that allows the values a chance to go through another observable for any changes.
14
+ *
15
+ * Values may not have metadata on them in some cases, where the value may infact be an unknown value.
16
+ * The returned value should be marked as unknown, or if it has no meta but is known, isUnknown should be marked false.
17
+ *
18
+ * The value itself should not change. All other fields on the value may change, however.
19
+ */
20
+ export declare type PickableValueFieldDisplayFn<T, M = any> = (values: PickableValueFieldValue<T, M>[]) => Observable<PickableValueFieldDisplayValue<T, M>[]>;
21
+ /**
22
+ * Used for filtering the values that should be displayed.
23
+ */
24
+ export declare type PickableValueFieldFilterFn<T, M = any> = (flterText: Maybe<string>, values: PickableValueFieldDisplayValue<T, M>[]) => Observable<T[]>;
25
+ /**
26
+ * Used to hash the value from the input pickable value.
27
+ */
28
+ export declare type PickableValueFieldHashFn<T> = SelectionValueHashFn<T>;
@@ -0,0 +1,155 @@
1
+ import { DbxInjectedComponentConfig } from "@dereekb/dbx-core";
2
+ import { LoadingStateContextInstance, LoadingState } from "@dereekb/rxjs";
3
+ import { Maybe } from "@dereekb/util";
4
+ import { OnDestroy, OnInit } from "@angular/core";
5
+ import { FormControl, AbstractControl } from "@angular/forms";
6
+ import { MatInput } from "@angular/material/input";
7
+ import { FieldType, FormlyFieldConfig } from "@ngx-formly/core";
8
+ import { Observable } from "rxjs";
9
+ import { PickableValueFieldDisplayFn, PickableValueFieldDisplayValue, PickableValueFieldFilterFn, PickableValueFieldHashFn, PickableValueFieldLoadValuesFn, PickableValueFieldValue } from "./pickable";
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * Wraps the selected state with the items.
13
+ */
14
+ export interface PickableItemFieldItem<T> {
15
+ display: PickableValueFieldDisplayValue<T>;
16
+ selected?: boolean;
17
+ }
18
+ export declare type PickableItemFieldItemSortFn<T> = (items: PickableItemFieldItem<T>[]) => PickableItemFieldItem<T>[];
19
+ export interface PickableValueFieldsFieldConfig<T> {
20
+ /**
21
+ * Loads all pickable values.
22
+ */
23
+ loadValues: PickableValueFieldLoadValuesFn<T>;
24
+ /**
25
+ * Used for building a display value given the input.
26
+ */
27
+ displayForValue: PickableValueFieldDisplayFn<T>;
28
+ /**
29
+ * Used for hashing display values and omitting repeat values.
30
+ *
31
+ * If hashForValue is not provided, the value's value will be used as is.
32
+ */
33
+ hashForValue?: PickableValueFieldHashFn<T>;
34
+ /**
35
+ * Used for filtering values via the search text.
36
+ */
37
+ filterValues?: PickableValueFieldFilterFn<T>;
38
+ /**
39
+ * Used for sorting the items before they are displayed.
40
+ *
41
+ * Should only be used to sort values.
42
+ */
43
+ sortItems?: PickableItemFieldItemSortFn<T>;
44
+ /**
45
+ * Whether or not to allow multiple items to be selected.
46
+ */
47
+ multiSelect?: boolean;
48
+ /**
49
+ * Whether or not to set/get values as an array or a single value. If set false, multiSelect is ignored.
50
+ */
51
+ asArrayValue?: boolean;
52
+ /**
53
+ * Whether or not to show the text filter. True by default if filterValues is provided.
54
+ */
55
+ showTextFilter?: boolean;
56
+ /**
57
+ * Whether or not to skip the filter function when the input is empty.
58
+ *
59
+ * True by default.
60
+ */
61
+ skipFilterFnOnEmpty?: boolean;
62
+ /**
63
+ * Filter Label
64
+ */
65
+ filterLabel?: string;
66
+ /**
67
+ * The maximum number of values that can be picked
68
+ */
69
+ maxPicks?: number;
70
+ /**
71
+ * Optional description/hint to display.
72
+ */
73
+ description?: string;
74
+ /**
75
+ * Footer Display
76
+ */
77
+ footerConfig?: DbxInjectedComponentConfig;
78
+ }
79
+ export interface PickableValueFieldsFormlyFieldConfig<T> extends PickableValueFieldsFieldConfig<T>, FormlyFieldConfig {
80
+ }
81
+ /**
82
+ * Displayed value with the computed hash.
83
+ */
84
+ export interface PickableValueFieldDisplayValueWithHash<T, M = any> extends PickableValueFieldDisplayValue<T, M> {
85
+ _hash: any;
86
+ }
87
+ /**
88
+ * Used for picking pre-set values using items as the presentation.
89
+ */
90
+ export declare class AbstractDbxPickableItemFieldDirective<T> extends FieldType<PickableValueFieldsFormlyFieldConfig<T>> implements OnInit, OnDestroy {
91
+ filterMatInput: MatInput;
92
+ readonly inputCtrl: FormControl;
93
+ private _formControlObs;
94
+ readonly formControl$: Observable<AbstractControl>;
95
+ private _displayHashMap;
96
+ readonly filterInputValue$: Observable<string>;
97
+ readonly filterInputValueString$: Observable<string>;
98
+ readonly loadResultsDisplayValuesState$: Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
99
+ readonly _formControlValue: Observable<T | T[]>;
100
+ readonly loadResultsDisplayValues$: Observable<PickableValueFieldDisplayValueWithHash<T>[]>;
101
+ /**
102
+ * Current values in the form control.
103
+ */
104
+ readonly values$: Observable<T[]>;
105
+ /**
106
+ * Current values with their display value.
107
+ */
108
+ readonly displayValuesState$: Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
109
+ /**
110
+ * Results to be displayed if filtered.
111
+ */
112
+ readonly filteredSearchResultsState$: Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
113
+ readonly filteredSearchResults$: Observable<PickableValueFieldDisplayValueWithHash<T>[]>;
114
+ readonly items$: Observable<PickableItemFieldItem<T>[]>;
115
+ readonly itemsLoadingState$: Observable<LoadingState>;
116
+ /**
117
+ * Context used for managing the loading of items, or when the current results change.
118
+ */
119
+ readonly context: LoadingStateContextInstance<any, LoadingState<any>>;
120
+ readonly filterItemsLoadingState$: Observable<LoadingState>;
121
+ /**
122
+ * Context used for searching/filtering.
123
+ */
124
+ readonly filterResultsContext: LoadingStateContextInstance<any, LoadingState<PickableValueFieldDisplayValueWithHash<T, any>[]>>;
125
+ get multiSelect(): boolean;
126
+ get asArrayValue(): boolean;
127
+ get filterLabel(): Maybe<string>;
128
+ get readonly(): Maybe<boolean>;
129
+ get required(): Maybe<boolean>;
130
+ get placeholder(): string;
131
+ get description(): Maybe<string>;
132
+ get sortItems(): Maybe<PickableItemFieldItemSortFn<T>>;
133
+ get hashForValue(): PickableValueFieldHashFn<T>;
134
+ get displayForValue(): PickableValueFieldDisplayFn<T>;
135
+ get showFilterInput(): boolean;
136
+ get filterValuesFn(): PickableValueFieldFilterFn<T>;
137
+ get skipFilterFnOnEmpty(): boolean;
138
+ get _filterValues(): PickableValueFieldFilterFn<T>;
139
+ get showTextFilter(): boolean;
140
+ get loadValuesFn(): PickableValueFieldLoadValuesFn<T>;
141
+ get values(): T[];
142
+ get footerConfig(): Maybe<DbxInjectedComponentConfig>;
143
+ loadDisplayValuesForValues(values: T[]): Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
144
+ loadDisplayValuesForFieldValues(values: PickableValueFieldValue<T>[]): Observable<LoadingState<PickableValueFieldDisplayValueWithHash<T>[]>>;
145
+ getDisplayValuesForFieldValues(values: PickableValueFieldValue<T>[]): Observable<PickableValueFieldDisplayValueWithHash<T>[]>;
146
+ ngOnInit(): void;
147
+ ngOnDestroy(): void;
148
+ protected _getValueOnFormControl(valueOnFormControl: any): T[];
149
+ addValue(value: T): void;
150
+ removeValue(value: T): void;
151
+ setValues(values: T[]): void;
152
+ protected _setValueOnFormControl(values: T[]): void;
153
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxPickableItemFieldDirective<any>, never>;
154
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxPickableItemFieldDirective<any>, never, never, {}, {}, never>;
155
+ }
@@ -0,0 +1,20 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./pickable.chip.field.component";
3
+ import * as i2 from "./pickable.list.field.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@dereekb/dbx-web";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "@angular/material/button";
8
+ import * as i7 from "@angular/material/input";
9
+ import * as i8 from "@angular/material/form-field";
10
+ import * as i9 from "@angular/material/autocomplete";
11
+ import * as i10 from "@angular/material/list";
12
+ import * as i11 from "@dereekb/dbx-core";
13
+ import * as i12 from "@angular/material/chips";
14
+ import * as i13 from "@angular/material/icon";
15
+ import * as i14 from "@ngx-formly/core";
16
+ export declare class DbxFormFormlyPickableFieldModule {
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyPickableFieldModule, never>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyPickableFieldModule, [typeof i1.DbxPickableChipFieldComponent, typeof i2.DbxPickableListFieldComponent], [typeof i3.CommonModule, typeof i4.DbxTextModule, typeof i4.DbxLoadingModule, typeof i4.DbxButtonModule, typeof i5.FormsModule, typeof i6.MatButtonModule, typeof i7.MatInputModule, typeof i8.MatFormFieldModule, typeof i5.ReactiveFormsModule, typeof i9.MatAutocompleteModule, typeof i10.MatListModule, typeof i11.DbxDatePipeModule, typeof i4.DbxAnchorModule, typeof i12.MatChipsModule, typeof i13.MatIconModule, typeof i11.DbxInjectedComponentModule, typeof i14.FormlyModule], never>;
19
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyPickableFieldModule>;
20
+ }