agile-core 3.0.3 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/assets/aui-colored.svg +55 -55
- package/assets/aui.svg +35 -35
- package/dist/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.d.ts +4 -0
- package/dist/core.d.ts.map +1 -1
- package/dist/core.es.js +121 -93
- package/dist/core.es.js.map +1 -1
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.d.ts +1 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.es.js +41 -38
- package/dist/plugin.es.js.map +1 -1
- package/package.json +1 -1
- package/types/aui-global.d.ts +79 -79
- package/types/aui-vue-global.d.ts +35 -35
package/dist/core.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createApp as e, defineComponent as t, useAttrs as n, shallowRef as r, ref as
|
|
2
|
-
import { merge as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
const _AuiComponent = class _AuiComponent extends (
|
|
1
|
+
import { createApp as e, defineComponent as t, useAttrs as n, shallowRef as r, ref as o, useSlots as s, onMounted as i, onUpdated as a, h as u } from "vue";
|
|
2
|
+
import { merge as l } from "ts-deepmerge";
|
|
3
|
+
var h, c;
|
|
4
|
+
const d = __AUI_CONFIG__.tagPrefix || "aui", p = "data-v-aui", m = "auix", f = Symbol("shadow");
|
|
5
|
+
const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
|
|
6
6
|
constructor(e2) {
|
|
7
|
-
super(), this.__hasVue__ = false, this[
|
|
7
|
+
super(), this.__hasVue__ = false, this[h] = { needHook: false, slot: {} }, this[_AuiComponent.shadowSymbol].options = e2 || {}, this.$initAttrs();
|
|
8
8
|
}
|
|
9
9
|
connectedCallback() {
|
|
10
10
|
this.$needInit() && (this.$needHook(true), this.$initVue());
|
|
@@ -52,7 +52,7 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
52
52
|
if (n2.getAttribute(e2) === t2) return;
|
|
53
53
|
n2.setAttribute(e2, t2);
|
|
54
54
|
}
|
|
55
|
-
this.$isShowProp(
|
|
55
|
+
this.$isShowProp(b.vueAttrName(e2)) && super.setAttribute(e2, t2), "value" === e2 && n2 ? this.value = n2.getAttribute(e2) : this.$attrChange(e2);
|
|
56
56
|
}
|
|
57
57
|
getAttribute(e2) {
|
|
58
58
|
const t2 = this[_AuiComponent.shadowSymbol].el;
|
|
@@ -61,11 +61,11 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
61
61
|
removeAttribute(e2) {
|
|
62
62
|
const t2 = this[_AuiComponent.shadowSymbol].el;
|
|
63
63
|
t2 && t2.removeAttribute(e2);
|
|
64
|
-
this.$isShowProp(
|
|
64
|
+
this.$isShowProp(b.vueAttrName(e2)) && super.removeAttribute(e2), this.$attrChange(e2);
|
|
65
65
|
}
|
|
66
66
|
attributeChangedCallback(e2, t2, n2) {
|
|
67
67
|
const r2 = this[_AuiComponent.shadowSymbol].el;
|
|
68
|
-
r2 && t2 !== n2 && (this.$isShowProp(
|
|
68
|
+
r2 && t2 !== n2 && (this.$isShowProp(b.vueAttrName(e2)) || super.removeAttribute(e2), r2.setAttribute(e2, n2 || ""), "value" !== e2 && this.$attrChange(e2));
|
|
69
69
|
}
|
|
70
70
|
static $anyToArray(e2) {
|
|
71
71
|
let t2 = [];
|
|
@@ -79,11 +79,39 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
79
79
|
} else e2 instanceof Array && (t2 = e2);
|
|
80
80
|
return t2;
|
|
81
81
|
}
|
|
82
|
+
$customEvent(e2, t2) {
|
|
83
|
+
this.dispatchEvent(new CustomEvent(e2, Object.assign({ bubbles: false, composed: false, cancelable: true }, t2 || {})));
|
|
84
|
+
}
|
|
85
|
+
$forceUpdate() {
|
|
86
|
+
let e2 = null;
|
|
87
|
+
const t2 = this[_AuiComponent.shadowSymbol].slot;
|
|
88
|
+
for (const n2 in t2) {
|
|
89
|
+
const r2 = this.$slotCollection(t2[n2]);
|
|
90
|
+
e2 || (e2 = {}), e2[n2] = r2;
|
|
91
|
+
}
|
|
92
|
+
e2 && (this[_AuiComponent.shadowSymbol].slotCollection = e2), this.$customEvent("aui-force-update");
|
|
93
|
+
}
|
|
94
|
+
$slotCollection(e2) {
|
|
95
|
+
var _a;
|
|
96
|
+
const { start: t2, end: n2 } = e2, r2 = [];
|
|
97
|
+
let o2;
|
|
98
|
+
for (; t2 && (o2 = t2.nextSibling) && o2 !== n2; ) (_a = t2.parentNode) == null ? void 0 : _a.removeChild(o2), r2.push(o2);
|
|
99
|
+
return r2;
|
|
100
|
+
}
|
|
101
|
+
$slotReplace() {
|
|
102
|
+
const e2 = this[_AuiComponent.shadowSymbol].slotCollection;
|
|
103
|
+
if (e2) {
|
|
104
|
+
delete this[_AuiComponent.shadowSymbol].slotCollection;
|
|
105
|
+
for (const t2 in e2) {
|
|
106
|
+
this.querySelector(`aui-slot[name="${t2}"]`).$replace(this), this.$replaceChildren(t2, e2[t2]);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
82
110
|
$textContent(e2, ...t2) {
|
|
83
111
|
if (0 === t2.length) {
|
|
84
112
|
const t3 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
|
|
85
|
-
let
|
|
86
|
-
for (;
|
|
113
|
+
let o2 = n2;
|
|
114
|
+
for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) t3.push(o2.textContent);
|
|
87
115
|
return t3.join("");
|
|
88
116
|
}
|
|
89
117
|
return this.$replaceChildren(e2, [document.createTextNode(t2[0] || "")]), "";
|
|
@@ -91,11 +119,11 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
91
119
|
$innerHTML(e2, ...t2) {
|
|
92
120
|
if (0 === t2.length) {
|
|
93
121
|
const t3 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
|
|
94
|
-
let
|
|
95
|
-
for (;
|
|
122
|
+
let o2 = n2;
|
|
123
|
+
for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) if (o2.outerHTML) t3.push(o2.outerHTML);
|
|
96
124
|
else {
|
|
97
|
-
let e3 =
|
|
98
|
-
|
|
125
|
+
let e3 = o2.textContent;
|
|
126
|
+
o2 instanceof Comment && (e3 = `<!--${e3}-->`), t3.push(e3);
|
|
99
127
|
}
|
|
100
128
|
return t3.join("");
|
|
101
129
|
}
|
|
@@ -119,22 +147,22 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
119
147
|
}
|
|
120
148
|
$childNodes(e2) {
|
|
121
149
|
const t2 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
|
|
122
|
-
let
|
|
123
|
-
for (;
|
|
150
|
+
let o2 = n2;
|
|
151
|
+
for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) t2.push(o2);
|
|
124
152
|
return t2;
|
|
125
153
|
}
|
|
126
154
|
$children(e2) {
|
|
127
155
|
const t2 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
|
|
128
|
-
let
|
|
129
|
-
for (;
|
|
156
|
+
let o2 = n2;
|
|
157
|
+
for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) o2 instanceof HTMLElement && t2.push(o2);
|
|
130
158
|
return t2;
|
|
131
159
|
}
|
|
132
160
|
$replaceChildren(e2, t2) {
|
|
133
161
|
var _a, _b;
|
|
134
162
|
const { start: n2, end: r2 } = this.$slot(e2) || {};
|
|
135
|
-
let
|
|
136
|
-
for (; n2 && (
|
|
137
|
-
if (r2) for (;
|
|
163
|
+
let o2 = null;
|
|
164
|
+
for (; n2 && (o2 = n2.nextSibling) && o2 !== r2; ) (_a = o2.parentNode) == null ? void 0 : _a.removeChild(o2);
|
|
165
|
+
if (r2) for (; o2 = t2.shift(); ) (_b = r2.parentNode) == null ? void 0 : _b.insertBefore(o2, r2);
|
|
138
166
|
}
|
|
139
167
|
$slot(e2, t2) {
|
|
140
168
|
if (e2 = e2 || "default", !t2) return this[_AuiComponent.shadowSymbol].slot[e2];
|
|
@@ -150,11 +178,11 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
150
178
|
const t2 = (e2 = e2 || this).childNodes, n2 = { default: [] };
|
|
151
179
|
for (; t2.length > 0; ) {
|
|
152
180
|
const r2 = t2[0];
|
|
153
|
-
if ((_a = r2.parentNode) == null ? void 0 : _a.removeChild(r2),
|
|
181
|
+
if ((_a = r2.parentNode) == null ? void 0 : _a.removeChild(r2), $.$isForAuiSlot(r2)) {
|
|
154
182
|
const t3 = r2.getAttribute("for") || "default";
|
|
155
183
|
n2[t3] = n2[t3] || [];
|
|
156
|
-
const
|
|
157
|
-
|
|
184
|
+
const o2 = Array.prototype.slice.call(r2.childNodes);
|
|
185
|
+
$.prototype.$bind.call(r2, e2), n2[t3].push(...o2);
|
|
158
186
|
} else n2.default.push(r2);
|
|
159
187
|
}
|
|
160
188
|
return n2;
|
|
@@ -166,56 +194,54 @@ const _AuiComponent = class _AuiComponent extends (h = HTMLElement, l = p, h) {
|
|
|
166
194
|
$attrChange(e2) {
|
|
167
195
|
if ("value" === e2) {
|
|
168
196
|
const e3 = this.value;
|
|
169
|
-
super.hasAttribute(
|
|
197
|
+
super.hasAttribute(p) ? this.$call("$emit", "update:value", e3) : this.$customEvent("input", { bubbles: true, composed: true });
|
|
170
198
|
}
|
|
171
|
-
this
|
|
199
|
+
this.$customEvent("aui-attr-change", { bubbles: true, composed: true, detail: { attributeName: b.vueAttrName(e2) } });
|
|
172
200
|
}
|
|
173
201
|
$initAttrs() {
|
|
174
202
|
const e2 = this.attributes, t2 = document.createElement("div");
|
|
175
203
|
for (let n2 = 0; n2 < e2.length; n2++) {
|
|
176
204
|
const r2 = e2[n2];
|
|
177
|
-
t2.setAttribute(r2.name, r2.value), this.$isShowProp(
|
|
205
|
+
t2.setAttribute(r2.name, r2.value), this.$isShowProp(b.vueAttrName(r2.name)) || super.removeAttribute(r2.name), "value" === r2.name && (this.value = r2.value);
|
|
178
206
|
}
|
|
179
207
|
Object.defineProperty(this, "attributes", { get value() {
|
|
180
208
|
return t2.attributes;
|
|
181
209
|
}, writable: false }), this[_AuiComponent.shadowSymbol].el = t2;
|
|
182
210
|
}
|
|
183
211
|
$isShowProp(e2) {
|
|
184
|
-
if (
|
|
212
|
+
if (b.isVueAttr(e2)) return true;
|
|
185
213
|
const t2 = this.$getProp(e2), n2 = t2 == null ? void 0 : t2.show;
|
|
186
214
|
return n2;
|
|
187
215
|
}
|
|
188
216
|
$getProp(e2) {
|
|
189
217
|
var _a;
|
|
190
|
-
const t2 =
|
|
218
|
+
const t2 = b.cache.getAuiVueDefined(this.tagName);
|
|
191
219
|
return (((_a = t2 == null ? void 0 : t2.origin) == null ? void 0 : _a.props) || {})[e2];
|
|
192
220
|
}
|
|
193
221
|
$initVue() {
|
|
194
222
|
if (this.__hasVue__) return;
|
|
195
223
|
this.__hasVue__ = true;
|
|
196
224
|
const t2 = this.tagName.toLowerCase();
|
|
197
|
-
|
|
225
|
+
b.cache.getAuiVueDefined(t2) && e(b.createVueComponent(t2, this)).mount(this);
|
|
198
226
|
}
|
|
199
227
|
$needInit() {
|
|
200
|
-
return !super.hasAttribute(
|
|
228
|
+
return !super.hasAttribute(p);
|
|
201
229
|
}
|
|
202
230
|
$bindVue(e2) {
|
|
203
231
|
var _a, _b;
|
|
204
232
|
if (this[_AuiComponent.shadowSymbol].ref) return;
|
|
205
|
-
this[_AuiComponent.shadowSymbol].ref = e2, this.__hasVue__ = true;
|
|
206
|
-
const t2 =
|
|
207
|
-
|
|
208
|
-
const n2 = (_b = (_a = f.cache.getAuiVueDefined(this.tagName)) == null ? void 0 : _a.origin) == null ? void 0 : _b.auiInit;
|
|
209
|
-
n2 && n2.call(e2);
|
|
233
|
+
this[_AuiComponent.shadowSymbol].ref = e2, this.__hasVue__ = true, this.$customEvent("aui-init", { bubbles: false, detail: { code: 0 } });
|
|
234
|
+
const t2 = (_b = (_a = b.cache.getAuiVueDefined(this.tagName)) == null ? void 0 : _a.origin) == null ? void 0 : _b.auiInit;
|
|
235
|
+
t2 && t2.call(e2);
|
|
210
236
|
}
|
|
211
237
|
$call(e2, ...t2) {
|
|
212
238
|
const n2 = this[_AuiComponent.shadowSymbol].ref;
|
|
213
|
-
return
|
|
239
|
+
return b.$call(n2, e2, ...t2);
|
|
214
240
|
}
|
|
215
241
|
};
|
|
216
|
-
_AuiComponent.shadowSymbol =
|
|
242
|
+
_AuiComponent.shadowSymbol = f;
|
|
217
243
|
let AuiComponent = _AuiComponent;
|
|
218
|
-
class
|
|
244
|
+
class $ extends HTMLElement {
|
|
219
245
|
constructor() {
|
|
220
246
|
super();
|
|
221
247
|
}
|
|
@@ -242,7 +268,7 @@ class m extends HTMLElement {
|
|
|
242
268
|
return !(!e2 || e2.nodeType !== Node.ELEMENT_NODE) && "aui-slot" === e2.tagName.toLowerCase();
|
|
243
269
|
}
|
|
244
270
|
static $isForAuiSlot(e2) {
|
|
245
|
-
return !(
|
|
271
|
+
return !(!$.$isAuiSlot(e2) || !e2.hasAttribute("for"));
|
|
246
272
|
}
|
|
247
273
|
$bind(e2) {
|
|
248
274
|
this._el_ = e2, this._name_ = this.getAttribute("for") || "default";
|
|
@@ -252,39 +278,39 @@ class m extends HTMLElement {
|
|
|
252
278
|
e2.$slot(t2, { start: n2, end: r2 }), this.replaceWith(n2, r2);
|
|
253
279
|
}
|
|
254
280
|
}
|
|
255
|
-
const
|
|
256
|
-
|
|
281
|
+
const b = { init: () => (b.defineSlot(), b), defineSlot() {
|
|
282
|
+
b.defineCustomElement("aui-slot", $);
|
|
257
283
|
}, $call(e2, t2, ...n2) {
|
|
258
284
|
if (!e2) return new Error("not init");
|
|
259
285
|
if (!t2) return e2;
|
|
260
286
|
if ("function" == typeof e2[t2]) return e2[t2].call(e2, ...n2);
|
|
261
287
|
const r2 = t2.split(".");
|
|
262
|
-
let
|
|
263
|
-
for (;
|
|
264
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
265
|
-
|
|
288
|
+
let o2 = e2, s2 = r2.pop() || "", i2 = null;
|
|
289
|
+
for (; i2 = r2.shift(); ) {
|
|
290
|
+
if (!Object.prototype.hasOwnProperty.call(o2, i2)) return new Error("no match name");
|
|
291
|
+
o2 = o2[i2];
|
|
266
292
|
}
|
|
267
|
-
return 0 === n2.length ?
|
|
293
|
+
return 0 === n2.length ? o2[s2] : (o2[s2] = n2[0], null);
|
|
268
294
|
}, formatName: (e2) => e2 ? (e2 = e2.replace(/[A-Z]/g, function(e3) {
|
|
269
295
|
return "-" + e3.toLowerCase();
|
|
270
|
-
}),
|
|
296
|
+
}), d + e2) : "", cache: { defined: {}, getAuiVueDefined: (e2) => (e2 = e2.toLowerCase(), b.cache.defined[e2]), getAuiPropNames(e2) {
|
|
271
297
|
var _a;
|
|
272
|
-
const t2 =
|
|
273
|
-
for (const e3 in n2) r2.push(
|
|
274
|
-
return r2;
|
|
298
|
+
const t2 = b.cache.getAuiVueDefined(e2), n2 = ((_a = t2 == null ? void 0 : t2.origin) == null ? void 0 : _a.props) || {}, r2 = [];
|
|
299
|
+
for (const e3 in n2) r2.push(b.auiAttrName(e3));
|
|
300
|
+
return -1 === r2.indexOf(m) && r2.push(m), r2;
|
|
275
301
|
}, addHooks(e2, t2) {
|
|
276
302
|
e2 = e2.toLowerCase();
|
|
277
|
-
const n2 =
|
|
278
|
-
n2 ? (n2.hooks = n2.hooks || [], n2.hooks.push(t2)) :
|
|
303
|
+
const n2 = b.cache.getAuiVueDefined(e2);
|
|
304
|
+
n2 ? (n2.hooks = n2.hooks || [], n2.hooks.push(t2)) : b.cache.defined[e2] = { hooks: [t2] };
|
|
279
305
|
} }, createExtendComp: (e2) => {
|
|
280
306
|
var _a, _b;
|
|
281
|
-
return t({ props: {
|
|
307
|
+
return t({ props: { [m]: { type: String }, value: { type: ((_b = (_a = e2.props) == null ? void 0 : _a.value) == null ? void 0 : _b.type) || [String, Number, Array] } }, methods: { $anyToArray: AuiComponent.$anyToArray, $value(...e3) {
|
|
282
308
|
const t2 = this.$aui();
|
|
283
309
|
if (0 === e3.length) return t2 == null ? void 0 : t2.value;
|
|
284
310
|
t2 && (t2.value = e3[0]);
|
|
285
311
|
}, $call(e3, ...t2) {
|
|
286
312
|
const n2 = this.$aui();
|
|
287
|
-
return n2 ?
|
|
313
|
+
return n2 ? b.$call(n2, e3, ...t2) : null;
|
|
288
314
|
}, $aui() {
|
|
289
315
|
var _a2;
|
|
290
316
|
return (_a2 = this.$el) == null ? void 0 : _a2.parentNode;
|
|
@@ -292,21 +318,21 @@ const f = { init: () => (f.defineSlot(), f), defineSlot() {
|
|
|
292
318
|
}, patchDefaultProps(e2) {
|
|
293
319
|
var _a, _b;
|
|
294
320
|
const t2 = (_b = (_a = e2.props) == null ? void 0 : _a.value) == null ? void 0 : _b.type;
|
|
295
|
-
return e2.mixins || (e2.mixins = []), e2.mixins.push(
|
|
321
|
+
return e2.mixins || (e2.mixins = []), e2.mixins.push(b.createExtendComp(e2)), t2;
|
|
296
322
|
}, defineAuiComponent(e2, t2, n2) {
|
|
297
323
|
var _a, _b;
|
|
298
|
-
const r2 =
|
|
299
|
-
if ((_a =
|
|
324
|
+
const r2 = b.patchDefaultProps(n2);
|
|
325
|
+
if ((_a = b.cache.defined[e2]) == null ? void 0 : _a.origin) b.cache.defined[e2].origin = n2;
|
|
300
326
|
else {
|
|
301
|
-
class
|
|
327
|
+
class o2 extends AuiComponent {
|
|
302
328
|
constructor() {
|
|
303
329
|
super({ valueType: r2 });
|
|
304
330
|
}
|
|
305
331
|
static get observedAttributes() {
|
|
306
|
-
return
|
|
332
|
+
return b.cache.getAuiPropNames(e2);
|
|
307
333
|
}
|
|
308
334
|
}
|
|
309
|
-
|
|
335
|
+
b.cache.defined[e2] = { aui: o2, vue: t2, origin: n2, hooks: ((_b = b.cache.defined[e2]) == null ? void 0 : _b.hooks) || [] }, b.defineCustomElement(e2, o2);
|
|
310
336
|
}
|
|
311
337
|
}, defineCustomElement(e2, t2) {
|
|
312
338
|
try {
|
|
@@ -315,71 +341,73 @@ const f = { init: () => (f.defineSlot(), f), defineSlot() {
|
|
|
315
341
|
}
|
|
316
342
|
}, sameComponent(e2, t2) {
|
|
317
343
|
if (!Object.prototype.hasOwnProperty.call(t2, "__hmrId")) return false;
|
|
318
|
-
const n2 =
|
|
344
|
+
const n2 = b.cache.getAuiVueDefined(e2), r2 = n2 == null ? void 0 : n2.origin;
|
|
319
345
|
return !!r2 && t2.__hmrId === r2.__hmrId;
|
|
320
346
|
}, notifyComponentUpdate(e2) {
|
|
321
347
|
document.querySelectorAll(e2).forEach((e3) => {
|
|
322
|
-
e3
|
|
348
|
+
e3.$forceUpdate();
|
|
323
349
|
});
|
|
324
350
|
}, define(e2, t2 = true) {
|
|
325
|
-
const n2 =
|
|
351
|
+
const n2 = b.formatName(e2.name);
|
|
326
352
|
if (!n2) return e2;
|
|
327
|
-
const r2 =
|
|
328
|
-
if (r2 && r2.vue) return (t2 ||
|
|
329
|
-
const
|
|
330
|
-
return
|
|
353
|
+
const r2 = b.cache.getAuiVueDefined(n2);
|
|
354
|
+
if (r2 && r2.vue) return (t2 || b.sameComponent(n2, e2)) && (b.defineAuiComponent(n2, r2.vue, e2), b.notifyComponentUpdate(n2)), r2.vue;
|
|
355
|
+
const o2 = b.createVueComponent(n2);
|
|
356
|
+
return b.defineAuiComponent(n2, o2, e2), o2;
|
|
331
357
|
}, createTempSlot(e2) {
|
|
332
358
|
const t2 = {};
|
|
333
359
|
return Object.keys(e2).forEach((e3) => {
|
|
334
|
-
t2[e3] = () =>
|
|
360
|
+
t2[e3] = () => u("aui-slot", { name: e3 });
|
|
335
361
|
}), t2;
|
|
336
362
|
}, replaceTempSlot(e2, t2) {
|
|
337
363
|
Object.keys(t2).forEach((n2) => {
|
|
338
364
|
const r2 = e2.querySelector(`aui-slot[name="${n2}"]`);
|
|
339
|
-
r2 && (
|
|
365
|
+
r2 && ($.prototype.$replace.call(r2, e2), e2.$replaceChildren(n2, t2[n2]));
|
|
340
366
|
});
|
|
341
367
|
}, createVueComponent(e2, t2) {
|
|
342
|
-
const
|
|
368
|
+
const l2 = t2 ? t2.$moveChildren() : { default: [] };
|
|
343
369
|
return { setup() {
|
|
344
|
-
const
|
|
345
|
-
return
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}),
|
|
370
|
+
const h2 = n(), c2 = r(null), d2 = r(null), m2 = o({}), f2 = r(t2 ? b.createTempSlot(l2) : s()), $2 = r(null);
|
|
371
|
+
return i(() => {
|
|
372
|
+
c2.value && d2.value && d2.value.$bindVue && (d2.value.$bindVue(c2.value), t2 && b.replaceTempSlot(t2, l2), d2.value.addEventListener("aui-attr-change", () => {
|
|
373
|
+
d2.value && (m2.value = b.getAuiAttrs(d2.value));
|
|
374
|
+
}), d2.value.addEventListener("aui-force-update", () => {
|
|
349
375
|
$2.value = null;
|
|
350
|
-
}),
|
|
376
|
+
}), d2.value.$call("$emit", "update:value", d2.value.value));
|
|
377
|
+
}), a(() => {
|
|
378
|
+
d2.value && d2.value.$slotReplace();
|
|
351
379
|
}), () => {
|
|
352
|
-
if (t2 && (
|
|
353
|
-
const n2 =
|
|
354
|
-
return t2 ? n2 :
|
|
380
|
+
if (t2 && (d2.value = t2, m2.value = b.getAuiAttrs(t2)), $2.value || ($2.value = b.formatStructure(e2)), !$2.value) return null;
|
|
381
|
+
const n2 = u($2.value, { ...h2, ...m2.value, ref: c2 }, f2.value || {});
|
|
382
|
+
return t2 ? n2 : u(e2, { ref: d2, [p]: "" }, [n2]);
|
|
355
383
|
};
|
|
356
384
|
} };
|
|
357
385
|
}, getAuiAttrs(e2) {
|
|
358
386
|
const t2 = {}, n2 = e2.attributes;
|
|
359
387
|
for (let e3 = 0; e3 < n2.length; e3++) {
|
|
360
388
|
const r2 = n2[e3];
|
|
361
|
-
r2.name ===
|
|
389
|
+
r2.name === d || b.isVueAttr(r2.name) || (t2[r2.name] = r2.value);
|
|
362
390
|
}
|
|
363
391
|
return null !== e2.value && (t2.value = e2.value), t2;
|
|
364
|
-
}, isVueAttr: (e2) => 0 === e2.indexOf("data-v-"), auiAttrName: (e2) => e2.replace(/([A-Z])/g, (e3) => "-" + e3.toLowerCase()), vueAttrName: (e2) =>
|
|
365
|
-
|
|
392
|
+
}, isVueAttr: (e2) => 0 === e2.indexOf("data-v-"), auiAttrName: (e2) => e2.replace(/([A-Z])/g, (e3) => "-" + e3.toLowerCase()), vueAttrName: (e2) => b.isVueAttr(e2) ? e2 : e2.replace(/-([a-z])/g, (e3, t2) => t2.toUpperCase()), hookStructure(e2, t2) {
|
|
393
|
+
b.cache.addHooks(e2, t2);
|
|
366
394
|
}, getHookStructure(e2) {
|
|
367
|
-
const t2 =
|
|
395
|
+
const t2 = b.cache.getAuiVueDefined(e2);
|
|
368
396
|
return ((t2 == null ? void 0 : t2.hooks) || []).slice(0);
|
|
369
397
|
}, formatStructure(e2) {
|
|
370
|
-
const t2 =
|
|
398
|
+
const t2 = b.cache.getAuiVueDefined(e2);
|
|
371
399
|
if (!(t2 == null ? void 0 : t2.origin)) return null;
|
|
372
|
-
let n2 =
|
|
373
|
-
const r2 =
|
|
374
|
-
let
|
|
375
|
-
for (;
|
|
376
|
-
const e3 =
|
|
400
|
+
let n2 = l({}, t2.origin);
|
|
401
|
+
const r2 = b.getHookStructure(e2);
|
|
402
|
+
let o2;
|
|
403
|
+
for (; o2 = r2.shift(); ) {
|
|
404
|
+
const e3 = o2(n2);
|
|
377
405
|
e3 && (n2 = e3);
|
|
378
406
|
}
|
|
379
407
|
return n2;
|
|
380
|
-
} },
|
|
408
|
+
} }, v = b.init();
|
|
381
409
|
export {
|
|
382
410
|
AuiComponent,
|
|
383
|
-
|
|
411
|
+
v as default
|
|
384
412
|
};
|
|
385
413
|
//# sourceMappingURL=core.es.js.map
|