@ibiz-template/vue3-util 0.0.4-beta.5 → 0.1.1
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/dist/index.esm.js +1367 -194
- package/dist/index.system.min.js +2 -1
- package/dist/index.system.min.js.map +1 -0
- package/out/index.d.ts +1 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -0
- package/out/plugin/index.d.ts +2 -0
- package/out/plugin/index.d.ts.map +1 -0
- package/out/plugin/index.js +1 -0
- package/out/plugin/plugin-factory/plugin-factory.d.ts +147 -0
- package/out/plugin/plugin-factory/plugin-factory.d.ts.map +1 -0
- package/out/plugin/plugin-factory/plugin-factory.js +292 -0
- package/out/props/editor/array.d.ts +106 -0
- package/out/props/editor/array.d.ts.map +1 -0
- package/out/props/editor/array.js +25 -0
- package/out/props/editor/autocomplete.d.ts +54 -0
- package/out/props/editor/autocomplete.d.ts.map +1 -0
- package/out/props/editor/autocomplete.js +25 -0
- package/out/props/editor/cascader.d.ts +54 -0
- package/out/props/editor/cascader.d.ts.map +1 -0
- package/out/props/editor/cascader.js +25 -0
- package/out/props/editor/check-box-list.d.ts +54 -0
- package/out/props/editor/check-box-list.d.ts.map +1 -0
- package/out/props/editor/check-box-list.js +25 -0
- package/out/props/editor/check-box.d.ts +54 -0
- package/out/props/editor/check-box.d.ts.map +1 -0
- package/out/props/editor/check-box.js +25 -0
- package/out/props/editor/code.d.ts +84 -0
- package/out/props/editor/code.d.ts.map +1 -0
- package/out/props/editor/code.js +29 -0
- package/out/props/editor/common.d.ts +4 -2
- package/out/props/editor/common.d.ts.map +1 -1
- package/out/props/editor/common.js +4 -2
- package/out/props/editor/data-picker.d.ts +54 -0
- package/out/props/editor/data-picker.d.ts.map +1 -0
- package/out/props/editor/data-picker.js +25 -0
- package/out/props/editor/date-picker.d.ts +54 -0
- package/out/props/editor/date-picker.d.ts.map +1 -0
- package/out/props/editor/date-picker.js +25 -0
- package/out/props/editor/date-range.d.ts +50 -0
- package/out/props/editor/date-range.d.ts.map +1 -0
- package/out/props/editor/date-range.js +21 -0
- package/out/props/editor/dropdown-list.d.ts +54 -0
- package/out/props/editor/dropdown-list.d.ts.map +1 -0
- package/out/props/editor/dropdown-list.js +25 -0
- package/out/props/editor/html.d.ts +54 -0
- package/out/props/editor/html.d.ts.map +1 -0
- package/out/props/editor/html.js +25 -0
- package/out/props/editor/index.d.ts +22 -0
- package/out/props/editor/index.d.ts.map +1 -1
- package/out/props/editor/index.js +22 -0
- package/out/props/editor/list-box.d.ts +54 -0
- package/out/props/editor/list-box.d.ts.map +1 -0
- package/out/props/editor/list-box.js +25 -0
- package/out/props/editor/markdown.d.ts +54 -0
- package/out/props/editor/markdown.d.ts.map +1 -0
- package/out/props/editor/markdown.js +25 -0
- package/out/props/editor/number-range.d.ts +50 -0
- package/out/props/editor/number-range.d.ts.map +1 -0
- package/out/props/editor/number-range.js +21 -0
- package/out/props/editor/radio-button-list.d.ts +54 -0
- package/out/props/editor/radio-button-list.d.ts.map +1 -0
- package/out/props/editor/radio-button-list.js +25 -0
- package/out/props/editor/rate.d.ts +50 -0
- package/out/props/editor/rate.d.ts.map +1 -0
- package/out/props/editor/rate.js +21 -0
- package/out/props/editor/raw.d.ts +50 -0
- package/out/props/editor/raw.d.ts.map +1 -0
- package/out/props/editor/raw.js +21 -0
- package/out/props/editor/slider.d.ts +50 -0
- package/out/props/editor/slider.d.ts.map +1 -0
- package/out/props/editor/slider.js +21 -0
- package/out/props/editor/span.d.ts +54 -0
- package/out/props/editor/span.d.ts.map +1 -0
- package/out/props/editor/span.js +25 -0
- package/out/props/editor/stepper.d.ts +50 -0
- package/out/props/editor/stepper.d.ts.map +1 -0
- package/out/props/editor/stepper.js +21 -0
- package/out/props/editor/switch.d.ts +50 -0
- package/out/props/editor/switch.d.ts.map +1 -0
- package/out/props/editor/switch.js +21 -0
- package/out/props/editor/upload.d.ts +54 -0
- package/out/props/editor/upload.d.ts.map +1 -0
- package/out/props/editor/upload.js +25 -0
- package/out/use/control/index.d.ts.map +1 -0
- package/out/use/control/use-control-controller/use-control-controller.d.ts +13 -0
- package/out/use/control/use-control-controller/use-control-controller.d.ts.map +1 -0
- package/out/use/control/use-control-controller/use-control-controller.js +69 -0
- package/out/use/focus-blur/focus-blur.d.ts +18 -0
- package/out/use/focus-blur/focus-blur.d.ts.map +1 -0
- package/out/use/focus-blur/focus-blur.js +63 -0
- package/out/use/index.d.ts +6 -4
- package/out/use/index.d.ts.map +1 -1
- package/out/use/index.js +6 -4
- package/out/use/util/index.d.ts +19 -0
- package/out/use/util/index.d.ts.map +1 -1
- package/out/use/util/index.js +23 -1
- package/out/use/view/use-view-controller/use-view-controller.d.ts +2 -2
- package/out/use/view/use-view-controller/use-view-controller.d.ts.map +1 -1
- package/out/use/view/use-view-controller/use-view-controller.js +49 -3
- package/out/use/vue/vue.d.ts +1 -1
- package/out/use/vue/vue.d.ts.map +1 -1
- package/out/util/control/prepare-control.d.ts +15 -0
- package/out/util/control/prepare-control.d.ts.map +1 -0
- package/out/util/control/prepare-control.js +25 -0
- package/out/util/index.d.ts +1 -0
- package/out/util/index.d.ts.map +1 -1
- package/out/util/index.js +1 -0
- package/out/util/install.d.ts.map +1 -1
- package/out/util/route/route-listener.d.ts.map +1 -1
- package/out/util/route/route.d.ts +24 -3
- package/out/util/route/route.d.ts.map +1 -1
- package/out/util/route/route.js +109 -44
- package/package.json +19 -15
- package/src/index.ts +1 -0
- package/src/plugin/index.ts +1 -0
- package/src/plugin/plugin-factory/plugin-factory.ts +317 -0
- package/src/props/editor/array.ts +27 -0
- package/src/props/editor/autocomplete.ts +27 -0
- package/src/props/editor/cascader.ts +27 -0
- package/src/props/editor/check-box-list.ts +27 -0
- package/src/props/editor/check-box.ts +27 -0
- package/src/props/editor/code.ts +36 -0
- package/src/props/editor/common.ts +4 -2
- package/src/props/editor/data-picker.ts +27 -0
- package/src/props/editor/date-picker.ts +27 -0
- package/src/props/editor/date-range.ts +23 -0
- package/src/props/editor/dropdown-list.ts +27 -0
- package/src/props/editor/html.ts +27 -0
- package/src/props/editor/index.ts +22 -0
- package/src/props/editor/list-box.ts +27 -0
- package/src/props/editor/markdown.ts +29 -0
- package/src/props/editor/number-range.ts +23 -0
- package/src/props/editor/radio-button-list.ts +27 -0
- package/src/props/editor/rate.ts +23 -0
- package/src/props/editor/raw.ts +23 -0
- package/src/props/editor/slider.ts +23 -0
- package/src/props/editor/span.ts +27 -0
- package/src/props/editor/stepper.ts +23 -0
- package/src/props/editor/switch.ts +23 -0
- package/src/props/editor/upload.ts +27 -0
- package/src/use/click-outside/click-outside.ts +1 -1
- package/src/use/control/use-control-controller/use-control-controller.ts +86 -0
- package/src/use/focus-blur/focus-blur.ts +83 -0
- package/src/use/index.ts +6 -4
- package/src/use/util/index.ts +26 -0
- package/src/use/view/use-view-controller/use-view-controller.ts +64 -5
- package/src/use/vue/vue.ts +6 -6
- package/src/util/control/prepare-control.ts +33 -0
- package/src/util/index.ts +1 -0
- package/src/util/install.ts +4 -1
- package/src/util/route/route-listener.ts +1 -1
- package/src/util/route/route.ts +126 -51
- package/out/use/widgets/index.d.ts.map +0 -1
- package/out/use/widgets/use-control-controller/use-control-controller.d.ts +0 -13
- package/out/use/widgets/use-control-controller/use-control-controller.d.ts.map +0 -1
- package/out/use/widgets/use-control-controller/use-control-controller.js +0 -32
- package/src/use/widgets/use-control-controller/use-control-controller.ts +0 -41
- /package/out/use/{widgets → control}/index.d.ts +0 -0
- /package/out/use/{widgets → control}/index.js +0 -0
- /package/src/use/{widgets → control}/index.ts +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,986 @@
|
|
|
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
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// ../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js
|
|
28
|
+
var require_path_browserify = __commonJS({
|
|
29
|
+
"../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
function assertPath(path) {
|
|
32
|
+
if (typeof path !== "string") {
|
|
33
|
+
throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function normalizeStringPosix(path, allowAboveRoot) {
|
|
37
|
+
var res = "";
|
|
38
|
+
var lastSegmentLength = 0;
|
|
39
|
+
var lastSlash = -1;
|
|
40
|
+
var dots = 0;
|
|
41
|
+
var code;
|
|
42
|
+
for (var i = 0; i <= path.length; ++i) {
|
|
43
|
+
if (i < path.length)
|
|
44
|
+
code = path.charCodeAt(i);
|
|
45
|
+
else if (code === 47)
|
|
46
|
+
break;
|
|
47
|
+
else
|
|
48
|
+
code = 47;
|
|
49
|
+
if (code === 47) {
|
|
50
|
+
if (lastSlash === i - 1 || dots === 1) {
|
|
51
|
+
} else if (lastSlash !== i - 1 && dots === 2) {
|
|
52
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
|
|
53
|
+
if (res.length > 2) {
|
|
54
|
+
var lastSlashIndex = res.lastIndexOf("/");
|
|
55
|
+
if (lastSlashIndex !== res.length - 1) {
|
|
56
|
+
if (lastSlashIndex === -1) {
|
|
57
|
+
res = "";
|
|
58
|
+
lastSegmentLength = 0;
|
|
59
|
+
} else {
|
|
60
|
+
res = res.slice(0, lastSlashIndex);
|
|
61
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
62
|
+
}
|
|
63
|
+
lastSlash = i;
|
|
64
|
+
dots = 0;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
} else if (res.length === 2 || res.length === 1) {
|
|
68
|
+
res = "";
|
|
69
|
+
lastSegmentLength = 0;
|
|
70
|
+
lastSlash = i;
|
|
71
|
+
dots = 0;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (allowAboveRoot) {
|
|
76
|
+
if (res.length > 0)
|
|
77
|
+
res += "/..";
|
|
78
|
+
else
|
|
79
|
+
res = "..";
|
|
80
|
+
lastSegmentLength = 2;
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
if (res.length > 0)
|
|
84
|
+
res += "/" + path.slice(lastSlash + 1, i);
|
|
85
|
+
else
|
|
86
|
+
res = path.slice(lastSlash + 1, i);
|
|
87
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
88
|
+
}
|
|
89
|
+
lastSlash = i;
|
|
90
|
+
dots = 0;
|
|
91
|
+
} else if (code === 46 && dots !== -1) {
|
|
92
|
+
++dots;
|
|
93
|
+
} else {
|
|
94
|
+
dots = -1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return res;
|
|
98
|
+
}
|
|
99
|
+
function _format(sep, pathObject) {
|
|
100
|
+
var dir = pathObject.dir || pathObject.root;
|
|
101
|
+
var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
|
|
102
|
+
if (!dir) {
|
|
103
|
+
return base;
|
|
104
|
+
}
|
|
105
|
+
if (dir === pathObject.root) {
|
|
106
|
+
return dir + base;
|
|
107
|
+
}
|
|
108
|
+
return dir + sep + base;
|
|
109
|
+
}
|
|
110
|
+
var posix = {
|
|
111
|
+
// path.resolve([from ...], to)
|
|
112
|
+
resolve: function resolve() {
|
|
113
|
+
var resolvedPath = "";
|
|
114
|
+
var resolvedAbsolute = false;
|
|
115
|
+
var cwd;
|
|
116
|
+
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
117
|
+
var path;
|
|
118
|
+
if (i >= 0)
|
|
119
|
+
path = arguments[i];
|
|
120
|
+
else {
|
|
121
|
+
if (cwd === void 0)
|
|
122
|
+
cwd = process.cwd();
|
|
123
|
+
path = cwd;
|
|
124
|
+
}
|
|
125
|
+
assertPath(path);
|
|
126
|
+
if (path.length === 0) {
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
resolvedPath = path + "/" + resolvedPath;
|
|
130
|
+
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
131
|
+
}
|
|
132
|
+
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
133
|
+
if (resolvedAbsolute) {
|
|
134
|
+
if (resolvedPath.length > 0)
|
|
135
|
+
return "/" + resolvedPath;
|
|
136
|
+
else
|
|
137
|
+
return "/";
|
|
138
|
+
} else if (resolvedPath.length > 0) {
|
|
139
|
+
return resolvedPath;
|
|
140
|
+
} else {
|
|
141
|
+
return ".";
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
normalize: function normalize(path) {
|
|
145
|
+
assertPath(path);
|
|
146
|
+
if (path.length === 0)
|
|
147
|
+
return ".";
|
|
148
|
+
var isAbsolute = path.charCodeAt(0) === 47;
|
|
149
|
+
var trailingSeparator = path.charCodeAt(path.length - 1) === 47;
|
|
150
|
+
path = normalizeStringPosix(path, !isAbsolute);
|
|
151
|
+
if (path.length === 0 && !isAbsolute)
|
|
152
|
+
path = ".";
|
|
153
|
+
if (path.length > 0 && trailingSeparator)
|
|
154
|
+
path += "/";
|
|
155
|
+
if (isAbsolute)
|
|
156
|
+
return "/" + path;
|
|
157
|
+
return path;
|
|
158
|
+
},
|
|
159
|
+
isAbsolute: function isAbsolute(path) {
|
|
160
|
+
assertPath(path);
|
|
161
|
+
return path.length > 0 && path.charCodeAt(0) === 47;
|
|
162
|
+
},
|
|
163
|
+
join: function join2() {
|
|
164
|
+
if (arguments.length === 0)
|
|
165
|
+
return ".";
|
|
166
|
+
var joined;
|
|
167
|
+
for (var i = 0; i < arguments.length; ++i) {
|
|
168
|
+
var arg = arguments[i];
|
|
169
|
+
assertPath(arg);
|
|
170
|
+
if (arg.length > 0) {
|
|
171
|
+
if (joined === void 0)
|
|
172
|
+
joined = arg;
|
|
173
|
+
else
|
|
174
|
+
joined += "/" + arg;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (joined === void 0)
|
|
178
|
+
return ".";
|
|
179
|
+
return posix.normalize(joined);
|
|
180
|
+
},
|
|
181
|
+
relative: function relative(from, to) {
|
|
182
|
+
assertPath(from);
|
|
183
|
+
assertPath(to);
|
|
184
|
+
if (from === to)
|
|
185
|
+
return "";
|
|
186
|
+
from = posix.resolve(from);
|
|
187
|
+
to = posix.resolve(to);
|
|
188
|
+
if (from === to)
|
|
189
|
+
return "";
|
|
190
|
+
var fromStart = 1;
|
|
191
|
+
for (; fromStart < from.length; ++fromStart) {
|
|
192
|
+
if (from.charCodeAt(fromStart) !== 47)
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
var fromEnd = from.length;
|
|
196
|
+
var fromLen = fromEnd - fromStart;
|
|
197
|
+
var toStart = 1;
|
|
198
|
+
for (; toStart < to.length; ++toStart) {
|
|
199
|
+
if (to.charCodeAt(toStart) !== 47)
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
var toEnd = to.length;
|
|
203
|
+
var toLen = toEnd - toStart;
|
|
204
|
+
var length = fromLen < toLen ? fromLen : toLen;
|
|
205
|
+
var lastCommonSep = -1;
|
|
206
|
+
var i = 0;
|
|
207
|
+
for (; i <= length; ++i) {
|
|
208
|
+
if (i === length) {
|
|
209
|
+
if (toLen > length) {
|
|
210
|
+
if (to.charCodeAt(toStart + i) === 47) {
|
|
211
|
+
return to.slice(toStart + i + 1);
|
|
212
|
+
} else if (i === 0) {
|
|
213
|
+
return to.slice(toStart + i);
|
|
214
|
+
}
|
|
215
|
+
} else if (fromLen > length) {
|
|
216
|
+
if (from.charCodeAt(fromStart + i) === 47) {
|
|
217
|
+
lastCommonSep = i;
|
|
218
|
+
} else if (i === 0) {
|
|
219
|
+
lastCommonSep = 0;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
var fromCode = from.charCodeAt(fromStart + i);
|
|
225
|
+
var toCode = to.charCodeAt(toStart + i);
|
|
226
|
+
if (fromCode !== toCode)
|
|
227
|
+
break;
|
|
228
|
+
else if (fromCode === 47)
|
|
229
|
+
lastCommonSep = i;
|
|
230
|
+
}
|
|
231
|
+
var out = "";
|
|
232
|
+
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
233
|
+
if (i === fromEnd || from.charCodeAt(i) === 47) {
|
|
234
|
+
if (out.length === 0)
|
|
235
|
+
out += "..";
|
|
236
|
+
else
|
|
237
|
+
out += "/..";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (out.length > 0)
|
|
241
|
+
return out + to.slice(toStart + lastCommonSep);
|
|
242
|
+
else {
|
|
243
|
+
toStart += lastCommonSep;
|
|
244
|
+
if (to.charCodeAt(toStart) === 47)
|
|
245
|
+
++toStart;
|
|
246
|
+
return to.slice(toStart);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
_makeLong: function _makeLong(path) {
|
|
250
|
+
return path;
|
|
251
|
+
},
|
|
252
|
+
dirname: function dirname(path) {
|
|
253
|
+
assertPath(path);
|
|
254
|
+
if (path.length === 0)
|
|
255
|
+
return ".";
|
|
256
|
+
var code = path.charCodeAt(0);
|
|
257
|
+
var hasRoot = code === 47;
|
|
258
|
+
var end = -1;
|
|
259
|
+
var matchedSlash = true;
|
|
260
|
+
for (var i = path.length - 1; i >= 1; --i) {
|
|
261
|
+
code = path.charCodeAt(i);
|
|
262
|
+
if (code === 47) {
|
|
263
|
+
if (!matchedSlash) {
|
|
264
|
+
end = i;
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
matchedSlash = false;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if (end === -1)
|
|
272
|
+
return hasRoot ? "/" : ".";
|
|
273
|
+
if (hasRoot && end === 1)
|
|
274
|
+
return "//";
|
|
275
|
+
return path.slice(0, end);
|
|
276
|
+
},
|
|
277
|
+
basename: function basename(path, ext) {
|
|
278
|
+
if (ext !== void 0 && typeof ext !== "string")
|
|
279
|
+
throw new TypeError('"ext" argument must be a string');
|
|
280
|
+
assertPath(path);
|
|
281
|
+
var start = 0;
|
|
282
|
+
var end = -1;
|
|
283
|
+
var matchedSlash = true;
|
|
284
|
+
var i;
|
|
285
|
+
if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
|
|
286
|
+
if (ext.length === path.length && ext === path)
|
|
287
|
+
return "";
|
|
288
|
+
var extIdx = ext.length - 1;
|
|
289
|
+
var firstNonSlashEnd = -1;
|
|
290
|
+
for (i = path.length - 1; i >= 0; --i) {
|
|
291
|
+
var code = path.charCodeAt(i);
|
|
292
|
+
if (code === 47) {
|
|
293
|
+
if (!matchedSlash) {
|
|
294
|
+
start = i + 1;
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
if (firstNonSlashEnd === -1) {
|
|
299
|
+
matchedSlash = false;
|
|
300
|
+
firstNonSlashEnd = i + 1;
|
|
301
|
+
}
|
|
302
|
+
if (extIdx >= 0) {
|
|
303
|
+
if (code === ext.charCodeAt(extIdx)) {
|
|
304
|
+
if (--extIdx === -1) {
|
|
305
|
+
end = i;
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
extIdx = -1;
|
|
309
|
+
end = firstNonSlashEnd;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (start === end)
|
|
315
|
+
end = firstNonSlashEnd;
|
|
316
|
+
else if (end === -1)
|
|
317
|
+
end = path.length;
|
|
318
|
+
return path.slice(start, end);
|
|
319
|
+
} else {
|
|
320
|
+
for (i = path.length - 1; i >= 0; --i) {
|
|
321
|
+
if (path.charCodeAt(i) === 47) {
|
|
322
|
+
if (!matchedSlash) {
|
|
323
|
+
start = i + 1;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
} else if (end === -1) {
|
|
327
|
+
matchedSlash = false;
|
|
328
|
+
end = i + 1;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if (end === -1)
|
|
332
|
+
return "";
|
|
333
|
+
return path.slice(start, end);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
extname: function extname(path) {
|
|
337
|
+
assertPath(path);
|
|
338
|
+
var startDot = -1;
|
|
339
|
+
var startPart = 0;
|
|
340
|
+
var end = -1;
|
|
341
|
+
var matchedSlash = true;
|
|
342
|
+
var preDotState = 0;
|
|
343
|
+
for (var i = path.length - 1; i >= 0; --i) {
|
|
344
|
+
var code = path.charCodeAt(i);
|
|
345
|
+
if (code === 47) {
|
|
346
|
+
if (!matchedSlash) {
|
|
347
|
+
startPart = i + 1;
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
continue;
|
|
351
|
+
}
|
|
352
|
+
if (end === -1) {
|
|
353
|
+
matchedSlash = false;
|
|
354
|
+
end = i + 1;
|
|
355
|
+
}
|
|
356
|
+
if (code === 46) {
|
|
357
|
+
if (startDot === -1)
|
|
358
|
+
startDot = i;
|
|
359
|
+
else if (preDotState !== 1)
|
|
360
|
+
preDotState = 1;
|
|
361
|
+
} else if (startDot !== -1) {
|
|
362
|
+
preDotState = -1;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
|
|
366
|
+
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
367
|
+
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
368
|
+
return "";
|
|
369
|
+
}
|
|
370
|
+
return path.slice(startDot, end);
|
|
371
|
+
},
|
|
372
|
+
format: function format(pathObject) {
|
|
373
|
+
if (pathObject === null || typeof pathObject !== "object") {
|
|
374
|
+
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
|
|
375
|
+
}
|
|
376
|
+
return _format("/", pathObject);
|
|
377
|
+
},
|
|
378
|
+
parse: function parse(path) {
|
|
379
|
+
assertPath(path);
|
|
380
|
+
var ret = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
381
|
+
if (path.length === 0)
|
|
382
|
+
return ret;
|
|
383
|
+
var code = path.charCodeAt(0);
|
|
384
|
+
var isAbsolute = code === 47;
|
|
385
|
+
var start;
|
|
386
|
+
if (isAbsolute) {
|
|
387
|
+
ret.root = "/";
|
|
388
|
+
start = 1;
|
|
389
|
+
} else {
|
|
390
|
+
start = 0;
|
|
391
|
+
}
|
|
392
|
+
var startDot = -1;
|
|
393
|
+
var startPart = 0;
|
|
394
|
+
var end = -1;
|
|
395
|
+
var matchedSlash = true;
|
|
396
|
+
var i = path.length - 1;
|
|
397
|
+
var preDotState = 0;
|
|
398
|
+
for (; i >= start; --i) {
|
|
399
|
+
code = path.charCodeAt(i);
|
|
400
|
+
if (code === 47) {
|
|
401
|
+
if (!matchedSlash) {
|
|
402
|
+
startPart = i + 1;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
if (end === -1) {
|
|
408
|
+
matchedSlash = false;
|
|
409
|
+
end = i + 1;
|
|
410
|
+
}
|
|
411
|
+
if (code === 46) {
|
|
412
|
+
if (startDot === -1)
|
|
413
|
+
startDot = i;
|
|
414
|
+
else if (preDotState !== 1)
|
|
415
|
+
preDotState = 1;
|
|
416
|
+
} else if (startDot !== -1) {
|
|
417
|
+
preDotState = -1;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
|
|
421
|
+
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
422
|
+
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
423
|
+
if (end !== -1) {
|
|
424
|
+
if (startPart === 0 && isAbsolute)
|
|
425
|
+
ret.base = ret.name = path.slice(1, end);
|
|
426
|
+
else
|
|
427
|
+
ret.base = ret.name = path.slice(startPart, end);
|
|
428
|
+
}
|
|
429
|
+
} else {
|
|
430
|
+
if (startPart === 0 && isAbsolute) {
|
|
431
|
+
ret.name = path.slice(1, startDot);
|
|
432
|
+
ret.base = path.slice(1, end);
|
|
433
|
+
} else {
|
|
434
|
+
ret.name = path.slice(startPart, startDot);
|
|
435
|
+
ret.base = path.slice(startPart, end);
|
|
436
|
+
}
|
|
437
|
+
ret.ext = path.slice(startDot, end);
|
|
438
|
+
}
|
|
439
|
+
if (startPart > 0)
|
|
440
|
+
ret.dir = path.slice(0, startPart - 1);
|
|
441
|
+
else if (isAbsolute)
|
|
442
|
+
ret.dir = "/";
|
|
443
|
+
return ret;
|
|
444
|
+
},
|
|
445
|
+
sep: "/",
|
|
446
|
+
delimiter: ":",
|
|
447
|
+
win32: null,
|
|
448
|
+
posix: null
|
|
449
|
+
};
|
|
450
|
+
posix.posix = posix;
|
|
451
|
+
module.exports = posix;
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
// src/plugin/plugin-factory/plugin-factory.ts
|
|
456
|
+
var import_path_browserify = __toESM(require_path_browserify(), 1);
|
|
457
|
+
import { RuntimeError, RuntimeModelError } from "@ibiz-template/core";
|
|
458
|
+
import {
|
|
459
|
+
RemotePluginItem
|
|
460
|
+
} from "@ibiz-template/runtime";
|
|
461
|
+
var PluginFactory = class {
|
|
462
|
+
constructor() {
|
|
463
|
+
/**
|
|
464
|
+
* 是否为 http || https 开头
|
|
465
|
+
*
|
|
466
|
+
* @author chitanda
|
|
467
|
+
* @date 2022-11-07 14:11:28
|
|
468
|
+
* @protected
|
|
469
|
+
*/
|
|
470
|
+
this.urlReg = /^http[s]?:\/\/[^\s]*/;
|
|
471
|
+
/**
|
|
472
|
+
* 是否已经加载过文件缓存
|
|
473
|
+
*
|
|
474
|
+
* @author chitanda
|
|
475
|
+
* @date 2022-10-31 14:10:17
|
|
476
|
+
* @protected
|
|
477
|
+
* @type {Map<string, boolean>}
|
|
478
|
+
*/
|
|
479
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
480
|
+
/**
|
|
481
|
+
* 本地开发测试包,只在本地开发生效
|
|
482
|
+
*
|
|
483
|
+
* @author chitanda
|
|
484
|
+
* @date 2022-11-02 21:11:41
|
|
485
|
+
* @protected
|
|
486
|
+
*/
|
|
487
|
+
this.devPackages = /* @__PURE__ */ new Map();
|
|
488
|
+
/**
|
|
489
|
+
* 插件缓存
|
|
490
|
+
*
|
|
491
|
+
* @author chitanda
|
|
492
|
+
* @date 2022-10-31 14:10:28
|
|
493
|
+
* @protected
|
|
494
|
+
* @type {Map<string, RemotePluginItem>}
|
|
495
|
+
*/
|
|
496
|
+
this.pluginCache = /* @__PURE__ */ new Map();
|
|
497
|
+
/**
|
|
498
|
+
* 所有的插件
|
|
499
|
+
*
|
|
500
|
+
* @author chitanda
|
|
501
|
+
* @date 2023-02-02 16:02:55
|
|
502
|
+
* @protected
|
|
503
|
+
* @type {Plugin[]}
|
|
504
|
+
*/
|
|
505
|
+
this.pluginCodes = [];
|
|
506
|
+
/**
|
|
507
|
+
* 预定义插件集合
|
|
508
|
+
*
|
|
509
|
+
* @author chitanda
|
|
510
|
+
* @date 2023-03-09 17:03:46
|
|
511
|
+
* @protected
|
|
512
|
+
* @type {Map<string, IPluginItem>}
|
|
513
|
+
*/
|
|
514
|
+
this.predefinedPlugins = /* @__PURE__ */ new Map();
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* 注册视图默认插件
|
|
518
|
+
*
|
|
519
|
+
* @author chitanda
|
|
520
|
+
* @date 2023-02-06 21:02:10
|
|
521
|
+
* @param {IPluginItem} plugin
|
|
522
|
+
*/
|
|
523
|
+
registerPredefinedPlugin(plugin) {
|
|
524
|
+
this.predefinedPlugins.set(plugin.name, plugin);
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* 给入应用实例,将已经加载的过插件注入。主要用于多实例的情况
|
|
528
|
+
*
|
|
529
|
+
* @author chitanda
|
|
530
|
+
* @date 2023-02-02 16:02:51
|
|
531
|
+
* @param {App} app
|
|
532
|
+
*/
|
|
533
|
+
register(app) {
|
|
534
|
+
this.pluginCodes.forEach((plugin) => {
|
|
535
|
+
app.use(plugin);
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* 加载预置插件
|
|
540
|
+
*
|
|
541
|
+
* @author chitanda
|
|
542
|
+
* @date 2023-03-09 18:03:48
|
|
543
|
+
* @param {string} name
|
|
544
|
+
* @return {*} {Promise<void>}
|
|
545
|
+
*/
|
|
546
|
+
async loadPredefinedPlugin(name) {
|
|
547
|
+
if (this.predefinedPlugins.has(name)) {
|
|
548
|
+
const plugin = this.predefinedPlugins.get(name);
|
|
549
|
+
if (plugin) {
|
|
550
|
+
await this.loadPluginRef(plugin.name, plugin.path);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* 插件刚加载完成回来,设置到目前所有的 vue 实例当中
|
|
556
|
+
*
|
|
557
|
+
* @author chitanda
|
|
558
|
+
* @date 2023-02-02 17:02:38
|
|
559
|
+
* @protected
|
|
560
|
+
* @param {Plugin} code
|
|
561
|
+
*/
|
|
562
|
+
setPluginCode(code) {
|
|
563
|
+
this.pluginCodes.push(code);
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* 设置开发插件,用于本地调试
|
|
567
|
+
*
|
|
568
|
+
* @author chitanda
|
|
569
|
+
* @date 2022-11-02 21:11:56
|
|
570
|
+
* @param {string} name
|
|
571
|
+
* @param {() => Promise<unknown>} fn
|
|
572
|
+
*/
|
|
573
|
+
setDevPlugin(name, fn) {
|
|
574
|
+
this.devPackages.set(name, fn);
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* 加载插件
|
|
578
|
+
*
|
|
579
|
+
* @author chitanda
|
|
580
|
+
* @date 2022-10-31 14:10:13
|
|
581
|
+
* @param {ISysPFPlugin} plugin
|
|
582
|
+
* @return {*} {Promise<boolean>}
|
|
583
|
+
*/
|
|
584
|
+
async loadPlugin(plugin) {
|
|
585
|
+
if (plugin.runtimeObject === true) {
|
|
586
|
+
const pluginRef = plugin;
|
|
587
|
+
if (pluginRef) {
|
|
588
|
+
try {
|
|
589
|
+
await this.loadPluginRef(
|
|
590
|
+
pluginRef.rtobjectName,
|
|
591
|
+
pluginRef.rtobjectRepo
|
|
592
|
+
);
|
|
593
|
+
} catch (error) {
|
|
594
|
+
throw new RuntimeModelError(pluginRef, "\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25");
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* 加载应用插件
|
|
602
|
+
*
|
|
603
|
+
* @author chitanda
|
|
604
|
+
* @date 2022-10-31 16:10:57
|
|
605
|
+
* @param {IPSAppPFPluginRef} pluginRef
|
|
606
|
+
* @return {*} {Promise<boolean>}
|
|
607
|
+
*/
|
|
608
|
+
async loadPluginRef(rtObjectName, rtObjectRepo) {
|
|
609
|
+
if (this.pluginCache.has(rtObjectName)) {
|
|
610
|
+
return true;
|
|
611
|
+
}
|
|
612
|
+
let configData = null;
|
|
613
|
+
const fn = this.devPackages.get(rtObjectName);
|
|
614
|
+
if (fn) {
|
|
615
|
+
configData = await fn();
|
|
616
|
+
} else {
|
|
617
|
+
const pluginPath = rtObjectRepo;
|
|
618
|
+
const configUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/package.json") : "".concat(ibiz.env.pluginBaseUrl, "/").concat((0, import_path_browserify.join)(pluginPath, "package.json"));
|
|
619
|
+
const res = await ibiz.net.axios({
|
|
620
|
+
method: "get",
|
|
621
|
+
headers: { "Access-Control-Allow-Origin": "*" },
|
|
622
|
+
url: configUrl
|
|
623
|
+
});
|
|
624
|
+
if (res.status !== 200) {
|
|
625
|
+
throw new Error("\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25");
|
|
626
|
+
}
|
|
627
|
+
configData = res.data;
|
|
628
|
+
}
|
|
629
|
+
const remotePlugin = new RemotePluginItem(
|
|
630
|
+
rtObjectName,
|
|
631
|
+
rtObjectRepo,
|
|
632
|
+
configData
|
|
633
|
+
);
|
|
634
|
+
if (remotePlugin) {
|
|
635
|
+
try {
|
|
636
|
+
await this.loadScript(remotePlugin);
|
|
637
|
+
this.pluginCache.set(rtObjectName, remotePlugin);
|
|
638
|
+
return true;
|
|
639
|
+
} catch (error) {
|
|
640
|
+
ibiz.log.error(error);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return false;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* 加载插件
|
|
647
|
+
*
|
|
648
|
+
* @author chitanda
|
|
649
|
+
* @date 2022-11-02 14:11:31
|
|
650
|
+
* @protected
|
|
651
|
+
* @param {RemotePluginItem} remotePlugin
|
|
652
|
+
* @return {*} {Promise<void>}
|
|
653
|
+
*/
|
|
654
|
+
async loadScript(remotePlugin) {
|
|
655
|
+
const pluginPath = remotePlugin.repo;
|
|
656
|
+
const { name, version, system, module } = remotePlugin.config;
|
|
657
|
+
let scriptUrl = "";
|
|
658
|
+
if (this.devPackages.has(name)) {
|
|
659
|
+
scriptUrl = (0, import_path_browserify.join)("".concat(name, "@").concat(version), module);
|
|
660
|
+
} else if (ibiz.env.dev) {
|
|
661
|
+
scriptUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/").concat((0, import_path_browserify.join)(module)) : "".concat(ibiz.env.pluginBaseUrl, "/").concat(pluginPath, "/").concat((0, import_path_browserify.join)(module));
|
|
662
|
+
} else {
|
|
663
|
+
scriptUrl = "".concat(pluginPath).concat(pluginPath.endsWith("/") ? "" : "/").concat((0, import_path_browserify.join)(
|
|
664
|
+
system
|
|
665
|
+
));
|
|
666
|
+
}
|
|
667
|
+
if (scriptUrl) {
|
|
668
|
+
if (this.cache.has(scriptUrl)) {
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
let data = null;
|
|
672
|
+
const url = this.parseUrl(scriptUrl);
|
|
673
|
+
if (this.devPackages.has(name)) {
|
|
674
|
+
const fn = this.devPackages.get(name);
|
|
675
|
+
const pluginModule = await fn();
|
|
676
|
+
this.setPluginCode(pluginModule.default);
|
|
677
|
+
this.cache.set(scriptUrl, true);
|
|
678
|
+
} else if (ibiz.env.dev) {
|
|
679
|
+
data = await import(
|
|
680
|
+
scriptUrl
|
|
681
|
+
/* @vite-ignore */
|
|
682
|
+
);
|
|
683
|
+
} else {
|
|
684
|
+
System.addImportMap({
|
|
685
|
+
imports: {
|
|
686
|
+
[name]: url
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
data = await System.import(name);
|
|
690
|
+
}
|
|
691
|
+
if (data) {
|
|
692
|
+
if (data.default) {
|
|
693
|
+
this.setPluginCode(data.default);
|
|
694
|
+
} else {
|
|
695
|
+
throw new RuntimeError(
|
|
696
|
+
"\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u8FDC\u7A0B\u63D2\u4EF6\u672A\u627E\u5230[default]\u9ED8\u8BA4\u5BFC\u51FA"
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
this.cache.set(scriptUrl, true);
|
|
700
|
+
} else {
|
|
701
|
+
throw new RuntimeError(
|
|
702
|
+
"\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u672A\u627E\u5230\u6587\u4EF6\u6216\u6587\u4EF6\u5185\u5BB9\u683C\u5F0F\u4E0D\u6B63\u786E"
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* 编译请求文件地址
|
|
709
|
+
*
|
|
710
|
+
* @author chitanda
|
|
711
|
+
* @date 2022-10-31 14:10:19
|
|
712
|
+
* @protected
|
|
713
|
+
* @param {string} script
|
|
714
|
+
* @return {*} {string}
|
|
715
|
+
*/
|
|
716
|
+
parseUrl(script) {
|
|
717
|
+
if (this.urlReg.test(script)) {
|
|
718
|
+
return script;
|
|
719
|
+
}
|
|
720
|
+
let url = "";
|
|
721
|
+
if (this.urlReg.test(ibiz.env.pluginBaseUrl)) {
|
|
722
|
+
if (script.startsWith("/")) {
|
|
723
|
+
url = ibiz.env.pluginBaseUrl + script;
|
|
724
|
+
} else {
|
|
725
|
+
url = "".concat(ibiz.env.pluginBaseUrl, "/").concat(script);
|
|
726
|
+
}
|
|
727
|
+
} else {
|
|
728
|
+
url = "".concat((0, import_path_browserify.join)(ibiz.env.pluginBaseUrl, script));
|
|
729
|
+
}
|
|
730
|
+
const { origin, pathname } = window.location;
|
|
731
|
+
if (pathname.endsWith("/") && url.startsWith("/")) {
|
|
732
|
+
url = url.substring(1);
|
|
733
|
+
}
|
|
734
|
+
url = "".concat(origin).concat(pathname).concat(url);
|
|
735
|
+
return url;
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
// src/use/click-outside/click-outside.ts
|
|
740
|
+
import {
|
|
741
|
+
NOOP,
|
|
742
|
+
onClickOutside
|
|
743
|
+
} from "@ibiz-template/core";
|
|
744
|
+
import { isNil } from "ramda";
|
|
745
|
+
import { onBeforeUnmount, watch } from "vue";
|
|
746
|
+
function useClickOutside(elRef, handler, options = {}) {
|
|
747
|
+
let stop = NOOP;
|
|
748
|
+
let pause = NOOP;
|
|
749
|
+
let proceed = NOOP;
|
|
750
|
+
const destroy = () => {
|
|
751
|
+
stop();
|
|
752
|
+
stop = NOOP;
|
|
753
|
+
pause = NOOP;
|
|
754
|
+
proceed = NOOP;
|
|
755
|
+
};
|
|
756
|
+
watch(
|
|
757
|
+
elRef,
|
|
758
|
+
(newVal, oldVal) => {
|
|
759
|
+
if (newVal !== oldVal) {
|
|
760
|
+
if (isNil(newVal)) {
|
|
761
|
+
destroy();
|
|
762
|
+
} else {
|
|
763
|
+
const result = onClickOutside(
|
|
764
|
+
(newVal == null ? void 0 : newVal.$el) || newVal,
|
|
765
|
+
handler,
|
|
766
|
+
options
|
|
767
|
+
);
|
|
768
|
+
stop = result.stop;
|
|
769
|
+
pause = result.pause;
|
|
770
|
+
proceed = result.proceed;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
{ immediate: true }
|
|
775
|
+
);
|
|
776
|
+
onBeforeUnmount(() => {
|
|
777
|
+
if (stop !== NOOP) {
|
|
778
|
+
destroy();
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
return {
|
|
782
|
+
stop: () => stop(),
|
|
783
|
+
pause: () => pause(),
|
|
784
|
+
proceed: () => proceed()
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// src/use/control/use-control-controller/use-control-controller.ts
|
|
789
|
+
import { getCurrentInstance as getCurrentInstance2, onBeforeUnmount as onBeforeUnmount2, reactive, watch as watch3 } from "vue";
|
|
790
|
+
|
|
791
|
+
// src/use/vue/vue.ts
|
|
792
|
+
import { isFunc } from "qx-util";
|
|
793
|
+
import {
|
|
794
|
+
createCommentVNode,
|
|
795
|
+
getCurrentInstance,
|
|
796
|
+
isReactive,
|
|
797
|
+
toRaw,
|
|
798
|
+
watch as watch2
|
|
799
|
+
} from "vue";
|
|
800
|
+
function useProps() {
|
|
801
|
+
const vue = getCurrentInstance().proxy;
|
|
802
|
+
return vue.$props;
|
|
803
|
+
}
|
|
804
|
+
function getOrigin(val) {
|
|
805
|
+
return isReactive(val) ? toRaw(val) : val;
|
|
806
|
+
}
|
|
807
|
+
function usePropsWatch(key, callback, options) {
|
|
808
|
+
const props = useProps();
|
|
809
|
+
if (Object.prototype.hasOwnProperty.call(props, key)) {
|
|
810
|
+
watch2(
|
|
811
|
+
() => props[key],
|
|
812
|
+
(newVal, oldVal) => {
|
|
813
|
+
callback(getOrigin(newVal), getOrigin(oldVal));
|
|
814
|
+
},
|
|
815
|
+
options
|
|
816
|
+
);
|
|
817
|
+
callback(getOrigin(props[key]), void 0);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
function useForce() {
|
|
821
|
+
const vue = getCurrentInstance().proxy;
|
|
822
|
+
return (callback) => {
|
|
823
|
+
vue.$forceUpdate();
|
|
824
|
+
if (callback && isFunc(callback)) {
|
|
825
|
+
vue.$nextTick(() => {
|
|
826
|
+
callback();
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
function useForceTogether(vue, controller) {
|
|
832
|
+
const orignForce = controller.force;
|
|
833
|
+
const selfForce = useForce();
|
|
834
|
+
controller.force = (callback) => {
|
|
835
|
+
orignForce(callback);
|
|
836
|
+
selfForce();
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
function useController(controller) {
|
|
840
|
+
controller.force = useForce();
|
|
841
|
+
}
|
|
842
|
+
var EmptyVNode = createCommentVNode("EmptyVNode");
|
|
843
|
+
function isEmptyVNode(nodes) {
|
|
844
|
+
if (!Array.isArray(nodes)) {
|
|
845
|
+
return nodes === EmptyVNode;
|
|
846
|
+
}
|
|
847
|
+
return nodes.length === 1 && nodes[0] === EmptyVNode;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// src/use/util/index.ts
|
|
851
|
+
import { inject } from "vue";
|
|
852
|
+
function useCtx() {
|
|
853
|
+
return inject("ctx");
|
|
854
|
+
}
|
|
855
|
+
function useMobCtx() {
|
|
856
|
+
return inject("ctx");
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
// src/use/control/use-control-controller/use-control-controller.ts
|
|
860
|
+
function watchAndUpdateState(props, control) {
|
|
861
|
+
const excludeKeys = ["context", "params", "modelData"];
|
|
862
|
+
watch3(
|
|
863
|
+
() => {
|
|
864
|
+
const watchProps = {};
|
|
865
|
+
Object.keys(props).forEach((key) => {
|
|
866
|
+
if (!excludeKeys.includes(key)) {
|
|
867
|
+
watchProps[key] = props[key];
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
return watchProps;
|
|
871
|
+
},
|
|
872
|
+
(newVal, oldVal) => {
|
|
873
|
+
const changeProps = {};
|
|
874
|
+
Object.keys(newVal).forEach((key) => {
|
|
875
|
+
if (newVal[key] !== (oldVal || {})[key]) {
|
|
876
|
+
changeProps[key] = newVal[key];
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
ibiz.log.debug("\u90E8\u4EF6 [".concat(control.model.name, "] state \u53D8\u66F4"), changeProps);
|
|
880
|
+
Object.keys(changeProps).forEach((key) => {
|
|
881
|
+
if (changeProps[key] !== void 0) {
|
|
882
|
+
control.state[key] = changeProps[key];
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
},
|
|
886
|
+
{ immediate: true }
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
function useControlController(fn) {
|
|
890
|
+
const ctx = useCtx();
|
|
891
|
+
const props = useProps();
|
|
892
|
+
ctx.evt.emit("onForecast", props.modelData.name);
|
|
893
|
+
const c = fn(props.modelData, props.context, props.params, ctx);
|
|
894
|
+
watchAndUpdateState(props, c);
|
|
895
|
+
c.state = reactive(c.state);
|
|
896
|
+
c.force = useForce();
|
|
897
|
+
const vue = getCurrentInstance2().proxy;
|
|
898
|
+
c.evt.onAll((eventName, event) => {
|
|
899
|
+
vue.$emit(eventName.slice(2), event);
|
|
900
|
+
});
|
|
901
|
+
vue.$emit("controllerAppear", c);
|
|
902
|
+
c.created();
|
|
903
|
+
onBeforeUnmount2(() => c.destroyed());
|
|
904
|
+
return c;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// src/use/event/event.ts
|
|
908
|
+
import { listenJSEvent, NOOP as NOOP2 } from "@ibiz-template/core";
|
|
909
|
+
import { isNil as isNil2 } from "ramda";
|
|
910
|
+
import { onBeforeUnmount as onBeforeUnmount3, watch as watch4 } from "vue";
|
|
911
|
+
function useEventListener(elRef, eventName, listener, options = {}) {
|
|
912
|
+
let cleanup = NOOP2;
|
|
913
|
+
watch4(
|
|
914
|
+
elRef,
|
|
915
|
+
(newVal, oldVal) => {
|
|
916
|
+
if (newVal !== oldVal) {
|
|
917
|
+
if (isNil2(newVal)) {
|
|
918
|
+
cleanup();
|
|
919
|
+
cleanup = NOOP2;
|
|
920
|
+
} else {
|
|
921
|
+
cleanup = listenJSEvent(
|
|
922
|
+
(newVal == null ? void 0 : newVal.$el) || newVal,
|
|
923
|
+
eventName,
|
|
924
|
+
listener,
|
|
925
|
+
options
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
{ immediate: true }
|
|
931
|
+
);
|
|
932
|
+
onBeforeUnmount3(() => {
|
|
933
|
+
if (cleanup !== NOOP2) {
|
|
934
|
+
cleanup();
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
return () => {
|
|
938
|
+
cleanup();
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// src/use/focus-blur/focus-blur.ts
|
|
943
|
+
import { ref } from "vue";
|
|
944
|
+
function useFocusAndBlur(focus, blur) {
|
|
945
|
+
const componentRef = ref();
|
|
946
|
+
const isFocus = ref(false);
|
|
947
|
+
let outsideFuns;
|
|
948
|
+
const doBlur = () => {
|
|
949
|
+
if (!isFocus.value) {
|
|
950
|
+
ibiz.log.debug("\u6CA1\u6709\u805A\u7126\uFF0C\u4E0D\u89E6\u53D1\u5931\u7126");
|
|
951
|
+
}
|
|
952
|
+
blur();
|
|
953
|
+
outsideFuns.stop();
|
|
954
|
+
isFocus.value = false;
|
|
955
|
+
};
|
|
956
|
+
const pause = () => {
|
|
957
|
+
if (outsideFuns) {
|
|
958
|
+
outsideFuns.pause();
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
const stop = () => {
|
|
962
|
+
if (outsideFuns) {
|
|
963
|
+
outsideFuns.stop();
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
useEventListener(
|
|
967
|
+
componentRef,
|
|
968
|
+
"click",
|
|
969
|
+
(_evt) => {
|
|
970
|
+
if (!isFocus.value) {
|
|
971
|
+
outsideFuns = useClickOutside(componentRef, () => {
|
|
972
|
+
doBlur();
|
|
973
|
+
});
|
|
974
|
+
isFocus.value = true;
|
|
975
|
+
focus();
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
{ capture: true }
|
|
979
|
+
// 捕获防止内部ui拦截点击事件
|
|
980
|
+
);
|
|
981
|
+
return { componentRef, isFocus, doBlur, pause, stop };
|
|
982
|
+
}
|
|
983
|
+
|
|
1
984
|
// src/use/namespace/namespace.ts
|
|
2
985
|
import { Namespace } from "@ibiz-template/core";
|
|
3
986
|
function useNamespace(block) {
|
|
@@ -6,14 +989,15 @@ function useNamespace(block) {
|
|
|
6
989
|
|
|
7
990
|
// src/use/route/route.ts
|
|
8
991
|
import { useRoute as useRoute2 } from "vue-router";
|
|
9
|
-
import { ref, watch as
|
|
992
|
+
import { ref as ref2, watch as watch7 } from "vue";
|
|
10
993
|
|
|
11
994
|
// src/util/route/route.ts
|
|
12
995
|
import { notNilEmpty } from "qx-util";
|
|
13
|
-
import { RuntimeError } from "@ibiz-template/core";
|
|
996
|
+
import { RuntimeError as RuntimeError2 } from "@ibiz-template/core";
|
|
14
997
|
import qs from "qs";
|
|
15
998
|
import { useRoute } from "vue-router";
|
|
16
|
-
import { watch } from "vue";
|
|
999
|
+
import { watch as watch5 } from "vue";
|
|
1000
|
+
import { getMatchResPath } from "@ibiz-template/runtime";
|
|
17
1001
|
function getOwnRouteContext(context) {
|
|
18
1002
|
const ownContext = context.getOwnContext();
|
|
19
1003
|
const excludeKeys = ["srfsessionid", "srfappid"];
|
|
@@ -21,21 +1005,47 @@ function getOwnRouteContext(context) {
|
|
|
21
1005
|
if (excludeKeys.includes(key)) {
|
|
22
1006
|
delete ownContext[key];
|
|
23
1007
|
}
|
|
24
|
-
});
|
|
25
|
-
return ownContext;
|
|
1008
|
+
});
|
|
1009
|
+
return ownContext;
|
|
1010
|
+
}
|
|
1011
|
+
async function calcResRoutePath(routePath, context, appDataEntityId) {
|
|
1012
|
+
if (!appDataEntityId) {
|
|
1013
|
+
routePath.pathNodes[0].context = void 0;
|
|
1014
|
+
} else {
|
|
1015
|
+
const entity = await ibiz.hub.getAppDataEntity(appDataEntityId);
|
|
1016
|
+
let match = getMatchResPath(context, entity);
|
|
1017
|
+
if (!match) {
|
|
1018
|
+
match = { path: "", keys: [entity.codeName.toLowerCase()] };
|
|
1019
|
+
}
|
|
1020
|
+
if (match) {
|
|
1021
|
+
const currentContext = routePath.pathNodes[1].context;
|
|
1022
|
+
const resContext = {};
|
|
1023
|
+
match.keys.forEach((key) => {
|
|
1024
|
+
if (currentContext && Object.prototype.hasOwnProperty.call(currentContext, key)) {
|
|
1025
|
+
resContext[key] = currentContext[key];
|
|
1026
|
+
delete currentContext[key];
|
|
1027
|
+
}
|
|
1028
|
+
});
|
|
1029
|
+
routePath.pathNodes[0].context = resContext;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
26
1032
|
}
|
|
27
|
-
function generateRoutePath(appView, route, context, params) {
|
|
1033
|
+
async function generateRoutePath(appView, route, context, params) {
|
|
28
1034
|
const routePath = route2routePath(route);
|
|
29
1035
|
let depth = 2;
|
|
30
1036
|
if (context.toRouteDepth) {
|
|
31
1037
|
depth = context.toRouteDepth;
|
|
32
1038
|
delete context.toRouteDepth;
|
|
1039
|
+
} else if (ibiz.env.isMob) {
|
|
1040
|
+
routePath.pathNodes[0] = {
|
|
1041
|
+
viewName: "home"
|
|
1042
|
+
};
|
|
33
1043
|
}
|
|
34
1044
|
routePath.pathNodes.splice(depth - 1, routePath.pathNodes.length - depth + 1);
|
|
35
1045
|
if (context.currentSrfNav) {
|
|
36
1046
|
const currentNode = routePath.pathNodes[routePath.pathNodes.length - 1];
|
|
37
1047
|
currentNode.params = currentNode.params || {};
|
|
38
|
-
currentNode.
|
|
1048
|
+
currentNode.srfnav = context.currentSrfNav;
|
|
39
1049
|
delete context.currentSrfNav;
|
|
40
1050
|
}
|
|
41
1051
|
if (route.fullPath.startsWith("/appredirectview")) {
|
|
@@ -51,6 +1061,9 @@ function generateRoutePath(appView, route, context, params) {
|
|
|
51
1061
|
context: getOwnRouteContext(context),
|
|
52
1062
|
params
|
|
53
1063
|
});
|
|
1064
|
+
if (depth === 2) {
|
|
1065
|
+
await calcResRoutePath(routePath, context, appView.appDataEntityId);
|
|
1066
|
+
}
|
|
54
1067
|
return { path: routePath2string(routePath) };
|
|
55
1068
|
}
|
|
56
1069
|
async function parseRouteViewData(route, depth) {
|
|
@@ -58,14 +1071,14 @@ async function parseRouteViewData(route, depth) {
|
|
|
58
1071
|
const routePath = route2routePath(route);
|
|
59
1072
|
let viewCodeName = routePath.pathNodes[depth - 1].viewName;
|
|
60
1073
|
if (!viewCodeName) {
|
|
61
|
-
throw new
|
|
1074
|
+
throw new RuntimeError2("\u7B2C".concat(depth, "\u7EA7\u8DEF\u7531\u4E0D\u5B58\u5728\u89C6\u56FE\u6807\u8BC6"));
|
|
62
1075
|
}
|
|
63
1076
|
if (viewCodeName === "index") {
|
|
64
1077
|
viewCodeName = ibiz.hub.defaultAppIndexViewName;
|
|
65
1078
|
}
|
|
66
1079
|
const viewModel = await ibiz.hub.getAppView(viewCodeName);
|
|
67
1080
|
if (!viewModel) {
|
|
68
|
-
throw new
|
|
1081
|
+
throw new RuntimeError2("\u627E\u4E0D\u5230\u89C6\u56FE".concat(viewCodeName));
|
|
69
1082
|
}
|
|
70
1083
|
const context = {};
|
|
71
1084
|
if ((_a = ibiz.appData) == null ? void 0 : _a.context) {
|
|
@@ -92,8 +1105,8 @@ function route2routePath(route) {
|
|
|
92
1105
|
const depth = route.matched.length;
|
|
93
1106
|
const pathNodes = [];
|
|
94
1107
|
for (let index = 1; index <= depth; index++) {
|
|
95
|
-
const viewName = route.
|
|
96
|
-
const paramsStr = route.params[
|
|
1108
|
+
const viewName = route.path.split("/")[index * 2];
|
|
1109
|
+
const paramsStr = route.params["params".concat(index)];
|
|
97
1110
|
let params;
|
|
98
1111
|
let context;
|
|
99
1112
|
let srfnav;
|
|
@@ -134,16 +1147,16 @@ function route2routePath(route) {
|
|
|
134
1147
|
function routePath2string(routePath) {
|
|
135
1148
|
let pathStr = "";
|
|
136
1149
|
if (routePath.appContext) {
|
|
137
|
-
pathStr +=
|
|
1150
|
+
pathStr += "/".concat(qs.stringify(routePath.appContext, {
|
|
138
1151
|
delimiter: ";",
|
|
139
1152
|
strictNullHandling: true
|
|
140
|
-
})
|
|
1153
|
+
}));
|
|
141
1154
|
} else {
|
|
142
|
-
pathStr +=
|
|
1155
|
+
pathStr += "/".concat(ibiz.env.routePlaceholder);
|
|
143
1156
|
}
|
|
144
1157
|
routePath.pathNodes.forEach((pathNode, index) => {
|
|
145
|
-
pathStr +=
|
|
146
|
-
let routeParams;
|
|
1158
|
+
pathStr += "/".concat(pathNode.viewName, "/");
|
|
1159
|
+
let routeParams = {};
|
|
147
1160
|
if (index === 0) {
|
|
148
1161
|
if (notNilEmpty(pathNode.context)) {
|
|
149
1162
|
routeParams = pathNode.context;
|
|
@@ -156,23 +1169,49 @@ function routePath2string(routePath) {
|
|
|
156
1169
|
routeParams.srfnavctx = encodeURIComponent(objStr);
|
|
157
1170
|
}
|
|
158
1171
|
}
|
|
1172
|
+
if (pathNode.srfnav) {
|
|
1173
|
+
routeParams.srfnav = pathNode.srfnav;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
if (notNilEmpty(routeParams)) {
|
|
1177
|
+
pathStr += qs.stringify(routeParams, {
|
|
1178
|
+
delimiter: ";",
|
|
1179
|
+
strictNullHandling: true
|
|
1180
|
+
});
|
|
1181
|
+
} else {
|
|
1182
|
+
pathStr += ibiz.env.routePlaceholder;
|
|
159
1183
|
}
|
|
160
|
-
pathStr += qs.stringify(routeParams, { delimiter: ";", strictNullHandling: true }) || ibiz.env.routePlaceholder;
|
|
161
1184
|
});
|
|
162
1185
|
return pathStr;
|
|
163
1186
|
}
|
|
1187
|
+
function getNestedRoutePath(route, depth, noSrfNav = true) {
|
|
1188
|
+
if (route.matched.length < depth) {
|
|
1189
|
+
return "";
|
|
1190
|
+
}
|
|
1191
|
+
if (route.name) {
|
|
1192
|
+
return route.path;
|
|
1193
|
+
}
|
|
1194
|
+
const routePath = route2routePath(route);
|
|
1195
|
+
if (routePath.pathNodes.length < depth) {
|
|
1196
|
+
return route.path;
|
|
1197
|
+
}
|
|
1198
|
+
if (routePath.pathNodes.length > depth) {
|
|
1199
|
+
routePath.pathNodes = routePath.pathNodes.slice(0, depth);
|
|
1200
|
+
}
|
|
1201
|
+
if (noSrfNav) {
|
|
1202
|
+
delete routePath.pathNodes[depth - 1].srfnav;
|
|
1203
|
+
}
|
|
1204
|
+
return routePath2string(routePath);
|
|
1205
|
+
}
|
|
164
1206
|
function onRouteChange(callback, depth) {
|
|
165
1207
|
const route = useRoute();
|
|
166
|
-
|
|
167
|
-
()
|
|
1208
|
+
if (!route) {
|
|
1209
|
+
throw new RuntimeError2("\u65E0\u6CD5\u6B63\u786E\u83B7\u53D6route,\u53EF\u80FD\u662F\u4F9D\u8D56\u95EE\u9898");
|
|
1210
|
+
}
|
|
1211
|
+
watch5(
|
|
1212
|
+
() => route == null ? void 0 : route.path,
|
|
168
1213
|
() => {
|
|
169
|
-
const
|
|
170
|
-
let currentKey = "";
|
|
171
|
-
if (routePath.pathNodes.length >= depth) {
|
|
172
|
-
routePath.pathNodes = routePath.pathNodes.slice(0, depth);
|
|
173
|
-
delete routePath.pathNodes[depth - 1].srfnav;
|
|
174
|
-
currentKey = routePath2string(routePath);
|
|
175
|
-
}
|
|
1214
|
+
const currentKey = getNestedRoutePath(route, depth);
|
|
176
1215
|
callback({ currentKey, fullPath: route.fullPath });
|
|
177
1216
|
},
|
|
178
1217
|
{ immediate: true }
|
|
@@ -180,7 +1219,7 @@ function onRouteChange(callback, depth) {
|
|
|
180
1219
|
}
|
|
181
1220
|
|
|
182
1221
|
// src/util/route/route-listener.ts
|
|
183
|
-
import { watch as
|
|
1222
|
+
import { watch as watch6 } from "vue";
|
|
184
1223
|
var RouteListener = class {
|
|
185
1224
|
constructor(route, wait) {
|
|
186
1225
|
/**
|
|
@@ -208,7 +1247,7 @@ var RouteListener = class {
|
|
|
208
1247
|
if (wait) {
|
|
209
1248
|
this.wait = wait;
|
|
210
1249
|
}
|
|
211
|
-
|
|
1250
|
+
watch6(
|
|
212
1251
|
() => route.path,
|
|
213
1252
|
(newVal, oldVal) => {
|
|
214
1253
|
if (newVal !== oldVal) {
|
|
@@ -258,6 +1297,24 @@ var withInstall = (main, install) => {
|
|
|
258
1297
|
return main;
|
|
259
1298
|
};
|
|
260
1299
|
|
|
1300
|
+
// src/util/control/prepare-control.ts
|
|
1301
|
+
function prepareControl(c) {
|
|
1302
|
+
const commonNs = useNamespace("control");
|
|
1303
|
+
const { controlType, sysCss, codeName } = c.model;
|
|
1304
|
+
const typeClass = controlType.toLowerCase();
|
|
1305
|
+
const sysCssName = sysCss == null ? void 0 : sysCss.cssName;
|
|
1306
|
+
const ns = useNamespace("control-".concat(typeClass));
|
|
1307
|
+
const controlClass = [
|
|
1308
|
+
commonNs.b(),
|
|
1309
|
+
commonNs.b(typeClass),
|
|
1310
|
+
commonNs.m(codeName)
|
|
1311
|
+
];
|
|
1312
|
+
if (sysCssName) {
|
|
1313
|
+
controlClass.push(sysCssName);
|
|
1314
|
+
}
|
|
1315
|
+
return { controlClass, ns };
|
|
1316
|
+
}
|
|
1317
|
+
|
|
261
1318
|
// src/use/route/route.ts
|
|
262
1319
|
function useRouterQuery() {
|
|
263
1320
|
const route = useRoute2();
|
|
@@ -266,11 +1323,11 @@ function useRouterQuery() {
|
|
|
266
1323
|
}
|
|
267
1324
|
function useRouteKey(originKey, route, routeKey) {
|
|
268
1325
|
if (!routeKey) {
|
|
269
|
-
routeKey =
|
|
1326
|
+
routeKey = ref2("");
|
|
270
1327
|
}
|
|
271
1328
|
routeKey.value = originKey.value;
|
|
272
1329
|
const routeListener = new RouteListener(route);
|
|
273
|
-
|
|
1330
|
+
watch7(originKey, (newVal, oldVal) => {
|
|
274
1331
|
if (newVal !== oldVal) {
|
|
275
1332
|
routeListener.nextChange(() => {
|
|
276
1333
|
routeKey.value = newVal;
|
|
@@ -280,189 +1337,65 @@ function useRouteKey(originKey, route, routeKey) {
|
|
|
280
1337
|
return routeKey;
|
|
281
1338
|
}
|
|
282
1339
|
|
|
283
|
-
// src/use/
|
|
284
|
-
import {
|
|
1340
|
+
// src/use/view/use-view-controller/use-view-controller.ts
|
|
1341
|
+
import { clearAll } from "qx-util";
|
|
285
1342
|
import {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
1343
|
+
getCurrentInstance as getCurrentInstance3,
|
|
1344
|
+
inject as inject2,
|
|
1345
|
+
onBeforeUnmount as onBeforeUnmount4,
|
|
1346
|
+
provide,
|
|
1347
|
+
reactive as reactive2,
|
|
1348
|
+
watch as watch8
|
|
291
1349
|
} from "vue";
|
|
292
|
-
function
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
if (Object.prototype.hasOwnProperty.call(props, key)) {
|
|
302
|
-
watch4(
|
|
303
|
-
() => props[key],
|
|
304
|
-
(newVal, oldVal) => {
|
|
305
|
-
callback(getOrigin(newVal), getOrigin(oldVal));
|
|
306
|
-
},
|
|
307
|
-
options
|
|
308
|
-
);
|
|
309
|
-
callback(getOrigin(props[key]), void 0);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
function useForce() {
|
|
313
|
-
const vue = getCurrentInstance().proxy;
|
|
314
|
-
return (callback) => {
|
|
315
|
-
vue.$forceUpdate();
|
|
316
|
-
if (callback && isFunc(callback)) {
|
|
317
|
-
vue.$nextTick(() => {
|
|
318
|
-
callback();
|
|
319
|
-
});
|
|
1350
|
+
function watchAndUpateContextParams(props, view) {
|
|
1351
|
+
watch8(
|
|
1352
|
+
() => ({ context: props.context, params: props.params }),
|
|
1353
|
+
(newVal) => {
|
|
1354
|
+
view.context.reset({}, newVal.context);
|
|
1355
|
+
clearAll(view.params);
|
|
1356
|
+
Object.assign(view.params, newVal.params);
|
|
1357
|
+
view.handleContextParams();
|
|
1358
|
+
ibiz.log.debug("".concat(view.model.id, "\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A"), newVal);
|
|
320
1359
|
}
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
function useForceTogether(vue, controller) {
|
|
324
|
-
const orignForce = controller.force;
|
|
325
|
-
const selfForce = useForce();
|
|
326
|
-
controller.force = (callback) => {
|
|
327
|
-
orignForce(callback);
|
|
328
|
-
selfForce();
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
function useController(controller) {
|
|
332
|
-
controller.force = useForce();
|
|
333
|
-
}
|
|
334
|
-
var EmptyVNode = createCommentVNode("EmptyVNode");
|
|
335
|
-
function isEmptyVNode(nodes) {
|
|
336
|
-
if (!Array.isArray(nodes)) {
|
|
337
|
-
return nodes === EmptyVNode;
|
|
338
|
-
}
|
|
339
|
-
return nodes.length === 1 && nodes[0] === EmptyVNode;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// src/use/click-outside/click-outside.ts
|
|
343
|
-
import {
|
|
344
|
-
NOOP,
|
|
345
|
-
onClickOutside
|
|
346
|
-
} from "@ibiz-template/core";
|
|
347
|
-
import { isNil } from "ramda";
|
|
348
|
-
import { onBeforeUnmount, watch as watch5 } from "vue";
|
|
349
|
-
function useClickOutside(elRef, handler, options = {}) {
|
|
350
|
-
let stop = NOOP;
|
|
351
|
-
let pause = NOOP;
|
|
352
|
-
let proceed = NOOP;
|
|
353
|
-
const destroy = () => {
|
|
354
|
-
stop();
|
|
355
|
-
stop = NOOP;
|
|
356
|
-
pause = NOOP;
|
|
357
|
-
proceed = NOOP;
|
|
358
|
-
};
|
|
359
|
-
watch5(
|
|
360
|
-
elRef,
|
|
361
|
-
(newVal, oldVal) => {
|
|
362
|
-
if (newVal !== oldVal) {
|
|
363
|
-
if (isNil(newVal)) {
|
|
364
|
-
destroy();
|
|
365
|
-
} else {
|
|
366
|
-
const result = onClickOutside(
|
|
367
|
-
(newVal == null ? void 0 : newVal.$el) || newVal,
|
|
368
|
-
handler,
|
|
369
|
-
options
|
|
370
|
-
);
|
|
371
|
-
stop = result.stop;
|
|
372
|
-
pause = result.pause;
|
|
373
|
-
proceed = result.proceed;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
{ immediate: true }
|
|
378
1360
|
);
|
|
379
|
-
onBeforeUnmount(() => {
|
|
380
|
-
if (stop !== NOOP) {
|
|
381
|
-
destroy();
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
return {
|
|
385
|
-
stop: () => stop(),
|
|
386
|
-
pause: () => pause(),
|
|
387
|
-
proceed: () => proceed()
|
|
388
|
-
};
|
|
389
1361
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
function useEventListener(elRef, eventName, listener, options = {}) {
|
|
396
|
-
let cleanup = NOOP2;
|
|
397
|
-
watch6(
|
|
398
|
-
elRef,
|
|
1362
|
+
function watchAndUpdateState2(props, view) {
|
|
1363
|
+
watch8(
|
|
1364
|
+
() => {
|
|
1365
|
+
return props.state ? { ...props.state } : {};
|
|
1366
|
+
},
|
|
399
1367
|
(newVal, oldVal) => {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
} else {
|
|
405
|
-
cleanup = listenJSEvent(
|
|
406
|
-
(newVal == null ? void 0 : newVal.$el) || newVal,
|
|
407
|
-
eventName,
|
|
408
|
-
listener,
|
|
409
|
-
options
|
|
410
|
-
);
|
|
1368
|
+
const changeProps = {};
|
|
1369
|
+
Object.keys(newVal).forEach((key) => {
|
|
1370
|
+
if (newVal[key] !== (oldVal || {})[key]) {
|
|
1371
|
+
changeProps[key] = newVal[key];
|
|
411
1372
|
}
|
|
412
|
-
}
|
|
1373
|
+
});
|
|
1374
|
+
ibiz.log.debug("\u89C6\u56FE [".concat(view.model.name, "] state \u53D8\u66F4"), changeProps);
|
|
1375
|
+
Object.keys(changeProps).forEach((key) => {
|
|
1376
|
+
view.state[key] = changeProps[key];
|
|
1377
|
+
});
|
|
413
1378
|
},
|
|
414
1379
|
{ immediate: true }
|
|
415
1380
|
);
|
|
416
|
-
onBeforeUnmount2(() => {
|
|
417
|
-
if (cleanup !== NOOP2) {
|
|
418
|
-
cleanup();
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
return () => {
|
|
422
|
-
cleanup();
|
|
423
|
-
};
|
|
424
1381
|
}
|
|
425
|
-
|
|
426
|
-
// src/use/view/use-view-controller/use-view-controller.ts
|
|
427
|
-
import {
|
|
428
|
-
getCurrentInstance as getCurrentInstance2,
|
|
429
|
-
inject,
|
|
430
|
-
onBeforeUnmount as onBeforeUnmount3,
|
|
431
|
-
provide,
|
|
432
|
-
reactive
|
|
433
|
-
} from "vue";
|
|
434
1382
|
function useViewController(fn) {
|
|
435
1383
|
const props = useProps();
|
|
436
|
-
const ctx =
|
|
437
|
-
ctx == null ? void 0 : ctx.evt.emit("
|
|
1384
|
+
const ctx = inject2("ctx", void 0);
|
|
1385
|
+
ctx == null ? void 0 : ctx.evt.emit("onForecast", props.modelData.name);
|
|
438
1386
|
const c = fn(props.modelData, props.context, props.params, ctx);
|
|
1387
|
+
watchAndUpateContextParams(props, c);
|
|
1388
|
+
watchAndUpdateState2(props, c);
|
|
439
1389
|
provide("ctx", c.ctx);
|
|
440
|
-
c.state =
|
|
1390
|
+
c.state = reactive2(c.state);
|
|
1391
|
+
c.slotProps = reactive2(c.slotProps);
|
|
441
1392
|
if (props.modal) {
|
|
442
1393
|
c.modal = props.modal;
|
|
443
1394
|
}
|
|
444
|
-
const vue = getCurrentInstance2().proxy;
|
|
445
|
-
c.force = useForce();
|
|
446
|
-
c.evt.onAll((eventName, event) => {
|
|
447
|
-
vue.$emit(eventName.slice(2), event);
|
|
448
|
-
});
|
|
449
|
-
c.created();
|
|
450
|
-
onBeforeUnmount3(() => c.destroyed());
|
|
451
|
-
return c;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// src/use/widgets/use-control-controller/use-control-controller.ts
|
|
455
|
-
import { getCurrentInstance as getCurrentInstance3, inject as inject2, onBeforeUnmount as onBeforeUnmount4, reactive as reactive2 } from "vue";
|
|
456
|
-
function useControlController(fn) {
|
|
457
|
-
const ctx = inject2("ctx");
|
|
458
|
-
const props = useProps();
|
|
459
|
-
ctx.evt.emit("forecast", props.modelData.name);
|
|
460
|
-
const c = fn(props.modelData, props.context, props.params, ctx);
|
|
461
|
-
c.state = reactive2(c.state);
|
|
462
1395
|
c.force = useForce();
|
|
463
1396
|
const vue = getCurrentInstance3().proxy;
|
|
464
1397
|
c.evt.onAll((eventName, event) => {
|
|
465
|
-
vue.$emit(eventName, event);
|
|
1398
|
+
vue.$emit(eventName.slice(2), event);
|
|
466
1399
|
});
|
|
467
1400
|
c.created();
|
|
468
1401
|
onBeforeUnmount4(() => c.destroyed());
|
|
@@ -506,8 +1439,10 @@ function getEditorEmits() {
|
|
|
506
1439
|
return {
|
|
507
1440
|
/** 值变更事件 */
|
|
508
1441
|
change: (_value, _name) => true,
|
|
509
|
-
/**
|
|
510
|
-
|
|
1442
|
+
/** 失焦事件 */
|
|
1443
|
+
blur: () => true,
|
|
1444
|
+
/** 聚焦事件 */
|
|
1445
|
+
focus: () => true
|
|
511
1446
|
};
|
|
512
1447
|
}
|
|
513
1448
|
function getGridEditorEmits() {
|
|
@@ -545,34 +1480,272 @@ function getInputIpProps() {
|
|
|
545
1480
|
function getGridInputIpProps() {
|
|
546
1481
|
return { ...getInputIpProps(), ...getGridEditorCommonProps() };
|
|
547
1482
|
}
|
|
1483
|
+
|
|
1484
|
+
// src/props/editor/span.ts
|
|
1485
|
+
function getSpanProps() {
|
|
1486
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1487
|
+
}
|
|
1488
|
+
function getGridSpanProps() {
|
|
1489
|
+
return { ...getSpanProps(), ...getGridEditorCommonProps() };
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
// src/props/editor/dropdown-list.ts
|
|
1493
|
+
function getDropdownProps() {
|
|
1494
|
+
return { ...getEditorProps(), value: String };
|
|
1495
|
+
}
|
|
1496
|
+
function getGridDropdownProps() {
|
|
1497
|
+
return { ...getDropdownProps(), ...getGridEditorCommonProps() };
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
// src/props/editor/check-box-list.ts
|
|
1501
|
+
function getCheckboxListProps() {
|
|
1502
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1503
|
+
}
|
|
1504
|
+
function getGridCheckboxListProps() {
|
|
1505
|
+
return { ...getCheckboxListProps(), ...getGridEditorCommonProps() };
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
// src/props/editor/check-box.ts
|
|
1509
|
+
function getCheckboxProps() {
|
|
1510
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1511
|
+
}
|
|
1512
|
+
function getGridCheckboxProps() {
|
|
1513
|
+
return { ...getCheckboxProps(), ...getGridEditorCommonProps() };
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
// src/props/editor/data-picker.ts
|
|
1517
|
+
function getDataPickerProps() {
|
|
1518
|
+
return { ...getEditorProps(), value: String };
|
|
1519
|
+
}
|
|
1520
|
+
function getGridDataPickerProps() {
|
|
1521
|
+
return { ...getDataPickerProps(), ...getGridEditorCommonProps() };
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
// src/props/editor/date-picker.ts
|
|
1525
|
+
function getDatePickerProps() {
|
|
1526
|
+
return { ...getEditorProps(), value: String };
|
|
1527
|
+
}
|
|
1528
|
+
function getGridDatePickerProps() {
|
|
1529
|
+
return { ...getDatePickerProps(), ...getGridEditorCommonProps() };
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
// src/props/editor/date-range.ts
|
|
1533
|
+
function getDateRangeProps() {
|
|
1534
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1535
|
+
}
|
|
1536
|
+
function getGridDateRangeProps() {
|
|
1537
|
+
return { ...getDateRangeProps(), ...getGridEditorCommonProps() };
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
// src/props/editor/list-box.ts
|
|
1541
|
+
function getListBoxProps() {
|
|
1542
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1543
|
+
}
|
|
1544
|
+
function getGridListBoxProps() {
|
|
1545
|
+
return { ...getListBoxProps(), ...getGridEditorCommonProps() };
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
// src/props/editor/number-range.ts
|
|
1549
|
+
function getNumberRangeProps() {
|
|
1550
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1551
|
+
}
|
|
1552
|
+
function getGridNumberRangeProps() {
|
|
1553
|
+
return { ...getNumberRangeProps(), ...getGridEditorCommonProps() };
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
// src/props/editor/radio-button-list.ts
|
|
1557
|
+
function getRadioProps() {
|
|
1558
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1559
|
+
}
|
|
1560
|
+
function getGridRadioProps() {
|
|
1561
|
+
return { ...getRadioProps(), ...getGridEditorCommonProps() };
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
// src/props/editor/rate.ts
|
|
1565
|
+
function getRateProps() {
|
|
1566
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1567
|
+
}
|
|
1568
|
+
function getGridRateProps() {
|
|
1569
|
+
return { ...getRateProps(), ...getGridEditorCommonProps() };
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// src/props/editor/raw.ts
|
|
1573
|
+
function getRawProps() {
|
|
1574
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1575
|
+
}
|
|
1576
|
+
function getGridRawProps() {
|
|
1577
|
+
return { ...getRawProps(), ...getGridEditorCommonProps() };
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
// src/props/editor/slider.ts
|
|
1581
|
+
function getSliderProps() {
|
|
1582
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1583
|
+
}
|
|
1584
|
+
function getGridSliderProps() {
|
|
1585
|
+
return { ...getSliderProps(), ...getGridEditorCommonProps() };
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// src/props/editor/stepper.ts
|
|
1589
|
+
function getStepperProps() {
|
|
1590
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1591
|
+
}
|
|
1592
|
+
function getGridStepperProps() {
|
|
1593
|
+
return { ...getStepperProps(), ...getGridEditorCommonProps() };
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
// src/props/editor/switch.ts
|
|
1597
|
+
function getSwitchProps() {
|
|
1598
|
+
return { ...getEditorProps(), value: [String, Number] };
|
|
1599
|
+
}
|
|
1600
|
+
function getGridSwitchProps() {
|
|
1601
|
+
return { ...getSwitchProps(), ...getGridEditorCommonProps() };
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
// src/props/editor/upload.ts
|
|
1605
|
+
function getUploadProps() {
|
|
1606
|
+
return { ...getEditorProps(), value: String };
|
|
1607
|
+
}
|
|
1608
|
+
function getGridUploadProps() {
|
|
1609
|
+
return { ...getUploadProps(), ...getGridEditorCommonProps() };
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
// src/props/editor/autocomplete.ts
|
|
1613
|
+
function getAutoCompleteProps() {
|
|
1614
|
+
return { ...getEditorProps(), value: String };
|
|
1615
|
+
}
|
|
1616
|
+
function getGridAutoCompleteProps() {
|
|
1617
|
+
return { ...getAutoCompleteProps(), ...getGridEditorCommonProps() };
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
// src/props/editor/code.ts
|
|
1621
|
+
function getCodeProps() {
|
|
1622
|
+
return {
|
|
1623
|
+
...getEditorProps(),
|
|
1624
|
+
value: String,
|
|
1625
|
+
language: {
|
|
1626
|
+
type: String
|
|
1627
|
+
},
|
|
1628
|
+
theme: {
|
|
1629
|
+
type: String
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
function getGridCodeProps() {
|
|
1634
|
+
return { ...getCodeProps(), ...getGridEditorCommonProps() };
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
// src/props/editor/html.ts
|
|
1638
|
+
function getHtmlProps() {
|
|
1639
|
+
return { ...getEditorProps(), value: String };
|
|
1640
|
+
}
|
|
1641
|
+
function getGridHtmlProps() {
|
|
1642
|
+
return { ...getHtmlProps(), ...getGridEditorCommonProps() };
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
// src/props/editor/markdown.ts
|
|
1646
|
+
function getMarkDownProps() {
|
|
1647
|
+
return {
|
|
1648
|
+
...getEditorProps()
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
function getGridMarkDownProps() {
|
|
1652
|
+
return { ...getMarkDownProps(), ...getGridEditorCommonProps() };
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
// src/props/editor/array.ts
|
|
1656
|
+
function getArrayProps() {
|
|
1657
|
+
return { ...getEditorProps(), value: [Array, Array] };
|
|
1658
|
+
}
|
|
1659
|
+
function getGridArrayProps() {
|
|
1660
|
+
return { ...getArrayProps(), ...getGridEditorCommonProps() };
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
// src/props/editor/cascader.ts
|
|
1664
|
+
function getCascaderProps() {
|
|
1665
|
+
return { ...getEditorProps(), value: String };
|
|
1666
|
+
}
|
|
1667
|
+
function getGridCascaderProps() {
|
|
1668
|
+
return { ...getCascaderProps(), ...getGridEditorCommonProps() };
|
|
1669
|
+
}
|
|
548
1670
|
export {
|
|
549
1671
|
EmptyVNode,
|
|
1672
|
+
PluginFactory,
|
|
550
1673
|
RequiredProp,
|
|
551
1674
|
RouteListener,
|
|
1675
|
+
calcResRoutePath,
|
|
552
1676
|
generateRoutePath,
|
|
1677
|
+
getArrayProps,
|
|
1678
|
+
getAutoCompleteProps,
|
|
1679
|
+
getCascaderProps,
|
|
1680
|
+
getCheckboxListProps,
|
|
1681
|
+
getCheckboxProps,
|
|
1682
|
+
getCodeProps,
|
|
1683
|
+
getDataPickerProps,
|
|
1684
|
+
getDatePickerProps,
|
|
1685
|
+
getDateRangeProps,
|
|
1686
|
+
getDropdownProps,
|
|
553
1687
|
getEditorEmits,
|
|
554
1688
|
getEditorProps,
|
|
1689
|
+
getGridArrayProps,
|
|
1690
|
+
getGridAutoCompleteProps,
|
|
1691
|
+
getGridCascaderProps,
|
|
1692
|
+
getGridCheckboxListProps,
|
|
1693
|
+
getGridCheckboxProps,
|
|
1694
|
+
getGridCodeProps,
|
|
1695
|
+
getGridDataPickerProps,
|
|
1696
|
+
getGridDatePickerProps,
|
|
1697
|
+
getGridDateRangeProps,
|
|
1698
|
+
getGridDropdownProps,
|
|
555
1699
|
getGridEditorCommonProps,
|
|
556
1700
|
getGridEditorEmits,
|
|
1701
|
+
getGridHtmlProps,
|
|
557
1702
|
getGridInputIpProps,
|
|
558
1703
|
getGridInputNumberProps,
|
|
559
1704
|
getGridInputProps,
|
|
1705
|
+
getGridListBoxProps,
|
|
1706
|
+
getGridMarkDownProps,
|
|
1707
|
+
getGridNumberRangeProps,
|
|
1708
|
+
getGridRadioProps,
|
|
1709
|
+
getGridRateProps,
|
|
1710
|
+
getGridRawProps,
|
|
1711
|
+
getGridSliderProps,
|
|
1712
|
+
getGridSpanProps,
|
|
1713
|
+
getGridStepperProps,
|
|
1714
|
+
getGridSwitchProps,
|
|
1715
|
+
getGridUploadProps,
|
|
1716
|
+
getHtmlProps,
|
|
560
1717
|
getInputIpProps,
|
|
561
1718
|
getInputNumberProps,
|
|
562
1719
|
getInputProps,
|
|
1720
|
+
getListBoxProps,
|
|
1721
|
+
getMarkDownProps,
|
|
1722
|
+
getNestedRoutePath,
|
|
1723
|
+
getNumberRangeProps,
|
|
563
1724
|
getOrigin,
|
|
564
1725
|
getOwnRouteContext,
|
|
1726
|
+
getRadioProps,
|
|
1727
|
+
getRateProps,
|
|
1728
|
+
getRawProps,
|
|
1729
|
+
getSliderProps,
|
|
1730
|
+
getSpanProps,
|
|
1731
|
+
getStepperProps,
|
|
1732
|
+
getSwitchProps,
|
|
1733
|
+
getUploadProps,
|
|
565
1734
|
isEmptyVNode,
|
|
566
1735
|
onRouteChange,
|
|
567
1736
|
parseRouteViewData,
|
|
1737
|
+
prepareControl,
|
|
568
1738
|
route2routePath,
|
|
569
1739
|
routePath2string,
|
|
570
1740
|
useClickOutside,
|
|
571
1741
|
useControlController,
|
|
572
1742
|
useController,
|
|
1743
|
+
useCtx,
|
|
573
1744
|
useEventListener,
|
|
1745
|
+
useFocusAndBlur,
|
|
574
1746
|
useForce,
|
|
575
1747
|
useForceTogether,
|
|
1748
|
+
useMobCtx,
|
|
576
1749
|
useNamespace,
|
|
577
1750
|
useProps,
|
|
578
1751
|
usePropsWatch,
|