@innoways/form-generator 8.0.6 → 8.0.8
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 +22 -0
- package/dist/index.js +39 -37
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Feature: added autoFormValue get and save, version 8.0.8
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @innoways/drip-form-theme-antd@8.0.8
|
|
10
|
+
- @innoways/drip-form@8.0.8
|
|
11
|
+
- @innoways/hooks@8.0.8
|
|
12
|
+
- @innoways/utils@8.0.8
|
|
13
|
+
|
|
14
|
+
## 8.0.7
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- fixed fieldKey default to apiKey version 8.0.7
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @innoways/drip-form-theme-antd@8.0.7
|
|
21
|
+
- @innoways/drip-form@8.0.7
|
|
22
|
+
- @innoways/hooks@8.0.7
|
|
23
|
+
- @innoways/utils@8.0.7
|
|
24
|
+
|
|
3
25
|
## 8.0.6
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2536,6 +2536,13 @@ var unitedSchema = [{
|
|
|
2536
2536
|
label: 'Fetch'
|
|
2537
2537
|
}]
|
|
2538
2538
|
}
|
|
2539
|
+
}, {
|
|
2540
|
+
fieldKey: 'formValueApiURLDomain',
|
|
2541
|
+
type: 'string',
|
|
2542
|
+
title: 'FormValue Api Domain',
|
|
2543
|
+
ui: {
|
|
2544
|
+
type: 'text'
|
|
2545
|
+
}
|
|
2539
2546
|
}]
|
|
2540
2547
|
}];
|
|
2541
2548
|
|
|
@@ -3686,7 +3693,18 @@ var PreviewJSON = function PreviewJSON() {
|
|
|
3686
3693
|
var unitedSchema = useRecoilValue(previewSchemaAtom);
|
|
3687
3694
|
var uiComponents = useRecoilValue(DripFormUiComponetsAtom);
|
|
3688
3695
|
var generatorContext = useContext(GeneratorContext);
|
|
3689
|
-
var showTitleWithIcon = useShowTitleWithIcon(generatorContext);
|
|
3696
|
+
var showTitleWithIcon = useShowTitleWithIcon(generatorContext); // below code is for test getAutoFormValueData
|
|
3697
|
+
// const getInitDataCB = (getInitData: any) => {
|
|
3698
|
+
// getInitData({
|
|
3699
|
+
// form_id: '6720979539a5a979690e4fec',
|
|
3700
|
+
// extension: {
|
|
3701
|
+
// type: 'hr-Portal',
|
|
3702
|
+
// orderNumber: 'I-IR-2409020',
|
|
3703
|
+
// function: 'Global-IQ Get Update',
|
|
3704
|
+
// },
|
|
3705
|
+
// })
|
|
3706
|
+
// }
|
|
3707
|
+
|
|
3690
3708
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
3691
3709
|
keyboard: false,
|
|
3692
3710
|
maskClosable: false,
|
|
@@ -3706,7 +3724,22 @@ var PreviewJSON = function PreviewJSON() {
|
|
|
3706
3724
|
uiComponents: uiComponents,
|
|
3707
3725
|
options: {
|
|
3708
3726
|
showTitleWithIcon: showTitleWithIcon
|
|
3709
|
-
}
|
|
3727
|
+
} // below code is for test getAutoFormValueData and autoAddFormValueData
|
|
3728
|
+
// getFormValueAndInitData={getInitDataCB}
|
|
3729
|
+
// onSubmit={(data, autoAddFormValueData) => {
|
|
3730
|
+
// data.formData.countryName = 'Test new new country'
|
|
3731
|
+
// autoAddFormValueData(data.formData, {
|
|
3732
|
+
// form_id: '6720979539a5a979690e4fec',
|
|
3733
|
+
// version_id: '6720979539a5a979690e4fec',
|
|
3734
|
+
// extension: {
|
|
3735
|
+
// type: 'hr-Portal',
|
|
3736
|
+
// orderNumber: 'I-IR-2409020',
|
|
3737
|
+
// function: 'Global-IQ Get Update',
|
|
3738
|
+
// },
|
|
3739
|
+
// form_data: { file_name: 'test new new File' },
|
|
3740
|
+
// })
|
|
3741
|
+
// }}
|
|
3742
|
+
|
|
3710
3743
|
}));
|
|
3711
3744
|
};
|
|
3712
3745
|
|
|
@@ -4540,8 +4573,8 @@ var PropertyConfig = function PropertyConfig() {
|
|
|
4540
4573
|
|
|
4541
4574
|
return _objectSpread$b(_objectSpread$b(_objectSpread$b({
|
|
4542
4575
|
type: themeAndType,
|
|
4543
|
-
$fieldKey: dataSchema
|
|
4544
|
-
apiKey: dataSchema !== null && dataSchema !== void 0 && dataSchema.apiKey ? dataSchema.apiKey :
|
|
4576
|
+
$fieldKey: dataSchema.$fieldKey || fieldKey,
|
|
4577
|
+
apiKey: dataSchema !== null && dataSchema !== void 0 && dataSchema.apiKey ? dataSchema.apiKey : dataSchema.$fieldKey || fieldKey,
|
|
4545
4578
|
hideOnViewMode: (dataSchema === null || dataSchema === void 0 ? void 0 : dataSchema.hideOnViewMode) || false,
|
|
4546
4579
|
title: uiSchema.title || {},
|
|
4547
4580
|
containerStyle: uiSchema.containerStyle || {},
|
|
@@ -4863,14 +4896,9 @@ var PropertyConfig = function PropertyConfig() {
|
|
|
4863
4896
|
var addOnChangeKey = '';
|
|
4864
4897
|
var addOnChangeValue = '';
|
|
4865
4898
|
|
|
4866
|
-
if (changeKey === 'footer.url' || changeKey === 'footer.method' || changeKey === 'footer.token' || changeKey === 'footer.jsonkey' || changeKey === 'footer.apiJson') {
|
|
4899
|
+
if (changeKey === 'footer.url' || changeKey === 'footer.method' || changeKey === 'footer.token' || changeKey === 'footer.jsonkey' || changeKey === 'footer.apiJson' || changeKey === 'footer.formValueApiURLDomain') {
|
|
4867
4900
|
addOnChangeKey = 'footer.fetchData';
|
|
4868
4901
|
addOnChangeValue = false;
|
|
4869
|
-
}
|
|
4870
|
-
|
|
4871
|
-
if (changeKey === 'apiKey') {
|
|
4872
|
-
addOnChangeKey = '$fieldKey';
|
|
4873
|
-
addOnChangeValue = data;
|
|
4874
4902
|
} // 填充渲染区Schema
|
|
4875
4903
|
|
|
4876
4904
|
|
|
@@ -8545,33 +8573,7 @@ var Viewport = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
8545
8573
|
*/
|
|
8546
8574
|
|
|
8547
8575
|
useEffect(function () {
|
|
8548
|
-
var newSchema = schema;
|
|
8549
|
-
// if (Array.isArray(newSchema.schema) && newSchema.schema.length) {
|
|
8550
|
-
// newSchema['schema'] = newSchema.schema.map((item: any) => {
|
|
8551
|
-
// if (Array.isArray(item.schema)) {
|
|
8552
|
-
// item = {
|
|
8553
|
-
// ...item,
|
|
8554
|
-
// schema: item.schema.map((innerItem: any) => {
|
|
8555
|
-
// if (!innerItem.apiKey) {
|
|
8556
|
-
// innerItem['apiKey'] = innerItem?.title
|
|
8557
|
-
// ? removeSpaceAndmakeStringCamelCase(innerItem.title)
|
|
8558
|
-
// : ''
|
|
8559
|
-
// }
|
|
8560
|
-
// return innerItem
|
|
8561
|
-
// }),
|
|
8562
|
-
// }
|
|
8563
|
-
// } else {
|
|
8564
|
-
// if (!item.apiKey) {
|
|
8565
|
-
// item['apiKey'] = item?.title
|
|
8566
|
-
// ? removeSpaceAndmakeStringCamelCase(item.title)
|
|
8567
|
-
// : ''
|
|
8568
|
-
// }
|
|
8569
|
-
// }
|
|
8570
|
-
// return item
|
|
8571
|
-
// })
|
|
8572
|
-
// }
|
|
8573
|
-
// }
|
|
8574
|
-
|
|
8576
|
+
var newSchema = schema;
|
|
8575
8577
|
setUnitedSchema(newSchema);
|
|
8576
8578
|
setVersion(function (version) {
|
|
8577
8579
|
return version + 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innoways/form-generator",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.8",
|
|
4
4
|
"description": "drip-form 生成器",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hooks",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@dnd-kit/modifiers": "^4.0.0",
|
|
38
38
|
"@dnd-kit/sortable": "^5.0.0",
|
|
39
39
|
"@dnd-kit/utilities": "^3.0.0",
|
|
40
|
-
"@innoways/drip-form": "^8.0.
|
|
41
|
-
"@innoways/drip-form-theme-antd": "^8.0.
|
|
42
|
-
"@innoways/hooks": "^8.0.
|
|
43
|
-
"@innoways/utils": "^8.0.
|
|
40
|
+
"@innoways/drip-form": "^8.0.8",
|
|
41
|
+
"@innoways/drip-form-theme-antd": "^8.0.8",
|
|
42
|
+
"@innoways/hooks": "^8.0.8",
|
|
43
|
+
"@innoways/utils": "^8.0.8",
|
|
44
44
|
"@monaco-editor/react": "^4.2.2",
|
|
45
45
|
"antd": "^4.16.13",
|
|
46
46
|
"classnames": "^2.3.1",
|