@sankhyalabs/ezui 1.1.6 → 1.1.10

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 (149) hide show
  1. package/README.md +72 -72
  2. package/dist/cjs/{DataUnit-09a6e7be.js → DataUnit-95368a67.js} +418 -361
  3. package/dist/cjs/ez-action-chip.cjs.entry.js +41 -41
  4. package/dist/cjs/ez-button_14.cjs.entry.js +1933 -1847
  5. package/dist/cjs/ez-label-chip.cjs.entry.js +120 -120
  6. package/dist/cjs/ez-modal.cjs.entry.js +102 -95
  7. package/dist/cjs/ez-number-input.cjs.entry.js +236 -236
  8. package/dist/cjs/ez-time-input.cjs.entry.js +168 -168
  9. package/dist/cjs/ezui.cjs.js +1 -1
  10. package/dist/cjs/form-metadata.cjs.entry.js +65 -65
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/ez-action-chip/ez-action-chip.css +82 -82
  13. package/dist/collection/components/ez-action-chip/ez-action-chip.js +109 -109
  14. package/dist/collection/components/ez-button/ez-button.css +94 -94
  15. package/dist/collection/components/ez-button/ez-button.js +125 -125
  16. package/dist/collection/components/ez-calendar/ez-calendar.css +210 -210
  17. package/dist/collection/components/ez-calendar/ez-calendar.js +215 -215
  18. package/dist/collection/components/ez-check/ez-check.css +265 -265
  19. package/dist/collection/components/ez-check/ez-check.js +168 -168
  20. package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.css +67 -67
  21. package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.js +108 -108
  22. package/dist/collection/components/ez-combo-box/ez-combo-box-interfaces.js +2 -2
  23. package/dist/collection/components/ez-combo-box/ez-combo-box.css +167 -167
  24. package/dist/collection/components/ez-combo-box/ez-combo-box.js +363 -363
  25. package/dist/collection/components/ez-date-input/ez-date-input.css +38 -38
  26. package/dist/collection/components/ez-date-input/ez-date-input.js +172 -172
  27. package/dist/collection/components/ez-form/ez-form.css +19 -19
  28. package/dist/collection/components/ez-form/ez-form.js +390 -289
  29. package/dist/collection/components/ez-form/store/Form.actions.js +132 -123
  30. package/dist/collection/components/ez-form/store/Form.reducer.js +194 -174
  31. package/dist/collection/components/ez-form/store/Form.selectors.js +44 -43
  32. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +252 -207
  33. package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +16 -16
  34. package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +23 -23
  35. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +173 -173
  36. package/dist/collection/components/ez-form/subcomponents/place-holder.js +14 -14
  37. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +71 -71
  38. package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +27 -27
  39. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +40 -33
  40. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +27 -18
  41. package/dist/collection/components/ez-icon/ez-icon.css +36 -36
  42. package/dist/collection/components/ez-icon/ez-icon.js +56 -56
  43. package/dist/collection/components/ez-label-chip/ez-label-chip.css +117 -117
  44. package/dist/collection/components/ez-label-chip/ez-label-chip.js +276 -276
  45. package/dist/collection/components/ez-modal/ez-modal.css +86 -86
  46. package/dist/collection/components/ez-modal/ez-modal.js +222 -200
  47. package/dist/collection/components/ez-number-input/ez-number-input.css +144 -144
  48. package/dist/collection/components/ez-number-input/ez-number-input.js +465 -465
  49. package/dist/collection/components/ez-popover/ez-popover.css +38 -38
  50. package/dist/collection/components/ez-popover/ez-popover.js +323 -323
  51. package/dist/collection/components/ez-search/ez-search.css +295 -295
  52. package/dist/collection/components/ez-search/ez-search.js +527 -527
  53. package/dist/collection/components/ez-tabselector/ez-tabselector.css +125 -125
  54. package/dist/collection/components/ez-tabselector/ez-tabselector.js +283 -283
  55. package/dist/collection/components/ez-text-area/ez-text-area.css +139 -139
  56. package/dist/collection/components/ez-text-area/ez-text-area.js +267 -267
  57. package/dist/collection/components/ez-text-input/ez-text-input.css +169 -169
  58. package/dist/collection/components/ez-text-input/ez-text-input.js +395 -395
  59. package/dist/collection/components/ez-time-input/ez-time-input.css +155 -155
  60. package/dist/collection/components/ez-time-input/ez-time-input.js +326 -326
  61. package/dist/collection/index.js +1 -1
  62. package/dist/collection/servidor.js +100 -100
  63. package/dist/collection/utils/FloatingManager.js +15 -15
  64. package/dist/collection/utils/utils.js +6 -6
  65. package/dist/custom-elements/index.js +3146 -2998
  66. package/dist/esm/{DataUnit-7a983910.js → DataUnit-4bb6a396.js} +417 -362
  67. package/dist/esm/ez-action-chip.entry.js +41 -41
  68. package/dist/esm/ez-button_14.entry.js +1933 -1847
  69. package/dist/esm/ez-label-chip.entry.js +120 -120
  70. package/dist/esm/ez-modal.entry.js +103 -96
  71. package/dist/esm/ez-number-input.entry.js +236 -236
  72. package/dist/esm/ez-time-input.entry.js +168 -168
  73. package/dist/esm/ezui.js +1 -1
  74. package/dist/esm/form-metadata.entry.js +65 -65
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/polyfills/core-js.js +0 -0
  77. package/dist/esm/polyfills/dom.js +0 -0
  78. package/dist/esm/polyfills/es5-html-element.js +0 -0
  79. package/dist/esm/polyfills/index.js +0 -0
  80. package/dist/esm/polyfills/system.js +0 -0
  81. package/dist/ezui/ezui.esm.js +1 -1
  82. package/dist/ezui/p-11d20338.js +1 -0
  83. package/dist/ezui/{p-3c3a43aa.entry.js → p-5d30e51c.entry.js} +1 -1
  84. package/dist/ezui/p-77fdb4fd.entry.js +1 -0
  85. package/dist/ezui/p-e056fb23.entry.js +1 -0
  86. package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +16 -16
  87. package/dist/types/components/ez-button/ez-button.d.ts +20 -20
  88. package/dist/types/components/ez-calendar/ez-calendar.d.ts +42 -42
  89. package/dist/types/components/ez-check/ez-check.d.ts +32 -32
  90. package/dist/types/components/ez-collapsable-box/ez-collapsable-box.d.ts +18 -18
  91. package/dist/types/components/ez-combo-box/ez-combo-box-interfaces.d.ts +4 -4
  92. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +68 -68
  93. package/dist/types/components/ez-date-input/ez-date-input.d.ts +31 -31
  94. package/dist/types/components/ez-form/ez-form.d.ts +27 -27
  95. package/dist/types/components/ez-form/store/Form.actions.d.ts +111 -104
  96. package/dist/types/components/ez-form/store/Form.reducer.d.ts +20 -11
  97. package/dist/types/components/ez-form/store/Form.selectors.d.ts +14 -13
  98. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +61 -48
  99. package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +41 -41
  100. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +15 -15
  101. package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +3 -3
  102. package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +10 -10
  103. package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +12 -12
  104. package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +13 -13
  105. package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +17 -7
  106. package/dist/types/components/ez-icon/ez-icon.d.ts +5 -5
  107. package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +40 -40
  108. package/dist/types/components/ez-modal/ez-modal.d.ts +32 -26
  109. package/dist/types/components/ez-number-input/ez-number-input.d.ts +73 -73
  110. package/dist/types/components/ez-popover/ez-popover.d.ts +52 -52
  111. package/dist/types/components/ez-search/ez-search.d.ts +95 -95
  112. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +31 -31
  113. package/dist/types/components/ez-text-area/ez-text-area.d.ts +49 -49
  114. package/dist/types/components/ez-text-input/ez-text-input.d.ts +64 -64
  115. package/dist/types/components/ez-time-input/ez-time-input.d.ts +53 -53
  116. package/dist/types/components.d.ts +8 -0
  117. package/dist/types/index.d.ts +1 -1
  118. package/dist/types/utils/utils.d.ts +2 -2
  119. package/package.json +114 -114
  120. package/react/components.d.ts +22 -0
  121. package/react/components.js +25 -0
  122. package/react/components.js.map +1 -0
  123. package/react/react-component-lib/createComponent.d.ts +10 -0
  124. package/react/react-component-lib/createComponent.js +59 -0
  125. package/react/react-component-lib/createComponent.js.map +1 -0
  126. package/react/react-component-lib/createOverlayComponent.d.ts +20 -0
  127. package/react/react-component-lib/createOverlayComponent.js +89 -0
  128. package/react/react-component-lib/createOverlayComponent.js.map +1 -0
  129. package/react/react-component-lib/index.d.ts +2 -0
  130. package/react/react-component-lib/index.js +3 -0
  131. package/react/react-component-lib/index.js.map +1 -0
  132. package/react/react-component-lib/interfaces.d.ts +29 -0
  133. package/react/react-component-lib/interfaces.js +1 -0
  134. package/react/react-component-lib/interfaces.js.map +1 -0
  135. package/react/react-component-lib/utils/attachProps.d.ts +12 -0
  136. package/react/react-component-lib/utils/attachProps.js +96 -0
  137. package/react/react-component-lib/utils/attachProps.js.map +1 -0
  138. package/react/react-component-lib/utils/case.d.ts +2 -0
  139. package/react/react-component-lib/utils/case.js +7 -0
  140. package/react/react-component-lib/utils/case.js.map +1 -0
  141. package/react/react-component-lib/utils/dev.d.ts +2 -0
  142. package/react/react-component-lib/utils/dev.js +13 -0
  143. package/react/react-component-lib/utils/dev.js.map +1 -0
  144. package/react/react-component-lib/utils/index.d.ts +7 -0
  145. package/react/react-component-lib/utils/index.js +21 -0
  146. package/react/react-component-lib/utils/index.js.map +1 -0
  147. package/dist/ezui/p-5185cbf1.entry.js +0 -1
  148. package/dist/ezui/p-5d600057.entry.js +0 -1
  149. package/dist/ezui/p-9f819174.js +0 -1
@@ -1,68 +1,68 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { OptionsCombobox } from './ez-combo-box-interfaces';
3
- export declare class EzComboBox {
4
- private el;
5
- private _textInput;
6
- private _popover;
7
- private _inputLabelValue;
8
- private _criteria;
9
- private _preSelection;
10
- private _visibleOptions;
11
- /**
12
- * Valor associado ao componente. Este é o valor que o componente recebe ao selecionar uma opção do combobox.
13
- * Pode ser Label ou Value de acordo com a opção "labelasindex"
14
- * Caso seja atribuído um valor ao componente que não esteja na relação das options, este vai lançar msg de erro
15
- * (executo pala valor undefined)
16
- */
17
- value: string;
18
- /**
19
- * Label é o título do campo
20
- */
21
- label: string;
22
- /**
23
- * Deixa o campo disponível ou não para digitação.
24
- */
25
- enabled: boolean;
26
- /**
27
- * Ajusta a opção de mostrar o "value" para cada "label". Como default "value" não está presente (showvalue = false)
28
- */
29
- showvalue: boolean;
30
- /**
31
- /**
32
- * Array no formato "{value: string, label: string} que alimenta as opções do Combobox"
33
- */
34
- options: Array<OptionsCombobox>;
35
- /**
36
- * Quando há um problema de validação, serve como orientação ao usuário
37
- */
38
- errormessage: string;
39
- /**
40
- * Evento que é disparado ao alterar o value do componente
41
- */
42
- ezChange: EventEmitter<string>;
43
- /**
44
- * Faz o foco no componente de textarea
45
- */
46
- setFocus(): Promise<void>;
47
- /**
48
- * Remove o foco no componente de textarea
49
- */
50
- setBlur(): Promise<void>;
51
- updateValue(): void;
52
- setErrorMessage(): void;
53
- showOptions(): void;
54
- updateSelection(): void;
55
- selectOption(opt: OptionsCombobox): void;
56
- buildItem(opt: OptionsCombobox, index: number): any;
57
- highlightMatch(label: string): any;
58
- matchOptions(): void;
59
- filterOptions(): void;
60
- nextOption(): void;
61
- previousOption(): void;
62
- scrollToOption(opt: OptionsCombobox): void;
63
- selectCurrentOption(): void;
64
- keyDownHandler(event: KeyboardEvent): void;
65
- componentWillLoad(): void;
66
- componentDidLoad(): void;
67
- render(): any;
68
- }
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { OptionsCombobox } from './ez-combo-box-interfaces';
3
+ export declare class EzComboBox {
4
+ private el;
5
+ private _textInput;
6
+ private _popover;
7
+ private _inputLabelValue;
8
+ private _criteria;
9
+ private _preSelection;
10
+ private _visibleOptions;
11
+ /**
12
+ * Valor associado ao componente. Este é o valor que o componente recebe ao selecionar uma opção do combobox.
13
+ * Pode ser Label ou Value de acordo com a opção "labelasindex"
14
+ * Caso seja atribuído um valor ao componente que não esteja na relação das options, este vai lançar msg de erro
15
+ * (executo pala valor undefined)
16
+ */
17
+ value: string;
18
+ /**
19
+ * Label é o título do campo
20
+ */
21
+ label: string;
22
+ /**
23
+ * Deixa o campo disponível ou não para digitação.
24
+ */
25
+ enabled: boolean;
26
+ /**
27
+ * Ajusta a opção de mostrar o "value" para cada "label". Como default "value" não está presente (showvalue = false)
28
+ */
29
+ showvalue: boolean;
30
+ /**
31
+ /**
32
+ * Array no formato "{value: string, label: string} que alimenta as opções do Combobox"
33
+ */
34
+ options: Array<OptionsCombobox>;
35
+ /**
36
+ * Quando há um problema de validação, serve como orientação ao usuário
37
+ */
38
+ errormessage: string;
39
+ /**
40
+ * Evento que é disparado ao alterar o value do componente
41
+ */
42
+ ezChange: EventEmitter<string>;
43
+ /**
44
+ * Faz o foco no componente de textarea
45
+ */
46
+ setFocus(): Promise<void>;
47
+ /**
48
+ * Remove o foco no componente de textarea
49
+ */
50
+ setBlur(): Promise<void>;
51
+ updateValue(): void;
52
+ setErrorMessage(): void;
53
+ showOptions(): void;
54
+ updateSelection(): void;
55
+ selectOption(opt: OptionsCombobox): void;
56
+ buildItem(opt: OptionsCombobox, index: number): any;
57
+ highlightMatch(label: string): any;
58
+ matchOptions(): void;
59
+ filterOptions(): void;
60
+ nextOption(): void;
61
+ previousOption(): void;
62
+ scrollToOption(opt: OptionsCombobox): void;
63
+ selectCurrentOption(): void;
64
+ keyDownHandler(event: KeyboardEvent): void;
65
+ componentWillLoad(): void;
66
+ componentDidLoad(): void;
67
+ render(): any;
68
+ }
@@ -1,31 +1,31 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- export declare class EzDateInput {
3
- private _calendar;
4
- private _textInput;
5
- ezChange: EventEmitter<string>;
6
- /**
7
- * Label é o título do campo
8
- */
9
- label: string;
10
- /**
11
- * A data informada pelo usuário
12
- */
13
- value: Date;
14
- /**
15
- * Deixa o campo disponível ou não para uso.
16
- */
17
- enabled: boolean;
18
- /**
19
- * Quando há um problema de validação, serve como orientação ao usuário
20
- */
21
- errormessage: string;
22
- setLabel(): void;
23
- setErrorMessage(): void;
24
- applyValueToInput(): void;
25
- changeValue(newValue: Date): void;
26
- private showCalendar;
27
- private hideCalendar;
28
- private parseDate;
29
- private getTextValue;
30
- render(): any;
31
- }
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class EzDateInput {
3
+ private _calendar;
4
+ private _textInput;
5
+ ezChange: EventEmitter<string>;
6
+ /**
7
+ * Label é o título do campo
8
+ */
9
+ label: string;
10
+ /**
11
+ * A data informada pelo usuário
12
+ */
13
+ value: Date;
14
+ /**
15
+ * Deixa o campo disponível ou não para uso.
16
+ */
17
+ enabled: boolean;
18
+ /**
19
+ * Quando há um problema de validação, serve como orientação ao usuário
20
+ */
21
+ errormessage: string;
22
+ setLabel(): void;
23
+ setErrorMessage(): void;
24
+ applyValueToInput(): void;
25
+ changeValue(newValue: Date): void;
26
+ private showCalendar;
27
+ private hideCalendar;
28
+ private parseDate;
29
+ private getTextValue;
30
+ render(): any;
31
+ }
@@ -1,27 +1,27 @@
1
- import { Form } from './subcomponents/FormMetadata';
2
- import DataUnit, { Record, RecordsValidator, ValidationResult } from './subcomponents/DataUnit';
3
- export declare class EzForm implements RecordsValidator {
4
- metadataexecutor: string | Function;
5
- loadexecutor: string | Function;
6
- saveexecutor: string | Function;
7
- removeexecutor: string | Function;
8
- fieldsearchexecutor: string | Function;
9
- metadata: Array<Form>;
10
- private _host;
11
- private _loadDataFunction;
12
- private _saveFunction;
13
- private _removeFunction;
14
- private _loadMetadataFunction;
15
- private _fieldSearchFunction;
16
- private _store;
17
- private _requiredFieldsByDU;
18
- validateRecords(dataUnit: DataUnit, records: Array<Record>): ValidationResult;
19
- componentWillRender(): void;
20
- private loadMDFromExecutor;
21
- private loadMDFromElement;
22
- private updateMetadata;
23
- private parseExecutor;
24
- componentDidLoad(): void;
25
- buildDataUnit(dataUnit: any): DataUnit;
26
- render(): any;
27
- }
1
+ import { Form } from './subcomponents/FormMetadata';
2
+ import DataUnit, { Record, RecordsValidator, ValidationResult } from './subcomponents/DataUnit';
3
+ export declare class EzForm implements RecordsValidator {
4
+ metadataexecutor: string | Function;
5
+ loadexecutor: string | Function;
6
+ saveexecutor: string | Function;
7
+ removeexecutor: string | Function;
8
+ fieldsearchexecutor: string | Function;
9
+ metadata: Array<Form>;
10
+ slavemode: boolean;
11
+ private _host;
12
+ private _dataUnits;
13
+ private _duSources;
14
+ private _store;
15
+ private _requiredFieldsByDU;
16
+ validate(): Promise<boolean>;
17
+ getChanges(): Promise<any[]>;
18
+ validateRecords(dataUnit: DataUnit, records: Array<Record>): ValidationResult;
19
+ componentWillRender(): void;
20
+ private loadMDFromExecutor;
21
+ private loadMDFromElement;
22
+ private updateMetadata;
23
+ private parseExecutor;
24
+ componentDidLoad(): void;
25
+ buildDataUnit(dataUnit: any, parentDataUnit: DataUnit | string): DataUnit;
26
+ render(): any;
27
+ }
@@ -1,104 +1,111 @@
1
- export declare function changeFieldValue(dataUnit: any, recordId: any, fieldName: any, value: any): {
2
- type: string;
3
- payload: {
4
- dataUnit: any;
5
- recordId: any;
6
- fieldName: any;
7
- value: any;
8
- };
9
- };
10
- export declare function changeTab(formId: any, index: any): {
11
- type: string;
12
- payload: {
13
- formId: any;
14
- index: any;
15
- };
16
- };
17
- export declare function clearEdition(dataUnit: any, recordsLimit: any): {
18
- type: string;
19
- payload: {
20
- dataUnit: any;
21
- recordsLimit: any;
22
- };
23
- };
24
- export declare function collapseExpandGroup(collapseId: any, collapsed: any): {
25
- type: string;
26
- payload: {
27
- collapseId: any;
28
- collapsed: any;
29
- };
30
- };
31
- export declare function previousRecord(dataUnit: string): {
32
- type: string;
33
- payload: {
34
- dataUnit: string;
35
- limit: number;
36
- backward: boolean;
37
- };
38
- };
39
- export declare function nextRecord(dataUnit: string, limit: number): {
40
- type: string;
41
- payload: {
42
- dataUnit: string;
43
- limit: number;
44
- backward: boolean;
45
- };
46
- };
47
- export declare function insertRecord(dataUnit: string, insertionIndex: number): {
48
- type: string;
49
- payload: {
50
- dataUnit: string;
51
- insertionIndex: number;
52
- };
53
- };
54
- export declare function formLoad(): {
55
- type: string;
56
- };
57
- export declare function dataLoading(dataUnit: any): {
58
- type: string;
59
- payload: {
60
- dataUnit: any;
61
- };
62
- };
63
- export declare function savingChanges(dataUnit: any): {
64
- type: string;
65
- payload: {
66
- dataUnit: any;
67
- };
68
- };
69
- export declare function dataLoaded(dataUnit: any): {
70
- type: string;
71
- payload: {
72
- dataUnit: any;
73
- };
74
- };
75
- export declare function changesSaved(dataUnit: any): {
76
- type: string;
77
- payload: {
78
- dataUnit: any;
79
- };
80
- };
81
- export declare function removingRecord(dataUnit: any): {
82
- type: string;
83
- payload: {
84
- dataUnit: any;
85
- };
86
- };
87
- export declare function recordRemoved(dataUnit: any): {
88
- type: string;
89
- payload: {
90
- dataUnit: any;
91
- };
92
- };
93
- export declare function invalidField(tabController: any, tabIndex: any, dataUnit: any, recordIndex: any, recordId: any, fieldName: any, errorMessage: any): {
94
- type: string;
95
- payload: {
96
- tabController: any;
97
- tabIndex: any;
98
- dataUnit: any;
99
- recordId: any;
100
- recordIndex: any;
101
- fieldName: any;
102
- errorMessage: any;
103
- };
104
- };
1
+ export declare function changeFieldValue(dataUnit: any, recordId: any, fieldName: any, value: any): {
2
+ type: string;
3
+ payload: {
4
+ dataUnit: any;
5
+ recordId: any;
6
+ fieldName: any;
7
+ value: any;
8
+ };
9
+ };
10
+ export declare function changeTab(formId: any, index: any): {
11
+ type: string;
12
+ payload: {
13
+ formId: any;
14
+ index: any;
15
+ };
16
+ };
17
+ export declare function clearEdition(dataUnit: any, recordsLimit: any): {
18
+ type: string;
19
+ payload: {
20
+ dataUnit: any;
21
+ recordsLimit: any;
22
+ };
23
+ };
24
+ export declare function collapseExpandGroup(collapseId: any, collapsed: any): {
25
+ type: string;
26
+ payload: {
27
+ collapseId: any;
28
+ collapsed: any;
29
+ };
30
+ };
31
+ export declare function previousRecord(dataUnit: string): {
32
+ type: string;
33
+ payload: {
34
+ dataUnit: string;
35
+ limit: number;
36
+ backward: boolean;
37
+ };
38
+ };
39
+ export declare function nextRecord(dataUnit: string, limit: number): {
40
+ type: string;
41
+ payload: {
42
+ dataUnit: string;
43
+ limit: number;
44
+ backward: boolean;
45
+ };
46
+ };
47
+ export declare function insertRecord(dataUnit: string, insertionIndex: number): {
48
+ type: string;
49
+ payload: {
50
+ dataUnit: string;
51
+ insertionIndex: number;
52
+ };
53
+ };
54
+ export declare function formLoad(): {
55
+ type: string;
56
+ };
57
+ export declare function dataLoading(dataUnit: any): {
58
+ type: string;
59
+ payload: {
60
+ dataUnit: any;
61
+ };
62
+ };
63
+ export declare function savingChanges(dataUnit: any): {
64
+ type: string;
65
+ payload: {
66
+ dataUnit: any;
67
+ };
68
+ };
69
+ export declare function dataLoaded(dataUnit: any): {
70
+ type: string;
71
+ payload: {
72
+ dataUnit: any;
73
+ };
74
+ };
75
+ export declare function changesSaved(dataUnit: any): {
76
+ type: string;
77
+ payload: {
78
+ dataUnit: any;
79
+ };
80
+ };
81
+ export declare function removingRecord(dataUnit: any): {
82
+ type: string;
83
+ payload: {
84
+ dataUnit: any;
85
+ };
86
+ };
87
+ export declare function recordRemoved(dataUnit: any): {
88
+ type: string;
89
+ payload: {
90
+ dataUnit: any;
91
+ };
92
+ };
93
+ export declare function invalidField(tabController: any, tabIndex: any, dataUnit: any, recordIndex: any, recordId: any, fieldName: any, errorMessage: any): {
94
+ type: string;
95
+ payload: {
96
+ tabController: any;
97
+ tabIndex: any;
98
+ dataUnit: any;
99
+ recordId: any;
100
+ recordIndex: any;
101
+ fieldName: any;
102
+ errorMessage: any;
103
+ };
104
+ };
105
+ export declare function showHideNavigationButtons(buttonName: any, status: any): {
106
+ type: string;
107
+ payload: {
108
+ buttonName: any;
109
+ status: any;
110
+ };
111
+ };
@@ -1,11 +1,20 @@
1
- export default function formReducer(state: {
2
- currentTabIndex: {};
3
- currentRecordIndex: {};
4
- changes: {};
5
- collapsedGroups: {};
6
- newRecordIndex: {};
7
- }, action: any): any;
8
- export declare function formNonHistoricReducer(state: {
9
- dataLoading: {};
10
- invalidFields: {};
11
- }, action: any): any;
1
+ export default function formReducer(state: {
2
+ currentTabIndex: {};
3
+ currentRecordIndex: {};
4
+ changes: {};
5
+ collapsedGroups: {};
6
+ newRecordIndex: {};
7
+ }, action: any): any;
8
+ export declare function formNonHistoricReducer(state: {
9
+ dataLoading: {};
10
+ invalidFields: {};
11
+ visibleButtons: {
12
+ previousVisible: boolean;
13
+ nextVisible: boolean;
14
+ addVisible: boolean;
15
+ removeVisible: boolean;
16
+ saveVisible: boolean;
17
+ cancelVisible: boolean;
18
+ reloadVisible: boolean;
19
+ };
20
+ }, action: any): any;
@@ -1,13 +1,14 @@
1
- export declare const selectCurrentTab: (state: any, formName: string) => any;
2
- export declare const selectIsCollapsedFieldSet: (state: any, fieldSetName: string) => boolean;
3
- export declare const selectRecordChanges: (state: any, dataUnit: string, recordId: string) => any;
4
- export declare const selectDataUnitChanges: (state: any, dataUnit: string) => any;
5
- export declare const selectCurrentRecordIndex: (state: any, dataUnit: string) => any;
6
- export declare const selectNewRecordIndex: (state: any, dataUnit: string) => any;
7
- export declare const selectUndoState: (state: any) => {
8
- canUndo: boolean;
9
- canRedo: boolean;
10
- };
11
- export declare const selectLoadingData: (state: any, dataUnit: string) => any;
12
- export declare const selectErrorMessage: (state: any, dataUnit: string, recordId: string, fieldName: string) => any;
13
- export declare const selectInvalidFields: (state: any, dataUnit: string, recordId: string) => string[];
1
+ export declare const selectCurrentTab: (state: any, formName: string) => any;
2
+ export declare const selectIsCollapsedFieldSet: (state: any, fieldSetName: string) => boolean;
3
+ export declare const selectRecordChanges: (state: any, dataUnit: string, recordId: string) => any;
4
+ export declare const selectDataUnitChanges: (state: any, dataUnit: string) => any;
5
+ export declare const selectCurrentRecordIndex: (state: any, dataUnit: string) => any;
6
+ export declare const selectNewRecordIndex: (state: any, dataUnit: string) => any;
7
+ export declare const selectUndoState: (state: any) => {
8
+ canUndo: boolean;
9
+ canRedo: boolean;
10
+ };
11
+ export declare const selectLoadingData: (state: any, dataUnit: string) => any;
12
+ export declare const selectErrorMessage: (state: any, dataUnit: string, recordId: string, fieldName: string) => any;
13
+ export declare const selectInvalidFields: (state: any, dataUnit: string, recordId: string) => string[];
14
+ export declare const selectVisibleButtons: (state: any) => any;
@@ -1,48 +1,61 @@
1
- import { Store } from 'redux';
2
- export default class DataUnit {
3
- private _store;
4
- private _changeDeboucing;
5
- name: string;
6
- cardinality: string;
7
- recordsValidator: RecordsValidator;
8
- loadExecutor: Function;
9
- saveExecutor: Function;
10
- removeExecutor: Function;
11
- fieldSearchExecutor: Function;
12
- _records: Array<Record>;
13
- constructor(name: string, cardinality?: string);
14
- set store(store: Store);
15
- isLoading(): boolean;
16
- hasChanges(): boolean;
17
- hasNext(): boolean;
18
- hasPrevious(): boolean;
19
- hasCurrentRecord(): boolean;
20
- previous(): void;
21
- next(): void;
22
- getValue(fieldName: string): any;
23
- getErrorMessage(fieldName: string): string;
24
- changeValue(fieldName: string, newValue: any): void;
25
- cancel(): void;
26
- insert(): void;
27
- save(): void;
28
- load(): void;
29
- remove(): void;
30
- private processSaveResult;
31
- private processLoadResult;
32
- private processRemoveResult;
33
- set records(records: Array<Record>);
34
- get records(): Array<Record>;
35
- private getCurrentRecord;
36
- private getRecordChanges;
37
- private validateRecords;
38
- }
39
- export interface Record {
40
- record__id: string;
41
- }
42
- export interface RecordsValidator {
43
- validateRecords(dataUnit: DataUnit, records: Array<Record>): ValidationResult;
44
- }
45
- export interface ValidationResult {
46
- isValid: boolean;
47
- message: string;
48
- }
1
+ import { Store } from 'redux';
2
+ export default class DataUnit {
3
+ private _store;
4
+ private _changeDeboucing;
5
+ private _records;
6
+ name: string;
7
+ unitLabel: string;
8
+ cardinality: string;
9
+ recordsValidator: RecordsValidator;
10
+ parentDU: DataUnit;
11
+ parentDUName: string;
12
+ private _children;
13
+ loadExecutor: Function;
14
+ saveExecutor: Function;
15
+ removeExecutor: Function;
16
+ fieldSearchExecutor: Function;
17
+ constructor(name: string, unitLabel: string, cardinality?: string, parentDU?: DataUnit);
18
+ set store(store: Store);
19
+ isLoading(): boolean;
20
+ hasChanges(): boolean;
21
+ hasNext(): boolean;
22
+ hasPrevious(): boolean;
23
+ hasCurrentRecord(): boolean;
24
+ previous(): void;
25
+ next(): void;
26
+ getValue(fieldName: string): any;
27
+ getErrorMessage(fieldName: string): string;
28
+ changeValue(fieldName: string, newValue: any): void;
29
+ cancel(): void;
30
+ insert(): void;
31
+ buildChange(r: Record): {
32
+ __data__unit: string;
33
+ __record__id: string;
34
+ __sub__changes: any[];
35
+ };
36
+ private getSubChanges;
37
+ getChangesToSave(): any[];
38
+ save(): void;
39
+ load(): void;
40
+ remove(): void;
41
+ private processSaveResult;
42
+ private processLoadResult;
43
+ private processRemoveResult;
44
+ set records(records: Array<Record>);
45
+ private bindToParent;
46
+ get records(): Array<Record>;
47
+ private getCurrentRecord;
48
+ private getRecordChanges;
49
+ validateRecords(): boolean;
50
+ }
51
+ export interface Record {
52
+ record__id: string;
53
+ parent__record__id?: string;
54
+ }
55
+ export interface RecordsValidator {
56
+ validateRecords(dataUnit: DataUnit, records: Array<Record>): ValidationResult;
57
+ }
58
+ export interface ValidationResult {
59
+ isValid: boolean;
60
+ message: string;
61
+ }