@formio/js 5.0.0-dev.5725.1c71137 → 5.0.0-dev.5725.d52e1c4
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.
- package/Changelog.md +33 -0
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.form.js +53 -33
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +2 -0
- package/dist/formio.full.js +59 -39
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +2 -0
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +24 -4
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -0
- package/lib/cjs/CDN.js +1 -2
- package/lib/cjs/Form.d.ts +2 -2
- package/lib/cjs/Form.js +11 -5
- package/lib/cjs/PDF.js +1 -1
- package/lib/cjs/PDFBuilder.js +2 -1
- package/lib/cjs/Webform.js +0 -1
- package/lib/cjs/WebformBuilder.js +13 -3
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +1 -1
- package/lib/cjs/components/_classes/component/Component.js +6 -5
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +0 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +43 -25
- package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -1
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +56 -29
- package/lib/cjs/components/address/Address.d.ts +6 -0
- package/lib/cjs/components/address/Address.js +7 -1
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/cjs/components/datagrid/DataGrid.js +2 -9
- package/lib/cjs/components/datagrid/fixtures/comp11.d.ts +50 -0
- package/lib/cjs/components/datagrid/fixtures/comp11.js +55 -0
- package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
- package/lib/cjs/components/datamap/DataMap.js +1 -1
- package/lib/cjs/components/day/Day.d.ts +3 -4
- package/lib/cjs/components/day/Day.js +31 -10
- package/lib/cjs/components/editgrid/EditGrid.js +2 -5
- package/lib/cjs/components/editgrid/fixtures/comp17.d.ts +59 -29
- package/lib/cjs/components/editgrid/fixtures/comp17.js +86 -36
- package/lib/cjs/components/file/File.d.ts +2 -2
- package/lib/cjs/components/file/File.js +13 -2
- package/lib/cjs/components/file/editForm/File.edit.display.js +1 -1
- package/lib/cjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/cjs/components/form/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/form/fixtures/index.js +3 -1
- package/lib/cjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
- package/lib/cjs/components/form/fixtures/nestedWizardForm.js +765 -0
- package/lib/cjs/components/panel/Panel.d.ts +1 -0
- package/lib/cjs/components/panel/Panel.js +1 -0
- package/lib/cjs/components/radio/Radio.d.ts +2 -18
- package/lib/cjs/components/radio/Radio.js +29 -27
- package/lib/cjs/components/radio/fixtures/comp12.d.ts +29 -0
- package/lib/cjs/components/radio/fixtures/comp12.js +36 -0
- package/lib/cjs/components/radio/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/radio/fixtures/index.js +3 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +6 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.js +6 -0
- package/lib/cjs/components/select/Select.d.ts +38 -0
- package/lib/cjs/components/select/Select.js +13 -3
- package/lib/cjs/components/select/fixtures/comp25.d.ts +59 -0
- package/lib/cjs/components/select/fixtures/comp25.js +66 -0
- package/lib/cjs/components/select/fixtures/comp26.d.ts +44 -0
- package/lib/cjs/components/select/fixtures/comp26.js +59 -0
- package/lib/cjs/components/select/fixtures/index.d.ts +3 -1
- package/lib/cjs/components/select/fixtures/index.js +5 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -22
- package/lib/cjs/components/selectboxes/SelectBoxes.js +12 -9
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +0 -1
- package/lib/cjs/components/tags/Tags.js +3 -3
- package/lib/cjs/components/time/Time.form.js +2 -2
- package/lib/cjs/components/time/Time.js +0 -5
- package/lib/cjs/templates/Templates.js +1 -1
- package/lib/cjs/translations/en.d.ts +1 -0
- package/lib/cjs/translations/en.js +1 -0
- package/lib/mjs/CDN.js +1 -2
- package/lib/mjs/Form.d.ts +2 -2
- package/lib/mjs/Form.js +11 -5
- package/lib/mjs/PDF.js +1 -1
- package/lib/mjs/PDFBuilder.js +1 -1
- package/lib/mjs/Webform.js +0 -1
- package/lib/mjs/WebformBuilder.js +12 -3
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +1 -1
- package/lib/mjs/components/_classes/component/Component.js +3 -2
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +0 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +43 -25
- package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -1
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +57 -29
- package/lib/mjs/components/address/Address.d.ts +6 -0
- package/lib/mjs/components/address/Address.js +10 -1
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/mjs/components/datagrid/DataGrid.js +2 -9
- package/lib/mjs/components/datagrid/fixtures/comp11.d.ts +50 -0
- package/lib/mjs/components/datagrid/fixtures/comp11.js +53 -0
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
- package/lib/mjs/components/datamap/DataMap.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +3 -4
- package/lib/mjs/components/day/Day.js +30 -10
- package/lib/mjs/components/editgrid/EditGrid.js +2 -5
- package/lib/mjs/components/editgrid/fixtures/comp17.d.ts +59 -29
- package/lib/mjs/components/editgrid/fixtures/comp17.js +86 -36
- package/lib/mjs/components/file/File.d.ts +2 -2
- package/lib/mjs/components/file/File.js +13 -2
- package/lib/mjs/components/file/editForm/File.edit.display.js +1 -1
- package/lib/mjs/components/form/editForm/Form.edit.form.js +1 -1
- package/lib/mjs/components/form/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/form/fixtures/index.js +2 -1
- package/lib/mjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
- package/lib/mjs/components/form/fixtures/nestedWizardForm.js +763 -0
- package/lib/mjs/components/panel/Panel.d.ts +1 -0
- package/lib/mjs/components/panel/Panel.js +1 -0
- package/lib/mjs/components/radio/Radio.d.ts +2 -18
- package/lib/mjs/components/radio/Radio.js +32 -30
- package/lib/mjs/components/radio/fixtures/comp12.d.ts +29 -0
- package/lib/mjs/components/radio/fixtures/comp12.js +34 -0
- package/lib/mjs/components/radio/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/radio/fixtures/index.js +2 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +6 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.js +9 -0
- package/lib/mjs/components/select/Select.d.ts +38 -0
- package/lib/mjs/components/select/Select.js +16 -4
- package/lib/mjs/components/select/fixtures/comp25.d.ts +59 -0
- package/lib/mjs/components/select/fixtures/comp25.js +64 -0
- package/lib/mjs/components/select/fixtures/comp26.d.ts +44 -0
- package/lib/mjs/components/select/fixtures/comp26.js +57 -0
- package/lib/mjs/components/select/fixtures/index.d.ts +3 -1
- package/lib/mjs/components/select/fixtures/index.js +3 -1
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -22
- package/lib/mjs/components/selectboxes/SelectBoxes.js +16 -9
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +0 -1
- package/lib/mjs/components/tags/Tags.js +3 -3
- package/lib/mjs/components/time/Time.form.js +2 -2
- package/lib/mjs/components/time/Time.js +0 -11
- package/lib/mjs/templates/Templates.js +1 -1
- package/lib/mjs/translations/en.d.ts +1 -0
- package/lib/mjs/translations/en.js +1 -0
- package/package.json +4 -4
|
@@ -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.withReorder = exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
exports.withReorder = exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = 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"));
|
|
@@ -24,6 +24,8 @@ const comp9_1 = __importDefault(require("./comp9"));
|
|
|
24
24
|
exports.comp9 = comp9_1.default;
|
|
25
25
|
const comp10_1 = __importDefault(require("./comp10"));
|
|
26
26
|
exports.comp10 = comp10_1.default;
|
|
27
|
+
const comp11_1 = __importDefault(require("./comp11"));
|
|
28
|
+
exports.comp11 = comp11_1.default;
|
|
27
29
|
const comp_with_def_value_1 = __importDefault(require("./comp-with-def-value"));
|
|
28
30
|
exports.withDefValue = comp_with_def_value_1.default;
|
|
29
31
|
const comp_row_groups_with_def_value_1 = __importDefault(require("./comp-row-groups-with-def-value"));
|
|
@@ -241,7 +241,7 @@ class DataMapComponent extends DataGrid_1.default {
|
|
|
241
241
|
delete dataValue[key];
|
|
242
242
|
const comp = components[this.valueKey];
|
|
243
243
|
comp.component.key = newKey;
|
|
244
|
-
comp.path = Components_1.default.
|
|
244
|
+
comp.path = Components_1.default.getComponentPath(comp);
|
|
245
245
|
key = newKey;
|
|
246
246
|
});
|
|
247
247
|
const valueComponent = lodash_1.default.clone(this.component.valueComponent);
|
|
@@ -17,9 +17,9 @@ export default class DayComponent extends Field {
|
|
|
17
17
|
constructor(component: any, options: any, data: any);
|
|
18
18
|
/**
|
|
19
19
|
* The empty value for day component.
|
|
20
|
-
* @returns {'
|
|
20
|
+
* @returns {''} - The empty value of the day component.
|
|
21
21
|
*/
|
|
22
|
-
get emptyValue(): "
|
|
22
|
+
get emptyValue(): "";
|
|
23
23
|
get valueMask(): RegExp;
|
|
24
24
|
get dayRequired(): any;
|
|
25
25
|
get showDay(): boolean;
|
|
@@ -130,8 +130,7 @@ export default class DayComponent extends Field {
|
|
|
130
130
|
* @returns {string|null} - The string value of the date.
|
|
131
131
|
*/
|
|
132
132
|
getValueAsString(value: any): string | null;
|
|
133
|
-
focus(field: any): void;
|
|
134
133
|
isPartialDay(value: any): boolean;
|
|
135
|
-
getValidationFormat():
|
|
134
|
+
getValidationFormat(): string;
|
|
136
135
|
}
|
|
137
136
|
import Field from '../_classes/field/Field';
|
|
@@ -30,7 +30,8 @@ class DayComponent extends Field_1.default {
|
|
|
30
30
|
required: false
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
dayFirst: false
|
|
33
|
+
dayFirst: false,
|
|
34
|
+
defaultValue: ''
|
|
34
35
|
}, ...extend);
|
|
35
36
|
}
|
|
36
37
|
static get builderInfo() {
|
|
@@ -64,10 +65,10 @@ class DayComponent extends Field_1.default {
|
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* The empty value for day component.
|
|
67
|
-
* @returns {'
|
|
68
|
+
* @returns {''} - The empty value of the day component.
|
|
68
69
|
*/
|
|
69
70
|
get emptyValue() {
|
|
70
|
-
return '
|
|
71
|
+
return '';
|
|
71
72
|
}
|
|
72
73
|
get valueMask() {
|
|
73
74
|
return /^\d{2}\/\d{2}\/\d{4}$/;
|
|
@@ -343,15 +344,21 @@ class DayComponent extends Field_1.default {
|
|
|
343
344
|
const valueParts = value.split('/');
|
|
344
345
|
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
345
346
|
const defaultValue = this.component.defaultValue ? this.component.defaultValue.split('/') : '';
|
|
346
|
-
const getNextPart = (shouldTake, defaultValue) =>
|
|
347
|
+
const getNextPart = (shouldTake, defaultValue) => {
|
|
348
|
+
// Only push the part if it's not an empty string
|
|
349
|
+
const part = shouldTake ? valueParts.shift() : defaultValue;
|
|
350
|
+
if (part !== '') {
|
|
351
|
+
dateParts.push(part);
|
|
352
|
+
}
|
|
353
|
+
};
|
|
347
354
|
if (this.dayFirst) {
|
|
348
|
-
getNextPart(this.showDay, defaultValue ? defaultValue[DAY] : '
|
|
355
|
+
getNextPart(this.showDay, defaultValue ? defaultValue[DAY] : '');
|
|
349
356
|
}
|
|
350
|
-
getNextPart(this.showMonth, defaultValue ? defaultValue[MONTH] : '
|
|
357
|
+
getNextPart(this.showMonth, defaultValue ? defaultValue[MONTH] : '');
|
|
351
358
|
if (!this.dayFirst) {
|
|
352
|
-
getNextPart(this.showDay, defaultValue ? defaultValue[DAY] : '
|
|
359
|
+
getNextPart(this.showDay, defaultValue ? defaultValue[DAY] : '');
|
|
353
360
|
}
|
|
354
|
-
getNextPart(this.showYear, defaultValue ? defaultValue[YEAR] : '
|
|
361
|
+
getNextPart(this.showYear, defaultValue ? defaultValue[YEAR] : '');
|
|
355
362
|
return dateParts.join('/');
|
|
356
363
|
}
|
|
357
364
|
/**
|
|
@@ -363,7 +370,7 @@ class DayComponent extends Field_1.default {
|
|
|
363
370
|
setValueAt(index, value) {
|
|
364
371
|
// temporary solution to avoid input reset
|
|
365
372
|
// on invalid date.
|
|
366
|
-
if (
|
|
373
|
+
if (value === 'Invalid date') {
|
|
367
374
|
return null;
|
|
368
375
|
}
|
|
369
376
|
const parts = value.split('/');
|
|
@@ -558,10 +565,24 @@ class DayComponent extends Field_1.default {
|
|
|
558
565
|
}
|
|
559
566
|
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
560
567
|
const values = value.split('/');
|
|
568
|
+
if (values.length < 3) {
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
561
571
|
return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
|
|
562
572
|
}
|
|
563
573
|
getValidationFormat() {
|
|
564
|
-
|
|
574
|
+
var _a, _b, _c, _d, _e, _f;
|
|
575
|
+
let validationFormat = this.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';
|
|
576
|
+
if ((_b = (_a = this.fields) === null || _a === void 0 ? void 0 : _a.day) === null || _b === void 0 ? void 0 : _b.hide) {
|
|
577
|
+
validationFormat = validationFormat.replace('DD-', '');
|
|
578
|
+
}
|
|
579
|
+
if ((_d = (_c = this.fields) === null || _c === void 0 ? void 0 : _c.month) === null || _d === void 0 ? void 0 : _d.hide) {
|
|
580
|
+
validationFormat = validationFormat.replace('MM-', '');
|
|
581
|
+
}
|
|
582
|
+
if ((_f = (_e = this.fields) === null || _e === void 0 ? void 0 : _e.year) === null || _f === void 0 ? void 0 : _f.hide) {
|
|
583
|
+
validationFormat = validationFormat.replace('-YYYY', '');
|
|
584
|
+
}
|
|
585
|
+
return validationFormat;
|
|
565
586
|
}
|
|
566
587
|
}
|
|
567
588
|
exports.default = DayComponent;
|
|
@@ -490,11 +490,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
|
490
490
|
else {
|
|
491
491
|
this.removeClass(this.refs.component, `formio-component-${this.component.type}-row-open`);
|
|
492
492
|
}
|
|
493
|
-
|
|
494
|
-
this.loadRefs(element, {
|
|
495
|
-
messageContainer: 'single-scope',
|
|
496
|
-
});
|
|
497
|
-
return superAttach;
|
|
493
|
+
return super.attach(element);
|
|
498
494
|
}
|
|
499
495
|
flattenRowDataValue(dataValue) {
|
|
500
496
|
const flattened = {};
|
|
@@ -899,6 +895,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
|
899
895
|
}
|
|
900
896
|
this.clearErrors(rowIndex);
|
|
901
897
|
this.baseRemoveRow(rowIndex);
|
|
898
|
+
this.removeSubmissionMetadataRow(rowIndex);
|
|
902
899
|
this.splice(rowIndex);
|
|
903
900
|
this.emit('editGridDeleteRow', {
|
|
904
901
|
index: rowIndex
|
|
@@ -1,49 +1,79 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
+
let type: string;
|
|
3
|
+
let display: string;
|
|
2
4
|
let components: ({
|
|
3
5
|
label: string;
|
|
4
6
|
tableView: boolean;
|
|
5
|
-
modalEdit: boolean;
|
|
6
|
-
validateWhenHidden: boolean;
|
|
7
7
|
rowDrafts: boolean;
|
|
8
8
|
key: string;
|
|
9
9
|
type: string;
|
|
10
|
-
displayAsTable: boolean;
|
|
11
10
|
input: boolean;
|
|
12
|
-
components:
|
|
13
|
-
|
|
14
|
-
applyMaskOn: string;
|
|
15
|
-
tableView: boolean;
|
|
16
|
-
validate: {
|
|
17
|
-
required: boolean;
|
|
18
|
-
};
|
|
19
|
-
validateWhenHidden: boolean;
|
|
11
|
+
components: {
|
|
12
|
+
collapsible: boolean;
|
|
20
13
|
key: string;
|
|
21
14
|
type: string;
|
|
22
|
-
input: boolean;
|
|
23
|
-
} | {
|
|
24
15
|
label: string;
|
|
25
|
-
applyMaskOn: string;
|
|
26
|
-
tableView: boolean;
|
|
27
|
-
validateWhenHidden: boolean;
|
|
28
|
-
key: string;
|
|
29
|
-
type: string;
|
|
30
16
|
input: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
tableView: boolean;
|
|
18
|
+
components: {
|
|
19
|
+
label: string;
|
|
20
|
+
columns: ({
|
|
21
|
+
components: {
|
|
22
|
+
label: string;
|
|
23
|
+
optionsLabelPosition: string;
|
|
24
|
+
inline: boolean;
|
|
25
|
+
tableView: boolean;
|
|
26
|
+
values: {
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
shortcut: string;
|
|
30
|
+
}[];
|
|
31
|
+
key: string;
|
|
32
|
+
type: string;
|
|
33
|
+
input: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
width: number;
|
|
36
|
+
offset: number;
|
|
37
|
+
push: number;
|
|
38
|
+
pull: number;
|
|
39
|
+
size: string;
|
|
40
|
+
currentWidth: number;
|
|
41
|
+
} | {
|
|
42
|
+
components: {
|
|
43
|
+
label: string;
|
|
44
|
+
applyMaskOn: string;
|
|
45
|
+
autoExpand: boolean;
|
|
46
|
+
tableView: boolean;
|
|
47
|
+
key: string;
|
|
48
|
+
conditional: {
|
|
49
|
+
show: boolean;
|
|
50
|
+
conjunction: string;
|
|
51
|
+
};
|
|
52
|
+
type: string;
|
|
53
|
+
input: boolean;
|
|
54
|
+
}[];
|
|
55
|
+
width: number;
|
|
56
|
+
offset: number;
|
|
57
|
+
push: number;
|
|
58
|
+
pull: number;
|
|
59
|
+
size: string;
|
|
60
|
+
currentWidth: number;
|
|
61
|
+
})[];
|
|
62
|
+
key: string;
|
|
63
|
+
type: string;
|
|
64
|
+
input: boolean;
|
|
65
|
+
tableView: boolean;
|
|
66
|
+
}[];
|
|
67
|
+
}[];
|
|
68
|
+
disableOnInvalid?: undefined;
|
|
35
69
|
} | {
|
|
70
|
+
type: string;
|
|
36
71
|
label: string;
|
|
37
|
-
showValidations: boolean;
|
|
38
|
-
tableView: boolean;
|
|
39
72
|
key: string;
|
|
40
|
-
|
|
73
|
+
disableOnInvalid: boolean;
|
|
41
74
|
input: boolean;
|
|
42
|
-
|
|
43
|
-
modalEdit?: undefined;
|
|
44
|
-
validateWhenHidden?: undefined;
|
|
75
|
+
tableView: boolean;
|
|
45
76
|
rowDrafts?: undefined;
|
|
46
|
-
displayAsTable?: undefined;
|
|
47
77
|
components?: undefined;
|
|
48
78
|
})[];
|
|
49
79
|
}
|
|
@@ -1,49 +1,99 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
+
type: 'form',
|
|
5
|
+
display: 'form',
|
|
4
6
|
components: [
|
|
5
7
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"displayAsTable": false,
|
|
14
|
-
"input": true,
|
|
15
|
-
"components": [
|
|
8
|
+
label: 'Edit Grid',
|
|
9
|
+
tableView: false,
|
|
10
|
+
rowDrafts: false,
|
|
11
|
+
key: 'editGrid',
|
|
12
|
+
type: 'editgrid',
|
|
13
|
+
input: true,
|
|
14
|
+
components: [
|
|
16
15
|
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
collapsible: false,
|
|
17
|
+
key: 'panel',
|
|
18
|
+
type: 'panel',
|
|
19
|
+
label: 'Panel',
|
|
20
|
+
input: false,
|
|
21
|
+
tableView: false,
|
|
22
|
+
components: [
|
|
23
|
+
{
|
|
24
|
+
label: 'Columns',
|
|
25
|
+
columns: [
|
|
26
|
+
{
|
|
27
|
+
components: [
|
|
28
|
+
{
|
|
29
|
+
label: 'Radio',
|
|
30
|
+
optionsLabelPosition: 'right',
|
|
31
|
+
inline: false,
|
|
32
|
+
tableView: true,
|
|
33
|
+
values: [
|
|
34
|
+
{
|
|
35
|
+
label: 'yes',
|
|
36
|
+
value: 'yes',
|
|
37
|
+
shortcut: ''
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'no',
|
|
41
|
+
value: 'no',
|
|
42
|
+
shortcut: ''
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
key: 'radio',
|
|
46
|
+
type: 'radio',
|
|
47
|
+
input: true
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
width: 6,
|
|
51
|
+
offset: 0,
|
|
52
|
+
push: 0,
|
|
53
|
+
pull: 0,
|
|
54
|
+
size: 'md',
|
|
55
|
+
currentWidth: 6
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
components: [
|
|
59
|
+
{
|
|
60
|
+
label: 'Text Area',
|
|
61
|
+
applyMaskOn: 'change',
|
|
62
|
+
autoExpand: false,
|
|
63
|
+
tableView: true,
|
|
64
|
+
key: 'textArea',
|
|
65
|
+
conditional: {
|
|
66
|
+
show: true,
|
|
67
|
+
conjunction: 'all'
|
|
68
|
+
},
|
|
69
|
+
type: 'textarea',
|
|
70
|
+
input: true
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
width: 6,
|
|
74
|
+
offset: 0,
|
|
75
|
+
push: 0,
|
|
76
|
+
pull: 0,
|
|
77
|
+
size: 'md',
|
|
78
|
+
currentWidth: 6
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
key: 'columns',
|
|
82
|
+
type: 'columns',
|
|
83
|
+
input: false,
|
|
84
|
+
tableView: false
|
|
85
|
+
}
|
|
86
|
+
]
|
|
36
87
|
}
|
|
37
88
|
]
|
|
38
89
|
},
|
|
39
90
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"saveOnEnter": false
|
|
91
|
+
type: 'button',
|
|
92
|
+
label: 'Submit',
|
|
93
|
+
key: 'submit',
|
|
94
|
+
disableOnInvalid: true,
|
|
95
|
+
input: true,
|
|
96
|
+
tableView: false
|
|
47
97
|
}
|
|
48
98
|
]
|
|
49
99
|
};
|
|
@@ -33,12 +33,12 @@ export default class FileComponent extends Field {
|
|
|
33
33
|
get dataReady(): Promise<any>;
|
|
34
34
|
loadImage(fileInfo: any): any;
|
|
35
35
|
get emptyValue(): never[];
|
|
36
|
-
getValueAsString(value: any): any;
|
|
36
|
+
getValueAsString(value: any, options: any): any;
|
|
37
37
|
get defaultValue(): any[];
|
|
38
38
|
get hasTypes(): any;
|
|
39
39
|
_fileBrowseHidden: any;
|
|
40
40
|
get shouldSyncFiles(): boolean;
|
|
41
|
-
get autoSync():
|
|
41
|
+
get autoSync(): boolean;
|
|
42
42
|
get columnsSize(): {
|
|
43
43
|
name: number;
|
|
44
44
|
size: number;
|
|
@@ -114,7 +114,12 @@ class FileComponent extends Field_1.default {
|
|
|
114
114
|
get emptyValue() {
|
|
115
115
|
return [];
|
|
116
116
|
}
|
|
117
|
-
getValueAsString(value) {
|
|
117
|
+
getValueAsString(value, options) {
|
|
118
|
+
if ((options === null || options === void 0 ? void 0 : options.review) && !this.component.uploadOnly) {
|
|
119
|
+
return lodash_1.default.map(value, (val, index) => {
|
|
120
|
+
return `<a href="${val.url || '#'}" target="_blank" data-path='${this.path}' data-fileindex='${index}'>${val.originalName}</a>`;
|
|
121
|
+
}).join(', ');
|
|
122
|
+
}
|
|
118
123
|
if (lodash_1.default.isArray(value)) {
|
|
119
124
|
return lodash_1.default.map(value, 'originalName').join(', ');
|
|
120
125
|
}
|
|
@@ -146,7 +151,9 @@ class FileComponent extends Field_1.default {
|
|
|
146
151
|
return Boolean(this.filesToSync.filesToDelete.length || this.filesToSync.filesToUpload.length);
|
|
147
152
|
}
|
|
148
153
|
get autoSync() {
|
|
149
|
-
|
|
154
|
+
// Disable autoSync for now
|
|
155
|
+
return false;
|
|
156
|
+
// return _.get(this, 'component.autoSync', false);
|
|
150
157
|
}
|
|
151
158
|
get columnsSize() {
|
|
152
159
|
const actionsColumn = this.disabled ? 0 : this.autoSync ? 2 : 1;
|
|
@@ -935,6 +942,10 @@ class FileComponent extends Field_1.default {
|
|
|
935
942
|
: response.type === 'abort'
|
|
936
943
|
? this.t('Request was aborted')
|
|
937
944
|
: response.toString();
|
|
945
|
+
this.emit('fileUploadError', {
|
|
946
|
+
fileToSync,
|
|
947
|
+
response,
|
|
948
|
+
});
|
|
938
949
|
}
|
|
939
950
|
finally {
|
|
940
951
|
delete fileToSync.progress;
|
|
@@ -7,4 +7,5 @@ import comp5 from './comp5';
|
|
|
7
7
|
import comp6 from './comp6';
|
|
8
8
|
import comp7 from './comp7';
|
|
9
9
|
import comp8 from './comp8';
|
|
10
|
-
|
|
10
|
+
import nestedWizardForm from './nestedWizardForm';
|
|
11
|
+
export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, nestedWizardForm };
|
|
@@ -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.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = exports.formModalEdit = void 0;
|
|
6
|
+
exports.nestedWizardForm = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = exports.formModalEdit = void 0;
|
|
7
7
|
const formModalEdit_1 = __importDefault(require("./formModalEdit"));
|
|
8
8
|
exports.formModalEdit = formModalEdit_1.default;
|
|
9
9
|
const comp1_1 = __importDefault(require("./comp1"));
|
|
@@ -22,3 +22,5 @@ const comp7_1 = __importDefault(require("./comp7"));
|
|
|
22
22
|
exports.comp7 = comp7_1.default;
|
|
23
23
|
const comp8_1 = __importDefault(require("./comp8"));
|
|
24
24
|
exports.comp8 = comp8_1.default;
|
|
25
|
+
const nestedWizardForm_1 = __importDefault(require("./nestedWizardForm"));
|
|
26
|
+
exports.nestedWizardForm = nestedWizardForm_1.default;
|