form.d.ts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /*!
  2. * devextreme-angular
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. *
  8. * This software may be modified and distributed under the terms
  9. * of the MIT license. See the LICENSE file in the root of the project for details.
  10. *
  11. * https://github.com/DevExpress/devextreme-angular
  12. */
  13. import { TransferState } from '@angular/platform-browser';
  14. import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core';
  15. import DevExpress from 'devextreme/bundles/dx.all';
  16. import DxForm from 'devextreme/ui/form';
  17. import { DxComponent } from '../core/component';
  18. import { DxTemplateHost } from '../core/template-host';
  19. import { NestedOptionHost } from '../core/nested-option';
  20. import { WatcherHelper } from '../core/watcher-helper';
  21. import { IterableDifferHelper } from '../core/iterable-differ-helper';
  22. import { DxiItemComponent } from './nested/item-dxi';
  23. /**
  24. * The Form widget represents fields of a data object as a collection of label-editor pairs. These pairs can be arranged in several groups, tabs and columns.
  25. */
  26. export declare class DxFormComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
  27. private _watcherHelper;
  28. private _idh;
  29. instance: DxForm;
  30. /**
  31. * Specifies the shortcut key that sets focus on the widget.
  32. */
  33. accessKey: string;
  34. /**
  35. * Specifies whether or not the widget changes its state when interacting with a user.
  36. */
  37. activeStateEnabled: boolean;
  38. /**
  39. * Specifies whether or not all root item labels are aligned.
  40. */
  41. alignItemLabels: boolean;
  42. /**
  43. * Specifies whether or not item labels in all groups are aligned.
  44. */
  45. alignItemLabelsInAllGroups: boolean;
  46. /**
  47. * The count of columns in the form layout.
  48. */
  49. colCount: number | string;
  50. /**
  51. * Specifies dependency between the screen factor and the count of columns in the form layout.
  52. */
  53. colCountByScreen: {
  54. lg?: number;
  55. md?: number;
  56. sm?: number;
  57. xs?: number;
  58. };
  59. /**
  60. * Specifies a function that customizes a form item after it has been created.
  61. */
  62. customizeItem: Function;
  63. /**
  64. * Specifies whether the widget responds to user interaction.
  65. */
  66. disabled: boolean;
  67. /**
  68. * Specifies the attributes to be attached to the widget's root element.
  69. */
  70. elementAttr: any;
  71. /**
  72. * Specifies whether the widget can be focused using keyboard navigation.
  73. */
  74. focusStateEnabled: boolean;
  75. /**
  76. * Provides the Form's data. Gets updated every time form fields change.
  77. */
  78. formData: any;
  79. /**
  80. * Specifies the widget's height.
  81. */
  82. height: number | Function | string;
  83. /**
  84. * Specifies text for a hint that appears when a user pauses on the widget.
  85. */
  86. hint: string;
  87. /**
  88. * Specifies whether the widget changes its state when a user pauses on it.
  89. */
  90. hoverStateEnabled: boolean;
  91. /**
  92. * Holds an array of form items.
  93. */
  94. items: Array<DevExpress.ui.dxFormSimpleItem | DevExpress.ui.dxFormGroupItem | DevExpress.ui.dxFormTabbedItem | DevExpress.ui.dxFormEmptyItem | DevExpress.ui.dxFormButtonItem>;
  95. /**
  96. * Specifies the location of a label against the editor.
  97. */
  98. labelLocation: string;
  99. /**
  100. * The minimum column width used for calculating column count in the form layout.
  101. */
  102. minColWidth: number;
  103. /**
  104. * The text displayed for optional fields.
  105. */
  106. optionalMark: string;
  107. /**
  108. * Specifies whether all editors on the form are read-only. Applies only to non-templated items.
  109. */
  110. readOnly: boolean;
  111. /**
  112. * The text displayed for required fields.
  113. */
  114. requiredMark: string;
  115. /**
  116. * Specifies the message that is shown for end-users if a required field value is not specified.
  117. */
  118. requiredMessage: string;
  119. /**
  120. * Switches the widget to a right-to-left representation.
  121. */
  122. rtlEnabled: boolean;
  123. /**
  124. * Specifies a function that categorizes screens by their width.
  125. */
  126. screenByWidth: Function;
  127. /**
  128. * A Boolean value specifying whether to enable or disable form scrolling.
  129. */
  130. scrollingEnabled: boolean;
  131. /**
  132. * Specifies whether or not a colon is displayed at the end of form labels.
  133. */
  134. showColonAfterLabel: boolean;
  135. /**
  136. * Specifies whether or not the optional mark is displayed for optional fields.
  137. */
  138. showOptionalMark: boolean;
  139. /**
  140. * Specifies whether or not the required mark is displayed for required fields.
  141. */
  142. showRequiredMark: boolean;
  143. /**
  144. * Specifies whether or not the total validation summary is displayed on the form.
  145. */
  146. showValidationSummary: boolean;
  147. /**
  148. * Specifies the number of the element when the Tab key is used for navigating.
  149. */
  150. tabIndex: number;
  151. /**
  152. * Gives a name to the internal validation group.
  153. */
  154. validationGroup: string;
  155. /**
  156. * Specifies whether the widget is visible.
  157. */
  158. visible: boolean;
  159. /**
  160. * Specifies the widget's width.
  161. */
  162. width: number | Function | string;
  163. /**
  164. * A function that is executed when the widget's content is ready and each time the content is changed.
  165. */
  166. onContentReady: EventEmitter<any>;
  167. /**
  168. * A function that is executed before the widget is disposed of.
  169. */
  170. onDisposing: EventEmitter<any>;
  171. /**
  172. * A function that is executed when the Enter key has been pressed while an editor is focused.
  173. */
  174. onEditorEnterKey: EventEmitter<any>;
  175. /**
  176. * A function that is executed when the value of a formData object field is changed.
  177. */
  178. onFieldDataChanged: EventEmitter<any>;
  179. /**
  180. * A function used in JavaScript frameworks to save the widget instance.
  181. */
  182. onInitialized: EventEmitter<any>;
  183. /**
  184. * A function that is executed after a widget option is changed.
  185. */
  186. onOptionChanged: EventEmitter<any>;
  187. /**
  188. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  189. */
  190. accessKeyChange: EventEmitter<string>;
  191. /**
  192. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  193. */
  194. activeStateEnabledChange: EventEmitter<boolean>;
  195. /**
  196. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  197. */
  198. alignItemLabelsChange: EventEmitter<boolean>;
  199. /**
  200. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  201. */
  202. alignItemLabelsInAllGroupsChange: EventEmitter<boolean>;
  203. /**
  204. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  205. */
  206. colCountChange: EventEmitter<number | string>;
  207. /**
  208. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  209. */
  210. colCountByScreenChange: EventEmitter<{
  211. lg?: number;
  212. md?: number;
  213. sm?: number;
  214. xs?: number;
  215. }>;
  216. /**
  217. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  218. */
  219. customizeItemChange: EventEmitter<Function>;
  220. /**
  221. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  222. */
  223. disabledChange: EventEmitter<boolean>;
  224. /**
  225. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  226. */
  227. elementAttrChange: EventEmitter<any>;
  228. /**
  229. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  230. */
  231. focusStateEnabledChange: EventEmitter<boolean>;
  232. /**
  233. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  234. */
  235. formDataChange: EventEmitter<any>;
  236. /**
  237. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  238. */
  239. heightChange: EventEmitter<number | Function | string>;
  240. /**
  241. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  242. */
  243. hintChange: EventEmitter<string>;
  244. /**
  245. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  246. */
  247. hoverStateEnabledChange: EventEmitter<boolean>;
  248. /**
  249. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  250. */
  251. itemsChange: EventEmitter<Array<DevExpress.ui.dxFormSimpleItem | DevExpress.ui.dxFormGroupItem | DevExpress.ui.dxFormTabbedItem | DevExpress.ui.dxFormEmptyItem | DevExpress.ui.dxFormButtonItem>>;
  252. /**
  253. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  254. */
  255. labelLocationChange: EventEmitter<string>;
  256. /**
  257. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  258. */
  259. minColWidthChange: EventEmitter<number>;
  260. /**
  261. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  262. */
  263. optionalMarkChange: EventEmitter<string>;
  264. /**
  265. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  266. */
  267. readOnlyChange: EventEmitter<boolean>;
  268. /**
  269. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  270. */
  271. requiredMarkChange: EventEmitter<string>;
  272. /**
  273. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  274. */
  275. requiredMessageChange: EventEmitter<string>;
  276. /**
  277. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  278. */
  279. rtlEnabledChange: EventEmitter<boolean>;
  280. /**
  281. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  282. */
  283. screenByWidthChange: EventEmitter<Function>;
  284. /**
  285. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  286. */
  287. scrollingEnabledChange: EventEmitter<boolean>;
  288. /**
  289. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  290. */
  291. showColonAfterLabelChange: EventEmitter<boolean>;
  292. /**
  293. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  294. */
  295. showOptionalMarkChange: EventEmitter<boolean>;
  296. /**
  297. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  298. */
  299. showRequiredMarkChange: EventEmitter<boolean>;
  300. /**
  301. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  302. */
  303. showValidationSummaryChange: EventEmitter<boolean>;
  304. /**
  305. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  306. */
  307. tabIndexChange: EventEmitter<number>;
  308. /**
  309. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  310. */
  311. validationGroupChange: EventEmitter<string>;
  312. /**
  313. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  314. */
  315. visibleChange: EventEmitter<boolean>;
  316. /**
  317. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  318. */
  319. widthChange: EventEmitter<number | Function | string>;
  320. itemsChildren: QueryList<DxiItemComponent>;
  321. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  322. protected _createInstance(element: any, options: any): DxForm;
  323. ngOnDestroy(): void;
  324. ngOnChanges(changes: SimpleChanges): void;
  325. setupChanges(prop: string, changes: SimpleChanges): void;
  326. ngDoCheck(): void;
  327. _setOption(name: string, value: any): void;
  328. }
  329. export declare class DxFormModule {
  330. }