@wibetter/json-editor 3.5.11 → 5.0.0
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/README.md +2 -1
- package/lib/index.css +7 -0
- package/lib/index.js +2 -0
- package/lib/index.js.LICENSE.txt +7 -0
- package/package.json +16 -16
- package/dist/index.css +0 -7
- package/dist/index.umd.js +0 -328
- package/public/css/base.css +0 -283
- package/public/css/text-editor.min.css +0 -1
- package/public/img/loadding.gif +0 -0
- package/public/scripts/app/bluebird.js +0 -5619
- package/public/scripts/app/flexible.js +0 -1
- package/public/scripts/app/scrollToBottom.js +0 -72
- package/public/scripts/app/visibility.js +0 -345
- package/public/scripts/lib/jquery.11.3.min.js +0 -6
- package/public/scss/text-editor.scss +0 -130
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@ codearea、htmlarea、text-editor([使用说明](https://github.com/wibetter/jso
|
|
|
16
16
|
5. 支持json转schema能力,当schemaData为空而jsonData不为空时,自动通过json转换一个对应的schemaData
|
|
17
17
|
|
|
18
18
|
在线Demo:
|
|
19
|
-
[点击访问在线
|
|
19
|
+
[点击访问在线Demo1](https://wibetter.github.io/json-editor/demo/demo1/index.html)
|
|
20
|
+
[点击访问在线Demo2](https://wibetter.github.io/json-editor/demo/demo2/index.html)
|
|
20
21
|
|
|
21
22
|
JSONEditor效果图:
|
|
22
23
|

|
package/lib/index.css
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @wibetter/json-editor v5.0.0
|
|
3
|
+
* author: wibetter
|
|
4
|
+
* build tool: AKFun
|
|
5
|
+
* build time: Thu Aug 15 2024 15:08:26 GMT+0800 (China Standard Time)
|
|
6
|
+
* build tool info: https://github.com/wibetter/akfun
|
|
7
|
+
*/.json-view-box{position:relative}.json-view-box .json-view-ace{width:100%}.json-view-box .readOnly-btn{color:#ad6800;position:absolute;right:8px;top:0;z-index:100}.object-schema-warp .object-content.json-view-array{padding:0;-webkit-transition:.4s;transition:.4s}.object-schema-warp .object-content.closed{height:0;overflow:hidden;padding:0}.array-schema-box{border:1px solid rgba(0,0,0,.1);border-radius:5px 5px 0 0;margin-bottom:12px}.array-schema-box>.element-title{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background-color:#fff;border-radius:5px 5px 0 0;color:#232321;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:PingFangSC-Regular;font-size:14px;line-height:38px;padding-left:15px}.array-schema-box>.element-title .array-add-child-btn{display:inline-block;float:right;line-height:0;margin:12px 12px 0 0}.array-schema-box>.element-title .array-add-child-btn:hover{color:#1890ff}.array-schema-box .array-content{background-color:#fafafa;position:relative;-webkit-transition:.4s;transition:.4s}.array-schema-box .array-content>.array-item{border-bottom:1px solid #e5e7f0}.array-schema-box .array-content>.array-item .array-item-header{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-moz-box-orient:horizontal;-moz-box-direction:normal;-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#f5f6fa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#232321;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-family:PingFangSC-Regular;font-size:14px;height:40px;-webkit-justify-content:space-between;justify-content:space-between;line-height:40px;padding:0 12px 0 15px;width:100%}.array-schema-box .array-content>.array-item .array-item-header .array-title-text{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%}.array-schema-box .array-content>.array-item .array-item-header .array-operate-box{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 0 120px;-ms-flex:0 0 120px;flex:0 0 120px;text-align:right;-webkit-transition:all .2s ease;transition:all .2s ease;visibility:hidden}.array-schema-box .array-content>.array-item .array-item-header .array-operate-box .array-operate-btn{cursor:pointer;float:right;height:16px;margin-left:8px}.array-schema-box .array-content>.array-item .array-item-header .array-operate-box .close-operate-btn,.array-schema-box .array-content>.array-item .array-item-header:hover .array-operate-box{visibility:visible}.array-schema-box .array-content>.array-item .array-item-content{background-color:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:12px 15px;position:relative;-webkit-transition:all .2s ease;transition:all .2s ease;width:100%}.array-schema-box .array-content>.array-item .array-item-content.closed{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:0;padding:0}.array-schema-box .array-content>.array-item .array-item-content.open{height:auto}.array-schema-box .array-content>.array-item:last-child{border-bottom:none}.array-schema-box .array-content.json-view-array{padding:0;-webkit-transition:.4s;transition:.4s}.array-schema-box .array-content.closed{height:0;overflow:hidden;padding:0}.mobile-screen-view .array-title-text{max-width:160px}.url-editor-box{display:inline-block;position:relative}.url-editor-box .filter-url-btn{position:absolute;right:-28px;top:9px;z-index:100}.url-editor-box .filter-url-btn svg{color:#595959;cursor:pointer;height:20px;width:20px}.url-editor-box .filter-url-btn svg:hover{color:#1890ff}.ace-editor-box{position:relative}.ace-editor-box .filter-btn{position:absolute;right:6px;top:6px;z-index:100}.ace-editor-box .filter-btn svg{color:#595959;cursor:pointer;height:20px;width:20px}.ace-editor-box .filter-btn svg:hover{color:#1890ff}.remote-dynamic-data-schema{position:relative;-webkit-transition:.4s;transition:.4s}.remote-dynamic-data-schema .data-route-select,.remote-dynamic-data-schema .dynamic-data-select{display:block;width:100%}.remote-dynamic-data-schema .warning-text{color:#fa8c16}.remote-dynamic-data-schema .filter-func-box{padding:0}.remote-dynamic-data-schema.json-view{padding:0;-webkit-transition:.4s;transition:.4s}.remote-dynamic-data-schema.closed{height:0;overflow:hidden;padding:0}.dynamic-data-schema{position:relative;-webkit-transition:.4s;transition:.4s}.dynamic-data-schema .dynamic-data-tab-radio-box{display:block;position:relative;text-align:center;z-index:10}.dynamic-data-schema .dynamic-data-tab-radio-box .dynamic-data-tab-radio{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background-color:#fff;border:1px solid #1890ff;border-radius:18px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:30px;line-height:30px;margin:0 auto!important;position:relative;top:15px}.dynamic-data-schema .dynamic-data-tab-radio-box .dynamic-data-tab-radio .tab-radio{-webkit-box-flex:1;-moz-box-flex:1;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex:1 1 120px;-ms-flex:1 1 120px;flex:1 1 120px;height:28px;-webkit-justify-content:center;justify-content:center;line-height:28px;padding:0 12px}.dynamic-data-schema .dynamic-data-tab-radio-box .dynamic-data-tab-radio .tab-radio-active{background-color:#1890ff;border-radius:18px;color:#fff}.dynamic-data-schema .dynamic-dat-tabPane{display:none;-webkit-transition:.4s;transition:.4s}.dynamic-data-schema .dynamic-dat-tabPane-active{display:block}.dynamic-data-schema .data-route-select,.dynamic-data-schema .dynamic-data-select{display:block;width:100%}.dynamic-data-schema .warning-text{color:#fa8c16}.dynamic-data-schema .json-form-box{border:1px solid #81d3f8;border-radius:15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:25px 15px 10px;position:relative}.dynamic-data-schema .json-form-box .filter-btn{position:absolute;right:35px;top:75px;z-index:100}.dynamic-data-schema .json-form-box .filter-btn svg{color:#595959;cursor:pointer;height:20px;width:20px}.dynamic-data-schema .json-form-box .filter-btn svg:hover{color:#1890ff}.dynamic-data-schema .filter-func-box{padding:0}.dynamic-data-schema.json-view{padding:0;-webkit-transition:.4s;transition:.4s}.dynamic-data-schema.closed{height:0;overflow:hidden;padding:0}.data-operate-btn{color:#8c8c8c;cursor:pointer}.data-operate-btn svg{height:20px;width:20px}.layout-box-style-container{background-color:#fff;border:1px solid #e5e7f0;border-radius:10px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:220px;position:relative;width:220px}.layout-box-style-container>.center-box{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background-color:#f5f6fa;border-radius:4px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:70px;-webkit-justify-content:center;justify-content:center;left:75px;position:absolute;top:75px;width:70px}.layout-box-style-container>.center-box>.lock-icon{-webkit-box-shadow:none;box-shadow:none;cursor:pointer;width:32px}.layout-box-style-container .layout-input-number{border-width:0 0 1px;margin-left:6px;text-align:right;width:100px}.layout-box-style-container .layout-item{height:40px;line-height:40px;margin:0;position:relative;width:50px}.layout-box-style-container .layout-item .ant-input-number-input{color:#bec2c6;font-family:PingFangSC-Regular;font-size:14px;height:40px;line-height:40px}.layout-box-style-container .px-quantity-box:after{color:#232321;content:"px";position:absolute;right:0;top:0}.layout-box-style-container .rem-quantity-box:after{color:#232321;content:"rem";position:absolute;right:0;top:0}.layout-box-style-container .em-quantity-box:after{color:#232321;content:"em";position:absolute;right:0;top:0}.layout-box-style-container .percent-quantity-box:after{color:#232321;content:"%";position:absolute;right:0;top:0}.layout-box-style-container>.layout-item-top{left:85px;position:absolute;top:15px}.layout-box-style-container>.layout-item-right{position:absolute;right:15px;top:85px}.layout-box-style-container>.layout-item-bottom{bottom:15px;left:85px;position:absolute}.layout-box-style-container>.layout-item-left{left:15px;position:absolute;top:85px}.text-editor-box{position:relative}.text-editor-box .element-title{cursor:pointer}.text-editor-box .element-title>.close-operate-btn{margin-right:0!important}.text-editor-box .content-item{border:1px solid rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.text-editor-box .content-item .bf-container{width:100%}.text-editor-box .content-item .bf-container.fullscreen{height:auto!important}.text-editor-box .content-item .bf-container.fullscreen .bf-content{max-height:inherit}.text-editor-box .content-item .bf-controlbar .bf-font-size-dropdown,.text-editor-box .content-item .bf-controlbar .bf-letter-spacing-dropdown,.text-editor-box .content-item .bf-controlbar .headings-dropdown{min-width:65px}.text-editor-box .content-item .bf-controlbar .braft-color-picker input,.text-editor-box .content-item .bf-controlbar .braft-color-picker label{height:30px!important;padding:0!important;text-align:center!important}.text-editor-box .content-item .bf-content{font-size:16px;height:auto;max-height:300px;overflow:auto;padding-bottom:10px}.text-editor-box .content-item.closed{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;height:46px;overflow:hidden;padding:0}.text-editor-box table{border-left:1px solid #f0f0f0;border-top:1px solid #f0f0f0}.text-editor-box table td{border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;padding:5px 8px;-webkit-transition:background .3s;transition:background .3s}.text-editor-box .bf-content *{line-height:inherit}.input-number-wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-moz-box-orient:horizontal;-moz-box-direction:normal;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-align-items:center;align-items:center;background:#fff;border:1px solid #dcdfe6;border-radius:16px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:32px;-webkit-justify-content:flex-start;justify-content:flex-start;margin-right:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:141px}.input-number-wrap .number-cont{-webkit-box-flex:1;-moz-box-flex:1;border-left:1px solid #e6e9f2;border-right:1px solid #e6e9f2;-webkit-flex:1;-ms-flex:1;flex:1}.input-number-wrap .number-cont input{text-align:center}.input-number-wrap .number-btn{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#a1a6b3;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex:0 0 36px;-ms-flex:0 0 36px;flex:0 0 36px;font-size:16px;height:32px;-webkit-justify-content:center;justify-content:center}.input-number-wrap .number-btn:hover{background-color:#1890ff;border:1px solid #e6e9f2;color:#fff}.input-number-wrap .plus{border-radius:0 16px 16px 0}.input-number-wrap .plus:hover{border-left:none}.input-number-wrap .minus{border-radius:16px 0 0 16px}.input-number-wrap .minus:hover{border-right:none}.form-item-box .ant-input-number-handler-wrap{display:none}.content-item>.form-item-box{position:relative}.content-item>.form-item-box .color-item-form{width:60px}.content-item>.form-item-box .color-btn-wrap{-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;border:1px solid rgba(0,0,0,.15);border-radius:4px;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:30px;-webkit-justify-content:space-between;justify-content:space-between;padding:5px;-webkit-transition:.3s;transition:.3s;width:60px}.content-item>.form-item-box .color-btn-wrap .color-btn{height:18px;width:18px}.content-item>.form-item-box .color-btn-wrap .delete-bgColor-btn{visibility:hidden}.content-item>.form-item-box .color-btn-wrap .delete-bgColor-btn svg{height:18px}.content-item>.form-item-box .color-btn-wrap .delete-bgColor-btn:hover{color:red}.content-item>.form-item-box .color-btn-wrap .delete-bgColor-btn:hover,.content-item>.form-item-box .color-btn-wrap:hover .delete-bgColor-btn{visibility:visible}.content-item>.form-item-box .color-picker-container{left:-65px;position:absolute;top:40px;z-index:20}.content-item>.form-item-box .color-picker-container .color-sketch-picker{background-color:#fff;left:0;position:absolute;top:0;z-index:2000}.content-item>.form-item-box .color-picker-container .color-picker-bg{background-color:rgba(0,0,0,.35);bottom:0;left:0;position:fixed;right:0;top:0;z-index:1999}.single-select-box .ant-select-single{min-width:150px}.tabs-schema-box .ant-tabs-tab:nth-last-child(2){margin-right:0!important}.json-editor-container{padding:8px 10px;position:relative}.json-editor-container .mobile-screen-element-warp,.json-editor-container .small-screen-element-warp{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;line-height:38px;margin-bottom:12px;position:relative}.json-editor-container .mobile-screen-element-warp>.element-title,.json-editor-container .small-screen-element-warp>.element-title{display:block;line-height:38px;margin-right:12px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.json-editor-container .mobile-screen-element-warp>.content-item,.json-editor-container .small-screen-element-warp>.content-item{position:relative}.json-editor-container .mobile-screen-element-warp>.content-item>.form-item-box>.ant-picker,.json-editor-container .mobile-screen-element-warp>.content-item>.form-item-box>input,.json-editor-container .mobile-screen-element-warp>.content-item>.form-item-box>textarea,.json-editor-container .small-screen-element-warp>.content-item>.form-item-box>.ant-picker,.json-editor-container .small-screen-element-warp>.content-item>.form-item-box>input,.json-editor-container .small-screen-element-warp>.content-item>.form-item-box>textarea{border-radius:16px}.json-editor-container .mobile-screen-element-warp>.content-item>.form-item-box>.ant-input-group-wrapper input,.json-editor-container .small-screen-element-warp>.content-item>.form-item-box>.ant-input-group-wrapper input{border-radius:16px 0 0 16px}.json-editor-container .mobile-screen-element-warp>.content-item>.form-item-box>.ant-input-group-wrapper .ant-input-group-addon,.json-editor-container .small-screen-element-warp>.content-item>.form-item-box>.ant-input-group-wrapper .ant-input-group-addon{background-color:#1890ff;border-radius:0 16px 16px 0;color:#fff}.json-editor-container .wide-screen-element-warp{-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:start;-moz-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-justify-content:flex-start;justify-content:flex-start;line-height:38px;margin-bottom:12px;min-width:380px;position:relative}.json-editor-container .wide-screen-element-warp>.element-title{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 120px;-ms-flex:0 1 120px;flex:0 1 120px;line-height:38px;margin-right:12px;max-width:120px;overflow:hidden;padding-left:12px;text-align:right;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.json-editor-container .wide-screen-element-warp>.content-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px}.json-editor-container .two-col-element-warp{-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:start;-moz-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start}.json-editor-container .two-col-element-warp>.element-title{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 85px;-ms-flex:0 1 85px;flex:0 1 85px;margin-right:7px;max-width:120px;min-width:60px;overflow:hidden;padding-left:0;text-align:left;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.json-editor-container .two-col-element-warp>.content-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px}.json-editor-container .element-title-card-warp{display:block}.json-editor-container .element-title-card-warp>.element-title{background-color:#fafafa;border:1px solid rgba(0,0,0,.1);border-bottom:none;border-radius:5px 5px 0 0;cursor:pointer;padding-left:12px;text-align:left}.json-editor-container .wide-screen-element-warp.container-warp{-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:start;-moz-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;line-height:38px;margin-bottom:12px;min-width:380px;position:relative}.json-editor-container .wide-screen-element-warp.container-warp>.element-title{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 120px;-ms-flex:0 1 120px;flex:0 1 120px;line-height:38px;margin-right:12px;max-width:120px;overflow:hidden;padding-left:12px;text-align:right;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.json-editor-container .wide-screen-element-warp.container-warp>.content-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px}.json-editor-container .object-content{border:1px solid rgba(0,0,0,.1);display:block;height:auto;padding:8px 15px 20px;position:relative;-webkit-transition:.4s;transition:.4s}.json-editor-container .element-title{display:block;width:100%}.json-editor-container .element-title .warning-text{color:#fa8c16}.json-editor-container .element-title .add-operate-btn,.json-editor-container .element-title .close-operate-btn,.json-editor-container .element-title .display-source-btn{display:inline-block;float:right;line-height:0;margin:9px 12px 0 0}.json-editor-container .element-title .add-operate-btn:hover{color:#1890ff}.json-editor-container .element-title .display-source-btn{cursor:pointer}.json-editor-container .element-title .display-source-btn svg{color:#676767;width:20px}.json-editor-container .element-title .display-source-btn svg:hover{color:#1890ff}.json-editor-container .element-title .close-operate-btn{color:#8c8c8c}.json-editor-container .element-title .close-operate-btn svg{height:14px;margin-top:4px;width:14px}.json-editor-container .element-title .info-icon{cursor:pointer;margin-left:5px}.json-editor-container .code-area-item{min-width:230px}.json-editor-container .warning-box{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-moz-box-orient:horizontal;-moz-box-direction:normal;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-ms-flex-align:center;background-color:#feeceb;color:red;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:12px;-webkit-justify-content:flex-start;justify-content:flex-start;padding:8px 0;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0,1,.5,1);transition-timing-function:cubic-bezier(0,1,.5,1);width:100%}.json-editor-container .warning-box,.json-editor-container .warning-box .warning-img{-webkit-box-align:center;-moz-box-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.json-editor-container .warning-box .warning-img{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-ms-flex-align:center;-webkit-flex:0 1 60px;-ms-flex:0 1 60px;flex:0 1 60px;-webkit-justify-content:center;justify-content:center}.json-editor-container .warning-box .warning-text{-webkit-box-flex:1;-moz-box-flex:1;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex:1 1 160px;-ms-flex:1 1 160px;flex:1 1 160px;-webkit-justify-content:flex-start;justify-content:flex-start}.json-editor-container .json-editor-empty{height:50px;line-height:50px;position:relative}.json-editor-container .ant-tabs{overflow:visible}.json-editor-container .ant-collapse-borderless{background-color:#fff;border:0}.json-editor-container .ant-collapse-content-active{border-top:1px solid #f0f0f0!important}.json-editor-container .ant-collapse-content{padding:10px 0 20px}.json-editor-container .form-item-box{-webkit-box-pack:stretch;-moz-box-pack:stretch;-ms-flex-pack:stretch;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:stretch;justify-content:stretch;min-height:38px}.json-editor-container .ant-collapse-borderless>.ant-collapse-item:last-child{border-bottom:none}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,(function(){return function(){var __webpack_modules__={560:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(820),_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(15),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),mobx_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(20),mobx_react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(mobx_react__WEBPACK_IMPORTED_MODULE_2__),prop_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(825),prop_types__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__),antd__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(375),antd__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_4__),react_ace__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(813),react_ace__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(react_ace__WEBPACK_IMPORTED_MODULE_5__),ace_builds_src_noconflict_mode_javascript__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(426),ace_builds_src_noconflict_mode_javascript__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(ace_builds_src_noconflict_mode_javascript__WEBPACK_IMPORTED_MODULE_6__),ace_builds_src_noconflict_theme_monokai__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(953),ace_builds_src_noconflict_theme_monokai__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(ace_builds_src_noconflict_theme_monokai__WEBPACK_IMPORTED_MODULE_7__),$utils_typeof__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(960),$mixins_index__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(438),_ant_design_icons__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(347),_ant_design_icons__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_ant_design_icons__WEBPACK_IMPORTED_MODULE_10__),CodeAreaFormSchema=function(_React$PureComponent){function CodeAreaFormSchema(e){var t;return(t=_React$PureComponent.call(this,e)||this).handleValueChange=function(e){var a=t.props,n=a.keyRoute;(0,a.updateFormValueData)(n,e)},t.state={isShowWarn:!1,warnText:""},t.handleValueChange=t.handleValueChange.bind(t),t}_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_0___default()(CodeAreaFormSchema,_React$PureComponent);var _proto=CodeAreaFormSchema.prototype;return _proto.componentWillMount=function(){$mixins_index__WEBPACK_IMPORTED_MODULE_9__.x.call(this)},_proto.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&$mixins_index__WEBPACK_IMPORTED_MODULE_9__.x.call(this,e.keyRoute)},_proto.render=function render(){var _this2=this,_this$props2=this.props,isReadOnly=_this$props2.isReadOnly,isIgnoreWarn=_this$props2.isIgnoreWarn,nodeKey=_this$props2.nodeKey,keyRoute=_this$props2.keyRoute,targetJsonSchema=_this$props2.targetJsonSchema,pageScreen=_this$props2.pageScreen,getJSONDataByKeyRoute=_this$props2.getJSONDataByKeyRoute,_this$state=this.state,isShowWarn=_this$state.isShowWarn,warnText=_this$state.warnText,readOnly=isReadOnly||targetJsonSchema.readOnly||!1,curJsonData=getJSONDataByKeyRoute(keyRoute);return curJsonData=void 0!==curJsonData?curJsonData:targetJsonSchema.default||"() => {}",(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_8__.Gv)(curJsonData)&&(curJsonData=JSON.stringify(curJsonData,null,2)),react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"wideScreen"===pageScreen?"wide-screen-element-warp container-warp":"mobile-screen-element-warp",key:nodeKey,id:nodeKey},react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"element-title"},react__WEBPACK_IMPORTED_MODULE_1__.createElement("span",{className:"title-text warning-text"},readOnly?"[只读]":""),react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__.Tooltip,{title:"wideScreen"===pageScreen?targetJsonSchema.description:"",placement:"top"},react__WEBPACK_IMPORTED_MODULE_1__.createElement("span",{className:"title-text",title:"wideScreen"===pageScreen&&targetJsonSchema.title&&targetJsonSchema.title.length>(readOnly?4:6)?targetJsonSchema.title:""},targetJsonSchema.title)),"mobileScreen"===pageScreen&&targetJsonSchema.description&&react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__.Tooltip,{title:targetJsonSchema.description,placement:"top"},react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_10__.InfoCircleOutlined,{className:"info-icon"}))),react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"content-item"},!isIgnoreWarn&&isShowWarn&&react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"warning-box code-area-item"},react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"warning-img"},"X"),react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"warning-text"},warnText)),react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_ace__WEBPACK_IMPORTED_MODULE_5___default(),{id:"code_area_ace",key:nodeKey+"-ace",className:"code-area-item",value:curJsonData,mode:"javascript",theme:"monokai",name:"JS_CODE_EDIT",fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,readOnly:readOnly,minLines:5,maxLines:30,width:"100%",onChange:function onChange(newJsonData){try{eval(newJsonData),_this2.handleValueChange(newJsonData),_this2.setState({isShowWarn:!1})}catch(e){_this2.handleValueChange(newJsonData),_this2.setState({warnText:e.message,isShowWarn:!0})}},setOptions:{useWorker:!1,showLineNumbers:!0,tabSize:2}})))},CodeAreaFormSchema}(react__WEBPACK_IMPORTED_MODULE_1__.PureComponent);CodeAreaFormSchema.propTypes={isIgnoreWarn:prop_types__WEBPACK_IMPORTED_MODULE_3___default().any,isReadOnly:prop_types__WEBPACK_IMPORTED_MODULE_3___default().any,parentType:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string,jsonKey:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string,indexRoute:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string,keyRoute:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string,nodeKey:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string,targetJsonSchema:prop_types__WEBPACK_IMPORTED_MODULE_3___default().any},__webpack_exports__.A=(0,mobx_react__WEBPACK_IMPORTED_MODULE_2__.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,mobx_react__WEBPACK_IMPORTED_MODULE_2__.observer)(CodeAreaFormSchema))},438:function(e,t,a){"use strict";a.d(t,{x:function(){return o}});var n=a(585),r=a(85);function o(e){var t=this.props,a=t.targetJsonSchema,o=t.getJSONDataByKeyRoute,i=t.getJSONDataTempByKeyRoute,l=t.updateFormValueData,c=(0,r.getCurrentFormat)(a),s=e||this.props.keyRoute,u=(0,n.TA)(s+"-"+c);if(u){var p=o(u);p||(p=i(u)),p&&((0,n.CP)(s+"-"+c),l(s,p))}}},585:function(e,t,a){"use strict";function n(e){var t=JSON.stringify(e);return JSON.parse(t)}function r(e,t){return JSON.stringify(e)===JSON.stringify(t)}function o(e){var t=!1;return null!=e&&(t=!0),t}function i(e){var t=!1;return"boolean"!==e&&"date"!==e&&"date-time"!==e&&"time"!==e&&"number"!==e&&"color"!==e&&"quantity"!==e&&"single-select"!==e||(t=!0),t}function l(e){if(window.sessionStorage)return window.sessionStorage.getItem(e)}function c(e){if(window.sessionStorage)return window.sessionStorage.removeItem(e)}a.d(t,{CP:function(){return c},TA:function(){return l},bQ:function(){return n},jI:function(){return o},n4:function(){return r},y8:function(){return i}})},960:function(e,t,a){"use strict";function n(e){return/^http[s]?:\/\/.*/.test(e)}function r(e){return"String"===Object.prototype.toString.call(e).slice(8,-1)}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function i(e){var t=!1;return"Array"===Object.prototype.toString.call(e).slice(8,-1)&&(t=!0),t}function l(e){var t=!1;return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&(t=!0),t}function c(e){return/^#[0-9a-f]{3,6}$/.test(e)}function s(e){var t=!1;return"Function"===Object.prototype.toString.call(e).slice(8,-1)&&(t=!0),t}a.d(t,{Et:function(){return o},Gv:function(){return l},Kg:function(){return r},Tn:function(){return s},_o:function(){return c},cy:function(){return i},mv:function(){return n}}),a(85)},731:function(){},488:function(){},723:function(){},112:function(){},231:function(){},986:function(){},650:function(){},13:function(){},121:function(){},349:function(){},790:function(){},107:function(){},536:function(){},747:function(e,t,a){var n=a(731);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("6c26c2f0",n,!1,{sourceMap:!1})},96:function(e,t,a){var n=a(488);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("383d0c69",n,!1,{sourceMap:!1})},539:function(e,t,a){var n=a(723);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("586aaf1e",n,!1,{sourceMap:!1})},171:function(e,t,a){var n=a(112);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("7c59334a",n,!1,{sourceMap:!1})},543:function(e,t,a){var n=a(231);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("2d16a6dc",n,!1,{sourceMap:!1})},930:function(e,t,a){var n=a(986);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("07a9f69e",n,!1,{sourceMap:!1})},794:function(e,t,a){var n=a(650);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("ff1626ba",n,!1,{sourceMap:!1})},597:function(e,t,a){var n=a(13);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("32cbf902",n,!1,{sourceMap:!1})},241:function(e,t,a){var n=a(121);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("0bfe5e30",n,!1,{sourceMap:!1})},125:function(e,t,a){var n=a(349);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("02a91202",n,!1,{sourceMap:!1})},102:function(e,t,a){var n=a(790);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("98d6b62a",n,!1,{sourceMap:!1})},184:function(e,t,a){var n=a(107);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("4293a156",n,!1,{sourceMap:!1})},920:function(e,t,a){var n=a(536);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,a(534).A)("d5afae6c",n,!1,{sourceMap:!1})},534:function(e,t,a){"use strict";function n(e,t){for(var a=[],n={},r=0;r<t.length;r++){var o=t[r],i=o[0],l={id:e+":"+r,css:o[1],media:o[2],sourceMap:o[3]};n[i]?n[i].parts.push(l):a.push(n[i]={id:i,parts:[l]})}return a}a.d(t,{A:function(){return y}});var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},i=r&&(document.head||document.getElementsByTagName("head")[0]),l=null,c=0,s=!1,u=function(){},p=null,m="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function y(e,t,a,r){s=a,p=r||{};var i=n(e,t);return h(i),function(t){for(var a=[],r=0;r<i.length;r++){var l=i[r];(c=o[l.id]).refs--,a.push(c)}for(t?h(i=n(e,t)):i=[],r=0;r<a.length;r++){var c;if(0===(c=a[r]).refs){for(var s=0;s<c.parts.length;s++)c.parts[s]();delete o[c.id]}}}}function h(e){for(var t=0;t<e.length;t++){var a=e[t],n=o[a.id];if(n){n.refs++;for(var r=0;r<n.parts.length;r++)n.parts[r](a.parts[r]);for(;r<a.parts.length;r++)n.parts.push(S(a.parts[r]));n.parts.length>a.parts.length&&(n.parts.length=a.parts.length)}else{var i=[];for(r=0;r<a.parts.length;r++)i.push(S(a.parts[r]));o[a.id]={id:a.id,refs:1,parts:i}}}}function g(){var e=document.createElement("style");return e.type="text/css",i.appendChild(e),e}function S(e){var t,a,n=document.querySelector("style["+m+'~="'+e.id+'"]');if(n){if(s)return u;n.parentNode.removeChild(n)}if(d){var r=c++;n=l||(l=g()),t=O.bind(null,n,r,!1),a=O.bind(null,n,r,!0)}else n=g(),t=E.bind(null,n),a=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else a()}}var _,f=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function O(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=f(t,r);else{var o=document.createTextNode(r),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function E(e,t){var a=t.css,n=t.media,r=t.sourceMap;if(n&&e.setAttribute("media",n),p.ssrId&&e.setAttribute(m,t.id),r&&(a+="\n/*# sourceURL="+r.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}},347:function(e){"use strict";e.exports=require("@ant-design/icons")},820:function(e){"use strict";e.exports=require("@babel/runtime/helpers/inheritsLoose")},85:function(e){"use strict";e.exports=require("@wibetter/json-utils")},426:function(e){"use strict";e.exports=require("ace-builds/src-noconflict/mode-javascript")},953:function(e){"use strict";e.exports=require("ace-builds/src-noconflict/theme-monokai")},375:function(e){"use strict";e.exports=require("antd")},20:function(e){"use strict";e.exports=require("mobx-react")},825:function(e){"use strict";e.exports=require("prop-types")},15:function(e){"use strict";e.exports=require("react")},813:function(e){"use strict";e.exports=require("react-ace")}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var a=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e](a,a.exports,__webpack_require__),a.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return Jt}});var e,t,a,n,r,o,i,l,c,s,u,p,m,d,y,h,g,S,_,f,O,E,b,v,N,D,R,w,J,k,C,x,K=__webpack_require__(820),j=__webpack_require__.n(K),T=__webpack_require__(15),P=__webpack_require__.n(T),B=require("react-dom"),M=__webpack_require__.n(B),V=__webpack_require__(20),A=__webpack_require__(825),L=__webpack_require__.n(A),I=require("@babel/runtime/helpers/initializerDefineProperty"),q=__webpack_require__.n(I),W=require("@babel/runtime/helpers/createClass"),F=__webpack_require__.n(W),U=require("@babel/runtime/helpers/applyDecoratedDescriptor"),z=__webpack_require__.n(U),H=(require("@babel/runtime/helpers/initializerWarningHelper"),require("mobx")),$=__webpack_require__(85),G=$.TypeDataList.jsonschema,Z=(e=H.action.bound,t=H.action.bound,a=H.action.bound,n=H.action.bound,r=H.action.bound,o=H.action.bound,i=H.action.bound,l=function(){function e(e){q()(this,"pageScreen",c,this),q()(this,"jsonSchema",s,this),this.state={rootJSONStore:e}}var t=e.prototype;return t.setPageScreen=function(e){this.pageScreen="wideScreen"===e||e?"wideScreen":"mobileScreen"},t.initJSONSchemaData=function(e){if(e&&"{}"!==JSON.stringify(e)){if(!(0,$.isEqual)(e,this.JSONSchemaObj))if(e&&(0,$.isNewSchemaData)(e))this.jsonSchema=e;else{var t=(0,$.oldSchemaToNewSchema)(e);this.jsonSchema=t}}else this.jsonSchema=(0,$.objClone)(G)},t.JSONSchemaChange=function(e){if(!(0,$.isEqual)(e,this.JSONSchemaObj)){if(e&&"{}"!==JSON.stringify(e))if(e&&(0,$.isNewSchemaData)(e))this.jsonSchema=e;else{var t=(0,$.oldSchemaToNewSchema)(e);this.jsonSchema=t}else this.jsonSchema=(0,$.objClone)(G);var a=this.state.rootJSONStore.JSONEditorStore.JSONEditorObj,n=(0,$.schema2json)(this.JSONSchemaObj,a);this.state.rootJSONStore.JSONEditorStore.jsonData=n,this.state.rootJSONStore.JSONEditorStore.jsonDataTemp=(0,$.objClone)(a),this.state.rootJSONStore.JSONEditorStore.jsonDataChange()}},t.indexRoute2keyRoute=function(e){return(0,$.indexRoute2keyRoute)(e,this.jsonSchema)},t.keyRoute2indexRoute=function(e){return(0,$.keyRoute2indexRoute)(e,this.jsonSchema)},t.getSchemaByIndexRoute=function(e){return(0,$.getSchemaByIndexRoute)(e,this.jsonSchema,!0)},t.getSchemaByKeyRoute=function(e){var t=this.keyRoute2indexRoute(e);return(0,$.getSchemaByIndexRoute)(t,this.jsonSchema,!0)},F()(e,[{key:"JSONSchemaObj",get:function(){return(0,H.toJS)(this.jsonSchema)}},{key:"lastUpdateTime",get:function(){var e=this.jsonSchema.lastUpdateTime;return e?new Date(e).getTime():(new Date).getTime()}}])}(),c=z()(l.prototype,"pageScreen",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"mobileScreen"}}),s=z()(l.prototype,"jsonSchema",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),z()(l.prototype,"setPageScreen",[e],Object.getOwnPropertyDescriptor(l.prototype,"setPageScreen"),l.prototype),z()(l.prototype,"initJSONSchemaData",[t],Object.getOwnPropertyDescriptor(l.prototype,"initJSONSchemaData"),l.prototype),z()(l.prototype,"JSONSchemaChange",[a],Object.getOwnPropertyDescriptor(l.prototype,"JSONSchemaChange"),l.prototype),z()(l.prototype,"JSONSchemaObj",[H.computed],Object.getOwnPropertyDescriptor(l.prototype,"JSONSchemaObj"),l.prototype),z()(l.prototype,"lastUpdateTime",[H.computed],Object.getOwnPropertyDescriptor(l.prototype,"lastUpdateTime"),l.prototype),z()(l.prototype,"indexRoute2keyRoute",[n],Object.getOwnPropertyDescriptor(l.prototype,"indexRoute2keyRoute"),l.prototype),z()(l.prototype,"keyRoute2indexRoute",[r],Object.getOwnPropertyDescriptor(l.prototype,"keyRoute2indexRoute"),l.prototype),z()(l.prototype,"getSchemaByIndexRoute",[o],Object.getOwnPropertyDescriptor(l.prototype,"getSchemaByIndexRoute"),l.prototype),z()(l.prototype,"getSchemaByKeyRoute",[i],Object.getOwnPropertyDescriptor(l.prototype,"getSchemaByKeyRoute"),l.prototype),l),Q=__webpack_require__(375),Y=__webpack_require__(585),X=__webpack_require__(960),ee=(u=H.action.bound,p=H.action.bound,m=H.action.bound,d=H.action.bound,y=H.action.bound,h=H.action.bound,g=H.action.bound,S=H.action.bound,_=H.action.bound,f=H.action.bound,O=H.action.bound,E=H.action.bound,b=function(){function e(e){q()(this,"rootJSONStore",v,this),q()(this,"triggerChange",N,this),q()(this,"lastUpdateTime",D,this),q()(this,"jsonData",R,this),q()(this,"jsonDataTemp",w,this),q()(this,"dynamicDataList",J,this),q()(this,"dynamicDataObj",k,this),q()(this,"dynamicDataApiScopeList",C,this),q()(this,"onChange",x,this),this.state={rootJSONStore:e}}var t=e.prototype;return t.updateLastTime=function(){this.lastUpdateTime=(new Date).getTime()},t.triggerChangeAction=function(){this.triggerChange=!this.triggerChange},t.initJSONData=function(e){var t=this.state.rootJSONStore.JSONSchemaStore.JSONSchemaObj||{};(0,Y.n4)(e,this.jsonData)||(this.jsonDataTemp=(0,Y.bQ)(this.JSONEditorObj),t&&(this.jsonData=(0,$.schema2json)(t,e||{}),this.updateLastTime()))},t.initOnChange=function(e){(e||(0,X.Tn)(e))&&(this.onChange=e)},t.setDynamicDataList=function(e){if(!(0,Y.n4)(e,this.dynamicDataList)){this.dynamicDataList=(0,Y.bQ)(e);var t={};e.map((function(e){t[e.name]=e})),this.dynamicDataObj=t}},t.jsonDataChange=function(){this.onChange(this.JSONEditorObj)},t.getJSONDataByKeyRoute=function(e,t){var a=t||(0,H.toJS)(this.jsonData);return(0,$.getJsonDataByKeyRoute)(e,a,!0)},t.getJSONDataTempByKeyRoute=function(e,t){var a=t||(0,H.toJS)(this.jsonDataTemp);return(0,$.getJsonDataByKeyRoute)(e,a,!0)},t.updateFormValueData=function(e,t,a){var n=this;if(""!==e){var r=(0,$.getParentKeyRoute_CurKey)(e),o=r[0],i=r[1];(0,$.getJsonDataByKeyRoute)(o,this.jsonData)[i]=t}else this.jsonData=t;if(this.state.rootJSONStore.JSONSchemaStore&&this.state.rootJSONStore.JSONSchemaStore.jsonSchema){var l=this.state.rootJSONStore.JSONSchemaStore.jsonSchema.conditionProps,c=this.state.rootJSONStore.JSONSchemaStore.getSchemaByKeyRoute(e);c&&c.isConditionProp?this.updateLastTime():l&&Object.keys(l).map((function(t){l[t].keyRoute===e&&n.updateLastTime()}))}a||this.jsonDataChange()},t.deleteArrayIndex=function(e,t){var a=(0,$.getJsonDataByKeyRoute)(e,this.jsonData);(0,X.cy)(a)&&(a.length>1?(a.splice(t,1),this.triggerChangeAction(),this.jsonDataChange()):Q.message.warning("删除失败,至少保留一个数据项。"))},t.addArrayItem=function(e,t){var a=(0,$.getJsonDataByKeyRoute)(e,this.jsonData),n=(0,H.toJS)(a);if((0,X.cy)(a)){var r=n[t||0];if(t||0===t){var o=n.slice(Number(t)+1),i=[r].concat(o);a.splice(Number(t)+1),a.push.apply(a,i)}else a.push(r);this.triggerChangeAction(),this.jsonDataChange()}else Q.message.warning("数据操作异常:当前元素不是数组类型。")},t.sortArrayItem=function(e,t,a){var n=(0,$.getJsonDataByKeyRoute)(e,this.jsonData),r=(0,H.toJS)(n);if((0,X.cy)(r)){var o=(0,Y.bQ)(r[t||0]),i=t;if("up"===a&&i>0)i-=1;else{if("up"===a&&0===i)return void Q.message.warning("数据操作异常:当前数组项已经是第一个元素了。");if(("down"===a||!a)&&(i+=1,"down"===a&&i>r.length-1))return void Q.message.warning("数据操作异常:当前数组项已经是最后一个元素了。")}var l=(0,Y.bQ)(r[i]);void 0!==o&&void 0!==l&&(n[t]=l,n[i]=o,Q.message.success("原有数据项"+(t+1)+"对应的数据内容已"+("up"===a?"向上":"向下")+"移动一级",5),this.updateLastTime(),this.triggerChangeAction(),this.jsonDataChange())}else Q.message.warning("数据操作异常:当前元素不是数组类型。")},F()(e,[{key:"JSONEditorObj",get:function(){return(0,H.toJS)(this.jsonData)}}])}(),v=z()(b.prototype,"rootJSONStore",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),N=z()(b.prototype,"triggerChange",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),D=z()(b.prototype,"lastUpdateTime",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(new Date).getTime()}}),R=z()(b.prototype,"jsonData",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=z()(b.prototype,"jsonDataTemp",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),J=z()(b.prototype,"dynamicDataList",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),k=z()(b.prototype,"dynamicDataObj",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),C=z()(b.prototype,"dynamicDataApiScopeList",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{static:"固定值",url:"URL参数",hash:"Hash参数",window:"环境变量",dynamic:"接口下发",page:"页面参数",input:"用户输入"}}}),x=z()(b.prototype,"onChange",[H.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(){}}}),z()(b.prototype,"updateLastTime",[u],Object.getOwnPropertyDescriptor(b.prototype,"updateLastTime"),b.prototype),z()(b.prototype,"triggerChangeAction",[p],Object.getOwnPropertyDescriptor(b.prototype,"triggerChangeAction"),b.prototype),z()(b.prototype,"initJSONData",[m],Object.getOwnPropertyDescriptor(b.prototype,"initJSONData"),b.prototype),z()(b.prototype,"initOnChange",[d],Object.getOwnPropertyDescriptor(b.prototype,"initOnChange"),b.prototype),z()(b.prototype,"setDynamicDataList",[y],Object.getOwnPropertyDescriptor(b.prototype,"setDynamicDataList"),b.prototype),z()(b.prototype,"JSONEditorObj",[H.computed],Object.getOwnPropertyDescriptor(b.prototype,"JSONEditorObj"),b.prototype),z()(b.prototype,"jsonDataChange",[h],Object.getOwnPropertyDescriptor(b.prototype,"jsonDataChange"),b.prototype),z()(b.prototype,"getJSONDataByKeyRoute",[g],Object.getOwnPropertyDescriptor(b.prototype,"getJSONDataByKeyRoute"),b.prototype),z()(b.prototype,"getJSONDataTempByKeyRoute",[S],Object.getOwnPropertyDescriptor(b.prototype,"getJSONDataTempByKeyRoute"),b.prototype),z()(b.prototype,"updateFormValueData",[_],Object.getOwnPropertyDescriptor(b.prototype,"updateFormValueData"),b.prototype),z()(b.prototype,"deleteArrayIndex",[f],Object.getOwnPropertyDescriptor(b.prototype,"deleteArrayIndex"),b.prototype),z()(b.prototype,"addArrayItem",[O],Object.getOwnPropertyDescriptor(b.prototype,"addArrayItem"),b.prototype),z()(b.prototype,"sortArrayItem",[E],Object.getOwnPropertyDescriptor(b.prototype,"sortArrayItem"),b.prototype),b),te=function(){this.JSONSchemaStore=new Z(this),this.JSONEditorStore=new ee(this)},ae=require("@babel/runtime/helpers/extends"),ne=__webpack_require__.n(ae),re=__webpack_require__(347),oe=__webpack_require__(813),ie=__webpack_require__.n(oe),le=(require("ace-builds/src-noconflict/mode-json"),require("ace-builds/src-noconflict/theme-solarized_light"),__webpack_require__(794),function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute,r=t.updateFormValueData;e&&r(n,e)},a.handleValueChange=a.handleValueChange.bind(a),a}return j()(t,e),t.prototype.render=function(){var e=this.props,t=e.nodeKey,a=e.keyRoute,n=e.targetJsonSchema,r=(0,e.getJSONDataByKeyRoute)(a);return r=void 0!==r?r:n.default||"{}",((0,X.Gv)(r)||(0,X.cy)(r))&&(r=JSON.stringify(r,null,2)),T.createElement("div",{className:"json-view-box",key:t,id:t},T.createElement("div",{className:"readOnly-btn"},"[只读]"),T.createElement(ie(),{id:"json_area_ace",value:r,className:"json-view-ace",mode:"json",theme:"solarized_light",name:"JSON_CODE_EDIT",fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,readOnly:!0,minLines:5,maxLines:33,width:"100%",setOptions:{useWorker:!1,showLineNumbers:!0,tabSize:2}}))},t}(T.PureComponent));le.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var ce=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(le)),se=__webpack_require__(438),ue=(__webpack_require__(241),function(e){function t(t){var a;return(a=e.call(this,t)||this).state={jsonView:!1,isClosed:!1},a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.indexRoute,n=t.nodeKey,r=t.keyRoute,o=t.targetJsonSchema,i=t.isArrayItem,l=t.arrIndex,c=t.isStructuredSchema,s=t.getJSONDataByKeyRoute,u=t.keyRoute2indexRoute,p=this.state,m=p.jsonView,d=p.isClosed,y=c;return P().createElement("div",{className:"mobile-screen-element-warp element-title-card-warp object-schema-warp",key:n,id:n},!y&&!i&&P().createElement("div",{className:"element-title",onClick:function(t){e.setState({isClosed:!d}),t.preventDefault(),t.stopPropagation()}},P().createElement("span",{className:"title-text"},o.title),o.description&&P().createElement(Q.Tooltip,{title:o.description,placement:"top"},P().createElement(re.InfoCircleOutlined,{className:"info-icon"})),P().createElement("span",null,i?"/"+(l+1):""),d?P().createElement(re.RightOutlined,{className:"close-operate-btn"}):P().createElement(re.DownOutlined,{className:"close-operate-btn"}),P().createElement("div",{className:"display-source-btn",onClick:function(t){e.setState({jsonView:!m}),t.preventDefault(),t.stopPropagation()}},P().createElement(Q.Tooltip,{title:m?"关闭源码模式":"开启源码模式"},P().createElement("svg",{t:"1596164081465",className:"icon",viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1205"},P().createElement("path",{d:"M293.0688 755.2c-12.0832 0-24.2688-4.2496-33.9968-12.9024L0 512l273.4592-243.0976C294.5536 250.2144 326.912 252.0064 345.7024 273.152c18.7904 21.1456 16.896 53.504-4.2496 72.2944L154.112 512l172.9536 153.7024c21.1456 18.7904 23.04 51.1488 4.2496 72.2944C321.2288 749.4144 307.1488 755.2 293.0688 755.2zM751.0528 755.0976 1024.512 512l-259.072-230.2976c-21.1456-18.7904-53.504-16.896-72.2432 4.2496-18.7904 21.1456-16.896 53.504 4.2496 72.2944L870.4 512l-187.3408 166.5024c-21.1456 18.7904-23.04 51.1488-4.2496 72.2944C688.896 762.2144 702.976 768 717.056 768 729.1392 768 741.3248 763.7504 751.0528 755.0976zM511.5392 827.648l102.4-614.4c4.6592-27.904-14.1824-54.272-42.0864-58.9312-28.0064-4.7104-54.3232 14.1824-58.88 42.0864l-102.4 614.4c-4.6592 27.904 14.1824 54.272 42.0864 58.9312C455.5264 870.1952 458.2912 870.4 461.1072 870.4 485.6832 870.4 507.392 852.6336 511.5392 827.648z","p-id":"1206",fill:m?"#1890ff":"currentColor"}))))),P().createElement("div",{className:"content-item "+(y||i?"":"object-content")+" "+(m?"json-view-array":"")+" "+(d?"closed":"")},!m&&o.propertyOrder&&o.propertyOrder.map((function(e,t){var i=a?a+"-"+t:""+t,l=r?r+"-"+e:""+e,c=e,p=o.properties[c],m=(0,$.getCurrentFormat)(p);return vt({parentType:m,jsonKey:c,indexRoute:i,keyRoute:l,nodeKey:n+"-"+m+"-"+c,targetJsonSchema:p,getJSONDataByKeyRoute:s,keyRoute2indexRoute:u})})),m&&P().createElement(ce,this.props)))},t}(P().PureComponent));ue.propTypes={isArrayItem:L().any,arrIndex:L().any,parentType:L().string,jsonKey:L().string,indexRoute:L().any,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any,isStructuredSchema:L().any};var pe,me=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(ue));function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},de.apply(null,arguments)}__webpack_require__(747);var ye,he=function(e){return T.createElement("svg",de({width:16,height:16,xmlns:"http://www.w3.org/2000/svg"},e),pe||(pe=T.createElement("path",{d:"M15.5 2a.5.5 0 0 1 .09.992L15.5 3H14v10.6a2.4 2.4 0 0 1-2.4 2.4H4.4A2.4 2.4 0 0 1 2 13.6V3H.5a.5.5 0 0 1-.09-.992L.5 2h15ZM13 3H3v10.6a1.4 1.4 0 0 0 1.265 1.394L4.4 15h7.2a1.4 1.4 0 0 0 1.394-1.265L13 13.6V3ZM6 6a.5.5 0 0 1 .492.41l.008.09v5a.5.5 0 0 1-.992.09L5.5 11.5v-5A.5.5 0 0 1 6 6Zm4 0a.5.5 0 0 1 .492.41l.008.09v5a.5.5 0 0 1-.992.09L9.5 11.5v-5A.5.5 0 0 1 10 6Zm.5-6a.5.5 0 0 1 .09.992L10.5 1h-5a.5.5 0 0 1-.09-.992L5.5 0h5Z",fill:"#232321",fillRule:"evenodd"})))};function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},ge.apply(null,arguments)}var Se=function(e){return T.createElement("svg",ge({width:16,height:16,xmlns:"http://www.w3.org/2000/svg"},e),ye||(ye=T.createElement("path",{d:"M10.286 4C11.232 4 12 4.768 12 5.714v8.572c0 .946-.768 1.714-1.714 1.714H1.714A1.714 1.714 0 0 1 0 14.286V5.714C0 4.768.768 4 1.714 4h8.572Zm-.12 1H1.834A.833.833 0 0 0 1 5.833v8.334c0 .46.373.833.833.833h8.334c.46 0 .833-.373.833-.833V5.833A.833.833 0 0 0 10.167 5ZM6 7.429c.237 0 .429.191.429.428l-.001 1.714h1.715a.429.429 0 0 1 0 .858H6.428v1.714a.429.429 0 1 1-.857 0v-1.714H3.857a.429.429 0 1 1 0-.858h1.714V7.857c0-.237.192-.428.429-.428ZM14.286 0C15.232 0 16 .768 16 1.714v8.572c0 .946-.768 1.714-1.714 1.714H13v-1h1.167c.46 0 .833-.373.833-.833V1.833A.833.833 0 0 0 14.167 1H5.833A.833.833 0 0 0 5 1.833V3H4V1.714C4 .768 4.768 0 5.714 0h8.572Z",fill:"#232321",fillRule:"evenodd"})))},_e=function(e){function t(t){var a;return(a=e.call(this,t)||this).addArrayItem=function(e,t,n){var r=a.props.targetJsonSchema["maximum-child"];t&&t.length>=r?Q.message.warning("添加失败,最多可添加"+r+"个子项"):a.props.addArrayItem(e,n)},a.deleteArrItem=function(e,t,n){var r=a.props.targetJsonSchema["minimum-child"];n&&n.length<=r?Q.message.warning("删除失败,至少需要保留"+r+"个子项"):a.props.deleteArrayIndex(e,t)},a.elemHoverEnterEvent=function(e,t){e.stopPropagation(),t!==a.state.hoverIndex&&a.setState({hoverIndex:t})},a.elemHoverLeaveEvent=function(e,t){e.stopPropagation(),t===a.state.hoverIndex&&a.setState({hoverIndex:""})},a.getArrItemTitle=function(e){if(e)for(var t=Object.keys(e),a=0,n=t.length;a<n;a++){var r=e[t[a]];if(r&&((0,X.Et)(r)||(0,X.Kg)(r)&&!(0,X.mv)(r)&&!(0,X._o)(r)))return r}return""},a.state={currentActiveArrIndex:-1,jsonView:!1,isClosed:!1,hoverIndex:""},a.addArrayItem=a.addArrayItem.bind(a),a.deleteArrItem=a.deleteArrItem.bind(a),a.elemHoverEnterEvent=a.elemHoverEnterEvent.bind(a),a.elemHoverLeaveEvent=a.elemHoverLeaveEvent.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.keyRoute,n=t.nodeKey,r=t.pageScreen,o=t.indexRoute,i=t.targetJsonSchema,l=t.getJSONDataByKeyRoute,c=this.state,s=c.jsonView,u=c.isClosed,p=(c.hoverIndex,c.currentActiveArrIndex),m=(0,$.getCurrentFormat)(i),d=l(a),y=i.items;return T.createElement("div",{className:"array-schema-box "+("wideScreen"===r?"wide-screen-view":"mobile-screen-view"),key:n,id:n},T.createElement("div",{className:"element-title",onClick:function(t){e.setState({isClosed:!u}),t.preventDefault(),t.stopPropagation()}},T.createElement("span",{className:"title-text"},i.title),i.description&&T.createElement(Q.Tooltip,{title:i.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"})),u?T.createElement(re.RightOutlined,{className:"close-operate-btn"}):T.createElement(re.DownOutlined,{className:"close-operate-btn"}),T.createElement("div",{className:"display-source-btn",onClick:function(t){e.setState({jsonView:!s}),t.preventDefault(),t.stopPropagation()}},T.createElement(Q.Tooltip,{title:s?"关闭源码模式":"开启源码模式"},T.createElement("svg",{t:"1596164081465",className:"icon",viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1205"},T.createElement("path",{d:"M293.0688 755.2c-12.0832 0-24.2688-4.2496-33.9968-12.9024L0 512l273.4592-243.0976C294.5536 250.2144 326.912 252.0064 345.7024 273.152c18.7904 21.1456 16.896 53.504-4.2496 72.2944L154.112 512l172.9536 153.7024c21.1456 18.7904 23.04 51.1488 4.2496 72.2944C321.2288 749.4144 307.1488 755.2 293.0688 755.2zM751.0528 755.0976 1024.512 512l-259.072-230.2976c-21.1456-18.7904-53.504-16.896-72.2432 4.2496-18.7904 21.1456-16.896 53.504 4.2496 72.2944L870.4 512l-187.3408 166.5024c-21.1456 18.7904-23.04 51.1488-4.2496 72.2944C688.896 762.2144 702.976 768 717.056 768 729.1392 768 741.3248 763.7504 751.0528 755.0976zM511.5392 827.648l102.4-614.4c4.6592-27.904-14.1824-54.272-42.0864-58.9312-28.0064-4.7104-54.3232 14.1824-58.88 42.0864l-102.4 614.4c-4.6592 27.904 14.1824 54.272 42.0864 58.9312C455.5264 870.1952 458.2912 870.4 461.1072 870.4 485.6832 870.4 507.392 852.6336 511.5392 827.648z","p-id":"1206",fill:s?"#1890ff":"currentColor"})))),T.createElement(Q.Tooltip,{title:"添加数据项"},T.createElement(re.PlusOutlined,{src:Se,className:"array-add-child-btn",onClick:function(t){e.addArrayItem(a,d),t.preventDefault(),t.stopPropagation()}}))),T.createElement("div",{className:"array-content "+(s?"json-view-array":"")+" "+(u?"closed":"")},!s&&(0,X.cy)(d)&&d.map((function(t,r){var i=n+"-array-items-"+d.length+"-"+r,l=o?o+"-0":"0",c=a?a+"-"+r:""+r,s=e.getArrItemTitle(t);return T.createElement("div",{className:"array-item",key:c},T.createElement("div",{className:"array-item-header",onClick:function(){e.setState({currentActiveArrIndex:p===r?-1:r})},onMouseMove:function(t){e.elemHoverEnterEvent(t,r)},onMouseLeave:function(t){e.elemHoverLeaveEvent(t,r)}},T.createElement("div",{className:"array-title-text"},s||y.title+"/"+(r+1)),T.createElement("div",{className:"array-operate-box"},p!==r?T.createElement(re.RightOutlined,{className:"close-operate-btn array-operate-btn"}):T.createElement(re.DownOutlined,{className:"close-operate-btn array-operate-btn"}),T.createElement(Q.Tooltip,{title:"删除"+y.title+"/"+(r+1)},T.createElement(Q.Popconfirm,{placement:"top",title:"确定要删除"+y.title+"/"+(r+1)+"吗?",onCancel:function(e){e.preventDefault(),e.stopPropagation()},onConfirm:function(t){e.deleteArrItem(a,r,d),t.preventDefault(),t.stopPropagation()},okText:"确定",cancelText:"取消"},T.createElement("img",{src:he,className:"delete-operate-btn array-operate-btn",onClick:function(e){e.preventDefault(),e.stopPropagation()}}))),T.createElement(Q.Tooltip,{title:"复制"+y.title+"/"+(r+1)},T.createElement("img",{src:Se,className:"array-operate-btn",onClick:function(t){e.addArrayItem(a,d,r),t.preventDefault(),t.stopPropagation()}})),0!==r&&T.createElement(Q.Tooltip,{title:"向上移动"},T.createElement(re.ArrowUpOutlined,{className:"array-operate-btn",onClick:function(t){e.props.sortArrayItem(a,r,"up"),t.preventDefault(),t.stopPropagation()}})),r!==d.length-1&&T.createElement(Q.Tooltip,{title:"向下移动"},T.createElement(re.ArrowDownOutlined,{className:"array-operate-btn",onClick:function(t){e.props.sortArrayItem(a,r,"down"),t.preventDefault(),t.stopPropagation()}})))),T.createElement("div",{className:"array-item-content "+(p===r?"open":"closed"),key:i,id:i},T.createElement(me,{parentType:m,jsonKey:"items",indexRoute:l,keyRoute:c,nodeKey:i,targetJsonSchema:y,isArrayItem:!0,arrIndex:r})))})),s&&T.createElement(ce,this.props)))},t}(T.PureComponent);_e.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var fe=(0,V.inject)((function(e){return{triggerChange:e.JSONEditorStore.triggerChange,pageScreen:e.JSONSchemaStore.pageScreen,indexRoute2keyRoute:e.JSONSchemaStore.indexRoute2keyRoute,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,deleteArrayIndex:e.JSONEditorStore.deleteArrayIndex,addArrayItem:e.JSONEditorStore.addArrayItem,sortArrayItem:e.JSONEditorStore.sortArrayItem}}))((0,V.observer)(_e)),Oe=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute,r=t.updateFormValueData;e&&r(n,e)},a.state={isShowWarn:!1,warnText:"",curJSONDataTemp:void 0},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.nodeKey,n=t.keyRoute,r=t.targetJsonSchema,o=t.pageScreen,i=t.getJSONDataByKeyRoute,l=this.state,c=l.isShowWarn,s=l.warnText,u=l.curJSONDataTemp,p=r.readOnly||!1,m=i(n);return m=void 0!==m?m:r.default||"{}",((0,X.Gv)(m)||(0,X.cy)(m))&&(m=JSON.stringify(m,null,2)),T.createElement("div",{className:"wideScreen"===o?"wide-screen-element-warp container-warp":"mobile-screen-element-warp",key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},p?"[只读]":""),T.createElement("span",{className:"title-text",title:"wideScreen"===o&&r.title.length>(p?4:6)?r.title:""},r.title),r.description&&T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},c&&T.createElement("div",{className:"warning-box code-area-item"},T.createElement("div",{className:"warning-img"},"X"),T.createElement("div",{className:"warning-text"},s)),T.createElement(ie(),{id:"json_area_ace",value:(0,Y.jI)(u)?u:m,className:"code-area-item",mode:"json",theme:"solarized_light",name:"JSON_CODE_EDIT",fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,readOnly:p,minLines:5,maxLines:30,width:"100%",onChange:function(t){try{var a=JSON.parse(t);e.handleValueChange(a),e.setState({isShowWarn:!1,curJSONDataTemp:void 0})}catch(a){e.setState({curJSONDataTemp:t,warnText:a.message,isShowWarn:!0})}},setOptions:{useWorker:!1,showLineNumbers:!0,tabSize:2}})))},t}(T.PureComponent);Oe.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Ee=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute,indexRoute2keyRoute:e.JSONSchemaStore.indexRoute2keyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData}}))((0,V.observer)(Oe)),be=__webpack_require__(560),ve=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=e.target.value,n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r,t)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(t),i=n.readOnly||!1,l=n.isRequired||!1;return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp",key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},i?"[只读]":""),T.createElement(Q.Tooltip,{title:"wideScreen"===r?n.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title&&n.title.length>(i?4:6)?n.title:""},n.title)),"mobileScreen"===r&&n.description&&T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Input,{style:{display:"inline-block"},disabled:i,required:l,placeholder:n.placeholder||"请输入"+n.title,defaultValue:o||n.default,onPressEnter:this.handleValueChange,onBlur:this.handleValueChange}))))},t}(T.PureComponent);ve.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Ne=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(ve)),De=(__webpack_require__(171),function(e){function t(t){var a;return(a=e.call(this,t)||this).switchFilterBtn=function(){var e=a.state.isShowFilter;a.setState({isShowFilter:!e})},a.state={isShowFilter:!1},a.switchFilterBtn=a.switchFilterBtn.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.indexRoute,r=e.targetJsonSchema,o=e.pageScreen,i=this.state.isShowFilter,l=(0,$.getCurrentFormat)(r),c=r.properties.type||{},s=r.properties.data||{},u=r.properties.filter||{},p=c.default;return T.createElement("div",{className:("wideScreen"===o?"wide-screen-element-warp":"mobile-screen-element-warp")+" element-title-card-warp",key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text",title:"wideScreen"===o&&r.title.length>6?r.title:""},r.title),r.description&&T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item object-content"},"local"===p&&T.createElement(T.Fragment,null,T.createElement("div",{className:"ace-editor-box code-area-item"},T.createElement(Q.Tooltip,{title:i?"点击隐藏数据过滤器":"点击显示数据过滤器",placement:"top"},T.createElement(re.FilterOutlined,{className:"filter-btn",onClick:this.switchFilterBtn})),T.createElement(Ee,{parentType:l,jsonKey:"data",indexRoute:n?n+"-1":"1",keyRoute:t?t+"-data":"data",nodeKey:a+"-data",targetJsonSchema:s,key:a+"-data"})),i&&T.createElement(be.A,{parentType:l,jsonKey:"filter",indexRoute:n?n+"-2":"2",keyRoute:t?t+"-filter":"filter",nodeKey:a+"-filter",targetJsonSchema:u,key:a+"-filter"})),"remote"===p&&T.createElement(T.Fragment,null,T.createElement("div",{className:"url-editor-box"},T.createElement(Ne,{parentType:l,jsonKey:"data",indexRoute:n?n+"-1":"1",keyRoute:t?t+"-data":"data",nodeKey:a+"-data",targetJsonSchema:s,key:a+"-data"}),T.createElement(Q.Tooltip,{title:"点击设置数据过滤器",placement:"top"},T.createElement(re.FilterOutlined,{className:"filter-url-btn",onClick:this.switchFilterBtn}))),i&&T.createElement(be.A,{parentType:l,jsonKey:"filter",indexRoute:n?n+"-2":"2",keyRoute:t?t+"-filter":"filter",nodeKey:a+"-filter",targetJsonSchema:u,key:a+"-filter"}))))},t}(T.PureComponent));De.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Re=(0,V.inject)((function(e){return{triggerChange:e.JSONEditorStore.triggerChange,pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(De)),we=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=e.target.value;if(a.props.onChange)a.props.onChange(t);else{var n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r,t)}},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.nodeKey,a=e.keyRoute,n=e.targetJsonSchema,r=e.pageScreen,o=e.getJSONDataByKeyRoute,i=a&&o(a),l=n.readOnly||!1,c=n.isRequired||!1;return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp",key:t,id:t},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},l?"[只读]":""),T.createElement(Q.Tooltip,{title:"wideScreen"===r?n.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title&&n.title.length>(l?4:6)?n.title:""},n.title)),"mobileScreen"===r&&n.description&&T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Input,{style:{display:"inline-block"},disabled:l,required:c,placeholder:n.placeholder||"请输入"+n.title,defaultValue:i||n.default,onPressEnter:this.handleValueChange,onBlur:this.handleValueChange}))))},t}(T.PureComponent);we.propTypes={parentType:L().any,jsonKey:L().string,indexRoute:L().any,keyRoute:L().any,nodeKey:L().string,targetJsonSchema:L().any,onChange:L().any};var Je=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData}}))((0,V.observer)(we)),ke=function(e){function t(){return e.apply(this,arguments)||this}return j()(t,e),t.prototype.render=function(){var e=this.props,t=e.pageScreen,a=e.mockData,n=e.dataRoute,r=e.nodeKey,o=e.onChange,i=[];if(a&&"{}"!==JSON.stringify(a)){var l=a;if(!(0,$.isObject)(a)&&""!==a)try{l=JSON.parse(a)}catch(e){console.log("当前数据源的请求参数对象不是一个合格的json数据"),l={}}i=(0,$.json2treeData)(l)}return T.createElement("div",{className:"wideScreen"===t?"wide-screen-element-warp":"mobile-screen-element-warp",key:r+"-dataRoute-select",id:r+"-dataRoute-select"},T.createElement("div",{className:"element-title"},"数据路径选择"),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.TreeSelect,{className:"data-route-select",defaultValue:n,treeData:i,allowClear:!0,placeholder:"请选择要使用的数据节点(数据路径)",treeDefaultExpandAll:!0,onChange:o}))))},t}(T.PureComponent);ke.propTypes={pageScreen:L().any,mockData:L().any,dataRoute:L().any,onChange:L().func,nodeKey:L().string};var Ce=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen}}))((0,V.observer)(ke)),xe=(__webpack_require__(125),Q.Select.Option),Ke=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e,t){var n=Object.assign({},a.props.curConfigData);n[e]=t,a.props.configDataChange(n)},a.paramsValueChange=function(e,t){var n=Object.assign({},a.props.curConfigData);n.body&&n.body[e]&&(n.body[e].value=t),a.props.configDataChange(n)},a.dynamicDataChange=function(e){var t=(0,Y.bQ)((0,H.toJS)(a.props.dynamicDataObj[e]));if(t){var n={id:t.id,url:t.url,method:t.method,headers:t.headers,options:t.options,dataName:t.name,body:t.body,data:t.data,filter:t.filter};a.props.configDataChange(n)}},a.dataRouteChange=function(e){var t=Object.assign({},a.props.curConfigData);t.dataRoute=e;var n=(0,$.dataRoute2dataPath)(e);t.filter="return "+n+";",a.props.configDataChange(t)},a}return j()(t,e),t.prototype.render=function(){var e=this,t=this.props,a=t.pageScreen,n=t.curConfigData,r=t.nodeKey,o=t.keyRoute,i=t.dynamicDataList,l=t.dynamicDataObj,c=t.dynamicDataApiScopeList,s=((0,t.getJSONDataByKeyRoute)(o),n.dataName),u=n.dataRoute,p=n.body||{};if(!(0,X.Gv)(p)&&""!==p)try{p=JSON.parse(p)}catch(e){console.log("当前数据源的请求参数对象不是一个合格的json数据"),p={}}var m=l[s]||{};return T.createElement("div",{className:"wideScreen"===a?"wide-screen-element-warp":"mobile-screen-element-warp",key:r,id:r},T.createElement("div",{className:"element-title"},n.title+" (接口下发)"),T.createElement("div",{className:"content-item object-content"},T.createElement("div",{className:"remote-dynamic-data-schema",key:r+"-remote-dynamic-data",id:r+"-remote-dynamic-data"},T.createElement("div",{className:"wideScreen"===a?"wide-screen-element-warp":"mobile-screen-element-warp",key:r+"-"+s,id:r+"-"+s},T.createElement("div",{className:"element-title"},"数据源列表"),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Select,{className:"dynamic-data-select",defaultValue:s,onSelect:this.dynamicDataChange},i&&(0,X.cy)(i)&&i.map((function(e){return T.createElement(xe,{value:e.name,key:e.id},e.title)})))))),s&&p&&Object.keys(p).length>0&&T.createElement("div",{className:("wideScreen"===a?"wide-screen-element-warp":"mobile-screen-element-warp")+" element-title-card-warp",key:r+"-"+s+"-params",id:r+"-"+s+"-params"},T.createElement("div",{className:"element-title"},"请求参数配置"),T.createElement("div",{className:"content-item object-content"},Object.keys(p).map((function(t){var n=p[t];n.readOnly=!(!n.scope||"static"!==n.scope);var o=r+"-body-"+t,i=c[n.scope];return i&&n.title.indexOf(i)<0&&(n.title=n.title+"("+i+")"),n.default=n.value,T.createElement(Je,{pageScreen:a,jsonKey:t,nodeKey:o,targetJsonSchema:n,onChange:function(a){e.paramsValueChange(t,a)},key:o})})))),s&&p&&0===Object.keys(p).length&&T.createElement("div",{className:"wideScreen"===a?"wide-screen-element-warp":"mobile-screen-element-warp",key:r+"-"+s+"-empty",id:r+"-"+s+"-empty"},T.createElement("div",{className:"element-title"},"请求参数配置"),T.createElement("div",{className:"content-item"},T.createElement("span",{className:"warning-text"},"无可配置的请求参数"))),s&&T.createElement(Ce,{nodeKey:r+"-dataRoute",mockData:m.respMock,dataRoute:u,onChange:this.dataRouteChange,key:r+"-dataRoute"}),s&&T.createElement(be.A,{isReadOnly:!0,isIgnoreWarn:!0,jsonKey:"filter",nodeKey:r+"-config-params-filter-"+u,keyRoute:o?o+"-filter":"filter",targetJsonSchema:{title:"过滤器函数体",default:"return data;"},key:r+"-filter"}))))},t}(T.PureComponent);Ke.propTypes={pageScreen:L().any,keyRoute:L().any,nodeKey:L().string,curConfigData:L().object,configDataChange:L().func,dynamicDataList:L().array,dynamicDataObj:L().object,dynamicDataApiScopeList:L().object};var je=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,dynamicDataList:e.JSONEditorStore.dynamicDataList,dynamicDataObj:e.JSONEditorStore.dynamicDataObj,dynamicDataApiScopeList:e.JSONEditorStore.dynamicDataApiScopeList,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute}}))((0,V.observer)(Ke)),Te=(__webpack_require__(543),Q.Select.Option),Pe=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e,t){(0,a.props.updateFormValueData)(e,t)},a.switchFilterBtn=function(){var e=a.state.isShowFilter;a.setState({isShowFilter:!e})},a.tabChange=function(e){var t=a.props,n=t.keyRoute,r=t.triggerChangeAction;a.handleValueChange(n+"-type",e),setTimeout((function(){r()}),100)},a.dynamicDataChange=function(e){var t=a.props,n=t.keyRoute,r=t.dynamicDataObj,o=t.triggerChangeAction,i=(0,Y.bQ)((0,H.toJS)(r[e]));if(i){var l={id:i.id,url:i.url,method:i.method,headers:i.headers,options:i.options,dataName:i.name,body:i.body,data:i.data,filter:"return data;",dataRoute:""};a.handleValueChange(n+"-config",l),setTimeout((function(){o()}),100)}},a.dataRouteChange=function(e){var t=a.props,n=t.keyRoute,r=t.triggerChangeAction,o=t.updateFormValueData;if(e){o(n+"-config-dataRoute",e,!0);var i=(0,$.dataRoute2dataPath)(e);a.handleValueChange(n+"-config-filter","return "+i+";")}else o(n+"-config-dataRoute","",!0),a.handleValueChange(n+"-config-filter","return data;");setTimeout((function(){r()}),100)},a.paramsConfigChange=function(e,t){var n=a.props,r=n.keyRoute,o=n.triggerChangeAction,i=(0,n.getJSONDataByKeyRoute)(r+"-config-body-"+e)||{};a.handleValueChange(r+"-config-body-"+e,Object.assign(i,t)),setTimeout((function(){o()}),100)},a.state={isShowFilter:!1},a.switchFilterBtn=a.switchFilterBtn.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.keyRoute,n=t.nodeKey,r=t.indexRoute,o=t.targetJsonSchema,i=t.dynamicDataList,l=t.dynamicDataObj,c=t.dynamicDataApiScopeList,s=t.getJSONDataByKeyRoute,u=t.pageScreen,p=this.state.isShowFilter,m=(0,$.getCurrentFormat)(o),d=s(a)||{},y=o.properties.type||{},h=d.type||y.default,g=d.config||{},S=g.dataName,_=g.dataRoute,f=g.body||{};if(!(0,X.Gv)(f)&&""!==f)try{f=JSON.parse(f)}catch(e){console.log("当前数据源的请求参数对象不是一个合格的json数据"),f={}}var O=l[S]||{},E=o.properties.data||{};return T.createElement("div",{className:"mobile-screen-element-warp dynamic-data-schema",key:n,id:n},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text"},o.title),o.description&&T.createElement(Q.Tooltip,{title:o.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"dynamic-data-tab-radio-box"},T.createElement("div",{className:"dynamic-data-tab-radio"},T.createElement("div",{className:"tab-radio "+("local"===h?"tab-radio-active":""),onClick:function(){e.tabChange("local")}},"本地数据"),T.createElement("div",{className:"tab-radio "+("remote"===h?"tab-radio-active":""),onClick:function(){e.tabChange("remote")}},"接口数据"))),T.createElement("div",{className:"dynamic-dat-tabPane "+("local"===h?"dynamic-dat-tabPane-active":"")},T.createElement("div",{className:"json-form-box"},T.createElement(Q.Tooltip,{title:p?"点击隐藏数据过滤器":"点击显示数据过滤器",placement:"top"},T.createElement(re.FilterOutlined,{className:"filter-btn",onClick:this.switchFilterBtn})),T.createElement(Ee,{parentType:m,jsonKey:"data",indexRoute:r?r+"-2":"2",keyRoute:a?a+"-data":"data",nodeKey:n+"-data",targetJsonSchema:E,key:n+"-data"}),T.createElement("div",{className:"filter-func-box"},p&&T.createElement(be.A,{isIgnoreWarn:!0,parentType:m,jsonKey:"localFilter",indexRoute:r?r+"-3":"3",keyRoute:a?a+"-localFilter":"localFilter",nodeKey:n+"-localFilter",targetJsonSchema:o.properties.localFilter,key:n+"-localFilter"})))),T.createElement("div",{className:"dynamic-dat-tabPane "+("remote"===h?"dynamic-dat-tabPane-active":"")},T.createElement("div",{className:"json-form-box"},T.createElement("div",{className:"wideScreen"===u?"wide-screen-element-warp":"mobile-screen-element-warp",key:n+"-"+S,id:n+"-"+S},T.createElement("div",{className:"element-title"},"数据源列表"),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Select,{className:"dynamic-data-select",defaultValue:S,onSelect:this.dynamicDataChange},i&&(0,X.cy)(i)&&i.map((function(e){return T.createElement(Te,{value:e.name,key:e.id},e.title)})))))),S&&f&&Object.keys(f).length>0&&T.createElement("div",{className:("wideScreen"===u?"wide-screen-element-warp":"mobile-screen-element-warp")+" element-title-card-warp",key:n+"-"+S+"-params",id:n+"-"+S+"-params"},T.createElement("div",{className:"element-title"},"请求参数配置"),T.createElement("div",{className:"content-item object-content"},Object.keys(f).map((function(t){var r=(0,Y.bQ)(f[t]);r.readOnly=!(!r.scope||"static"!==r.scope);var o=a+"-config-body-"+t,i=c[r.scope];if(i&&"dynamic"!==r.scope&&(r.title=r.title+"("+i+")"),"dynamic"!==r.scope)return T.createElement(Je,{pageScreen:u,jsonKey:t,keyRoute:o+"-value",nodeKey:o,targetJsonSchema:r,key:o});var l=n+"-"+S+"-params-"+t;return T.createElement(je,{pageScreen:u,nodeKey:l,keyRoute:a?a+"-config-body-"+t:"config-body-${paramKey}",curConfigData:r||{},configDataChange:function(a){e.paramsConfigChange(t,a)},key:o})})))),S&&f&&0===Object.keys(f).length&&T.createElement("div",{className:"wideScreen"===u?"wide-screen-element-warp":"mobile-screen-element-warp",key:n+"-"+S+"-empty",id:n+"-"+S+"-empty"},T.createElement("div",{className:"element-title"},"请求参数配置"),T.createElement("div",{className:"content-item"},T.createElement("span",{className:"warning-text"},"无可配置的请求参数"))),S&&T.createElement(Ce,{nodeKey:n+"-config-dataRoute-"+_,mockData:O.respMock,dataRoute:_,onChange:this.dataRouteChange,key:n+"-config-dataRoute"}),S&&T.createElement(be.A,{isReadOnly:!0,isIgnoreWarn:!0,parentType:m,jsonKey:"filter",indexRoute:r?r+"-1-2":"1-2",keyRoute:a?a+"-config-filter":"config-filter",nodeKey:n+"-config-filter-"+_,targetJsonSchema:o.properties.config&&o.properties.config.properties.filter,key:n+"-config-filter"}))))},t}(T.PureComponent);Pe.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any,dynamicDataList:L().array,dynamicDataObj:L().object,dynamicDataApiScopeList:L().object};var Be=(0,V.inject)((function(e){return{triggerChange:e.JSONEditorStore.triggerChange,triggerChangeAction:e.JSONEditorStore.triggerChangeAction,pageScreen:e.JSONSchemaStore.pageScreen,dynamicDataList:e.JSONEditorStore.dynamicDataList,dynamicDataObj:e.JSONEditorStore.dynamicDataObj,dynamicDataApiScopeList:e.JSONEditorStore.dynamicDataApiScopeList,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(Pe)),Me=function(e){function t(){return e.apply(this,arguments)||this}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.indexRoute,r=e.targetJsonSchema,o=e.pageScreen,i=(0,$.getCurrentFormat)(r),l=r.properties.type||{},c=r.properties.register||{},s=r.properties.actionFunc||{},u=r.properties.trigger||{},p=r.properties.eventData||{},m=l.default;return T.createElement("div",{className:("wideScreen"===o?"wide-screen-element-warp":"mobile-screen-element-warp")+" element-title-card-warp",key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text",title:"wideScreen"===o&&r.title.length>6?r.title:""},r.title),r.description&&T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item object-content"},"on"===m&&T.createElement(T.Fragment,null,c&&T.createElement(Je,{parentType:i,jsonKey:"register",indexRoute:n?n+"-1":"1",keyRoute:t?t+"-register":"register",nodeKey:a+"-register",targetJsonSchema:c,key:a+"-register"}),s&&T.createElement(be.A,{parentType:i,jsonKey:"actionFunc",indexRoute:n?n+"-2":"2",keyRoute:t?t+"-actionFunc":"actionFunc",nodeKey:a+"-actionFunc",targetJsonSchema:s,key:a+"-actionFunc"})),"emit"===m&&T.createElement(T.Fragment,null,u&&T.createElement(Je,{parentType:i,jsonKey:"trigger",indexRoute:n?n+"-1":"1",keyRoute:t?t+"-trigger":"trigger",nodeKey:a+"-trigger",targetJsonSchema:u,key:a+"-trigger"}),p&&T.createElement(Ee,{parentType:i,jsonKey:"eventData",indexRoute:n?n+"-2":"2",keyRoute:t?t+"-eventData":"eventData",nodeKey:a+"-eventData",targetJsonSchema:p,key:a+"-eventData"}))))},t}(T.PureComponent);Me.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Ve=(0,V.inject)((function(e){return{triggerChange:e.JSONEditorStore.triggerChange,pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(Me)),Ae=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=e.target.value,n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r?r+"-unit":"unit",Number(t))},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(t),i=n.readOnly||!1,l=n.propertyOrder[0],c=n.properties[l],s=o.quantity,u=T.createElement("span",null,"percent"===s?"%":s),p=(0,Y.y8)(n.format);return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp "+(p?"two-col-element-warp":""),key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},i?"[只读]":""),T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement("span",{className:"title-text",title:(p||"wideScreen"===r)&&n.title.length>(i?4:6)?n.title:""},n.title))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Input,{style:{display:"inline-block",width:"120px"},addonAfter:u,disabled:i,placeholder:c.placeholder||n.placeholder||"请输入"+c.title||0,defaultValue:o.unit||c.default,onPressEnter:this.handleValueChange,onBlur:this.handleValueChange}))))},t}(T.PureComponent);Ae.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Le=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(Ae)),Ie=(__webpack_require__(96),function(e){function t(t){var a;return(a=e.call(this,t)||this).layoutStyleObj={top:"",right:"",bottom:"",left:"",quantity:"px"},a.initBoxStyle=function(){var e=a.props,t=e.keyRoute,n=e.targetJsonSchema,r=(0,e.getJSONDataByKeyRoute)(t),o=n.propertyOrder[0],i=n.properties[o],l=r.quantity,c=r.unit||i.default;if(a.layoutStyleObj={top:"",right:"",bottom:"",left:"",quantity:l},c){var s=c.split(" ");1===s.length?s[0]&&s[0].indexOf(l)>=0?(a.layoutStyleObj.top=s[0],a.layoutStyleObj.right=s[0],a.layoutStyleObj.bottom=s[0],a.layoutStyleObj.left=s[0]):"auto"===s[0]?(a.layoutStyleObj.top="auto",a.layoutStyleObj.right="auto",a.layoutStyleObj.bottom="auto",a.layoutStyleObj.left="auto"):(a.layoutStyleObj.top=""+s[0]+l,a.layoutStyleObj.right=""+s[0]+l,a.layoutStyleObj.bottom=""+s[0]+l,a.layoutStyleObj.left=""+s[0]+l):(a.layoutStyleObj.top=s[0],a.layoutStyleObj.right=s[1],a.layoutStyleObj.bottom=s[2]||s[0],a.layoutStyleObj.left=s[3]||s[1])}else 0===c?(a.layoutStyleObj.top=""+c+l,a.layoutStyleObj.right=""+c+l,a.layoutStyleObj.bottom=""+c+l,a.layoutStyleObj.left=""+c+l):(a.layoutStyleObj.top="auto",a.layoutStyleObj.right="auto",a.layoutStyleObj.bottom="auto",a.layoutStyleObj.left="auto")},a.setLayoutBoxStyle=function(e,t,n){t?a.linkLayoutBoxStyle(e):(a.layoutStyleObj[n]="auto"===e?"auto":e?""+e+a.layoutStyleObj.quantity:0===e||"0"===e?"0"+a.layoutStyleObj.quantity:"auto",a.updateBoxStyleState())},a.linkLayoutBoxStyle=function(e){var t;t="auto"===e?"auto":0===e?"0"+a.layoutStyleObj.quantity:e?""+e+a.layoutStyleObj.quantity:"auto",a.layoutStyleObj.top=t,a.layoutStyleObj.right=t,a.layoutStyleObj.bottom=t,a.layoutStyleObj.left=t,a.updateBoxStyleState()},a.getStyleValNum=function(e){if("auto"===e)return"";if(e==="0"+a.layoutStyleObj.quantity||"0"===e)return 0;if(e){var t=e.indexOf(a.layoutStyleObj.quantity);return t>-1?parseInt(e.substring(0,t)):parseInt(e)}return 0},a.updateBoxStyleState=function(){var e=a.props,t=e.keyRoute,n=e.updateFormValueData,r=a.state.renderAction;n(t?t+"-unit":"unit",a.layoutStyleObj.top+" "+a.layoutStyleObj.right+" "+a.layoutStyleObj.bottom+" "+a.layoutStyleObj.left),a.setState({renderAction:!r})},a.state={layoutStyleLock:!1,renderAction:!1},a.updateBoxStyleState=a.updateBoxStyleState.bind(a),a.initBoxStyle=a.initBoxStyle.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){this.initBoxStyle()},a.componentWillReceiveProps=function(e){this.initBoxStyle()},a.render=function(){var e=this,t=this.props,a=t.nodeKey,n=t.targetJsonSchema,r=t.pageScreen,o=this.state,i=o.renderAction,l=o.layoutStyleLock,c=n.readOnly||!1;return T.createElement("div",{className:("wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp")+" "+(i?"render-mark":""),id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},c?"[只读]":""),T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title.length>(c?4:6)?n.title:""},n.title))),T.createElement("div",{className:"content-item layout-box-style-container"},T.createElement("div",{className:"center-box"},T.createElement(Q.Tooltip,{placement:"top",title:l?"点击解锁联动":"点击联动"},T.createElement("img",{src:"//storage.360buyimg.com/widgeteditor/widget-editor-web/json-editor/"+(l?"link":"unlink")+".svg",className:"lock-icon",onClick:function(){e.setState({layoutStyleLock:!l})}}))),T.createElement(Q.InputNumber,{name:"layoutPaddingTop",className:"layout-input-number layout-item layout-item-top\n "+("%"===this.layoutStyleObj.quantity?"percent":this.layoutStyleObj.quantity)+"-quantity-box",size:"small",value:this.getStyleValNum(this.layoutStyleObj.top),onPressEnter:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"top")},onBlur:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"top")}}),T.createElement(Q.InputNumber,{name:"layoutPaddingRight",className:"layout-input-number layout-item layout-item-right\n "+("%"===this.layoutStyleObj.quantity?"percent":this.layoutStyleObj.quantity)+"-quantity-box",size:"small",value:this.getStyleValNum(this.layoutStyleObj.right),onPressEnter:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"right")},onBlur:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"right")}}),T.createElement(Q.InputNumber,{name:"layoutPaddingBottom",className:"layout-input-number layout-item layout-item-bottom\n "+("%"===this.layoutStyleObj.quantity?"percent":this.layoutStyleObj.quantity)+"-quantity-box",size:"small",value:this.getStyleValNum(this.layoutStyleObj.bottom),onPressEnter:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"bottom")},onBlur:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"bottom")}}),T.createElement(Q.InputNumber,{name:"layoutPaddingLeft",className:"layout-input-number layout-item layout-item-left\n "+("%"===this.layoutStyleObj.quantity?"percent":this.layoutStyleObj.quantity)+"-quantity-box",size:"small",value:this.getStyleValNum(this.layoutStyleObj.left),onPressEnter:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"left")},onBlur:function(t){var a=t.target.value;e.setLayoutBoxStyle(a,l,"left")}})))},t}(T.PureComponent));Ie.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var qe=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(Ie)),We=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=e.target.value,n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r,t)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.nodeKey,a=e.keyRoute,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(a),i=n.items.enum,l=n.items.enumextra;return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp",key:t,id:t},T.createElement("div",{className:"element-title"},T.createElement(Q.Tooltip,{title:"wideScreen"===r?n.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title.length>6?n.title:""},n.title)),"mobileScreen"===r&&n.description&&T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Radio.Group,{style:{display:"inline-block"},onChange:this.handleValueChange,defaultValue:o||n.default},i&&i.length>0&&i.map((function(e,a){var n=l[a],r=t+"-radio-"+e;return T.createElement(Q.Radio,{value:e,key:r},n)}))))))},t}(T.PureComponent);We.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Fe=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(We)),Ue=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute;(0,t.updateFormValueData)(n,e)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.nodeKey,a=e.keyRoute,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(a),i=n.items.enum,l=n.items.enumextra;return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp",key:t,id:t},T.createElement("div",{className:"element-title"},T.createElement(Q.Tooltip,{title:"wideScreen"===r?n.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title.length>6?n.title:""},n.title)),"mobileScreen"===r&&n.description&&T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Checkbox.Group,{style:{display:"inline-block"},onChange:this.handleValueChange,defaultValue:o||n.default},i&&i.length>0&&i.map((function(e,a){var n=l[a],r=t+"-radio-"+e;return T.createElement(Q.Checkbox,{value:e,key:r},n)}))))))},t}(T.PureComponent);Ue.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var ze=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(Ue)),He=Q.Input.TextArea,$e=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=e.target.value,n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r,t)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(t),i=n.readOnly||!1,l=n.isRequired||!1;return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp container-warp":"mobile-screen-element-warp",key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},i?"[只读]":""),T.createElement(Q.Tooltip,{title:"wideScreen"===r?n.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title&&n.title.length>(i?4:6)?n.title:""},n.title)),"mobileScreen"===r&&n.description&&T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(He,{style:{display:"inline-block"},rows:4,disabled:i,required:l,placeholder:n.placeholder||"请输入"+n.title,defaultValue:o||n.default,onPressEnter:this.handleValueChange,onBlur:this.handleValueChange}))))},t}(T.PureComponent);$e.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var Ge=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)($e)),Ze=require("braft-editor"),Qe=__webpack_require__.n(Ze),Ye=require("braft-extensions/dist/color-picker"),Xe=__webpack_require__.n(Ye),et=(require("braft-extensions/dist/color-picker.css"),require("braft-extensions/dist/table")),tt=__webpack_require__.n(et);require("braft-extensions/dist/table.css"),require("braft-editor/dist/index.css"),__webpack_require__(184),Qe().use([Xe()({theme:"light"})]),Qe().use(tt()({defaultColumns:3,defaultRows:3,withDropdown:!1,columnResizable:!1,exportAttrString:'border="1" style="border-collapse: collapse"'}));var at=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleEditorChange=function(e){var t=a.props,n=t.keyRoute;(0,t.updateFormValueData)(n,e.toHTML())},a.state={isClosed:!0,allControls:["undo","redo","separator","headings","font-size","line-height","letter-spacing","separator","text-color","bold","italic","underline","strike-through","separator","superscript","subscript","remove-styles","separator","text-indent","text-align","separator","list-ul","list-ol","blockquote","code","separator","link","separator","media","table","hr","separator","fullscreen"],baseControls:["font-size","text-color","bold","italic"]},a.handleEditorChange=a.handleEditorChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this),this.props.pageScreen&&"wideScreen"===this.props.pageScreen&&this.setState({isClosed:!1})},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute?se.x.call(this,e.keyRoute):e.pageScreen!==this.props.pageScreen&&e.pageScreen&&"wideScreen"===e.pageScreen&&this.setState({isClosed:!1})},a.render=function(){var e=this,t=this.props,a=t.keyRoute,n=t.nodeKey,r=t.targetJsonSchema,o=t.pageScreen,i=t.getJSONDataByKeyRoute,l=this.state.isClosed,c=i(a),s=Qe().createEditorState(c),u=r.readOnly||!1;return T.createElement("div",{className:"text-editor-box mobile-screen-element-warp",key:n,id:n},T.createElement("div",{className:"element-title",onClick:function(t){e.setState({isClosed:!l}),t.preventDefault(),t.stopPropagation()}},T.createElement("span",{className:"title-text warning-text"},u?"[只读]":""),T.createElement("span",{className:"title-text",title:"wideScreen"===o&&r.title&&r.title.length>(u?4:6)?r.title:""},r.title),r.description&&T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"})),l?T.createElement(re.RightOutlined,{className:"close-operate-btn"}):T.createElement(re.DownOutlined,{className:"close-operate-btn"})),T.createElement("div",{className:"content-item "+(l?"closed":"")},T.createElement("div",{className:"form-item-box"},T.createElement(Qe(),{key:n+"-textEditor",controls:"wideScreen"===o?this.state.allControls:this.state.baseControls,media:{accepts:{image:"image/png,image/jpeg,image/gif,image/webp,image/apng,image/svg",video:!1,audio:!1},pasteImage:!0},defaultValue:s,readOnly:u,placeholder:r.placeholder||"请输入"+r.title,lineHeights:[1,1.2,1.5,1.75,2,2.5,3,4],onChange:this.handleEditorChange,onSave:this.handleEditorChange}))))},t}(T.PureComponent);at.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any,pageScreen:L().any};var nt=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(at)),rt=(__webpack_require__(597),function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute,r=t.targetJsonSchema,o=t.updateFormValueData;e<r.minimum?Q.message.warning("小于设定的最小数值"+r.minimum+",请重新输入。"):e>r.maximum?Q.message.warning("超过设定的最大数值"+r.maximum+",请重新输入。"):(o(n,e),a.setState({renderTime:(new Date).getTime()}))},a.numberChange=function(e,t){var n=0;t&&(n=t),"plus"===e?n+=1:"minus"===e&&(n-=1),a.handleValueChange(n)},a.state={renderTime:(new Date).getTime()},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.keyRoute,n=t.nodeKey,r=t.targetJsonSchema,o=t.pageScreen,i=t.getJSONDataByKeyRoute,l=this.state.renderTime,c=i(a),s=r.readOnly||!1,u=r.isRequired||!1,p=(0,Y.y8)(r.format);return T.createElement("div",{className:"wideScreen"===o?"wide-screen-element-warp":"mobile-screen-element-warp "+(p?"two-col-element-warp":""),key:n+"-"+l,id:n},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},s?"[只读]":""),T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement("span",{className:"title-text",title:(p||"wideScreen"===o)&&r.title.length>(s?4:6)?r.title:""},r.title))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement("div",{className:"input-number-wrap"},T.createElement("div",{className:"number-btn minus",title:"点击减1",onClick:function(){e.numberChange("minus",(0,Y.jI)(c)?c:r.default)}},"-"),T.createElement(Q.InputNumber,{className:"number-cont",style:{display:"inline-block"},disabled:s,required:u,placeholder:r.placeholder||"请输入"+r.title,min:r.minimum||0,max:r.maximum||1e6,defaultValue:(0,Y.jI)(c)?c:r.default,onChange:this.handleValueChange}),T.createElement("div",{className:"number-btn plus",title:"点击加1",onClick:function(){e.numberChange("plus",(0,Y.jI)(c)?c:r.default)}},"+")))))},t}(T.PureComponent));rt.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var ot=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(rt)),it=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute;(0,t.updateFormValueData)(n,e)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(t),i=(0,Y.y8)(n.format);return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp "+(i?"two-col-element-warp":""),key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement("span",{className:"title-text",title:(i||"wideScreen"===r)&&n.title.length>6?n.title:""},n.title))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.Switch,{style:{display:"inline-block"},defaultChecked:void 0!==o?o:n.default,checkedChildren:"true",unCheckedChildren:"false",onChange:this.handleValueChange}))))},t}(T.PureComponent);it.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var lt=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(it)),ct=require("moment"),st=__webpack_require__.n(ct),ut={"date-time":"YYYY-MM-DD HH:mm",date:"YYYY-MM-DD",time:"HH:mm"},pt=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e,t){var n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r,t)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.keyRoute,a=e.nodeKey,n=e.targetJsonSchema,r=e.pageScreen,o=e.getJSONDataByKeyRoute,i=(0,$.getCurrentFormat)(n),l=n.readOnly||!1,c=n.isRequired||!1,s=ut[i]||ut[0],u=o(t)||n.default,p=(0,Y.y8)(i);return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp "+(p?"two-col-element-warp":""),key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},l?"[只读]":""),T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement("span",{className:"title-text",title:(p||"wideScreen"===r)&&n.title.length>(l?4:6)?n.title:""},n.title))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.DatePicker,{style:{display:"inline-block"},disabled:l,required:c,showTime:"date-time"===i,format:s,placeholder:n.placeholder||"请输入"+n.title,defaultValue:u&&st()(u,s),onChange:this.handleValueChange}))))},t}(T.PureComponent);pt.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var mt=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(pt)),dt=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e,t){var n=a.props,r=n.keyRoute;(0,n.updateFormValueData)(r,t)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.nodeKey,a=e.keyRoute,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(a)||n.default,i=n.readOnly||!1,l=n.isRequired||!1,c=(0,Y.y8)(n.format);return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp "+(c?"two-col-element-warp":""),key:t,id:t},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},i?"[只读]":""),T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement("span",{className:"title-text",title:(c||"wideScreen"===r)&&n.title.length>(i?4:6)?n.title:""},n.title))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement(Q.TimePicker,{style:{display:"inline-block"},disabled:i,required:l,placeholder:n.placeholder||"请输入"+n.title,defaultValue:o&&st()(o,"HH:mm"),onChange:this.handleValueChange}))))},t}(T.PureComponent);dt.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var yt=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(dt)),ht=require("react-color"),gt=(__webpack_require__(539),function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=e.rgb,n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")",r=a.props,o=r.keyRoute;(0,r.updateFormValueData)(o,n),a.setState({renderState:!a.state.renderState})},a.deleteColor=function(){var e=a.props,t=e.keyRoute;(0,e.updateFormValueData)(t,"initial"),Q.message.success("已移除当前设置的颜色值"),a.setState({renderState:!a.state.renderState})},a.state={renderState:!1,displayColorPicker:!1},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.keyRoute,n=t.nodeKey,r=t.targetJsonSchema,o=t.pageScreen,i=t.getJSONDataByKeyRoute,l=this.state,c=l.renderState,s=l.displayColorPicker,u=i(a),p=(0,Y.y8)(r.format),m=T.createElement(ht.SketchPicker,{className:"color-sketch-picker",key:n+"-SketchPicker",color:u||r.default,onChange:this.handleValueChange});return T.createElement("div",{className:"wideScreen"===o?"wide-screen-element-warp":"mobile-screen-element-warp "+(p?"two-col-element-warp":""),key:n,id:n},T.createElement("div",{className:"element-title"},T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement("span",{className:"title-text",title:(p||"wideScreen"===o)&&r.title.length>6?r.title:""},r.title))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box"},T.createElement("div",{className:"color-btn-wrap color-item-form "+(s?"selected":""),onClick:function(){e.setState({displayColorPicker:!s})}},T.createElement(Q.Popover,{content:m,title:"颜色选择器",trigger:"click"},T.createElement("button",{className:"ant-input color-btn render-dom-"+c,style:{backgroundColor:u||r.default}})),T.createElement(Q.Tooltip,{title:"点击移除当前颜色值",placement:"top"},T.createElement(re.CloseOutlined,{className:"delete-bgColor-btn",onClick:function(){e.deleteColor()}})),T.createElement("span",{className:"arrow"})))))},t}(T.PureComponent));gt.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var St=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(gt)),_t=(require("ace-builds/src-noconflict/mode-html"),__webpack_require__(953),function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute;(0,t.updateFormValueData)(n,e)},a.state={isShowWarn:!1,warnText:""},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this,t=this.props,a=t.nodeKey,n=t.keyRoute,r=t.targetJsonSchema,o=t.pageScreen,i=t.getJSONDataByKeyRoute,l=this.state,c=l.isShowWarn,s=l.warnText,u=r.readOnly||!1,p=i(n);return p=void 0!==p?p:r.default||"<p>hello</p>",(0,X.Gv)(p)&&(p=JSON.stringify(p,null,2)),T.createElement("div",{className:"wideScreen"===o?"wide-screen-element-warp container-warp":"mobile-screen-element-warp",key:a,id:a},T.createElement("div",{className:"element-title"},T.createElement("span",{className:"title-text warning-text"},u?"[只读]":""),T.createElement(Q.Tooltip,{title:"wideScreen"===o?r.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===o&&r.title&&r.title.length>(u?4:6)?r.title:""},r.title)),"mobileScreen"===o&&r.description&&T.createElement(Q.Tooltip,{title:r.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},c&&T.createElement("div",{className:"warning-box code-area-item"},T.createElement("div",{className:"warning-img"},"X"),T.createElement("div",{className:"warning-text"},s)),T.createElement(ie(),{id:"code_area_ace",key:a+"-ace",className:"code-area-item",value:p,mode:"html",theme:"monokai",name:"JS_CODE_EDIT",fontSize:14,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,readOnly:u,minLines:5,maxLines:30,width:"100%",onChange:function(t){try{e.handleValueChange(t),e.setState({isShowWarn:!1})}catch(a){e.handleValueChange(t),e.setState({warnText:a.message,isShowWarn:!0})}},setOptions:{useWorker:!1,showLineNumbers:!0,tabSize:2}})))},t}(T.PureComponent));_t.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var ft=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(_t)),Ot=(__webpack_require__(102),Q.Select.Option),Et=function(e){function t(t){var a;return(a=e.call(this,t)||this).handleValueChange=function(e){var t=a.props,n=t.keyRoute;(0,t.updateFormValueData)(n,e)},a.handleValueChange=a.handleValueChange.bind(a),a}j()(t,e);var a=t.prototype;return a.componentWillMount=function(){se.x.call(this)},a.componentWillReceiveProps=function(e){e.keyRoute!==this.props.keyRoute&&se.x.call(this,e.keyRoute)},a.render=function(){var e=this.props,t=e.nodeKey,a=e.keyRoute,n=e.targetJsonSchema,r=e.pageScreen,o=(0,e.getJSONDataByKeyRoute)(a),i=n.items.enum,l=n.items.enumextra,c=(0,Y.y8)(n.format);return T.createElement("div",{className:"wideScreen"===r?"wide-screen-element-warp":"mobile-screen-element-warp "+(c?"two-col-element-warp":""),key:t,id:t},T.createElement("div",{className:"element-title"},T.createElement(Q.Tooltip,{title:"wideScreen"===r?n.description:"",placement:"top"},T.createElement("span",{className:"title-text",title:"wideScreen"===r&&n.title.length>6?n.title:""},n.title)),"mobileScreen"===r&&n.description&&T.createElement(Q.Tooltip,{title:n.description,placement:"top"},T.createElement(re.InfoCircleOutlined,{className:"info-icon"}))),T.createElement("div",{className:"content-item"},T.createElement("div",{className:"form-item-box single-select-box"},T.createElement(Q.Select,{style:{display:"inline-block"},onChange:this.handleValueChange,defaultValue:o||n.default},i&&i.length>0&&i.map((function(e,a){var n=l[a],r=t+"-radio-"+e;return T.createElement(Ot,{value:e,key:r},n)}))))))},t}(T.PureComponent);Et.propTypes={parentType:L().string,jsonKey:L().string,indexRoute:L().string,keyRoute:L().string,nodeKey:L().string,targetJsonSchema:L().any};var bt=(0,V.inject)((function(e){return{pageScreen:e.JSONSchemaStore.pageScreen,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,updateFormValueData:e.JSONEditorStore.updateFormValueData,getJSONDataTempByKeyRoute:e.JSONEditorStore.getJSONDataTempByKeyRoute}}))((0,V.observer)(Et)),vt=function(e){var t=e.nodeKey,a=(e.jsonKey,e.targetJsonSchema),n=e.getJSONDataByKeyRoute,r=(e.keyRoute2indexRoute,(0,$.getCurrentFormat)(a)),o={};a.hiddenRule&&(o=a.hiddenRule);var i,l="";if(o.conditionProp&&(0,Y.jI)(o.conditionValue)){var c=o.conditionProp,s=o.conditionValue,u=c.keyRoute;if(s===(l=n(u)))return"";if(a.elemIndexRoute&&a.propIndexRoute){var p=u.split("-"),m=p.pop()+"__"+a.elemIndexRoute.replaceAll("-","x"),d=p.join("-");if(d){var y=n(d),h=Object.keys(y);if(s===(l=y[m=h.find((function(e){return e.indexOf(m)>-1}))]))return""}}}switch(i=t+"-"+l,e.nodeKey=i,r){case"object":case"func":case"style":case"data":case"widgets":case"func-schema":case"style-schema":case"data-schema":case"widgets-schema":case"event-schema":return P().createElement(me,ne()({},e,{key:i}));case"array":return P().createElement(fe,ne()({},e,{key:i}));case"dynamic-data":return P().createElement(Be,ne()({},e,{key:i}));case"datasource":return P().createElement(Re,ne()({},e,{key:i}));case"event":return P().createElement(Ve,ne()({},e,{key:i}));case"quantity":return P().createElement(Le,ne()({},e,{key:i}));case"box-style":return P().createElement(qe,ne()({},e,{key:i}));case"radio":return P().createElement(Fe,ne()({},e,{key:i}));case"single-select":return P().createElement(bt,ne()({},e,{key:i}));case"select":return P().createElement(ze,ne()({},e,{key:i}));case"input":default:return P().createElement(Je,ne()({},e,{key:i}));case"textarea":return P().createElement(Ge,ne()({},e,{key:i}));case"text-editor":return P().createElement(nt,ne()({},e,{key:i}));case"number":return P().createElement(ot,ne()({},e,{key:i}));case"boolean":return P().createElement(lt,ne()({},e,{key:i}));case"date":case"date-time":return P().createElement(mt,ne()({},e,{key:i}));case"time":return P().createElement(yt,ne()({},e,{key:i}));case"url":return P().createElement(Ne,ne()({},e,{key:i}));case"color":return P().createElement(St,ne()({},e,{key:i}));case"json":return P().createElement(Ee,ne()({},e,{key:i}));case"codearea":return P().createElement(be.A,ne()({},e,{key:i}));case"htmlarea":return P().createElement(ft,ne()({},e,{key:i}))}},Nt=(__webpack_require__(930),Q.Collapse.Panel),Dt=Q.Tabs.TabPane,Rt=function(e){function t(t){var a;if((a=e.call(this,t)||this).catchViewStyle=function(e){switch(e){case"fold":default:return"fold";case"tabs":return"tabs"}},a.renderHeader=function(e){switch(e){case"func":return"功能设置";case"style":return"样式设置";case"data":return"数据设置";default:return"属性设置"}},a.state={jsonView:t.jsonView||!1,viewStyle:a.catchViewStyle(t.viewStyle)},t.schemaData)a.props.initJSONSchemaData(t.schemaData),a.props.initJSONData(t.jsonData);else if(t.jsonData){var n=(0,$.json2schema)(t.jsonData);a.props.initJSONSchemaData(n),a.props.initJSONData(t.jsonData)}return t.wideScreen&&a.props.setPageScreen(t.wideScreen),t.onChange&&a.props.initOnChange(t.onChange),t.dynamicDataList&&a.props.setDynamicDataList(t.dynamicDataList),a}j()(t,e);var a=t.prototype;return a.componentWillReceiveProps=function(e){(0,Y.n4)(e.schemaData,this.props.schemaData)||this.props.JSONSchemaChange(e.schemaData),(0,Y.n4)(e.jsonData,this.props.jsonData)||this.props.initJSONData(e.jsonData),(0,Y.n4)(e.jsonView,this.props.jsonView)||this.setState({jsonView:e.jsonView}),(0,Y.n4)(e.viewStyle,this.props.viewStyle)||this.setState({viewStyle:e.viewStyle}),(0,Y.n4)(e.wideScreen,this.props.wideScreen)||this.props.setPageScreen(e.wideScreen),(0,Y.n4)(e.onChange,this.props.onChange)||this.props.initOnChange(e.onChange),(0,Y.n4)(e.dynamicDataList,this.props.dynamicDataList)||this.props.setDynamicDataList(e.dynamicDataList)},a.render=function(){var e=this,t=this.props,a=t.jsonSchema,n=t.lastUpdateTime,r=t.jsonLastUpdateTime,o=t.getJSONDataByKeyRoute,i=t.keyRoute2indexRoute,l=this.state,c=l.jsonView,s=l.viewStyle,u=(0,$.isEmptySchema)(a),p=(0,$.isStructuredSchema)(a);return T.createElement("div",{className:"json-editor-container"},u&&T.createElement("p",{className:"json-editor-empty"},"当前jsonSchema没有数据内容"),!u&&!c&&T.createElement(T.Fragment,null,p&&T.createElement(T.Fragment,null,"fold"===s&&T.createElement(Q.Collapse,{defaultActiveKey:a.propertyOrder,expandIconPosition:"right",bordered:!1},a.propertyOrder.map((function(t,l){var c=l,s=t,u=t,m=a.properties[u],d=(0,$.getCurrentFormat)(m),y=n+"-"+r+"-"+d+"-"+u;return m.propertyOrder&&m.propertyOrder.length>0?T.createElement(Nt,{header:m.title||e.renderHeader(d),key:u},vt({parentType:d,jsonKey:u,indexRoute:c,keyRoute:s,nodeKey:y,targetJsonSchema:m,isStructuredSchema:p,getJSONDataByKeyRoute:o,keyRoute2indexRoute:i})):""}))),"tabs"===s&&T.createElement(Q.Tabs,{className:"tabs-schema-box",defaultActiveKey:a.propertyOrder[0],centered:!0,hideAdd:!0},a.propertyOrder.map((function(t,l){var c=l,s=t,u=t,m=a.properties[u],d=(0,$.getCurrentFormat)(m),y=n+"-"+r+"-"+d+"-"+u;return m.propertyOrder&&m.propertyOrder.length>0?T.createElement(Dt,{tab:m.title||e.renderHeader(d),key:u,closable:!1,className:"tabs-schema-item"},vt({parentType:d,jsonKey:u,indexRoute:c,keyRoute:s,nodeKey:y,targetJsonSchema:m,isStructuredSchema:p,getJSONDataByKeyRoute:o,keyRoute2indexRoute:i})):""})))),!p&&T.createElement(T.Fragment,null,vt({parentType:"",jsonKey:"",indexRoute:"",keyRoute:"",nodeKey:"",targetJsonSchema:a,getJSONDataByKeyRoute:o,keyRoute2indexRoute:i}))),!u&&c&&T.createElement(ce,{nodeKey:"jsonView",keyRoute:"",targetJsonSchema:a}))},t}(T.PureComponent);Rt.propTypes={viewStyle:L().any,wideScreen:L().any,onChange:L().func,jsonView:L().any,schemaData:L().object,jsonData:L().object,dynamicDataList:L().any};var wt=(0,V.inject)((function(e){return{jsonSchema:e.JSONSchemaStore.jsonSchema,lastUpdateTime:e.JSONSchemaStore.lastUpdateTime,jsonLastUpdateTime:e.JSONEditorStore.lastUpdateTime,initJSONSchemaData:e.JSONSchemaStore.initJSONSchemaData,JSONSchemaChange:e.JSONSchemaStore.JSONSchemaChange,initJSONData:e.JSONEditorStore.initJSONData,initOnChange:e.JSONEditorStore.initOnChange,getJSONDataByKeyRoute:e.JSONEditorStore.getJSONDataByKeyRoute,keyRoute2indexRoute:e.JSONSchemaStore.keyRoute2indexRoute,setDynamicDataList:e.JSONEditorStore.setDynamicDataList,setPageScreen:e.JSONSchemaStore.setPageScreen}}))((0,V.observer)(Rt)),Jt=(__webpack_require__(920),function(e){function t(t){var a;return(a=e.call(this,t)||this).state={rootJSONStore:new te},a}return j()(t,e),t.prototype.render=function(){var e=this.props.element,t=this.state.rootJSONStore,a=T.createElement(V.Provider,{JSONSchemaStore:t.JSONSchemaStore,JSONEditorStore:t.JSONEditorStore},T.createElement(wt,this.props));return e?(M().render(e,a),""):a},t}(T.PureComponent));Jt.propTypes={viewStyle:L().any,wideScreen:L().any,onChange:L().func,jsonView:L().any,schemaData:L().any,jsonData:L().any,element:L().any}}(),__webpack_exports__}()}));
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wibetter/json-editor",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "JSON数据可视化/JSONEditor, 可视化界面编辑json
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "JSON数据可视化/JSONEditor, 可视化界面编辑json数据",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"json",
|
|
7
7
|
"json数据可视化",
|
|
8
8
|
"表单可视化"
|
|
9
9
|
],
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "wibetter",
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"main": "
|
|
12
|
+
"main": "lib/index.js",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"dev": "akfun dev",
|
|
15
15
|
"build2lib": "akfun build2lib",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"format": "prettier --write \"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}\""
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"lib/*",
|
|
21
|
+
"esm/*"
|
|
22
22
|
],
|
|
23
23
|
"husky": {
|
|
24
24
|
"hooks": {
|
|
@@ -40,28 +40,28 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@ant-design/icons": "^4.2.1",
|
|
43
|
-
"@wibetter/json-schema-editor": "^
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"antd": "^
|
|
43
|
+
"@wibetter/json-schema-editor": "^5.0.0",
|
|
44
|
+
"ace-builds": "^1.35.4",
|
|
45
|
+
"@wibetter/json-utils": "^1.2.31",
|
|
46
|
+
"antd": "^5.20.1",
|
|
47
47
|
"braft-editor": "^2.3.9",
|
|
48
48
|
"braft-extensions": "^0.1.1",
|
|
49
49
|
"mobx": "^5.15.4",
|
|
50
50
|
"mobx-react": "^6.2.2",
|
|
51
51
|
"moment": "^2.27.0",
|
|
52
|
-
"prop-types": "^15.
|
|
52
|
+
"prop-types": "^15.8.1",
|
|
53
53
|
"react": "^16.8.6",
|
|
54
|
-
"react-ace": "^
|
|
54
|
+
"react-ace": "^12.0.0",
|
|
55
55
|
"react-color": "^2.19.3",
|
|
56
56
|
"react-dom": "^16.8.6"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@commitlint/cli": "^
|
|
60
|
-
"@commitlint/config-conventional": "^
|
|
61
|
-
"akfun": "^
|
|
59
|
+
"@commitlint/cli": "^19.4.0",
|
|
60
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
61
|
+
"akfun": "^5.0.0",
|
|
62
62
|
"husky": "^4.2.5",
|
|
63
63
|
"lint-staged": "^10.2.9",
|
|
64
|
-
"prettier": "^
|
|
64
|
+
"prettier": "^3.3.3"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">= 10.13.0",
|