@oj-module/cli 0.2.50 → 0.2.53
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/devkit/wecom-internal-app.md +111 -4
- package/package.json +2 -2
- package/shell-dist/assets/{index-FYt9CjFd.js → index-e_Mp2mb5.js} +5 -1
- package/shell-dist/assets/runtime.js +24 -3
- package/shell-dist/index.html +9 -12
- package/shell-dist/versions.json +3 -3
- package/src/build.ts +19 -2
- package/src/shared-deps.ts +27 -9
- package/src/site-base.ts +1 -1
- package/templates/init.include.yaml +4 -7
- package/templates/openapi.json +2520 -2412
- package/templates/src/_platform/api/_shared/service/domain/users.ts +40 -4
- package/templates/src/auth/api/_shared/wecom/admin.ts +4 -0
- package/templates/src/auth/api/_shared/wecom/client.ts +9 -2
- package/templates/src/auth/api/_shared/wecom/events.ts +3 -0
- package/templates/src/auth/api/_shared/wecom/tenant-admin.ts +194 -0
- package/templates/src/auth/api/wecom/admin/tenant-admin/api.ts +41 -0
- package/templates/src/auth/api/wecom/admin/tenant-admin/password/api.ts +66 -0
- package/templates/src/login/web/pages/login.tsx +54 -24
- package/templates/src/system/api/settings/api.ts +3 -3
- package/templates/src/system/web/entry.ts +4 -4
- package/templates/src/system/web/locales/en-US.json +14 -0
- package/templates/src/system/web/locales/zh-CN.json +14 -0
- package/templates/src/system/web/pages/users/index.tsx +7 -4
- package/templates/src/system/web/pages/users/roles.tsx +14 -3
- package/templates/src/system/web/pages/wecom/index.tsx +130 -1
- package/templates/tsconfig.paths.json +0 -1
- package/templates/web.config.ts +1 -2
- package/vendor/host-versions.json +3 -3
- package/shell-dist/assets/echarts-charts.js +0 -58571
- package/shell-dist/assets/echarts-features.js +0 -24057
- package/shell-dist/assets/echarts-for-react.js +0 -704
- package/shell-dist/assets/echarts.js +0 -82916
- package/shell-dist/assets/editor.js +0 -161457
- package/shell-dist/assets/vditor-index-css.js +0 -7
- package/shell-dist/assets/vditor.js +0 -15223
- package/templates/src/demo/api/manifest.yaml +0 -5
- package/templates/src/demo/api/migrations/0001__create_todos.sql +0 -9
- package/templates/src/demo/api/migrations/0002__tenant.mysql.sql +0 -2
- package/templates/src/demo/api/migrations/0002__tenant.sql +0 -2
- package/templates/src/demo/api/schema.yaml +0 -12
- package/templates/src/demo/api/seed.sql +0 -5
- package/templates/src/demo/api/todos/api.ts +0 -59
- package/templates/src/demo/web/__client/api.schemas.ts +0 -20
- package/templates/src/demo/web/__client/api.ts +0 -89
- package/templates/src/demo/web/entry.ts +0 -42
- package/templates/src/demo/web/locales/en-US.json +0 -10
- package/templates/src/demo/web/locales/zh-CN.json +0 -10
- package/templates/src/demo/web/pages/index.tsx +0 -45
|
@@ -1,704 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
try {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
} catch (e) {
|
|
11
|
-
throw mod = 0, e;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
29
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
-
mod
|
|
33
|
-
));
|
|
34
|
-
|
|
35
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/id.js
|
|
36
|
-
var require_id = __commonJS({
|
|
37
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/id.js"(exports) {
|
|
38
|
-
"use strict";
|
|
39
|
-
Object.defineProperty(exports, "__esModule", {
|
|
40
|
-
value: true
|
|
41
|
-
});
|
|
42
|
-
exports["default"] = void 0;
|
|
43
|
-
var id = 1;
|
|
44
|
-
var _default = exports["default"] = function _default2() {
|
|
45
|
-
return "".concat(id++);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/debounce.js
|
|
51
|
-
var require_debounce = __commonJS({
|
|
52
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/debounce.js"(exports) {
|
|
53
|
-
"use strict";
|
|
54
|
-
Object.defineProperty(exports, "__esModule", {
|
|
55
|
-
value: true
|
|
56
|
-
});
|
|
57
|
-
exports["default"] = void 0;
|
|
58
|
-
var _default = exports["default"] = function _default2(fn) {
|
|
59
|
-
var delay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 60;
|
|
60
|
-
var timer = null;
|
|
61
|
-
return function() {
|
|
62
|
-
var _this = this;
|
|
63
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
64
|
-
args[_key] = arguments[_key];
|
|
65
|
-
}
|
|
66
|
-
clearTimeout(timer);
|
|
67
|
-
timer = setTimeout(function() {
|
|
68
|
-
fn.apply(_this, args);
|
|
69
|
-
}, delay);
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/constant.js
|
|
76
|
-
var require_constant = __commonJS({
|
|
77
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/constant.js"(exports) {
|
|
78
|
-
"use strict";
|
|
79
|
-
Object.defineProperty(exports, "__esModule", {
|
|
80
|
-
value: true
|
|
81
|
-
});
|
|
82
|
-
exports.SizeSensorId = exports.SensorTabIndex = exports.SensorClassName = void 0;
|
|
83
|
-
var SizeSensorId = exports.SizeSensorId = "size-sensor-id";
|
|
84
|
-
var SensorClassName = exports.SensorClassName = "size-sensor-object";
|
|
85
|
-
var SensorTabIndex = exports.SensorTabIndex = "-1";
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensors/object.js
|
|
90
|
-
var require_object = __commonJS({
|
|
91
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensors/object.js"(exports) {
|
|
92
|
-
"use strict";
|
|
93
|
-
Object.defineProperty(exports, "__esModule", {
|
|
94
|
-
value: true
|
|
95
|
-
});
|
|
96
|
-
exports.createSensor = void 0;
|
|
97
|
-
var _debounce = _interopRequireDefault(require_debounce());
|
|
98
|
-
var _constant = require_constant();
|
|
99
|
-
function _interopRequireDefault(e) {
|
|
100
|
-
return e && e.__esModule ? e : { "default": e };
|
|
101
|
-
}
|
|
102
|
-
var createSensor = exports.createSensor = function createSensor2(element, whenDestroy) {
|
|
103
|
-
var sensor = void 0;
|
|
104
|
-
var listeners = [];
|
|
105
|
-
var newSensor = function newSensor2() {
|
|
106
|
-
if (getComputedStyle(element).position === "static") {
|
|
107
|
-
element.style.position = "relative";
|
|
108
|
-
}
|
|
109
|
-
var obj = document.createElement("object");
|
|
110
|
-
obj.onload = function() {
|
|
111
|
-
obj.contentDocument.defaultView.addEventListener("resize", resizeListener);
|
|
112
|
-
resizeListener();
|
|
113
|
-
};
|
|
114
|
-
obj.style.display = "block";
|
|
115
|
-
obj.style.position = "absolute";
|
|
116
|
-
obj.style.top = "0";
|
|
117
|
-
obj.style.left = "0";
|
|
118
|
-
obj.style.height = "100%";
|
|
119
|
-
obj.style.width = "100%";
|
|
120
|
-
obj.style.overflow = "hidden";
|
|
121
|
-
obj.style.pointerEvents = "none";
|
|
122
|
-
obj.style.zIndex = "-1";
|
|
123
|
-
obj.style.opacity = "0";
|
|
124
|
-
obj.setAttribute("class", _constant.SensorClassName);
|
|
125
|
-
obj.setAttribute("tabindex", _constant.SensorTabIndex);
|
|
126
|
-
obj.type = "text/html";
|
|
127
|
-
element.appendChild(obj);
|
|
128
|
-
obj.data = "about:blank";
|
|
129
|
-
return obj;
|
|
130
|
-
};
|
|
131
|
-
var resizeListener = (0, _debounce["default"])(function() {
|
|
132
|
-
listeners.forEach(function(listener) {
|
|
133
|
-
listener(element);
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
var bind2 = function bind3(cb) {
|
|
137
|
-
if (!sensor) {
|
|
138
|
-
sensor = newSensor();
|
|
139
|
-
}
|
|
140
|
-
if (listeners.indexOf(cb) === -1) {
|
|
141
|
-
listeners.push(cb);
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
var destroy = function destroy2() {
|
|
145
|
-
if (sensor && sensor.parentNode) {
|
|
146
|
-
if (sensor.contentDocument) {
|
|
147
|
-
sensor.contentDocument.defaultView.removeEventListener("resize", resizeListener);
|
|
148
|
-
}
|
|
149
|
-
sensor.parentNode.removeChild(sensor);
|
|
150
|
-
element.removeAttribute(_constant.SizeSensorId);
|
|
151
|
-
sensor = void 0;
|
|
152
|
-
listeners = [];
|
|
153
|
-
whenDestroy && whenDestroy();
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
var unbind = function unbind2(cb) {
|
|
157
|
-
var idx = listeners.indexOf(cb);
|
|
158
|
-
if (idx !== -1) {
|
|
159
|
-
listeners.splice(idx, 1);
|
|
160
|
-
}
|
|
161
|
-
if (listeners.length === 0 && sensor) {
|
|
162
|
-
destroy();
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
return {
|
|
166
|
-
element,
|
|
167
|
-
bind: bind2,
|
|
168
|
-
destroy,
|
|
169
|
-
unbind
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensors/resizeObserver.js
|
|
176
|
-
var require_resizeObserver = __commonJS({
|
|
177
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensors/resizeObserver.js"(exports) {
|
|
178
|
-
"use strict";
|
|
179
|
-
Object.defineProperty(exports, "__esModule", {
|
|
180
|
-
value: true
|
|
181
|
-
});
|
|
182
|
-
exports.createSensor = void 0;
|
|
183
|
-
var _constant = require_constant();
|
|
184
|
-
var _debounce = _interopRequireDefault(require_debounce());
|
|
185
|
-
function _interopRequireDefault(e) {
|
|
186
|
-
return e && e.__esModule ? e : { "default": e };
|
|
187
|
-
}
|
|
188
|
-
var createSensor = exports.createSensor = function createSensor2(element, whenDestroy) {
|
|
189
|
-
var sensor = void 0;
|
|
190
|
-
var listeners = [];
|
|
191
|
-
var resizeListener = (0, _debounce["default"])(function() {
|
|
192
|
-
listeners.forEach(function(listener) {
|
|
193
|
-
listener(element);
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
var newSensor = function newSensor2() {
|
|
197
|
-
var s = new ResizeObserver(resizeListener);
|
|
198
|
-
s.observe(element);
|
|
199
|
-
resizeListener();
|
|
200
|
-
return s;
|
|
201
|
-
};
|
|
202
|
-
var bind2 = function bind3(cb) {
|
|
203
|
-
if (!sensor) {
|
|
204
|
-
sensor = newSensor();
|
|
205
|
-
}
|
|
206
|
-
if (listeners.indexOf(cb) === -1) {
|
|
207
|
-
listeners.push(cb);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
var destroy = function destroy2() {
|
|
211
|
-
if (sensor) {
|
|
212
|
-
sensor.disconnect();
|
|
213
|
-
}
|
|
214
|
-
listeners = [];
|
|
215
|
-
sensor = void 0;
|
|
216
|
-
element.removeAttribute(_constant.SizeSensorId);
|
|
217
|
-
whenDestroy && whenDestroy();
|
|
218
|
-
};
|
|
219
|
-
var unbind = function unbind2(cb) {
|
|
220
|
-
var idx = listeners.indexOf(cb);
|
|
221
|
-
if (idx !== -1) {
|
|
222
|
-
listeners.splice(idx, 1);
|
|
223
|
-
}
|
|
224
|
-
if (listeners.length === 0 && sensor) {
|
|
225
|
-
destroy();
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
return {
|
|
229
|
-
element,
|
|
230
|
-
bind: bind2,
|
|
231
|
-
destroy,
|
|
232
|
-
unbind
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensors/index.js
|
|
239
|
-
var require_sensors = __commonJS({
|
|
240
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensors/index.js"(exports) {
|
|
241
|
-
"use strict";
|
|
242
|
-
Object.defineProperty(exports, "__esModule", {
|
|
243
|
-
value: true
|
|
244
|
-
});
|
|
245
|
-
exports.createSensor = void 0;
|
|
246
|
-
var _object = require_object();
|
|
247
|
-
var _resizeObserver = require_resizeObserver();
|
|
248
|
-
var createSensor = exports.createSensor = typeof ResizeObserver !== "undefined" ? _resizeObserver.createSensor : _object.createSensor;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensorPool.js
|
|
253
|
-
var require_sensorPool = __commonJS({
|
|
254
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/sensorPool.js"(exports) {
|
|
255
|
-
"use strict";
|
|
256
|
-
Object.defineProperty(exports, "__esModule", {
|
|
257
|
-
value: true
|
|
258
|
-
});
|
|
259
|
-
exports.removeSensor = exports.getSensor = exports.Sensors = void 0;
|
|
260
|
-
var _id = _interopRequireDefault(require_id());
|
|
261
|
-
var _sensors = require_sensors();
|
|
262
|
-
var _constant = require_constant();
|
|
263
|
-
function _interopRequireDefault(e) {
|
|
264
|
-
return e && e.__esModule ? e : { "default": e };
|
|
265
|
-
}
|
|
266
|
-
var Sensors = exports.Sensors = {};
|
|
267
|
-
function clean(sensorId) {
|
|
268
|
-
if (sensorId && Sensors[sensorId]) {
|
|
269
|
-
delete Sensors[sensorId];
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
var getSensor = exports.getSensor = function getSensor2(element) {
|
|
273
|
-
var sensorId = element.getAttribute(_constant.SizeSensorId);
|
|
274
|
-
if (sensorId && Sensors[sensorId]) {
|
|
275
|
-
return Sensors[sensorId];
|
|
276
|
-
}
|
|
277
|
-
var newId = (0, _id["default"])();
|
|
278
|
-
element.setAttribute(_constant.SizeSensorId, newId);
|
|
279
|
-
var sensor = (0, _sensors.createSensor)(element, function() {
|
|
280
|
-
return clean(newId);
|
|
281
|
-
});
|
|
282
|
-
Sensors[newId] = sensor;
|
|
283
|
-
return sensor;
|
|
284
|
-
};
|
|
285
|
-
var removeSensor = exports.removeSensor = function removeSensor2(sensor) {
|
|
286
|
-
var sensorId = sensor.element.getAttribute(_constant.SizeSensorId);
|
|
287
|
-
sensor.destroy();
|
|
288
|
-
clean(sensorId);
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
// ../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/index.js
|
|
294
|
-
var require_lib = __commonJS({
|
|
295
|
-
"../../node_modules/.pnpm/size-sensor@1.0.3/node_modules/size-sensor/lib/index.js"(exports) {
|
|
296
|
-
"use strict";
|
|
297
|
-
Object.defineProperty(exports, "__esModule", {
|
|
298
|
-
value: true
|
|
299
|
-
});
|
|
300
|
-
exports.ver = exports.clear = exports.bind = void 0;
|
|
301
|
-
var _sensorPool = require_sensorPool();
|
|
302
|
-
var bind2 = exports.bind = function bind3(element, cb) {
|
|
303
|
-
var sensor = (0, _sensorPool.getSensor)(element);
|
|
304
|
-
sensor.bind(cb);
|
|
305
|
-
return function() {
|
|
306
|
-
sensor.unbind(cb);
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
var clear2 = exports.clear = function clear3(element) {
|
|
310
|
-
var sensor = (0, _sensorPool.getSensor)(element);
|
|
311
|
-
(0, _sensorPool.removeSensor)(sensor);
|
|
312
|
-
};
|
|
313
|
-
var ver = exports.ver = "1.0.3";
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
318
|
-
var require_fast_deep_equal = __commonJS({
|
|
319
|
-
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
320
|
-
"use strict";
|
|
321
|
-
module.exports = function equal(a, b) {
|
|
322
|
-
if (a === b) return true;
|
|
323
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
324
|
-
if (a.constructor !== b.constructor) return false;
|
|
325
|
-
var length, i, keys;
|
|
326
|
-
if (Array.isArray(a)) {
|
|
327
|
-
length = a.length;
|
|
328
|
-
if (length != b.length) return false;
|
|
329
|
-
for (i = length; i-- !== 0; )
|
|
330
|
-
if (!equal(a[i], b[i])) return false;
|
|
331
|
-
return true;
|
|
332
|
-
}
|
|
333
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
334
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
335
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
336
|
-
keys = Object.keys(a);
|
|
337
|
-
length = keys.length;
|
|
338
|
-
if (length !== Object.keys(b).length) return false;
|
|
339
|
-
for (i = length; i-- !== 0; )
|
|
340
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
341
|
-
for (i = length; i-- !== 0; ) {
|
|
342
|
-
var key = keys[i];
|
|
343
|
-
if (!equal(a[key], b[key])) return false;
|
|
344
|
-
}
|
|
345
|
-
return true;
|
|
346
|
-
}
|
|
347
|
-
return a !== a && b !== b;
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/index.js
|
|
353
|
-
var esm_exports = {};
|
|
354
|
-
__export(esm_exports, {
|
|
355
|
-
default: () => esm_default
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
359
|
-
var extendStatics = function(d, b) {
|
|
360
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
361
|
-
d2.__proto__ = b2;
|
|
362
|
-
} || function(d2, b2) {
|
|
363
|
-
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
364
|
-
};
|
|
365
|
-
return extendStatics(d, b);
|
|
366
|
-
};
|
|
367
|
-
function __extends(d, b) {
|
|
368
|
-
if (typeof b !== "function" && b !== null)
|
|
369
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
370
|
-
extendStatics(d, b);
|
|
371
|
-
function __() {
|
|
372
|
-
this.constructor = d;
|
|
373
|
-
}
|
|
374
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
375
|
-
}
|
|
376
|
-
var __assign = function() {
|
|
377
|
-
__assign = Object.assign || function __assign2(t) {
|
|
378
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
379
|
-
s = arguments[i];
|
|
380
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
381
|
-
}
|
|
382
|
-
return t;
|
|
383
|
-
};
|
|
384
|
-
return __assign.apply(this, arguments);
|
|
385
|
-
};
|
|
386
|
-
function __rest(s, e) {
|
|
387
|
-
var t = {};
|
|
388
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
389
|
-
t[p] = s[p];
|
|
390
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
391
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
392
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
393
|
-
t[p[i]] = s[p[i]];
|
|
394
|
-
}
|
|
395
|
-
return t;
|
|
396
|
-
}
|
|
397
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
398
|
-
function adopt(value) {
|
|
399
|
-
return value instanceof P ? value : new P(function(resolve) {
|
|
400
|
-
resolve(value);
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
return new (P || (P = Promise))(function(resolve, reject) {
|
|
404
|
-
function fulfilled(value) {
|
|
405
|
-
try {
|
|
406
|
-
step(generator.next(value));
|
|
407
|
-
} catch (e) {
|
|
408
|
-
reject(e);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
function rejected(value) {
|
|
412
|
-
try {
|
|
413
|
-
step(generator["throw"](value));
|
|
414
|
-
} catch (e) {
|
|
415
|
-
reject(e);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
function step(result) {
|
|
419
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
420
|
-
}
|
|
421
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
function __generator(thisArg, body) {
|
|
425
|
-
var _ = { label: 0, sent: function() {
|
|
426
|
-
if (t[0] & 1) throw t[1];
|
|
427
|
-
return t[1];
|
|
428
|
-
}, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
429
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
430
|
-
return this;
|
|
431
|
-
}), g;
|
|
432
|
-
function verb(n) {
|
|
433
|
-
return function(v) {
|
|
434
|
-
return step([n, v]);
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
function step(op) {
|
|
438
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
439
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
440
|
-
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;
|
|
441
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
442
|
-
switch (op[0]) {
|
|
443
|
-
case 0:
|
|
444
|
-
case 1:
|
|
445
|
-
t = op;
|
|
446
|
-
break;
|
|
447
|
-
case 4:
|
|
448
|
-
_.label++;
|
|
449
|
-
return { value: op[1], done: false };
|
|
450
|
-
case 5:
|
|
451
|
-
_.label++;
|
|
452
|
-
y = op[1];
|
|
453
|
-
op = [0];
|
|
454
|
-
continue;
|
|
455
|
-
case 7:
|
|
456
|
-
op = _.ops.pop();
|
|
457
|
-
_.trys.pop();
|
|
458
|
-
continue;
|
|
459
|
-
default:
|
|
460
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
461
|
-
_ = 0;
|
|
462
|
-
continue;
|
|
463
|
-
}
|
|
464
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
465
|
-
_.label = op[1];
|
|
466
|
-
break;
|
|
467
|
-
}
|
|
468
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
469
|
-
_.label = t[1];
|
|
470
|
-
t = op;
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
if (t && _.label < t[2]) {
|
|
474
|
-
_.label = t[2];
|
|
475
|
-
_.ops.push(op);
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
478
|
-
if (t[2]) _.ops.pop();
|
|
479
|
-
_.trys.pop();
|
|
480
|
-
continue;
|
|
481
|
-
}
|
|
482
|
-
op = body.call(thisArg, _);
|
|
483
|
-
} catch (e) {
|
|
484
|
-
op = [6, e];
|
|
485
|
-
y = 0;
|
|
486
|
-
} finally {
|
|
487
|
-
f = t = 0;
|
|
488
|
-
}
|
|
489
|
-
if (op[0] & 5) throw op[1];
|
|
490
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/index.js
|
|
495
|
-
import * as echarts from "echarts";
|
|
496
|
-
|
|
497
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/core.js
|
|
498
|
-
var import_size_sensor = __toESM(require_lib());
|
|
499
|
-
import React, { PureComponent } from "react";
|
|
500
|
-
|
|
501
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/helper/pick.js
|
|
502
|
-
function pick(obj, keys) {
|
|
503
|
-
var r = {};
|
|
504
|
-
keys.forEach(function(key) {
|
|
505
|
-
r[key] = obj[key];
|
|
506
|
-
});
|
|
507
|
-
return r;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/helper/is-function.js
|
|
511
|
-
function isFunction(v) {
|
|
512
|
-
return typeof v === "function";
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/helper/is-string.js
|
|
516
|
-
function isString(v) {
|
|
517
|
-
return typeof v === "string";
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/helper/is-equal.js
|
|
521
|
-
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
|
|
522
|
-
|
|
523
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/core.js
|
|
524
|
-
var EChartsReactCore = (
|
|
525
|
-
/** @class */
|
|
526
|
-
(function(_super) {
|
|
527
|
-
__extends(EChartsReactCore2, _super);
|
|
528
|
-
function EChartsReactCore2(props) {
|
|
529
|
-
var _this = _super.call(this, props) || this;
|
|
530
|
-
_this.echarts = props.echarts;
|
|
531
|
-
_this.ele = null;
|
|
532
|
-
_this.isInitialResize = true;
|
|
533
|
-
_this.eventHandlerRefs = {};
|
|
534
|
-
return _this;
|
|
535
|
-
}
|
|
536
|
-
EChartsReactCore2.prototype.componentDidMount = function() {
|
|
537
|
-
this.renderNewEcharts();
|
|
538
|
-
};
|
|
539
|
-
EChartsReactCore2.prototype.componentDidUpdate = function(prevProps) {
|
|
540
|
-
var shouldSetOption = this.props.shouldSetOption;
|
|
541
|
-
if (isFunction(shouldSetOption) && !shouldSetOption(prevProps, this.props)) {
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
if (!(0, import_fast_deep_equal.default)(prevProps.theme, this.props.theme) || !(0, import_fast_deep_equal.default)(prevProps.opts, this.props.opts)) {
|
|
545
|
-
this.dispose();
|
|
546
|
-
this.renderNewEcharts();
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
var echartsInstance = this.getEchartsInstance();
|
|
550
|
-
if (!(0, import_fast_deep_equal.default)(prevProps.onEvents, this.props.onEvents)) {
|
|
551
|
-
this.unbindEvents(echartsInstance);
|
|
552
|
-
this.bindEvents(echartsInstance, this.props.onEvents);
|
|
553
|
-
}
|
|
554
|
-
var pickKeys = ["option", "notMerge", "replaceMerge", "lazyUpdate", "showLoading", "loadingOption"];
|
|
555
|
-
if (!(0, import_fast_deep_equal.default)(pick(this.props, pickKeys), pick(prevProps, pickKeys))) {
|
|
556
|
-
this.updateEChartsOption();
|
|
557
|
-
}
|
|
558
|
-
if (!(0, import_fast_deep_equal.default)(prevProps.style, this.props.style) || !(0, import_fast_deep_equal.default)(prevProps.className, this.props.className)) {
|
|
559
|
-
this.resize();
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
EChartsReactCore2.prototype.componentWillUnmount = function() {
|
|
563
|
-
this.dispose();
|
|
564
|
-
};
|
|
565
|
-
EChartsReactCore2.prototype.initEchartsInstance = function() {
|
|
566
|
-
return __awaiter(this, void 0, void 0, function() {
|
|
567
|
-
var _this = this;
|
|
568
|
-
return __generator(this, function(_a) {
|
|
569
|
-
return [2, new Promise(function(resolve) {
|
|
570
|
-
_this.echarts.init(_this.ele, _this.props.theme, _this.props.opts);
|
|
571
|
-
var echartsInstance = _this.getEchartsInstance();
|
|
572
|
-
echartsInstance.on("finished", function() {
|
|
573
|
-
var width = _this.ele.clientWidth;
|
|
574
|
-
var height = _this.ele.clientHeight;
|
|
575
|
-
_this.echarts.dispose(_this.ele);
|
|
576
|
-
var opts = __assign({ width, height }, _this.props.opts);
|
|
577
|
-
resolve(_this.echarts.init(_this.ele, _this.props.theme, opts));
|
|
578
|
-
});
|
|
579
|
-
})];
|
|
580
|
-
});
|
|
581
|
-
});
|
|
582
|
-
};
|
|
583
|
-
EChartsReactCore2.prototype.getEchartsInstance = function() {
|
|
584
|
-
return this.echarts.getInstanceByDom(this.ele);
|
|
585
|
-
};
|
|
586
|
-
EChartsReactCore2.prototype.dispose = function() {
|
|
587
|
-
if (this.ele) {
|
|
588
|
-
try {
|
|
589
|
-
(0, import_size_sensor.clear)(this.ele);
|
|
590
|
-
} catch (e) {
|
|
591
|
-
console.warn(e);
|
|
592
|
-
}
|
|
593
|
-
this.echarts.dispose(this.ele);
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
EChartsReactCore2.prototype.renderNewEcharts = function() {
|
|
597
|
-
return __awaiter(this, void 0, void 0, function() {
|
|
598
|
-
var _a, onEvents, onChartReady, _b, autoResize, echartsInstance;
|
|
599
|
-
var _this = this;
|
|
600
|
-
return __generator(this, function(_c) {
|
|
601
|
-
switch (_c.label) {
|
|
602
|
-
case 0:
|
|
603
|
-
_a = this.props, onEvents = _a.onEvents, onChartReady = _a.onChartReady, _b = _a.autoResize, autoResize = _b === void 0 ? true : _b;
|
|
604
|
-
return [4, this.initEchartsInstance()];
|
|
605
|
-
case 1:
|
|
606
|
-
_c.sent();
|
|
607
|
-
echartsInstance = this.updateEChartsOption();
|
|
608
|
-
this.bindEvents(echartsInstance, onEvents || {});
|
|
609
|
-
if (isFunction(onChartReady))
|
|
610
|
-
onChartReady(echartsInstance);
|
|
611
|
-
if (this.ele && autoResize) {
|
|
612
|
-
(0, import_size_sensor.bind)(this.ele, function() {
|
|
613
|
-
_this.resize();
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
return [
|
|
617
|
-
2
|
|
618
|
-
/*return*/
|
|
619
|
-
];
|
|
620
|
-
}
|
|
621
|
-
});
|
|
622
|
-
});
|
|
623
|
-
};
|
|
624
|
-
EChartsReactCore2.prototype.bindEvents = function(instance, events) {
|
|
625
|
-
var _this = this;
|
|
626
|
-
var _bindEvent = function(eventName2, func) {
|
|
627
|
-
if (isString(eventName2) && isFunction(func)) {
|
|
628
|
-
var handler = function(param) {
|
|
629
|
-
func(param, instance);
|
|
630
|
-
};
|
|
631
|
-
instance.on(eventName2, handler);
|
|
632
|
-
_this.eventHandlerRefs[eventName2] = handler;
|
|
633
|
-
}
|
|
634
|
-
};
|
|
635
|
-
for (var eventName in events) {
|
|
636
|
-
if (Object.prototype.hasOwnProperty.call(events, eventName)) {
|
|
637
|
-
_bindEvent(eventName, events[eventName]);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
EChartsReactCore2.prototype.unbindEvents = function(instance) {
|
|
642
|
-
for (var _i = 0, _a = Object.entries(this.eventHandlerRefs); _i < _a.length; _i++) {
|
|
643
|
-
var _b = _a[_i], eventName = _b[0], listener = _b[1];
|
|
644
|
-
instance.off(eventName, listener);
|
|
645
|
-
}
|
|
646
|
-
this.eventHandlerRefs = {};
|
|
647
|
-
};
|
|
648
|
-
EChartsReactCore2.prototype.updateEChartsOption = function() {
|
|
649
|
-
var _a = this.props, option = _a.option, _b = _a.notMerge, notMerge = _b === void 0 ? false : _b, _c = _a.replaceMerge, replaceMerge = _c === void 0 ? null : _c, _d = _a.lazyUpdate, lazyUpdate = _d === void 0 ? false : _d, showLoading = _a.showLoading, _e = _a.loadingOption, loadingOption = _e === void 0 ? null : _e;
|
|
650
|
-
var echartInstance = this.getEchartsInstance();
|
|
651
|
-
echartInstance.setOption(option, { notMerge, replaceMerge, lazyUpdate });
|
|
652
|
-
if (showLoading)
|
|
653
|
-
echartInstance.showLoading(loadingOption);
|
|
654
|
-
else
|
|
655
|
-
echartInstance.hideLoading();
|
|
656
|
-
return echartInstance;
|
|
657
|
-
};
|
|
658
|
-
EChartsReactCore2.prototype.resize = function() {
|
|
659
|
-
var echartsInstance = this.getEchartsInstance();
|
|
660
|
-
if (!this.isInitialResize) {
|
|
661
|
-
try {
|
|
662
|
-
echartsInstance.resize({
|
|
663
|
-
width: "auto",
|
|
664
|
-
height: "auto"
|
|
665
|
-
});
|
|
666
|
-
} catch (e) {
|
|
667
|
-
console.warn(e);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
this.isInitialResize = false;
|
|
671
|
-
};
|
|
672
|
-
EChartsReactCore2.prototype.render = function() {
|
|
673
|
-
var _this = this;
|
|
674
|
-
var _a = this.props, style = _a.style, _b = _a.className, className = _b === void 0 ? "" : _b, echarts2 = _a.echarts, option = _a.option, theme = _a.theme, notMerge = _a.notMerge, replaceMerge = _a.replaceMerge, lazyUpdate = _a.lazyUpdate, showLoading = _a.showLoading, loadingOption = _a.loadingOption, opts = _a.opts, onChartReady = _a.onChartReady, onEvents = _a.onEvents, shouldSetOption = _a.shouldSetOption, autoResize = _a.autoResize, divHTMLAttributes = __rest(_a, ["style", "className", "echarts", "option", "theme", "notMerge", "replaceMerge", "lazyUpdate", "showLoading", "loadingOption", "opts", "onChartReady", "onEvents", "shouldSetOption", "autoResize"]);
|
|
675
|
-
var newStyle = __assign({ height: 300 }, style);
|
|
676
|
-
return React.createElement("div", __assign({ ref: function(e) {
|
|
677
|
-
_this.ele = e;
|
|
678
|
-
}, style: newStyle, className: "echarts-for-react ".concat(className) }, divHTMLAttributes));
|
|
679
|
-
};
|
|
680
|
-
return EChartsReactCore2;
|
|
681
|
-
})(PureComponent)
|
|
682
|
-
);
|
|
683
|
-
var core_default = EChartsReactCore;
|
|
684
|
-
|
|
685
|
-
// ../../node_modules/.pnpm/echarts-for-react@3.0.6_echarts@6.1.0_react@19.2.8/node_modules/echarts-for-react/esm/index.js
|
|
686
|
-
var EChartsReact = (
|
|
687
|
-
/** @class */
|
|
688
|
-
(function(_super) {
|
|
689
|
-
__extends(EChartsReact2, _super);
|
|
690
|
-
function EChartsReact2(props) {
|
|
691
|
-
var _this = _super.call(this, props) || this;
|
|
692
|
-
_this.echarts = echarts;
|
|
693
|
-
return _this;
|
|
694
|
-
}
|
|
695
|
-
return EChartsReact2;
|
|
696
|
-
})(core_default)
|
|
697
|
-
);
|
|
698
|
-
var esm_default = EChartsReact;
|
|
699
|
-
|
|
700
|
-
// shell/.ojm-shim-echarts-for-react.mjs
|
|
701
|
-
var ojm_shim_echarts_for_react_default = esm_default ?? esm_exports;
|
|
702
|
-
export {
|
|
703
|
-
ojm_shim_echarts_for_react_default as default
|
|
704
|
-
};
|