@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,11 @@
1
+ import { MatSelectionListChange } from "@angular/material/list";
2
+ import { AbstractDbxPickableItemFieldDirective } from "./pickable.field.directive";
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Used for picking pre-set values using a selection list as the presentation.
6
+ */
7
+ export declare class DbxPickableListFieldComponent<T> extends AbstractDbxPickableItemFieldDirective<T> {
8
+ matSelectionChanged(selection: MatSelectionListChange): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxPickableListFieldComponent<any>, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxPickableListFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
11
+ }
@@ -0,0 +1,8 @@
1
+ export * from './searchable.chip.field.component';
2
+ export * from './searchable.field.autocomplete.item.component';
3
+ export * from './searchable.field.directive';
4
+ export * from './searchable.field';
5
+ export * from './searchable.field.module';
6
+ export * from './searchable.text.field.component';
7
+ export * from './searchable';
8
+ export * from './text.chip.field';
@@ -0,0 +1,16 @@
1
+ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
2
+ import { MatChipInputEvent } from '@angular/material/chips';
3
+ import { AbstractDbxSearchableValueFieldDirective, SearchableValueFieldsFieldConfig, SearchableValueFieldsFormlyFieldConfig } from './searchable.field.directive';
4
+ import * as i0 from "@angular/core";
5
+ export interface SearchableChipValueFieldsFieldConfig<T> extends SearchableValueFieldsFieldConfig<T> {
6
+ }
7
+ export interface SearchableChipValueFieldsFormlyFieldConfig<T> extends SearchableChipValueFieldsFieldConfig<T>, SearchableValueFieldsFormlyFieldConfig<T> {
8
+ }
9
+ export declare class DbxSearchableChipFieldComponent<T> extends AbstractDbxSearchableValueFieldDirective<T, SearchableChipValueFieldsFormlyFieldConfig<T>> {
10
+ readonly separatorKeysCodes: number[];
11
+ selected(event: MatAutocompleteSelectedEvent): void;
12
+ tabPressedOnInput(event: KeyboardEvent): boolean;
13
+ addChip(event: MatChipInputEvent): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxSearchableChipFieldComponent<any>, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxSearchableChipFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
16
+ }
@@ -0,0 +1,40 @@
1
+ import { ClickableAnchor } from '@dereekb/dbx-core';
2
+ import { Type } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+ import { SelectionDisplayValue, SelectionValue, SelectionValueHashFn } from '../selection';
5
+ export interface SearchableFieldDisplayComponent<T> {
6
+ displayValue?: SearchableValueFieldDisplayValue<T>;
7
+ }
8
+ export interface SearchableValueFieldValue<T, M = any> extends SelectionValue<T, M> {
9
+ /**
10
+ * Optional anchor metadata on the field.
11
+ */
12
+ anchor?: ClickableAnchor;
13
+ }
14
+ /**
15
+ * Displayed value.
16
+ */
17
+ export interface SearchableValueFieldDisplayValue<T, M = any> extends SelectionDisplayValue<T, M>, SearchableValueFieldValue<T, M> {
18
+ sublabel?: string;
19
+ /**
20
+ * Custom component class to use.
21
+ */
22
+ componentClass?: Type<SearchableFieldDisplayComponent<T>>;
23
+ }
24
+ /**
25
+ * SearchableValueField function for searching values.
26
+ */
27
+ export declare type SearchableValueFieldStringSearchFn<T> = (search: string) => Observable<SearchableValueFieldValue<T>[]>;
28
+ /**
29
+ * SearchableValueField function that allows the values a chance to go through another observable for any changes.
30
+ *
31
+ * An example usage is passing an email address, then getting back metadata that can be used to show the values.
32
+ *
33
+ * The value itself should not change. All other fields on the value may change, however.
34
+ */
35
+ export declare type SearchableValueFieldDisplayFn<T> = (values: SearchableValueFieldValue<T>[]) => Observable<SearchableValueFieldDisplayValue<T>[]>;
36
+ /**
37
+ * SearchableValueField function for setting anchor values on a field value.
38
+ */
39
+ export declare type SearchableValueFieldAnchorFn<T> = (value: SearchableValueFieldValue<T>) => ClickableAnchor;
40
+ export declare type SearchableValueFieldHashFn<T> = SelectionValueHashFn<T>;
@@ -0,0 +1,20 @@
1
+ import { OnInit, ViewContainerRef } from '@angular/core';
2
+ import { SearchableFieldDisplayComponent, SearchableValueFieldDisplayValue } from './searchable';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DbxSearchableFieldAutocompleteItemComponent<T> implements OnInit {
5
+ content: ViewContainerRef;
6
+ displayValue?: SearchableValueFieldDisplayValue<T>;
7
+ ngOnInit(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxSearchableFieldAutocompleteItemComponent<any>, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxSearchableFieldAutocompleteItemComponent<any>, "dbx-searchable-field-autocomplete-item", never, { "displayValue": "displayValue"; }, {}, never, never>;
10
+ }
11
+ export declare class DbxDefaultSearchableFieldDisplayComponent<T> implements SearchableFieldDisplayComponent<T> {
12
+ displayValue: SearchableValueFieldDisplayValue<T>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxDefaultSearchableFieldDisplayComponent<any>, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxDefaultSearchableFieldDisplayComponent<any>, "dbx-default-searchable-field-display", never, { "displayValue": "displayValue"; }, {}, never, never>;
15
+ }
16
+ export declare class DbxDefaultSearchableAnchorFieldDisplayComponent<T> implements SearchableFieldDisplayComponent<T> {
17
+ displayValue: SearchableValueFieldDisplayValue<T>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxDefaultSearchableAnchorFieldDisplayComponent<any>, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxDefaultSearchableAnchorFieldDisplayComponent<any>, "ng-component", never, { "displayValue": "displayValue"; }, {}, never, never>;
20
+ }
@@ -0,0 +1,16 @@
1
+ import { Observable } from 'rxjs';
2
+ import { FieldConfig } from '../../field';
3
+ import { SearchableValueFieldDisplayFn, SearchableValueFieldDisplayValue, SearchableValueFieldValue } from './searchable';
4
+ import { SearchableChipValueFieldsFieldConfig, SearchableChipValueFieldsFormlyFieldConfig } from './searchable.chip.field.component';
5
+ import { SearchableTextValueFieldsFieldConfig, SearchableTextValueFieldsFormlyFieldConfig } from './searchable.text.field.component';
6
+ export declare function makeMetaFilterSearchableFieldValueDisplayFn<T = string | number>(loadMetaForValues: (values: SearchableValueFieldValue<T>[]) => Observable<SearchableValueFieldValue<T>[]>, makeDisplayForValues: (values: SearchableValueFieldValue<T>[]) => SearchableValueFieldDisplayValue<T>[]): SearchableValueFieldDisplayFn<T>;
7
+ export interface SearchableChipFieldConfig<T = any> extends FieldConfig, SearchableChipValueFieldsFieldConfig<T> {
8
+ }
9
+ export interface SearchableChipFieldFormlyConfig<T = any> extends Omit<SearchableChipValueFieldsFormlyFieldConfig<T>, 'type'> {
10
+ }
11
+ export declare function searchableChipField<C extends SearchableChipFieldFormlyConfig<any>>(config: C): C;
12
+ export interface SearchableTextFieldConfig<T = any> extends FieldConfig, SearchableTextValueFieldsFieldConfig<T> {
13
+ }
14
+ export interface SearchableTextFieldFormlyConfig<T = any> extends Omit<SearchableTextValueFieldsFormlyFieldConfig<T>, 'type'> {
15
+ }
16
+ export declare function searchableTextField<C extends SearchableTextFieldFormlyConfig<any>>(config: C): C;
@@ -0,0 +1,131 @@
1
+ import { SubscriptionObject, LoadingState, LoadingStateContextInstance } from '@dereekb/rxjs';
2
+ import { ElementRef, OnDestroy, OnInit, Type } from '@angular/core';
3
+ import { AbstractControl, FormControl, ValidatorFn } from '@angular/forms';
4
+ import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
5
+ import { Observable } from 'rxjs';
6
+ import { SearchableValueFieldHashFn, SearchableValueFieldStringSearchFn, SearchableValueFieldDisplayFn, SearchableValueFieldDisplayValue, SearchableValueFieldValue, SearchableFieldDisplayComponent, SearchableValueFieldAnchorFn } from './searchable';
7
+ import { Maybe } from '@dereekb/util';
8
+ import * as i0 from "@angular/core";
9
+ export interface StringValueFieldsFieldConfig {
10
+ /**
11
+ * Custom input validators.
12
+ */
13
+ textInputValidator?: ValidatorFn | ValidatorFn[];
14
+ /**
15
+ * Optional description/hint to display.
16
+ */
17
+ description?: string;
18
+ }
19
+ export interface StringValueFieldsFormlyFieldConfig extends StringValueFieldsFieldConfig, FormlyFieldConfig {
20
+ }
21
+ export interface SearchableValueFieldsFieldConfig<T> extends StringValueFieldsFieldConfig {
22
+ /**
23
+ * Whether or not to allow string values to be used directly, or if values can only be chosen from searching.
24
+ */
25
+ allowStringValues?: boolean;
26
+ /**
27
+ * Optional conversion function. If provided, allowStringValues is considered true.
28
+ */
29
+ convertStringValue?: (text: string) => T;
30
+ /**
31
+ * Used for hashing display values and omitting repeat values.
32
+ *
33
+ * If hashForValue is not provided, the value's value will be used as is.
34
+ */
35
+ hashForValue?: SearchableValueFieldHashFn<T>;
36
+ /**
37
+ * Performs a search.
38
+ */
39
+ search: SearchableValueFieldStringSearchFn<T>;
40
+ /**
41
+ * Whether or not to allow searches on empty text. Is false by default.
42
+ */
43
+ searchOnEmptyText?: boolean;
44
+ /**
45
+ * Custom component class to use by default.
46
+ */
47
+ componentClass?: Type<SearchableFieldDisplayComponent<T>>;
48
+ /**
49
+ * Used for building a display value given the input.
50
+ */
51
+ displayForValue: SearchableValueFieldDisplayFn<T>;
52
+ /**
53
+ * Whether or not to use the anchor field on value elements.
54
+ *
55
+ * This has no default effect if a component class is provided.
56
+ */
57
+ useAnchor?: boolean;
58
+ /**
59
+ * Used for retrieving an anchor value for values that have no anchor value set.
60
+ *
61
+ * Only used when useAnchor is true.
62
+ */
63
+ anchorForValue?: SearchableValueFieldAnchorFn<T>;
64
+ }
65
+ export interface SearchableValueFieldsFormlyFieldConfig<T> extends SearchableValueFieldsFieldConfig<T>, FormlyFieldConfig {
66
+ }
67
+ /**
68
+ * Abstract searchable field that provides a feature for searching for values, and for displaying values using Observables.
69
+ *
70
+ * Display values are cached for performance.
71
+ */
72
+ export declare abstract class AbstractDbxSearchableValueFieldDirective<T, C extends SearchableValueFieldsFormlyFieldConfig<T>> extends FieldType<C> implements OnInit, OnDestroy {
73
+ /**
74
+ * Whether or not to set/get values as an array.
75
+ */
76
+ multiSelect: boolean;
77
+ defaultComponentClass?: Type<SearchableFieldDisplayComponent<T>>;
78
+ textInput: ElementRef<HTMLInputElement>;
79
+ readonly inputCtrl: FormControl;
80
+ private _formControlObs;
81
+ readonly formControl$: Observable<AbstractControl>;
82
+ private _displayHashMap;
83
+ readonly inputValue$: Observable<string>;
84
+ readonly inputValueString$: Observable<string>;
85
+ readonly searchResultsState$: Observable<LoadingState<any> | LoadingState<SearchableValueFieldDisplayValue<T, any>[]>>;
86
+ readonly singleValueSyncSubscription: SubscriptionObject;
87
+ readonly searchContext: LoadingStateContextInstance<any, LoadingState<any> | LoadingState<SearchableValueFieldDisplayValue<T, any>[]>>;
88
+ readonly searchResults$: Observable<SearchableValueFieldDisplayValue<T>[]>;
89
+ readonly _formControlValue: Observable<T | T[]>;
90
+ readonly values$: Observable<T[]>;
91
+ readonly displayValuesState$: Observable<LoadingState<SearchableValueFieldDisplayValue<T>[]>>;
92
+ readonly displayValues$: Observable<SearchableValueFieldDisplayValue<T>[]>;
93
+ get name(): string;
94
+ get label(): Maybe<string>;
95
+ get readonly(): Maybe<boolean>;
96
+ get searchOnEmptyText(): boolean;
97
+ get required(): Maybe<boolean>;
98
+ get autocomplete(): string;
99
+ get placeholder(): string;
100
+ get description(): Maybe<string>;
101
+ get hashForValue(): SearchableValueFieldHashFn<T>;
102
+ get displayForValue(): SearchableValueFieldDisplayFn<T>;
103
+ get useAnchor(): Maybe<boolean>;
104
+ get anchorForValue(): Maybe<SearchableValueFieldAnchorFn<T>>;
105
+ get componentClass(): Maybe<Type<SearchableFieldDisplayComponent<T>>>;
106
+ get search(): SearchableValueFieldStringSearchFn<T>;
107
+ get values(): T[];
108
+ get allowStringValues(): boolean;
109
+ get convertStringValue(): Maybe<(text: string) => T>;
110
+ loadDisplayValuesForValues(values: T[]): Observable<LoadingState<SearchableValueFieldDisplayValue<T>[]>>;
111
+ loadDisplayValuesForFieldValues(values: SearchableValueFieldValue<T>[]): Observable<LoadingState<SearchableValueFieldDisplayValue<T>[]>>;
112
+ getDisplayValuesForFieldValues(values: SearchableValueFieldValue<T>[]): Observable<SearchableValueFieldDisplayValue<T>[]>;
113
+ ngOnInit(): void;
114
+ ngOnDestroy(): void;
115
+ /**
116
+ * Used to sync the input control with the selected value.
117
+ *
118
+ * Only used when multiSelect is false.
119
+ */
120
+ protected _syncSingleValue(value: SearchableValueFieldDisplayValue<T>): void;
121
+ protected _addWithTextValue(text: string): void;
122
+ addWithDisplayValue(displayValue: SearchableValueFieldDisplayValue<T>): void;
123
+ removeWithDisplayValue(displayValue: SearchableValueFieldDisplayValue<T>): void;
124
+ addValue(value: T): void;
125
+ removeValue(value: T): void;
126
+ setValues(values: T[]): void;
127
+ protected _getValueOnFormControl(valueOnFormControl: any): T[];
128
+ protected _setValueOnFormControl(values: T[]): void;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxSearchableValueFieldDirective<any, any>, never>;
130
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxSearchableValueFieldDirective<any, any>, never, never, {}, {}, never>;
131
+ }
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./searchable.chip.field.component";
3
+ import * as i2 from "./searchable.text.field.component";
4
+ import * as i3 from "./searchable.field.autocomplete.item.component";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@dereekb/dbx-web";
7
+ import * as i6 from "@angular/forms";
8
+ import * as i7 from "@angular/material/button";
9
+ import * as i8 from "@angular/material/input";
10
+ import * as i9 from "@angular/material/form-field";
11
+ import * as i10 from "@angular/material/autocomplete";
12
+ import * as i11 from "@angular/material/list";
13
+ import * as i12 from "@dereekb/dbx-core";
14
+ import * as i13 from "@angular/material/chips";
15
+ import * as i14 from "@angular/material/icon";
16
+ import * as i15 from "@ngx-formly/core";
17
+ export declare class DbxFormFormlySearchableFieldModule {
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlySearchableFieldModule, never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlySearchableFieldModule, [typeof i1.DbxSearchableChipFieldComponent, typeof i2.DbxSearchableTextFieldComponent, typeof i3.DbxSearchableFieldAutocompleteItemComponent, typeof i3.DbxDefaultSearchableFieldDisplayComponent, typeof i3.DbxDefaultSearchableAnchorFieldDisplayComponent], [typeof i4.CommonModule, typeof i5.DbxTextModule, typeof i5.DbxLoadingModule, typeof i5.DbxButtonModule, typeof i6.FormsModule, typeof i7.MatButtonModule, typeof i8.MatInputModule, typeof i9.MatFormFieldModule, typeof i6.ReactiveFormsModule, typeof i10.MatAutocompleteModule, typeof i11.MatListModule, typeof i12.DbxDatePipeModule, typeof i5.DbxAnchorModule, typeof i13.MatChipsModule, typeof i14.MatIconModule, typeof i12.DbxInjectedComponentModule, typeof i15.FormlyModule], [typeof i1.DbxSearchableChipFieldComponent, typeof i2.DbxSearchableTextFieldComponent]>;
20
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlySearchableFieldModule>;
21
+ }
@@ -0,0 +1,15 @@
1
+ import { AbstractDbxSearchableValueFieldDirective, SearchableValueFieldsFieldConfig, SearchableValueFieldsFormlyFieldConfig } from './searchable.field.directive';
2
+ import * as i0 from "@angular/core";
3
+ export interface SearchableTextValueFieldsFieldConfig<T> extends SearchableValueFieldsFieldConfig<T> {
4
+ }
5
+ export interface SearchableTextValueFieldsFormlyFieldConfig<T> extends SearchableTextValueFieldsFieldConfig<T>, SearchableValueFieldsFormlyFieldConfig<T> {
6
+ }
7
+ /**
8
+ * Display component for selecting a single item/value.
9
+ */
10
+ export declare class DbxSearchableTextFieldComponent<T> extends AbstractDbxSearchableValueFieldDirective<T, SearchableTextValueFieldsFormlyFieldConfig<T>> {
11
+ readonly multiSelect = false;
12
+ selected(event: any): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxSearchableTextFieldComponent<any>, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxSearchableTextFieldComponent<any>, "ng-component", never, {}, {}, never, never>;
15
+ }
@@ -0,0 +1,9 @@
1
+ import { FormlyFieldConfig } from "@ngx-formly/core";
2
+ import { FieldConfig } from "../../field";
3
+ import { StringValueFieldsFieldConfig, StringValueFieldsFormlyFieldConfig } from "./searchable.field.directive";
4
+ export interface ChipTextFieldConfig extends FieldConfig, StringValueFieldsFieldConfig {
5
+ }
6
+ export interface ChipTextFieldFormlyConfig extends StringValueFieldsFormlyFieldConfig, FormlyFieldConfig {
7
+ caseSensitive?: boolean;
8
+ }
9
+ export declare function chipTextField<C extends ChipTextFieldFormlyConfig>(config: C): C;
@@ -0,0 +1,25 @@
1
+ import { Maybe } from "@dereekb/util";
2
+ export interface SelectionValue<T, M = any> {
3
+ /**
4
+ * Value associated with this field.
5
+ */
6
+ value: T;
7
+ /**
8
+ * Optional metadata on the field.
9
+ */
10
+ meta?: Maybe<M>;
11
+ }
12
+ /**
13
+ * Displayed value.
14
+ */
15
+ export interface SelectionDisplayValue<T, M = any> extends SelectionValue<T, M> {
16
+ label: string;
17
+ /**
18
+ * Whether or not the value is known.
19
+ */
20
+ isUnknown?: Maybe<boolean>;
21
+ }
22
+ /**
23
+ * Used to hash the value from the input pickable value.
24
+ */
25
+ export declare type SelectionValueHashFn<T> = (value: T) => any;
@@ -0,0 +1,22 @@
1
+ import { Maybe } from '@dereekb/util';
2
+ import { FieldArrayType, FormlyTemplateOptions } from '@ngx-formly/core';
3
+ import * as i0 from "@angular/core";
4
+ export interface FormRepeatSectionConfig {
5
+ itemLabel?: string;
6
+ addText?: string;
7
+ removeText?: string;
8
+ }
9
+ export interface FormRepeatTypeTemplateOptions extends FormlyTemplateOptions, FormRepeatSectionConfig {
10
+ repeatSection?: FormRepeatSectionConfig;
11
+ }
12
+ export declare class DbxFormRepeatTypeComponent extends FieldArrayType {
13
+ get repeatSection(): FormRepeatSectionConfig;
14
+ get itemLabel(): string;
15
+ get addText(): string;
16
+ get removeText(): string;
17
+ get max(): Maybe<number>;
18
+ get count(): number;
19
+ get canAdd(): boolean;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormRepeatTypeComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormRepeatTypeComponent, "ng-component", never, {}, {}, never, never>;
22
+ }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./array.field.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/material/form-field";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "@angular/material/divider";
7
+ import * as i6 from "@dereekb/dbx-web";
8
+ import * as i7 from "@ngx-formly/core";
9
+ export declare class DbxFormFormlyArrayFieldModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyArrayFieldModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyArrayFieldModule, [typeof i1.DbxFormRepeatTypeComponent], [typeof i2.CommonModule, typeof i3.MatFormFieldModule, typeof i4.ReactiveFormsModule, typeof i5.MatDividerModule, typeof i6.DbxButtonModule, typeof i7.FormlyModule], never>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyArrayFieldModule>;
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from './array.field.component';
2
+ export * from './array.field.module';
@@ -0,0 +1,8 @@
1
+ import { FormlyFieldConfig } from '@ngx-formly/core';
2
+ import { FieldConfig, DefaultValueFieldConfig, DescriptionFieldConfig } from '../../field';
3
+ export interface ToggleFieldConfig extends Omit<FieldConfig, 'placeholder' | 'autocomplete'>, DefaultValueFieldConfig<boolean>, DescriptionFieldConfig {
4
+ }
5
+ export declare function toggleField({ key, label, description, defaultValue, required, readonly }: ToggleFieldConfig): FormlyFieldConfig;
6
+ export interface CheckboxFieldConfig extends FieldConfig, DefaultValueFieldConfig<boolean>, DescriptionFieldConfig {
7
+ }
8
+ export declare function checkboxField({ key, label, placeholder, defaultValue, required, readonly, autocomplete }: CheckboxFieldConfig): FormlyFieldConfig;
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DbxFormFormlyBooleanFieldModule {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyBooleanFieldModule, never>;
4
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyBooleanFieldModule, never, never, never>;
5
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyBooleanFieldModule>;
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from './boolean.field.module';
2
+ export * from './boolean.field';
@@ -0,0 +1,13 @@
1
+ import { Observable } from 'rxjs';
2
+ import { FieldConfig } from '../../field';
3
+ import { DbxDateTimeFieldConfig, DateTimeFormlyFieldConfig, DateTimePickerConfiguration } from './datetime.field.component';
4
+ export interface DateTimeFieldConfig extends FieldConfig, DbxDateTimeFieldConfig {
5
+ }
6
+ export interface TimeFieldConfig extends Omit<DateTimeFieldConfig, 'showDate'> {
7
+ }
8
+ export declare const TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS: () => Observable<DateTimePickerConfiguration>;
9
+ /**
10
+ * Same as DateTime field but with the Date input hidden by default.
11
+ */
12
+ export declare function timeOnlyField(config: Partial<TimeFieldConfig>): DateTimeFormlyFieldConfig;
13
+ export declare function dateTimeField({ key, label, placeholder, description, timeMode, fullDayFieldName, getConfigObs, timeOnly, required }: Partial<DateTimeFieldConfig>): DateTimeFormlyFieldConfig;
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./datetime.field.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/material/input";
6
+ import * as i5 from "@angular/material/divider";
7
+ import * as i6 from "@angular/material/form-field";
8
+ import * as i7 from "@angular/material/button";
9
+ import * as i8 from "@angular/material/datepicker";
10
+ import * as i9 from "@angular/material/core";
11
+ import * as i10 from "@angular/material/menu";
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 "@angular/flex-layout";
16
+ import * as i15 from "@ngx-formly/core";
17
+ export declare class DbxFormFormlyDateFieldModule {
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormFormlyDateFieldModule, never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormFormlyDateFieldModule, [typeof i1.DbxDateTimeFieldComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatInputModule, typeof i5.MatDividerModule, typeof i6.MatFormFieldModule, typeof i7.MatButtonModule, typeof i8.MatDatepickerModule, typeof i9.MatNativeDateModule, typeof i10.MatMenuModule, typeof i3.ReactiveFormsModule, typeof i11.DbxDatePipeModule, typeof i12.MatChipsModule, typeof i13.MatIconModule, typeof i14.FlexLayoutModule, typeof i15.FormlyModule], never>;
20
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormFormlyDateFieldModule>;
21
+ }
@@ -0,0 +1,105 @@
1
+ import { DateTimeMinuteConfig } from '@dereekb/date';
2
+ import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
3
+ import { AbstractControl, FormControl } from '@angular/forms';
4
+ import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
5
+ import { Observable } from 'rxjs';
6
+ import { Maybe, ReadableTimeString } from '@dereekb/util';
7
+ import { MatDatepickerInputEvent } from '@angular/material/datepicker';
8
+ import * as i0 from "@angular/core";
9
+ export declare enum DateTimeFieldTimeMode {
10
+ /**
11
+ * Time is required.
12
+ */
13
+ REQUIRED = "required",
14
+ /**
15
+ * Time is optional.
16
+ */
17
+ OPTIONAL = "optional",
18
+ /**
19
+ * Time is permenantly off.
20
+ */
21
+ NONE = "none"
22
+ }
23
+ export interface DateTimePickerConfiguration extends Omit<DateTimeMinuteConfig, 'date'> {
24
+ }
25
+ export interface DbxDateTimeFieldConfig {
26
+ /**
27
+ * Whether or not the date is hidden, and automatically uses today/input date.
28
+ */
29
+ timeOnly?: boolean;
30
+ /**
31
+ * Whether or not the time can be added/removed optionally.
32
+ *
33
+ * This is ignored if timeOnly is specified.
34
+ */
35
+ timeMode?: DateTimeFieldTimeMode;
36
+ /**
37
+ * Other form contro for enabling/disabling whether or not it is a full day.
38
+ *
39
+ * This field is only used if time is optional.
40
+ *
41
+ * When time is off, the field is set to true.
42
+ */
43
+ fullDayFieldName?: string;
44
+ /**
45
+ * Whether or not to pass the date value as a UTC date, or a date in the current timezone.
46
+ */
47
+ fullDayInUTC?: boolean;
48
+ /**
49
+ * Used for returning the configuration observable.
50
+ */
51
+ getConfigObs?: () => Observable<DateTimePickerConfiguration>;
52
+ /**
53
+ * Optional description/hint to display.
54
+ */
55
+ description?: string;
56
+ }
57
+ export interface DateTimeFormlyFieldConfig extends DbxDateTimeFieldConfig, FormlyFieldConfig {
58
+ }
59
+ export declare class DbxDateTimeFieldComponent extends FieldType<DateTimeFormlyFieldConfig> implements OnInit, OnDestroy {
60
+ private readonly cdRef;
61
+ private _sub;
62
+ private _valueSub;
63
+ private _fullDayInputCtrl?;
64
+ private _fullDayControlObs;
65
+ readonly fullDayControl$: Observable<AbstractControl>;
66
+ private _offset;
67
+ private _formControlObs;
68
+ readonly formControl$: Observable<AbstractControl>;
69
+ private _updateTime;
70
+ readonly value$: Observable<any>;
71
+ /**
72
+ * Used to trigger/display visual updates (specifically on timeDistance, etc.).
73
+ */
74
+ readonly displayValue$: Observable<any>;
75
+ readonly timeString$: Observable<ReadableTimeString>;
76
+ readonly timeInputCtrl: FormControl;
77
+ private _date;
78
+ private _config;
79
+ get timeOnly(): Maybe<boolean>;
80
+ get showDateInput(): boolean;
81
+ get timeMode(): DateTimeFieldTimeMode;
82
+ get description(): Maybe<string>;
83
+ readonly fullDay$: Observable<boolean>;
84
+ readonly showTimeInput$: Observable<boolean>;
85
+ readonly showAddTime$: Observable<boolean>;
86
+ readonly date$: Observable<Date>;
87
+ readonly dateValue$: Observable<Date>;
88
+ readonly timeInput$: Observable<ReadableTimeString>;
89
+ readonly config$: Observable<DateTimePickerConfiguration>;
90
+ readonly rawDateTime$: Observable<Date>;
91
+ readonly timeOutput$: Observable<Date>;
92
+ constructor(cdRef: ChangeDetectorRef);
93
+ ngOnInit(): void;
94
+ ngOnDestroy(): void;
95
+ datePicked(event: MatDatepickerInputEvent<Date>): void;
96
+ setTime(time: ReadableTimeString): void;
97
+ keydownOnInput(event: KeyboardEvent): void;
98
+ focusTime(): void;
99
+ focusOutTime(): void;
100
+ addTime(): void;
101
+ removeTime(): void;
102
+ setFullDay(fullDay: boolean): void;
103
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxDateTimeFieldComponent, never>;
104
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxDateTimeFieldComponent, "ng-component", never, {}, {}, never, never>;
105
+ }
@@ -0,0 +1,3 @@
1
+ export * from './date.field.module';
2
+ export * from './date.field';
3
+ export * from './datetime.field.component';
@@ -0,0 +1,4 @@
1
+ export interface EnumValueFieldOption<T> {
2
+ value: T;
3
+ label: string;
4
+ }
@@ -0,0 +1,14 @@
1
+ import { DescriptionFieldConfig, FieldConfig } from '../../field';
2
+ import { FormlyFieldConfig } from '@ngx-formly/core';
3
+ import { EnumValueFieldOption } from './enum';
4
+ export interface StaticEnumFieldConfig<T> extends FieldConfig, DescriptionFieldConfig {
5
+ /**
6
+ * Whether or not multiple values can be selected.
7
+ */
8
+ multiple?: boolean;
9
+ /**
10
+ * Options
11
+ */
12
+ options: EnumValueFieldOption<T>[];
13
+ }
14
+ export declare function staticEnumField<T = any>({ key, label, placeholder, description, multiple, required, options }: StaticEnumFieldConfig<T>): FormlyFieldConfig;
@@ -0,0 +1,2 @@
1
+ export * from './enum';
2
+ export * from './enum.field';
@@ -0,0 +1,5 @@
1
+ import { FormlyFieldConfig } from '@ngx-formly/core/lib/core';
2
+ import { FieldConfig } from '../field';
3
+ export interface HiddenFieldConfig extends Pick<FieldConfig, 'key' | 'required'> {
4
+ }
5
+ export declare function hiddenField({ key, required }: HiddenFieldConfig): FormlyFieldConfig;
@@ -0,0 +1,7 @@
1
+ export * from './array';
2
+ export * from './boolean';
3
+ export * from './date';
4
+ export * from './enum';
5
+ export * from './phone';
6
+ export * from './text';
7
+ export * from './hidden.field';
@@ -0,0 +1,3 @@
1
+ export * from './phone.field.component';
2
+ export * from './phone.field.module';
3
+ export * from './phone.field';
@@ -0,0 +1,24 @@
1
+ import { ValidationErrors, FormGroup } from '@angular/forms';
2
+ import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
3
+ import { Maybe } from '@dereekb/util';
4
+ import * as i0 from "@angular/core";
5
+ export interface DbxInternationalPhoneFieldConfig {
6
+ preferredCountries?: string[];
7
+ onlyCountries?: string[];
8
+ }
9
+ export interface InternationalPhoneFormlyFieldConfig extends DbxInternationalPhoneFieldConfig, FormlyFieldConfig {
10
+ }
11
+ export declare const DEFAULT_PREFERRED_COUNTRIES: string[];
12
+ export declare class DbxInternationalPhoneFieldComponent extends FieldType<InternationalPhoneFormlyFieldConfig> {
13
+ get fieldInputKey(): string;
14
+ get fieldFormGroup(): FormGroup;
15
+ get label(): Maybe<string>;
16
+ get placeholder(): Maybe<string>;
17
+ get description(): Maybe<string>;
18
+ get preferredCountries(): string[];
19
+ get onlyCountries(): string[];
20
+ get required(): boolean;
21
+ get errors(): Maybe<ValidationErrors>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxInternationalPhoneFieldComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxInternationalPhoneFieldComponent, "ng-component", never, {}, {}, never, never>;
24
+ }
@@ -0,0 +1,26 @@
1
+ import { TextFieldConfig } from '../text/text.field';
2
+ import { FormlyFieldConfig } from '@ngx-formly/core';
3
+ import { FieldConfig } from '../../field';
4
+ import { DbxInternationalPhoneFieldConfig, InternationalPhoneFormlyFieldConfig } from './phone.field.component';
5
+ export interface InternationalPhoneFieldConfig extends FieldConfig, DbxInternationalPhoneFieldConfig {
6
+ }
7
+ export declare function internationalPhoneField({ key, label, placeholder, required }: Partial<InternationalPhoneFieldConfig>): InternationalPhoneFormlyFieldConfig;
8
+ export interface PhoneFormlyFieldsConfig {
9
+ phoneField?: InternationalPhoneFieldConfig;
10
+ labelField?: TextFieldConfig;
11
+ }
12
+ export declare function phoneAndLabelFields({ phoneField: phone, labelField: label }: PhoneFormlyFieldsConfig): FormlyFieldConfig[];
13
+ export interface PhoneAndLabelFieldGroupConfig extends PhoneFormlyFieldsConfig {
14
+ key?: string;
15
+ label?: string;
16
+ required?: boolean;
17
+ }
18
+ export declare function phoneAndLabelFieldGroup({ key, label, required, phoneField, labelField }: PhoneAndLabelFieldGroupConfig): FormlyFieldConfig;
19
+ export interface PhoneListFieldConfig extends PhoneAndLabelFieldGroupConfig {
20
+ maxPhones?: number;
21
+ repeatSection?: {
22
+ addText: string;
23
+ removeText: string;
24
+ };
25
+ }
26
+ export declare function phoneListField({ key, label, repeatSection, required, maxPhones, phoneField, labelField }: PhoneListFieldConfig): FormlyFieldConfig;