@formio/js 5.1.0-dev.6061.f2b1042 → 5.1.0-dev.6064.1c8db05

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.
@@ -163,6 +163,7 @@ declare class Component extends Element {
163
163
  */
164
164
  info: any;
165
165
  get componentsMap(): object;
166
+ parentShouldConditionallyClear(): boolean;
166
167
  parentConditionallyHidden(): boolean;
167
168
  set data(value: any);
168
169
  get data(): any;
@@ -227,7 +228,8 @@ declare class Component extends Element {
227
228
  get visible(): boolean;
228
229
  get logicallyHidden(): any;
229
230
  _logicallyHidden: any;
230
- conditionallyHidden(skipParent?: boolean): any;
231
+ shouldConditionallyClear(skipParent?: boolean): boolean;
232
+ conditionallyHidden(skipParent?: boolean): boolean;
231
233
  set currentForm(instance: any);
232
234
  get currentForm(): any;
233
235
  _currentForm: any;
@@ -891,7 +893,15 @@ declare class Component extends Element {
891
893
  * @returns {boolean} - TRUE if a default value is set.
892
894
  */
893
895
  get hasDefaultValue(): boolean;
896
+ /**
897
+ * Determine if we should add a default value for this component.
898
+ * @returns {boolean} - TRUE if a default value should be set
899
+ */
894
900
  get shouldAddDefaultValue(): boolean;
901
+ /**
902
+ * Get the default value of this component.
903
+ * @returns {*} - The default value for this component.
904
+ */
895
905
  get defaultValue(): any;
896
906
  /**
897
907
  * Get the input value of this component.
@@ -424,7 +424,7 @@ class Component extends Element_1.default {
424
424
  if (this.allowData && this.key) {
425
425
  this.options.name += `[${this.key}]`;
426
426
  // If component is visible or not set to clear on hide, set the default value.
427
- if (!(this.conditionallyHidden() && this.component.clearOnHide)) {
427
+ if (!this.shouldConditionallyClear()) {
428
428
  if (!this.hasValue()) {
429
429
  if (this.shouldAddDefaultValue) {
430
430
  this.dataValue = this.defaultValue;
@@ -458,6 +458,16 @@ class Component extends Element_1.default {
458
458
  var _a;
459
459
  return ((_a = this.root) === null || _a === void 0 ? void 0 : _a.childComponentsMap) || {};
460
460
  }
461
+ parentShouldConditionallyClear() {
462
+ let currentParent = this.parent;
463
+ while (currentParent) {
464
+ if (currentParent.shouldConditionallyClear(true)) {
465
+ return true;
466
+ }
467
+ currentParent = currentParent.parent;
468
+ }
469
+ return false;
470
+ }
461
471
  parentConditionallyHidden() {
462
472
  let currentParent = this.parent;
463
473
  while (currentParent) {
@@ -679,11 +689,48 @@ class Component extends Element_1.default {
679
689
  }
680
690
  return this._logicallyHidden;
681
691
  }
692
+ shouldConditionallyClear(skipParent = false) {
693
+ // Skip if this component has clearOnHide set to false.
694
+ if (this.component.clearOnHide === false) {
695
+ return false;
696
+ }
697
+ // If the component is logically hidden, then it is conditionally hidden and should clear.
698
+ if (this.logicallyHidden) {
699
+ return true;
700
+ }
701
+ // If we have a condition and it is not conditionally visible, the it should conditionally clear.
702
+ if (this.hasCondition() && !this.conditionallyVisible()) {
703
+ return true;
704
+ }
705
+ if (skipParent) {
706
+ // Stop recurrsion for the parent checks.
707
+ return false;
708
+ }
709
+ // If this component has a set value, then it should ONLY clear if a parent is hidden
710
+ // and has the clearOnHide set to true.
711
+ if (this.hasSetValue) {
712
+ return this.parentShouldConditionallyClear();
713
+ }
714
+ // Clear the value if the parent is conditionally hidden.
715
+ return this.parentConditionallyHidden();
716
+ }
682
717
  conditionallyHidden(skipParent = false) {
683
- if (!this.hasCondition()) {
684
- return this.logicallyHidden || (skipParent ? false : this.parentConditionallyHidden());
718
+ if (this.logicallyHidden) {
719
+ return true;
720
+ }
721
+ if (!this.hasCondition() && !skipParent) {
722
+ return this.parentConditionallyHidden();
723
+ }
724
+ // Return if we are not conditionally visible (conditionallyHidden)
725
+ if (!this.conditionallyVisible()) {
726
+ return true;
727
+ }
728
+ if (skipParent) {
729
+ // Stop recurrsion for the parent checks.
730
+ return false;
685
731
  }
686
- return !this.conditionallyVisible() || this.logicallyHidden || (skipParent ? false : this.parentConditionallyHidden());
732
+ // Check the parent.
733
+ return this.parentConditionallyHidden();
687
734
  }
688
735
  get currentForm() {
689
736
  return this._currentForm;
@@ -2080,7 +2127,7 @@ class Component extends Element_1.default {
2080
2127
  component: newComponent,
2081
2128
  result,
2082
2129
  });
2083
- if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && this.conditionallyHidden())) {
2130
+ if (!lodash_1.default.isEqual(oldValue, newValue) && !this.shouldConditionallyClear()) {
2084
2131
  this.setValue(newValue);
2085
2132
  if (this.viewOnly) {
2086
2133
  this.dataValue = newValue;
@@ -2113,7 +2160,7 @@ class Component extends Element_1.default {
2113
2160
  component: newComponent,
2114
2161
  result,
2115
2162
  }, 'value');
2116
- if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && this.conditionallyHidden())) {
2163
+ if (!lodash_1.default.isEqual(oldValue, newValue) && !this.shouldConditionallyClear()) {
2117
2164
  this.setValue(newValue);
2118
2165
  if (this.viewOnly) {
2119
2166
  this.dataValue = newValue;
@@ -2219,7 +2266,7 @@ class Component extends Element_1.default {
2219
2266
  clearComponentOnHide() {
2220
2267
  // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.
2221
2268
  if (this.component.clearOnHide !== false && !this.options.readOnly && !this.options.showHiddenFields) {
2222
- if (this.conditionallyHidden()) {
2269
+ if (this.shouldConditionallyClear()) {
2223
2270
  this.deleteValue();
2224
2271
  }
2225
2272
  else if (!this.hasValue() && this.shouldAddDefaultValue) {
@@ -2549,14 +2596,17 @@ class Component extends Element_1.default {
2549
2596
  (this.component.defaultValue !== null) &&
2550
2597
  (this.component.defaultValue !== undefined));
2551
2598
  }
2599
+ /**
2600
+ * Determine if we should add a default value for this component.
2601
+ * @returns {boolean} - TRUE if a default value should be set
2602
+ */
2552
2603
  get shouldAddDefaultValue() {
2553
- // It should add a default value if...
2554
- // 1.) The component is pristine (user has not manually modified it). AND
2555
- // 1.) There is a default value setting present OR
2556
- // 2.) The noDefaults flag is not true AND the empty value is either an empty string or boolean
2557
- return this.pristine && (this.hasDefaultValue ||
2558
- (!this.options.noDefaults && (this.emptyValue === '' || (typeof this.emptyValue === 'boolean'))));
2604
+ return this.pristine && this.allowData && (this.hasDefaultValue || !this.options.noDefaults);
2559
2605
  }
2606
+ /**
2607
+ * Get the default value of this component.
2608
+ * @returns {*} - The default value for this component.
2609
+ */
2560
2610
  get defaultValue() {
2561
2611
  let defaultValue = this.emptyValue;
2562
2612
  if (this.component.defaultValue) {
@@ -2827,10 +2877,8 @@ class Component extends Element_1.default {
2827
2877
  }
2828
2878
  // If no calculated value or
2829
2879
  // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)
2830
- const { clearOnHide } = this.component;
2831
- const shouldBeCleared = this.conditionallyHidden() && clearOnHide;
2832
2880
  const allowOverride = lodash_1.default.get(this.component, 'allowCalculateOverride', false);
2833
- if (shouldBeCleared) {
2881
+ if (this.shouldConditionallyClear()) {
2834
2882
  // remove calculated value so that the value is recalculated once component becomes visible
2835
2883
  if (this.hasOwnProperty('calculatedValue') && allowOverride) {
2836
2884
  lodash_1.default.unset(this, 'calculatedValue');
@@ -8,6 +8,7 @@ declare const _default: ({
8
8
  customConditional: ({ data }: {
9
9
  data: any;
10
10
  }) => boolean;
11
+ defaultValue?: undefined;
11
12
  placeholder?: undefined;
12
13
  validate?: undefined;
13
14
  } | {
@@ -15,6 +16,7 @@ declare const _default: ({
15
16
  type: string;
16
17
  input: boolean;
17
18
  key: string;
19
+ defaultValue: string;
18
20
  label: string;
19
21
  placeholder: string;
20
22
  tooltip: string;
@@ -32,6 +34,7 @@ declare const _default: ({
32
34
  label: string;
33
35
  tooltip: string;
34
36
  customConditional?: undefined;
37
+ defaultValue?: undefined;
35
38
  placeholder?: undefined;
36
39
  validate?: undefined;
37
40
  } | {
@@ -45,6 +48,7 @@ declare const _default: ({
45
48
  customConditional: ({ data }: {
46
49
  data: any;
47
50
  }) => any;
51
+ defaultValue?: undefined;
48
52
  validate?: undefined;
49
53
  })[];
50
54
  export default _default;
@@ -15,6 +15,7 @@ exports.default = [
15
15
  type: 'textfield',
16
16
  input: true,
17
17
  key: 'switchToManualModeLabel',
18
+ defaultValue: 'Can\'t find address? Switch to manual mode.',
18
19
  label: 'Switch To Manual Mode Label',
19
20
  placeholder: 'Switch To Manual Mode Label',
20
21
  tooltip: 'The label for the checkbox used to switch to manual mode.',
@@ -524,7 +524,7 @@ class FormComponent extends Component_1.default {
524
524
  * @returns {*|boolean} - TRUE if the subform should be submitted, FALSE if it should not.
525
525
  */
526
526
  get shouldSubmit() {
527
- return this.subFormReady && (!this.component.hasOwnProperty('reference') || this.component.reference) && (!this.conditionallyHidden() || !this.component.clearOnHide);
527
+ return this.subFormReady && (!this.component.hasOwnProperty('reference') || this.component.reference) && !this.shouldConditionallyClear();
528
528
  }
529
529
  /**
530
530
  * Returns the data for the subform.
@@ -9,100 +9,16 @@ declare const _default: ({
9
9
  custom?: undefined;
10
10
  };
11
11
  type?: undefined;
12
+ as?: undefined;
13
+ editor?: undefined;
12
14
  weight?: undefined;
13
15
  input?: undefined;
14
16
  label?: undefined;
15
17
  tooltip?: undefined;
16
- conditional?: undefined;
17
- as?: undefined;
18
- editor?: undefined;
19
- defaultValue?: undefined;
20
18
  description?: undefined;
19
+ conditional?: undefined;
21
20
  reorder?: undefined;
22
- components?: undefined;
23
- dataSrc?: undefined;
24
- authenticate?: undefined;
25
- template?: undefined;
26
- valueProperty?: undefined;
27
- clearOnHide?: undefined;
28
- lazyLoad?: undefined;
29
- skipMerge?: undefined;
30
- refreshOn?: undefined;
31
- onSetItems?: undefined;
32
- onChange?: undefined;
33
- placeholder?: undefined;
34
- validate?: undefined;
35
- delimiter?: undefined;
36
- requireDecimal?: undefined;
37
- encrypted?: undefined;
38
- rows?: undefined;
39
- mask?: undefined;
40
- tableView?: undefined;
41
- alwaysEnabled?: undefined;
42
- } | {
43
- type: string;
44
- weight: number;
45
- input: boolean;
46
- key: string;
47
- label: string;
48
- tooltip: string;
49
- conditional: {
50
- json: {
51
- '===': (string | {
52
- var: string;
53
- })[];
54
- and?: undefined;
55
- in?: undefined;
56
- };
57
- };
58
- data?: undefined;
59
- as?: undefined;
60
- editor?: undefined;
61
21
  defaultValue?: undefined;
62
- description?: undefined;
63
- reorder?: undefined;
64
- components?: undefined;
65
- dataSrc?: undefined;
66
- authenticate?: undefined;
67
- template?: undefined;
68
- valueProperty?: undefined;
69
- clearOnHide?: undefined;
70
- lazyLoad?: undefined;
71
- skipMerge?: undefined;
72
- refreshOn?: undefined;
73
- onSetItems?: undefined;
74
- onChange?: undefined;
75
- placeholder?: undefined;
76
- validate?: undefined;
77
- delimiter?: undefined;
78
- requireDecimal?: undefined;
79
- encrypted?: undefined;
80
- rows?: undefined;
81
- mask?: undefined;
82
- tableView?: undefined;
83
- alwaysEnabled?: undefined;
84
- } | {
85
- type: string;
86
- as: string;
87
- editor: string;
88
- weight: number;
89
- input: boolean;
90
- key: string;
91
- label: string;
92
- tooltip: string;
93
- defaultValue: {};
94
- conditional: {
95
- json: {
96
- '===': (string | {
97
- var: string;
98
- })[];
99
- and?: undefined;
100
- in?: undefined;
101
- };
102
- };
103
- data?: undefined;
104
- description?: undefined;
105
- reorder?: undefined;
106
22
  components?: undefined;
107
23
  dataSrc?: undefined;
108
24
  authenticate?: undefined;
@@ -143,8 +59,8 @@ declare const _default: ({
143
59
  };
144
60
  };
145
61
  data?: undefined;
146
- defaultValue?: undefined;
147
62
  reorder?: undefined;
63
+ defaultValue?: undefined;
148
64
  components?: undefined;
149
65
  dataSrc?: undefined;
150
66
  authenticate?: undefined;
@@ -192,9 +108,9 @@ declare const _default: ({
192
108
  data?: undefined;
193
109
  as?: undefined;
194
110
  editor?: undefined;
195
- defaultValue?: undefined;
196
111
  description?: undefined;
197
112
  reorder?: undefined;
113
+ defaultValue?: undefined;
198
114
  components?: undefined;
199
115
  dataSrc?: undefined;
200
116
  authenticate?: undefined;
@@ -303,9 +219,9 @@ declare const _default: ({
303
219
  };
304
220
  as?: undefined;
305
221
  editor?: undefined;
306
- defaultValue?: undefined;
307
222
  description?: undefined;
308
223
  reorder?: undefined;
224
+ defaultValue?: undefined;
309
225
  components?: undefined;
310
226
  skipMerge?: undefined;
311
227
  refreshOn?: undefined;
@@ -340,8 +256,8 @@ declare const _default: ({
340
256
  data?: undefined;
341
257
  as?: undefined;
342
258
  editor?: undefined;
343
- defaultValue?: undefined;
344
259
  reorder?: undefined;
260
+ defaultValue?: undefined;
345
261
  components?: undefined;
346
262
  dataSrc?: undefined;
347
263
  authenticate?: undefined;
@@ -411,9 +327,9 @@ declare const _default: ({
411
327
  };
412
328
  as?: undefined;
413
329
  editor?: undefined;
414
- defaultValue?: undefined;
415
330
  description?: undefined;
416
331
  reorder?: undefined;
332
+ defaultValue?: undefined;
417
333
  components?: undefined;
418
334
  authenticate?: undefined;
419
335
  placeholder?: undefined;
@@ -443,12 +359,12 @@ declare const _default: ({
443
359
  url?: undefined;
444
360
  custom?: undefined;
445
361
  };
446
- conditional?: undefined;
447
362
  as?: undefined;
448
363
  editor?: undefined;
449
- defaultValue?: undefined;
450
364
  description?: undefined;
365
+ conditional?: undefined;
451
366
  reorder?: undefined;
367
+ defaultValue?: undefined;
452
368
  components?: undefined;
453
369
  authenticate?: undefined;
454
370
  valueProperty?: undefined;
@@ -475,12 +391,53 @@ declare const _default: ({
475
391
  placeholder: string;
476
392
  tooltip: string;
477
393
  data?: undefined;
478
- conditional?: undefined;
479
394
  as?: undefined;
480
395
  editor?: undefined;
396
+ description?: undefined;
397
+ conditional?: undefined;
398
+ reorder?: undefined;
481
399
  defaultValue?: undefined;
400
+ components?: undefined;
401
+ dataSrc?: undefined;
402
+ authenticate?: undefined;
403
+ template?: undefined;
404
+ valueProperty?: undefined;
405
+ clearOnHide?: undefined;
406
+ lazyLoad?: undefined;
407
+ skipMerge?: undefined;
408
+ refreshOn?: undefined;
409
+ onSetItems?: undefined;
410
+ onChange?: undefined;
411
+ validate?: undefined;
412
+ delimiter?: undefined;
413
+ requireDecimal?: undefined;
414
+ encrypted?: undefined;
415
+ rows?: undefined;
416
+ mask?: undefined;
417
+ tableView?: undefined;
418
+ alwaysEnabled?: undefined;
419
+ } | {
420
+ type: string;
421
+ input: boolean;
422
+ key: string;
423
+ label: string;
424
+ tooltip: string;
425
+ weight: number;
426
+ conditional: {
427
+ json: {
428
+ '===': (string | {
429
+ var: string;
430
+ })[];
431
+ and?: undefined;
432
+ in?: undefined;
433
+ };
434
+ };
435
+ data?: undefined;
436
+ as?: undefined;
437
+ editor?: undefined;
482
438
  description?: undefined;
483
439
  reorder?: undefined;
440
+ defaultValue?: undefined;
484
441
  components?: undefined;
485
442
  dataSrc?: undefined;
486
443
  authenticate?: undefined;
@@ -492,6 +449,7 @@ declare const _default: ({
492
449
  refreshOn?: undefined;
493
450
  onSetItems?: undefined;
494
451
  onChange?: undefined;
452
+ placeholder?: undefined;
495
453
  validate?: undefined;
496
454
  delimiter?: undefined;
497
455
  requireDecimal?: undefined;
@@ -520,8 +478,8 @@ declare const _default: ({
520
478
  data?: undefined;
521
479
  as?: undefined;
522
480
  editor?: undefined;
523
- defaultValue?: undefined;
524
481
  reorder?: undefined;
482
+ defaultValue?: undefined;
525
483
  components?: undefined;
526
484
  dataSrc?: undefined;
527
485
  authenticate?: undefined;
@@ -668,8 +626,8 @@ declare const _default: ({
668
626
  data?: undefined;
669
627
  as?: undefined;
670
628
  editor?: undefined;
671
- defaultValue?: undefined;
672
629
  reorder?: undefined;
630
+ defaultValue?: undefined;
673
631
  components?: undefined;
674
632
  dataSrc?: undefined;
675
633
  authenticate?: undefined;
@@ -710,9 +668,9 @@ declare const _default: ({
710
668
  };
711
669
  data?: undefined;
712
670
  as?: undefined;
713
- defaultValue?: undefined;
714
671
  description?: undefined;
715
672
  reorder?: undefined;
673
+ defaultValue?: undefined;
716
674
  components?: undefined;
717
675
  dataSrc?: undefined;
718
676
  authenticate?: undefined;
@@ -759,9 +717,9 @@ declare const _default: ({
759
717
  };
760
718
  as?: undefined;
761
719
  editor?: undefined;
762
- defaultValue?: undefined;
763
720
  description?: undefined;
764
721
  reorder?: undefined;
722
+ defaultValue?: undefined;
765
723
  components?: undefined;
766
724
  authenticate?: undefined;
767
725
  template?: undefined;
@@ -831,10 +789,10 @@ declare const _default: ({
831
789
  defaultValue: boolean;
832
790
  tooltip: string;
833
791
  data?: undefined;
834
- conditional?: undefined;
835
792
  as?: undefined;
836
793
  editor?: undefined;
837
794
  description?: undefined;
795
+ conditional?: undefined;
838
796
  reorder?: undefined;
839
797
  components?: undefined;
840
798
  dataSrc?: undefined;
@@ -927,10 +885,10 @@ declare const _default: ({
927
885
  weight: number;
928
886
  tooltip: string;
929
887
  data?: undefined;
930
- conditional?: undefined;
931
888
  as?: undefined;
932
889
  editor?: undefined;
933
890
  description?: undefined;
891
+ conditional?: undefined;
934
892
  reorder?: undefined;
935
893
  components?: undefined;
936
894
  dataSrc?: undefined;
@@ -973,9 +931,9 @@ declare const _default: ({
973
931
  data?: undefined;
974
932
  as?: undefined;
975
933
  editor?: undefined;
976
- defaultValue?: undefined;
977
934
  description?: undefined;
978
935
  reorder?: undefined;
936
+ defaultValue?: undefined;
979
937
  components?: undefined;
980
938
  dataSrc?: undefined;
981
939
  authenticate?: undefined;
@@ -1003,12 +961,12 @@ declare const _default: ({
1003
961
  label: string;
1004
962
  tooltip: string;
1005
963
  data?: undefined;
1006
- conditional?: undefined;
1007
964
  as?: undefined;
1008
965
  editor?: undefined;
1009
- defaultValue?: undefined;
1010
966
  description?: undefined;
967
+ conditional?: undefined;
1011
968
  reorder?: undefined;
969
+ defaultValue?: undefined;
1012
970
  components?: undefined;
1013
971
  dataSrc?: undefined;
1014
972
  authenticate?: undefined;
@@ -1040,8 +998,8 @@ declare const _default: ({
1040
998
  tooltip: string;
1041
999
  defaultValue: {};
1042
1000
  data?: undefined;
1043
- conditional?: undefined;
1044
1001
  description?: undefined;
1002
+ conditional?: undefined;
1045
1003
  reorder?: undefined;
1046
1004
  components?: undefined;
1047
1005
  dataSrc?: undefined;
@@ -1069,16 +1027,16 @@ declare const _default: ({
1069
1027
  onChange(context: any): void;
1070
1028
  data?: undefined;
1071
1029
  type?: undefined;
1030
+ as?: undefined;
1031
+ editor?: undefined;
1072
1032
  weight?: undefined;
1073
1033
  input?: undefined;
1074
1034
  label?: undefined;
1075
1035
  tooltip?: undefined;
1076
- conditional?: undefined;
1077
- as?: undefined;
1078
- editor?: undefined;
1079
- defaultValue?: undefined;
1080
1036
  description?: undefined;
1037
+ conditional?: undefined;
1081
1038
  reorder?: undefined;
1039
+ defaultValue?: undefined;
1082
1040
  components?: undefined;
1083
1041
  dataSrc?: undefined;
1084
1042
  authenticate?: undefined;
@@ -1150,15 +1108,15 @@ declare const _default: ({
1150
1108
  };
1151
1109
  };
1152
1110
  data?: undefined;
1111
+ as?: undefined;
1112
+ editor?: undefined;
1153
1113
  weight?: undefined;
1154
1114
  input?: undefined;
1155
1115
  label?: undefined;
1156
1116
  tooltip?: undefined;
1157
- as?: undefined;
1158
- editor?: undefined;
1159
- defaultValue?: undefined;
1160
1117
  description?: undefined;
1161
1118
  reorder?: undefined;
1119
+ defaultValue?: undefined;
1162
1120
  components?: undefined;
1163
1121
  dataSrc?: undefined;
1164
1122
  authenticate?: undefined;
@@ -1184,16 +1142,16 @@ declare const _default: ({
1184
1142
  onChange(context: any): void;
1185
1143
  data?: undefined;
1186
1144
  type?: undefined;
1145
+ as?: undefined;
1146
+ editor?: undefined;
1187
1147
  weight?: undefined;
1188
1148
  input?: undefined;
1189
1149
  label?: undefined;
1190
1150
  tooltip?: undefined;
1191
- conditional?: undefined;
1192
- as?: undefined;
1193
- editor?: undefined;
1194
- defaultValue?: undefined;
1195
1151
  description?: undefined;
1152
+ conditional?: undefined;
1196
1153
  reorder?: undefined;
1154
+ defaultValue?: undefined;
1197
1155
  components?: undefined;
1198
1156
  dataSrc?: undefined;
1199
1157
  authenticate?: undefined;
@@ -62,42 +62,6 @@ exports.default = [
62
62
  ],
63
63
  },
64
64
  },
65
- {
66
- type: 'textfield',
67
- weight: 10,
68
- input: true,
69
- key: 'indexeddb.database',
70
- label: 'Database name',
71
- tooltip: 'The name of the indexeddb database.',
72
- conditional: {
73
- json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
74
- },
75
- },
76
- {
77
- type: 'textfield',
78
- input: true,
79
- key: 'indexeddb.table',
80
- label: 'Table name',
81
- weight: 16,
82
- tooltip: 'The name of table in the indexeddb database.',
83
- conditional: {
84
- json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
85
- }
86
- },
87
- {
88
- type: 'textarea',
89
- as: 'json',
90
- editor: 'ace',
91
- weight: 18,
92
- input: true,
93
- key: 'indexeddb.filter',
94
- label: 'Row Filter',
95
- tooltip: 'Filter table items that match the object.',
96
- defaultValue: {},
97
- conditional: {
98
- json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
99
- },
100
- },
101
65
  {
102
66
  type: 'textarea',
103
67
  as: 'json',
@@ -163,6 +163,7 @@ declare class Component extends Element {
163
163
  */
164
164
  info: any;
165
165
  get componentsMap(): object;
166
+ parentShouldConditionallyClear(): boolean;
166
167
  parentConditionallyHidden(): boolean;
167
168
  set data(value: any);
168
169
  get data(): any;
@@ -227,7 +228,8 @@ declare class Component extends Element {
227
228
  get visible(): boolean;
228
229
  get logicallyHidden(): any;
229
230
  _logicallyHidden: any;
230
- conditionallyHidden(skipParent?: boolean): any;
231
+ shouldConditionallyClear(skipParent?: boolean): boolean;
232
+ conditionallyHidden(skipParent?: boolean): boolean;
231
233
  set currentForm(instance: any);
232
234
  get currentForm(): any;
233
235
  _currentForm: any;
@@ -891,7 +893,15 @@ declare class Component extends Element {
891
893
  * @returns {boolean} - TRUE if a default value is set.
892
894
  */
893
895
  get hasDefaultValue(): boolean;
896
+ /**
897
+ * Determine if we should add a default value for this component.
898
+ * @returns {boolean} - TRUE if a default value should be set
899
+ */
894
900
  get shouldAddDefaultValue(): boolean;
901
+ /**
902
+ * Get the default value of this component.
903
+ * @returns {*} - The default value for this component.
904
+ */
895
905
  get defaultValue(): any;
896
906
  /**
897
907
  * Get the input value of this component.