@byteluck-fe/model-driven-engine 2.7.0-alpha.31b → 2.7.0-alpha.35
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 +30 -30
- package/dist/esm/common/ActionManager.js +177 -60
- package/dist/esm/common/DataManager.js +134 -25
- package/dist/esm/common/Engine.js +480 -406
- package/dist/esm/common/OkWorker.js +31 -17
- package/dist/esm/common/Plugin.js +2 -2
- package/dist/esm/common/Runtime.js +80 -104
- package/dist/esm/common/Store.js +63 -62
- package/dist/esm/common/checkerValue.js +108 -108
- package/dist/esm/common/index.js +2 -2
- package/dist/esm/common/proxyState.js +76 -76
- package/dist/esm/index.js +3 -3
- package/dist/esm/plugins/CalcPlugin.js +128 -120
- package/dist/esm/plugins/ControlsEventPlugin.js +196 -73
- package/dist/esm/plugins/ES6ModulePlugin.js +54 -66
- package/dist/esm/plugins/LifecycleEventPlugin.js +198 -79
- package/dist/esm/plugins/StylePlugin.js +26 -11
- package/dist/esm/plugins/index.js +5 -5
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/runtimeUtils.js +5 -7
- package/dist/index.umd.js +8 -8
- package/dist/types/common/ActionManager.d.ts +14 -14
- package/dist/types/common/DataManager.d.ts +10 -10
- package/dist/types/common/Engine.d.ts +184 -181
- package/dist/types/common/OkWorker.d.ts +13 -13
- package/dist/types/common/Plugin.d.ts +6 -6
- package/dist/types/common/Runtime.d.ts +25 -26
- package/dist/types/common/Store.d.ts +50 -50
- package/dist/types/common/checkerValue.d.ts +3 -3
- package/dist/types/common/index.d.ts +2 -2
- package/dist/types/common/proxyState.d.ts +30 -30
- package/dist/types/index.d.ts +3 -3
- package/dist/types/plugins/CalcPlugin.d.ts +121 -121
- package/dist/types/plugins/ControlsEventPlugin.d.ts +15 -15
- package/dist/types/plugins/ES6ModulePlugin.d.ts +26 -27
- package/dist/types/plugins/LifecycleEventPlugin.d.ts +14 -14
- package/dist/types/plugins/StylePlugin.d.ts +12 -12
- package/dist/types/plugins/index.d.ts +5 -5
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/runtimeUtils.d.ts +5 -5
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function _array_with_holes(arr) {
|
|
7
7
|
if (Array.isArray(arr)) return arr;
|
|
8
8
|
}
|
|
9
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -20,7 +20,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
20
20
|
Promise.resolve(value).then(_next, _throw);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function _async_to_generator(fn) {
|
|
24
24
|
return function() {
|
|
25
25
|
var self = this, args = arguments;
|
|
26
26
|
return new Promise(function(resolve, reject) {
|
|
@@ -35,7 +35,7 @@ function _asyncToGenerator(fn) {
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function _class_call_check(instance, Constructor) {
|
|
39
39
|
if (!(instance instanceof Constructor)) {
|
|
40
40
|
throw new TypeError("Cannot call a class as a function");
|
|
41
41
|
}
|
|
@@ -49,12 +49,25 @@ function _defineProperties(target, props) {
|
|
|
49
49
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
53
53
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
54
54
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
55
55
|
return Constructor;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function _define_property(obj, key, value) {
|
|
58
|
+
if (key in obj) {
|
|
59
|
+
Object.defineProperty(obj, key, {
|
|
60
|
+
value: value,
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true
|
|
64
|
+
});
|
|
65
|
+
} else {
|
|
66
|
+
obj[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
function _iterable_to_array_limit(arr, i) {
|
|
58
71
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
59
72
|
if (_i == null) return;
|
|
60
73
|
var _arr = [];
|
|
@@ -78,65 +91,167 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
78
91
|
}
|
|
79
92
|
return _arr;
|
|
80
93
|
}
|
|
81
|
-
function
|
|
94
|
+
function _non_iterable_rest() {
|
|
82
95
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
83
96
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
97
|
+
function _sliced_to_array(arr, i) {
|
|
98
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
86
99
|
}
|
|
87
|
-
function
|
|
100
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
88
101
|
if (!o) return;
|
|
89
|
-
if (typeof o === "string") return
|
|
102
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
90
103
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
91
104
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
92
105
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
93
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
106
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
107
|
+
}
|
|
108
|
+
function _ts_generator(thisArg, body) {
|
|
109
|
+
var f, y, t, g, _ = {
|
|
110
|
+
label: 0,
|
|
111
|
+
sent: function() {
|
|
112
|
+
if (t[0] & 1) throw t[1];
|
|
113
|
+
return t[1];
|
|
114
|
+
},
|
|
115
|
+
trys: [],
|
|
116
|
+
ops: []
|
|
117
|
+
};
|
|
118
|
+
return(g = {
|
|
119
|
+
next: verb(0),
|
|
120
|
+
"throw": verb(1),
|
|
121
|
+
"return": verb(2)
|
|
122
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
123
|
+
return this;
|
|
124
|
+
}), g);
|
|
125
|
+
function verb(n) {
|
|
126
|
+
return function(v) {
|
|
127
|
+
return step([
|
|
128
|
+
n,
|
|
129
|
+
v
|
|
130
|
+
]);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function step(op) {
|
|
134
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
135
|
+
while(_)try {
|
|
136
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
137
|
+
if (y = 0, t) op = [
|
|
138
|
+
op[0] & 2,
|
|
139
|
+
t.value
|
|
140
|
+
];
|
|
141
|
+
switch(op[0]){
|
|
142
|
+
case 0:
|
|
143
|
+
case 1:
|
|
144
|
+
t = op;
|
|
145
|
+
break;
|
|
146
|
+
case 4:
|
|
147
|
+
_.label++;
|
|
148
|
+
return {
|
|
149
|
+
value: op[1],
|
|
150
|
+
done: false
|
|
151
|
+
};
|
|
152
|
+
case 5:
|
|
153
|
+
_.label++;
|
|
154
|
+
y = op[1];
|
|
155
|
+
op = [
|
|
156
|
+
0
|
|
157
|
+
];
|
|
158
|
+
continue;
|
|
159
|
+
case 7:
|
|
160
|
+
op = _.ops.pop();
|
|
161
|
+
_.trys.pop();
|
|
162
|
+
continue;
|
|
163
|
+
default:
|
|
164
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
165
|
+
_ = 0;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
169
|
+
_.label = op[1];
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
173
|
+
_.label = t[1];
|
|
174
|
+
t = op;
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
if (t && _.label < t[2]) {
|
|
178
|
+
_.label = t[2];
|
|
179
|
+
_.ops.push(op);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
if (t[2]) _.ops.pop();
|
|
183
|
+
_.trys.pop();
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
op = body.call(thisArg, _);
|
|
187
|
+
} catch (e) {
|
|
188
|
+
op = [
|
|
189
|
+
6,
|
|
190
|
+
e
|
|
191
|
+
];
|
|
192
|
+
y = 0;
|
|
193
|
+
} finally{
|
|
194
|
+
f = t = 0;
|
|
195
|
+
}
|
|
196
|
+
if (op[0] & 5) throw op[1];
|
|
197
|
+
return {
|
|
198
|
+
value: op[0] ? op[1] : void 0,
|
|
199
|
+
done: true
|
|
200
|
+
};
|
|
201
|
+
}
|
|
94
202
|
}
|
|
95
|
-
import regeneratorRuntime from "regenerator-runtime";
|
|
96
203
|
var LifecycleEventKeyMap = {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
204
|
+
"engine-mounted": "did_mount",
|
|
205
|
+
"engine-submit": "will_submit",
|
|
206
|
+
"engine-submit-params": "do_submit",
|
|
207
|
+
"engine-submitted": "did_submit"
|
|
101
208
|
};
|
|
102
209
|
export var LifecycleEventPlugin = /*#__PURE__*/ function() {
|
|
103
210
|
"use strict";
|
|
104
211
|
function LifecycleEventPlugin(config) {
|
|
105
|
-
|
|
212
|
+
_class_call_check(this, LifecycleEventPlugin);
|
|
213
|
+
_define_property(this, "config", void 0);
|
|
214
|
+
_define_property(this, "engine", void 0);
|
|
106
215
|
this.config = config;
|
|
107
216
|
}
|
|
108
|
-
|
|
217
|
+
_create_class(LifecycleEventPlugin, [
|
|
109
218
|
{
|
|
110
219
|
key: "apply",
|
|
111
220
|
value: function apply(engine) {
|
|
112
221
|
var _this = this;
|
|
113
222
|
this.engine = engine;
|
|
114
223
|
Object.entries(LifecycleEventKeyMap).forEach(function(param) {
|
|
115
|
-
var _param =
|
|
224
|
+
var _param = _sliced_to_array(param, 2), engineKey = _param[0], lifecycleKey = _param[1];
|
|
116
225
|
var _this1 = _this;
|
|
117
226
|
engine.on(engineKey, function() {
|
|
118
|
-
var _ref =
|
|
227
|
+
var _ref = _async_to_generator(function(payload) {
|
|
119
228
|
var result;
|
|
120
|
-
return
|
|
121
|
-
|
|
229
|
+
return _ts_generator(this, function(_state) {
|
|
230
|
+
switch(_state.label){
|
|
122
231
|
case 0:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
232
|
+
return [
|
|
233
|
+
4,
|
|
234
|
+
_this1.callLifecycleEvent(lifecycleKey, payload)
|
|
235
|
+
];
|
|
236
|
+
case 1:
|
|
237
|
+
result = _state.sent();
|
|
238
|
+
if (result.includes(false)) {
|
|
239
|
+
return [
|
|
240
|
+
2,
|
|
241
|
+
false
|
|
242
|
+
];
|
|
243
|
+
} else {
|
|
244
|
+
return [
|
|
245
|
+
2,
|
|
246
|
+
result
|
|
247
|
+
];
|
|
130
248
|
}
|
|
131
|
-
return
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
case 8:
|
|
135
|
-
case "end":
|
|
136
|
-
return _ctx.stop();
|
|
249
|
+
return [
|
|
250
|
+
2
|
|
251
|
+
];
|
|
137
252
|
}
|
|
138
|
-
}
|
|
139
|
-
})
|
|
253
|
+
});
|
|
254
|
+
});
|
|
140
255
|
return function(payload) {
|
|
141
256
|
return _ref.apply(this, arguments);
|
|
142
257
|
};
|
|
@@ -148,52 +263,56 @@ export var LifecycleEventPlugin = /*#__PURE__*/ function() {
|
|
|
148
263
|
key: "callLifecycleEvent",
|
|
149
264
|
value: function callLifecycleEvent(name, payload) {
|
|
150
265
|
var _this = this;
|
|
151
|
-
return
|
|
266
|
+
return _async_to_generator(function() {
|
|
152
267
|
var events, result;
|
|
153
|
-
return
|
|
154
|
-
|
|
268
|
+
return _ts_generator(this, function(_state) {
|
|
269
|
+
switch(_state.label){
|
|
155
270
|
case 0:
|
|
156
271
|
events = _this.config;
|
|
157
|
-
if (!
|
|
158
|
-
|
|
159
|
-
|
|
272
|
+
if (!events || !Array.isArray(events[name])) {
|
|
273
|
+
return [
|
|
274
|
+
2,
|
|
275
|
+
[]
|
|
276
|
+
];
|
|
160
277
|
}
|
|
161
|
-
return
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
278
|
+
return [
|
|
279
|
+
4,
|
|
280
|
+
Promise.all(events[name].map(function() {
|
|
281
|
+
var _ref = _async_to_generator(function(eventName) {
|
|
282
|
+
var execResult;
|
|
283
|
+
return _ts_generator(this, function(_state) {
|
|
284
|
+
switch(_state.label){
|
|
285
|
+
case 0:
|
|
286
|
+
return [
|
|
287
|
+
4,
|
|
288
|
+
_this.engine.getAction().execAction(eventName, //qiyu 注释掉的两个参数变为全局参数
|
|
289
|
+
// this.engine,
|
|
290
|
+
// this.engine.getAction().actionUtils, //以前是params,空的
|
|
291
|
+
payload)
|
|
292
|
+
];
|
|
293
|
+
case 1:
|
|
294
|
+
execResult = _state.sent();
|
|
295
|
+
return [
|
|
296
|
+
2,
|
|
297
|
+
execResult
|
|
298
|
+
];
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
return function(eventName) {
|
|
303
|
+
return _ref.apply(this, arguments);
|
|
304
|
+
};
|
|
305
|
+
}()))
|
|
306
|
+
];
|
|
307
|
+
case 1:
|
|
308
|
+
result = _state.sent();
|
|
309
|
+
return [
|
|
310
|
+
2,
|
|
311
|
+
result
|
|
312
|
+
];
|
|
194
313
|
}
|
|
195
|
-
}
|
|
196
|
-
})
|
|
314
|
+
});
|
|
315
|
+
})();
|
|
197
316
|
}
|
|
198
317
|
}
|
|
199
318
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _class_call_check(instance, Constructor) {
|
|
2
2
|
if (!(instance instanceof Constructor)) {
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
@@ -12,30 +12,45 @@ function _defineProperties(target, props) {
|
|
|
12
12
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
16
16
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
17
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
18
|
return Constructor;
|
|
19
19
|
}
|
|
20
|
+
function _define_property(obj, key, value) {
|
|
21
|
+
if (key in obj) {
|
|
22
|
+
Object.defineProperty(obj, key, {
|
|
23
|
+
value: value,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
obj[key] = value;
|
|
30
|
+
}
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
20
33
|
export var StylePlugin = /*#__PURE__*/ function() {
|
|
21
34
|
"use strict";
|
|
22
35
|
function StylePlugin(config) {
|
|
23
|
-
|
|
36
|
+
_class_call_check(this, StylePlugin);
|
|
37
|
+
_define_property(this, "config", void 0);
|
|
38
|
+
_define_property(this, "engine", void 0);
|
|
24
39
|
this.config = config;
|
|
25
40
|
}
|
|
26
|
-
|
|
41
|
+
_create_class(StylePlugin, [
|
|
27
42
|
{
|
|
28
43
|
key: "apply",
|
|
29
44
|
value: function apply(engine) {
|
|
30
|
-
var
|
|
45
|
+
var _this_config;
|
|
31
46
|
this.engine = engine;
|
|
32
|
-
var
|
|
33
|
-
var compiledStyle = (
|
|
34
|
-
var style = document.createElement(
|
|
35
|
-
style.className =
|
|
36
|
-
style.type =
|
|
47
|
+
var _this_config_source;
|
|
48
|
+
var compiledStyle = (_this_config_source = (_this_config = this.config) === null || _this_config === void 0 ? void 0 : _this_config.source) !== null && _this_config_source !== void 0 ? _this_config_source : "";
|
|
49
|
+
var style = document.createElement("style");
|
|
50
|
+
style.className = "edit-css";
|
|
51
|
+
style.type = "text/css";
|
|
37
52
|
style.innerHTML = compiledStyle;
|
|
38
|
-
var dom = document.querySelector(
|
|
53
|
+
var dom = document.querySelector("head");
|
|
39
54
|
dom.appendChild(style);
|
|
40
55
|
}
|
|
41
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./ES6ModulePlugin";
|
|
2
|
+
export * from "./LifecycleEventPlugin";
|
|
3
|
+
export * from "./ControlsEventPlugin";
|
|
4
|
+
export * from "./CalcPlugin";
|
|
5
|
+
export * from "./StylePlugin";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./runtimeUtils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONTROL_BASE_TYPE, CONTROL_TYPE } from
|
|
1
|
+
import { CONTROL_BASE_TYPE, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
|
|
2
2
|
export function hasChildrenControl(instance) {
|
|
3
3
|
return instance.controlType === CONTROL_BASE_TYPE.LAYOUT || instance.controlType === CONTROL_BASE_TYPE.WRAP || instance.controlType === CONTROL_BASE_TYPE.LIST || instance.controlType === CONTROL_BASE_TYPE.SEARCH;
|
|
4
4
|
}
|
|
@@ -12,8 +12,7 @@ export function loopFormControl(control, callback) {
|
|
|
12
12
|
;
|
|
13
13
|
callback(item, children);
|
|
14
14
|
} else if (hasChildrenControl(item)) {
|
|
15
|
-
|
|
16
|
-
loopFormControl((ref = item) === null || ref === void 0 ? void 0 : ref.children, callback);
|
|
15
|
+
loopFormControl(item === null || item === void 0 ? void 0 : item.children, callback);
|
|
17
16
|
// @ts-ignore
|
|
18
17
|
} else if (item.controlType === CONTROL_BASE_TYPE.FORM) {
|
|
19
18
|
callback(item);
|
|
@@ -28,9 +27,8 @@ callback) {
|
|
|
28
27
|
if (item.type === CONTROL_TYPE.DATA_VIEW || item.type === CONTROL_TYPE.SIMPLE_SEARCH) {
|
|
29
28
|
callback(item);
|
|
30
29
|
} else if (hasChildrenControl(item)) {
|
|
31
|
-
var ref;
|
|
32
30
|
// @ts-ignore
|
|
33
|
-
loopDataViewControl(
|
|
31
|
+
loopDataViewControl(item === null || item === void 0 ? void 0 : item.children, callback);
|
|
34
32
|
}
|
|
35
33
|
});
|
|
36
34
|
}
|
|
@@ -38,9 +36,9 @@ callback) {
|
|
|
38
36
|
var unique = 0;
|
|
39
37
|
// uuid生成
|
|
40
38
|
export function buildUUID() {
|
|
41
|
-
var prefix = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
39
|
+
var prefix = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
42
40
|
var time = Date.now();
|
|
43
41
|
var random = Math.floor(Math.random() * 1000000000);
|
|
44
42
|
unique++;
|
|
45
|
-
return prefix +
|
|
43
|
+
return prefix + "_" + random + unique + String(time);
|
|
46
44
|
}
|