@formio/js 5.0.0-rc.47 → 5.0.0-rc.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +10 -10
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.full.js +10 -10
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  10. package/dist/formio.js +2 -2
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +1 -1
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  16. package/lib/cjs/PDF.d.ts +1 -1
  17. package/lib/cjs/Webform.d.ts +11 -1
  18. package/lib/cjs/Webform.js +3 -1
  19. package/lib/cjs/components/_classes/component/Component.d.ts +4 -4
  20. package/lib/cjs/components/_classes/component/Component.js +5 -7
  21. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +5 -7
  22. package/lib/cjs/components/_classes/nested/NestedComponent.js +5 -6
  23. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -1
  24. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  25. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -1
  26. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
  27. package/lib/cjs/components/day/Day.d.ts +1 -0
  28. package/lib/cjs/components/html/HTML.js +2 -2
  29. package/lib/cjs/components/select/Select.d.ts +4 -1
  30. package/lib/cjs/components/select/Select.js +57 -34
  31. package/lib/cjs/components/select/fixtures/comp22.d.ts +51 -0
  32. package/lib/cjs/components/select/fixtures/comp22.js +43 -0
  33. package/lib/cjs/components/select/fixtures/index.d.ts +2 -1
  34. package/lib/cjs/components/select/fixtures/index.js +3 -1
  35. package/lib/mjs/PDF.d.ts +1 -1
  36. package/lib/mjs/Webform.d.ts +11 -1
  37. package/lib/mjs/Webform.js +3 -1
  38. package/lib/mjs/components/_classes/component/Component.d.ts +4 -4
  39. package/lib/mjs/components/_classes/component/Component.js +5 -7
  40. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +5 -7
  41. package/lib/mjs/components/_classes/nested/NestedComponent.js +5 -6
  42. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -1
  43. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  44. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -1
  45. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
  46. package/lib/mjs/components/day/Day.d.ts +1 -0
  47. package/lib/mjs/components/html/HTML.js +2 -2
  48. package/lib/mjs/components/select/Select.d.ts +4 -1
  49. package/lib/mjs/components/select/Select.js +56 -33
  50. package/lib/mjs/components/select/fixtures/comp22.d.ts +51 -0
  51. package/lib/mjs/components/select/fixtures/comp22.js +41 -0
  52. package/lib/mjs/components/select/fixtures/index.d.ts +2 -1
  53. package/lib/mjs/components/select/fixtures/index.js +2 -1
  54. package/package.json +2 -2
@@ -275,14 +275,14 @@ declare class Component extends Element {
275
275
  getFormattedAttribute(attr: any): any;
276
276
  getFormattedTooltip(tooltipValue: any): any;
277
277
  isHtmlRenderMode(): boolean;
278
- renderTemplate(name: any, data: {} | undefined, modeOption: any): any;
278
+ renderTemplate(name: any, data?: {}, modeOption?: string): any;
279
279
  /**
280
280
  * Sanitize an html string.
281
281
  *
282
282
  * @param string
283
283
  * @returns {*}
284
284
  */
285
- sanitize(dirty: any, forceSanitize: any, options: any): any;
285
+ sanitize(dirty: any, forceSanitize?: boolean, options?: {}): any;
286
286
  /**
287
287
  * Render a template string into html.
288
288
  *
@@ -761,7 +761,7 @@ declare class Component extends Element {
761
761
  * @param {*} silentCheck
762
762
  * @returns
763
763
  */
764
- checkValidity(data: any, dirty: any, row: any, silentCheck: any, errors?: any[]): boolean;
764
+ checkValidity(data?: any, dirty?: any, row?: any, silentCheck?: any, errors?: any[]): boolean;
765
765
  checkAsyncValidity(data: any, dirty: any, row: any, silentCheck: any, errors?: any[]): boolean;
766
766
  /**
767
767
  * Check the conditions, calculations, and validity of a single component and triggers an update if
@@ -828,7 +828,7 @@ declare class Component extends Element {
828
828
  };
829
829
  autofocus(): void;
830
830
  scrollIntoView(element?: any): void;
831
- focus(index: any): void;
831
+ focus(index?: number): void;
832
832
  /**
833
833
  * Get `Formio` instance for working with files
834
834
  */
@@ -822,7 +822,7 @@ export default class Component extends Element {
822
822
  isHtmlRenderMode() {
823
823
  return this.options.renderMode === 'html';
824
824
  }
825
- renderTemplate(name, data = {}, modeOption) {
825
+ renderTemplate(name, data = {}, modeOption = '') {
826
826
  // Need to make this fall back to form if renderMode is not found similar to how we search templates.
827
827
  const mode = modeOption || this.options.renderMode || 'form';
828
828
  data.component = this.component;
@@ -866,7 +866,7 @@ export default class Component extends Element {
866
866
  * @param string
867
867
  * @returns {*}
868
868
  */
869
- sanitize(dirty, forceSanitize, options) {
869
+ sanitize(dirty, forceSanitize = false, options = {}) {
870
870
  if (!this.shouldSanitizeValue && !forceSanitize) {
871
871
  return dirty;
872
872
  }
@@ -2750,7 +2750,7 @@ export default class Component extends Element {
2750
2750
  * @param {*} silentCheck
2751
2751
  * @returns
2752
2752
  */
2753
- checkValidity(data, dirty, row, silentCheck, errors = []) {
2753
+ checkValidity(data = null, dirty = false, row = null, silentCheck = false, errors = []) {
2754
2754
  data = data || this.rootValue;
2755
2755
  row = row || this.data;
2756
2756
  console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');
@@ -3155,14 +3155,12 @@ export default class Component extends Element {
3155
3155
  const { left, top } = element.getBoundingClientRect();
3156
3156
  window.scrollTo(left + window.scrollX, top + window.scrollY);
3157
3157
  }
3158
- focus(index) {
3158
+ focus(index = (this.refs.input.length - 1)) {
3159
3159
  if ('beforeFocus' in this.parent) {
3160
3160
  this.parent.beforeFocus(this);
3161
3161
  }
3162
3162
  if (this.refs.input?.length) {
3163
- const focusingInput = typeof index === 'number' && this.refs.input[index]
3164
- ? this.refs.input[index]
3165
- : this.refs.input[this.refs.input.length - 1];
3163
+ const focusingInput = this.refs.input[index];
3166
3164
  if (this.component.widget?.type === 'calendar') {
3167
3165
  const sibling = focusingInput.nextSibling;
3168
3166
  if (sibling) {
@@ -17,7 +17,7 @@ export default class NestedComponent extends Field {
17
17
  *
18
18
  * @param {function} fn - Called for every component.
19
19
  */
20
- everyComponent(fn: Function, options: any): void;
20
+ everyComponent(fn: Function, options?: {}): void;
21
21
  hasComponent(component: any): boolean;
22
22
  flattenComponents(): {};
23
23
  /**
@@ -43,7 +43,7 @@ export default class NestedComponent extends Field {
43
43
  * @param {function} fn - Called with the component once it is retrieved.
44
44
  * @return {Object} - The component retrieved.
45
45
  */
46
- getComponentById(id: string, fn: Function): Object;
46
+ getComponentById(id: string, fn?: Function): Object;
47
47
  /**
48
48
  * Create a new component and add it to the components array.
49
49
  *
@@ -70,7 +70,7 @@ export default class NestedComponent extends Field {
70
70
  * @param {HTMLElement} before - A DOM element to insert this element before.
71
71
  * @return {Component} - The created component instance.
72
72
  */
73
- addComponent(component: Object, data: Object, before: HTMLElement, noAdd: any): Component;
73
+ addComponent(component: Object, data?: Object, before?: HTMLElement, noAdd?: boolean): Component;
74
74
  beforeFocus(): void;
75
75
  renderComponents(components: any): any;
76
76
  attach(element: any): Promise<[void, void]>;
@@ -90,7 +90,7 @@ export default class NestedComponent extends Field {
90
90
  * @param {function} fn - Called once the component is removed.
91
91
  * @return {null}
92
92
  */
93
- removeComponentByKey(key: string, fn: Function): null;
93
+ removeComponentByKey(key: string, fn?: Function): null;
94
94
  /**
95
95
  * Removes a component provided the Id of the component.
96
96
  *
@@ -98,7 +98,7 @@ export default class NestedComponent extends Field {
98
98
  * @param {function} fn - Called when the component is removed.
99
99
  * @return {null}
100
100
  */
101
- removeComponentById(id: string, fn: Function): null;
101
+ removeComponentById(id: string, fn?: Function): null;
102
102
  updateValue(value: any, flags?: {}): any;
103
103
  shouldSkipValidation(data: any, row: any, flags: any): boolean;
104
104
  checkData(data: any, flags: any, row: any, components: any): true | undefined;
@@ -136,7 +136,6 @@ export default class NestedComponent extends Field {
136
136
  */
137
137
  validate(data: any, flags?: any): any;
138
138
  checkComponentValidity(data: any, dirty: any, row: any, flags?: {}, allErrors?: any[]): boolean;
139
- checkValidity(data: any, dirty: any, row: any, silentCheck: any, childErrors?: any[]): boolean;
140
139
  checkAsyncValidity(data: any, dirty: any, row: any, silentCheck: any): Promise<any>;
141
140
  setPristine(pristine: any): void;
142
141
  get isPristine(): any;
@@ -149,4 +148,3 @@ export default class NestedComponent extends Field {
149
148
  get lazyLoad(): any;
150
149
  }
151
150
  import Field from '../field/Field';
152
- import Component from '../component/Component';
@@ -3,7 +3,6 @@ import _ from 'lodash';
3
3
  import Field from '../field/Field';
4
4
  import Components from '../../Components';
5
5
  import { getArrayFromComponentPath, getStringFromComponentPath, getRandomComponentId } from '../../../utils/utils';
6
- import Component from '../component/Component';
7
6
  import { process as processAsync, processSync } from '@formio/core/process';
8
7
  export default class NestedComponent extends Field {
9
8
  static schema(...extend) {
@@ -138,7 +137,7 @@ export default class NestedComponent extends Field {
138
137
  *
139
138
  * @param {function} fn - Called for every component.
140
139
  */
141
- everyComponent(fn, options) {
140
+ everyComponent(fn, options = {}) {
142
141
  const components = this.getComponents();
143
142
  _.each(components, (component, index) => {
144
143
  if (fn(component, components, index) === false) {
@@ -240,7 +239,7 @@ export default class NestedComponent extends Field {
240
239
  * @param {function} fn - Called with the component once it is retrieved.
241
240
  * @return {Object} - The component retrieved.
242
241
  */
243
- getComponentById(id, fn) {
242
+ getComponentById(id, fn = null) {
244
243
  let comp = null;
245
244
  this.everyComponent((component, components) => {
246
245
  if (component.id === id) {
@@ -343,7 +342,7 @@ export default class NestedComponent extends Field {
343
342
  * @param {HTMLElement} before - A DOM element to insert this element before.
344
343
  * @return {Component} - The created component instance.
345
344
  */
346
- addComponent(component, data, before, noAdd) {
345
+ addComponent(component, data = null, before = null, noAdd = false) {
347
346
  data = data || this.data;
348
347
  this.components = this.components || [];
349
348
  component = this.hook('addComponent', component, data, before, noAdd);
@@ -452,7 +451,7 @@ export default class NestedComponent extends Field {
452
451
  * @param {function} fn - Called once the component is removed.
453
452
  * @return {null}
454
453
  */
455
- removeComponentByKey(key, fn) {
454
+ removeComponentByKey(key, fn = null) {
456
455
  const comp = this.getComponent(key, (component, components) => {
457
456
  this.removeComponent(component, components);
458
457
  if (fn) {
@@ -473,7 +472,7 @@ export default class NestedComponent extends Field {
473
472
  * @param {function} fn - Called when the component is removed.
474
473
  * @return {null}
475
474
  */
476
- removeComponentById(id, fn) {
475
+ removeComponentById(id, fn = null) {
477
476
  const comp = this.getComponentById(id, (component, components) => {
478
477
  this.removeComponent(component, components);
479
478
  if (fn) {
@@ -11,7 +11,7 @@ export default class NestedArrayComponent extends NestedDataComponent {
11
11
  processRow(method: any, data: any, opts: any, row: any, components: any, silentCheck: any): any;
12
12
  hasAddButton(): any;
13
13
  getComponent(path: any, fn: any, originalPath: any): any;
14
- everyComponent(fn: any, rowIndex: any, options: any): void;
14
+ everyComponent(fn: any, rowIndex: any, options?: {}): void;
15
15
  getComponents(rowIndex: any): any;
16
16
  }
17
17
  import NestedDataComponent from '../nesteddata/NestedDataComponent';
@@ -125,7 +125,7 @@ export default class NestedArrayComponent extends NestedDataComponent {
125
125
  }
126
126
  return result;
127
127
  }
128
- everyComponent(fn, rowIndex, options) {
128
+ everyComponent(fn, rowIndex, options = {}) {
129
129
  if (_.isObject(rowIndex)) {
130
130
  options = rowIndex;
131
131
  rowIndex = null;
@@ -5,7 +5,7 @@ export default class NestedDataComponent extends NestedComponent {
5
5
  get emptyValue(): {};
6
6
  getValueAsString(value: any, options: any): string;
7
7
  getDataValueAsTable(value: any, options: any): string;
8
- everyComponent(fn: any, options: any): void;
8
+ everyComponent(fn: any, options?: {}): void;
9
9
  updateValue(value: any, flags?: {}): boolean;
10
10
  setValue(value: any, flags?: {}): boolean;
11
11
  }
@@ -87,7 +87,7 @@ export default class NestedDataComponent extends NestedComponent {
87
87
  `);
88
88
  return result;
89
89
  }
90
- everyComponent(fn, options) {
90
+ everyComponent(fn, options = {}) {
91
91
  if (options?.email) {
92
92
  if (options.fromRoot) {
93
93
  delete options.fromRoot;
@@ -157,6 +157,7 @@ export default class DayComponent extends Field {
157
157
  * @return {null}
158
158
  */
159
159
  getValueAsString(value: any): null;
160
+ focus(field: any): void;
160
161
  isPartialDay(value: any): boolean;
161
162
  getValidationFormat(): "DD-MM-YYYY" | "MM-DD-YYYY";
162
163
  }
@@ -86,8 +86,8 @@ export default class HTMLComponent extends Component {
86
86
  attach(element) {
87
87
  this.loadRefs(element, { html: 'single' });
88
88
  this.dataReady.then(() => {
89
- if (this.element) {
90
- this.setContent(this.elemet, this.content);
89
+ if (this.refs.html) {
90
+ this.setContent(this.refs.html, this.content);
91
91
  }
92
92
  });
93
93
  return super.attach(element);
@@ -59,6 +59,7 @@ export default class SelectComponent extends ListComponent {
59
59
  get itemsFromUrl(): boolean;
60
60
  get isInfiniteScrollProvided(): boolean;
61
61
  get shouldInitialLoad(): any;
62
+ get selectMetadata(): any;
62
63
  isEntireObjectDisplay(): boolean;
63
64
  selectValueAndLabel(data: any): {
64
65
  value: any;
@@ -119,7 +120,9 @@ export default class SelectComponent extends ListComponent {
119
120
  * @param {Array} items
120
121
  */
121
122
  addCurrentChoices(values: any, items: any[], keyValue: any): any;
122
- normalizeSingleValue(value: any, retainObject: any): any;
123
+ normalizeSingleValue(value: any): any;
124
+ setMetadata(value: any): any;
125
+ updateValue(value: any, flags: any): boolean;
123
126
  setValue(value: any, flags?: {}): boolean;
124
127
  lazyLoadInit: boolean | undefined;
125
128
  isInitApiCallNeeded(hasValue: any): any;
@@ -215,8 +215,11 @@ export default class SelectComponent extends ListComponent {
215
215
  }
216
216
  return super.shouldLoad;
217
217
  }
218
+ get selectMetadata() {
219
+ return super.selectData;
220
+ }
218
221
  get selectData() {
219
- return this.component.selectData || super.selectData;
222
+ return this.selectMetadata || this.component.selectData;
220
223
  }
221
224
  isEntireObjectDisplay() {
222
225
  return this.component.dataSrc === 'resource' && this.valueProperty === 'data';
@@ -1163,7 +1166,7 @@ export default class SelectComponent extends ListComponent {
1163
1166
  this.triggerUpdate();
1164
1167
  return done;
1165
1168
  }
1166
- normalizeSingleValue(value, retainObject) {
1169
+ normalizeSingleValue(value) {
1167
1170
  if (_.isNil(value)) {
1168
1171
  return;
1169
1172
  }
@@ -1172,33 +1175,6 @@ export default class SelectComponent extends ListComponent {
1172
1175
  if (valueIsObject && Object.keys(value).length === 0) {
1173
1176
  return value;
1174
1177
  }
1175
- // Check to see if we need to save off the template data into our metadata.
1176
- if (retainObject) {
1177
- const templateValue = this.component.reference && value?._id ? value._id.toString() : value;
1178
- const shouldSaveData = !valueIsObject || this.component.reference;
1179
- if (templateValue && shouldSaveData && (this.templateData && this.templateData[templateValue]) && this.root?.submission) {
1180
- const submission = this.root.submission;
1181
- if (!submission.metadata) {
1182
- submission.metadata = {};
1183
- }
1184
- if (!submission.metadata.selectData) {
1185
- submission.metadata.selectData = {};
1186
- }
1187
- let templateData = this.templateData[templateValue];
1188
- if (this.component.multiple) {
1189
- templateData = {};
1190
- const dataValue = this.dataValue;
1191
- if (dataValue && _.isArray(dataValue) && dataValue.length) {
1192
- dataValue.forEach((dataValueItem) => {
1193
- const dataValueItemValue = this.component.reference ? dataValueItem._id.toString() : dataValueItem;
1194
- templateData[dataValueItemValue] = this.templateData[dataValueItemValue];
1195
- });
1196
- }
1197
- templateData[value] = this.templateData[value];
1198
- }
1199
- _.set(submission.metadata.selectData, this.path, templateData);
1200
- }
1201
- }
1202
1178
  const dataType = this.component.dataType || 'auto';
1203
1179
  const normalize = {
1204
1180
  value,
@@ -1251,16 +1227,63 @@ export default class SelectComponent extends ListComponent {
1251
1227
  */
1252
1228
  normalizeValue(value) {
1253
1229
  if (this.component.multiple && Array.isArray(value)) {
1254
- return value.map((singleValue) => this.normalizeSingleValue(singleValue, true));
1230
+ return value.map((singleValue) => this.normalizeSingleValue(singleValue));
1231
+ }
1232
+ return super.normalizeValue(this.normalizeSingleValue(value));
1233
+ }
1234
+ setMetadata(value) {
1235
+ if (_.isNil(value)) {
1236
+ return;
1237
+ }
1238
+ const valueIsObject = _.isObject(value);
1239
+ //check if value equals to default emptyValue
1240
+ if (valueIsObject && Object.keys(value).length === 0) {
1241
+ return value;
1242
+ }
1243
+ // Check to see if we need to save off the template data into our metadata.
1244
+ const templateValue = this.component.reference && value?._id ? value._id.toString() : value;
1245
+ const shouldSaveData = !valueIsObject || this.component.reference;
1246
+ if (templateValue && shouldSaveData && this.templateData && this.templateData[templateValue] && this.root?.submission) {
1247
+ const submission = this.root.submission;
1248
+ if (!submission.metadata) {
1249
+ submission.metadata = {};
1250
+ }
1251
+ if (!submission.metadata.selectData) {
1252
+ submission.metadata.selectData = {};
1253
+ }
1254
+ let templateData = this.templateData[templateValue];
1255
+ if (this.component.multiple) {
1256
+ templateData = {};
1257
+ const dataValue = this.dataValue;
1258
+ if (dataValue && _.isArray(dataValue) && dataValue.length) {
1259
+ dataValue.forEach((dataValueItem) => {
1260
+ const dataValueItemValue = this.component.reference ? dataValueItem._id.toString() : dataValueItem;
1261
+ templateData[dataValueItemValue] = this.templateData[dataValueItemValue];
1262
+ });
1263
+ }
1264
+ templateData[value] = this.templateData[value];
1265
+ }
1266
+ _.set(submission.metadata.selectData, this.path, templateData);
1255
1267
  }
1256
- return super.normalizeValue(this.normalizeSingleValue(value, true));
1268
+ }
1269
+ updateValue(value, flags) {
1270
+ const changed = super.updateValue(value, flags);
1271
+ if (changed || !this.selectMetadata) {
1272
+ if (this.component.multiple && Array.isArray(this.dataValue)) {
1273
+ this.dataValue.forEach(singleValue => this.setMetadata(singleValue));
1274
+ }
1275
+ else {
1276
+ this.setMetadata(this.dataValue);
1277
+ }
1278
+ }
1279
+ return changed;
1257
1280
  }
1258
1281
  setValue(value, flags = {}) {
1259
1282
  const previousValue = this.dataValue;
1283
+ const changed = this.updateValue(value, flags);
1260
1284
  if (this.component.widget === 'html5' && (_.isEqual(value, previousValue) || _.isEqual(previousValue, {}) && _.isEqual(flags, {})) && !flags.fromSubmission) {
1261
1285
  return false;
1262
1286
  }
1263
- const changed = this.updateValue(value, flags);
1264
1287
  value = this.dataValue;
1265
1288
  const hasPreviousValue = !this.isEmpty(previousValue);
1266
1289
  const hasValue = !this.isEmpty(value);
@@ -1375,7 +1398,7 @@ export default class SelectComponent extends ListComponent {
1375
1398
  if (values) {
1376
1399
  if (_.isObject(value)) {
1377
1400
  const compareComplexValues = (optionValue) => {
1378
- const normalizedOptionValue = this.normalizeSingleValue(optionValue, true);
1401
+ const normalizedOptionValue = this.normalizeSingleValue(optionValue);
1379
1402
  if (!_.isObject(normalizedOptionValue)) {
1380
1403
  return false;
1381
1404
  }
@@ -0,0 +1,51 @@
1
+ declare namespace _default {
2
+ let title: string;
3
+ let name: string;
4
+ let path: string;
5
+ let type: string;
6
+ let display: string;
7
+ let components: ({
8
+ label: string;
9
+ widget: string;
10
+ tableView: boolean;
11
+ dataSrc: string;
12
+ data: {
13
+ url: string;
14
+ headers: {
15
+ key: string;
16
+ value: string;
17
+ }[];
18
+ };
19
+ valueProperty: string;
20
+ validateWhenHidden: boolean;
21
+ key: string;
22
+ type: string;
23
+ input: boolean;
24
+ defaultValue: string;
25
+ selectValues: string;
26
+ disableLimit: boolean;
27
+ noRefreshOnScroll: boolean;
28
+ selectData: {
29
+ label: string;
30
+ };
31
+ disableOnInvalid?: undefined;
32
+ } | {
33
+ type: string;
34
+ label: string;
35
+ key: string;
36
+ disableOnInvalid: boolean;
37
+ input: boolean;
38
+ tableView: boolean;
39
+ widget?: undefined;
40
+ dataSrc?: undefined;
41
+ data?: undefined;
42
+ valueProperty?: undefined;
43
+ validateWhenHidden?: undefined;
44
+ defaultValue?: undefined;
45
+ selectValues?: undefined;
46
+ disableLimit?: undefined;
47
+ noRefreshOnScroll?: undefined;
48
+ selectData?: undefined;
49
+ })[];
50
+ }
51
+ export default _default;
@@ -0,0 +1,41 @@
1
+ export default {
2
+ title: 'FIO-8091',
3
+ name: 'fio8091',
4
+ path: 'fio8091',
5
+ type: 'form',
6
+ display: 'form',
7
+ components: [{
8
+ label: 'Select',
9
+ widget: 'choicesjs',
10
+ tableView: true,
11
+ dataSrc: 'url',
12
+ data: {
13
+ url: 'https://fake_url.com',
14
+ headers: [
15
+ {
16
+ key: '',
17
+ value: ''
18
+ },
19
+ ],
20
+ },
21
+ valueProperty: 'value',
22
+ validateWhenHidden: false,
23
+ key: 'select',
24
+ type: 'select',
25
+ input: true,
26
+ defaultValue: 'value1',
27
+ selectValues: 'data',
28
+ disableLimit: false,
29
+ noRefreshOnScroll: false,
30
+ selectData: {
31
+ label: 'Label 1'
32
+ },
33
+ }, {
34
+ type: 'button',
35
+ label: 'Submit',
36
+ key: 'submit',
37
+ disableOnInvalid: true,
38
+ input: true,
39
+ tableView: false,
40
+ }],
41
+ };
@@ -18,5 +18,6 @@ import comp18 from './comp18';
18
18
  import comp19 from './comp19';
19
19
  import comp20 from './comp20';
20
20
  import comp21 from './comp21';
21
- export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21 };
21
+ import comp22 from './comp22';
22
+ export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22 };
22
23
  export { multiSelect, multiSelectOptions } from "./comp3";
@@ -19,4 +19,5 @@ import comp18 from './comp18';
19
19
  import comp19 from './comp19';
20
20
  import comp20 from './comp20';
21
21
  import comp21 from './comp21';
22
- export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21 };
22
+ import comp22 from './comp22';
23
+ export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.47",
3
+ "version": "5.0.0-rc.49",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -77,7 +77,7 @@
77
77
  "dependencies": {
78
78
  "@formio/bootstrap": "^3.0.0-rc.24",
79
79
  "@formio/choices.js": "^10.2.1",
80
- "@formio/core": "^2.1.0-dev.tt.3",
80
+ "@formio/core": "^2.1.0-dev.tt.4",
81
81
  "@formio/text-mask-addons": "^3.8.0-formio.2",
82
82
  "@formio/vanilla-text-mask": "^5.1.1-formio.1",
83
83
  "abortcontroller-polyfill": "^1.7.5",