@wibetter/json-editor 5.0.20 → 5.0.21
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 +10 -12
- package/package.json +1 -1
- package/sdk/index.css +2 -2
- package/sdk/index.js +20 -13
package/lib/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.0.
|
|
2
|
+
* @wibetter/json-editor v5.0.21
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time: Tue Dec 31 2024
|
|
5
|
+
* build time: Tue Dec 31 2024 17:31:43 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.0.
|
|
2
|
+
* @wibetter/json-editor v5.0.21
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time: Tue Dec 31 2024
|
|
5
|
+
* build time: Tue Dec 31 2024 17:31:43 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -5688,16 +5688,17 @@
|
|
|
5688
5688
|
var _ref6 = schemaStore || {},
|
|
5689
5689
|
pageScreen = _ref6.pageScreen;
|
|
5690
5690
|
var _ref7 = jsonStore || {},
|
|
5691
|
-
getJSONDataByKeyRoute = _ref7.getJSONDataByKeyRoute
|
|
5691
|
+
getJSONDataByKeyRoute = _ref7.getJSONDataByKeyRoute,
|
|
5692
|
+
dynamicDataList = _ref7.dynamicDataList,
|
|
5693
|
+
dynamicDataObj = _ref7.dynamicDataObj,
|
|
5694
|
+
dynamicDataApiScopeList = _ref7.dynamicDataApiScopeList,
|
|
5695
|
+
triggerChange = _ref7.triggerChange;
|
|
5692
5696
|
var _this$props6 = this.props,
|
|
5693
5697
|
keyRoute = _this$props6.keyRoute,
|
|
5694
5698
|
jsonKey = _this$props6.jsonKey,
|
|
5695
5699
|
nodeKey = _this$props6.nodeKey,
|
|
5696
5700
|
indexRoute = _this$props6.indexRoute,
|
|
5697
|
-
targetJsonSchema = _this$props6.targetJsonSchema
|
|
5698
|
-
dynamicDataList = _this$props6.dynamicDataList,
|
|
5699
|
-
dynamicDataObj = _this$props6.dynamicDataObj,
|
|
5700
|
-
dynamicDataApiScopeList = _this$props6.dynamicDataApiScopeList;
|
|
5701
|
+
targetJsonSchema = _this$props6.targetJsonSchema;
|
|
5701
5702
|
var isShowFilter = this.state.isShowFilter;
|
|
5702
5703
|
var curType = targetJsonSchema.type;
|
|
5703
5704
|
// 从jsonData中获取对应的数值
|
|
@@ -5751,12 +5752,9 @@
|
|
|
5751
5752
|
return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1__.createElement(
|
|
5752
5753
|
'div',
|
|
5753
5754
|
{
|
|
5754
|
-
|
|
5755
|
-
className:
|
|
5756
|
-
pageScreen === 'wideScreen'
|
|
5757
|
-
? 'dynamic-data-schema wide-screen-element-warp'
|
|
5758
|
-
: 'dynamic-data-schema mobile-screen-element-warp',
|
|
5755
|
+
className: 'mobile-screen-element-warp dynamic-data-schema',
|
|
5759
5756
|
// key={nodeKey}
|
|
5757
|
+
key: nodeKey + '-' + triggerChange,
|
|
5760
5758
|
id: nodeKey,
|
|
5761
5759
|
style: style,
|
|
5762
5760
|
},
|
package/package.json
CHANGED
package/sdk/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.0.
|
|
2
|
+
* @wibetter/json-editor v5.0.21
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time: Tue Dec 31 2024
|
|
5
|
+
* build time: Tue Dec 31 2024 17:32:00 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
package/sdk/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.0.
|
|
2
|
+
* @wibetter/json-editor v5.0.21
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time: Tue Dec 31 2024
|
|
5
|
+
* build time: Tue Dec 31 2024 17:32:00 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -105095,16 +105095,17 @@ styles.join("\\n")
|
|
|
105095
105095
|
var _ref6 = schemaStore || {},
|
|
105096
105096
|
pageScreen = _ref6.pageScreen;
|
|
105097
105097
|
var _ref7 = jsonStore || {},
|
|
105098
|
-
getJSONDataByKeyRoute = _ref7.getJSONDataByKeyRoute
|
|
105098
|
+
getJSONDataByKeyRoute = _ref7.getJSONDataByKeyRoute,
|
|
105099
|
+
dynamicDataList = _ref7.dynamicDataList,
|
|
105100
|
+
dynamicDataObj = _ref7.dynamicDataObj,
|
|
105101
|
+
dynamicDataApiScopeList = _ref7.dynamicDataApiScopeList,
|
|
105102
|
+
triggerChange = _ref7.triggerChange;
|
|
105099
105103
|
var _this$props6 = this.props,
|
|
105100
105104
|
keyRoute = _this$props6.keyRoute,
|
|
105101
105105
|
jsonKey = _this$props6.jsonKey,
|
|
105102
105106
|
nodeKey = _this$props6.nodeKey,
|
|
105103
105107
|
indexRoute = _this$props6.indexRoute,
|
|
105104
|
-
targetJsonSchema = _this$props6.targetJsonSchema
|
|
105105
|
-
dynamicDataList = _this$props6.dynamicDataList,
|
|
105106
|
-
dynamicDataObj = _this$props6.dynamicDataObj,
|
|
105107
|
-
dynamicDataApiScopeList = _this$props6.dynamicDataApiScopeList;
|
|
105108
|
+
targetJsonSchema = _this$props6.targetJsonSchema;
|
|
105108
105109
|
var isShowFilter = this.state.isShowFilter;
|
|
105109
105110
|
var curType = targetJsonSchema.type;
|
|
105110
105111
|
// 从jsonData中获取对应的数值
|
|
@@ -105158,12 +105159,9 @@ styles.join("\\n")
|
|
|
105158
105159
|
return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1__.createElement(
|
|
105159
105160
|
'div',
|
|
105160
105161
|
{
|
|
105161
|
-
|
|
105162
|
-
className:
|
|
105163
|
-
pageScreen === 'wideScreen'
|
|
105164
|
-
? 'dynamic-data-schema wide-screen-element-warp'
|
|
105165
|
-
: 'dynamic-data-schema mobile-screen-element-warp',
|
|
105162
|
+
className: 'mobile-screen-element-warp dynamic-data-schema',
|
|
105166
105163
|
// key={nodeKey}
|
|
105164
|
+
key: nodeKey + '-' + triggerChange,
|
|
105167
105165
|
id: nodeKey,
|
|
105168
105166
|
style: style,
|
|
105169
105167
|
},
|
|
@@ -382089,6 +382087,14 @@ and limitations under the License.
|
|
|
382089
382087
|
* jsonData: json数据对象,会优先使用此jsonData对应的数值
|
|
382090
382088
|
* */
|
|
382091
382089
|
|
|
382090
|
+
// 用于区分 对象 和 数组 类型
|
|
382091
|
+
function isEqualByType(value1, value2) {
|
|
382092
|
+
return (
|
|
382093
|
+
isObject$1(value1) + '-' + isArray(value1) ===
|
|
382094
|
+
isObject$1(value2) + '-' + isArray(value2)
|
|
382095
|
+
);
|
|
382096
|
+
}
|
|
382097
|
+
|
|
382092
382098
|
/**
|
|
382093
382099
|
* 基础类型的schema转jsonData
|
|
382094
382100
|
* 根据jsonSchema和旧版的jsonData生成一份对应的jsonData
|
|
@@ -382100,7 +382106,8 @@ and limitations under the License.
|
|
|
382100
382106
|
if (
|
|
382101
382107
|
hasProperties(oldValue) &&
|
|
382102
382108
|
hasProperties(jsonSchema.default) &&
|
|
382103
|
-
typeof oldValue !== typeof jsonSchema.default
|
|
382109
|
+
(typeof oldValue !== typeof jsonSchema.default ||
|
|
382110
|
+
!isEqualByType(oldValue, jsonSchema.default))
|
|
382104
382111
|
) {
|
|
382105
382112
|
// 表示当前数据类型发生变化,则丢弃旧版数据
|
|
382106
382113
|
oldValue = undefined;
|