@formio/js 5.0.0-rc.66 → 5.0.0-rc.68

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/dist/formio.builder.css +0 -1
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +0 -1
  7. package/dist/formio.form.js +11 -11
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  11. package/dist/formio.full.css +0 -1
  12. package/dist/formio.full.js +12 -12
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  16. package/dist/formio.js +2 -2
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +3 -3
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  22. package/lib/cjs/Webform.js +4 -0
  23. package/lib/cjs/components/address/Address.js +4 -0
  24. package/lib/cjs/components/address/editForm/Address.edit.provider.js +1 -1
  25. package/lib/cjs/components/datagrid/DataGrid.d.ts +9 -0
  26. package/lib/cjs/components/datagrid/DataGrid.js +49 -34
  27. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  28. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.js +139 -0
  29. package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
  30. package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
  31. package/lib/cjs/components/datamap/DataMap.js +2 -2
  32. package/lib/cjs/components/day/fixtures/comp8.d.ts +41 -0
  33. package/lib/cjs/components/day/fixtures/comp8.js +40 -0
  34. package/lib/cjs/components/day/fixtures/index.d.ts +2 -1
  35. package/lib/cjs/components/day/fixtures/index.js +3 -1
  36. package/lib/cjs/components/editgrid/EditGrid.js +4 -3
  37. package/lib/cjs/components/editgrid/fixtures/comp16.d.ts +52 -0
  38. package/lib/cjs/components/editgrid/fixtures/comp16.js +71 -0
  39. package/lib/cjs/components/editgrid/fixtures/index.d.ts +2 -1
  40. package/lib/cjs/components/editgrid/fixtures/index.js +3 -1
  41. package/lib/cjs/translations/en.d.ts +3 -0
  42. package/lib/cjs/translations/en.js +4 -1
  43. package/lib/mjs/Webform.js +4 -0
  44. package/lib/mjs/components/address/Address.js +4 -0
  45. package/lib/mjs/components/address/editForm/Address.edit.provider.js +1 -1
  46. package/lib/mjs/components/datagrid/DataGrid.d.ts +9 -0
  47. package/lib/mjs/components/datagrid/DataGrid.js +48 -33
  48. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  49. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.js +137 -0
  50. package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
  51. package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
  52. package/lib/mjs/components/datamap/DataMap.js +1 -1
  53. package/lib/mjs/components/day/fixtures/comp8.d.ts +41 -0
  54. package/lib/mjs/components/day/fixtures/comp8.js +38 -0
  55. package/lib/mjs/components/day/fixtures/index.d.ts +2 -1
  56. package/lib/mjs/components/day/fixtures/index.js +2 -1
  57. package/lib/mjs/components/editgrid/EditGrid.js +4 -3
  58. package/lib/mjs/components/editgrid/fixtures/comp16.d.ts +52 -0
  59. package/lib/mjs/components/editgrid/fixtures/comp16.js +69 -0
  60. package/lib/mjs/components/editgrid/fixtures/index.d.ts +2 -1
  61. package/lib/mjs/components/editgrid/fixtures/index.js +2 -1
  62. package/lib/mjs/translations/en.d.ts +3 -0
  63. package/lib/mjs/translations/en.js +4 -1
  64. package/package.json +2 -2
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ type: 'form',
5
+ display: 'wizard',
6
+ components: [
7
+ {
8
+ title: 'Page 1',
9
+ breadcrumbClickable: true,
10
+ buttonSettings: {
11
+ previous: true,
12
+ cancel: true,
13
+ next: true
14
+ },
15
+ collapsible: false,
16
+ tableView: false,
17
+ key: 'page3',
18
+ type: 'panel',
19
+ label: 'Page 2',
20
+ input: false,
21
+ components: [
22
+ {
23
+ label: 'Edit Grid',
24
+ tableView: true,
25
+ rowDrafts: false,
26
+ key: 'editGrid',
27
+ type: 'editgrid',
28
+ input: true,
29
+ components: [
30
+ {
31
+ label: 'Text Field',
32
+ tableView: true,
33
+ key: 'textField',
34
+ type: 'textfield',
35
+ input: true,
36
+ alwaysEnabled: false
37
+ }
38
+ ],
39
+ alwaysEnabled: false
40
+ }
41
+ ],
42
+ alwaysEnabled: false
43
+ },
44
+ {
45
+ title: 'Page 2',
46
+ breadcrumbClickable: true,
47
+ buttonSettings: {
48
+ previous: true,
49
+ cancel: true,
50
+ next: true
51
+ },
52
+ collapsible: false,
53
+ tableView: false,
54
+ key: 'page2',
55
+ type: 'panel',
56
+ label: 'Page 1',
57
+ input: false,
58
+ alwaysEnabled: false,
59
+ components: []
60
+ },
61
+ {
62
+ label: 'Submit',
63
+ showValidations: false,
64
+ alwaysEnabled: false,
65
+ tableView: false,
66
+ key: 'submit',
67
+ type: 'button',
68
+ input: true
69
+ }
70
+ ]
71
+ };
@@ -7,6 +7,7 @@ import comp12 from './comp12';
7
7
  import comp13 from './comp13';
8
8
  import comp14 from './comp14';
9
9
  import comp15 from './comp15';
10
+ import comp16 from './comp16';
10
11
  import comp4 from './comp4';
11
12
  import comp5 from './comp5';
12
13
  import comp6 from './comp6';
@@ -16,4 +17,4 @@ import comp9 from './comp9';
16
17
  import compOpenWhenEmpty from './comp-openWhenEmpty';
17
18
  import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
18
19
  import compWithCustomDefaultValue from './comp-with-custom-default-value';
19
- export { comp1, comp2, comp3, comp10, comp11, comp12, comp13, comp14, comp15, comp4, comp5, comp6, comp7, comp8, comp9, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue };
20
+ export { comp1, comp2, comp3, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp4, comp5, comp6, comp7, comp8, comp9, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
7
7
  const comp1_1 = __importDefault(require("./comp1"));
8
8
  exports.comp1 = comp1_1.default;
9
9
  const comp2_1 = __importDefault(require("./comp2"));
@@ -34,6 +34,8 @@ const comp14_1 = __importDefault(require("./comp14"));
34
34
  exports.comp14 = comp14_1.default;
35
35
  const comp15_1 = __importDefault(require("./comp15"));
36
36
  exports.comp15 = comp15_1.default;
37
+ const comp16_1 = __importDefault(require("./comp16"));
38
+ exports.comp16 = comp16_1.default;
37
39
  const comp_with_conditions_and_openWhenEmpty_1 = __importDefault(require("./comp-with-conditions-and-openWhenEmpty"));
38
40
  exports.withOpenWhenEmptyAndConditions = comp_with_conditions_and_openWhenEmpty_1.default;
39
41
  const comp_openWhenEmpty_1 = __importDefault(require("./comp-openWhenEmpty"));
@@ -74,5 +74,8 @@ declare namespace _default {
74
74
  let apiKey: string;
75
75
  let typeRemaining: string;
76
76
  let typeCount: string;
77
+ let requiredDayField: string;
78
+ let requiredMonthField: string;
79
+ let requiredYearField: string;
77
80
  }
78
81
  export default _default;
@@ -75,5 +75,8 @@ exports.default = {
75
75
  reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
76
76
  apiKey: 'API Key is not unique: {{key}}',
77
77
  typeRemaining: '{{ remaining }} {{ type }} remaining.',
78
- typeCount: '{{ count }} {{ type }}'
78
+ typeCount: '{{ count }} {{ type }}',
79
+ requiredDayField: '{{ field }} is required',
80
+ requiredMonthField: '{{ field }} is required',
81
+ requiredYearField: '{{ field }} is required'
79
82
  };
@@ -8,6 +8,10 @@ import Components from "./components/Components";
8
8
  import NestedDataComponent from "./components/_classes/nesteddata/NestedDataComponent";
9
9
  import { fastCloneDeep, currentTimezone, unescapeHTML, getStringFromComponentPath, convertStringToHTMLElement, getArrayFromComponentPath, } from "./utils/utils";
10
10
  import { eachComponent } from "./utils/formUtils";
11
+ // We need this here because dragula pulls in CustomEvent class that requires global to exist.
12
+ if (typeof window !== 'undefined' && typeof window.global === 'undefined') {
13
+ window.global = window;
14
+ }
11
15
  import dragula from "dragula";
12
16
  // Initialize the available forms.
13
17
  Formio.forms = {};
@@ -107,6 +107,10 @@ export default class AddressComponent extends ContainerComponent {
107
107
  if (!this.builderMode) {
108
108
  if (this.component.provider) {
109
109
  const { provider, providerOptions, } = this.component;
110
+ if (_.get(providerOptions, 'params.subscriptionKey')) {
111
+ _.set(providerOptions, "params['subscription-key']", _.get(providerOptions, 'params.subscriptionKey'));
112
+ _.unset(providerOptions, 'params.subscriptionKey');
113
+ }
110
114
  this.provider = this.initializeProvider(provider, providerOptions);
111
115
  }
112
116
  else if (this.component.map) {
@@ -26,7 +26,7 @@ export default [
26
26
  {
27
27
  type: 'textfield',
28
28
  input: true,
29
- key: "providerOptions.params['subscription-key']",
29
+ key: "providerOptions.params.subscriptionKey",
30
30
  label: 'Subscription Key',
31
31
  placeholder: 'Enter Subscription Key',
32
32
  weight: 10,
@@ -61,6 +61,15 @@ export default class DataGridComponent extends NestedArrayComponent {
61
61
  loadRefs(element: any, refs: any): void;
62
62
  dragula: any;
63
63
  getComponentsContainer(): any;
64
+ /**
65
+ * Reorder values in array based on the old and new position
66
+ * @param {any} valuesArr - An array of values.
67
+ * @param {number} oldPosition - The index of the value in array before reordering.
68
+ * @param {number} newPosition - The index of the value in array after reordering.
69
+ * @param {boolean|any} movedBelow - Whether or not the value is moved below.
70
+ * @returns {void}
71
+ */
72
+ reorderValues(valuesArr: any, oldPosition: number, newPosition: number, movedBelow: boolean | any): void;
64
73
  onReorder(element: any, _target: any, _source: any, sibling: any): void;
65
74
  focusOnNewRowElement(row: any): void;
66
75
  addRow(): void;
@@ -1,7 +1,8 @@
1
1
  import _ from 'lodash';
2
2
  import NestedArrayComponent from '../_classes/nestedarray/NestedArrayComponent';
3
3
  import { fastCloneDeep, getFocusableElements } from '../../utils/utils';
4
- import { Components } from '../Components';
4
+ import Components from '../Components';
5
+ import dragula from 'dragula';
5
6
  export default class DataGridComponent extends NestedArrayComponent {
6
7
  static schema(...extend) {
7
8
  return NestedArrayComponent.schema({
@@ -278,34 +279,32 @@ export default class DataGridComponent extends NestedArrayComponent {
278
279
  this.refs[`${this.datagridKey}-row`].forEach((row, index) => {
279
280
  row.dragInfo = { index };
280
281
  });
281
- if (this.root.dragulaLib) {
282
- this.dragula = this.root.dragulaLib([this.refs[`${this.datagridKey}-tbody`]], {
283
- moves: (_draggedElement, _oldParent, clickedElement) => {
284
- const clickedElementKey = clickedElement.getAttribute('data-key');
285
- const oldParentKey = _oldParent.getAttribute('data-key');
286
- //Check if the clicked button belongs to that container, if false, it belongs to the nested container
287
- if (oldParentKey === clickedElementKey) {
288
- return clickedElement.classList.contains('formio-drag-button');
289
- }
290
- }
291
- }).on('drop', this.onReorder.bind(this));
292
- this.dragula.on('cloned', (el, original) => {
293
- if (el && el.children && original && original.children) {
294
- _.each(original.children, (child, index) => {
295
- const styles = getComputedStyle(child, null);
296
- if (styles.cssText !== '') {
297
- el.children[index].style.cssText = styles.cssText;
298
- }
299
- else {
300
- const cssText = Object.values(styles).reduce((css, propertyName) => {
301
- return `${css}${propertyName}:${styles.getPropertyValue(propertyName)};`;
302
- }, '');
303
- el.children[index].style.cssText = cssText;
304
- }
305
- });
282
+ this.dragula = dragula([this.refs[`${this.datagridKey}-tbody`]], {
283
+ moves: (_draggedElement, _oldParent, clickedElement) => {
284
+ const clickedElementKey = clickedElement.getAttribute('data-key');
285
+ const oldParentKey = _oldParent.getAttribute('data-key');
286
+ //Check if the clicked button belongs to that container, if false, it belongs to the nested container
287
+ if (oldParentKey === clickedElementKey) {
288
+ return clickedElement.classList.contains('formio-drag-button');
306
289
  }
307
- });
308
- }
290
+ }
291
+ }).on('drop', this.onReorder.bind(this));
292
+ this.dragula.on('cloned', (el, original) => {
293
+ if (el && el.children && original && original.children) {
294
+ _.each(original.children, (child, index) => {
295
+ const styles = getComputedStyle(child, null);
296
+ if (styles.cssText !== '') {
297
+ el.children[index].style.cssText = styles.cssText;
298
+ }
299
+ else {
300
+ const cssText = Object.values(styles).reduce((css, propertyName) => {
301
+ return `${css}${propertyName}:${styles.getPropertyValue(propertyName)};`;
302
+ }, '');
303
+ el.children[index].style.cssText = cssText;
304
+ }
305
+ });
306
+ }
307
+ });
309
308
  }
310
309
  this.refs[`${this.datagridKey}-addRow`].forEach((addButton) => {
311
310
  this.addEventListener(addButton, 'click', this.addRow.bind(this));
@@ -333,6 +332,24 @@ export default class DataGridComponent extends NestedArrayComponent {
333
332
  getComponentsContainer() {
334
333
  return this.component.components;
335
334
  }
335
+ /**
336
+ * Reorder values in array based on the old and new position
337
+ * @param {any} valuesArr - An array of values.
338
+ * @param {number} oldPosition - The index of the value in array before reordering.
339
+ * @param {number} newPosition - The index of the value in array after reordering.
340
+ * @param {boolean|any} movedBelow - Whether or not the value is moved below.
341
+ * @returns {void}
342
+ */
343
+ reorderValues(valuesArr, oldPosition, newPosition, movedBelow) {
344
+ if (!_.isArray(valuesArr) || _.isEmpty(valuesArr)) {
345
+ return;
346
+ }
347
+ const draggedRowData = valuesArr[oldPosition];
348
+ //insert element at new position
349
+ valuesArr.splice(newPosition, 0, draggedRowData);
350
+ //remove element from old position (if was moved above, after insertion it's at +1 index)
351
+ valuesArr.splice(movedBelow ? oldPosition : oldPosition + 1, 1);
352
+ }
336
353
  onReorder(element, _target, _source, sibling) {
337
354
  if (!element.dragInfo || (sibling && !sibling.dragInfo)) {
338
355
  console.warn('There is no Drag Info available for either dragged or sibling element');
@@ -343,11 +360,9 @@ export default class DataGridComponent extends NestedArrayComponent {
343
360
  const newPosition = sibling ? sibling.dragInfo.index : this.dataValue.length;
344
361
  const movedBelow = newPosition > oldPosition;
345
362
  const dataValue = fastCloneDeep(this.dataValue);
346
- const draggedRowData = dataValue[oldPosition];
347
- //insert element at new position
348
- dataValue.splice(newPosition, 0, draggedRowData);
349
- //remove element from old position (if was moved above, after insertion it's at +1 index)
350
- dataValue.splice(movedBelow ? oldPosition : oldPosition + 1, 1);
363
+ this.reorderValues(dataValue, oldPosition, newPosition, movedBelow);
364
+ //reorder select data
365
+ this.reorderValues(_.get(this.root, `submission.metadata.selectData.${this.path}`, []), oldPosition, newPosition, movedBelow);
351
366
  //need to re-build rows to re-calculate indexes and other indexed fields for component instance (like rows for ex.)
352
367
  this.setValue(dataValue, { isReordered: true });
353
368
  this.rebuild();
@@ -0,0 +1,100 @@
1
+ declare namespace _default {
2
+ export { form };
3
+ export { submission };
4
+ }
5
+ export default _default;
6
+ declare namespace form {
7
+ let _id: string;
8
+ let title: string;
9
+ let name: string;
10
+ let path: string;
11
+ let type: string;
12
+ let display: string;
13
+ let components: ({
14
+ label: string;
15
+ reorder: boolean;
16
+ addAnotherPosition: string;
17
+ layoutFixed: boolean;
18
+ enableRowGroups: boolean;
19
+ initEmpty: boolean;
20
+ tableView: boolean;
21
+ defaultValue: {
22
+ select: string;
23
+ }[];
24
+ key: string;
25
+ type: string;
26
+ input: boolean;
27
+ components: {
28
+ label: string;
29
+ widget: string;
30
+ tableView: boolean;
31
+ dataSrc: string;
32
+ data: {
33
+ resource: string;
34
+ };
35
+ dataType: string;
36
+ valueProperty: string;
37
+ template: string;
38
+ validate: {
39
+ select: boolean;
40
+ };
41
+ key: string;
42
+ type: string;
43
+ searchField: string;
44
+ limit: number;
45
+ noRefreshOnScroll: boolean;
46
+ addResource: boolean;
47
+ reference: boolean;
48
+ input: boolean;
49
+ }[];
50
+ disableOnInvalid?: undefined;
51
+ } | {
52
+ type: string;
53
+ label: string;
54
+ key: string;
55
+ disableOnInvalid: boolean;
56
+ input: boolean;
57
+ tableView: boolean;
58
+ reorder?: undefined;
59
+ addAnotherPosition?: undefined;
60
+ layoutFixed?: undefined;
61
+ enableRowGroups?: undefined;
62
+ initEmpty?: undefined;
63
+ defaultValue?: undefined;
64
+ components?: undefined;
65
+ })[];
66
+ let created: string;
67
+ let modified: string;
68
+ let machineName: string;
69
+ }
70
+ declare namespace submission {
71
+ let form_1: string;
72
+ export { form_1 as form };
73
+ export namespace metadata {
74
+ namespace selectData {
75
+ let dataGrid: {
76
+ select: {
77
+ data: {
78
+ number: number;
79
+ };
80
+ };
81
+ }[];
82
+ }
83
+ }
84
+ export namespace data {
85
+ let dataGrid_1: {
86
+ select: string;
87
+ }[];
88
+ export { dataGrid_1 as dataGrid };
89
+ export let dataTable: never[];
90
+ export let submit: boolean;
91
+ }
92
+ let _id_1: string;
93
+ export { _id_1 as _id };
94
+ export let project: string;
95
+ export let state: string;
96
+ let created_1: string;
97
+ export { created_1 as created };
98
+ let modified_1: string;
99
+ export { modified_1 as modified };
100
+ }
@@ -0,0 +1,137 @@
1
+ const form = {
2
+ _id: '66742f4146717b98a9fa280f',
3
+ title: 'test reorder',
4
+ name: 'testReorder',
5
+ path: 'testreorder',
6
+ type: 'form',
7
+ display: 'form',
8
+ components: [
9
+ {
10
+ label: 'Data Grid',
11
+ reorder: true,
12
+ addAnotherPosition: 'bottom',
13
+ layoutFixed: false,
14
+ enableRowGroups: false,
15
+ initEmpty: false,
16
+ tableView: false,
17
+ defaultValue: [
18
+ {
19
+ select: '',
20
+ },
21
+ ],
22
+ key: 'dataGrid',
23
+ type: 'datagrid',
24
+ input: true,
25
+ components: [
26
+ {
27
+ label: 'Select',
28
+ widget: 'choicesjs',
29
+ tableView: true,
30
+ dataSrc: 'resource',
31
+ data: {
32
+ resource: '66742ee946717b98a9fa1b0b',
33
+ },
34
+ dataType: 'string',
35
+ valueProperty: 'data.textField',
36
+ template: '<span>{{ item.data.number }}</span>',
37
+ validate: {
38
+ select: false,
39
+ },
40
+ key: 'select',
41
+ type: 'select',
42
+ searchField: 'data.textField__regex',
43
+ limit: 10,
44
+ noRefreshOnScroll: false,
45
+ addResource: false,
46
+ reference: false,
47
+ input: true,
48
+ },
49
+ ],
50
+ },
51
+ {
52
+ type: 'button',
53
+ label: 'Submit',
54
+ key: 'submit',
55
+ disableOnInvalid: true,
56
+ input: true,
57
+ tableView: false,
58
+ },
59
+ ],
60
+ created: '2024-06-20T13:31:45.177Z',
61
+ modified: '2024-06-25T10:32:46.577Z',
62
+ machineName: 'tifwklexhyrgxbr:testReorder',
63
+ };
64
+ const submission = {
65
+ form: '66742f4146717b98a9fa280f',
66
+ metadata: {
67
+ selectData: {
68
+ dataGrid: [
69
+ {
70
+ select: {
71
+ data: {
72
+ number: 1,
73
+ },
74
+ },
75
+ },
76
+ {
77
+ select: {
78
+ data: {
79
+ number: 2,
80
+ },
81
+ },
82
+ },
83
+ {
84
+ select: {
85
+ data: {
86
+ number: 3,
87
+ },
88
+ },
89
+ },
90
+ {
91
+ select: {
92
+ data: {
93
+ number: 4,
94
+ },
95
+ },
96
+ },
97
+ {
98
+ select: {
99
+ data: {
100
+ number: 5,
101
+ },
102
+ },
103
+ },
104
+ ],
105
+ },
106
+ },
107
+ data: {
108
+ dataGrid: [
109
+ {
110
+ select: '11',
111
+ },
112
+ {
113
+ select: '22',
114
+ },
115
+ {
116
+ select: '33',
117
+ },
118
+ {
119
+ select: '44',
120
+ },
121
+ {
122
+ select: '55',
123
+ },
124
+ ],
125
+ dataTable: [],
126
+ submit: true,
127
+ },
128
+ _id: '667ab5ee6a69739703d30def',
129
+ project: '65df46bc93bcfaa231f3db1c',
130
+ state: 'submitted',
131
+ created: '2024-06-25T12:19:58.626Z',
132
+ modified: '2024-06-25T12:19:58.627Z',
133
+ };
134
+ export default {
135
+ form,
136
+ submission,
137
+ };
@@ -16,4 +16,5 @@ import modalWithRequiredFields from './comp-modal-with-required-fields';
16
16
  import withAllowCalculateOverride from './comp-with-allow-calculate-override';
17
17
  import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
18
18
  import withCheckboxes from './comp-with-checkboxes';
19
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
19
+ import withReorder from './comp-with-reorder';
20
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
@@ -16,4 +16,5 @@ import withCollapsibleRowGroups from './comp-with-collapsible-groups';
16
16
  import withAllowCalculateOverride from './comp-with-allow-calculate-override';
17
17
  import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
18
18
  import withCheckboxes from './comp-with-checkboxes';
19
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
19
+ import withReorder from './comp-with-reorder';
20
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes, withReorder };
@@ -3,7 +3,7 @@ import DataGridComponent from '../datagrid/DataGrid';
3
3
  import _ from 'lodash';
4
4
  import EventEmitter from 'eventemitter3';
5
5
  import { componentValueTypes, getComponentSavedTypes, uniqueKey } from '../../utils/utils';
6
- import { Components } from '../Components';
6
+ import Components from '../Components';
7
7
  export default class DataMapComponent extends DataGridComponent {
8
8
  static schema(...extend) {
9
9
  return Component.schema({
@@ -0,0 +1,41 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ hideInputLabels: boolean;
5
+ inputsLabelPosition: string;
6
+ useLocaleSettings: boolean;
7
+ alwaysEnabled: boolean;
8
+ tableView: boolean;
9
+ fields: {
10
+ day: {
11
+ hide: boolean;
12
+ required: boolean;
13
+ };
14
+ month: {
15
+ hide: boolean;
16
+ required: boolean;
17
+ };
18
+ year: {
19
+ hide: boolean;
20
+ required: boolean;
21
+ };
22
+ };
23
+ key: string;
24
+ type: string;
25
+ input: boolean;
26
+ showValidations?: undefined;
27
+ } | {
28
+ label: string;
29
+ showValidations: boolean;
30
+ alwaysEnabled: boolean;
31
+ tableView: boolean;
32
+ key: string;
33
+ type: string;
34
+ input: boolean;
35
+ hideInputLabels?: undefined;
36
+ inputsLabelPosition?: undefined;
37
+ useLocaleSettings?: undefined;
38
+ fields?: undefined;
39
+ })[];
40
+ }
41
+ export default _default;
@@ -0,0 +1,38 @@
1
+ export default {
2
+ "components": [
3
+ {
4
+ "label": "Day - Table",
5
+ "hideInputLabels": false,
6
+ "inputsLabelPosition": "top",
7
+ "useLocaleSettings": false,
8
+ "alwaysEnabled": false,
9
+ "tableView": false,
10
+ "fields": {
11
+ "day": {
12
+ "hide": false,
13
+ "required": true
14
+ },
15
+ "month": {
16
+ "hide": false,
17
+ "required": true
18
+ },
19
+ "year": {
20
+ "hide": false,
21
+ "required": true
22
+ }
23
+ },
24
+ "key": "dayTable",
25
+ "type": "day",
26
+ "input": true
27
+ },
28
+ {
29
+ "label": "Submit",
30
+ "showValidations": false,
31
+ "alwaysEnabled": false,
32
+ "tableView": false,
33
+ "key": "submit",
34
+ "type": "button",
35
+ "input": true
36
+ }
37
+ ]
38
+ };
@@ -5,4 +5,5 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
8
+ import comp8 from './comp8';
9
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
@@ -5,4 +5,5 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
8
+ import comp8 from './comp8';
9
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };