@wibetter/json-editor 5.1.11 → 5.1.12
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/lib/index.css +2 -2
- package/lib/index.js +15 -15
- package/package.json +1 -1
- package/sdk/index.css +2 -2
- package/sdk/index.js +2962 -1698
package/lib/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:17 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:17 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -1678,7 +1678,7 @@ var CascaderSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
1678
1678
|
},
|
|
1679
1679
|
options: options,
|
|
1680
1680
|
onChange: this.handleValueChange,
|
|
1681
|
-
defaultValue: curJsonData
|
|
1681
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
1682
1682
|
disabled: targetJsonSchema.readOnly,
|
|
1683
1683
|
allowClear: (_targetJsonSchema$all = targetJsonSchema.allowClear) != null ? _targetJsonSchema$all : true,
|
|
1684
1684
|
multiple: (_targetJsonSchema$mul = targetJsonSchema.multiple) != null ? _targetJsonSchema$mul : false
|
|
@@ -1820,7 +1820,7 @@ var CheckboxSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
1820
1820
|
display: 'inline-block'
|
|
1821
1821
|
},
|
|
1822
1822
|
onChange: this.handleValueChange,
|
|
1823
|
-
defaultValue: curJsonData
|
|
1823
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
1824
1824
|
disabled: targetJsonSchema.readOnly
|
|
1825
1825
|
}, options && options.length > 0 && options.map(function (item, optionIndex) {
|
|
1826
1826
|
var optionLabel = item.label || item.name;
|
|
@@ -2185,7 +2185,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2185
2185
|
var SketchPickerContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_color__WEBPACK_IMPORTED_MODULE_6__.SketchPicker, {
|
|
2186
2186
|
className: "color-sketch-picker",
|
|
2187
2187
|
key: nodeKey + "-SketchPicker",
|
|
2188
|
-
color: curJsonData
|
|
2188
|
+
color: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
2189
2189
|
onChange: this.handleValueChange
|
|
2190
2190
|
});
|
|
2191
2191
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
@@ -2226,7 +2226,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2226
2226
|
}, readOnly && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
2227
2227
|
className: "ant-input color-btn",
|
|
2228
2228
|
style: {
|
|
2229
|
-
backgroundColor: curJsonData
|
|
2229
|
+
backgroundColor: curJsonData != null ? curJsonData : targetJsonSchema.default
|
|
2230
2230
|
}
|
|
2231
2231
|
}), !readOnly && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__.Popover, {
|
|
2232
2232
|
content: SketchPickerContent,
|
|
@@ -2235,7 +2235,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2235
2235
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
2236
2236
|
className: "ant-input color-btn",
|
|
2237
2237
|
style: {
|
|
2238
|
-
backgroundColor: curJsonData
|
|
2238
|
+
backgroundColor: curJsonData != null ? curJsonData : targetJsonSchema.default
|
|
2239
2239
|
}
|
|
2240
2240
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__.Tooltip, {
|
|
2241
2241
|
title: "\u70B9\u51FB\u79FB\u9664\u5F53\u524D\u989C\u8272\u503C",
|
|
@@ -2599,7 +2599,7 @@ var DateTimeFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2599
2599
|
var timeFormat = DateTypeList[curType] || DateTypeList[0];
|
|
2600
2600
|
// 从jsonData中获取对应的数值
|
|
2601
2601
|
var curJsonData = getJSONDataByKeyRoute(keyRoute);
|
|
2602
|
-
var defaultTime = curJsonData
|
|
2602
|
+
var defaultTime = curJsonData != null ? curJsonData : targetJsonSchema.default;
|
|
2603
2603
|
var isNeedTwoCol = (0,$utils_index__WEBPACK_IMPORTED_MODULE_10__.isNeedTwoColWarpStyle)(curType); // 是否需要设置成两栏布局
|
|
2604
2604
|
|
|
2605
2605
|
var style = targetJsonSchema.style ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_10__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(targetJsonSchema.style)) : {};
|
|
@@ -3848,7 +3848,7 @@ var InputFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
3848
3848
|
disabled: readOnly,
|
|
3849
3849
|
required: isRequired,
|
|
3850
3850
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
3851
|
-
defaultValue: curJsonData
|
|
3851
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
3852
3852
|
onPressEnter: this.handleValueChange,
|
|
3853
3853
|
onBlur: this.handleValueChange
|
|
3854
3854
|
}))));
|
|
@@ -5573,7 +5573,7 @@ var RadioSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
5573
5573
|
display: 'inline-block'
|
|
5574
5574
|
},
|
|
5575
5575
|
onChange: this.handleValueChange,
|
|
5576
|
-
defaultValue: curJsonData
|
|
5576
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
5577
5577
|
disabled: targetJsonSchema.readOnly
|
|
5578
5578
|
}, options && options.length > 0 && options.map(function (item, optionIndex) {
|
|
5579
5579
|
var optionLabel = item.label || item.name;
|
|
@@ -5934,7 +5934,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
5934
5934
|
}
|
|
5935
5935
|
};
|
|
5936
5936
|
_proto.render = function render() {
|
|
5937
|
-
var _targetJsonSchema$sho, _targetJsonSchema$def, _targetJsonSchema$all;
|
|
5937
|
+
var _curJsonData, _targetJsonSchema$sho, _targetJsonSchema$def, _targetJsonSchema$all;
|
|
5938
5938
|
var _this$props2 = this.props,
|
|
5939
5939
|
schemaStore = _this$props2.schemaStore,
|
|
5940
5940
|
jsonStore = _this$props2.jsonStore;
|
|
@@ -5967,7 +5967,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
5967
5967
|
});
|
|
5968
5968
|
curJsonData = valueArray;
|
|
5969
5969
|
}
|
|
5970
|
-
var curValue = curJsonData
|
|
5970
|
+
var curValue = (_curJsonData = curJsonData) != null ? _curJsonData : targetJsonSchema.default;
|
|
5971
5971
|
if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_5__.isObject)(curValue)) {
|
|
5972
5972
|
curValue = JSON.stringify(curValue);
|
|
5973
5973
|
}
|
|
@@ -6635,7 +6635,7 @@ var TextAreaFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6635
6635
|
disabled: readOnly,
|
|
6636
6636
|
required: isRequired,
|
|
6637
6637
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
6638
|
-
defaultValue: curJsonData
|
|
6638
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
6639
6639
|
onPressEnter: this.handleValueChange,
|
|
6640
6640
|
onBlur: this.handleValueChange
|
|
6641
6641
|
}))));
|
|
@@ -6978,7 +6978,7 @@ var TimeFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6978
6978
|
targetJsonSchema = _this$props3.targetJsonSchema;
|
|
6979
6979
|
// 从jsonData中获取对应的数值
|
|
6980
6980
|
var curJsonData = getJSONDataByKeyRoute(keyRoute);
|
|
6981
|
-
var defaultTime = curJsonData
|
|
6981
|
+
var defaultTime = curJsonData != null ? curJsonData : targetJsonSchema.default;
|
|
6982
6982
|
var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
|
|
6983
6983
|
var isRequired = targetJsonSchema.isRequired || false; // 是否必填(默认非必填)
|
|
6984
6984
|
var isNeedTwoCol = (0,$utils_index__WEBPACK_IMPORTED_MODULE_10__.isNeedTwoColWarpStyle)(targetJsonSchema.type); // 是否需要设置成两栏布局
|
|
@@ -7276,7 +7276,7 @@ var URLFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
7276
7276
|
disabled: readOnly,
|
|
7277
7277
|
required: isRequired,
|
|
7278
7278
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
7279
|
-
defaultValue: curJsonData
|
|
7279
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
7280
7280
|
onPressEnter: this.handleValueChange,
|
|
7281
7281
|
onBlur: this.handleValueChange
|
|
7282
7282
|
}))));
|
package/package.json
CHANGED
package/sdk/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:26 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|