@dereekb/dbx-form 0.0.1 → 1.0.0

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 (239) hide show
  1. package/{src/_index.scss → _index.scss} +8 -0
  2. package/esm2020/lib/form/action/form.action.directive.mjs +42 -40
  3. package/esm2020/lib/form/action/form.action.module.mjs +6 -6
  4. package/esm2020/lib/form/action/index.mjs +2 -1
  5. package/esm2020/lib/form/action/transition/form.action.transition.module.mjs +26 -0
  6. package/esm2020/lib/form/action/transition/form.action.transition.safety.directive.mjs +40 -0
  7. package/esm2020/lib/form/action/transition/index.mjs +3 -0
  8. package/esm2020/lib/form/form.mjs +11 -4
  9. package/esm2020/lib/form/form.module.mjs +13 -24
  10. package/esm2020/lib/form/index.mjs +2 -4
  11. package/esm2020/lib/form/io/form.changes.directive.mjs +34 -0
  12. package/esm2020/lib/form/io/form.input.directive.mjs +49 -0
  13. package/esm2020/lib/form/io/form.io.module.mjs +36 -0
  14. package/esm2020/lib/form/io/form.loading.directive.mjs +52 -0
  15. package/esm2020/lib/form/io/index.mjs +5 -0
  16. package/esm2020/lib/form.module.mjs +25 -0
  17. package/esm2020/lib/formly/config/index.mjs +2 -0
  18. package/esm2020/lib/formly/config/validation.mjs +22 -0
  19. package/esm2020/lib/formly/field/checklist/checklist.field.mjs +105 -0
  20. package/esm2020/lib/formly/field/checklist/checklist.item.field.component.mjs +28 -30
  21. package/esm2020/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +1 -1
  22. package/esm2020/lib/formly/field/checklist/checklist.item.field.mjs +8 -112
  23. package/esm2020/lib/formly/field/checklist/index.mjs +2 -1
  24. package/esm2020/lib/formly/field/component/component.field.component.mjs +7 -7
  25. package/esm2020/lib/formly/field/component/component.field.mjs +4 -2
  26. package/esm2020/lib/formly/field/field.mjs +35 -2
  27. package/esm2020/lib/formly/field/form.field.module.mjs +44 -0
  28. package/esm2020/lib/formly/field/index.mjs +3 -1
  29. package/esm2020/lib/formly/field/selection/index.mjs +2 -1
  30. package/esm2020/lib/formly/field/selection/pickable/index.mjs +2 -1
  31. package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +14 -12
  32. package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +40 -31
  33. package/esm2020/lib/formly/field/selection/pickable/pickable.field.mjs +39 -0
  34. package/esm2020/lib/formly/field/selection/pickable/pickable.field.module.mjs +22 -13
  35. package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +75 -16
  36. package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +32 -15
  37. package/esm2020/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +64 -50
  38. package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +69 -53
  39. package/esm2020/lib/formly/field/selection/searchable/searchable.field.mjs +30 -7
  40. package/esm2020/lib/formly/field/selection/searchable/searchable.field.module.mjs +8 -10
  41. package/esm2020/lib/formly/field/selection/searchable/searchable.mjs +1 -1
  42. package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +35 -11
  43. package/esm2020/lib/formly/field/selection/searchable/text.chip.field.mjs +1 -1
  44. package/esm2020/lib/formly/field/selection/selection.mjs +1 -1
  45. package/esm2020/lib/formly/field/selection/selection.module.mjs +28 -0
  46. package/esm2020/lib/formly/field/texteditor/index.mjs +4 -0
  47. package/esm2020/lib/formly/field/texteditor/texteditor.field.component.mjs +90 -0
  48. package/esm2020/lib/formly/field/texteditor/texteditor.field.mjs +20 -0
  49. package/esm2020/lib/formly/field/texteditor/texteditor.field.module.mjs +59 -0
  50. package/esm2020/lib/formly/field/value/array/array.field.component.mjs +87 -51
  51. package/esm2020/lib/formly/field/value/array/array.field.mjs +20 -0
  52. package/esm2020/lib/formly/field/value/array/array.field.module.mjs +25 -7
  53. package/esm2020/lib/formly/field/value/array/index.mjs +2 -1
  54. package/esm2020/lib/formly/field/value/boolean/boolean.field.mjs +11 -20
  55. package/esm2020/lib/formly/field/value/date/date.field.module.mjs +9 -6
  56. package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +74 -44
  57. package/esm2020/lib/formly/field/value/date/datetime.field.mjs +36 -0
  58. package/esm2020/lib/formly/field/value/date/index.mjs +2 -2
  59. package/esm2020/lib/formly/field/value/enum/enum.field.mjs +1 -1
  60. package/esm2020/lib/formly/field/value/enum/enum.field.module.mjs +16 -0
  61. package/esm2020/lib/formly/field/value/enum/index.mjs +2 -1
  62. package/esm2020/lib/formly/field/value/hidden.field.mjs +1 -1
  63. package/esm2020/lib/formly/field/value/index.mjs +2 -1
  64. package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +13 -33
  65. package/esm2020/lib/formly/field/value/phone/phone.field.mjs +50 -52
  66. package/esm2020/lib/formly/field/value/phone/phone.field.module.mjs +15 -7
  67. package/esm2020/lib/formly/field/value/text/index.mjs +2 -1
  68. package/esm2020/lib/formly/field/value/text/text.additional.field.mjs +81 -0
  69. package/esm2020/lib/formly/field/value/text/text.address.field.mjs +16 -23
  70. package/esm2020/lib/formly/field/value/text/text.field.mjs +11 -110
  71. package/esm2020/lib/formly/field/value/text/text.field.module.mjs +9 -4
  72. package/esm2020/lib/formly/field/value/value.module.mjs +44 -0
  73. package/esm2020/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +1 -1
  74. package/esm2020/lib/formly/field/wrapper/expandable.wrapper.component.mjs +12 -56
  75. package/esm2020/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +58 -0
  76. package/esm2020/lib/formly/field/wrapper/flex.wrapper.component.mjs +18 -8
  77. package/esm2020/lib/formly/field/wrapper/form.wrapper.module.mjs +43 -30
  78. package/esm2020/lib/formly/field/wrapper/index.mjs +3 -3
  79. package/esm2020/lib/formly/field/wrapper/info.wrapper.component.mjs +16 -16
  80. package/esm2020/lib/formly/field/wrapper/section.wrapper.component.mjs +17 -23
  81. package/esm2020/lib/formly/field/wrapper/style.wrapper.component.mjs +43 -0
  82. package/esm2020/lib/formly/field/wrapper/subsection.wrapper.component.mjs +17 -23
  83. package/esm2020/lib/formly/field/wrapper/toggle.wrapper.component.mjs +16 -20
  84. package/esm2020/lib/formly/field/wrapper/wrapper.mjs +81 -0
  85. package/esm2020/lib/formly/formly.context.directive.mjs +38 -0
  86. package/esm2020/lib/formly/formly.context.mjs +45 -70
  87. package/esm2020/lib/formly/formly.directive.mjs +9 -6
  88. package/esm2020/lib/formly/formly.form.component.mjs +127 -0
  89. package/esm2020/lib/formly/formly.module.mjs +11 -12
  90. package/esm2020/lib/formly/index.mjs +4 -2
  91. package/esm2020/lib/index.mjs +2 -1
  92. package/fesm2015/dereekb-dbx-form.mjs +1603 -898
  93. package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
  94. package/fesm2020/dereekb-dbx-form.mjs +1650 -880
  95. package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
  96. package/{src/lib → lib}/form/_form.scss +0 -0
  97. package/lib/form/action/form.action.directive.d.ts +3 -3
  98. package/lib/form/action/form.action.module.d.ts +4 -4
  99. package/lib/form/action/index.d.ts +1 -0
  100. package/lib/form/action/transition/form.action.transition.module.d.ts +8 -0
  101. package/lib/form/action/transition/form.action.transition.safety.directive.d.ts +20 -0
  102. package/lib/form/action/transition/index.d.ts +2 -0
  103. package/lib/form/form.d.ts +30 -19
  104. package/lib/form/form.module.d.ts +4 -5
  105. package/lib/form/index.d.ts +1 -3
  106. package/lib/form/{form.changes.directive.d.ts → io/form.changes.directive.d.ts} +1 -1
  107. package/lib/form/{form.input.directive.d.ts → io/form.input.directive.d.ts} +3 -3
  108. package/lib/form/io/form.io.module.d.ts +10 -0
  109. package/lib/form/io/form.loading.directive.d.ts +19 -0
  110. package/lib/form/io/index.d.ts +4 -0
  111. package/lib/form.module.d.ts +9 -0
  112. package/{src/lib → lib}/formly/_formly.scss +0 -0
  113. package/lib/formly/config/index.d.ts +1 -0
  114. package/lib/formly/config/validation.d.ts +19 -0
  115. package/{src/lib → lib}/formly/field/_field.scss +0 -0
  116. package/lib/formly/field/checklist/_checklist.scss +76 -0
  117. package/lib/formly/field/checklist/checklist.field.d.ts +45 -0
  118. package/lib/formly/field/checklist/checklist.item.field.component.d.ts +13 -12
  119. package/lib/formly/field/checklist/checklist.item.field.content.default.component.d.ts +1 -1
  120. package/lib/formly/field/checklist/checklist.item.field.d.ts +3 -47
  121. package/lib/formly/field/checklist/index.d.ts +1 -0
  122. package/{src/lib → lib}/formly/field/component/_component.scss +0 -0
  123. package/lib/formly/field/component/component.field.component.d.ts +6 -2
  124. package/lib/formly/field/field.d.ts +17 -3
  125. package/{src/lib → lib}/formly/field/fields_TODO.scss +0 -0
  126. package/lib/formly/field/form.field.module.d.ts +13 -0
  127. package/lib/formly/field/index.d.ts +2 -0
  128. package/{src/lib → lib}/formly/field/selection/_selection.scss +0 -0
  129. package/lib/formly/field/selection/index.d.ts +1 -0
  130. package/{src/lib → lib}/formly/field/selection/pickable/_pickable.scss +10 -1
  131. package/lib/formly/field/selection/pickable/index.d.ts +1 -0
  132. package/lib/formly/field/selection/pickable/pickable.chip.field.component.d.ts +3 -3
  133. package/lib/formly/field/selection/pickable/pickable.field.d.ts +13 -0
  134. package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +17 -13
  135. package/lib/formly/field/selection/pickable/pickable.field.module.d.ts +1 -1
  136. package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +27 -3
  137. package/lib/formly/field/selection/searchable/_searchable.scss +59 -0
  138. package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +7 -1
  139. package/lib/formly/field/selection/searchable/searchable.d.ts +6 -8
  140. package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +20 -14
  141. package/lib/formly/field/selection/searchable/searchable.field.d.ts +20 -11
  142. package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +33 -24
  143. package/lib/formly/field/selection/searchable/searchable.field.module.d.ts +1 -1
  144. package/lib/formly/field/selection/searchable/searchable.text.field.component.d.ts +11 -1
  145. package/lib/formly/field/selection/searchable/text.chip.field.d.ts +2 -2
  146. package/lib/formly/field/selection/selection.d.ts +1 -0
  147. package/lib/formly/field/selection/selection.module.d.ts +9 -0
  148. package/lib/formly/field/texteditor/_texteditor.scss +98 -0
  149. package/lib/formly/field/texteditor/index.d.ts +3 -0
  150. package/lib/formly/field/texteditor/texteditor.field.component.d.ts +26 -0
  151. package/lib/formly/field/texteditor/texteditor.field.d.ts +7 -0
  152. package/lib/formly/field/texteditor/texteditor.field.module.d.ts +14 -0
  153. package/{src/lib → lib}/formly/field/value/_value.scss +0 -0
  154. package/lib/formly/field/value/array/_array.scss +73 -0
  155. package/lib/formly/field/value/array/array.field.component.d.ts +22 -11
  156. package/lib/formly/field/value/array/array.field.d.ts +9 -0
  157. package/lib/formly/field/value/array/array.field.module.d.ts +6 -3
  158. package/lib/formly/field/value/array/index.d.ts +1 -0
  159. package/{src/lib → lib}/formly/field/value/boolean/_boolean.scss +0 -0
  160. package/lib/formly/field/value/boolean/boolean.field.d.ts +5 -5
  161. package/lib/formly/field/value/date/_date.scss +79 -0
  162. package/lib/formly/field/value/date/date.field.module.d.ts +2 -1
  163. package/lib/formly/field/value/date/datetime.field.component.d.ts +16 -13
  164. package/lib/formly/field/value/date/datetime.field.d.ts +14 -0
  165. package/lib/formly/field/value/date/index.d.ts +1 -1
  166. package/{src/lib → lib}/formly/field/value/enum/_enum.scss +0 -0
  167. package/lib/formly/field/value/enum/enum.field.d.ts +2 -2
  168. package/lib/formly/field/value/enum/enum.field.module.d.ts +6 -0
  169. package/lib/formly/field/value/enum/index.d.ts +1 -0
  170. package/lib/formly/field/value/hidden.field.d.ts +2 -2
  171. package/lib/formly/field/value/index.d.ts +1 -0
  172. package/lib/formly/field/value/phone/_phone.scss +55 -0
  173. package/lib/formly/field/value/phone/phone.field.component.d.ts +8 -14
  174. package/lib/formly/field/value/phone/phone.field.d.ts +20 -18
  175. package/lib/formly/field/value/phone/phone.field.module.d.ts +10 -8
  176. package/{src/lib → lib}/formly/field/value/text/_text.scss +0 -0
  177. package/lib/formly/field/value/text/index.d.ts +1 -0
  178. package/lib/formly/field/value/text/text.additional.field.d.ts +19 -0
  179. package/lib/formly/field/value/text/text.address.field.d.ts +8 -9
  180. package/lib/formly/field/value/text/text.field.d.ts +5 -33
  181. package/lib/formly/field/value/text/text.field.module.d.ts +3 -2
  182. package/lib/formly/field/value/value.module.d.ts +13 -0
  183. package/{src/lib → lib}/formly/field/wrapper/_wrapper.scss +15 -2
  184. package/lib/formly/field/wrapper/autotouch.wrapper.component.d.ts +2 -2
  185. package/lib/formly/field/wrapper/expandable.wrapper.component.d.ts +8 -37
  186. package/lib/formly/field/wrapper/expandable.wrapper.delegate.d.ts +36 -0
  187. package/lib/formly/field/wrapper/flex.wrapper.component.d.ts +19 -4
  188. package/lib/formly/field/wrapper/form.wrapper.module.d.ts +10 -8
  189. package/lib/formly/field/wrapper/index.d.ts +2 -2
  190. package/lib/formly/field/wrapper/info.wrapper.component.d.ts +9 -9
  191. package/lib/formly/field/wrapper/section.wrapper.component.d.ts +16 -5
  192. package/lib/formly/field/wrapper/style.wrapper.component.d.ts +22 -0
  193. package/lib/formly/field/wrapper/subsection.wrapper.component.d.ts +16 -5
  194. package/lib/formly/field/wrapper/toggle.wrapper.component.d.ts +6 -14
  195. package/lib/formly/field/wrapper/wrapper.d.ts +34 -0
  196. package/{src/lib → lib}/formly/form_TODO.scss +0 -0
  197. package/lib/formly/formly.context.d.ts +14 -22
  198. package/lib/formly/formly.context.directive.d.ts +17 -0
  199. package/lib/formly/formly.directive.d.ts +7 -3
  200. package/lib/formly/formly.form.component.d.ts +35 -0
  201. package/lib/formly/formly.module.d.ts +7 -6
  202. package/lib/formly/index.d.ts +3 -1
  203. package/lib/index.d.ts +1 -0
  204. package/{src/lib → lib}/layout/_layout.scss +0 -0
  205. package/{src/lib → lib}/style/_all-core.scss +0 -0
  206. package/{src/lib → lib}/style/_all-theme.scss +0 -0
  207. package/{src/lib → lib}/style/_all-typography.scss +0 -0
  208. package/{src/lib → lib}/style/_config.scss +0 -0
  209. package/{src/lib → lib}/style/_core.scss +0 -0
  210. package/{src/lib → lib}/style/_mixin.scss +0 -0
  211. package/{src/lib → lib}/style/_theming.scss +0 -0
  212. package/{src/lib → lib}/style/_variables.scss +0 -0
  213. package/package.json +14 -14
  214. package/esm2020/lib/form/form.changes.directive.mjs +0 -33
  215. package/esm2020/lib/form/form.input.directive.mjs +0 -49
  216. package/esm2020/lib/form/loading/form.loading.directive.mjs +0 -52
  217. package/esm2020/lib/form/loading/index.mjs +0 -2
  218. package/esm2020/lib/formly/field/value/date/date.field.mjs +0 -36
  219. package/esm2020/lib/formly/field/wrapper/flex.wrapper.layout.mjs +0 -20
  220. package/esm2020/lib/formly/field/wrapper/toggle.wrapper.mjs +0 -10
  221. package/esm2020/lib/formly/formly.component.mjs +0 -134
  222. package/lib/form/loading/form.loading.directive.d.ts +0 -19
  223. package/lib/form/loading/index.d.ts +0 -1
  224. package/lib/formly/field/value/date/date.field.d.ts +0 -13
  225. package/lib/formly/field/wrapper/flex.wrapper.layout.d.ts +0 -10
  226. package/lib/formly/field/wrapper/toggle.wrapper.d.ts +0 -7
  227. package/lib/formly/formly.component.d.ts +0 -36
  228. package/src/lib/formly/field/checklist/_checklist.scss +0 -26
  229. package/src/lib/formly/field/checklist/checklist.item_TODO.scss +0 -57
  230. package/src/lib/formly/field/selection/generic_TODO.scss +0 -36
  231. package/src/lib/formly/field/selection/searchable/_searchable.scss +0 -26
  232. package/src/lib/formly/field/texteditor/_texteditor.scss +0 -26
  233. package/src/lib/formly/field/texteditor/texteditor_TODO.scss +0 -32
  234. package/src/lib/formly/field/value/array/_array.scss +0 -26
  235. package/src/lib/formly/field/value/date/_date.scss +0 -26
  236. package/src/lib/formly/field/value/date/date_TODO.scss +0 -27
  237. package/src/lib/formly/field/value/phone/_phone.scss +0 -26
  238. package/src/lib/formly/field/value/phone/phone_TODO.scss +0 -10
  239. package/src/lib/formly/field/wrapper/wrapper_TODO.scss +0 -34
File without changes
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
4
4
  import { ReadableError } from '@dereekb/util';
5
5
  import { LockSet } from '@dereekb/rxjs';
6
- import { DbxForm } from '../../form/form';
6
+ import { DbxMutableForm } from '../../form/form';
7
7
  import * as i0 from "@angular/core";
8
8
  export interface DbxActionFormTriggerResult {
9
9
  value?: any;
@@ -20,7 +20,7 @@ export declare const APP_ACTION_FORM_DISABLED_KEY = "actionForm";
20
20
  * If the source is not considered modified, the trigger will be ignored.
21
21
  */
22
22
  export declare class DbxActionFormDirective<T = any> implements OnInit, OnDestroy {
23
- readonly form: DbxForm;
23
+ readonly form: DbxMutableForm;
24
24
  readonly source: ActionContextStoreSourceInstance<object, any>;
25
25
  readonly lockSet: LockSet;
26
26
  /**
@@ -34,7 +34,7 @@ export declare class DbxActionFormDirective<T = any> implements OnInit, OnDestro
34
34
  appActionFormModified?: DbxActionFormModifiedFn<T>;
35
35
  private _triggeredSub;
36
36
  private _isCompleteSub;
37
- constructor(form: DbxForm, source: ActionContextStoreSourceInstance<object, any>);
37
+ constructor(form: DbxMutableForm, source: ActionContextStoreSourceInstance<object, any>);
38
38
  ngOnInit(): void;
39
39
  ngOnDestroy(): void;
40
40
  protected preCheckReadyValue(value: T): Observable<boolean>;
@@ -2,8 +2,8 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./form.action.directive";
3
3
  import * as i2 from "@angular/common";
4
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>;
5
+ export declare class DbxFormActionModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormActionModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormActionModule, [typeof i1.DbxActionFormDirective], [typeof i2.CommonModule, typeof i3.MatDialogModule], [typeof i1.DbxActionFormDirective]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormActionModule>;
9
9
  }
@@ -1,2 +1,3 @@
1
+ export * from './transition';
1
2
  export * from './form.action.module';
2
3
  export * from './form.action.directive';
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./form.action.transition.safety.directive";
3
+ import * as i2 from "@angular/common";
4
+ export declare class DbxFormActionTransitionModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormActionTransitionModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormActionTransitionModule, [typeof i1.DbxActionFormSafetyDirective], [typeof i2.CommonModule], [typeof i1.DbxActionFormSafetyDirective]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormActionTransitionModule>;
8
+ }
@@ -0,0 +1,20 @@
1
+ import { ViewContainerRef } from '@angular/core';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import { HookResult, Transition, TransitionService } from '@uirouter/core';
4
+ import { ActionContextStoreSourceInstance } from '@dereekb/dbx-core';
5
+ import { DbxActionTransitionSafetyType, DbxActionTransitionSafetyDirective } from '@dereekb/dbx-web';
6
+ import { DbxActionFormDirective } from '../form.action.directive';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Extension of DbxActionTransitionSafetyDirective that forces the form to update first.
10
+ *
11
+ * NOTE: Only works with UIRouter
12
+ */
13
+ export declare class DbxActionFormSafetyDirective<T, O> extends DbxActionTransitionSafetyDirective<T, O> {
14
+ readonly appActionForm: DbxActionFormDirective<T>;
15
+ inputSafetyType?: DbxActionTransitionSafetyType;
16
+ constructor(appActionForm: DbxActionFormDirective<T>, source: ActionContextStoreSourceInstance<T, O>, transitionService: TransitionService, viewContainerRef: ViewContainerRef, dialog: MatDialog);
17
+ protected _handleOnBeforeTransition(transition: Transition): HookResult;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionFormSafetyDirective<any, any>, [{ host: true; }, null, null, null, null]>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionFormSafetyDirective<any, any>, "[dbxActionFormSafety]", never, { "inputSafetyType": "dbxActionFormSafety"; }, {}, never>;
20
+ }
@@ -0,0 +1,2 @@
1
+ export * from './form.action.transition.module';
2
+ export * from './form.action.transition.safety.directive';
@@ -1,14 +1,14 @@
1
1
  import { Provider, Type } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { LockSet } from '@dereekb/rxjs';
4
+ import { Maybe } from '@dereekb/util';
4
5
  /**
5
6
  * Current state of a DbxForm
6
7
  */
7
8
  export declare enum DbxFormState {
8
9
  INITIALIZING = -1,
9
- INCOMPLETE = 0,
10
- COMPLETE = 1,
11
- RESET = 2
10
+ RESET = 0,
11
+ USED = 1
12
12
  }
13
13
  /**
14
14
  * DbxForm stream event
@@ -20,32 +20,43 @@ export interface DbxFormEvent {
20
20
  readonly untouched?: boolean;
21
21
  readonly lastResetAt?: Date;
22
22
  readonly changesCount?: number;
23
+ readonly isDisabled?: boolean;
23
24
  }
24
25
  /**
25
26
  * Form that has an event stream, value, and state items.
26
27
  */
27
- export declare abstract class DbxForm {
28
+ export declare abstract class DbxForm<T = any> {
29
+ abstract readonly stream$: Observable<DbxFormEvent>;
30
+ /**
31
+ * Returns an observable that returns the current state of the form.
32
+ */
33
+ abstract getValue(): Observable<T>;
34
+ }
35
+ export declare abstract class DbxMutableForm<T = any> extends DbxForm<T> {
28
36
  /**
29
37
  * LockSet for the form.
30
38
  */
31
- abstract readonly lockSet: LockSet;
39
+ abstract readonly lockSet?: LockSet;
32
40
  /**
33
- * True if the form is complete/valid.
41
+ * Sets the initial value of the form, and resets the form.
42
+ *
43
+ * @param value
44
+ */
45
+ abstract setValue(value: Maybe<Partial<T>>): void;
46
+ /**
47
+ * Resets the form to the initial value.
34
48
  */
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
49
  abstract resetForm(): void;
50
+ /**
51
+ * Sets the form's disabled state.
52
+ *
53
+ * @param disabled
54
+ */
55
+ abstract setDisabled(disabled?: boolean): void;
56
+ /**
57
+ * Force the form to update itself as if it was changed.
58
+ */
41
59
  abstract forceFormUpdate(): void;
42
60
  }
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
61
  export declare function ProvideDbxForm<S extends DbxForm>(sourceType: Type<S>): Provider[];
62
+ export declare function ProvideDbxMutableForm<S extends DbxMutableForm>(sourceType: Type<S>): Provider[];
@@ -1,10 +1,9 @@
1
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";
2
+ import * as i1 from "./action/transition/form.action.transition.module";
3
+ import * as i2 from "./action/form.action.module";
4
+ import * as i3 from "./io/form.io.module";
6
5
  export declare class DbxFormModule {
7
6
  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]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormModule, never, never, [typeof i1.DbxFormActionTransitionModule, typeof i2.DbxFormActionModule, typeof i3.DbxFormIoModule]>;
9
8
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormModule>;
10
9
  }
@@ -1,6 +1,4 @@
1
1
  export * from './action';
2
- export * from './loading';
3
- export * from './form.changes.directive';
4
- export * from './form.input.directive';
2
+ export * from './io';
5
3
  export * from './form.module';
6
4
  export * from './form';
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
- import { DbxForm } from './form';
3
+ import { DbxForm } from '../form';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Used to see form value changes.
@@ -1,13 +1,13 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
- import { DbxForm } from '../form/form';
3
+ import { DbxMutableForm } from '../form';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Used with a FormComponent to set the value based on the input value.
7
7
  */
8
8
  export declare class DbxFormSourceDirective<T extends object = any> extends AbstractSubscriptionDirective {
9
- readonly form: DbxForm;
10
- constructor(form: DbxForm);
9
+ readonly form: DbxMutableForm;
10
+ constructor(form: DbxMutableForm);
11
11
  /**
12
12
  * Sets a LoadingContext that is watched for the loading state.
13
13
  */
@@ -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 "./form.loading.directive";
5
+ import * as i4 from "@angular/common";
6
+ export declare class DbxFormIoModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormIoModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormIoModule, [typeof i1.DbxFormSourceDirective, typeof i2.DbxFormValueChangesDirective, typeof i3.DbxFormLoadingSourceDirective], [typeof i4.CommonModule], [typeof i1.DbxFormSourceDirective, typeof i2.DbxFormValueChangesDirective, typeof i3.DbxFormLoadingSourceDirective]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormIoModule>;
10
+ }
@@ -0,0 +1,19 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
3
+ import { DbxMutableForm } 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 DbxFormLoadingSourceDirective<T extends object = any> extends AbstractSubscriptionDirective {
10
+ readonly form: DbxMutableForm;
11
+ constructor(form: DbxMutableForm);
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<DbxFormLoadingSourceDirective<any>, [{ host: true; }]>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFormLoadingSourceDirective<any>, "[dbxFormLoadingSource]", never, { "obs": "dbxFormLoadingSource"; }, {}, never>;
19
+ }
@@ -0,0 +1,4 @@
1
+ export * from './form.loading.directive';
2
+ export * from './form.changes.directive';
3
+ export * from './form.input.directive';
4
+ export * from './form.io.module';
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./form/form.module";
3
+ import * as i2 from "./formly/formly.module";
4
+ import * as i3 from "./formly/field/form.field.module";
5
+ export declare class DbxFormExtensionModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormExtensionModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormExtensionModule, never, never, [typeof i1.DbxFormModule, typeof i2.DbxFormlyModule, typeof i3.DbxFormFormlyFieldModule]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormExtensionModule>;
9
+ }
File without changes
@@ -0,0 +1 @@
1
+ export * from './validation';
@@ -0,0 +1,19 @@
1
+ import { FieldTypeConfig } from '@ngx-formly/core';
2
+ import { ValidationMessageOption } from '@ngx-formly/core/lib/models';
3
+ export declare function minLengthValidationMessage(err: any, field: FieldTypeConfig): string;
4
+ export declare function maxLengthValidationMessage(err: any, field: FieldTypeConfig): string;
5
+ export declare function minValidationMessage(err: any, field: FieldTypeConfig): string;
6
+ export declare function maxValidationMessage(err: any, field: FieldTypeConfig): string;
7
+ export declare const REQUIRED_VALIDATION_MESSAGE: {
8
+ name: string;
9
+ message: string;
10
+ };
11
+ export declare const MIN_LENGTH_VALIDATION_MESSAGE: ValidationMessageOption;
12
+ export declare const MAX_LENGTH_VALIDATION_MESSAGE: ValidationMessageOption;
13
+ export declare const MIN_VALIDATION_MESSAGE: ValidationMessageOption;
14
+ export declare const MAX_VALIDATION_MESSAGE: ValidationMessageOption;
15
+ export declare const INVALID_PHONE_NUMBER_MESSAGE: {
16
+ name: string;
17
+ message: string;
18
+ };
19
+ export declare function defaultValidationMessages(): ValidationMessageOption[];
File without changes
@@ -0,0 +1,76 @@
1
+ @use '../../../style/theming';
2
+
3
+ // MARK: Variables
4
+ $dbx-checklist-item-spacing: 8px;
5
+
6
+ // MARK: Mixin
7
+ @mixin core() {
8
+
9
+ .dbx-checklist-item {
10
+ @include theming.elevation(1);
11
+ margin-bottom: 8px;
12
+
13
+ display: flex;
14
+ flex-direction: row;
15
+ align-items: center;
16
+ justify-content: left;
17
+
18
+ .dbx-checklist-item-check {
19
+ flex: auto 0 0;
20
+ // margin-right: $dbx-checklist-item-spacing;
21
+ padding: 12px;
22
+ }
23
+
24
+ .dbx-checklist-item-content-wrapper {
25
+ height: 100%;
26
+ width: 100%;
27
+ }
28
+
29
+ .dbx-checklist-item-content {
30
+ display: flex;
31
+ align-items: center;
32
+
33
+ min-height: 44px;
34
+ flex: auto 1 1;
35
+ padding: $dbx-checklist-item-spacing 0;
36
+ padding-left: $dbx-checklist-item-spacing;
37
+ border-left: 1px solid black;
38
+ }
39
+
40
+ }
41
+
42
+ }
43
+
44
+ @mixin color($theme-config) {}
45
+
46
+ @mixin typography($typography-config) {
47
+
48
+ .dbx-default-checklist-item-field {
49
+
50
+ .item-label {
51
+ font-size: 1.35em;
52
+ line-height: 1.35em;
53
+ }
54
+
55
+ .item-sublabel {}
56
+
57
+ .item-description {}
58
+
59
+ }
60
+
61
+ }
62
+
63
+ @mixin theme($theme-config) {
64
+ @include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-form-field-checklist') {
65
+ $color: theming.get-color-config($theme-config);
66
+ $typography: theming.get-typography-config($theme-config);
67
+
68
+ @if $color !=null {
69
+ @include color($theme-config);
70
+ }
71
+
72
+ @if $typography !=null {
73
+ @include typography($typography);
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,45 @@
1
+ import { Observable } from 'rxjs';
2
+ import { FormlyFieldConfig } from '@ngx-formly/core';
3
+ import { ChecklistItemDisplayContent, ChecklistItemFieldDisplayContentObs } from './checklist.item';
4
+ import { KeyValueTransformMap, Maybe } from '@dereekb/util';
5
+ import { ChecklistItemFieldBuilderInput } from './checklist.item.field';
6
+ export declare type ChecklistItemFieldDataSetFieldKey<D> = keyof D & string;
7
+ export declare type ChecklistItemFieldDataSetFieldValueForKey<D, K extends keyof D = keyof D> = D[K];
8
+ export declare type ChecklistType<D> = KeyValueTransformMap<D, boolean>;
9
+ export declare type ChecklistItemFieldDataSetBuilderInput<D, T> = {
10
+ key: ChecklistItemFieldDataSetFieldKey<D>;
11
+ } & ChecklistItemFieldBuilderInput<T>;
12
+ export interface ChecklistItemFieldDataSetItem<D, T extends ChecklistType<D>> {
13
+ /**
14
+ * Key for the field.
15
+ */
16
+ key: ChecklistItemFieldDataSetFieldKey<T>;
17
+ /**
18
+ * Base field configuration to use.
19
+ */
20
+ field: ChecklistItemFieldBuilderInput<T>;
21
+ }
22
+ /**
23
+ * Used for building a set of configurations for a data-type object that has as second object that is used as a checklist.
24
+ */
25
+ export declare class ChecklistItemFieldDataSetBuilder<D extends object, C extends ChecklistType<D> = ChecklistType<D>> {
26
+ readonly dataObs: Observable<D>;
27
+ private _fields;
28
+ readonly dataObs$: Observable<D>;
29
+ constructor(dataObs: Observable<D>);
30
+ /**
31
+ * Merges the input config with existing configuration.
32
+ *
33
+ * The displayContentObs, if provided, will merge with the existing observable and the two objects merged.
34
+ */
35
+ merge<T>(key: ChecklistItemFieldDataSetFieldKey<D>, config: Partial<ChecklistItemFieldBuilderInput<T>>): void;
36
+ override<T>(key: ChecklistItemFieldDataSetFieldKey<D>, config: Partial<ChecklistItemFieldBuilderInput<T>>): void;
37
+ _assertFieldExists(key: ChecklistItemFieldDataSetFieldKey<D>): ChecklistItemFieldDataSetItem<D, any>;
38
+ showValueFieldArrayCount<T extends ChecklistItemFieldDataSetFieldValueForKey<D> & Array<any>>(key: ChecklistItemFieldDataSetFieldKey<D>, config?: Partial<ChecklistItemFieldDataSetBuilderInput<D, T>>): void;
39
+ showValueField<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: ChecklistItemFieldDataSetFieldKey<D>, config?: Partial<ChecklistItemFieldDataSetBuilderInput<D, T>>, labelFn?: (value: T) => Maybe<string>): void;
40
+ field<T>(config: ChecklistItemFieldDataSetBuilderInput<D, T>): void;
41
+ build(): FormlyFieldConfig[];
42
+ customContentFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(mapFn: (data: D) => ChecklistItemDisplayContent): ChecklistItemFieldDisplayContentObs<T>;
43
+ contentWithValueFromData<K extends keyof D = keyof D, T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: K, contentFn?: (value: T) => ChecklistItemDisplayContent): ChecklistItemFieldDisplayContentObs<T>;
44
+ contentWithDisplayValueFromData<T extends ChecklistItemFieldDataSetFieldValueForKey<D> = ChecklistItemFieldDataSetFieldValueForKey<D>>(key: ChecklistItemFieldDataSetFieldKey<D>, labelFn?: (value: T) => Maybe<string>): ChecklistItemFieldDisplayContentObs<T>;
45
+ }
@@ -1,6 +1,8 @@
1
- import { ComponentFactoryResolver, NgZone, OnDestroy, OnInit, Type, ViewContainerRef } from '@angular/core';
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { DbxInjectedComponentConfig } from '@dereekb/dbx-core';
3
+ import { OnDestroy, OnInit, Type } from '@angular/core';
2
4
  import { ValidationErrors, FormGroup } from '@angular/forms';
3
- import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
5
+ import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
4
6
  import { ChecklistItemFieldDisplayComponent, ChecklistItemFieldDisplayContentObs } from './checklist.item';
5
7
  import { AbstractSubscriptionDirective } from '@dereekb/dbx-core';
6
8
  import { Maybe } from '@dereekb/util';
@@ -15,18 +17,20 @@ export interface DbxChecklistItemFieldConfig<T = any> {
15
17
  */
16
18
  componentClass?: Type<ChecklistItemFieldDisplayComponent<T>>;
17
19
  }
18
- export interface ChecklistItemFormlyFieldConfig<T = any> extends DbxChecklistItemFieldConfig<T>, FormlyFieldConfig {
20
+ export interface ChecklistItemFormlyFieldConfig<T = any> extends FormlyFieldConfig {
21
+ checklistField: DbxChecklistItemFieldConfig<T>;
19
22
  }
20
- export declare class DbxChecklistItemFieldComponent<T = any> extends FieldType<ChecklistItemFormlyFieldConfig<T>> implements OnInit, OnDestroy {
23
+ export declare class DbxChecklistItemFieldComponent<T = any> extends FieldType<ChecklistItemFormlyFieldConfig<T> & FieldTypeConfig> implements OnInit, OnDestroy {
21
24
  private _displayContent;
22
25
  readonly displayContent$: import("rxjs").Observable<import("./checklist.item").ChecklistItemDisplayContent<T>>;
23
26
  readonly anchor$: import("rxjs").Observable<Maybe<import("@dereekb/dbx-core").ClickableAnchor>>;
24
27
  readonly rippleDisabled$: import("rxjs").Observable<boolean>;
25
28
  get formGroup(): FormGroup;
26
- get checkboxFieldKey(): string;
29
+ get formControlName(): string;
27
30
  get label(): Maybe<string>;
28
31
  get description(): Maybe<string>;
29
32
  get required(): Maybe<boolean>;
33
+ get checklistField(): DbxChecklistItemFieldConfig<T>;
30
34
  get errors(): Maybe<ValidationErrors>;
31
35
  get componentClass(): Type<ChecklistItemFieldDisplayComponent<T>>;
32
36
  ngOnInit(): void;
@@ -34,14 +38,11 @@ export declare class DbxChecklistItemFieldComponent<T = any> extends FieldType<C
34
38
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemFieldComponent<any>, never>;
35
39
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxChecklistItemFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
36
40
  }
37
- export declare class DbxChecklistItemContentComponent<T = any> extends AbstractSubscriptionDirective implements OnInit {
41
+ export declare class DbxChecklistItemContentComponent<T = any> extends AbstractSubscriptionDirective {
38
42
  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);
43
+ readonly cdRef: ChangeDetectorRef;
44
+ config?: DbxInjectedComponentConfig;
45
+ constructor(checklistItemFieldComponent: DbxChecklistItemFieldComponent<T>, cdRef: ChangeDetectorRef);
45
46
  ngOnInit(): void;
46
47
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxChecklistItemContentComponent<any>, never>;
47
48
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxChecklistItemContentComponent<any>, "dbx-checklist-item-content-component", never, {}, {}, never, never>;
@@ -1,7 +1,7 @@
1
1
  import { ChecklistItemDisplayContent, ChecklistItemFieldDisplayComponent } from './checklist.item';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class DbxDefaultChecklistItemFieldDisplayComponent implements ChecklistItemFieldDisplayComponent<any> {
4
- displayContent?: ChecklistItemDisplayContent<any>;
4
+ displayContent: ChecklistItemDisplayContent<any>;
5
5
  get label(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
6
6
  get sublabel(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
7
7
  get description(): import("../../../../../../../dist/packages/util/src").Maybe<string>;
@@ -1,50 +1,6 @@
1
- import { Observable } from 'rxjs';
2
- import { FormlyFieldConfig } from '@ngx-formly/core';
3
- import { FieldConfig } from '../field';
1
+ import { LabeledFieldConfig } from '../field';
4
2
  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> {
3
+ export interface ChecklistItemFieldConfig<T = any> extends LabeledFieldConfig, DbxChecklistItemFieldConfig<T> {
8
4
  }
9
5
  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
- }
6
+ export declare function checklistItemField<T = any>(config: ChecklistItemFieldBuilderInput<T>): ChecklistItemFormlyFieldConfig<T>;
@@ -3,3 +3,4 @@ export * from './checklist.item.field.content.default.component';
3
3
  export * from './checklist.item.field.module';
4
4
  export * from './checklist.item.field';
5
5
  export * from './checklist.item';
6
+ export * from './checklist.field';
@@ -10,12 +10,16 @@ export declare abstract class AbstractFormComponentFieldWrappedComponent impleme
10
10
  abstract field: FieldType<FormComponentFieldFieldConfig>;
11
11
  }
12
12
  export interface FormComponentFieldFieldConfig<T extends FormComponentFieldWrappedComponent = any> extends FormlyFieldConfig {
13
- componentClass: Type<T>;
13
+ componentField: {
14
+ componentClass: Type<T>;
15
+ };
14
16
  }
15
17
  export declare class FormComponentFieldComponent<T extends FormComponentFieldWrappedComponent = any> extends FieldType<FormComponentFieldFieldConfig<T>> implements OnInit {
16
18
  private _config?;
17
19
  get config(): Maybe<DbxInjectedComponentConfig>;
18
- constructor();
20
+ get componentField(): {
21
+ componentClass: Type<T>;
22
+ };
19
23
  ngOnInit(): void;
20
24
  static ɵfac: i0.ɵɵFactoryDeclaration<FormComponentFieldComponent<any>, never>;
21
25
  static ɵcmp: i0.ɵɵComponentDeclaration<FormComponentFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
@@ -1,11 +1,20 @@
1
- import { FormlyFieldConfig } from '@ngx-formly/core';
1
+ import { FormlyFieldConfig, FormlyTemplateOptions } from '@ngx-formly/core';
2
2
  export interface FieldConfig {
3
+ key: string;
4
+ required?: boolean;
5
+ readonly?: boolean;
6
+ }
7
+ export declare type DisableAutocompleteForField = false;
8
+ export interface LabeledFieldConfig extends FieldConfig {
3
9
  key: string;
4
10
  label?: string;
5
11
  placeholder?: string;
6
12
  required?: boolean;
7
13
  readonly?: boolean;
8
- autocomplete?: string;
14
+ /**
15
+ * Sets the autocomplete values.
16
+ */
17
+ autocomplete?: string | DisableAutocompleteForField;
9
18
  }
10
19
  export interface DefaultValueFieldConfig<T = any> {
11
20
  defaultValue?: T;
@@ -18,14 +27,19 @@ export interface AttributesFieldConfig {
18
27
  export interface DescriptionFieldConfig {
19
28
  description?: string;
20
29
  }
30
+ export declare type PartialPotentialFieldConfig = Partial<FieldConfig> & Partial<LabeledFieldConfig> & Partial<AttributesFieldConfig> & Partial<DescriptionFieldConfig>;
21
31
  /**
22
32
  * Validates the configuration on the input field.
23
33
  */
24
34
  export declare function formlyField<T extends FormlyFieldConfig = FormlyFieldConfig>(fieldConfig: T): T;
35
+ export declare function templateOptionsForFieldConfig(fieldConfig: Partial<FieldConfig> & Partial<LabeledFieldConfig> & Partial<AttributesFieldConfig> & Partial<DescriptionFieldConfig>, override?: any): {
36
+ templateOptions: Partial<FormlyTemplateOptions>;
37
+ };
38
+ export declare function templateOptionsValueForFieldConfig<T extends FormlyTemplateOptions>(fieldConfig: PartialPotentialFieldConfig, override?: PartialPotentialFieldConfig & unknown): Partial<T>;
25
39
  /**
26
40
  * Returns configuration for a formlyField that will disable autofill/autocomplete for a field.
27
41
  */
28
- export declare function disableFormlyFieldAutofill(): {
42
+ export declare function disableFormlyFieldAutofillAttributes(): {
29
43
  name: string;
30
44
  autocomplete: string;
31
45
  };
File without changes
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "./checklist/checklist.item.field.module";
4
+ import * as i3 from "./component/component.field.module";
5
+ import * as i4 from "./selection/selection.module";
6
+ import * as i5 from "./texteditor/texteditor.field.module";
7
+ import * as i6 from "./value/value.module";
8
+ import * as i7 from "./wrapper/form.wrapper.module";
9
+ export declare class DbxFormFormlyFieldModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyFieldModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyFieldModule, never, [typeof i1.CommonModule], [typeof i2.DbxFormFormlyChecklistItemFieldModule, typeof i3.DbxFormFormlyComponentFieldModule, typeof i4.DbxFormFormlySelectionModule, typeof i5.DbxFormFormlyTextEditorFieldModule, typeof i6.DbxFormFormlyValueModule, typeof i7.DbxFormFormlyWrapperModule]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyFieldModule>;
13
+ }
@@ -1,6 +1,8 @@
1
1
  export * from './checklist';
2
2
  export * from './component';
3
3
  export * from './selection';
4
+ export * from './texteditor';
4
5
  export * from './value';
5
6
  export * from './wrapper';
6
7
  export * from './field';
8
+ export * from './form.field.module';