datastake-daf 0.6.463 → 0.6.465
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/dist/components/index.js +6 -51
- package/dist/utils/index.js +662 -0
- package/package.json +5 -1
- package/rollup.config.js +4 -0
- package/src/@daf/core/components/Document/WordDocument/Preview/WordDocument.stories.js +640 -0
- package/src/@daf/core/components/Document/WordDocument/Preview/index.js +118 -0
- package/src/@daf/core/components/Document/WordDocument/createDocument.js +565 -0
- package/src/@daf/core/components/Document/WordDocument/index.js +9 -0
- package/src/@daf/core/components/DynamicForm/helper.js +0 -7
- package/src/@daf/core/components/DynamicForm/index.jsx +0 -37
- package/src/@daf/core/components/DynamicForm/storyConfig.js +0 -1
- package/src/@daf/core/components/EditForm/storyConfig.js +1 -1
- package/src/@daf/core/components/EditForm/storyConfig1.js +9932 -131
- package/src/@daf/core/components/ViewForm/components/DataLink/flat.js +1 -1
- package/src/helpers/componentsToImages.js +29 -0
- package/src/utils.js +4 -0
- package/dist/style/datastake/mapbox-gl.css +0 -330
package/dist/components/index.js
CHANGED
|
@@ -26579,8 +26579,8 @@ function DataLinkFlat$1({
|
|
|
26579
26579
|
return (dataLinkFormData || []).map(d => {
|
|
26580
26580
|
const dataLinkData = d[dataLinkKey];
|
|
26581
26581
|
return {
|
|
26582
|
-
...dataLinkData,
|
|
26583
26582
|
...d,
|
|
26583
|
+
...dataLinkData,
|
|
26584
26584
|
dataLinkKey: undefined
|
|
26585
26585
|
};
|
|
26586
26586
|
});
|
|
@@ -42895,15 +42895,6 @@ const checkCondition = (condition, repeatValues, formsValue) => {
|
|
|
42895
42895
|
};
|
|
42896
42896
|
function showHideInput(input, formsValue, repeatIndex, repeatValues, setValues, ref) {
|
|
42897
42897
|
if (input?.meta?.hidden === true) {
|
|
42898
|
-
// Set default value for hidden fields
|
|
42899
|
-
if (input?.meta?.defaultValue !== undefined && !propHasValue(formsValue[ref])) {
|
|
42900
|
-
formsValue[ref] = input.meta.defaultValue;
|
|
42901
|
-
if (setValues && typeof setValues === 'function') {
|
|
42902
|
-
setValues({
|
|
42903
|
-
...formsValue
|
|
42904
|
-
});
|
|
42905
|
-
}
|
|
42906
|
-
}
|
|
42907
42898
|
return false;
|
|
42908
42899
|
}
|
|
42909
42900
|
if (input.showIf) {
|
|
@@ -45390,34 +45381,6 @@ function DynamicForm(_ref) {
|
|
|
45390
45381
|
// MainForm.resetFields();
|
|
45391
45382
|
}
|
|
45392
45383
|
}, [data]);
|
|
45393
|
-
|
|
45394
|
-
// Initialize default values for hidden fields
|
|
45395
|
-
React.useEffect(() => {
|
|
45396
|
-
if (Object.keys(form).length > 0) {
|
|
45397
|
-
const updatedValues = _objectSpread2({}, values);
|
|
45398
|
-
let hasChanges = false;
|
|
45399
|
-
|
|
45400
|
-
// Process all form fields to set default values for hidden fields
|
|
45401
|
-
Object.keys(form).forEach(formKey => {
|
|
45402
|
-
Object.keys(form[formKey]).forEach(fieldKey => {
|
|
45403
|
-
var _field$meta, _field$meta2;
|
|
45404
|
-
const field = form[formKey][fieldKey];
|
|
45405
|
-
if ((field === null || field === void 0 || (_field$meta = field.meta) === null || _field$meta === void 0 ? void 0 : _field$meta.hidden) === true && (field === null || field === void 0 || (_field$meta2 = field.meta) === null || _field$meta2 === void 0 ? void 0 : _field$meta2.defaultValue) !== undefined) {
|
|
45406
|
-
const fieldId = field.dataId || fieldKey;
|
|
45407
|
-
if (!propHasValue(updatedValues[fieldId])) {
|
|
45408
|
-
updatedValues[fieldId] = field.meta.defaultValue;
|
|
45409
|
-
hasChanges = true;
|
|
45410
|
-
}
|
|
45411
|
-
}
|
|
45412
|
-
});
|
|
45413
|
-
});
|
|
45414
|
-
if (hasChanges) {
|
|
45415
|
-
setValues(updatedValues);
|
|
45416
|
-
// Also set the values in the Ant Design form
|
|
45417
|
-
MainForm.setFieldsValue(updatedValues);
|
|
45418
|
-
}
|
|
45419
|
-
}
|
|
45420
|
-
}, [form]);
|
|
45421
45384
|
const setSelectedForm = id => {
|
|
45422
45385
|
setForms(Forms.map(form => {
|
|
45423
45386
|
id === form.id ? form.selected = true : form.selected = false;
|
|
@@ -45454,7 +45417,7 @@ function DynamicForm(_ref) {
|
|
|
45454
45417
|
}).every(key => key);
|
|
45455
45418
|
};
|
|
45456
45419
|
const getData = (name, input, value, commentValue, path, disabledPath) => {
|
|
45457
|
-
var _input$meta, _input$meta2, _input$meta3, _input$meta4, _input$meta5, _input$meta6, _input$meta7, _input$meta8, _input$meta9, _input$meta10
|
|
45420
|
+
var _input$meta, _input$meta2, _input$meta3, _input$meta4, _input$meta5, _input$meta6, _input$meta7, _input$meta8, _input$meta9, _input$meta10;
|
|
45458
45421
|
const props = {
|
|
45459
45422
|
// placeholder: input.labelHint ? input.labelHint : getInputLabel(input, values, true),
|
|
45460
45423
|
placeholder: input.labelHint,
|
|
@@ -45491,17 +45454,9 @@ function DynamicForm(_ref) {
|
|
|
45491
45454
|
}
|
|
45492
45455
|
value = fileList;
|
|
45493
45456
|
}
|
|
45494
|
-
|
|
45495
|
-
// Handle default values for hidden fields
|
|
45496
|
-
if ((input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.hidden) === true && (input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.defaultValue) !== undefined && !propHasValue(value)) {
|
|
45497
|
-
value = input.meta.defaultValue;
|
|
45498
|
-
if (typeof path === 'string') {
|
|
45499
|
-
dot__default["default"].str(path, value, values);
|
|
45500
|
-
}
|
|
45501
|
-
}
|
|
45502
45457
|
const config = {
|
|
45503
45458
|
name,
|
|
45504
|
-
call: input.call ? input.call : input === null || input === void 0 || (_input$
|
|
45459
|
+
call: input.call ? input.call : input === null || input === void 0 || (_input$meta7 = input.meta) === null || _input$meta7 === void 0 ? void 0 : _input$meta7.call,
|
|
45505
45460
|
automaticallyLink: input.automaticallyLink,
|
|
45506
45461
|
props,
|
|
45507
45462
|
formsValue: values,
|
|
@@ -45513,8 +45468,8 @@ function DynamicForm(_ref) {
|
|
|
45513
45468
|
updateOptions: input.updateOptions || false,
|
|
45514
45469
|
options: input.options,
|
|
45515
45470
|
optionGroup: input.optionGroup,
|
|
45516
|
-
optionsFilter: input === null || input === void 0 || (_input$
|
|
45517
|
-
filterCond: input === null || input === void 0 || (_input$
|
|
45471
|
+
optionsFilter: input === null || input === void 0 || (_input$meta8 = input.meta) === null || _input$meta8 === void 0 ? void 0 : _input$meta8.optionsFilter,
|
|
45472
|
+
filterCond: input === null || input === void 0 || (_input$meta9 = input.meta) === null || _input$meta9 === void 0 ? void 0 : _input$meta9.filterCond,
|
|
45518
45473
|
disableOtherFields: input.disableOtherFields,
|
|
45519
45474
|
updateOtherFields: input.updateOtherFields,
|
|
45520
45475
|
repeatLabel: input.repeatLabel,
|
|
@@ -45524,7 +45479,7 @@ function DynamicForm(_ref) {
|
|
|
45524
45479
|
restricted: input.restricted || false,
|
|
45525
45480
|
totalMax: input.totalMax,
|
|
45526
45481
|
country: input.country || undefined,
|
|
45527
|
-
address: (input === null || input === void 0 || (_input$
|
|
45482
|
+
address: (input === null || input === void 0 || (_input$meta10 = input.meta) === null || _input$meta10 === void 0 ? void 0 : _input$meta10.address) || undefined,
|
|
45528
45483
|
stakeholderId: input.stakeholderId,
|
|
45529
45484
|
preSelected,
|
|
45530
45485
|
addressData,
|