@quicktvui/naddons 1.0.0-rc.3 → 1.0.0-rc.5
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/components/GridTabs/GridTabs.vue.d.ts +1 -1
- package/dist/components/NaCheckboxGroup/NaCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/NaInputView/NaInputView.vue.d.ts +3 -3
- package/dist/components/NaRadioGroup/NaRadioGroup.vue.d.ts +4 -4
- package/dist/components/NaSettingSwitch/NaSettingSwitch.vue.d.ts +6 -6
- package/dist/index.d.ts +1 -6
- package/dist/naddons.cjs.js +1 -1
- package/dist/naddons.es.js +739 -814
- package/package.json +1 -1
package/dist/naddons.es.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Native as
|
|
3
|
-
import { useES as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as $, ref as A, openBlock as x, createBlock as O, unref as M, mergeProps as F, withCtx as Q, renderSlot as D, shallowRef as ve, watch as ee, computed as j, resolveComponent as de, createElementBlock as Z, normalizeStyle as fe, Fragment as _e, renderList as qe, onMounted as Me, h as H, nextTick as ze, provide as Le, inject as Ue } from "vue";
|
|
2
|
+
import { Native as I } from "@extscreen/es3-vue";
|
|
3
|
+
import { useES as Fe, useESPlugin as Ve } from "@extscreen/es3-core";
|
|
4
|
+
const We = {
|
|
5
|
+
inheritAttrs: !1
|
|
6
|
+
}, X = /* @__PURE__ */ $({
|
|
7
|
+
...We,
|
|
5
8
|
__name: "GridTabs",
|
|
6
9
|
props: {
|
|
7
10
|
protocolVersion: {},
|
|
@@ -10,122 +13,122 @@ const be = "QtGridTabs", X = /* @__PURE__ */ w({
|
|
|
10
13
|
actionPayload: {}
|
|
11
14
|
},
|
|
12
15
|
emits: ["onTabSelected", "onTabClick", "onTabNeedsData", "onLoadMore", "onScroll", "onScrollStateChanged", "onItemPresence", "onTabFocused", "onItemClick", "onItemLongClick", "onItemFocused", "onProtocolMismatch"],
|
|
13
|
-
setup(e, { expose:
|
|
14
|
-
const d = A(),
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
setup(e, { expose: a }) {
|
|
17
|
+
const d = A(), u = L(), v = "QtGridTabs", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
18
|
+
s,
|
|
19
|
+
u.pluginPackageName || "com.quicktvui.plugin.glintui"
|
|
17
20
|
);
|
|
18
|
-
return
|
|
21
|
+
return a({
|
|
19
22
|
getNativeNode: () => {
|
|
20
|
-
var
|
|
21
|
-
return ((
|
|
23
|
+
var l, i;
|
|
24
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
22
25
|
},
|
|
23
|
-
dispatchAction: (...
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
let
|
|
29
|
-
typeof
|
|
26
|
+
dispatchAction: (...l) => {
|
|
27
|
+
var f, p;
|
|
28
|
+
const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
|
|
29
|
+
if (i)
|
|
30
|
+
if (l.length > 0) {
|
|
31
|
+
let w = l[0];
|
|
32
|
+
typeof w == "object" && (w = JSON.stringify(w)), I.callUIFunction(i, "dispatchAction", [w]);
|
|
30
33
|
} else
|
|
31
|
-
|
|
34
|
+
I.callUIFunction(i, "dispatchAction", l);
|
|
32
35
|
},
|
|
33
|
-
scrollToTop: (...
|
|
34
|
-
var
|
|
35
|
-
const
|
|
36
|
-
|
|
36
|
+
scrollToTop: (...l) => {
|
|
37
|
+
var f, p;
|
|
38
|
+
const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
|
|
39
|
+
i && I.callUIFunction(i, "scrollToTop", l);
|
|
37
40
|
},
|
|
38
|
-
getFocusState: (...
|
|
39
|
-
var
|
|
40
|
-
const
|
|
41
|
-
|
|
41
|
+
getFocusState: (...l) => {
|
|
42
|
+
var f, p;
|
|
43
|
+
const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
|
|
44
|
+
i && I.callUIFunction(i, "getFocusState", l);
|
|
42
45
|
},
|
|
43
|
-
getItemRect: (...
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
|
|
46
|
+
getItemRect: (...l) => {
|
|
47
|
+
var f, p;
|
|
48
|
+
const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
|
|
49
|
+
i && I.callUIFunction(i, "getItemRect", l);
|
|
47
50
|
},
|
|
48
|
-
requestFocus: (...
|
|
49
|
-
var
|
|
50
|
-
const
|
|
51
|
-
|
|
51
|
+
requestFocus: (...l) => {
|
|
52
|
+
var f, p;
|
|
53
|
+
const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
|
|
54
|
+
i && I.callUIFunction(i, "requestFocus", l);
|
|
52
55
|
}
|
|
53
|
-
}), (
|
|
56
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
54
57
|
ref_key: "nativeRef",
|
|
55
58
|
ref: d,
|
|
56
59
|
protocolVersion: e.protocolVersion,
|
|
57
60
|
pageSpec: e.pageSpec,
|
|
58
61
|
tabsData: e.tabsData,
|
|
59
62
|
actionPayload: e.actionPayload,
|
|
60
|
-
onOnTabSelected:
|
|
61
|
-
onOnTabClick:
|
|
62
|
-
onOnTabNeedsData:
|
|
63
|
-
onOnLoadMore:
|
|
64
|
-
onOnScroll:
|
|
65
|
-
onOnScrollStateChanged:
|
|
66
|
-
onOnItemPresence:
|
|
67
|
-
onOnTabFocused:
|
|
68
|
-
onOnItemClick:
|
|
69
|
-
onOnItemLongClick:
|
|
70
|
-
onOnItemFocused:
|
|
71
|
-
onOnProtocolMismatch:
|
|
72
|
-
},
|
|
73
|
-
default:
|
|
74
|
-
|
|
63
|
+
onOnTabSelected: i[0] || (i[0] = (f) => l.$emit("onTabSelected", f.nativeEvent)),
|
|
64
|
+
onOnTabClick: i[1] || (i[1] = (f) => l.$emit("onTabClick", f.nativeEvent)),
|
|
65
|
+
onOnTabNeedsData: i[2] || (i[2] = (f) => l.$emit("onTabNeedsData", f.nativeEvent)),
|
|
66
|
+
onOnLoadMore: i[3] || (i[3] = (f) => l.$emit("onLoadMore", f.nativeEvent)),
|
|
67
|
+
onOnScroll: i[4] || (i[4] = (f) => l.$emit("onScroll", f.nativeEvent)),
|
|
68
|
+
onOnScrollStateChanged: i[5] || (i[5] = (f) => l.$emit("onScrollStateChanged", f.nativeEvent)),
|
|
69
|
+
onOnItemPresence: i[6] || (i[6] = (f) => l.$emit("onItemPresence", f.nativeEvent)),
|
|
70
|
+
onOnTabFocused: i[7] || (i[7] = (f) => l.$emit("onTabFocused", f.nativeEvent)),
|
|
71
|
+
onOnItemClick: i[8] || (i[8] = (f) => l.$emit("onItemClick", f.nativeEvent)),
|
|
72
|
+
onOnItemLongClick: i[9] || (i[9] = (f) => l.$emit("onItemLongClick", f.nativeEvent)),
|
|
73
|
+
onOnItemFocused: i[10] || (i[10] = (f) => l.$emit("onItemFocused", f.nativeEvent)),
|
|
74
|
+
onOnProtocolMismatch: i[11] || (i[11] = (f) => l.$emit("onProtocolMismatch", f.nativeEvent))
|
|
75
|
+
}, l.$attrs), {
|
|
76
|
+
default: Q(() => [
|
|
77
|
+
D(l.$slots, "default")
|
|
75
78
|
]),
|
|
76
79
|
_: 3
|
|
77
80
|
}, 16, ["protocolVersion", "pageSpec", "tabsData", "actionPayload"]));
|
|
78
81
|
}
|
|
79
82
|
});
|
|
80
83
|
let te;
|
|
81
|
-
var
|
|
84
|
+
var Se;
|
|
82
85
|
try {
|
|
83
86
|
const e = require("@extscreen/es3-vue");
|
|
84
|
-
te = e.registerElement || ((
|
|
87
|
+
te = e.registerElement || ((Se = e.default) == null ? void 0 : Se.registerElement);
|
|
85
88
|
} catch {
|
|
86
89
|
}
|
|
87
|
-
const
|
|
90
|
+
const je = {
|
|
88
91
|
install: (e) => {
|
|
89
92
|
if (!globalThis.__QtGridTabs_registered)
|
|
90
93
|
if (te) {
|
|
91
|
-
const
|
|
94
|
+
const a = (d, u) => {
|
|
92
95
|
te(d, {
|
|
93
96
|
component: {
|
|
94
|
-
name:
|
|
95
|
-
processEventData(
|
|
96
|
-
const
|
|
97
|
-
return
|
|
97
|
+
name: u ? "QtGridTabs_Plugin" : "QtGridTabs",
|
|
98
|
+
processEventData(v, g) {
|
|
99
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
100
|
+
return c && (c.nativeEvent = s), c;
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
});
|
|
101
104
|
};
|
|
102
|
-
|
|
105
|
+
a("qt-grid-tabs", !1), a("qt-grid-tabs-plugin", !0), a("QtGridTabs", !1), a("QtGridTabs_Plugin", !0), a("gt-tabs", !1), a("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
|
|
103
106
|
} else
|
|
104
107
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
105
108
|
e.component("GridTabs", X), e.component("qt-grid-tabs", X), e.component("gt-tabs", X);
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
|
-
function
|
|
109
|
-
const d = A(""),
|
|
110
|
-
let
|
|
111
|
-
const
|
|
112
|
-
let
|
|
113
|
-
const
|
|
111
|
+
function Rt(e, a) {
|
|
112
|
+
const d = A(""), u = a ? JSON.parse(JSON.stringify(a)) : {}, v = ve([]), g = ve([]);
|
|
113
|
+
let c = !1, s = !1;
|
|
114
|
+
const h = "__virtual_single_tab__";
|
|
115
|
+
let l = "", i = !1;
|
|
116
|
+
const f = A({}), p = (o) => {
|
|
114
117
|
const t = Array.isArray(o) ? o : [o];
|
|
115
|
-
if (
|
|
118
|
+
if (s && e.value) {
|
|
116
119
|
if (typeof e.value.dispatchAction == "function") {
|
|
117
120
|
console.log("[useGridTabs] Calling Wrapper dispatchAction directly"), e.value.dispatchAction(t);
|
|
118
121
|
return;
|
|
119
122
|
}
|
|
120
123
|
let n = e.value;
|
|
121
|
-
typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), n ? (console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"),
|
|
124
|
+
typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), n ? (console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"), I.callUIFunction(n, "dispatchAction", [JSON.stringify(t)])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
|
|
122
125
|
}
|
|
123
|
-
},
|
|
126
|
+
}, w = (o, t) => {
|
|
124
127
|
if (!o)
|
|
125
128
|
return !1;
|
|
126
129
|
let n = !0;
|
|
127
130
|
return o.id || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`, o), n = !1), o.viewType || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): 卡片缺失必填字段 'viewType' (id: ${o.id || "未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`, o), n = !1), n;
|
|
128
|
-
},
|
|
131
|
+
}, _ = (o, t) => {
|
|
129
132
|
if (!o)
|
|
130
133
|
return !1;
|
|
131
134
|
let n = !0;
|
|
@@ -135,74 +138,74 @@ function _t(e, i) {
|
|
|
135
138
|
return;
|
|
136
139
|
U.clear();
|
|
137
140
|
const n = o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}),
|
|
141
|
-
}, U = /* @__PURE__ */ new Set(),
|
|
142
|
-
if (!
|
|
141
|
+
c = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((r, m) => w(r, `items.value[${m}]`)) : o.forEach((r, m) => {
|
|
142
|
+
_(r, `tabs.value[${m}]`), r.items && Array.isArray(r.items) && r.items.forEach((y, b) => w(y, `tabs.value[${m}].items[${b}]`));
|
|
143
|
+
}), s = !0, C();
|
|
144
|
+
}, U = /* @__PURE__ */ new Set(), C = (o = "unknown") => {
|
|
145
|
+
if (!s) {
|
|
143
146
|
console.warn("[useGridTabs] triggerRootUpdate skipped because isInitialized is false");
|
|
144
147
|
return;
|
|
145
148
|
}
|
|
146
149
|
let t = {
|
|
147
150
|
protocolVersion: "1.28.0",
|
|
148
151
|
// 新增:显式声明协议版本
|
|
149
|
-
gridBasis: (
|
|
150
|
-
unitType: (
|
|
151
|
-
contentConfig: (
|
|
152
|
+
gridBasis: (u == null ? void 0 : u.gridBasis) ?? 30,
|
|
153
|
+
unitType: (u == null ? void 0 : u.unitType) ?? "px",
|
|
154
|
+
contentConfig: (u == null ? void 0 : u.contentConfig) ?? (u == null ? void 0 : u.layoutConfig) ?? {
|
|
152
155
|
box: { padding: [0, 60, 60, 60] },
|
|
153
156
|
navContentGapNormal: 0,
|
|
154
157
|
itemGap: 24
|
|
155
158
|
},
|
|
156
|
-
navConfig: (
|
|
159
|
+
navConfig: (u == null ? void 0 : u.navConfig) ?? {
|
|
157
160
|
dock: "left",
|
|
158
161
|
mode: "fixed",
|
|
159
162
|
renderType: "smart-hybrid",
|
|
160
163
|
box: { size: [200, 0] },
|
|
161
164
|
expandedBox: { size: [300, 0] }
|
|
162
165
|
},
|
|
163
|
-
cacheConfig: (
|
|
166
|
+
cacheConfig: (u == null ? void 0 : u.cacheConfig) ?? {
|
|
164
167
|
offscreenPageLimit: 1,
|
|
165
168
|
prefetchOffset: 2,
|
|
166
169
|
preLoadEnabled: !1,
|
|
167
170
|
strategy: "data_priority"
|
|
168
171
|
},
|
|
169
|
-
animationConfig: (
|
|
172
|
+
animationConfig: (u == null ? void 0 : u.animationConfig) ?? {
|
|
170
173
|
duration: 300,
|
|
171
174
|
easing: "ease-out"
|
|
172
175
|
},
|
|
173
|
-
interactionStrategy: (
|
|
176
|
+
interactionStrategy: (u == null ? void 0 : u.interactionStrategy) ?? {
|
|
174
177
|
defaultFocus: "nav",
|
|
175
178
|
interceptBack: !0,
|
|
176
179
|
backMode: "home-first",
|
|
177
180
|
autoScrollToTop: !0,
|
|
178
181
|
edgeScrollProtection: 0.5
|
|
179
182
|
},
|
|
180
|
-
focusConfig: (
|
|
183
|
+
focusConfig: (u == null ? void 0 : u.focusConfig) ?? {
|
|
181
184
|
boundaryLock: { left: !1, right: !1, top: !1, bottom: !1 }
|
|
182
185
|
},
|
|
183
|
-
themeConfig:
|
|
184
|
-
referenceResolution: (
|
|
186
|
+
themeConfig: u == null ? void 0 : u.themeConfig,
|
|
187
|
+
referenceResolution: (u == null ? void 0 : u.referenceResolution) ?? { w: 1920, h: 1080 }
|
|
185
188
|
}, n = [];
|
|
186
|
-
|
|
189
|
+
c ? (t.navConfig = { ...t.navConfig, renderType: "none" }, n = [
|
|
187
190
|
{
|
|
188
|
-
tabId:
|
|
191
|
+
tabId: h,
|
|
189
192
|
title: "Virtual Tab",
|
|
190
193
|
hidden: !0,
|
|
191
|
-
items:
|
|
194
|
+
items: g.value
|
|
192
195
|
}
|
|
193
|
-
]) : n =
|
|
194
|
-
const
|
|
196
|
+
]) : n = v.value;
|
|
197
|
+
const r = JSON.stringify({
|
|
195
198
|
page_spec: t,
|
|
196
199
|
tabs: n
|
|
197
200
|
});
|
|
198
201
|
if (d.value === "")
|
|
199
|
-
console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${
|
|
202
|
+
console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${r.length})`), d.value = r, l = r;
|
|
200
203
|
else {
|
|
201
|
-
if (
|
|
204
|
+
if (l === r) {
|
|
202
205
|
console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");
|
|
203
206
|
return;
|
|
204
207
|
}
|
|
205
|
-
console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${
|
|
208
|
+
console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${r.length})`), d.value = r, l = r, p({
|
|
206
209
|
op: "RELOAD_TABS",
|
|
207
210
|
payload: {
|
|
208
211
|
pageSpec: t,
|
|
@@ -212,23 +215,23 @@ function _t(e, i) {
|
|
|
212
215
|
}
|
|
213
216
|
});
|
|
214
217
|
}
|
|
215
|
-
},
|
|
218
|
+
}, T = (o) => {
|
|
216
219
|
if (!o || typeof o != "object" || o.__isGridTabsProxy)
|
|
217
220
|
return o;
|
|
218
221
|
o.content && typeof o.content == "object" && !o.content.__isGridTabsProxy && (o.content = new Proxy(o.content, {
|
|
219
|
-
set(n,
|
|
220
|
-
const b = Reflect.set(n,
|
|
221
|
-
return o.id &&
|
|
222
|
+
set(n, r, m, y) {
|
|
223
|
+
const b = Reflect.set(n, r, m, y);
|
|
224
|
+
return o.id && s && p({
|
|
222
225
|
op: "UPDATE_ITEM",
|
|
223
226
|
itemId: o.id,
|
|
224
227
|
payload: o
|
|
225
228
|
}), b;
|
|
226
229
|
}
|
|
227
|
-
}), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems =
|
|
230
|
+
}), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems = P(o.subItems, o.id), Object.defineProperty(o.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.subItems, "__v_skip", { value: !0, enumerable: !1 }));
|
|
228
231
|
const t = new Proxy(o, {
|
|
229
|
-
set(n,
|
|
230
|
-
const b = Reflect.set(n,
|
|
231
|
-
return n.id &&
|
|
232
|
+
set(n, r, m, y) {
|
|
233
|
+
const b = Reflect.set(n, r, m, y);
|
|
234
|
+
return n.id && s && !i && p({
|
|
232
235
|
op: "UPDATE_ITEM",
|
|
233
236
|
itemId: n.id,
|
|
234
237
|
payload: n
|
|
@@ -236,133 +239,133 @@ function _t(e, i) {
|
|
|
236
239
|
}
|
|
237
240
|
});
|
|
238
241
|
return Object.defineProperty(t, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t, "__v_skip", { value: !0, enumerable: !1 }), t;
|
|
239
|
-
},
|
|
242
|
+
}, P = (o, t) => {
|
|
240
243
|
for (let n = 0; n < o.length; n++)
|
|
241
|
-
o[n] =
|
|
244
|
+
o[n] = T(o[n]);
|
|
242
245
|
return new Proxy(o, {
|
|
243
|
-
get(n,
|
|
244
|
-
return
|
|
245
|
-
y.forEach((
|
|
246
|
-
const b = y.map((
|
|
247
|
-
return
|
|
246
|
+
get(n, r, m) {
|
|
247
|
+
return r === "push" ? (...y) => {
|
|
248
|
+
y.forEach((q, K) => w(q, `push(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
|
|
249
|
+
const b = y.map((q) => T(q)), k = Array.prototype.push.apply(n, b);
|
|
250
|
+
return i || p({
|
|
248
251
|
op: "APPEND_SUB_ITEMS",
|
|
249
252
|
itemId: t,
|
|
250
253
|
payload: { subItems: b }
|
|
251
254
|
}), k;
|
|
252
|
-
} :
|
|
253
|
-
y.forEach((
|
|
254
|
-
const b = y.map((
|
|
255
|
-
return
|
|
255
|
+
} : r === "unshift" ? (...y) => {
|
|
256
|
+
y.forEach((q, K) => w(q, `unshift(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
|
|
257
|
+
const b = y.map((q) => T(q)), k = Array.prototype.unshift.apply(n, b);
|
|
258
|
+
return s && b.length > 0 && !i && p({
|
|
256
259
|
op: "PREPEND_SUB_ITEMS",
|
|
257
260
|
itemId: t,
|
|
258
261
|
payload: { subItems: b }
|
|
259
262
|
}), k;
|
|
260
|
-
} :
|
|
263
|
+
} : r === "splice" ? (...y) => {
|
|
261
264
|
const b = y.length >= 2 && y[0] === 0 && y[1] === n.length, k = Array.prototype.splice.apply(n, y);
|
|
262
|
-
return
|
|
265
|
+
return s && b && t !== h ? i || p({
|
|
263
266
|
op: "CLEAR_SUB_ITEMS",
|
|
264
267
|
itemId: t
|
|
265
|
-
}) :
|
|
266
|
-
} : Reflect.get(n,
|
|
268
|
+
}) : s && (i || C("items array spliced")), k;
|
|
269
|
+
} : Reflect.get(n, r, m);
|
|
267
270
|
},
|
|
268
|
-
set(n,
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
const b =
|
|
272
|
-
return b && b.id && !
|
|
271
|
+
set(n, r, m, y) {
|
|
272
|
+
if (r !== "length" && !isNaN(Number(r))) {
|
|
273
|
+
s || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), w(m, `索引赋值 [${String(r)}]`);
|
|
274
|
+
const b = T(m), k = Reflect.set(n, r, b, y);
|
|
275
|
+
return b && b.id && !i && p({
|
|
273
276
|
op: "UPDATE_ITEM",
|
|
274
277
|
itemId: b.id,
|
|
275
278
|
payload: b
|
|
276
279
|
}), k;
|
|
277
280
|
}
|
|
278
|
-
return Reflect.set(n,
|
|
281
|
+
return Reflect.set(n, r, m, y);
|
|
279
282
|
}
|
|
280
283
|
});
|
|
281
|
-
},
|
|
282
|
-
set(t, n,
|
|
284
|
+
}, S = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = P(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
|
|
285
|
+
set(t, n, r, m) {
|
|
283
286
|
if (n === "items") {
|
|
284
|
-
let b =
|
|
285
|
-
return Array.isArray(
|
|
287
|
+
let b = r;
|
|
288
|
+
return Array.isArray(r) && !r.__isGridTabsProxy && (b = P(r, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
|
|
286
289
|
} else if (n === "loadState") {
|
|
287
|
-
const b = Reflect.set(t, n,
|
|
288
|
-
return
|
|
290
|
+
const b = Reflect.set(t, n, r, m);
|
|
291
|
+
return s && t.tabId && !i && p({
|
|
289
292
|
op: "UPDATE_TAB_STATE",
|
|
290
293
|
itemId: t.tabId,
|
|
291
|
-
payload: { loadState:
|
|
294
|
+
payload: { loadState: r }
|
|
292
295
|
}), b;
|
|
293
296
|
}
|
|
294
|
-
return Reflect.set(t, n,
|
|
297
|
+
return Reflect.set(t, n, r, m);
|
|
295
298
|
}
|
|
296
|
-
})),
|
|
297
|
-
const t = o.map((n) =>
|
|
299
|
+
})), B = (o) => {
|
|
300
|
+
const t = o.map((n) => S(n));
|
|
298
301
|
return new Proxy(t, {
|
|
299
|
-
set(n,
|
|
300
|
-
if (
|
|
302
|
+
set(n, r, m, y) {
|
|
303
|
+
if (r !== "length" && !isNaN(Number(r))) {
|
|
301
304
|
let b = m;
|
|
302
|
-
m.__isGridTabsProxy || (b =
|
|
303
|
-
const k = Reflect.set(n,
|
|
304
|
-
return
|
|
305
|
+
m.__isGridTabsProxy || (b = S(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
|
|
306
|
+
const k = Reflect.set(n, r, b, y);
|
|
307
|
+
return C(), k;
|
|
305
308
|
}
|
|
306
|
-
return Reflect.set(n,
|
|
309
|
+
return Reflect.set(n, r, m, y);
|
|
307
310
|
}
|
|
308
311
|
});
|
|
309
312
|
};
|
|
310
|
-
ee(
|
|
311
|
-
if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized:
|
|
312
|
-
d.value = "",
|
|
313
|
+
ee(v, (o, t) => {
|
|
314
|
+
if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: s }), !o || o.length === 0) {
|
|
315
|
+
d.value = "", l = "", s = !1;
|
|
313
316
|
return;
|
|
314
317
|
}
|
|
315
318
|
if (o.__isGridTabsProxy)
|
|
316
|
-
console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"),
|
|
319
|
+
console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), C();
|
|
317
320
|
else {
|
|
318
321
|
console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
|
|
319
|
-
const n =
|
|
320
|
-
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"),
|
|
322
|
+
const n = B(o);
|
|
323
|
+
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), v.value = n;
|
|
321
324
|
}
|
|
322
|
-
}, { flush: "sync", deep: !1 }), ee(
|
|
323
|
-
if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized:
|
|
324
|
-
d.value = "",
|
|
325
|
+
}, { flush: "sync", deep: !1 }), ee(g, (o, t) => {
|
|
326
|
+
if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: s }), !o || o.length === 0) {
|
|
327
|
+
d.value = "", l = "", s = !1;
|
|
325
328
|
return;
|
|
326
329
|
}
|
|
327
330
|
if (o.__isGridTabsProxy)
|
|
328
|
-
console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"),
|
|
331
|
+
console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), C();
|
|
329
332
|
else {
|
|
330
333
|
console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
|
|
331
|
-
const n =
|
|
332
|
-
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"),
|
|
334
|
+
const n = P(o, h);
|
|
335
|
+
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), g.value = n;
|
|
333
336
|
}
|
|
334
337
|
}, { flush: "sync", deep: !1 });
|
|
335
|
-
const
|
|
336
|
-
console.log("[useGridTabs] resetInitialization called manually"),
|
|
337
|
-
for (const o in
|
|
338
|
-
delete
|
|
339
|
-
},
|
|
338
|
+
const N = {}, G = () => {
|
|
339
|
+
console.log("[useGridTabs] resetInitialization called manually"), s = !1, U.clear();
|
|
340
|
+
for (const o in N)
|
|
341
|
+
delete N[o];
|
|
342
|
+
}, R = (o) => {
|
|
340
343
|
if (!o || o.length === 0) {
|
|
341
|
-
d.value = "",
|
|
344
|
+
d.value = "", s = !1;
|
|
342
345
|
return;
|
|
343
346
|
}
|
|
344
|
-
o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ?
|
|
345
|
-
},
|
|
346
|
-
|
|
347
|
-
}, V =
|
|
347
|
+
o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? v.value = o : g.value = o;
|
|
348
|
+
}, E = (o) => {
|
|
349
|
+
f.value = o;
|
|
350
|
+
}, V = j(() => ({
|
|
348
351
|
tabsData: d.value,
|
|
349
352
|
// 不再绑定 actionPayload 属性,完全走命令式 API,防止触发无意义的 Vue 节点更新
|
|
350
353
|
onTabNeedsData: async (...o) => {
|
|
351
354
|
let t = o[0];
|
|
352
|
-
if (t && t.nativeEvent && (t = t.nativeEvent), !
|
|
355
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onTabNeedsData)
|
|
353
356
|
return;
|
|
354
|
-
const { tabId: n, index:
|
|
357
|
+
const { tabId: n, index: r, reason: m } = t;
|
|
355
358
|
if (U.has(n)) {
|
|
356
359
|
console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);
|
|
357
360
|
return;
|
|
358
361
|
}
|
|
359
362
|
U.add(n);
|
|
360
363
|
try {
|
|
361
|
-
const y = await
|
|
364
|
+
const y = await f.value.onTabNeedsData(n, r, m);
|
|
362
365
|
if (y && Array.isArray(y))
|
|
363
|
-
if (
|
|
364
|
-
const b =
|
|
365
|
-
b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready",
|
|
366
|
+
if (N[n] = 1, y.length > 0) {
|
|
367
|
+
const b = v.value.find((k) => k.tabId === n);
|
|
368
|
+
b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready", p({
|
|
366
369
|
op: "UPDATE_TAB_STATE",
|
|
367
370
|
itemId: n,
|
|
368
371
|
payload: { loadState: "ready" }
|
|
@@ -375,18 +378,18 @@ function _t(e, i) {
|
|
|
375
378
|
},
|
|
376
379
|
onLoadMore: async (...o) => {
|
|
377
380
|
let t = o[0];
|
|
378
|
-
if (t && t.nativeEvent && (t = t.nativeEvent), !
|
|
381
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onLoadMore)
|
|
379
382
|
return;
|
|
380
|
-
const { tabId: n, itemId:
|
|
383
|
+
const { tabId: n, itemId: r } = t, y = (N[n] || 1) + 1;
|
|
381
384
|
console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${y}`);
|
|
382
385
|
try {
|
|
383
|
-
const b = await
|
|
386
|
+
const b = await f.value.onLoadMore(n, y, r);
|
|
384
387
|
if (b && Array.isArray(b))
|
|
385
388
|
if (b.length > 0)
|
|
386
|
-
if (
|
|
387
|
-
|
|
389
|
+
if (N[n] = y, c)
|
|
390
|
+
g.value.push(...b);
|
|
388
391
|
else {
|
|
389
|
-
const k =
|
|
392
|
+
const k = v.value.find((q) => q.tabId === n);
|
|
390
393
|
k && k.items && k.items.push(...b);
|
|
391
394
|
}
|
|
392
395
|
else
|
|
@@ -397,262 +400,262 @@ function _t(e, i) {
|
|
|
397
400
|
},
|
|
398
401
|
onItemPresence: (...o) => {
|
|
399
402
|
let t = o[0];
|
|
400
|
-
if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", t),
|
|
403
|
+
if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", t), f.value.onItemPresence)
|
|
401
404
|
try {
|
|
402
405
|
let n = typeof t == "string" ? t : (t == null ? void 0 : t.nativeEvent) || t;
|
|
403
406
|
n && typeof n.data == "string" && (n = n.data);
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`),
|
|
407
|
-
}) :
|
|
407
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
408
|
+
r && r.type === "VIEW_PRESENCE_BATCH" && Array.isArray(r.payload) ? r.payload.forEach((m) => {
|
|
409
|
+
m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), f.value.onItemPresence(m);
|
|
410
|
+
}) : f.value.onItemPresence(r);
|
|
408
411
|
} catch (n) {
|
|
409
|
-
console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n),
|
|
412
|
+
console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), f.value.onItemPresence(t);
|
|
410
413
|
}
|
|
411
414
|
},
|
|
412
415
|
onTabSelected: (...o) => {
|
|
413
416
|
let t = o[0];
|
|
414
|
-
t && t.nativeEvent && (t = t.nativeEvent),
|
|
417
|
+
t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabSelected && f.value.onTabSelected(t);
|
|
415
418
|
},
|
|
416
419
|
onTabClick: (...o) => {
|
|
417
420
|
let t = o[0];
|
|
418
|
-
t && t.nativeEvent && (t = t.nativeEvent),
|
|
421
|
+
t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabClick && f.value.onTabClick(t);
|
|
419
422
|
},
|
|
420
423
|
onItemClick: (...o) => {
|
|
421
424
|
let t = o[0];
|
|
422
|
-
if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent),
|
|
425
|
+
if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemClick)
|
|
423
426
|
try {
|
|
424
427
|
let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
428
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
429
|
+
if (r && typeof r.clickPayload == "string")
|
|
427
430
|
try {
|
|
428
|
-
|
|
431
|
+
r.clickPayload = JSON.parse(r.clickPayload);
|
|
429
432
|
} catch (m) {
|
|
430
433
|
console.warn("Failed to parse clickPayload:", m);
|
|
431
434
|
}
|
|
432
|
-
if (
|
|
435
|
+
if (r && typeof r.focusPayload == "string")
|
|
433
436
|
try {
|
|
434
|
-
|
|
437
|
+
r.focusPayload = JSON.parse(r.focusPayload);
|
|
435
438
|
} catch (m) {
|
|
436
439
|
console.warn("Failed to parse focusPayload:", m);
|
|
437
440
|
}
|
|
438
|
-
|
|
441
|
+
f.value.onItemClick(r);
|
|
439
442
|
} catch (n) {
|
|
440
|
-
console.error("[useGridTabs] Failed to parse onItemClick event payload:", n),
|
|
443
|
+
console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), f.value.onItemClick(t);
|
|
441
444
|
}
|
|
442
445
|
else
|
|
443
446
|
console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!");
|
|
444
447
|
},
|
|
445
448
|
onItemLongClick: (...o) => {
|
|
446
449
|
let t = o[0];
|
|
447
|
-
if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent),
|
|
450
|
+
if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemLongClick)
|
|
448
451
|
try {
|
|
449
452
|
let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
|
|
450
|
-
const
|
|
451
|
-
if (
|
|
453
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
454
|
+
if (r && typeof r.clickPayload == "string")
|
|
452
455
|
try {
|
|
453
|
-
|
|
456
|
+
r.clickPayload = JSON.parse(r.clickPayload);
|
|
454
457
|
} catch {
|
|
455
458
|
}
|
|
456
|
-
if (
|
|
459
|
+
if (r && typeof r.focusPayload == "string")
|
|
457
460
|
try {
|
|
458
|
-
|
|
461
|
+
r.focusPayload = JSON.parse(r.focusPayload);
|
|
459
462
|
} catch {
|
|
460
463
|
}
|
|
461
|
-
|
|
464
|
+
f.value.onItemLongClick(r);
|
|
462
465
|
} catch (n) {
|
|
463
|
-
console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n),
|
|
466
|
+
console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n), f.value.onItemLongClick(t);
|
|
464
467
|
}
|
|
465
468
|
},
|
|
466
469
|
onItemFocused: (...o) => {
|
|
467
470
|
let t = o[0];
|
|
468
|
-
if (t && t.nativeEvent && (t = t.nativeEvent),
|
|
471
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemFocused)
|
|
469
472
|
try {
|
|
470
473
|
let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
|
|
471
|
-
const
|
|
472
|
-
if (
|
|
474
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
475
|
+
if (r && typeof r.clickPayload == "string")
|
|
473
476
|
try {
|
|
474
|
-
|
|
477
|
+
r.clickPayload = JSON.parse(r.clickPayload);
|
|
475
478
|
} catch {
|
|
476
479
|
}
|
|
477
|
-
if (
|
|
480
|
+
if (r && typeof r.focusPayload == "string")
|
|
478
481
|
try {
|
|
479
|
-
|
|
482
|
+
r.focusPayload = JSON.parse(r.focusPayload);
|
|
480
483
|
} catch {
|
|
481
484
|
}
|
|
482
|
-
|
|
485
|
+
f.value.onItemFocused(r);
|
|
483
486
|
} catch (n) {
|
|
484
|
-
console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n),
|
|
487
|
+
console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), f.value.onItemFocused(t);
|
|
485
488
|
}
|
|
486
489
|
},
|
|
487
490
|
onTabFocused: (...o) => {
|
|
488
491
|
let t = o[0];
|
|
489
|
-
t && t.nativeEvent && (t = t.nativeEvent),
|
|
492
|
+
t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabFocused && f.value.onTabFocused(t);
|
|
490
493
|
},
|
|
491
494
|
onScroll: (...o) => {
|
|
492
495
|
let t = o[0];
|
|
493
|
-
if (t && t.nativeEvent && (t = t.nativeEvent),
|
|
496
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScroll)
|
|
494
497
|
try {
|
|
495
498
|
const n = (t == null ? void 0 : t.data) || t;
|
|
496
|
-
|
|
499
|
+
f.value.onScroll(n);
|
|
497
500
|
} catch {
|
|
498
|
-
|
|
501
|
+
f.value.onScroll(t);
|
|
499
502
|
}
|
|
500
503
|
},
|
|
501
504
|
onScrollStateChanged: (...o) => {
|
|
502
505
|
let t = o[0];
|
|
503
|
-
if (t && t.nativeEvent && (t = t.nativeEvent),
|
|
506
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScrollStateChanged)
|
|
504
507
|
try {
|
|
505
508
|
const n = (t == null ? void 0 : t.data) || t;
|
|
506
|
-
|
|
509
|
+
f.value.onScrollStateChanged(n);
|
|
507
510
|
} catch {
|
|
508
|
-
|
|
511
|
+
f.value.onScrollStateChanged(t);
|
|
509
512
|
}
|
|
510
513
|
}
|
|
511
514
|
}));
|
|
512
515
|
return {
|
|
513
516
|
tabsDataStr: d,
|
|
514
517
|
bindings: V,
|
|
515
|
-
tabs:
|
|
516
|
-
items:
|
|
517
|
-
initData:
|
|
518
|
-
setCallbacks:
|
|
518
|
+
tabs: v,
|
|
519
|
+
items: g,
|
|
520
|
+
initData: R,
|
|
521
|
+
setCallbacks: E,
|
|
519
522
|
updateItem: (o, t) => {
|
|
520
|
-
if (!
|
|
523
|
+
if (!s) {
|
|
521
524
|
console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
|
|
522
525
|
return;
|
|
523
526
|
}
|
|
524
|
-
|
|
527
|
+
p({ op: "UPDATE_ITEM", itemId: o, payload: t }), i = !0;
|
|
525
528
|
try {
|
|
526
|
-
if (
|
|
527
|
-
const n =
|
|
529
|
+
if (c) {
|
|
530
|
+
const n = g.value.find((r) => r.id === o);
|
|
528
531
|
n && Object.assign(n, t);
|
|
529
532
|
} else
|
|
530
|
-
for (const n of
|
|
533
|
+
for (const n of v.value)
|
|
531
534
|
if (n.items) {
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
534
|
-
Object.assign(
|
|
535
|
+
const r = n.items.find((m) => m.id === o);
|
|
536
|
+
if (r) {
|
|
537
|
+
Object.assign(r, t);
|
|
535
538
|
break;
|
|
536
539
|
}
|
|
537
540
|
}
|
|
538
541
|
} finally {
|
|
539
|
-
|
|
542
|
+
i = !1;
|
|
540
543
|
}
|
|
541
544
|
},
|
|
542
545
|
deleteItem: (o, t = !0) => {
|
|
543
|
-
if (
|
|
544
|
-
|
|
546
|
+
if (s) {
|
|
547
|
+
p({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), i = !0;
|
|
545
548
|
try {
|
|
546
|
-
if (
|
|
547
|
-
const n =
|
|
548
|
-
n !== -1 &&
|
|
549
|
+
if (c) {
|
|
550
|
+
const n = g.value.findIndex((r) => r.id === o);
|
|
551
|
+
n !== -1 && g.value.splice(n, 1);
|
|
549
552
|
} else
|
|
550
|
-
for (const n of
|
|
553
|
+
for (const n of v.value)
|
|
551
554
|
if (n.items) {
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
n.items.splice(
|
|
555
|
+
const r = n.items.findIndex((m) => m.id === o);
|
|
556
|
+
if (r !== -1) {
|
|
557
|
+
n.items.splice(r, 1);
|
|
555
558
|
break;
|
|
556
559
|
}
|
|
557
560
|
}
|
|
558
561
|
} finally {
|
|
559
|
-
|
|
562
|
+
i = !1;
|
|
560
563
|
}
|
|
561
564
|
}
|
|
562
565
|
},
|
|
563
566
|
prependItems: (o, t) => {
|
|
564
|
-
if (
|
|
565
|
-
|
|
567
|
+
if (s) {
|
|
568
|
+
p({
|
|
566
569
|
op: "PREPEND_SUB_ITEMS",
|
|
567
570
|
itemId: o,
|
|
568
571
|
payload: { subItems: t }
|
|
569
|
-
}),
|
|
572
|
+
}), i = !0;
|
|
570
573
|
try {
|
|
571
|
-
if (
|
|
572
|
-
|
|
574
|
+
if (c)
|
|
575
|
+
g.value.unshift(...t);
|
|
573
576
|
else {
|
|
574
|
-
const n =
|
|
577
|
+
const n = v.value.find((r) => r.tabId === o);
|
|
575
578
|
n && n.items && n.items.unshift(...t);
|
|
576
579
|
}
|
|
577
580
|
} finally {
|
|
578
|
-
|
|
581
|
+
i = !1;
|
|
579
582
|
}
|
|
580
583
|
}
|
|
581
584
|
},
|
|
582
585
|
clearItems: (o) => {
|
|
583
|
-
if (
|
|
584
|
-
|
|
586
|
+
if (s) {
|
|
587
|
+
p({
|
|
585
588
|
op: "CLEAR_SUB_ITEMS",
|
|
586
589
|
itemId: o
|
|
587
|
-
}),
|
|
590
|
+
}), i = !0;
|
|
588
591
|
try {
|
|
589
|
-
if (
|
|
590
|
-
|
|
592
|
+
if (c)
|
|
593
|
+
g.value.splice(0, g.value.length);
|
|
591
594
|
else {
|
|
592
|
-
const t =
|
|
595
|
+
const t = v.value.find((n) => n.tabId === o);
|
|
593
596
|
t && t.items && t.items.splice(0, t.items.length);
|
|
594
597
|
}
|
|
595
598
|
} finally {
|
|
596
|
-
|
|
599
|
+
i = !1;
|
|
597
600
|
}
|
|
598
601
|
}
|
|
599
602
|
},
|
|
600
603
|
moveItem: (o, t, n) => {
|
|
601
|
-
if (
|
|
602
|
-
|
|
604
|
+
if (s) {
|
|
605
|
+
p({
|
|
603
606
|
op: "MOVE_ITEM",
|
|
604
607
|
itemId: o,
|
|
605
608
|
payload: { targetPosition: t, anchorItemId: n }
|
|
606
|
-
}),
|
|
609
|
+
}), i = !0;
|
|
607
610
|
try {
|
|
608
|
-
const
|
|
611
|
+
const r = (m) => {
|
|
609
612
|
const y = m.findIndex((k) => k.id === o), b = m.findIndex((k) => k.id === n);
|
|
610
613
|
if (y !== -1 && b !== -1) {
|
|
611
|
-
const k = m.splice(y, 1)[0],
|
|
614
|
+
const k = m.splice(y, 1)[0], q = m.findIndex((De) => De.id === n), K = t === "after" ? q + 1 : q;
|
|
612
615
|
m.splice(K, 0, k);
|
|
613
616
|
}
|
|
614
617
|
};
|
|
615
|
-
if (
|
|
616
|
-
|
|
618
|
+
if (c)
|
|
619
|
+
r(g.value);
|
|
617
620
|
else
|
|
618
|
-
for (const m of
|
|
619
|
-
m.items &&
|
|
621
|
+
for (const m of v.value)
|
|
622
|
+
m.items && r(m.items);
|
|
620
623
|
} finally {
|
|
621
|
-
|
|
624
|
+
i = !1;
|
|
622
625
|
}
|
|
623
626
|
}
|
|
624
627
|
},
|
|
625
628
|
replaceItem: (o, t) => {
|
|
626
|
-
if (
|
|
627
|
-
|
|
629
|
+
if (s) {
|
|
630
|
+
p({
|
|
628
631
|
op: "REPLACE_ITEM",
|
|
629
632
|
itemId: o,
|
|
630
633
|
payload: t
|
|
631
|
-
}),
|
|
634
|
+
}), i = !0;
|
|
632
635
|
try {
|
|
633
|
-
if (
|
|
634
|
-
const n =
|
|
635
|
-
n !== -1 && (
|
|
636
|
+
if (c) {
|
|
637
|
+
const n = g.value.findIndex((r) => r.id === o);
|
|
638
|
+
n !== -1 && (g.value[n] = t);
|
|
636
639
|
} else
|
|
637
|
-
for (const n of
|
|
640
|
+
for (const n of v.value)
|
|
638
641
|
if (n.items) {
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
n.items[
|
|
642
|
+
const r = n.items.findIndex((m) => m.id === o);
|
|
643
|
+
if (r !== -1) {
|
|
644
|
+
n.items[r] = t;
|
|
642
645
|
break;
|
|
643
646
|
}
|
|
644
647
|
}
|
|
645
648
|
} finally {
|
|
646
|
-
|
|
649
|
+
i = !1;
|
|
647
650
|
}
|
|
648
651
|
}
|
|
649
652
|
},
|
|
650
|
-
dispatchAction:
|
|
651
|
-
resetInitialization:
|
|
653
|
+
dispatchAction: p,
|
|
654
|
+
resetInitialization: G,
|
|
652
655
|
getFocusState: async () => new Promise((o, t) => {
|
|
653
656
|
let n = e.value;
|
|
654
657
|
typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), console.log("[useGridTabs] getFocusState called, nativeTarget:", n);
|
|
655
|
-
const
|
|
658
|
+
const r = (m) => {
|
|
656
659
|
if (console.log("[useGridTabs] getFocusState callback received:", m), m && m.isSuccess !== void 0 && m.result !== void 0) {
|
|
657
660
|
o(m.result);
|
|
658
661
|
return;
|
|
@@ -664,11 +667,11 @@ function _t(e, i) {
|
|
|
664
667
|
t(y);
|
|
665
668
|
}
|
|
666
669
|
};
|
|
667
|
-
typeof
|
|
670
|
+
typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), I.callUIFunction(n, "getFocusState", [], r)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
|
|
668
671
|
}),
|
|
669
672
|
getItemRect: async (o) => new Promise((t, n) => {
|
|
670
|
-
let
|
|
671
|
-
typeof e.value.getNativeNode == "function" ?
|
|
673
|
+
let r = e.value;
|
|
674
|
+
typeof e.value.getNativeNode == "function" ? r = e.value.getNativeNode() || e.value : e.value.nativeRef && (r = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, r);
|
|
672
675
|
const m = (y) => {
|
|
673
676
|
if (console.log(`[useGridTabs] getItemRect callback received for itemId=${o}:`, y), y && y.isSuccess !== void 0 && y.result !== void 0) {
|
|
674
677
|
t(y.result);
|
|
@@ -681,29 +684,29 @@ function _t(e, i) {
|
|
|
681
684
|
n(b);
|
|
682
685
|
}
|
|
683
686
|
};
|
|
684
|
-
typeof
|
|
687
|
+
typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), I.callUIFunction(r, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
|
|
685
688
|
}),
|
|
686
689
|
requestFocus: (o) => {
|
|
687
690
|
let t = e.value;
|
|
688
|
-
typeof e.value.getNativeNode == "function" ? t = e.value.getNativeNode() || e.value : e.value.nativeRef && (t = e.value.nativeRef),
|
|
691
|
+
typeof e.value.getNativeNode == "function" ? t = e.value.getNativeNode() || e.value : e.value.nativeRef && (t = e.value.nativeRef), I.callUIFunction(t, "requestFocus", [o]);
|
|
689
692
|
},
|
|
690
693
|
updatePageSpec: (o) => {
|
|
691
|
-
if (!
|
|
694
|
+
if (!s)
|
|
692
695
|
return;
|
|
693
696
|
const t = Object.assign({}, JSON.parse(d.value).page_spec, o);
|
|
694
|
-
o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)),
|
|
697
|
+
o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)), u && Object.assign(u, t), p({
|
|
695
698
|
op: "RELOAD_TABS",
|
|
696
699
|
payload: {
|
|
697
700
|
pageSpec: t,
|
|
698
701
|
page_spec: t,
|
|
699
|
-
tabs:
|
|
702
|
+
tabs: v.value
|
|
700
703
|
}
|
|
701
704
|
});
|
|
702
705
|
const n = JSON.parse(d.value);
|
|
703
|
-
n.page_spec = t, d.value = JSON.stringify(n),
|
|
706
|
+
n.page_spec = t, d.value = JSON.stringify(n), l = d.value;
|
|
704
707
|
},
|
|
705
708
|
reloadAll: (o, t) => {
|
|
706
|
-
|
|
709
|
+
u && (Object.keys(u).forEach((n) => delete u[n]), Object.assign(u, o)), v.value = t, p({
|
|
707
710
|
op: "RELOAD_TABS",
|
|
708
711
|
payload: {
|
|
709
712
|
pageSpec: o,
|
|
@@ -714,11 +717,14 @@ function _t(e, i) {
|
|
|
714
717
|
},
|
|
715
718
|
scrollToTop: () => {
|
|
716
719
|
let o = e.value;
|
|
717
|
-
typeof e.value.getNativeNode == "function" ? o = e.value.getNativeNode() || e.value : e.value.nativeRef && (o = e.value.nativeRef),
|
|
720
|
+
typeof e.value.getNativeNode == "function" ? o = e.value.getNativeNode() || e.value : e.value.nativeRef && (o = e.value.nativeRef), I.callUIFunction(o, "scrollToTop", []);
|
|
718
721
|
}
|
|
719
722
|
};
|
|
720
723
|
}
|
|
721
|
-
const
|
|
724
|
+
const Ke = {
|
|
725
|
+
inheritAttrs: !1
|
|
726
|
+
}, me = /* @__PURE__ */ $({
|
|
727
|
+
...Ke,
|
|
722
728
|
__name: "Keyboard",
|
|
723
729
|
props: {
|
|
724
730
|
backgroundColor: {},
|
|
@@ -738,23 +744,23 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
|
|
|
738
744
|
rememberKeyboardType: { type: Boolean }
|
|
739
745
|
},
|
|
740
746
|
emits: ["onInputChanged", "onKeyPressed"],
|
|
741
|
-
setup(e, { expose:
|
|
742
|
-
const d = A(),
|
|
743
|
-
|
|
744
|
-
|
|
747
|
+
setup(e, { expose: a }) {
|
|
748
|
+
const d = A(), u = L(), v = "QtKeyboard", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
749
|
+
s,
|
|
750
|
+
u.pluginPackageName || "com.quicktvui.plugin.extraui",
|
|
745
751
|
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
746
752
|
);
|
|
747
|
-
return
|
|
753
|
+
return a({
|
|
748
754
|
getNativeNode: () => {
|
|
749
|
-
var
|
|
750
|
-
return ((
|
|
755
|
+
var l, i;
|
|
756
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
751
757
|
},
|
|
752
|
-
requestFocus: (...
|
|
753
|
-
var
|
|
754
|
-
const
|
|
755
|
-
|
|
758
|
+
requestFocus: (...l) => {
|
|
759
|
+
var f, p;
|
|
760
|
+
const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
|
|
761
|
+
i && I.callUIFunction(i, "requestFocus", l);
|
|
756
762
|
}
|
|
757
|
-
}), (
|
|
763
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
758
764
|
ref_key: "nativeRef",
|
|
759
765
|
ref: d,
|
|
760
766
|
backgroundColor: e.backgroundColor,
|
|
@@ -772,265 +778,280 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
|
|
|
772
778
|
currentInput: e.currentInput,
|
|
773
779
|
autofocus: e.autofocus,
|
|
774
780
|
rememberKeyboardType: e.rememberKeyboardType,
|
|
775
|
-
onOnInputChanged:
|
|
776
|
-
onOnKeyPressed:
|
|
777
|
-
},
|
|
778
|
-
default:
|
|
779
|
-
|
|
781
|
+
onOnInputChanged: i[0] || (i[0] = (f) => l.$emit("onInputChanged", f.nativeEvent)),
|
|
782
|
+
onOnKeyPressed: i[1] || (i[1] = (f) => l.$emit("onKeyPressed", f.nativeEvent))
|
|
783
|
+
}, l.$attrs), {
|
|
784
|
+
default: Q(() => [
|
|
785
|
+
D(l.$slots, "default")
|
|
780
786
|
]),
|
|
781
787
|
_: 3
|
|
782
788
|
}, 16, ["backgroundColor", "backgroundGradient", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "keyboardType", "textClear", "textDelete", "currentInput", "autofocus", "rememberKeyboardType"]));
|
|
783
789
|
}
|
|
784
790
|
});
|
|
785
791
|
let oe;
|
|
786
|
-
var
|
|
792
|
+
var Ee;
|
|
787
793
|
try {
|
|
788
794
|
const e = require("@extscreen/es3-vue");
|
|
789
|
-
oe = e.registerElement || ((
|
|
795
|
+
oe = e.registerElement || ((Ee = e.default) == null ? void 0 : Ee.registerElement);
|
|
790
796
|
} catch {
|
|
791
797
|
}
|
|
792
|
-
const
|
|
798
|
+
const He = {
|
|
793
799
|
install: (e) => {
|
|
794
800
|
if (!globalThis.__QtKeyboard_registered)
|
|
795
801
|
if (oe) {
|
|
796
|
-
const
|
|
802
|
+
const a = (d, u) => {
|
|
797
803
|
oe(d, {
|
|
798
804
|
component: {
|
|
799
|
-
name:
|
|
800
|
-
processEventData(
|
|
801
|
-
const
|
|
802
|
-
return
|
|
805
|
+
name: u ? "QtKeyboard_Plugin" : "QtKeyboard",
|
|
806
|
+
processEventData(v, g) {
|
|
807
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
808
|
+
return c && (c.nativeEvent = s), c;
|
|
803
809
|
}
|
|
804
810
|
}
|
|
805
811
|
});
|
|
806
812
|
};
|
|
807
|
-
|
|
813
|
+
a("qt-keyboard", !1), a("qt-keyboard-plugin", !0), a("QtKeyboard", !1), a("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
|
|
808
814
|
} else
|
|
809
815
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
810
|
-
e.component("Keyboard",
|
|
816
|
+
e.component("Keyboard", me), e.component("qt-keyboard", me);
|
|
811
817
|
}
|
|
812
|
-
},
|
|
818
|
+
}, Je = {
|
|
819
|
+
inheritAttrs: !1
|
|
820
|
+
}, be = /* @__PURE__ */ $({
|
|
821
|
+
...Je,
|
|
813
822
|
__name: "PortalPool",
|
|
814
|
-
setup(e, { expose:
|
|
815
|
-
const d = A(),
|
|
816
|
-
|
|
817
|
-
|
|
823
|
+
setup(e, { expose: a }) {
|
|
824
|
+
const d = A(), u = L(), v = "QtPortalPool", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
825
|
+
s,
|
|
826
|
+
u.pluginPackageName || "com.quicktvui.plugin.glintui"
|
|
818
827
|
);
|
|
819
|
-
return
|
|
828
|
+
return a({
|
|
820
829
|
getNativeNode: () => {
|
|
821
|
-
var
|
|
822
|
-
return ((
|
|
830
|
+
var l, i;
|
|
831
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
823
832
|
}
|
|
824
|
-
}), (
|
|
833
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
825
834
|
ref_key: "nativeRef",
|
|
826
835
|
ref: d,
|
|
827
836
|
style: { position: "absolute" },
|
|
828
837
|
absolute: !0
|
|
829
|
-
},
|
|
830
|
-
default:
|
|
831
|
-
|
|
838
|
+
}, l.$attrs), {
|
|
839
|
+
default: Q(() => [
|
|
840
|
+
D(l.$slots, "default")
|
|
832
841
|
]),
|
|
833
842
|
_: 3
|
|
834
843
|
}, 16));
|
|
835
844
|
}
|
|
836
845
|
});
|
|
837
846
|
let ne;
|
|
838
|
-
var
|
|
847
|
+
var xe;
|
|
839
848
|
try {
|
|
840
849
|
const e = require("@extscreen/es3-vue");
|
|
841
|
-
ne = e.registerElement || ((
|
|
850
|
+
ne = e.registerElement || ((xe = e.default) == null ? void 0 : xe.registerElement);
|
|
842
851
|
} catch {
|
|
843
852
|
}
|
|
844
|
-
const
|
|
853
|
+
const Ze = {
|
|
845
854
|
install: (e) => {
|
|
846
855
|
if (!globalThis.__QtPortalPool_registered)
|
|
847
856
|
if (ne) {
|
|
848
|
-
const
|
|
857
|
+
const a = (d, u) => {
|
|
849
858
|
ne(d, {
|
|
850
859
|
component: {
|
|
851
|
-
name:
|
|
852
|
-
processEventData(
|
|
853
|
-
const
|
|
854
|
-
return
|
|
860
|
+
name: u ? "QtPortalPool_Plugin" : "QtPortalPool",
|
|
861
|
+
processEventData(v, g) {
|
|
862
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
863
|
+
return c && (c.nativeEvent = s), c;
|
|
855
864
|
}
|
|
856
865
|
}
|
|
857
866
|
});
|
|
858
867
|
};
|
|
859
|
-
|
|
868
|
+
a("qt-portal-pool", !1), a("qt-portal-pool-plugin", !0), a("QtPortalPool", !1), a("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
|
|
860
869
|
} else
|
|
861
870
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
862
|
-
e.component("PortalPool",
|
|
871
|
+
e.component("PortalPool", be), e.component("qt-portal-pool", be);
|
|
863
872
|
}
|
|
864
|
-
},
|
|
873
|
+
}, Xe = {
|
|
874
|
+
inheritAttrs: !1
|
|
875
|
+
}, ye = /* @__PURE__ */ $({
|
|
876
|
+
...Xe,
|
|
865
877
|
__name: "PortalItem",
|
|
866
878
|
props: {
|
|
867
879
|
portalId: {}
|
|
868
880
|
},
|
|
869
|
-
setup(e, { expose:
|
|
870
|
-
const d = A(),
|
|
871
|
-
|
|
872
|
-
|
|
881
|
+
setup(e, { expose: a }) {
|
|
882
|
+
const d = A(), u = L(), v = "QtPortalItem", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
883
|
+
s,
|
|
884
|
+
u.pluginPackageName || "com.quicktvui.plugin.glintui"
|
|
873
885
|
);
|
|
874
|
-
return
|
|
886
|
+
return a({
|
|
875
887
|
getNativeNode: () => {
|
|
876
|
-
var
|
|
877
|
-
return ((
|
|
888
|
+
var l, i;
|
|
889
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
878
890
|
}
|
|
879
|
-
}), (
|
|
891
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
880
892
|
ref_key: "nativeRef",
|
|
881
893
|
ref: d,
|
|
882
894
|
style: { position: "absolute" },
|
|
883
895
|
absolute: !0,
|
|
884
896
|
portalId: e.portalId
|
|
885
|
-
},
|
|
886
|
-
default:
|
|
887
|
-
|
|
897
|
+
}, l.$attrs), {
|
|
898
|
+
default: Q(() => [
|
|
899
|
+
D(l.$slots, "default")
|
|
888
900
|
]),
|
|
889
901
|
_: 3
|
|
890
902
|
}, 16, ["portalId"]));
|
|
891
903
|
}
|
|
892
904
|
});
|
|
893
905
|
let ae;
|
|
894
|
-
var
|
|
906
|
+
var Ae;
|
|
895
907
|
try {
|
|
896
908
|
const e = require("@extscreen/es3-vue");
|
|
897
|
-
ae = e.registerElement || ((
|
|
909
|
+
ae = e.registerElement || ((Ae = e.default) == null ? void 0 : Ae.registerElement);
|
|
898
910
|
} catch {
|
|
899
911
|
}
|
|
900
|
-
const
|
|
912
|
+
const Ye = {
|
|
901
913
|
install: (e) => {
|
|
902
914
|
if (!globalThis.__QtPortalItem_registered)
|
|
903
915
|
if (ae) {
|
|
904
|
-
const
|
|
916
|
+
const a = (d, u) => {
|
|
905
917
|
ae(d, {
|
|
906
918
|
component: {
|
|
907
|
-
name:
|
|
908
|
-
processEventData(
|
|
909
|
-
const
|
|
910
|
-
return
|
|
919
|
+
name: u ? "QtPortalItem_Plugin" : "QtPortalItem",
|
|
920
|
+
processEventData(v, g) {
|
|
921
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
922
|
+
return c && (c.nativeEvent = s), c;
|
|
911
923
|
}
|
|
912
924
|
}
|
|
913
925
|
});
|
|
914
926
|
};
|
|
915
|
-
|
|
927
|
+
a("qt-portal-item", !1), a("qt-portal-item-plugin", !0), a("QtPortalItem", !1), a("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
|
|
916
928
|
} else
|
|
917
929
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
918
|
-
e.component("PortalItem",
|
|
930
|
+
e.component("PortalItem", ye), e.component("qt-portal-item", ye);
|
|
919
931
|
}
|
|
920
|
-
},
|
|
932
|
+
}, et = {
|
|
933
|
+
inheritAttrs: !1
|
|
934
|
+
}, he = /* @__PURE__ */ $({
|
|
935
|
+
...et,
|
|
921
936
|
__name: "HsvBackground",
|
|
922
937
|
props: {
|
|
923
938
|
hue: {},
|
|
924
939
|
hueDuration: {}
|
|
925
940
|
},
|
|
926
|
-
setup(e, { expose:
|
|
927
|
-
const d = A(),
|
|
928
|
-
|
|
929
|
-
|
|
941
|
+
setup(e, { expose: a }) {
|
|
942
|
+
const d = A(), u = L(), v = "QtHsvBackground", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
943
|
+
s,
|
|
944
|
+
u.pluginPackageName || "com.quicktvui.plugin.glintui"
|
|
930
945
|
);
|
|
931
|
-
return
|
|
946
|
+
return a({
|
|
932
947
|
getNativeNode: () => {
|
|
933
|
-
var
|
|
934
|
-
return ((
|
|
948
|
+
var l, i;
|
|
949
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
935
950
|
}
|
|
936
|
-
}), (
|
|
951
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
937
952
|
ref_key: "nativeRef",
|
|
938
953
|
ref: d,
|
|
939
954
|
hue: e.hue,
|
|
940
955
|
hueDuration: e.hueDuration
|
|
941
|
-
},
|
|
942
|
-
default:
|
|
943
|
-
|
|
956
|
+
}, l.$attrs), {
|
|
957
|
+
default: Q(() => [
|
|
958
|
+
D(l.$slots, "default")
|
|
944
959
|
]),
|
|
945
960
|
_: 3
|
|
946
961
|
}, 16, ["hue", "hueDuration"]));
|
|
947
962
|
}
|
|
948
963
|
});
|
|
949
|
-
let
|
|
950
|
-
var
|
|
964
|
+
let le;
|
|
965
|
+
var we;
|
|
951
966
|
try {
|
|
952
967
|
const e = require("@extscreen/es3-vue");
|
|
953
|
-
|
|
968
|
+
le = e.registerElement || ((we = e.default) == null ? void 0 : we.registerElement);
|
|
954
969
|
} catch {
|
|
955
970
|
}
|
|
956
|
-
const
|
|
971
|
+
const tt = {
|
|
957
972
|
install: (e) => {
|
|
958
973
|
if (!globalThis.__QtHsvBackground_registered)
|
|
959
|
-
if (
|
|
960
|
-
const
|
|
961
|
-
|
|
974
|
+
if (le) {
|
|
975
|
+
const a = (d, u) => {
|
|
976
|
+
le(d, {
|
|
962
977
|
component: {
|
|
963
|
-
name:
|
|
964
|
-
processEventData(
|
|
965
|
-
const
|
|
966
|
-
return
|
|
978
|
+
name: u ? "QtHsvBackground_Plugin" : "QtHsvBackground",
|
|
979
|
+
processEventData(v, g) {
|
|
980
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
981
|
+
return c && (c.nativeEvent = s), c;
|
|
967
982
|
}
|
|
968
983
|
}
|
|
969
984
|
});
|
|
970
985
|
};
|
|
971
|
-
|
|
986
|
+
a("qt-hsv-background", !1), a("qt-hsv-background-plugin", !0), a("QtHsvBackground", !1), a("QtHsvBackground_Plugin", !0), globalThis.__QtHsvBackground_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtHsvBackground");
|
|
972
987
|
} else
|
|
973
988
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
974
|
-
e.component("HsvBackground",
|
|
989
|
+
e.component("HsvBackground", he), e.component("qt-hsv-background", he);
|
|
975
990
|
}
|
|
976
|
-
},
|
|
991
|
+
}, ot = {
|
|
992
|
+
inheritAttrs: !1
|
|
993
|
+
}, pe = /* @__PURE__ */ $({
|
|
994
|
+
...ot,
|
|
977
995
|
__name: "SvgImage",
|
|
978
996
|
props: {
|
|
979
997
|
src: {},
|
|
980
998
|
tintColor: {}
|
|
981
999
|
},
|
|
982
|
-
setup(e, { expose:
|
|
983
|
-
const d = A(),
|
|
984
|
-
|
|
985
|
-
|
|
1000
|
+
setup(e, { expose: a }) {
|
|
1001
|
+
const d = A(), u = L(), v = "QtSvgImage", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
1002
|
+
s,
|
|
1003
|
+
u.pluginPackageName || "com.quicktvui.plugin.extraui",
|
|
986
1004
|
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
987
1005
|
);
|
|
988
|
-
return
|
|
1006
|
+
return a({
|
|
989
1007
|
getNativeNode: () => {
|
|
990
|
-
var
|
|
991
|
-
return ((
|
|
1008
|
+
var l, i;
|
|
1009
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
992
1010
|
}
|
|
993
|
-
}), (
|
|
1011
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
994
1012
|
ref_key: "nativeRef",
|
|
995
1013
|
ref: d,
|
|
996
1014
|
src: e.src,
|
|
997
1015
|
tintColor: e.tintColor
|
|
998
|
-
},
|
|
999
|
-
default:
|
|
1000
|
-
|
|
1016
|
+
}, l.$attrs), {
|
|
1017
|
+
default: Q(() => [
|
|
1018
|
+
D(l.$slots, "default")
|
|
1001
1019
|
]),
|
|
1002
1020
|
_: 3
|
|
1003
1021
|
}, 16, ["src", "tintColor"]));
|
|
1004
1022
|
}
|
|
1005
1023
|
});
|
|
1006
|
-
let
|
|
1007
|
-
var
|
|
1024
|
+
let ie;
|
|
1025
|
+
var $e;
|
|
1008
1026
|
try {
|
|
1009
1027
|
const e = require("@extscreen/es3-vue");
|
|
1010
|
-
|
|
1028
|
+
ie = e.registerElement || (($e = e.default) == null ? void 0 : $e.registerElement);
|
|
1011
1029
|
} catch {
|
|
1012
1030
|
}
|
|
1013
|
-
const
|
|
1031
|
+
const nt = {
|
|
1014
1032
|
install: (e) => {
|
|
1015
1033
|
if (!globalThis.__QtSvgImage_registered)
|
|
1016
|
-
if (
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1034
|
+
if (ie) {
|
|
1035
|
+
const a = (d, u) => {
|
|
1036
|
+
ie(d, {
|
|
1019
1037
|
component: {
|
|
1020
|
-
name:
|
|
1021
|
-
processEventData(
|
|
1022
|
-
const
|
|
1023
|
-
return
|
|
1038
|
+
name: u ? "QtSvgImage_Plugin" : "QtSvgImage",
|
|
1039
|
+
processEventData(v, g) {
|
|
1040
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
1041
|
+
return c && (c.nativeEvent = s), c;
|
|
1024
1042
|
}
|
|
1025
1043
|
}
|
|
1026
1044
|
});
|
|
1027
1045
|
};
|
|
1028
|
-
|
|
1046
|
+
a("qt-svg-image", !1), a("qt-svg-image-plugin", !0), a("QtSvgImage", !1), a("QtSvgImage_Plugin", !0), globalThis.__QtSvgImage_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtSvgImage");
|
|
1029
1047
|
} else
|
|
1030
1048
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1031
|
-
e.component("SvgImage",
|
|
1049
|
+
e.component("SvgImage", pe), e.component("qt-svg-image", pe);
|
|
1032
1050
|
}
|
|
1033
|
-
},
|
|
1051
|
+
}, at = {
|
|
1052
|
+
inheritAttrs: !1
|
|
1053
|
+
}, lt = /* @__PURE__ */ $({
|
|
1054
|
+
...at,
|
|
1034
1055
|
__name: "NaButtonBase",
|
|
1035
1056
|
props: {
|
|
1036
1057
|
text: {},
|
|
@@ -1052,18 +1073,18 @@ const ut = {
|
|
|
1052
1073
|
enableFocusBorder: { type: Boolean }
|
|
1053
1074
|
},
|
|
1054
1075
|
emits: ["onButtonCustomEvent"],
|
|
1055
|
-
setup(e, { expose:
|
|
1056
|
-
const d = A(),
|
|
1057
|
-
|
|
1058
|
-
|
|
1076
|
+
setup(e, { expose: a }) {
|
|
1077
|
+
const d = A(), u = L(), v = "QtNaButton", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
1078
|
+
s,
|
|
1079
|
+
u.pluginPackageName || "com.quicktvui.plugin.extraui",
|
|
1059
1080
|
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
1060
1081
|
);
|
|
1061
|
-
return
|
|
1082
|
+
return a({
|
|
1062
1083
|
getNativeNode: () => {
|
|
1063
|
-
var
|
|
1064
|
-
return ((
|
|
1084
|
+
var l, i;
|
|
1085
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
1065
1086
|
}
|
|
1066
|
-
}), (
|
|
1087
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
1067
1088
|
ref_key: "nativeRef",
|
|
1068
1089
|
ref: d,
|
|
1069
1090
|
text: e.text,
|
|
@@ -1083,61 +1104,67 @@ const ut = {
|
|
|
1083
1104
|
cornerRadius: e.cornerRadius,
|
|
1084
1105
|
focusScale: e.focusScale,
|
|
1085
1106
|
enableFocusBorder: e.enableFocusBorder,
|
|
1086
|
-
onOnButtonCustomEvent:
|
|
1087
|
-
},
|
|
1088
|
-
default:
|
|
1089
|
-
|
|
1107
|
+
onOnButtonCustomEvent: i[0] || (i[0] = (f) => l.$emit("onButtonCustomEvent", f.nativeEvent))
|
|
1108
|
+
}, l.$attrs), {
|
|
1109
|
+
default: Q(() => [
|
|
1110
|
+
D(l.$slots, "default")
|
|
1090
1111
|
]),
|
|
1091
1112
|
_: 3
|
|
1092
1113
|
}, 16, ["text", "icon", "iconSize", "iconSpace", "layoutDirection", "fontSize", "maxLines", "textColor", "focusTextColor", "backgroundColor", "focusBackgroundColor", "normalBorderWidth", "normalBorderColor", "focusBorderColor", "cornerRadius", "focusScale", "enableFocusBorder"]));
|
|
1093
1114
|
}
|
|
1094
|
-
}),
|
|
1115
|
+
}), it = {
|
|
1116
|
+
inheritAttrs: !1
|
|
1117
|
+
}, Ce = /* @__PURE__ */ $({
|
|
1118
|
+
...it,
|
|
1095
1119
|
__name: "NaButton",
|
|
1096
1120
|
props: {
|
|
1097
1121
|
width: {},
|
|
1098
1122
|
height: {}
|
|
1099
1123
|
},
|
|
1100
1124
|
setup(e) {
|
|
1101
|
-
const
|
|
1102
|
-
width: typeof
|
|
1103
|
-
height: typeof
|
|
1125
|
+
const a = e, d = j(() => ({
|
|
1126
|
+
width: typeof a.width == "number" ? `${a.width}px` : a.width,
|
|
1127
|
+
height: typeof a.height == "number" ? `${a.height}px` : a.height
|
|
1104
1128
|
}));
|
|
1105
|
-
return (
|
|
1106
|
-
default:
|
|
1107
|
-
|
|
1129
|
+
return (u, v) => (x(), O(lt, F(u.$attrs, { style: d.value }), {
|
|
1130
|
+
default: Q(() => [
|
|
1131
|
+
D(u.$slots, "default")
|
|
1108
1132
|
]),
|
|
1109
1133
|
_: 3
|
|
1110
1134
|
}, 16, ["style"]));
|
|
1111
1135
|
}
|
|
1112
1136
|
});
|
|
1113
1137
|
let re;
|
|
1114
|
-
var
|
|
1138
|
+
var Be;
|
|
1115
1139
|
try {
|
|
1116
1140
|
const e = require("@extscreen/es3-vue");
|
|
1117
|
-
re = e.registerElement || ((
|
|
1141
|
+
re = e.registerElement || ((Be = e.default) == null ? void 0 : Be.registerElement);
|
|
1118
1142
|
} catch {
|
|
1119
1143
|
}
|
|
1120
|
-
const
|
|
1144
|
+
const rt = {
|
|
1121
1145
|
install: (e) => {
|
|
1122
1146
|
if (!globalThis.__QtNaButton_registered)
|
|
1123
1147
|
if (re) {
|
|
1124
|
-
const
|
|
1148
|
+
const a = (d, u) => {
|
|
1125
1149
|
re(d, {
|
|
1126
1150
|
component: {
|
|
1127
|
-
name:
|
|
1128
|
-
processEventData(
|
|
1129
|
-
const
|
|
1130
|
-
return
|
|
1151
|
+
name: u ? "QtNaButton_Plugin" : "QtNaButton",
|
|
1152
|
+
processEventData(v, g) {
|
|
1153
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
1154
|
+
return c && (c.nativeEvent = s), c;
|
|
1131
1155
|
}
|
|
1132
1156
|
}
|
|
1133
1157
|
});
|
|
1134
1158
|
};
|
|
1135
|
-
|
|
1159
|
+
a("qt-na-button", !1), a("qt-na-button-plugin", !0), a("QtNaButton", !1), a("QtNaButton_Plugin", !0), globalThis.__QtNaButton_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaButton");
|
|
1136
1160
|
} else
|
|
1137
1161
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1138
|
-
e.component("NaButton",
|
|
1162
|
+
e.component("NaButton", Ce), e.component("qt-na-button", Ce);
|
|
1139
1163
|
}
|
|
1140
|
-
},
|
|
1164
|
+
}, st = {
|
|
1165
|
+
inheritAttrs: !1
|
|
1166
|
+
}, ke = /* @__PURE__ */ $({
|
|
1167
|
+
...st,
|
|
1141
1168
|
__name: "NaCheckbox",
|
|
1142
1169
|
props: {
|
|
1143
1170
|
text: {},
|
|
@@ -1183,17 +1210,17 @@ const gt = {
|
|
|
1183
1210
|
type: {}
|
|
1184
1211
|
},
|
|
1185
1212
|
emits: ["onCheckedChange"],
|
|
1186
|
-
setup(e, { expose:
|
|
1187
|
-
const d = A(),
|
|
1188
|
-
|
|
1189
|
-
|
|
1213
|
+
setup(e, { expose: a }) {
|
|
1214
|
+
const d = A(), u = L(), v = "QtNaCheckbox", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
1215
|
+
s,
|
|
1216
|
+
u.pluginPackageName || ""
|
|
1190
1217
|
);
|
|
1191
|
-
return
|
|
1218
|
+
return a({
|
|
1192
1219
|
getNativeNode: () => {
|
|
1193
|
-
var
|
|
1194
|
-
return ((
|
|
1220
|
+
var l, i;
|
|
1221
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
1195
1222
|
}
|
|
1196
|
-
}), (
|
|
1223
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
1197
1224
|
ref_key: "nativeRef",
|
|
1198
1225
|
ref: d,
|
|
1199
1226
|
text: e.text,
|
|
@@ -1237,43 +1264,43 @@ const gt = {
|
|
|
1237
1264
|
cornerRadius: e.cornerRadius,
|
|
1238
1265
|
focusScale: e.focusScale,
|
|
1239
1266
|
type: e.type,
|
|
1240
|
-
onOnCheckedChange:
|
|
1241
|
-
},
|
|
1242
|
-
default:
|
|
1243
|
-
|
|
1267
|
+
onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
|
|
1268
|
+
}, l.$attrs), {
|
|
1269
|
+
default: Q(() => [
|
|
1270
|
+
D(l.$slots, "default")
|
|
1244
1271
|
]),
|
|
1245
1272
|
_: 3
|
|
1246
1273
|
}, 16, ["text", "checked", "disabled", "checkedIcon", "uncheckedIcon", "iconSize", "iconSpace", "layoutDirection", "gravity", "paddingX", "showBackground", "fontSize", "textColor", "focusTextColor", "checkedTextColor", "focusCheckedTextColor", "disabledTextColor", "iconColor", "focusIconColor", "checkedIconColor", "focusCheckedIconColor", "disabledIconColor", "iconInnerColor", "focusIconInnerColor", "checkedIconInnerColor", "focusCheckedIconInnerColor", "disabledIconInnerColor", "focusMode", "bgColor", "focusBgColor", "checkedBgColor", "focusCheckedBgColor", "disabledBgColor", "borderColor", "focusBorderColor", "checkedBorderColor", "focusCheckedBorderColor", "disabledBorderColor", "cornerRadius", "focusScale", "type"]));
|
|
1247
1274
|
}
|
|
1248
1275
|
});
|
|
1249
1276
|
let se;
|
|
1250
|
-
var
|
|
1277
|
+
var Ge;
|
|
1251
1278
|
try {
|
|
1252
1279
|
const e = require("@extscreen/es3-vue");
|
|
1253
|
-
se = e.registerElement || ((
|
|
1280
|
+
se = e.registerElement || ((Ge = e.default) == null ? void 0 : Ge.registerElement);
|
|
1254
1281
|
} catch {
|
|
1255
1282
|
}
|
|
1256
|
-
const
|
|
1283
|
+
const ct = {
|
|
1257
1284
|
install: (e) => {
|
|
1258
1285
|
if (!globalThis.__QtNaCheckbox_registered)
|
|
1259
1286
|
if (se) {
|
|
1260
|
-
const
|
|
1287
|
+
const a = (d, u) => {
|
|
1261
1288
|
se(d, {
|
|
1262
1289
|
component: {
|
|
1263
|
-
name:
|
|
1264
|
-
processEventData(
|
|
1265
|
-
const
|
|
1266
|
-
return
|
|
1290
|
+
name: u ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
|
|
1291
|
+
processEventData(v, g) {
|
|
1292
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
1293
|
+
return c && (c.nativeEvent = s), c;
|
|
1267
1294
|
}
|
|
1268
1295
|
}
|
|
1269
1296
|
});
|
|
1270
1297
|
};
|
|
1271
|
-
|
|
1298
|
+
a("qt-na-checkbox", !1), a("qt-na-checkbox-plugin", !0), a("QtNaCheckbox", !1), a("QtNaCheckbox_Plugin", !0), globalThis.__QtNaCheckbox_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaCheckbox");
|
|
1272
1299
|
} else
|
|
1273
1300
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1274
|
-
e.component("NaCheckbox",
|
|
1301
|
+
e.component("NaCheckbox", ke), e.component("qt-na-checkbox", ke);
|
|
1275
1302
|
}
|
|
1276
|
-
},
|
|
1303
|
+
}, ut = $({
|
|
1277
1304
|
name: "NaRadioGroup",
|
|
1278
1305
|
props: {
|
|
1279
1306
|
modelValue: {
|
|
@@ -1310,55 +1337,55 @@ const ft = {
|
|
|
1310
1337
|
}
|
|
1311
1338
|
},
|
|
1312
1339
|
emits: ["update:modelValue", "change"],
|
|
1313
|
-
setup(e, { emit:
|
|
1340
|
+
setup(e, { emit: a }) {
|
|
1314
1341
|
return {
|
|
1315
|
-
groupStyle:
|
|
1342
|
+
groupStyle: j(() => ({
|
|
1316
1343
|
display: "flex",
|
|
1317
1344
|
flexDirection: e.direction,
|
|
1318
1345
|
alignItems: "center"
|
|
1319
1346
|
})),
|
|
1320
|
-
getItemStyle: (
|
|
1321
|
-
var
|
|
1322
|
-
const
|
|
1323
|
-
return e.itemWidth !== void 0 && (
|
|
1347
|
+
getItemStyle: (g, c) => {
|
|
1348
|
+
var h;
|
|
1349
|
+
const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
|
|
1350
|
+
return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
|
|
1324
1351
|
},
|
|
1325
|
-
onItemClick: (
|
|
1326
|
-
|
|
1352
|
+
onItemClick: (g) => {
|
|
1353
|
+
g.disabled || (a("update:modelValue", g.value), a("change", g.value));
|
|
1327
1354
|
}
|
|
1328
1355
|
};
|
|
1329
1356
|
}
|
|
1330
1357
|
});
|
|
1331
|
-
const
|
|
1358
|
+
const ge = (e, a) => {
|
|
1332
1359
|
const d = e.__vccOpts || e;
|
|
1333
|
-
for (const [
|
|
1334
|
-
d[
|
|
1360
|
+
for (const [u, v] of a)
|
|
1361
|
+
d[u] = v;
|
|
1335
1362
|
return d;
|
|
1336
1363
|
};
|
|
1337
|
-
function
|
|
1338
|
-
const
|
|
1339
|
-
return
|
|
1364
|
+
function dt(e, a, d, u, v, g) {
|
|
1365
|
+
const c = de("qt-na-checkbox");
|
|
1366
|
+
return x(), Z("div", {
|
|
1340
1367
|
class: "na-radio-group",
|
|
1341
1368
|
style: fe(e.groupStyle)
|
|
1342
1369
|
}, [
|
|
1343
|
-
(
|
|
1344
|
-
key:
|
|
1370
|
+
(x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
|
|
1371
|
+
key: h,
|
|
1345
1372
|
type: "radio",
|
|
1346
|
-
checked: e.modelValue ===
|
|
1347
|
-
text:
|
|
1373
|
+
checked: e.modelValue === s.value,
|
|
1374
|
+
text: s.label,
|
|
1348
1375
|
gravity: e.gravity,
|
|
1349
1376
|
showBackground: e.showBackground,
|
|
1350
|
-
disabled:
|
|
1351
|
-
}, { ref_for: !0 },
|
|
1352
|
-
style: e.getItemStyle(
|
|
1353
|
-
onClick: (
|
|
1377
|
+
disabled: s.disabled
|
|
1378
|
+
}, { ref_for: !0 }, s.props, {
|
|
1379
|
+
style: e.getItemStyle(s, h),
|
|
1380
|
+
onClick: (l) => e.onItemClick(s)
|
|
1354
1381
|
}), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
|
|
1355
1382
|
], 4);
|
|
1356
1383
|
}
|
|
1357
|
-
const
|
|
1384
|
+
const Te = /* @__PURE__ */ ge(ut, [["render", dt], ["__scopeId", "data-v-448252ff"]]), ft = {
|
|
1358
1385
|
install: (e) => {
|
|
1359
|
-
e.component("NaRadioGroup",
|
|
1386
|
+
e.component("NaRadioGroup", Te), e.component("qt-na-radio-group", Te);
|
|
1360
1387
|
}
|
|
1361
|
-
},
|
|
1388
|
+
}, gt = $({
|
|
1362
1389
|
name: "NaCheckboxGroup",
|
|
1363
1390
|
props: {
|
|
1364
1391
|
modelValue: {
|
|
@@ -1395,52 +1422,55 @@ const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252f
|
|
|
1395
1422
|
}
|
|
1396
1423
|
},
|
|
1397
1424
|
emits: ["update:modelValue", "change"],
|
|
1398
|
-
setup(e, { emit:
|
|
1425
|
+
setup(e, { emit: a }) {
|
|
1399
1426
|
return {
|
|
1400
|
-
groupStyle:
|
|
1427
|
+
groupStyle: j(() => ({
|
|
1401
1428
|
display: "flex",
|
|
1402
1429
|
flexDirection: e.direction,
|
|
1403
1430
|
alignItems: "center"
|
|
1404
1431
|
})),
|
|
1405
|
-
getItemStyle: (
|
|
1406
|
-
var
|
|
1407
|
-
const
|
|
1408
|
-
return e.itemWidth !== void 0 && (
|
|
1432
|
+
getItemStyle: (g, c) => {
|
|
1433
|
+
var h;
|
|
1434
|
+
const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
|
|
1435
|
+
return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
|
|
1409
1436
|
},
|
|
1410
|
-
onItemClick: (
|
|
1411
|
-
if (
|
|
1437
|
+
onItemClick: (g) => {
|
|
1438
|
+
if (g.disabled)
|
|
1412
1439
|
return;
|
|
1413
|
-
const
|
|
1414
|
-
|
|
1440
|
+
const c = [...e.modelValue], s = c.indexOf(g.value);
|
|
1441
|
+
s > -1 ? c.splice(s, 1) : c.push(g.value), a("update:modelValue", c), a("change", c);
|
|
1415
1442
|
}
|
|
1416
1443
|
};
|
|
1417
1444
|
}
|
|
1418
1445
|
});
|
|
1419
|
-
function
|
|
1420
|
-
const
|
|
1421
|
-
return
|
|
1446
|
+
function vt(e, a, d, u, v, g) {
|
|
1447
|
+
const c = de("qt-na-checkbox");
|
|
1448
|
+
return x(), Z("div", {
|
|
1422
1449
|
class: "na-checkbox-group",
|
|
1423
1450
|
style: fe(e.groupStyle)
|
|
1424
1451
|
}, [
|
|
1425
|
-
(
|
|
1426
|
-
key:
|
|
1452
|
+
(x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
|
|
1453
|
+
key: h,
|
|
1427
1454
|
type: "checkbox",
|
|
1428
|
-
checked: e.modelValue.includes(
|
|
1429
|
-
text:
|
|
1455
|
+
checked: e.modelValue.includes(s.value),
|
|
1456
|
+
text: s.label,
|
|
1430
1457
|
gravity: e.gravity,
|
|
1431
1458
|
showBackground: e.showBackground,
|
|
1432
|
-
disabled:
|
|
1433
|
-
}, { ref_for: !0 },
|
|
1434
|
-
style: e.getItemStyle(
|
|
1435
|
-
onClick: (
|
|
1459
|
+
disabled: s.disabled
|
|
1460
|
+
}, { ref_for: !0 }, s.props, {
|
|
1461
|
+
style: e.getItemStyle(s, h),
|
|
1462
|
+
onClick: (l) => e.onItemClick(s)
|
|
1436
1463
|
}), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
|
|
1437
1464
|
], 4);
|
|
1438
1465
|
}
|
|
1439
|
-
const
|
|
1466
|
+
const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4eaa"]]), mt = {
|
|
1440
1467
|
install: (e) => {
|
|
1441
|
-
e.component("NaCheckboxGroup",
|
|
1468
|
+
e.component("NaCheckboxGroup", Ie), e.component("qt-na-checkbox-group", Ie);
|
|
1442
1469
|
}
|
|
1443
|
-
},
|
|
1470
|
+
}, bt = {
|
|
1471
|
+
inheritAttrs: !1
|
|
1472
|
+
}, Ne = /* @__PURE__ */ $({
|
|
1473
|
+
...bt,
|
|
1444
1474
|
__name: "NaSwitcher",
|
|
1445
1475
|
props: {
|
|
1446
1476
|
checked: { type: Boolean },
|
|
@@ -1457,17 +1487,17 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
|
|
|
1457
1487
|
stateTextSize: {}
|
|
1458
1488
|
},
|
|
1459
1489
|
emits: ["onCheckedChange"],
|
|
1460
|
-
setup(e, { expose:
|
|
1461
|
-
const d = A(),
|
|
1462
|
-
|
|
1463
|
-
|
|
1490
|
+
setup(e, { expose: a }) {
|
|
1491
|
+
const d = A(), u = L(), v = "QtNaSwitcher", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
|
|
1492
|
+
s,
|
|
1493
|
+
u.pluginPackageName || ""
|
|
1464
1494
|
);
|
|
1465
|
-
return
|
|
1495
|
+
return a({
|
|
1466
1496
|
getNativeNode: () => {
|
|
1467
|
-
var
|
|
1468
|
-
return ((
|
|
1497
|
+
var l, i;
|
|
1498
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
1469
1499
|
}
|
|
1470
|
-
}), (
|
|
1500
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
1471
1501
|
ref_key: "nativeRef",
|
|
1472
1502
|
ref: d,
|
|
1473
1503
|
checked: e.checked,
|
|
@@ -1482,43 +1512,43 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
|
|
|
1482
1512
|
titleTextSize: e.titleTextSize,
|
|
1483
1513
|
subtitleTextSize: e.subtitleTextSize,
|
|
1484
1514
|
stateTextSize: e.stateTextSize,
|
|
1485
|
-
onOnCheckedChange:
|
|
1486
|
-
},
|
|
1487
|
-
default:
|
|
1488
|
-
|
|
1515
|
+
onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
|
|
1516
|
+
}, l.$attrs), {
|
|
1517
|
+
default: Q(() => [
|
|
1518
|
+
D(l.$slots, "default")
|
|
1489
1519
|
]),
|
|
1490
1520
|
_: 3
|
|
1491
1521
|
}, 16, ["checked", "disabled", "title", "textOn", "textOff", "subtitle", "subtitleColor", "titleColor", "focusTitleColor", "titleTextSize", "subtitleTextSize", "stateTextSize"]));
|
|
1492
1522
|
}
|
|
1493
1523
|
});
|
|
1494
1524
|
let ce;
|
|
1495
|
-
var
|
|
1525
|
+
var Oe;
|
|
1496
1526
|
try {
|
|
1497
1527
|
const e = require("@extscreen/es3-vue");
|
|
1498
|
-
ce = e.registerElement || ((
|
|
1528
|
+
ce = e.registerElement || ((Oe = e.default) == null ? void 0 : Oe.registerElement);
|
|
1499
1529
|
} catch {
|
|
1500
1530
|
}
|
|
1501
|
-
const
|
|
1531
|
+
const yt = {
|
|
1502
1532
|
install: (e) => {
|
|
1503
1533
|
if (!globalThis.__QtNaSwitcher_registered)
|
|
1504
1534
|
if (ce) {
|
|
1505
|
-
const
|
|
1535
|
+
const a = (d, u) => {
|
|
1506
1536
|
ce(d, {
|
|
1507
1537
|
component: {
|
|
1508
|
-
name:
|
|
1509
|
-
processEventData(
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1538
|
+
name: u ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
|
|
1539
|
+
processEventData(v, g) {
|
|
1540
|
+
const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
|
|
1541
|
+
return c && (c.nativeEvent = s), c;
|
|
1512
1542
|
}
|
|
1513
1543
|
}
|
|
1514
1544
|
});
|
|
1515
1545
|
};
|
|
1516
|
-
|
|
1546
|
+
a("qt-na-switcher", !1), a("qt-na-switcher-plugin", !0), a("QtNaSwitcher", !1), a("QtNaSwitcher_Plugin", !0), globalThis.__QtNaSwitcher_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaSwitcher");
|
|
1517
1547
|
} else
|
|
1518
1548
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1519
|
-
e.component("NaSwitcher",
|
|
1549
|
+
e.component("NaSwitcher", Ne), e.component("qt-na-switcher", Ne);
|
|
1520
1550
|
}
|
|
1521
|
-
},
|
|
1551
|
+
}, ht = $({
|
|
1522
1552
|
name: "NaSettingSwitch",
|
|
1523
1553
|
props: {
|
|
1524
1554
|
title: {
|
|
@@ -1567,32 +1597,32 @@ const Ct = {
|
|
|
1567
1597
|
}
|
|
1568
1598
|
},
|
|
1569
1599
|
emits: ["update:modelValue", "change"],
|
|
1570
|
-
setup(e, { emit:
|
|
1571
|
-
const
|
|
1572
|
-
ee(() => e.modelValue, (
|
|
1573
|
-
|
|
1600
|
+
setup(e, { emit: a, attrs: d }) {
|
|
1601
|
+
const u = A(e.modelValue);
|
|
1602
|
+
ee(() => e.modelValue, (s) => {
|
|
1603
|
+
u.value = s;
|
|
1574
1604
|
});
|
|
1575
|
-
const
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1578
|
-
},
|
|
1579
|
-
const
|
|
1605
|
+
const v = (s) => {
|
|
1606
|
+
const h = s.checked;
|
|
1607
|
+
u.value = h, a("update:modelValue", h), a("change", h);
|
|
1608
|
+
}, g = j(() => typeof e.width == "number" ? `${e.width}px` : e.width), c = j(() => {
|
|
1609
|
+
const s = d.style || {}, h = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
|
|
1580
1610
|
return {
|
|
1581
|
-
width:
|
|
1582
|
-
height: typeof
|
|
1583
|
-
...
|
|
1611
|
+
width: g.value,
|
|
1612
|
+
height: typeof h == "number" ? `${h}px` : h,
|
|
1613
|
+
...s
|
|
1584
1614
|
};
|
|
1585
1615
|
});
|
|
1586
1616
|
return {
|
|
1587
|
-
checked:
|
|
1588
|
-
handleCheckedChange:
|
|
1589
|
-
mergedStyle:
|
|
1617
|
+
checked: u,
|
|
1618
|
+
handleCheckedChange: v,
|
|
1619
|
+
mergedStyle: c
|
|
1590
1620
|
};
|
|
1591
1621
|
}
|
|
1592
1622
|
});
|
|
1593
|
-
function
|
|
1594
|
-
const
|
|
1595
|
-
return
|
|
1623
|
+
function pt(e, a, d, u, v, g) {
|
|
1624
|
+
const c = de("qt-na-switcher");
|
|
1625
|
+
return x(), O(c, {
|
|
1596
1626
|
class: "na-setting-switch",
|
|
1597
1627
|
style: fe(e.mergedStyle),
|
|
1598
1628
|
title: e.title,
|
|
@@ -1607,119 +1637,16 @@ function It(e, i, d, s, f, v) {
|
|
|
1607
1637
|
onOnCheckedChange: e.handleCheckedChange
|
|
1608
1638
|
}, null, 8, ["style", "title", "subtitle", "checked", "textOn", "textOff", "titleTextSize", "subtitleTextSize", "stateTextSize", "disabled", "onOnCheckedChange"]);
|
|
1609
1639
|
}
|
|
1610
|
-
const
|
|
1640
|
+
const Pe = /* @__PURE__ */ ge(ht, [["render", pt]]), Ct = {
|
|
1611
1641
|
install(e) {
|
|
1612
|
-
e.component("NaSettingSwitch",
|
|
1613
|
-
}
|
|
1614
|
-
}, Qe = "QtNaInputView", Tt = /* @__PURE__ */ w({
|
|
1615
|
-
__name: "NaInputViewBase",
|
|
1616
|
-
props: {
|
|
1617
|
-
text: {},
|
|
1618
|
-
placeholder: {},
|
|
1619
|
-
type: {},
|
|
1620
|
-
status: {},
|
|
1621
|
-
disabled: { type: Boolean },
|
|
1622
|
-
inputSize: {},
|
|
1623
|
-
cursorVisible: { type: Boolean },
|
|
1624
|
-
useSystemKeyboard: { type: Boolean },
|
|
1625
|
-
trailingIcon: {}
|
|
1626
|
-
},
|
|
1627
|
-
emits: ["onInputClick", "onChange"],
|
|
1628
|
-
setup(e, { expose: i }) {
|
|
1629
|
-
const d = A(), s = _(), f = Qe + "_Plugin", l = (s.isPluginActive ? f : Qe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
|
|
1630
|
-
l,
|
|
1631
|
-
s.pluginPackageName || "com.quicktvui.plugin.extraui",
|
|
1632
|
-
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
1633
|
-
);
|
|
1634
|
-
return i({
|
|
1635
|
-
getNativeNode: () => {
|
|
1636
|
-
var a, u;
|
|
1637
|
-
return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
|
|
1638
|
-
}
|
|
1639
|
-
}), (a, u) => (P(), $(D(r), B({
|
|
1640
|
-
ref_key: "nativeRef",
|
|
1641
|
-
ref: d,
|
|
1642
|
-
text: e.text,
|
|
1643
|
-
placeholder: e.placeholder,
|
|
1644
|
-
type: e.type,
|
|
1645
|
-
status: e.status,
|
|
1646
|
-
disabled: e.disabled,
|
|
1647
|
-
inputSize: e.inputSize,
|
|
1648
|
-
cursorVisible: e.cursorVisible,
|
|
1649
|
-
useSystemKeyboard: e.useSystemKeyboard,
|
|
1650
|
-
trailingIcon: e.trailingIcon,
|
|
1651
|
-
onOnInputClick: u[0] || (u[0] = (g) => a.$emit("onInputClick", g.nativeEvent)),
|
|
1652
|
-
onOnChange: u[1] || (u[1] = (g) => a.$emit("onChange", g.nativeEvent))
|
|
1653
|
-
}, a.$attrs), {
|
|
1654
|
-
default: R(() => [
|
|
1655
|
-
F(a.$slots, "default")
|
|
1656
|
-
]),
|
|
1657
|
-
_: 3
|
|
1658
|
-
}, 16, ["text", "placeholder", "type", "status", "disabled", "inputSize", "cursorVisible", "useSystemKeyboard", "trailingIcon"]));
|
|
1642
|
+
e.component("NaSettingSwitch", Pe), e.component("qt-na-setting-switch", Pe);
|
|
1659
1643
|
}
|
|
1660
|
-
}
|
|
1661
|
-
__name: "NaInputView",
|
|
1662
|
-
props: {
|
|
1663
|
-
inputSize: { default: "medium" }
|
|
1664
|
-
},
|
|
1665
|
-
emits: ["onInputClick", "onChange"],
|
|
1666
|
-
setup(e, { emit: i }) {
|
|
1667
|
-
const d = i, s = e, f = W(() => {
|
|
1668
|
-
let r = 60;
|
|
1669
|
-
return s.inputSize === "large" ? r = 70 : s.inputSize === "small" && (r = 50), {
|
|
1670
|
-
height: `${r}px`
|
|
1671
|
-
};
|
|
1672
|
-
}), v = (r) => {
|
|
1673
|
-
d("onInputClick", r);
|
|
1674
|
-
}, l = (r) => {
|
|
1675
|
-
d("onChange", r);
|
|
1676
|
-
};
|
|
1677
|
-
return (r, a) => (P(), $(Tt, B(r.$attrs, {
|
|
1678
|
-
style: f.value,
|
|
1679
|
-
inputSize: e.inputSize,
|
|
1680
|
-
onOnInputClick: v,
|
|
1681
|
-
onOnChange: l
|
|
1682
|
-
}), {
|
|
1683
|
-
default: R(() => [
|
|
1684
|
-
F(r.$slots, "default")
|
|
1685
|
-
]),
|
|
1686
|
-
_: 3
|
|
1687
|
-
}, 16, ["style", "inputSize"]));
|
|
1688
|
-
}
|
|
1689
|
-
});
|
|
1690
|
-
let ue;
|
|
1691
|
-
var je;
|
|
1692
|
-
try {
|
|
1693
|
-
const e = require("@extscreen/es3-vue");
|
|
1694
|
-
ue = e.registerElement || ((je = e.default) == null ? void 0 : je.registerElement);
|
|
1695
|
-
} catch {
|
|
1696
|
-
}
|
|
1697
|
-
const Pt = {
|
|
1698
|
-
install: (e) => {
|
|
1699
|
-
if (!globalThis.__QtNaInputView_registered)
|
|
1700
|
-
if (ue) {
|
|
1701
|
-
const i = (d, s) => {
|
|
1702
|
-
ue(d, {
|
|
1703
|
-
component: {
|
|
1704
|
-
name: s ? "QtNaInputView_Plugin" : "QtNaInputView",
|
|
1705
|
-
processEventData(f, v) {
|
|
1706
|
-
const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
|
|
1707
|
-
return l && (l.nativeEvent = r), l;
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
});
|
|
1711
|
-
};
|
|
1712
|
-
i("qt-na-input-view", !1), i("qt-na-input-view-plugin", !0), i("QtNaInputView", !1), i("QtNaInputView_Plugin", !0), globalThis.__QtNaInputView_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaInputView");
|
|
1713
|
-
} else
|
|
1714
|
-
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1715
|
-
e.component("NaInputView", Re), e.component("qt-na-input-view", Re);
|
|
1716
|
-
}
|
|
1717
|
-
}, St = {
|
|
1644
|
+
}, kt = {
|
|
1718
1645
|
// 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
|
|
1719
1646
|
skipPluginCheck: !1
|
|
1720
1647
|
}, Y = /* @__PURE__ */ new Set();
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1648
|
+
function z(e, a, d) {
|
|
1649
|
+
return $({
|
|
1723
1650
|
name: `${e}AsyncWrapper`,
|
|
1724
1651
|
inheritAttrs: !1,
|
|
1725
1652
|
props: {
|
|
@@ -1729,206 +1656,206 @@ function L(e, i, d) {
|
|
|
1729
1656
|
default: !1
|
|
1730
1657
|
}
|
|
1731
1658
|
},
|
|
1732
|
-
setup(
|
|
1733
|
-
const
|
|
1734
|
-
|
|
1659
|
+
setup(u, { slots: v, attrs: g, expose: c }) {
|
|
1660
|
+
const s = A("loading"), h = A(""), l = A(), i = globalThis.__VUE_INSTANCE__;
|
|
1661
|
+
c({
|
|
1735
1662
|
getNativeNode: () => {
|
|
1736
|
-
let
|
|
1737
|
-
return !
|
|
1663
|
+
let C = l.value;
|
|
1664
|
+
return !C && i && i.vnode && i.vnode.el && (C = i.vnode.el, C.childNodes && C.childNodes.length > 0 && (C = C.childNodes[0])), C;
|
|
1738
1665
|
},
|
|
1739
|
-
nativeRef:
|
|
1666
|
+
nativeRef: l
|
|
1740
1667
|
});
|
|
1741
|
-
let
|
|
1668
|
+
let w = null, _ = null;
|
|
1742
1669
|
try {
|
|
1743
|
-
|
|
1744
|
-
} catch (
|
|
1745
|
-
console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。",
|
|
1670
|
+
w = Fe(), _ = Ve();
|
|
1671
|
+
} catch (C) {
|
|
1672
|
+
console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", C);
|
|
1746
1673
|
}
|
|
1747
1674
|
const J = async () => {
|
|
1748
|
-
if (!
|
|
1675
|
+
if (!w || typeof w.isComponentRegistered != "function")
|
|
1749
1676
|
return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
|
|
1750
1677
|
try {
|
|
1751
|
-
const
|
|
1752
|
-
if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`,
|
|
1678
|
+
const C = await w.isComponentRegistered(e);
|
|
1679
|
+
if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`, C), C === !0 || C && typeof C == "object" && (C.registered === !0 || C.isRegistered === !0))
|
|
1753
1680
|
return !0;
|
|
1754
1681
|
try {
|
|
1755
|
-
const
|
|
1756
|
-
if (
|
|
1757
|
-
const
|
|
1758
|
-
console.log(`[withAsyncPlugin] 当前引擎核心版本: ${
|
|
1759
|
-
const
|
|
1760
|
-
if (
|
|
1761
|
-
if (
|
|
1682
|
+
const T = await I.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
|
|
1683
|
+
if (T && T.core_version) {
|
|
1684
|
+
const P = T.core_version;
|
|
1685
|
+
console.log(`[withAsyncPlugin] 当前引擎核心版本: ${P}`);
|
|
1686
|
+
const S = P.split(".").map((B) => parseInt(B, 10));
|
|
1687
|
+
if (S.length >= 3 && !isNaN(S[0]) && !isNaN(S[1]) && !isNaN(S[2]))
|
|
1688
|
+
if (S[0] * 1e6 + S[1] * 1e3 + S[2] >= 1011205) {
|
|
1762
1689
|
console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${e}`);
|
|
1763
|
-
const
|
|
1764
|
-
console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${
|
|
1765
|
-
const [
|
|
1766
|
-
|
|
1767
|
-
|
|
1690
|
+
const N = e.split("-").map((E) => E.charAt(0).toUpperCase() + E.slice(1)).join("");
|
|
1691
|
+
console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${N}`);
|
|
1692
|
+
const [G, R] = await Promise.all([
|
|
1693
|
+
I.callNativeWithPromise("ExtendModule", "isComponentRegistered", e).catch(() => !1),
|
|
1694
|
+
I.callNativeWithPromise("ExtendModule", "isComponentRegistered", N).catch(() => !1)
|
|
1768
1695
|
]);
|
|
1769
|
-
if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${
|
|
1696
|
+
if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${G}, ${R}]`), G === !0 || R === !0)
|
|
1770
1697
|
return !0;
|
|
1771
1698
|
} else
|
|
1772
|
-
console.log(`[withAsyncPlugin] 引擎版本 ${
|
|
1699
|
+
console.log(`[withAsyncPlugin] 引擎版本 ${P} < 1.11.205,跳过 ExtendModule 检查`);
|
|
1773
1700
|
else
|
|
1774
|
-
console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${
|
|
1701
|
+
console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${P}`);
|
|
1775
1702
|
}
|
|
1776
|
-
} catch (
|
|
1777
|
-
console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:",
|
|
1703
|
+
} catch (T) {
|
|
1704
|
+
console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", T);
|
|
1778
1705
|
}
|
|
1779
1706
|
return !1;
|
|
1780
|
-
} catch (
|
|
1781
|
-
return console.warn("[withAsyncPlugin] 检查组件注册状态异常:",
|
|
1707
|
+
} catch (C) {
|
|
1708
|
+
return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", C), !1;
|
|
1782
1709
|
}
|
|
1783
1710
|
}, U = async () => {
|
|
1784
|
-
if (
|
|
1785
|
-
console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`),
|
|
1711
|
+
if (kt.skipPluginCheck || u.skipPluginCheck) {
|
|
1712
|
+
console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), s.value = "ready";
|
|
1786
1713
|
return;
|
|
1787
1714
|
}
|
|
1788
|
-
if (!
|
|
1789
|
-
|
|
1715
|
+
if (!a) {
|
|
1716
|
+
s.value = "ready";
|
|
1790
1717
|
return;
|
|
1791
1718
|
}
|
|
1792
|
-
const
|
|
1793
|
-
if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`,
|
|
1794
|
-
|
|
1719
|
+
const C = await J();
|
|
1720
|
+
if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, C), C || Y.has(a)) {
|
|
1721
|
+
s.value = "ready", Y.add(a), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
|
|
1795
1722
|
return;
|
|
1796
1723
|
}
|
|
1797
|
-
if (!
|
|
1798
|
-
console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`),
|
|
1724
|
+
if (!_) {
|
|
1725
|
+
console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), s.value = "ready";
|
|
1799
1726
|
return;
|
|
1800
1727
|
}
|
|
1801
|
-
console.log(`[withAsyncPlugin] 开始动态安装插件: ${
|
|
1728
|
+
console.log(`[withAsyncPlugin] 开始动态安装插件: ${a}`);
|
|
1802
1729
|
try {
|
|
1803
|
-
await new Promise((
|
|
1804
|
-
let
|
|
1805
|
-
const
|
|
1806
|
-
onPluginInstallSuccess(
|
|
1807
|
-
|
|
1730
|
+
await new Promise((T, P) => {
|
|
1731
|
+
let S;
|
|
1732
|
+
const B = {
|
|
1733
|
+
onPluginInstallSuccess(N, G, R) {
|
|
1734
|
+
N === a && (clearTimeout(S), _.removeListener(B), console.log(`[withAsyncPlugin] 安装成功 pkg=${N} 状态码=${G}`), G == 1003 || G == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), I.callNative("EsNativeModule", "callReflect", {
|
|
1808
1735
|
entry: {
|
|
1809
1736
|
from: d,
|
|
1810
1737
|
method: "setup"
|
|
1811
1738
|
}
|
|
1812
|
-
})) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"),
|
|
1739
|
+
})) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), T()) : P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
|
|
1813
1740
|
},
|
|
1814
|
-
onPluginInstallError(
|
|
1815
|
-
|
|
1741
|
+
onPluginInstallError(N, G, R) {
|
|
1742
|
+
N === a && (clearTimeout(S), _.removeListener(B), P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
|
|
1816
1743
|
}
|
|
1817
1744
|
};
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
}, 8e3), typeof
|
|
1821
|
-
}), await
|
|
1822
|
-
} catch (
|
|
1823
|
-
console.error("[withAsyncPlugin] 插件加载失败:",
|
|
1745
|
+
_.addListener({ pkg: a }, B), S = setTimeout(() => {
|
|
1746
|
+
_.removeListener(B), P(new Error(`插件安装超时: ${a}`));
|
|
1747
|
+
}, 8e3), typeof _.installPlugin == "function" ? _.installPlugin({ pkg: a }) : typeof _.install == "function" ? _.install(a) : P(new Error("当前运行时不支持 install / installPlugin"));
|
|
1748
|
+
}), await ze(), Y.add(a), s.value = "ready";
|
|
1749
|
+
} catch (T) {
|
|
1750
|
+
console.error("[withAsyncPlugin] 插件加载失败:", T), h.value = (T == null ? void 0 : T.message) || String(T), s.value = "error";
|
|
1824
1751
|
}
|
|
1825
1752
|
};
|
|
1826
|
-
return
|
|
1753
|
+
return Me(() => {
|
|
1827
1754
|
U();
|
|
1828
1755
|
}), () => {
|
|
1829
|
-
const
|
|
1756
|
+
const C = {
|
|
1830
1757
|
display: "flex",
|
|
1831
1758
|
flexDirection: "column",
|
|
1832
1759
|
justifyContent: "center",
|
|
1833
1760
|
alignItems: "center",
|
|
1834
|
-
...
|
|
1761
|
+
...g.style || {}
|
|
1835
1762
|
};
|
|
1836
|
-
|
|
1837
|
-
const
|
|
1838
|
-
class:
|
|
1839
|
-
style:
|
|
1763
|
+
g.width !== void 0 && !C.width && (C.width = typeof g.width == "number" ? `${g.width}px` : g.width), g.height !== void 0 && !C.height && (C.height = typeof g.height == "number" ? `${g.height}px` : g.height);
|
|
1764
|
+
const T = g.class ? `qt-plugin-container ${g.class}` : "qt-plugin-container", P = {
|
|
1765
|
+
class: T,
|
|
1766
|
+
style: C,
|
|
1840
1767
|
// 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
|
|
1841
1768
|
clipChildren: !1,
|
|
1842
1769
|
clipPadding: !1,
|
|
1843
1770
|
clipToPadding: !1
|
|
1844
1771
|
};
|
|
1845
|
-
if (
|
|
1846
|
-
return H("div",
|
|
1772
|
+
if (s.value === "loading")
|
|
1773
|
+
return H("div", P, [
|
|
1847
1774
|
H("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
|
|
1848
1775
|
]);
|
|
1849
|
-
if (
|
|
1850
|
-
return H("div",
|
|
1851
|
-
H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${
|
|
1776
|
+
if (s.value === "error")
|
|
1777
|
+
return H("div", P, [
|
|
1778
|
+
H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${h.value}`)
|
|
1852
1779
|
]);
|
|
1853
|
-
const
|
|
1854
|
-
for (const [
|
|
1855
|
-
if (
|
|
1856
|
-
let
|
|
1857
|
-
|
|
1858
|
-
} else if (
|
|
1859
|
-
let
|
|
1860
|
-
|
|
1780
|
+
const S = {}, B = {};
|
|
1781
|
+
for (const [E, V] of Object.entries(g))
|
|
1782
|
+
if (E.startsWith("on") && typeof V == "function") {
|
|
1783
|
+
let W = E;
|
|
1784
|
+
E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
|
|
1785
|
+
} else if (E.startsWith("on") && Array.isArray(V)) {
|
|
1786
|
+
let W = E;
|
|
1787
|
+
E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
|
|
1861
1788
|
} else
|
|
1862
|
-
|
|
1863
|
-
const
|
|
1864
|
-
...
|
|
1865
|
-
...
|
|
1866
|
-
class:
|
|
1789
|
+
E.startsWith("onOn") || (S[E] = V);
|
|
1790
|
+
const N = {
|
|
1791
|
+
...S,
|
|
1792
|
+
...B,
|
|
1793
|
+
class: T,
|
|
1867
1794
|
// 把外层 class 传给内部
|
|
1868
|
-
style:
|
|
1795
|
+
style: C,
|
|
1869
1796
|
// 把外层 style 传给内部
|
|
1870
|
-
ref: (
|
|
1871
|
-
|
|
1797
|
+
ref: (E) => {
|
|
1798
|
+
l.value = E;
|
|
1872
1799
|
}
|
|
1873
|
-
},
|
|
1874
|
-
return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(
|
|
1800
|
+
}, G = N.tabsData || "", R = N.actionPayload || "";
|
|
1801
|
+
return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(N), "tabsData.length=", G.length, "actionPayload.length=", R.length), H(e, N, v.default ? v.default() : []);
|
|
1875
1802
|
};
|
|
1876
1803
|
}
|
|
1877
1804
|
});
|
|
1878
1805
|
}
|
|
1879
|
-
const
|
|
1806
|
+
const Re = Symbol("AddonEnvContext"), Qe = {
|
|
1880
1807
|
isPluginActive: !1,
|
|
1881
1808
|
nameSuffix: "",
|
|
1882
1809
|
pluginPackageName: "com.quicktvui.plugin.glintui",
|
|
1883
1810
|
builtInVersions: {}
|
|
1884
1811
|
};
|
|
1885
|
-
async function
|
|
1886
|
-
const d =
|
|
1887
|
-
let
|
|
1812
|
+
async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
|
|
1813
|
+
const d = Fe();
|
|
1814
|
+
let u = {};
|
|
1888
1815
|
try {
|
|
1889
|
-
const
|
|
1890
|
-
|
|
1891
|
-
} catch (
|
|
1892
|
-
console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule",
|
|
1816
|
+
const h = await I.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
|
|
1817
|
+
h && typeof h == "object" && (u = h);
|
|
1818
|
+
} catch (h) {
|
|
1819
|
+
console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", h);
|
|
1893
1820
|
}
|
|
1894
|
-
const
|
|
1895
|
-
isPluginActive:
|
|
1896
|
-
nameSuffix:
|
|
1821
|
+
const v = `QtGridTabs${a}`, g = d.isComponentRegistered(v), c = g instanceof Promise ? await g : g, s = {
|
|
1822
|
+
isPluginActive: c,
|
|
1823
|
+
nameSuffix: c ? a : "",
|
|
1897
1824
|
// 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
|
|
1898
|
-
pluginPackageName:
|
|
1899
|
-
builtInVersions:
|
|
1825
|
+
pluginPackageName: c ? `${e}.ext` : e,
|
|
1826
|
+
builtInVersions: u
|
|
1900
1827
|
};
|
|
1901
|
-
return console.info("[AddonProvider] Environment initialized:",
|
|
1828
|
+
return console.info("[AddonProvider] Environment initialized:", s), s;
|
|
1902
1829
|
}
|
|
1903
|
-
let
|
|
1904
|
-
function
|
|
1905
|
-
|
|
1830
|
+
let ue = A(Qe);
|
|
1831
|
+
function Dt(e) {
|
|
1832
|
+
ue.value = e, Le(Re, ue);
|
|
1906
1833
|
}
|
|
1907
|
-
function
|
|
1834
|
+
function L() {
|
|
1908
1835
|
var e;
|
|
1909
|
-
return ((e =
|
|
1836
|
+
return ((e = Ue(Re, ue)) == null ? void 0 : e.value) || Qe;
|
|
1910
1837
|
}
|
|
1911
|
-
async function
|
|
1838
|
+
async function Tt(e) {
|
|
1912
1839
|
console.log("[AddonProvider] Sending GridTabs global config to Native:", e);
|
|
1913
1840
|
try {
|
|
1914
|
-
const
|
|
1915
|
-
return console.log("[AddonProvider] Received response from Native:",
|
|
1916
|
-
} catch (
|
|
1917
|
-
return console.error("[AddonProvider] Failed to initialize GridTabs global config:",
|
|
1841
|
+
const a = await I.callNativeWithPromise("GridTabsConfigModule", "setDefaultConfig", JSON.stringify(e));
|
|
1842
|
+
return console.log("[AddonProvider] Received response from Native:", a), !!(a && a.success);
|
|
1843
|
+
} catch (a) {
|
|
1844
|
+
return console.error("[AddonProvider] Failed to initialize GridTabs global config:", a), !1;
|
|
1918
1845
|
}
|
|
1919
1846
|
}
|
|
1920
|
-
async function
|
|
1847
|
+
async function It(e) {
|
|
1921
1848
|
console.log("[AddonProvider] Sending ExtraUI global theme config to Native:", e);
|
|
1922
1849
|
try {
|
|
1923
|
-
const
|
|
1924
|
-
return console.log("[AddonProvider] Received ExtraUI theme response from Native:",
|
|
1925
|
-
} catch (
|
|
1926
|
-
return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:",
|
|
1850
|
+
const a = await I.callNativeWithPromise("ExtraUIConfigModule", "setThemeConfig", JSON.stringify(e));
|
|
1851
|
+
return console.log("[AddonProvider] Received ExtraUI theme response from Native:", a), !!(a && a.success);
|
|
1852
|
+
} catch (a) {
|
|
1853
|
+
return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:", a), !1;
|
|
1927
1854
|
}
|
|
1928
1855
|
}
|
|
1929
|
-
async function
|
|
1856
|
+
async function Mt(e) {
|
|
1930
1857
|
console.log("[AddonProvider] Initializing global theme across all modules:", e);
|
|
1931
|
-
const
|
|
1858
|
+
const a = await It(e), d = await Tt({
|
|
1932
1859
|
themeConfig: {
|
|
1933
1860
|
placeholderColor: e.placeholderColor,
|
|
1934
1861
|
glowColor: e.glowColor || e.focusBackgroundColor,
|
|
@@ -1947,50 +1874,48 @@ async function Wt(e) {
|
|
|
1947
1874
|
// 更多属性映射根据后续 Glint/GridTabs 支持情况添加
|
|
1948
1875
|
}
|
|
1949
1876
|
});
|
|
1950
|
-
return
|
|
1877
|
+
return a && d;
|
|
1951
1878
|
}
|
|
1952
|
-
const
|
|
1879
|
+
const zt = {
|
|
1953
1880
|
install: (e) => {
|
|
1954
|
-
e.use(
|
|
1881
|
+
e.use(je), e.use(He), e.use(Ze), e.use(Ye), e.use(tt), e.use(nt), e.use(rt), e.use(ct), e.use(ft), e.use(mt), e.use(yt), e.use(Ct);
|
|
1955
1882
|
}
|
|
1956
1883
|
};
|
|
1957
1884
|
export {
|
|
1958
|
-
|
|
1885
|
+
Re as ADDON_ENV_CONTEXT_KEY,
|
|
1959
1886
|
X as GridTabs,
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
_t as useGridTabs,
|
|
1995
|
-
L as withAsyncPlugin
|
|
1887
|
+
je as GridTabsPlugin,
|
|
1888
|
+
he as HsvBackground,
|
|
1889
|
+
tt as HsvBackgroundPlugin,
|
|
1890
|
+
me as Keyboard,
|
|
1891
|
+
He as KeyboardPlugin,
|
|
1892
|
+
Ce as NaButton,
|
|
1893
|
+
rt as NaButtonPlugin,
|
|
1894
|
+
ke as NaCheckbox,
|
|
1895
|
+
Ie as NaCheckboxGroup,
|
|
1896
|
+
mt as NaCheckboxGroupPlugin,
|
|
1897
|
+
ct as NaCheckboxPlugin,
|
|
1898
|
+
Te as NaRadioGroup,
|
|
1899
|
+
ft as NaRadioGroupPlugin,
|
|
1900
|
+
Pe as NaSettingSwitch,
|
|
1901
|
+
Ct as NaSettingSwitchPlugin,
|
|
1902
|
+
Ne as NaSwitcher,
|
|
1903
|
+
yt as NaSwitcherPlugin,
|
|
1904
|
+
ye as PortalItem,
|
|
1905
|
+
Ye as PortalItemPlugin,
|
|
1906
|
+
be as PortalPool,
|
|
1907
|
+
Ze as PortalPoolPlugin,
|
|
1908
|
+
zt as QuickTVUINAddons,
|
|
1909
|
+
kt as QuickTVUINAddonsConfig,
|
|
1910
|
+
pe as SvgImage,
|
|
1911
|
+
nt as SvgImagePlugin,
|
|
1912
|
+
zt as default,
|
|
1913
|
+
Qt as initAddonEnv,
|
|
1914
|
+
It as initExtraUIGlobalTheme,
|
|
1915
|
+
Mt as initGlobalTheme,
|
|
1916
|
+
Tt as initGridTabsGlobalConfig,
|
|
1917
|
+
Dt as provideAddonEnv,
|
|
1918
|
+
L as useAddonEnv,
|
|
1919
|
+
Rt as useGridTabs,
|
|
1920
|
+
z as withAsyncPlugin
|
|
1996
1921
|
};
|