agile-core 3.0.2 → 3.0.7

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/core.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { createApp as e, defineComponent as t, useAttrs as n, ref as r, useSlots as i, onMounted as s, h as o } from "vue";
2
- import { merge as a } from "ts-deepmerge";
3
- var u, l;
4
- const h = __AUI_CONFIG__.tagPrefix || "aui", c = "data-v-aui", d = Symbol("shadow");
5
- const _AuiComponent = class _AuiComponent extends (l = HTMLElement, u = d, l) {
1
+ import { createApp as e, defineComponent as t, useAttrs as n, shallowRef as r, ref as o, useSlots as i, onMounted as s, 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 = Symbol("shadow");
5
+ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = m, c) {
6
6
  constructor(e2) {
7
- super(), this.__hasVue__ = false, this[u] = { needHook: false, slot: {} }, this[_AuiComponent.shadowSymbol].options = e2 || {}, this.$initAttrs();
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 (l = HTMLElement, u = d, l) {
52
52
  if (n2.getAttribute(e2) === t2) return;
53
53
  n2.setAttribute(e2, t2);
54
54
  }
55
- this.$isShowProp(m.vueAttrName(e2)) && super.setAttribute(e2, t2), "value" === e2 && n2 ? this.value = n2.getAttribute(e2) : this.$attrChange(e2);
55
+ this.$isShowProp($.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 (l = HTMLElement, u = d, l) {
61
61
  removeAttribute(e2) {
62
62
  const t2 = this[_AuiComponent.shadowSymbol].el;
63
63
  t2 && t2.removeAttribute(e2);
64
- this.$isShowProp(m.vueAttrName(e2)) && super.removeAttribute(e2), this.$attrChange(e2);
64
+ this.$isShowProp($.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(m.vueAttrName(e2)) || super.removeAttribute(e2), r2.setAttribute(e2, n2 || ""), "value" !== e2 && this.$attrChange(e2));
68
+ r2 && t2 !== n2 && (this.$isShowProp($.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 (l = HTMLElement, u = d, l) {
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 i2 = n2;
86
- for (; i2 && (i2 = i2.nextSibling) && i2 !== r2; ) t3.push(i2.textContent);
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 (l = HTMLElement, u = d, l) {
91
119
  $innerHTML(e2, ...t2) {
92
120
  if (0 === t2.length) {
93
121
  const t3 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
94
- let i2 = n2;
95
- for (; i2 && (i2 = i2.nextSibling) && i2 !== r2; ) if (i2.outerHTML) t3.push(i2.outerHTML);
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 = i2.textContent;
98
- i2 instanceof Comment && (e3 = `<!--${e3}-->`), t3.push(e3);
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 (l = HTMLElement, u = d, l) {
119
147
  }
120
148
  $childNodes(e2) {
121
149
  const t2 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
122
- let i2 = n2;
123
- for (; i2 && (i2 = i2.nextSibling) && i2 !== r2; ) t2.push(i2);
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 i2 = n2;
129
- for (; i2 && (i2 = i2.nextSibling) && i2 !== r2; ) i2 instanceof HTMLElement && t2.push(i2);
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 i2 = null;
136
- for (; n2 && (i2 = n2.nextSibling) && i2 !== r2; ) (_a = i2.parentNode) == null ? void 0 : _a.removeChild(i2);
137
- if (r2) for (; i2 = t2.shift(); ) (_b = r2.parentNode) == null ? void 0 : _b.insertBefore(i2, r2);
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 (l = HTMLElement, u = d, l) {
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), p.$isForAuiSlot(r2)) {
181
+ if ((_a = r2.parentNode) == null ? void 0 : _a.removeChild(r2), f.$isForAuiSlot(r2)) {
154
182
  const t3 = r2.getAttribute("for") || "default";
155
183
  n2[t3] = n2[t3] || [];
156
- const i2 = Array.prototype.slice.call(r2.childNodes);
157
- p.prototype.$bind.call(r2, e2), n2[t3].push(...i2);
184
+ const o2 = Array.prototype.slice.call(r2.childNodes);
185
+ f.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 (l = HTMLElement, u = d, l) {
166
194
  $attrChange(e2) {
167
195
  if ("value" === e2) {
168
196
  const e3 = this.value;
169
- super.hasAttribute(c) ? this.$call("$emit", "update:value", e3) : super.dispatchEvent(new CustomEvent("input", { bubbles: true, composed: true }));
197
+ super.hasAttribute(p) ? this.$call("$emit", "update:value", e3) : this.$customEvent("input", { bubbles: true, composed: true });
170
198
  }
171
- this.dispatchEvent(new CustomEvent("aui-attr-change", { bubbles: true, composed: true, detail: { attributeName: m.vueAttrName(e2) } }));
199
+ this.$customEvent("aui-attr-change", { bubbles: true, composed: true, detail: { attributeName: $.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(m.vueAttrName(r2.name)) || super.removeAttribute(r2.name), "value" === r2.name && (this.value = r2.value);
205
+ t2.setAttribute(r2.name, r2.value), this.$isShowProp($.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 (m.isVueAttr(e2)) return true;
212
+ if ($.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 = m.cache.getAuiVueDefined(this.tagName);
218
+ const t2 = $.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
- m.cache.getAuiVueDefined(t2) && e(m.createVueComponent(t2, this)).mount(this);
225
+ $.cache.getAuiVueDefined(t2) && e($.createVueComponent(t2, this)).mount(this);
198
226
  }
199
227
  $needInit() {
200
- return !super.hasAttribute(c);
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 = new CustomEvent("aui-init", { bubbles: false, detail: { code: 0 } });
207
- this.dispatchEvent(t2);
208
- const n2 = (_b = (_a = m.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 = $.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 m.$call(n2, e2, ...t2);
239
+ return $.$call(n2, e2, ...t2);
214
240
  }
215
241
  };
216
- _AuiComponent.shadowSymbol = d;
242
+ _AuiComponent.shadowSymbol = m;
217
243
  let AuiComponent = _AuiComponent;
218
- class p extends HTMLElement {
244
+ class f extends HTMLElement {
219
245
  constructor() {
220
246
  super();
221
247
  }
@@ -242,7 +268,7 @@ class p 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 !(!p.$isAuiSlot(e2) || !e2.hasAttribute("for"));
271
+ return !(!f.$isAuiSlot(e2) || !e2.hasAttribute("for"));
246
272
  }
247
273
  $bind(e2) {
248
274
  this._el_ = e2, this._name_ = this.getAttribute("for") || "default";
@@ -252,42 +278,39 @@ class p extends HTMLElement {
252
278
  e2.$slot(t2, { start: n2, end: r2 }), this.replaceWith(n2, r2);
253
279
  }
254
280
  }
255
- const m = { init: () => (m.defineSlot(), m), defineSlot() {
256
- try {
257
- customElements.define("aui-slot", p);
258
- } catch (e2) {
259
- }
281
+ const $ = { init: () => ($.defineSlot(), $), defineSlot() {
282
+ $.defineCustomElement("aui-slot", f);
260
283
  }, $call(e2, t2, ...n2) {
261
284
  if (!e2) return new Error("not init");
262
285
  if (!t2) return e2;
263
286
  if ("function" == typeof e2[t2]) return e2[t2].call(e2, ...n2);
264
287
  const r2 = t2.split(".");
265
- let i2 = e2, s2 = r2.pop() || "", o2 = null;
266
- for (; o2 = r2.shift(); ) {
267
- if (!Object.prototype.hasOwnProperty.call(i2, o2)) return new Error("no match name");
268
- i2 = i2[o2];
288
+ let o2 = e2, i2 = r2.pop() || "", s2 = null;
289
+ for (; s2 = r2.shift(); ) {
290
+ if (!Object.prototype.hasOwnProperty.call(o2, s2)) return new Error("no match name");
291
+ o2 = o2[s2];
269
292
  }
270
- return 0 === n2.length ? i2[s2] : (i2[s2] = n2[0], null);
293
+ return 0 === n2.length ? o2[i2] : (o2[i2] = n2[0], null);
271
294
  }, formatName: (e2) => e2 ? (e2 = e2.replace(/[A-Z]/g, function(e3) {
272
295
  return "-" + e3.toLowerCase();
273
- }), h + e2) : "", cache: { defined: (Object.prototype.hasOwnProperty.call(window, "__GLOBAL_AUI_CORE__") || Object.defineProperty(window, "__GLOBAL_AUI_CORE__", { value: { defined: {} }, writable: false, enumerable: false }), window.__GLOBAL_AUI_CORE__).defined, getAuiVueDefined: (e2) => (e2 = e2.toLowerCase(), m.cache.defined[e2]), getAuiPropNames(e2) {
296
+ }), d + e2) : "", cache: { defined: (Object.prototype.hasOwnProperty.call(window, "__GLOBAL_AUI_CORE__") || Object.defineProperty(window, "__GLOBAL_AUI_CORE__", { value: { defined: {} }, writable: false, enumerable: false }), window.__GLOBAL_AUI_CORE__).defined, getAuiVueDefined: (e2) => (e2 = e2.toLowerCase(), $.cache.defined[e2]), getAuiPropNames(e2) {
274
297
  var _a;
275
- const t2 = m.cache.getAuiVueDefined(e2), n2 = ((_a = t2 == null ? void 0 : t2.origin) == null ? void 0 : _a.props) || {}, r2 = [];
276
- for (const e3 in n2) r2.push(m.auiAttrName(e3));
298
+ const t2 = $.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($.auiAttrName(e3));
277
300
  return r2;
278
301
  }, addHooks(e2, t2) {
279
302
  e2 = e2.toLowerCase();
280
- const n2 = m.cache.getAuiVueDefined(e2);
281
- n2 ? (n2.hooks = n2.hooks || [], n2.hooks.push(t2)) : m.cache.defined[e2] = { hooks: [t2] };
303
+ const n2 = $.cache.getAuiVueDefined(e2);
304
+ n2 ? (n2.hooks = n2.hooks || [], n2.hooks.push(t2)) : $.cache.defined[e2] = { hooks: [t2] };
282
305
  } }, createExtendComp: (e2) => {
283
306
  var _a, _b;
284
- return t({ props: { auiExtend: { 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) {
307
+ return t({ props: { auix: { 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) {
285
308
  const t2 = this.$aui();
286
309
  if (0 === e3.length) return t2 == null ? void 0 : t2.value;
287
310
  t2 && (t2.value = e3[0]);
288
311
  }, $call(e3, ...t2) {
289
312
  const n2 = this.$aui();
290
- return n2 ? m.$call(n2, e3, ...t2) : null;
313
+ return n2 ? $.$call(n2, e3, ...t2) : null;
291
314
  }, $aui() {
292
315
  var _a2;
293
316
  return (_a2 = this.$el) == null ? void 0 : _a2.parentNode;
@@ -295,80 +318,96 @@ const m = { init: () => (m.defineSlot(), m), defineSlot() {
295
318
  }, patchDefaultProps(e2) {
296
319
  var _a, _b;
297
320
  const t2 = (_b = (_a = e2.props) == null ? void 0 : _a.value) == null ? void 0 : _b.type;
298
- return e2.mixins || (e2.mixins = []), e2.mixins.push(m.createExtendComp(e2)), t2;
321
+ return e2.mixins || (e2.mixins = []), e2.mixins.push($.createExtendComp(e2)), t2;
299
322
  }, defineAuiComponent(e2, t2, n2) {
300
323
  var _a, _b;
301
- const r2 = m.patchDefaultProps(n2);
302
- if ((_a = m.cache.defined[e2]) == null ? void 0 : _a.origin) m.cache.defined[e2].origin = n2;
324
+ const r2 = $.patchDefaultProps(n2);
325
+ if ((_a = $.cache.defined[e2]) == null ? void 0 : _a.origin) $.cache.defined[e2].origin = n2;
303
326
  else {
304
- class i2 extends AuiComponent {
327
+ class o2 extends AuiComponent {
305
328
  constructor() {
306
329
  super({ valueType: r2 });
307
330
  }
308
331
  static get observedAttributes() {
309
- return m.cache.getAuiPropNames(e2);
332
+ return $.cache.getAuiPropNames(e2);
310
333
  }
311
334
  }
312
- m.cache.defined[e2] = { aui: i2, vue: t2, origin: n2, hooks: ((_b = m.cache.defined[e2]) == null ? void 0 : _b.hooks) || [] }, customElements.define(e2, i2);
335
+ $.cache.defined[e2] = { aui: o2, vue: t2, origin: n2, hooks: ((_b = $.cache.defined[e2]) == null ? void 0 : _b.hooks) || [] }, $.defineCustomElement(e2, o2);
313
336
  }
314
- }, define(e2, t2 = false) {
315
- const n2 = m.formatName(e2.name);
337
+ }, defineCustomElement(e2, t2) {
338
+ try {
339
+ customElements.define(e2, t2);
340
+ } catch (e3) {
341
+ }
342
+ }, sameComponent(e2, t2) {
343
+ if (!Object.prototype.hasOwnProperty.call(t2, "__hmrId")) return false;
344
+ const n2 = $.cache.getAuiVueDefined(e2), r2 = n2 == null ? void 0 : n2.origin;
345
+ return !!r2 && t2.__hmrId === r2.__hmrId;
346
+ }, notifyComponentUpdate(e2) {
347
+ document.querySelectorAll(e2).forEach((e3) => {
348
+ e3.$forceUpdate();
349
+ });
350
+ }, define(e2, t2 = true) {
351
+ const n2 = $.formatName(e2.name);
316
352
  if (!n2) return e2;
317
- const r2 = m.cache.getAuiVueDefined(n2);
318
- if (r2 && r2.vue) return t2 && m.defineAuiComponent(n2, r2.vue, e2), r2.vue;
319
- const i2 = m.createVueComponent(n2);
320
- return m.defineAuiComponent(n2, i2, e2), i2;
353
+ const r2 = $.cache.getAuiVueDefined(n2);
354
+ if (r2 && r2.vue) return (t2 || $.sameComponent(n2, e2)) && ($.defineAuiComponent(n2, r2.vue, e2), $.notifyComponentUpdate(n2)), r2.vue;
355
+ const o2 = $.createVueComponent(n2);
356
+ return $.defineAuiComponent(n2, o2, e2), o2;
321
357
  }, createTempSlot(e2) {
322
358
  const t2 = {};
323
359
  return Object.keys(e2).forEach((e3) => {
324
- t2[e3] = () => o("aui-slot", { name: e3 });
360
+ t2[e3] = () => u("aui-slot", { name: e3 });
325
361
  }), t2;
326
362
  }, replaceTempSlot(e2, t2) {
327
363
  Object.keys(t2).forEach((n2) => {
328
364
  const r2 = e2.querySelector(`aui-slot[name="${n2}"]`);
329
- r2 && (p.prototype.$replace.call(r2, e2), e2.$replaceChildren(n2, t2[n2]));
365
+ r2 && (f.prototype.$replace.call(r2, e2), e2.$replaceChildren(n2, t2[n2]));
330
366
  });
331
367
  }, createVueComponent(e2, t2) {
332
- const a2 = t2 ? t2.$moveChildren() : { default: [] };
368
+ const l2 = t2 ? t2.$moveChildren() : { default: [] };
333
369
  return { setup() {
334
- const u2 = n(), l2 = r(null), h2 = r(null), d2 = r({}), p2 = r(t2 ? m.createTempSlot(a2) : i());
335
- let f2;
370
+ const h2 = n(), c2 = r(null), d2 = r(null), m2 = o({}), f2 = r(t2 ? $.createTempSlot(l2) : i()), b2 = r(null);
336
371
  return s(() => {
337
- l2.value && h2.value && h2.value.$bindVue && (h2.value.$bindVue(l2.value), t2 && m.replaceTempSlot(t2, a2), h2.value.addEventListener("aui-attr-change", () => {
338
- h2.value && (d2.value = m.getAuiAttrs(h2.value));
339
- }), h2.value.$call("$emit", "update:value", h2.value.value));
372
+ c2.value && d2.value && d2.value.$bindVue && (d2.value.$bindVue(c2.value), t2 && $.replaceTempSlot(t2, l2), d2.value.addEventListener("aui-attr-change", () => {
373
+ d2.value && (m2.value = $.getAuiAttrs(d2.value));
374
+ }), d2.value.addEventListener("aui-force-update", () => {
375
+ b2.value = null;
376
+ }), d2.value.$call("$emit", "update:value", d2.value.value));
377
+ }), a(() => {
378
+ d2.value && d2.value.$slotReplace();
340
379
  }), () => {
341
- if (t2 && (h2.value = t2, d2.value = m.getAuiAttrs(t2)), f2 || (f2 = m.formatStructure(e2)), !f2) return null;
342
- const n2 = o(f2, { ...u2, ...d2.value, ref: l2 }, p2.value || {});
343
- return t2 ? n2 : o(e2, { ref: h2, [c]: "" }, [n2]);
380
+ if (t2 && (d2.value = t2, m2.value = $.getAuiAttrs(t2)), b2.value || (b2.value = $.formatStructure(e2)), !b2.value) return null;
381
+ const n2 = u(b2.value, { ...h2, ...m2.value, ref: c2 }, f2.value || {});
382
+ return t2 ? n2 : u(e2, { ref: d2, [p]: "" }, [n2]);
344
383
  };
345
384
  } };
346
385
  }, getAuiAttrs(e2) {
347
386
  const t2 = {}, n2 = e2.attributes;
348
387
  for (let e3 = 0; e3 < n2.length; e3++) {
349
388
  const r2 = n2[e3];
350
- r2.name === h || m.isVueAttr(r2.name) || (t2[r2.name] = r2.value);
389
+ r2.name === d || $.isVueAttr(r2.name) || (t2[r2.name] = r2.value);
351
390
  }
352
391
  return null !== e2.value && (t2.value = e2.value), t2;
353
- }, isVueAttr: (e2) => 0 === e2.indexOf("data-v-"), auiAttrName: (e2) => e2.replace(/([A-Z])/g, (e3) => "-" + e3.toLowerCase()), vueAttrName: (e2) => m.isVueAttr(e2) ? e2 : e2.replace(/-([a-z])/g, (e3, t2) => t2.toUpperCase()), hookStructure(e2, t2) {
354
- m.cache.addHooks(e2, t2);
392
+ }, isVueAttr: (e2) => 0 === e2.indexOf("data-v-"), auiAttrName: (e2) => e2.replace(/([A-Z])/g, (e3) => "-" + e3.toLowerCase()), vueAttrName: (e2) => $.isVueAttr(e2) ? e2 : e2.replace(/-([a-z])/g, (e3, t2) => t2.toUpperCase()), hookStructure(e2, t2) {
393
+ $.cache.addHooks(e2, t2);
355
394
  }, getHookStructure(e2) {
356
- const t2 = m.cache.getAuiVueDefined(e2);
395
+ const t2 = $.cache.getAuiVueDefined(e2);
357
396
  return ((t2 == null ? void 0 : t2.hooks) || []).slice(0);
358
397
  }, formatStructure(e2) {
359
- const t2 = m.cache.getAuiVueDefined(e2);
398
+ const t2 = $.cache.getAuiVueDefined(e2);
360
399
  if (!(t2 == null ? void 0 : t2.origin)) return null;
361
- let n2 = a({}, t2.origin);
362
- const r2 = m.getHookStructure(e2);
363
- let i2;
364
- for (; i2 = r2.shift(); ) {
365
- const e3 = i2(n2);
400
+ let n2 = l({}, t2.origin);
401
+ const r2 = $.getHookStructure(e2);
402
+ let o2;
403
+ for (; o2 = r2.shift(); ) {
404
+ const e3 = o2(n2);
366
405
  e3 && (n2 = e3);
367
406
  }
368
407
  return n2;
369
- } }, f = m.init();
408
+ } }, b = $.init();
370
409
  export {
371
410
  AuiComponent,
372
- f as default
411
+ b as default
373
412
  };
374
413
  //# sourceMappingURL=core.es.js.map