@cniot/mdd-editor 0.2.0-beta.49 → 0.2.0-beta.50
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/build/index.cjs.js +3 -3
- package/build/index.es.js +29 -19
- package/package.json +1 -1
- package/src/schema/edit-table/index.js +5 -0
package/build/index.es.js
CHANGED
|
@@ -3842,6 +3842,7 @@ class EditTableSchema extends Schema {
|
|
|
3842
3842
|
hasAddRow = true,
|
|
3843
3843
|
hasDeleteRow = true,
|
|
3844
3844
|
headerToolbar = [],
|
|
3845
|
+
maxRowLength,
|
|
3845
3846
|
...more2
|
|
3846
3847
|
} = isCompleteSchema ? props.body : props;
|
|
3847
3848
|
super(more2);
|
|
@@ -3851,6 +3852,7 @@ class EditTableSchema extends Schema {
|
|
|
3851
3852
|
this.deleteBtnText = deleteBtnText;
|
|
3852
3853
|
this.hasSaveBtn = hasSaveBtn;
|
|
3853
3854
|
this.hasAddRow = hasAddRow;
|
|
3855
|
+
this.maxRowLength = maxRowLength;
|
|
3854
3856
|
this.hasDeleteRow = hasDeleteRow;
|
|
3855
3857
|
this.initApi = new AjaxSchema(initApi);
|
|
3856
3858
|
this.submitApi = new AjaxSchema(submitApi);
|
|
@@ -3899,7 +3901,8 @@ class EditTableSchema extends Schema {
|
|
|
3899
3901
|
hasSaveBtn,
|
|
3900
3902
|
hasAddRow,
|
|
3901
3903
|
hasDeleteRow,
|
|
3902
|
-
headerToolbar
|
|
3904
|
+
headerToolbar,
|
|
3905
|
+
maxRowLength
|
|
3903
3906
|
} = body;
|
|
3904
3907
|
if (this.willDetach) {
|
|
3905
3908
|
this.willDetach();
|
|
@@ -3914,6 +3917,7 @@ class EditTableSchema extends Schema {
|
|
|
3914
3917
|
this.saveBtnText = saveBtnText;
|
|
3915
3918
|
this.hasSaveBtn = hasSaveBtn;
|
|
3916
3919
|
this.hasAddRow = hasAddRow;
|
|
3920
|
+
this.maxRowLength = maxRowLength;
|
|
3917
3921
|
this.hasDeleteRow = hasDeleteRow;
|
|
3918
3922
|
this.willDetach = this.initChangeListener();
|
|
3919
3923
|
}
|
|
@@ -3967,6 +3971,7 @@ class EditTableSchema extends Schema {
|
|
|
3967
3971
|
deleteBtnText: this.deleteBtnText,
|
|
3968
3972
|
hasSaveBtn: this.hasSaveBtn,
|
|
3969
3973
|
hasAddRow: this.hasAddRow,
|
|
3974
|
+
maxRowLength: this.maxRowLength,
|
|
3970
3975
|
hasDeleteRow: this.hasDeleteRow,
|
|
3971
3976
|
initApi: this.initApi.getJSON(),
|
|
3972
3977
|
submitApi: this.submitApi.getJSON(),
|
|
@@ -4096,7 +4101,7 @@ function shouldUseNative() {
|
|
|
4096
4101
|
return false;
|
|
4097
4102
|
}
|
|
4098
4103
|
}
|
|
4099
|
-
var
|
|
4104
|
+
var objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
|
|
4100
4105
|
var from;
|
|
4101
4106
|
var to = toObject(target);
|
|
4102
4107
|
var symbols;
|
|
@@ -5488,7 +5493,7 @@ function createSingletonDndContext(backend, context = getGlobalContext(), option
|
|
|
5488
5493
|
function getGlobalContext() {
|
|
5489
5494
|
return typeof global !== "undefined" ? global : window;
|
|
5490
5495
|
}
|
|
5491
|
-
var
|
|
5496
|
+
var fastDeepEqual = function equal(a, b) {
|
|
5492
5497
|
if (a === b)
|
|
5493
5498
|
return true;
|
|
5494
5499
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
@@ -5533,7 +5538,7 @@ function useCollector(monitor, collect, onUpdate) {
|
|
|
5533
5538
|
);
|
|
5534
5539
|
const updateCollected = useCallback(() => {
|
|
5535
5540
|
const nextValue = collect(monitor);
|
|
5536
|
-
if (!
|
|
5541
|
+
if (!fastDeepEqual(collected, nextValue)) {
|
|
5537
5542
|
setCollected(nextValue);
|
|
5538
5543
|
if (onUpdate) {
|
|
5539
5544
|
onUpdate();
|
|
@@ -7992,7 +7997,7 @@ const schemaScenarioList = async (params) => {
|
|
|
7992
7997
|
return null;
|
|
7993
7998
|
return res;
|
|
7994
7999
|
};
|
|
7995
|
-
var
|
|
8000
|
+
var hox = {};
|
|
7996
8001
|
var createModel$2 = {};
|
|
7997
8002
|
var container$1 = {};
|
|
7998
8003
|
var __values$1 = commonjsGlobal && commonjsGlobal.__values || function(o) {
|
|
@@ -8057,9 +8062,9 @@ function Executor(props) {
|
|
|
8057
8062
|
}
|
|
8058
8063
|
executor.Executor = Executor;
|
|
8059
8064
|
var renderer = {};
|
|
8060
|
-
var
|
|
8065
|
+
var reactReconciler = { exports: {} };
|
|
8061
8066
|
var reactReconciler_production_min = { exports: {} };
|
|
8062
|
-
var
|
|
8067
|
+
var scheduler = { exports: {} };
|
|
8063
8068
|
var scheduler_production_min = {};
|
|
8064
8069
|
/** @license React v0.20.2
|
|
8065
8070
|
* scheduler.production.min.js
|
|
@@ -8343,7 +8348,7 @@ var scheduler_production_min = {};
|
|
|
8343
8348
|
};
|
|
8344
8349
|
})(scheduler_production_min);
|
|
8345
8350
|
{
|
|
8346
|
-
|
|
8351
|
+
scheduler.exports = scheduler_production_min;
|
|
8347
8352
|
}
|
|
8348
8353
|
/** @license React v0.26.2
|
|
8349
8354
|
* react-reconciler.production.min.js
|
|
@@ -8356,7 +8361,7 @@ var scheduler_production_min = {};
|
|
|
8356
8361
|
(function(module) {
|
|
8357
8362
|
module.exports = function $$$reconciler($$$hostConfig) {
|
|
8358
8363
|
var exports = {};
|
|
8359
|
-
var aa =
|
|
8364
|
+
var aa = objectAssign, ba = React$1, m2 = scheduler.exports;
|
|
8360
8365
|
function q2(a) {
|
|
8361
8366
|
for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++)
|
|
8362
8367
|
b += "&args[]=" + encodeURIComponent(arguments[c]);
|
|
@@ -12999,13 +13004,13 @@ var scheduler_production_min = {};
|
|
|
12999
13004
|
};
|
|
13000
13005
|
})(reactReconciler_production_min);
|
|
13001
13006
|
{
|
|
13002
|
-
|
|
13007
|
+
reactReconciler.exports = reactReconciler_production_min.exports;
|
|
13003
13008
|
}
|
|
13004
13009
|
var __importDefault$1 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
|
13005
13010
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
13006
13011
|
};
|
|
13007
13012
|
Object.defineProperty(renderer, "__esModule", { value: true });
|
|
13008
|
-
var react_reconciler_1 = __importDefault$1(
|
|
13013
|
+
var react_reconciler_1 = __importDefault$1(reactReconciler.exports);
|
|
13009
13014
|
var reconciler = react_reconciler_1.default({
|
|
13010
13015
|
now: Date.now,
|
|
13011
13016
|
getRootHostContext: function() {
|
|
@@ -13250,12 +13255,12 @@ function withModel(useModelOrUseModels, mapModelToProps) {
|
|
|
13250
13255
|
};
|
|
13251
13256
|
}
|
|
13252
13257
|
withModel$1.withModel = withModel;
|
|
13253
|
-
Object.defineProperty(
|
|
13258
|
+
Object.defineProperty(hox, "__esModule", { value: true });
|
|
13254
13259
|
var create_model_1 = createModel$2;
|
|
13255
|
-
var createModel =
|
|
13256
|
-
|
|
13260
|
+
var createModel = hox.createModel = create_model_1.createModel;
|
|
13261
|
+
hox.createLazyModel = create_model_1.createLazyModel;
|
|
13257
13262
|
var with_model_1 = withModel$1;
|
|
13258
|
-
|
|
13263
|
+
hox.withModel = with_model_1.withModel;
|
|
13259
13264
|
function useSwagger() {
|
|
13260
13265
|
const [apiList, setApiList] = useState([]);
|
|
13261
13266
|
const [swaggerInfo, setSwaggerInfo] = useState(null);
|
|
@@ -27153,7 +27158,7 @@ function hackRowDetail$1(schema) {
|
|
|
27153
27158
|
schema.set("rowDetail", void 0);
|
|
27154
27159
|
}
|
|
27155
27160
|
}
|
|
27156
|
-
var
|
|
27161
|
+
var immutabilityHelper = { exports: {} };
|
|
27157
27162
|
(function(module, exports) {
|
|
27158
27163
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27159
27164
|
function stringifiable(obj) {
|
|
@@ -27399,8 +27404,8 @@ var _immutabilityHelper_3_1_1_immutabilityHelper = { exports: {} };
|
|
|
27399
27404
|
return "update(): " + stringifiable(command) + " expects a target of type Set or Map; got " + stringifiable(typeOfTarget);
|
|
27400
27405
|
});
|
|
27401
27406
|
}
|
|
27402
|
-
})(
|
|
27403
|
-
var update = /* @__PURE__ */ getDefaultExportFromCjs(
|
|
27407
|
+
})(immutabilityHelper, immutabilityHelper.exports);
|
|
27408
|
+
var update = /* @__PURE__ */ getDefaultExportFromCjs(immutabilityHelper.exports);
|
|
27404
27409
|
const mddTableArray$1 = "_mddTableArray_16ght_1";
|
|
27405
27410
|
const tableArrayTitle$1 = "_tableArrayTitle_16ght_14";
|
|
27406
27411
|
const tableArrayContent$1 = "_tableArrayContent_16ght_18";
|
|
@@ -29727,6 +29732,11 @@ function FtpBuild({ schema, moduleMap }) {
|
|
|
29727
29732
|
}, /* @__PURE__ */ React$1.createElement(Switch, {
|
|
29728
29733
|
autoWidth: true,
|
|
29729
29734
|
defaultChecked: schema.get("hasAddRow")
|
|
29735
|
+
})), /* @__PURE__ */ React$1.createElement(Form.Item, {
|
|
29736
|
+
label: "\u6700\u5927\u884C\u6570:",
|
|
29737
|
+
name: "maxRowLength"
|
|
29738
|
+
}, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
29739
|
+
defaultValue: schema.get("maxRowLength")
|
|
29730
29740
|
})), schema.get("hasAddRow") && /* @__PURE__ */ React$1.createElement(Form.Item, {
|
|
29731
29741
|
label: "\u65B0\u589E\u884C\u6309\u94AE\u6587\u6848:",
|
|
29732
29742
|
name: "addBtnText"
|
|
@@ -30254,7 +30264,7 @@ function getDefaultIndexStyle() {
|
|
|
30254
30264
|
`;
|
|
30255
30265
|
}
|
|
30256
30266
|
const name = "@cniot/mdd-editor";
|
|
30257
|
-
const version = "0.2.0-beta.
|
|
30267
|
+
const version = "0.2.0-beta.50";
|
|
30258
30268
|
const description = "\u6A21\u578B\u9A71\u52A8\u7F16\u8F91\u5668";
|
|
30259
30269
|
const scripts = {
|
|
30260
30270
|
build: "vite build"
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@ export default class EditTableSchema extends Schema {
|
|
|
31
31
|
hasAddRow = true,
|
|
32
32
|
hasDeleteRow = true,
|
|
33
33
|
headerToolbar = [],
|
|
34
|
+
maxRowLength,
|
|
34
35
|
...more
|
|
35
36
|
} = isCompleteSchema ? props.body : props;
|
|
36
37
|
super(more);
|
|
@@ -41,6 +42,7 @@ export default class EditTableSchema extends Schema {
|
|
|
41
42
|
this.deleteBtnText = deleteBtnText;
|
|
42
43
|
this.hasSaveBtn = hasSaveBtn;
|
|
43
44
|
this.hasAddRow = hasAddRow;
|
|
45
|
+
this.maxRowLength = maxRowLength;
|
|
44
46
|
this.hasDeleteRow = hasDeleteRow;
|
|
45
47
|
|
|
46
48
|
this.initApi = new AjaxSchema(initApi);
|
|
@@ -102,6 +104,7 @@ export default class EditTableSchema extends Schema {
|
|
|
102
104
|
hasAddRow,
|
|
103
105
|
hasDeleteRow,
|
|
104
106
|
headerToolbar,
|
|
107
|
+
maxRowLength,
|
|
105
108
|
} = body;
|
|
106
109
|
|
|
107
110
|
// 先关闭storage的更新
|
|
@@ -119,6 +122,7 @@ export default class EditTableSchema extends Schema {
|
|
|
119
122
|
this.saveBtnText = saveBtnText;
|
|
120
123
|
this.hasSaveBtn = hasSaveBtn;
|
|
121
124
|
this.hasAddRow = hasAddRow;
|
|
125
|
+
this.maxRowLength = maxRowLength;
|
|
122
126
|
this.hasDeleteRow = hasDeleteRow;
|
|
123
127
|
|
|
124
128
|
// 再开启change监听
|
|
@@ -191,6 +195,7 @@ export default class EditTableSchema extends Schema {
|
|
|
191
195
|
deleteBtnText: this.deleteBtnText,
|
|
192
196
|
hasSaveBtn: this.hasSaveBtn,
|
|
193
197
|
hasAddRow: this.hasAddRow,
|
|
198
|
+
maxRowLength: this.maxRowLength,
|
|
194
199
|
hasDeleteRow: this.hasDeleteRow,
|
|
195
200
|
initApi: this.initApi.getJSON(),
|
|
196
201
|
submitApi: this.submitApi.getJSON(),
|