@quicktvui/naddons 1.0.0-rc.2 → 1.0.0-rc.4
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/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,199 +13,199 @@ 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
|
|
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
|
-
ref:
|
|
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
|
|
92
|
-
te(
|
|
94
|
+
const a = (d, u) => {
|
|
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
|
|
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;
|
|
132
135
|
return o.tabId || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`, o), n = !1), (o.title === void 0 || o.title === null) && console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${t}): Tab 缺失 'title' 字段 (tabId: ${o.tabId || "未知"}),导航栏可能显示为空。`, o), n;
|
|
133
|
-
},
|
|
136
|
+
}, J = (o, t) => {
|
|
134
137
|
if (!o || o.length === 0)
|
|
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
|
-
if (
|
|
199
|
-
console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${
|
|
201
|
+
if (d.value === "")
|
|
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,13 +215,13 @@ 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
|
|
@@ -226,9 +229,9 @@ function _t(e, i) {
|
|
|
226
229
|
}
|
|
227
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
|
|
@@ -238,131 +241,131 @@ function _t(e, i) {
|
|
|
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
|
-
|
|
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 }),
|
|
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
|
-
|
|
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 = P(o,
|
|
332
|
-
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }),
|
|
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
|
-
|
|
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 =
|
|
348
|
-
tabsData:
|
|
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(() => ({
|
|
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,230 +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
|
-
|
|
428
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
429
|
+
if (r && typeof r.clickPayload == "string")
|
|
430
|
+
try {
|
|
431
|
+
r.clickPayload = JSON.parse(r.clickPayload);
|
|
432
|
+
} catch (m) {
|
|
433
|
+
console.warn("Failed to parse clickPayload:", m);
|
|
434
|
+
}
|
|
435
|
+
if (r && typeof r.focusPayload == "string")
|
|
436
|
+
try {
|
|
437
|
+
r.focusPayload = JSON.parse(r.focusPayload);
|
|
438
|
+
} catch (m) {
|
|
439
|
+
console.warn("Failed to parse focusPayload:", m);
|
|
440
|
+
}
|
|
441
|
+
f.value.onItemClick(r);
|
|
427
442
|
} catch (n) {
|
|
428
|
-
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);
|
|
429
444
|
}
|
|
430
445
|
else
|
|
431
446
|
console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!");
|
|
432
447
|
},
|
|
433
448
|
onItemLongClick: (...o) => {
|
|
434
449
|
let t = o[0];
|
|
435
|
-
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)
|
|
436
451
|
try {
|
|
437
452
|
let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
|
|
438
|
-
const
|
|
439
|
-
|
|
453
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
454
|
+
if (r && typeof r.clickPayload == "string")
|
|
455
|
+
try {
|
|
456
|
+
r.clickPayload = JSON.parse(r.clickPayload);
|
|
457
|
+
} catch {
|
|
458
|
+
}
|
|
459
|
+
if (r && typeof r.focusPayload == "string")
|
|
460
|
+
try {
|
|
461
|
+
r.focusPayload = JSON.parse(r.focusPayload);
|
|
462
|
+
} catch {
|
|
463
|
+
}
|
|
464
|
+
f.value.onItemLongClick(r);
|
|
440
465
|
} catch (n) {
|
|
441
|
-
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);
|
|
442
467
|
}
|
|
443
468
|
},
|
|
444
469
|
onItemFocused: (...o) => {
|
|
445
470
|
let t = o[0];
|
|
446
|
-
if (t && t.nativeEvent && (t = t.nativeEvent),
|
|
471
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemFocused)
|
|
447
472
|
try {
|
|
448
473
|
let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
|
|
449
|
-
const
|
|
450
|
-
|
|
474
|
+
const r = typeof n == "string" ? JSON.parse(n) : n;
|
|
475
|
+
if (r && typeof r.clickPayload == "string")
|
|
476
|
+
try {
|
|
477
|
+
r.clickPayload = JSON.parse(r.clickPayload);
|
|
478
|
+
} catch {
|
|
479
|
+
}
|
|
480
|
+
if (r && typeof r.focusPayload == "string")
|
|
481
|
+
try {
|
|
482
|
+
r.focusPayload = JSON.parse(r.focusPayload);
|
|
483
|
+
} catch {
|
|
484
|
+
}
|
|
485
|
+
f.value.onItemFocused(r);
|
|
451
486
|
} catch (n) {
|
|
452
|
-
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);
|
|
453
488
|
}
|
|
454
489
|
},
|
|
455
490
|
onTabFocused: (...o) => {
|
|
456
491
|
let t = o[0];
|
|
457
|
-
t && t.nativeEvent && (t = t.nativeEvent),
|
|
492
|
+
t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabFocused && f.value.onTabFocused(t);
|
|
458
493
|
},
|
|
459
494
|
onScroll: (...o) => {
|
|
460
495
|
let t = o[0];
|
|
461
|
-
if (t && t.nativeEvent && (t = t.nativeEvent),
|
|
496
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScroll)
|
|
462
497
|
try {
|
|
463
498
|
const n = (t == null ? void 0 : t.data) || t;
|
|
464
|
-
|
|
499
|
+
f.value.onScroll(n);
|
|
465
500
|
} catch {
|
|
466
|
-
|
|
501
|
+
f.value.onScroll(t);
|
|
467
502
|
}
|
|
468
503
|
},
|
|
469
504
|
onScrollStateChanged: (...o) => {
|
|
470
505
|
let t = o[0];
|
|
471
|
-
if (t && t.nativeEvent && (t = t.nativeEvent),
|
|
506
|
+
if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScrollStateChanged)
|
|
472
507
|
try {
|
|
473
508
|
const n = (t == null ? void 0 : t.data) || t;
|
|
474
|
-
|
|
509
|
+
f.value.onScrollStateChanged(n);
|
|
475
510
|
} catch {
|
|
476
|
-
|
|
511
|
+
f.value.onScrollStateChanged(t);
|
|
477
512
|
}
|
|
478
513
|
}
|
|
479
514
|
}));
|
|
480
515
|
return {
|
|
481
|
-
tabsDataStr:
|
|
516
|
+
tabsDataStr: d,
|
|
482
517
|
bindings: V,
|
|
483
|
-
tabs:
|
|
484
|
-
items:
|
|
485
|
-
initData:
|
|
486
|
-
setCallbacks:
|
|
518
|
+
tabs: v,
|
|
519
|
+
items: g,
|
|
520
|
+
initData: R,
|
|
521
|
+
setCallbacks: E,
|
|
487
522
|
updateItem: (o, t) => {
|
|
488
|
-
if (!
|
|
523
|
+
if (!s) {
|
|
489
524
|
console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
|
|
490
525
|
return;
|
|
491
526
|
}
|
|
492
|
-
|
|
527
|
+
p({ op: "UPDATE_ITEM", itemId: o, payload: t }), i = !0;
|
|
493
528
|
try {
|
|
494
|
-
if (
|
|
495
|
-
const n =
|
|
529
|
+
if (c) {
|
|
530
|
+
const n = g.value.find((r) => r.id === o);
|
|
496
531
|
n && Object.assign(n, t);
|
|
497
532
|
} else
|
|
498
|
-
for (const n of
|
|
533
|
+
for (const n of v.value)
|
|
499
534
|
if (n.items) {
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
Object.assign(
|
|
535
|
+
const r = n.items.find((m) => m.id === o);
|
|
536
|
+
if (r) {
|
|
537
|
+
Object.assign(r, t);
|
|
503
538
|
break;
|
|
504
539
|
}
|
|
505
540
|
}
|
|
506
541
|
} finally {
|
|
507
|
-
|
|
542
|
+
i = !1;
|
|
508
543
|
}
|
|
509
544
|
},
|
|
510
545
|
deleteItem: (o, t = !0) => {
|
|
511
|
-
if (
|
|
512
|
-
|
|
546
|
+
if (s) {
|
|
547
|
+
p({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), i = !0;
|
|
513
548
|
try {
|
|
514
|
-
if (
|
|
515
|
-
const n =
|
|
516
|
-
n !== -1 &&
|
|
549
|
+
if (c) {
|
|
550
|
+
const n = g.value.findIndex((r) => r.id === o);
|
|
551
|
+
n !== -1 && g.value.splice(n, 1);
|
|
517
552
|
} else
|
|
518
|
-
for (const n of
|
|
553
|
+
for (const n of v.value)
|
|
519
554
|
if (n.items) {
|
|
520
|
-
const
|
|
521
|
-
if (
|
|
522
|
-
n.items.splice(
|
|
555
|
+
const r = n.items.findIndex((m) => m.id === o);
|
|
556
|
+
if (r !== -1) {
|
|
557
|
+
n.items.splice(r, 1);
|
|
523
558
|
break;
|
|
524
559
|
}
|
|
525
560
|
}
|
|
526
561
|
} finally {
|
|
527
|
-
|
|
562
|
+
i = !1;
|
|
528
563
|
}
|
|
529
564
|
}
|
|
530
565
|
},
|
|
531
566
|
prependItems: (o, t) => {
|
|
532
|
-
if (
|
|
533
|
-
|
|
567
|
+
if (s) {
|
|
568
|
+
p({
|
|
534
569
|
op: "PREPEND_SUB_ITEMS",
|
|
535
570
|
itemId: o,
|
|
536
571
|
payload: { subItems: t }
|
|
537
|
-
}),
|
|
572
|
+
}), i = !0;
|
|
538
573
|
try {
|
|
539
|
-
if (
|
|
540
|
-
|
|
574
|
+
if (c)
|
|
575
|
+
g.value.unshift(...t);
|
|
541
576
|
else {
|
|
542
|
-
const n =
|
|
577
|
+
const n = v.value.find((r) => r.tabId === o);
|
|
543
578
|
n && n.items && n.items.unshift(...t);
|
|
544
579
|
}
|
|
545
580
|
} finally {
|
|
546
|
-
|
|
581
|
+
i = !1;
|
|
547
582
|
}
|
|
548
583
|
}
|
|
549
584
|
},
|
|
550
585
|
clearItems: (o) => {
|
|
551
|
-
if (
|
|
552
|
-
|
|
586
|
+
if (s) {
|
|
587
|
+
p({
|
|
553
588
|
op: "CLEAR_SUB_ITEMS",
|
|
554
589
|
itemId: o
|
|
555
|
-
}),
|
|
590
|
+
}), i = !0;
|
|
556
591
|
try {
|
|
557
|
-
if (
|
|
558
|
-
|
|
592
|
+
if (c)
|
|
593
|
+
g.value.splice(0, g.value.length);
|
|
559
594
|
else {
|
|
560
|
-
const t =
|
|
595
|
+
const t = v.value.find((n) => n.tabId === o);
|
|
561
596
|
t && t.items && t.items.splice(0, t.items.length);
|
|
562
597
|
}
|
|
563
598
|
} finally {
|
|
564
|
-
|
|
599
|
+
i = !1;
|
|
565
600
|
}
|
|
566
601
|
}
|
|
567
602
|
},
|
|
568
603
|
moveItem: (o, t, n) => {
|
|
569
|
-
if (
|
|
570
|
-
|
|
604
|
+
if (s) {
|
|
605
|
+
p({
|
|
571
606
|
op: "MOVE_ITEM",
|
|
572
607
|
itemId: o,
|
|
573
608
|
payload: { targetPosition: t, anchorItemId: n }
|
|
574
|
-
}),
|
|
609
|
+
}), i = !0;
|
|
575
610
|
try {
|
|
576
|
-
const
|
|
611
|
+
const r = (m) => {
|
|
577
612
|
const y = m.findIndex((k) => k.id === o), b = m.findIndex((k) => k.id === n);
|
|
578
613
|
if (y !== -1 && b !== -1) {
|
|
579
|
-
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;
|
|
580
615
|
m.splice(K, 0, k);
|
|
581
616
|
}
|
|
582
617
|
};
|
|
583
|
-
if (
|
|
584
|
-
g
|
|
618
|
+
if (c)
|
|
619
|
+
r(g.value);
|
|
585
620
|
else
|
|
586
|
-
for (const m of
|
|
587
|
-
m.items &&
|
|
621
|
+
for (const m of v.value)
|
|
622
|
+
m.items && r(m.items);
|
|
588
623
|
} finally {
|
|
589
|
-
|
|
624
|
+
i = !1;
|
|
590
625
|
}
|
|
591
626
|
}
|
|
592
627
|
},
|
|
593
628
|
replaceItem: (o, t) => {
|
|
594
|
-
if (
|
|
595
|
-
|
|
629
|
+
if (s) {
|
|
630
|
+
p({
|
|
596
631
|
op: "REPLACE_ITEM",
|
|
597
632
|
itemId: o,
|
|
598
633
|
payload: t
|
|
599
|
-
}),
|
|
634
|
+
}), i = !0;
|
|
600
635
|
try {
|
|
601
|
-
if (
|
|
602
|
-
const n =
|
|
603
|
-
n !== -1 && (
|
|
636
|
+
if (c) {
|
|
637
|
+
const n = g.value.findIndex((r) => r.id === o);
|
|
638
|
+
n !== -1 && (g.value[n] = t);
|
|
604
639
|
} else
|
|
605
|
-
for (const n of
|
|
640
|
+
for (const n of v.value)
|
|
606
641
|
if (n.items) {
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
609
|
-
n.items[
|
|
642
|
+
const r = n.items.findIndex((m) => m.id === o);
|
|
643
|
+
if (r !== -1) {
|
|
644
|
+
n.items[r] = t;
|
|
610
645
|
break;
|
|
611
646
|
}
|
|
612
647
|
}
|
|
613
648
|
} finally {
|
|
614
|
-
|
|
649
|
+
i = !1;
|
|
615
650
|
}
|
|
616
651
|
}
|
|
617
652
|
},
|
|
618
|
-
dispatchAction:
|
|
619
|
-
resetInitialization:
|
|
653
|
+
dispatchAction: p,
|
|
654
|
+
resetInitialization: G,
|
|
620
655
|
getFocusState: async () => new Promise((o, t) => {
|
|
621
656
|
let n = e.value;
|
|
622
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);
|
|
623
|
-
const
|
|
658
|
+
const r = (m) => {
|
|
624
659
|
if (console.log("[useGridTabs] getFocusState callback received:", m), m && m.isSuccess !== void 0 && m.result !== void 0) {
|
|
625
660
|
o(m.result);
|
|
626
661
|
return;
|
|
@@ -632,11 +667,11 @@ function _t(e, i) {
|
|
|
632
667
|
t(y);
|
|
633
668
|
}
|
|
634
669
|
};
|
|
635
|
-
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")));
|
|
636
671
|
}),
|
|
637
672
|
getItemRect: async (o) => new Promise((t, n) => {
|
|
638
|
-
let
|
|
639
|
-
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);
|
|
640
675
|
const m = (y) => {
|
|
641
676
|
if (console.log(`[useGridTabs] getItemRect callback received for itemId=${o}:`, y), y && y.isSuccess !== void 0 && y.result !== void 0) {
|
|
642
677
|
t(y.result);
|
|
@@ -649,29 +684,29 @@ function _t(e, i) {
|
|
|
649
684
|
n(b);
|
|
650
685
|
}
|
|
651
686
|
};
|
|
652
|
-
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")));
|
|
653
688
|
}),
|
|
654
689
|
requestFocus: (o) => {
|
|
655
690
|
let t = e.value;
|
|
656
|
-
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]);
|
|
657
692
|
},
|
|
658
693
|
updatePageSpec: (o) => {
|
|
659
|
-
if (!
|
|
694
|
+
if (!s)
|
|
660
695
|
return;
|
|
661
|
-
const t = Object.assign({}, JSON.parse(
|
|
662
|
-
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)),
|
|
696
|
+
const t = Object.assign({}, JSON.parse(d.value).page_spec, o);
|
|
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({
|
|
663
698
|
op: "RELOAD_TABS",
|
|
664
699
|
payload: {
|
|
665
700
|
pageSpec: t,
|
|
666
701
|
page_spec: t,
|
|
667
|
-
tabs:
|
|
702
|
+
tabs: v.value
|
|
668
703
|
}
|
|
669
704
|
});
|
|
670
|
-
const n = JSON.parse(
|
|
671
|
-
n.page_spec = t,
|
|
705
|
+
const n = JSON.parse(d.value);
|
|
706
|
+
n.page_spec = t, d.value = JSON.stringify(n), l = d.value;
|
|
672
707
|
},
|
|
673
708
|
reloadAll: (o, t) => {
|
|
674
|
-
|
|
709
|
+
u && (Object.keys(u).forEach((n) => delete u[n]), Object.assign(u, o)), v.value = t, p({
|
|
675
710
|
op: "RELOAD_TABS",
|
|
676
711
|
payload: {
|
|
677
712
|
pageSpec: o,
|
|
@@ -682,11 +717,14 @@ function _t(e, i) {
|
|
|
682
717
|
},
|
|
683
718
|
scrollToTop: () => {
|
|
684
719
|
let o = e.value;
|
|
685
|
-
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", []);
|
|
686
721
|
}
|
|
687
722
|
};
|
|
688
723
|
}
|
|
689
|
-
const
|
|
724
|
+
const Ke = {
|
|
725
|
+
inheritAttrs: !1
|
|
726
|
+
}, me = /* @__PURE__ */ $({
|
|
727
|
+
...Ke,
|
|
690
728
|
__name: "Keyboard",
|
|
691
729
|
props: {
|
|
692
730
|
backgroundColor: {},
|
|
@@ -706,25 +744,25 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
|
|
|
706
744
|
rememberKeyboardType: { type: Boolean }
|
|
707
745
|
},
|
|
708
746
|
emits: ["onInputChanged", "onKeyPressed"],
|
|
709
|
-
setup(e, { expose:
|
|
710
|
-
const
|
|
711
|
-
|
|
712
|
-
|
|
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",
|
|
713
751
|
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
714
752
|
);
|
|
715
|
-
return
|
|
753
|
+
return a({
|
|
716
754
|
getNativeNode: () => {
|
|
717
|
-
var
|
|
718
|
-
return ((
|
|
755
|
+
var l, i;
|
|
756
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
719
757
|
},
|
|
720
|
-
requestFocus: (...
|
|
721
|
-
var
|
|
722
|
-
const
|
|
723
|
-
|
|
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);
|
|
724
762
|
}
|
|
725
|
-
}), (
|
|
763
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
726
764
|
ref_key: "nativeRef",
|
|
727
|
-
ref:
|
|
765
|
+
ref: d,
|
|
728
766
|
backgroundColor: e.backgroundColor,
|
|
729
767
|
backgroundGradient: e.backgroundGradient,
|
|
730
768
|
textColor: e.textColor,
|
|
@@ -740,265 +778,280 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
|
|
|
740
778
|
currentInput: e.currentInput,
|
|
741
779
|
autofocus: e.autofocus,
|
|
742
780
|
rememberKeyboardType: e.rememberKeyboardType,
|
|
743
|
-
onOnInputChanged:
|
|
744
|
-
onOnKeyPressed:
|
|
745
|
-
},
|
|
746
|
-
default:
|
|
747
|
-
|
|
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")
|
|
748
786
|
]),
|
|
749
787
|
_: 3
|
|
750
788
|
}, 16, ["backgroundColor", "backgroundGradient", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "keyboardType", "textClear", "textDelete", "currentInput", "autofocus", "rememberKeyboardType"]));
|
|
751
789
|
}
|
|
752
790
|
});
|
|
753
791
|
let oe;
|
|
754
|
-
var
|
|
792
|
+
var Ee;
|
|
755
793
|
try {
|
|
756
794
|
const e = require("@extscreen/es3-vue");
|
|
757
|
-
oe = e.registerElement || ((
|
|
795
|
+
oe = e.registerElement || ((Ee = e.default) == null ? void 0 : Ee.registerElement);
|
|
758
796
|
} catch {
|
|
759
797
|
}
|
|
760
|
-
const
|
|
798
|
+
const He = {
|
|
761
799
|
install: (e) => {
|
|
762
800
|
if (!globalThis.__QtKeyboard_registered)
|
|
763
801
|
if (oe) {
|
|
764
|
-
const
|
|
765
|
-
oe(
|
|
802
|
+
const a = (d, u) => {
|
|
803
|
+
oe(d, {
|
|
766
804
|
component: {
|
|
767
|
-
name:
|
|
768
|
-
processEventData(
|
|
769
|
-
const
|
|
770
|
-
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;
|
|
771
809
|
}
|
|
772
810
|
}
|
|
773
811
|
});
|
|
774
812
|
};
|
|
775
|
-
|
|
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");
|
|
776
814
|
} else
|
|
777
815
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
778
|
-
e.component("Keyboard",
|
|
816
|
+
e.component("Keyboard", me), e.component("qt-keyboard", me);
|
|
779
817
|
}
|
|
780
|
-
},
|
|
818
|
+
}, Je = {
|
|
819
|
+
inheritAttrs: !1
|
|
820
|
+
}, be = /* @__PURE__ */ $({
|
|
821
|
+
...Je,
|
|
781
822
|
__name: "PortalPool",
|
|
782
|
-
setup(e, { expose:
|
|
783
|
-
const
|
|
784
|
-
|
|
785
|
-
|
|
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"
|
|
786
827
|
);
|
|
787
|
-
return
|
|
828
|
+
return a({
|
|
788
829
|
getNativeNode: () => {
|
|
789
|
-
var
|
|
790
|
-
return ((
|
|
830
|
+
var l, i;
|
|
831
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
791
832
|
}
|
|
792
|
-
}), (
|
|
833
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
793
834
|
ref_key: "nativeRef",
|
|
794
|
-
ref:
|
|
835
|
+
ref: d,
|
|
795
836
|
style: { position: "absolute" },
|
|
796
837
|
absolute: !0
|
|
797
|
-
},
|
|
798
|
-
default:
|
|
799
|
-
|
|
838
|
+
}, l.$attrs), {
|
|
839
|
+
default: Q(() => [
|
|
840
|
+
D(l.$slots, "default")
|
|
800
841
|
]),
|
|
801
842
|
_: 3
|
|
802
843
|
}, 16));
|
|
803
844
|
}
|
|
804
845
|
});
|
|
805
846
|
let ne;
|
|
806
|
-
var
|
|
847
|
+
var xe;
|
|
807
848
|
try {
|
|
808
849
|
const e = require("@extscreen/es3-vue");
|
|
809
|
-
ne = e.registerElement || ((
|
|
850
|
+
ne = e.registerElement || ((xe = e.default) == null ? void 0 : xe.registerElement);
|
|
810
851
|
} catch {
|
|
811
852
|
}
|
|
812
|
-
const
|
|
853
|
+
const Ze = {
|
|
813
854
|
install: (e) => {
|
|
814
855
|
if (!globalThis.__QtPortalPool_registered)
|
|
815
856
|
if (ne) {
|
|
816
|
-
const
|
|
817
|
-
ne(
|
|
857
|
+
const a = (d, u) => {
|
|
858
|
+
ne(d, {
|
|
818
859
|
component: {
|
|
819
|
-
name:
|
|
820
|
-
processEventData(
|
|
821
|
-
const
|
|
822
|
-
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;
|
|
823
864
|
}
|
|
824
865
|
}
|
|
825
866
|
});
|
|
826
867
|
};
|
|
827
|
-
|
|
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");
|
|
828
869
|
} else
|
|
829
870
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
830
|
-
e.component("PortalPool",
|
|
871
|
+
e.component("PortalPool", be), e.component("qt-portal-pool", be);
|
|
831
872
|
}
|
|
832
|
-
},
|
|
873
|
+
}, Xe = {
|
|
874
|
+
inheritAttrs: !1
|
|
875
|
+
}, ye = /* @__PURE__ */ $({
|
|
876
|
+
...Xe,
|
|
833
877
|
__name: "PortalItem",
|
|
834
878
|
props: {
|
|
835
879
|
portalId: {}
|
|
836
880
|
},
|
|
837
|
-
setup(e, { expose:
|
|
838
|
-
const
|
|
839
|
-
|
|
840
|
-
|
|
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"
|
|
841
885
|
);
|
|
842
|
-
return
|
|
886
|
+
return a({
|
|
843
887
|
getNativeNode: () => {
|
|
844
|
-
var
|
|
845
|
-
return ((
|
|
888
|
+
var l, i;
|
|
889
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
846
890
|
}
|
|
847
|
-
}), (
|
|
891
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
848
892
|
ref_key: "nativeRef",
|
|
849
|
-
ref:
|
|
893
|
+
ref: d,
|
|
850
894
|
style: { position: "absolute" },
|
|
851
895
|
absolute: !0,
|
|
852
896
|
portalId: e.portalId
|
|
853
|
-
},
|
|
854
|
-
default:
|
|
855
|
-
|
|
897
|
+
}, l.$attrs), {
|
|
898
|
+
default: Q(() => [
|
|
899
|
+
D(l.$slots, "default")
|
|
856
900
|
]),
|
|
857
901
|
_: 3
|
|
858
902
|
}, 16, ["portalId"]));
|
|
859
903
|
}
|
|
860
904
|
});
|
|
861
905
|
let ae;
|
|
862
|
-
var
|
|
906
|
+
var Ae;
|
|
863
907
|
try {
|
|
864
908
|
const e = require("@extscreen/es3-vue");
|
|
865
|
-
ae = e.registerElement || ((
|
|
909
|
+
ae = e.registerElement || ((Ae = e.default) == null ? void 0 : Ae.registerElement);
|
|
866
910
|
} catch {
|
|
867
911
|
}
|
|
868
|
-
const
|
|
912
|
+
const Ye = {
|
|
869
913
|
install: (e) => {
|
|
870
914
|
if (!globalThis.__QtPortalItem_registered)
|
|
871
915
|
if (ae) {
|
|
872
|
-
const
|
|
873
|
-
ae(
|
|
916
|
+
const a = (d, u) => {
|
|
917
|
+
ae(d, {
|
|
874
918
|
component: {
|
|
875
|
-
name:
|
|
876
|
-
processEventData(
|
|
877
|
-
const
|
|
878
|
-
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;
|
|
879
923
|
}
|
|
880
924
|
}
|
|
881
925
|
});
|
|
882
926
|
};
|
|
883
|
-
|
|
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");
|
|
884
928
|
} else
|
|
885
929
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
886
|
-
e.component("PortalItem",
|
|
930
|
+
e.component("PortalItem", ye), e.component("qt-portal-item", ye);
|
|
887
931
|
}
|
|
888
|
-
},
|
|
932
|
+
}, et = {
|
|
933
|
+
inheritAttrs: !1
|
|
934
|
+
}, he = /* @__PURE__ */ $({
|
|
935
|
+
...et,
|
|
889
936
|
__name: "HsvBackground",
|
|
890
937
|
props: {
|
|
891
938
|
hue: {},
|
|
892
939
|
hueDuration: {}
|
|
893
940
|
},
|
|
894
|
-
setup(e, { expose:
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
|
|
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"
|
|
898
945
|
);
|
|
899
|
-
return
|
|
946
|
+
return a({
|
|
900
947
|
getNativeNode: () => {
|
|
901
|
-
var
|
|
902
|
-
return ((
|
|
948
|
+
var l, i;
|
|
949
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
903
950
|
}
|
|
904
|
-
}), (
|
|
951
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
905
952
|
ref_key: "nativeRef",
|
|
906
|
-
ref:
|
|
953
|
+
ref: d,
|
|
907
954
|
hue: e.hue,
|
|
908
955
|
hueDuration: e.hueDuration
|
|
909
|
-
},
|
|
910
|
-
default:
|
|
911
|
-
|
|
956
|
+
}, l.$attrs), {
|
|
957
|
+
default: Q(() => [
|
|
958
|
+
D(l.$slots, "default")
|
|
912
959
|
]),
|
|
913
960
|
_: 3
|
|
914
961
|
}, 16, ["hue", "hueDuration"]));
|
|
915
962
|
}
|
|
916
963
|
});
|
|
917
|
-
let
|
|
918
|
-
var
|
|
964
|
+
let le;
|
|
965
|
+
var we;
|
|
919
966
|
try {
|
|
920
967
|
const e = require("@extscreen/es3-vue");
|
|
921
|
-
|
|
968
|
+
le = e.registerElement || ((we = e.default) == null ? void 0 : we.registerElement);
|
|
922
969
|
} catch {
|
|
923
970
|
}
|
|
924
|
-
const
|
|
971
|
+
const tt = {
|
|
925
972
|
install: (e) => {
|
|
926
973
|
if (!globalThis.__QtHsvBackground_registered)
|
|
927
|
-
if (
|
|
928
|
-
const
|
|
929
|
-
|
|
974
|
+
if (le) {
|
|
975
|
+
const a = (d, u) => {
|
|
976
|
+
le(d, {
|
|
930
977
|
component: {
|
|
931
|
-
name:
|
|
932
|
-
processEventData(
|
|
933
|
-
const
|
|
934
|
-
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;
|
|
935
982
|
}
|
|
936
983
|
}
|
|
937
984
|
});
|
|
938
985
|
};
|
|
939
|
-
|
|
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");
|
|
940
987
|
} else
|
|
941
988
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
942
|
-
e.component("HsvBackground",
|
|
989
|
+
e.component("HsvBackground", he), e.component("qt-hsv-background", he);
|
|
943
990
|
}
|
|
944
|
-
},
|
|
991
|
+
}, ot = {
|
|
992
|
+
inheritAttrs: !1
|
|
993
|
+
}, pe = /* @__PURE__ */ $({
|
|
994
|
+
...ot,
|
|
945
995
|
__name: "SvgImage",
|
|
946
996
|
props: {
|
|
947
997
|
src: {},
|
|
948
998
|
tintColor: {}
|
|
949
999
|
},
|
|
950
|
-
setup(e, { expose:
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
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",
|
|
954
1004
|
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
955
1005
|
);
|
|
956
|
-
return
|
|
1006
|
+
return a({
|
|
957
1007
|
getNativeNode: () => {
|
|
958
|
-
var
|
|
959
|
-
return ((
|
|
1008
|
+
var l, i;
|
|
1009
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
960
1010
|
}
|
|
961
|
-
}), (
|
|
1011
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
962
1012
|
ref_key: "nativeRef",
|
|
963
|
-
ref:
|
|
1013
|
+
ref: d,
|
|
964
1014
|
src: e.src,
|
|
965
1015
|
tintColor: e.tintColor
|
|
966
|
-
},
|
|
967
|
-
default:
|
|
968
|
-
|
|
1016
|
+
}, l.$attrs), {
|
|
1017
|
+
default: Q(() => [
|
|
1018
|
+
D(l.$slots, "default")
|
|
969
1019
|
]),
|
|
970
1020
|
_: 3
|
|
971
1021
|
}, 16, ["src", "tintColor"]));
|
|
972
1022
|
}
|
|
973
1023
|
});
|
|
974
|
-
let
|
|
975
|
-
var
|
|
1024
|
+
let ie;
|
|
1025
|
+
var $e;
|
|
976
1026
|
try {
|
|
977
1027
|
const e = require("@extscreen/es3-vue");
|
|
978
|
-
|
|
1028
|
+
ie = e.registerElement || (($e = e.default) == null ? void 0 : $e.registerElement);
|
|
979
1029
|
} catch {
|
|
980
1030
|
}
|
|
981
|
-
const
|
|
1031
|
+
const nt = {
|
|
982
1032
|
install: (e) => {
|
|
983
1033
|
if (!globalThis.__QtSvgImage_registered)
|
|
984
|
-
if (
|
|
985
|
-
const
|
|
986
|
-
|
|
1034
|
+
if (ie) {
|
|
1035
|
+
const a = (d, u) => {
|
|
1036
|
+
ie(d, {
|
|
987
1037
|
component: {
|
|
988
|
-
name:
|
|
989
|
-
processEventData(
|
|
990
|
-
const
|
|
991
|
-
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;
|
|
992
1042
|
}
|
|
993
1043
|
}
|
|
994
1044
|
});
|
|
995
1045
|
};
|
|
996
|
-
|
|
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");
|
|
997
1047
|
} else
|
|
998
1048
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
999
|
-
e.component("SvgImage",
|
|
1049
|
+
e.component("SvgImage", pe), e.component("qt-svg-image", pe);
|
|
1000
1050
|
}
|
|
1001
|
-
},
|
|
1051
|
+
}, at = {
|
|
1052
|
+
inheritAttrs: !1
|
|
1053
|
+
}, lt = /* @__PURE__ */ $({
|
|
1054
|
+
...at,
|
|
1002
1055
|
__name: "NaButtonBase",
|
|
1003
1056
|
props: {
|
|
1004
1057
|
text: {},
|
|
@@ -1020,20 +1073,20 @@ const ut = {
|
|
|
1020
1073
|
enableFocusBorder: { type: Boolean }
|
|
1021
1074
|
},
|
|
1022
1075
|
emits: ["onButtonCustomEvent"],
|
|
1023
|
-
setup(e, { expose:
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1026
|
-
|
|
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",
|
|
1027
1080
|
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
1028
1081
|
);
|
|
1029
|
-
return
|
|
1082
|
+
return a({
|
|
1030
1083
|
getNativeNode: () => {
|
|
1031
|
-
var
|
|
1032
|
-
return ((
|
|
1084
|
+
var l, i;
|
|
1085
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
1033
1086
|
}
|
|
1034
|
-
}), (
|
|
1087
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
1035
1088
|
ref_key: "nativeRef",
|
|
1036
|
-
ref:
|
|
1089
|
+
ref: d,
|
|
1037
1090
|
text: e.text,
|
|
1038
1091
|
icon: e.icon,
|
|
1039
1092
|
iconSize: e.iconSize,
|
|
@@ -1051,61 +1104,67 @@ const ut = {
|
|
|
1051
1104
|
cornerRadius: e.cornerRadius,
|
|
1052
1105
|
focusScale: e.focusScale,
|
|
1053
1106
|
enableFocusBorder: e.enableFocusBorder,
|
|
1054
|
-
onOnButtonCustomEvent:
|
|
1055
|
-
},
|
|
1056
|
-
default:
|
|
1057
|
-
|
|
1107
|
+
onOnButtonCustomEvent: i[0] || (i[0] = (f) => l.$emit("onButtonCustomEvent", f.nativeEvent))
|
|
1108
|
+
}, l.$attrs), {
|
|
1109
|
+
default: Q(() => [
|
|
1110
|
+
D(l.$slots, "default")
|
|
1058
1111
|
]),
|
|
1059
1112
|
_: 3
|
|
1060
1113
|
}, 16, ["text", "icon", "iconSize", "iconSpace", "layoutDirection", "fontSize", "maxLines", "textColor", "focusTextColor", "backgroundColor", "focusBackgroundColor", "normalBorderWidth", "normalBorderColor", "focusBorderColor", "cornerRadius", "focusScale", "enableFocusBorder"]));
|
|
1061
1114
|
}
|
|
1062
|
-
}),
|
|
1115
|
+
}), it = {
|
|
1116
|
+
inheritAttrs: !1
|
|
1117
|
+
}, Ce = /* @__PURE__ */ $({
|
|
1118
|
+
...it,
|
|
1063
1119
|
__name: "NaButton",
|
|
1064
1120
|
props: {
|
|
1065
1121
|
width: {},
|
|
1066
1122
|
height: {}
|
|
1067
1123
|
},
|
|
1068
1124
|
setup(e) {
|
|
1069
|
-
const
|
|
1070
|
-
width: typeof
|
|
1071
|
-
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
|
|
1072
1128
|
}));
|
|
1073
|
-
return (
|
|
1074
|
-
default:
|
|
1075
|
-
|
|
1129
|
+
return (u, v) => (x(), O(lt, F(u.$attrs, { style: d.value }), {
|
|
1130
|
+
default: Q(() => [
|
|
1131
|
+
D(u.$slots, "default")
|
|
1076
1132
|
]),
|
|
1077
1133
|
_: 3
|
|
1078
1134
|
}, 16, ["style"]));
|
|
1079
1135
|
}
|
|
1080
1136
|
});
|
|
1081
1137
|
let re;
|
|
1082
|
-
var
|
|
1138
|
+
var Be;
|
|
1083
1139
|
try {
|
|
1084
1140
|
const e = require("@extscreen/es3-vue");
|
|
1085
|
-
re = e.registerElement || ((
|
|
1141
|
+
re = e.registerElement || ((Be = e.default) == null ? void 0 : Be.registerElement);
|
|
1086
1142
|
} catch {
|
|
1087
1143
|
}
|
|
1088
|
-
const
|
|
1144
|
+
const rt = {
|
|
1089
1145
|
install: (e) => {
|
|
1090
1146
|
if (!globalThis.__QtNaButton_registered)
|
|
1091
1147
|
if (re) {
|
|
1092
|
-
const
|
|
1093
|
-
re(
|
|
1148
|
+
const a = (d, u) => {
|
|
1149
|
+
re(d, {
|
|
1094
1150
|
component: {
|
|
1095
|
-
name:
|
|
1096
|
-
processEventData(
|
|
1097
|
-
const
|
|
1098
|
-
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;
|
|
1099
1155
|
}
|
|
1100
1156
|
}
|
|
1101
1157
|
});
|
|
1102
1158
|
};
|
|
1103
|
-
|
|
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");
|
|
1104
1160
|
} else
|
|
1105
1161
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1106
|
-
e.component("NaButton",
|
|
1162
|
+
e.component("NaButton", Ce), e.component("qt-na-button", Ce);
|
|
1107
1163
|
}
|
|
1108
|
-
},
|
|
1164
|
+
}, st = {
|
|
1165
|
+
inheritAttrs: !1
|
|
1166
|
+
}, ke = /* @__PURE__ */ $({
|
|
1167
|
+
...st,
|
|
1109
1168
|
__name: "NaCheckbox",
|
|
1110
1169
|
props: {
|
|
1111
1170
|
text: {},
|
|
@@ -1151,19 +1210,19 @@ const gt = {
|
|
|
1151
1210
|
type: {}
|
|
1152
1211
|
},
|
|
1153
1212
|
emits: ["onCheckedChange"],
|
|
1154
|
-
setup(e, { expose:
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
|
|
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 || ""
|
|
1158
1217
|
);
|
|
1159
|
-
return
|
|
1218
|
+
return a({
|
|
1160
1219
|
getNativeNode: () => {
|
|
1161
|
-
var
|
|
1162
|
-
return ((
|
|
1220
|
+
var l, i;
|
|
1221
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
1163
1222
|
}
|
|
1164
|
-
}), (
|
|
1223
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
1165
1224
|
ref_key: "nativeRef",
|
|
1166
|
-
ref:
|
|
1225
|
+
ref: d,
|
|
1167
1226
|
text: e.text,
|
|
1168
1227
|
checked: e.checked,
|
|
1169
1228
|
disabled: e.disabled,
|
|
@@ -1205,43 +1264,43 @@ const gt = {
|
|
|
1205
1264
|
cornerRadius: e.cornerRadius,
|
|
1206
1265
|
focusScale: e.focusScale,
|
|
1207
1266
|
type: e.type,
|
|
1208
|
-
onOnCheckedChange:
|
|
1209
|
-
},
|
|
1210
|
-
default:
|
|
1211
|
-
|
|
1267
|
+
onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
|
|
1268
|
+
}, l.$attrs), {
|
|
1269
|
+
default: Q(() => [
|
|
1270
|
+
D(l.$slots, "default")
|
|
1212
1271
|
]),
|
|
1213
1272
|
_: 3
|
|
1214
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"]));
|
|
1215
1274
|
}
|
|
1216
1275
|
});
|
|
1217
1276
|
let se;
|
|
1218
|
-
var
|
|
1277
|
+
var Ge;
|
|
1219
1278
|
try {
|
|
1220
1279
|
const e = require("@extscreen/es3-vue");
|
|
1221
|
-
se = e.registerElement || ((
|
|
1280
|
+
se = e.registerElement || ((Ge = e.default) == null ? void 0 : Ge.registerElement);
|
|
1222
1281
|
} catch {
|
|
1223
1282
|
}
|
|
1224
|
-
const
|
|
1283
|
+
const ct = {
|
|
1225
1284
|
install: (e) => {
|
|
1226
1285
|
if (!globalThis.__QtNaCheckbox_registered)
|
|
1227
1286
|
if (se) {
|
|
1228
|
-
const
|
|
1229
|
-
se(
|
|
1287
|
+
const a = (d, u) => {
|
|
1288
|
+
se(d, {
|
|
1230
1289
|
component: {
|
|
1231
|
-
name:
|
|
1232
|
-
processEventData(
|
|
1233
|
-
const
|
|
1234
|
-
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;
|
|
1235
1294
|
}
|
|
1236
1295
|
}
|
|
1237
1296
|
});
|
|
1238
1297
|
};
|
|
1239
|
-
|
|
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");
|
|
1240
1299
|
} else
|
|
1241
1300
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1242
|
-
e.component("NaCheckbox",
|
|
1301
|
+
e.component("NaCheckbox", ke), e.component("qt-na-checkbox", ke);
|
|
1243
1302
|
}
|
|
1244
|
-
},
|
|
1303
|
+
}, ut = $({
|
|
1245
1304
|
name: "NaRadioGroup",
|
|
1246
1305
|
props: {
|
|
1247
1306
|
modelValue: {
|
|
@@ -1278,55 +1337,55 @@ const ft = {
|
|
|
1278
1337
|
}
|
|
1279
1338
|
},
|
|
1280
1339
|
emits: ["update:modelValue", "change"],
|
|
1281
|
-
setup(e, { emit:
|
|
1340
|
+
setup(e, { emit: a }) {
|
|
1282
1341
|
return {
|
|
1283
|
-
groupStyle:
|
|
1342
|
+
groupStyle: j(() => ({
|
|
1284
1343
|
display: "flex",
|
|
1285
1344
|
flexDirection: e.direction,
|
|
1286
1345
|
alignItems: "center"
|
|
1287
1346
|
})),
|
|
1288
|
-
getItemStyle: (
|
|
1289
|
-
var
|
|
1290
|
-
const
|
|
1291
|
-
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;
|
|
1292
1351
|
},
|
|
1293
|
-
onItemClick: (
|
|
1294
|
-
|
|
1352
|
+
onItemClick: (g) => {
|
|
1353
|
+
g.disabled || (a("update:modelValue", g.value), a("change", g.value));
|
|
1295
1354
|
}
|
|
1296
1355
|
};
|
|
1297
1356
|
}
|
|
1298
1357
|
});
|
|
1299
|
-
const
|
|
1300
|
-
const
|
|
1301
|
-
for (const [
|
|
1302
|
-
u
|
|
1303
|
-
return
|
|
1358
|
+
const ge = (e, a) => {
|
|
1359
|
+
const d = e.__vccOpts || e;
|
|
1360
|
+
for (const [u, v] of a)
|
|
1361
|
+
d[u] = v;
|
|
1362
|
+
return d;
|
|
1304
1363
|
};
|
|
1305
|
-
function
|
|
1306
|
-
const
|
|
1307
|
-
return
|
|
1364
|
+
function dt(e, a, d, u, v, g) {
|
|
1365
|
+
const c = de("qt-na-checkbox");
|
|
1366
|
+
return x(), Z("div", {
|
|
1308
1367
|
class: "na-radio-group",
|
|
1309
1368
|
style: fe(e.groupStyle)
|
|
1310
1369
|
}, [
|
|
1311
|
-
(
|
|
1312
|
-
key:
|
|
1370
|
+
(x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
|
|
1371
|
+
key: h,
|
|
1313
1372
|
type: "radio",
|
|
1314
|
-
checked: e.modelValue ===
|
|
1315
|
-
text:
|
|
1373
|
+
checked: e.modelValue === s.value,
|
|
1374
|
+
text: s.label,
|
|
1316
1375
|
gravity: e.gravity,
|
|
1317
1376
|
showBackground: e.showBackground,
|
|
1318
|
-
disabled:
|
|
1319
|
-
}, { ref_for: !0 },
|
|
1320
|
-
style: e.getItemStyle(
|
|
1321
|
-
onClick: (
|
|
1377
|
+
disabled: s.disabled
|
|
1378
|
+
}, { ref_for: !0 }, s.props, {
|
|
1379
|
+
style: e.getItemStyle(s, h),
|
|
1380
|
+
onClick: (l) => e.onItemClick(s)
|
|
1322
1381
|
}), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
|
|
1323
1382
|
], 4);
|
|
1324
1383
|
}
|
|
1325
|
-
const
|
|
1384
|
+
const Te = /* @__PURE__ */ ge(ut, [["render", dt], ["__scopeId", "data-v-448252ff"]]), ft = {
|
|
1326
1385
|
install: (e) => {
|
|
1327
|
-
e.component("NaRadioGroup",
|
|
1386
|
+
e.component("NaRadioGroup", Te), e.component("qt-na-radio-group", Te);
|
|
1328
1387
|
}
|
|
1329
|
-
},
|
|
1388
|
+
}, gt = $({
|
|
1330
1389
|
name: "NaCheckboxGroup",
|
|
1331
1390
|
props: {
|
|
1332
1391
|
modelValue: {
|
|
@@ -1363,52 +1422,55 @@ const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252f
|
|
|
1363
1422
|
}
|
|
1364
1423
|
},
|
|
1365
1424
|
emits: ["update:modelValue", "change"],
|
|
1366
|
-
setup(e, { emit:
|
|
1425
|
+
setup(e, { emit: a }) {
|
|
1367
1426
|
return {
|
|
1368
|
-
groupStyle:
|
|
1427
|
+
groupStyle: j(() => ({
|
|
1369
1428
|
display: "flex",
|
|
1370
1429
|
flexDirection: e.direction,
|
|
1371
1430
|
alignItems: "center"
|
|
1372
1431
|
})),
|
|
1373
|
-
getItemStyle: (
|
|
1374
|
-
var
|
|
1375
|
-
const
|
|
1376
|
-
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;
|
|
1377
1436
|
},
|
|
1378
|
-
onItemClick: (
|
|
1379
|
-
if (
|
|
1437
|
+
onItemClick: (g) => {
|
|
1438
|
+
if (g.disabled)
|
|
1380
1439
|
return;
|
|
1381
|
-
const
|
|
1382
|
-
|
|
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);
|
|
1383
1442
|
}
|
|
1384
1443
|
};
|
|
1385
1444
|
}
|
|
1386
1445
|
});
|
|
1387
|
-
function
|
|
1388
|
-
const
|
|
1389
|
-
return
|
|
1446
|
+
function vt(e, a, d, u, v, g) {
|
|
1447
|
+
const c = de("qt-na-checkbox");
|
|
1448
|
+
return x(), Z("div", {
|
|
1390
1449
|
class: "na-checkbox-group",
|
|
1391
1450
|
style: fe(e.groupStyle)
|
|
1392
1451
|
}, [
|
|
1393
|
-
(
|
|
1394
|
-
key:
|
|
1452
|
+
(x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
|
|
1453
|
+
key: h,
|
|
1395
1454
|
type: "checkbox",
|
|
1396
|
-
checked: e.modelValue.includes(
|
|
1397
|
-
text:
|
|
1455
|
+
checked: e.modelValue.includes(s.value),
|
|
1456
|
+
text: s.label,
|
|
1398
1457
|
gravity: e.gravity,
|
|
1399
1458
|
showBackground: e.showBackground,
|
|
1400
|
-
disabled:
|
|
1401
|
-
}, { ref_for: !0 },
|
|
1402
|
-
style: e.getItemStyle(
|
|
1403
|
-
onClick: (
|
|
1459
|
+
disabled: s.disabled
|
|
1460
|
+
}, { ref_for: !0 }, s.props, {
|
|
1461
|
+
style: e.getItemStyle(s, h),
|
|
1462
|
+
onClick: (l) => e.onItemClick(s)
|
|
1404
1463
|
}), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
|
|
1405
1464
|
], 4);
|
|
1406
1465
|
}
|
|
1407
|
-
const
|
|
1466
|
+
const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4eaa"]]), mt = {
|
|
1408
1467
|
install: (e) => {
|
|
1409
|
-
e.component("NaCheckboxGroup",
|
|
1468
|
+
e.component("NaCheckboxGroup", Ie), e.component("qt-na-checkbox-group", Ie);
|
|
1410
1469
|
}
|
|
1411
|
-
},
|
|
1470
|
+
}, bt = {
|
|
1471
|
+
inheritAttrs: !1
|
|
1472
|
+
}, Ne = /* @__PURE__ */ $({
|
|
1473
|
+
...bt,
|
|
1412
1474
|
__name: "NaSwitcher",
|
|
1413
1475
|
props: {
|
|
1414
1476
|
checked: { type: Boolean },
|
|
@@ -1425,19 +1487,19 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
|
|
|
1425
1487
|
stateTextSize: {}
|
|
1426
1488
|
},
|
|
1427
1489
|
emits: ["onCheckedChange"],
|
|
1428
|
-
setup(e, { expose:
|
|
1429
|
-
const
|
|
1430
|
-
|
|
1431
|
-
|
|
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 || ""
|
|
1432
1494
|
);
|
|
1433
|
-
return
|
|
1495
|
+
return a({
|
|
1434
1496
|
getNativeNode: () => {
|
|
1435
|
-
var
|
|
1436
|
-
return ((
|
|
1497
|
+
var l, i;
|
|
1498
|
+
return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
|
|
1437
1499
|
}
|
|
1438
|
-
}), (
|
|
1500
|
+
}), (l, i) => (x(), O(M(h), F({
|
|
1439
1501
|
ref_key: "nativeRef",
|
|
1440
|
-
ref:
|
|
1502
|
+
ref: d,
|
|
1441
1503
|
checked: e.checked,
|
|
1442
1504
|
disabled: e.disabled,
|
|
1443
1505
|
title: e.title,
|
|
@@ -1450,43 +1512,43 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
|
|
|
1450
1512
|
titleTextSize: e.titleTextSize,
|
|
1451
1513
|
subtitleTextSize: e.subtitleTextSize,
|
|
1452
1514
|
stateTextSize: e.stateTextSize,
|
|
1453
|
-
onOnCheckedChange:
|
|
1454
|
-
},
|
|
1455
|
-
default:
|
|
1456
|
-
|
|
1515
|
+
onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
|
|
1516
|
+
}, l.$attrs), {
|
|
1517
|
+
default: Q(() => [
|
|
1518
|
+
D(l.$slots, "default")
|
|
1457
1519
|
]),
|
|
1458
1520
|
_: 3
|
|
1459
1521
|
}, 16, ["checked", "disabled", "title", "textOn", "textOff", "subtitle", "subtitleColor", "titleColor", "focusTitleColor", "titleTextSize", "subtitleTextSize", "stateTextSize"]));
|
|
1460
1522
|
}
|
|
1461
1523
|
});
|
|
1462
1524
|
let ce;
|
|
1463
|
-
var
|
|
1525
|
+
var Oe;
|
|
1464
1526
|
try {
|
|
1465
1527
|
const e = require("@extscreen/es3-vue");
|
|
1466
|
-
ce = e.registerElement || ((
|
|
1528
|
+
ce = e.registerElement || ((Oe = e.default) == null ? void 0 : Oe.registerElement);
|
|
1467
1529
|
} catch {
|
|
1468
1530
|
}
|
|
1469
|
-
const
|
|
1531
|
+
const yt = {
|
|
1470
1532
|
install: (e) => {
|
|
1471
1533
|
if (!globalThis.__QtNaSwitcher_registered)
|
|
1472
1534
|
if (ce) {
|
|
1473
|
-
const
|
|
1474
|
-
ce(
|
|
1535
|
+
const a = (d, u) => {
|
|
1536
|
+
ce(d, {
|
|
1475
1537
|
component: {
|
|
1476
|
-
name:
|
|
1477
|
-
processEventData(
|
|
1478
|
-
const
|
|
1479
|
-
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;
|
|
1480
1542
|
}
|
|
1481
1543
|
}
|
|
1482
1544
|
});
|
|
1483
1545
|
};
|
|
1484
|
-
|
|
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");
|
|
1485
1547
|
} else
|
|
1486
1548
|
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1487
|
-
e.component("NaSwitcher",
|
|
1549
|
+
e.component("NaSwitcher", Ne), e.component("qt-na-switcher", Ne);
|
|
1488
1550
|
}
|
|
1489
|
-
},
|
|
1551
|
+
}, ht = $({
|
|
1490
1552
|
name: "NaSettingSwitch",
|
|
1491
1553
|
props: {
|
|
1492
1554
|
title: {
|
|
@@ -1535,32 +1597,32 @@ const Ct = {
|
|
|
1535
1597
|
}
|
|
1536
1598
|
},
|
|
1537
1599
|
emits: ["update:modelValue", "change"],
|
|
1538
|
-
setup(e, { emit:
|
|
1539
|
-
const
|
|
1540
|
-
ee(() => e.modelValue, (
|
|
1541
|
-
|
|
1600
|
+
setup(e, { emit: a, attrs: d }) {
|
|
1601
|
+
const u = A(e.modelValue);
|
|
1602
|
+
ee(() => e.modelValue, (s) => {
|
|
1603
|
+
u.value = s;
|
|
1542
1604
|
});
|
|
1543
|
-
const
|
|
1544
|
-
const
|
|
1545
|
-
|
|
1546
|
-
},
|
|
1547
|
-
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;
|
|
1548
1610
|
return {
|
|
1549
|
-
width:
|
|
1550
|
-
height: typeof
|
|
1551
|
-
...
|
|
1611
|
+
width: g.value,
|
|
1612
|
+
height: typeof h == "number" ? `${h}px` : h,
|
|
1613
|
+
...s
|
|
1552
1614
|
};
|
|
1553
1615
|
});
|
|
1554
1616
|
return {
|
|
1555
|
-
checked:
|
|
1556
|
-
handleCheckedChange:
|
|
1557
|
-
mergedStyle:
|
|
1617
|
+
checked: u,
|
|
1618
|
+
handleCheckedChange: v,
|
|
1619
|
+
mergedStyle: c
|
|
1558
1620
|
};
|
|
1559
1621
|
}
|
|
1560
1622
|
});
|
|
1561
|
-
function
|
|
1562
|
-
const
|
|
1563
|
-
return
|
|
1623
|
+
function pt(e, a, d, u, v, g) {
|
|
1624
|
+
const c = de("qt-na-switcher");
|
|
1625
|
+
return x(), O(c, {
|
|
1564
1626
|
class: "na-setting-switch",
|
|
1565
1627
|
style: fe(e.mergedStyle),
|
|
1566
1628
|
title: e.title,
|
|
@@ -1575,119 +1637,16 @@ function It(e, i, u, s, f, v) {
|
|
|
1575
1637
|
onOnCheckedChange: e.handleCheckedChange
|
|
1576
1638
|
}, null, 8, ["style", "title", "subtitle", "checked", "textOn", "textOff", "titleTextSize", "subtitleTextSize", "stateTextSize", "disabled", "onOnCheckedChange"]);
|
|
1577
1639
|
}
|
|
1578
|
-
const
|
|
1640
|
+
const Pe = /* @__PURE__ */ ge(ht, [["render", pt]]), Ct = {
|
|
1579
1641
|
install(e) {
|
|
1580
|
-
e.component("NaSettingSwitch",
|
|
1642
|
+
e.component("NaSettingSwitch", Pe), e.component("qt-na-setting-switch", Pe);
|
|
1581
1643
|
}
|
|
1582
|
-
},
|
|
1583
|
-
__name: "NaInputViewBase",
|
|
1584
|
-
props: {
|
|
1585
|
-
text: {},
|
|
1586
|
-
placeholder: {},
|
|
1587
|
-
type: {},
|
|
1588
|
-
status: {},
|
|
1589
|
-
disabled: { type: Boolean },
|
|
1590
|
-
inputSize: {},
|
|
1591
|
-
cursorVisible: { type: Boolean },
|
|
1592
|
-
useSystemKeyboard: { type: Boolean },
|
|
1593
|
-
trailingIcon: {}
|
|
1594
|
-
},
|
|
1595
|
-
emits: ["onInputClick", "onChange"],
|
|
1596
|
-
setup(e, { expose: i }) {
|
|
1597
|
-
const u = 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(
|
|
1598
|
-
l,
|
|
1599
|
-
s.pluginPackageName || "com.quicktvui.plugin.extraui",
|
|
1600
|
-
"com.quicktvui.plugin.extraui.ExtraUIPluginApp"
|
|
1601
|
-
);
|
|
1602
|
-
return i({
|
|
1603
|
-
getNativeNode: () => {
|
|
1604
|
-
var a, c;
|
|
1605
|
-
return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
|
|
1606
|
-
}
|
|
1607
|
-
}), (a, c) => (S(), $(D(r), B({
|
|
1608
|
-
ref_key: "nativeRef",
|
|
1609
|
-
ref: u,
|
|
1610
|
-
text: e.text,
|
|
1611
|
-
placeholder: e.placeholder,
|
|
1612
|
-
type: e.type,
|
|
1613
|
-
status: e.status,
|
|
1614
|
-
disabled: e.disabled,
|
|
1615
|
-
inputSize: e.inputSize,
|
|
1616
|
-
cursorVisible: e.cursorVisible,
|
|
1617
|
-
useSystemKeyboard: e.useSystemKeyboard,
|
|
1618
|
-
trailingIcon: e.trailingIcon,
|
|
1619
|
-
onOnInputClick: c[0] || (c[0] = (d) => a.$emit("onInputClick", d.nativeEvent)),
|
|
1620
|
-
onOnChange: c[1] || (c[1] = (d) => a.$emit("onChange", d.nativeEvent))
|
|
1621
|
-
}, a.$attrs), {
|
|
1622
|
-
default: R(() => [
|
|
1623
|
-
F(a.$slots, "default")
|
|
1624
|
-
]),
|
|
1625
|
-
_: 3
|
|
1626
|
-
}, 16, ["text", "placeholder", "type", "status", "disabled", "inputSize", "cursorVisible", "useSystemKeyboard", "trailingIcon"]));
|
|
1627
|
-
}
|
|
1628
|
-
}), Re = /* @__PURE__ */ w({
|
|
1629
|
-
__name: "NaInputView",
|
|
1630
|
-
props: {
|
|
1631
|
-
inputSize: { default: "medium" }
|
|
1632
|
-
},
|
|
1633
|
-
emits: ["onInputClick", "onChange"],
|
|
1634
|
-
setup(e, { emit: i }) {
|
|
1635
|
-
const u = i, s = e, f = W(() => {
|
|
1636
|
-
let r = 60;
|
|
1637
|
-
return s.inputSize === "large" ? r = 70 : s.inputSize === "small" && (r = 50), {
|
|
1638
|
-
height: `${r}px`
|
|
1639
|
-
};
|
|
1640
|
-
}), v = (r) => {
|
|
1641
|
-
u("onInputClick", r);
|
|
1642
|
-
}, l = (r) => {
|
|
1643
|
-
u("onChange", r);
|
|
1644
|
-
};
|
|
1645
|
-
return (r, a) => (S(), $(Tt, B(r.$attrs, {
|
|
1646
|
-
style: f.value,
|
|
1647
|
-
inputSize: e.inputSize,
|
|
1648
|
-
onOnInputClick: v,
|
|
1649
|
-
onOnChange: l
|
|
1650
|
-
}), {
|
|
1651
|
-
default: R(() => [
|
|
1652
|
-
F(r.$slots, "default")
|
|
1653
|
-
]),
|
|
1654
|
-
_: 3
|
|
1655
|
-
}, 16, ["style", "inputSize"]));
|
|
1656
|
-
}
|
|
1657
|
-
});
|
|
1658
|
-
let ue;
|
|
1659
|
-
var je;
|
|
1660
|
-
try {
|
|
1661
|
-
const e = require("@extscreen/es3-vue");
|
|
1662
|
-
ue = e.registerElement || ((je = e.default) == null ? void 0 : je.registerElement);
|
|
1663
|
-
} catch {
|
|
1664
|
-
}
|
|
1665
|
-
const St = {
|
|
1666
|
-
install: (e) => {
|
|
1667
|
-
if (!globalThis.__QtNaInputView_registered)
|
|
1668
|
-
if (ue) {
|
|
1669
|
-
const i = (u, s) => {
|
|
1670
|
-
ue(u, {
|
|
1671
|
-
component: {
|
|
1672
|
-
name: s ? "QtNaInputView_Plugin" : "QtNaInputView",
|
|
1673
|
-
processEventData(f, v) {
|
|
1674
|
-
const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
|
|
1675
|
-
return l && (l.nativeEvent = r), l;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
});
|
|
1679
|
-
};
|
|
1680
|
-
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");
|
|
1681
|
-
} else
|
|
1682
|
-
console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
|
|
1683
|
-
e.component("NaInputView", Re), e.component("qt-na-input-view", Re);
|
|
1684
|
-
}
|
|
1685
|
-
}, Pt = {
|
|
1644
|
+
}, kt = {
|
|
1686
1645
|
// 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
|
|
1687
1646
|
skipPluginCheck: !1
|
|
1688
1647
|
}, Y = /* @__PURE__ */ new Set();
|
|
1689
|
-
function
|
|
1690
|
-
return
|
|
1648
|
+
function z(e, a, d) {
|
|
1649
|
+
return $({
|
|
1691
1650
|
name: `${e}AsyncWrapper`,
|
|
1692
1651
|
inheritAttrs: !1,
|
|
1693
1652
|
props: {
|
|
@@ -1697,206 +1656,206 @@ function L(e, i, u) {
|
|
|
1697
1656
|
default: !1
|
|
1698
1657
|
}
|
|
1699
1658
|
},
|
|
1700
|
-
setup(
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1659
|
+
setup(u, { slots: v, attrs: g, expose: c }) {
|
|
1660
|
+
const s = A("loading"), h = A(""), l = A(), i = globalThis.__VUE_INSTANCE__;
|
|
1661
|
+
c({
|
|
1703
1662
|
getNativeNode: () => {
|
|
1704
|
-
let
|
|
1705
|
-
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;
|
|
1706
1665
|
},
|
|
1707
|
-
nativeRef:
|
|
1666
|
+
nativeRef: l
|
|
1708
1667
|
});
|
|
1709
|
-
let
|
|
1668
|
+
let w = null, _ = null;
|
|
1710
1669
|
try {
|
|
1711
|
-
|
|
1712
|
-
} catch (
|
|
1713
|
-
console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。",
|
|
1670
|
+
w = Fe(), _ = Ve();
|
|
1671
|
+
} catch (C) {
|
|
1672
|
+
console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", C);
|
|
1714
1673
|
}
|
|
1715
|
-
const
|
|
1716
|
-
if (!
|
|
1674
|
+
const J = async () => {
|
|
1675
|
+
if (!w || typeof w.isComponentRegistered != "function")
|
|
1717
1676
|
return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
|
|
1718
1677
|
try {
|
|
1719
|
-
const
|
|
1720
|
-
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))
|
|
1721
1680
|
return !0;
|
|
1722
1681
|
try {
|
|
1723
|
-
const
|
|
1724
|
-
if (
|
|
1725
|
-
const P =
|
|
1682
|
+
const T = await I.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
|
|
1683
|
+
if (T && T.core_version) {
|
|
1684
|
+
const P = T.core_version;
|
|
1726
1685
|
console.log(`[withAsyncPlugin] 当前引擎核心版本: ${P}`);
|
|
1727
|
-
const
|
|
1728
|
-
if (
|
|
1729
|
-
if (
|
|
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) {
|
|
1730
1689
|
console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${e}`);
|
|
1731
|
-
const
|
|
1732
|
-
console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${
|
|
1733
|
-
const [
|
|
1734
|
-
|
|
1735
|
-
|
|
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)
|
|
1736
1695
|
]);
|
|
1737
|
-
if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${
|
|
1696
|
+
if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${G}, ${R}]`), G === !0 || R === !0)
|
|
1738
1697
|
return !0;
|
|
1739
1698
|
} else
|
|
1740
1699
|
console.log(`[withAsyncPlugin] 引擎版本 ${P} < 1.11.205,跳过 ExtendModule 检查`);
|
|
1741
1700
|
else
|
|
1742
1701
|
console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${P}`);
|
|
1743
1702
|
}
|
|
1744
|
-
} catch (
|
|
1745
|
-
console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:",
|
|
1703
|
+
} catch (T) {
|
|
1704
|
+
console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", T);
|
|
1746
1705
|
}
|
|
1747
1706
|
return !1;
|
|
1748
|
-
} catch (
|
|
1749
|
-
return console.warn("[withAsyncPlugin] 检查组件注册状态异常:",
|
|
1707
|
+
} catch (C) {
|
|
1708
|
+
return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", C), !1;
|
|
1750
1709
|
}
|
|
1751
1710
|
}, U = async () => {
|
|
1752
|
-
if (
|
|
1753
|
-
console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`),
|
|
1711
|
+
if (kt.skipPluginCheck || u.skipPluginCheck) {
|
|
1712
|
+
console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), s.value = "ready";
|
|
1754
1713
|
return;
|
|
1755
1714
|
}
|
|
1756
|
-
if (!
|
|
1757
|
-
|
|
1715
|
+
if (!a) {
|
|
1716
|
+
s.value = "ready";
|
|
1758
1717
|
return;
|
|
1759
1718
|
}
|
|
1760
|
-
const
|
|
1761
|
-
if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`,
|
|
1762
|
-
|
|
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] 组件已注册,跳过安装流程");
|
|
1763
1722
|
return;
|
|
1764
1723
|
}
|
|
1765
|
-
if (!
|
|
1766
|
-
console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`),
|
|
1724
|
+
if (!_) {
|
|
1725
|
+
console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), s.value = "ready";
|
|
1767
1726
|
return;
|
|
1768
1727
|
}
|
|
1769
|
-
console.log(`[withAsyncPlugin] 开始动态安装插件: ${
|
|
1728
|
+
console.log(`[withAsyncPlugin] 开始动态安装插件: ${a}`);
|
|
1770
1729
|
try {
|
|
1771
|
-
await new Promise((
|
|
1772
|
-
let
|
|
1773
|
-
const
|
|
1774
|
-
onPluginInstallSuccess(
|
|
1775
|
-
|
|
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", {
|
|
1776
1735
|
entry: {
|
|
1777
|
-
from:
|
|
1736
|
+
from: d,
|
|
1778
1737
|
method: "setup"
|
|
1779
1738
|
}
|
|
1780
|
-
})) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"),
|
|
1739
|
+
})) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), T()) : P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
|
|
1781
1740
|
},
|
|
1782
|
-
onPluginInstallError(
|
|
1783
|
-
|
|
1741
|
+
onPluginInstallError(N, G, R) {
|
|
1742
|
+
N === a && (clearTimeout(S), _.removeListener(B), P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
|
|
1784
1743
|
}
|
|
1785
1744
|
};
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
}, 8e3), typeof
|
|
1789
|
-
}), await
|
|
1790
|
-
} catch (
|
|
1791
|
-
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";
|
|
1792
1751
|
}
|
|
1793
1752
|
};
|
|
1794
|
-
return
|
|
1753
|
+
return Me(() => {
|
|
1795
1754
|
U();
|
|
1796
1755
|
}), () => {
|
|
1797
|
-
const
|
|
1756
|
+
const C = {
|
|
1798
1757
|
display: "flex",
|
|
1799
1758
|
flexDirection: "column",
|
|
1800
1759
|
justifyContent: "center",
|
|
1801
1760
|
alignItems: "center",
|
|
1802
|
-
...
|
|
1761
|
+
...g.style || {}
|
|
1803
1762
|
};
|
|
1804
|
-
|
|
1805
|
-
const
|
|
1806
|
-
class:
|
|
1807
|
-
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,
|
|
1808
1767
|
// 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
|
|
1809
1768
|
clipChildren: !1,
|
|
1810
1769
|
clipPadding: !1,
|
|
1811
1770
|
clipToPadding: !1
|
|
1812
1771
|
};
|
|
1813
|
-
if (
|
|
1772
|
+
if (s.value === "loading")
|
|
1814
1773
|
return H("div", P, [
|
|
1815
1774
|
H("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
|
|
1816
1775
|
]);
|
|
1817
|
-
if (
|
|
1776
|
+
if (s.value === "error")
|
|
1818
1777
|
return H("div", P, [
|
|
1819
|
-
H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${
|
|
1778
|
+
H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${h.value}`)
|
|
1820
1779
|
]);
|
|
1821
|
-
const
|
|
1822
|
-
for (const [
|
|
1823
|
-
if (
|
|
1824
|
-
let
|
|
1825
|
-
|
|
1826
|
-
} else if (
|
|
1827
|
-
let
|
|
1828
|
-
|
|
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;
|
|
1829
1788
|
} else
|
|
1830
|
-
|
|
1831
|
-
const
|
|
1832
|
-
...
|
|
1833
|
-
...
|
|
1834
|
-
class:
|
|
1789
|
+
E.startsWith("onOn") || (S[E] = V);
|
|
1790
|
+
const N = {
|
|
1791
|
+
...S,
|
|
1792
|
+
...B,
|
|
1793
|
+
class: T,
|
|
1835
1794
|
// 把外层 class 传给内部
|
|
1836
|
-
style:
|
|
1795
|
+
style: C,
|
|
1837
1796
|
// 把外层 style 传给内部
|
|
1838
|
-
ref: (
|
|
1839
|
-
|
|
1797
|
+
ref: (E) => {
|
|
1798
|
+
l.value = E;
|
|
1840
1799
|
}
|
|
1841
|
-
},
|
|
1842
|
-
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() : []);
|
|
1843
1802
|
};
|
|
1844
1803
|
}
|
|
1845
1804
|
});
|
|
1846
1805
|
}
|
|
1847
|
-
const
|
|
1806
|
+
const Re = Symbol("AddonEnvContext"), Qe = {
|
|
1848
1807
|
isPluginActive: !1,
|
|
1849
1808
|
nameSuffix: "",
|
|
1850
1809
|
pluginPackageName: "com.quicktvui.plugin.glintui",
|
|
1851
1810
|
builtInVersions: {}
|
|
1852
1811
|
};
|
|
1853
|
-
async function
|
|
1854
|
-
const
|
|
1855
|
-
let
|
|
1812
|
+
async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
|
|
1813
|
+
const d = Fe();
|
|
1814
|
+
let u = {};
|
|
1856
1815
|
try {
|
|
1857
|
-
const
|
|
1858
|
-
|
|
1859
|
-
} catch (
|
|
1860
|
-
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);
|
|
1861
1820
|
}
|
|
1862
|
-
const
|
|
1863
|
-
isPluginActive:
|
|
1864
|
-
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 : "",
|
|
1865
1824
|
// 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
|
|
1866
|
-
pluginPackageName:
|
|
1867
|
-
builtInVersions:
|
|
1825
|
+
pluginPackageName: c ? `${e}.ext` : e,
|
|
1826
|
+
builtInVersions: u
|
|
1868
1827
|
};
|
|
1869
|
-
return console.info("[AddonProvider] Environment initialized:",
|
|
1828
|
+
return console.info("[AddonProvider] Environment initialized:", s), s;
|
|
1870
1829
|
}
|
|
1871
|
-
let
|
|
1872
|
-
function
|
|
1873
|
-
|
|
1830
|
+
let ue = A(Qe);
|
|
1831
|
+
function Dt(e) {
|
|
1832
|
+
ue.value = e, Le(Re, ue);
|
|
1874
1833
|
}
|
|
1875
|
-
function
|
|
1834
|
+
function L() {
|
|
1876
1835
|
var e;
|
|
1877
|
-
return ((e =
|
|
1836
|
+
return ((e = Ue(Re, ue)) == null ? void 0 : e.value) || Qe;
|
|
1878
1837
|
}
|
|
1879
|
-
async function
|
|
1838
|
+
async function Tt(e) {
|
|
1880
1839
|
console.log("[AddonProvider] Sending GridTabs global config to Native:", e);
|
|
1881
1840
|
try {
|
|
1882
|
-
const
|
|
1883
|
-
return console.log("[AddonProvider] Received response from Native:",
|
|
1884
|
-
} catch (
|
|
1885
|
-
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;
|
|
1886
1845
|
}
|
|
1887
1846
|
}
|
|
1888
|
-
async function
|
|
1847
|
+
async function It(e) {
|
|
1889
1848
|
console.log("[AddonProvider] Sending ExtraUI global theme config to Native:", e);
|
|
1890
1849
|
try {
|
|
1891
|
-
const
|
|
1892
|
-
return console.log("[AddonProvider] Received ExtraUI theme response from Native:",
|
|
1893
|
-
} catch (
|
|
1894
|
-
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;
|
|
1895
1854
|
}
|
|
1896
1855
|
}
|
|
1897
|
-
async function
|
|
1856
|
+
async function Mt(e) {
|
|
1898
1857
|
console.log("[AddonProvider] Initializing global theme across all modules:", e);
|
|
1899
|
-
const
|
|
1858
|
+
const a = await It(e), d = await Tt({
|
|
1900
1859
|
themeConfig: {
|
|
1901
1860
|
placeholderColor: e.placeholderColor,
|
|
1902
1861
|
glowColor: e.glowColor || e.focusBackgroundColor,
|
|
@@ -1915,50 +1874,48 @@ async function Wt(e) {
|
|
|
1915
1874
|
// 更多属性映射根据后续 Glint/GridTabs 支持情况添加
|
|
1916
1875
|
}
|
|
1917
1876
|
});
|
|
1918
|
-
return
|
|
1877
|
+
return a && d;
|
|
1919
1878
|
}
|
|
1920
|
-
const
|
|
1879
|
+
const zt = {
|
|
1921
1880
|
install: (e) => {
|
|
1922
|
-
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);
|
|
1923
1882
|
}
|
|
1924
1883
|
};
|
|
1925
1884
|
export {
|
|
1926
|
-
|
|
1885
|
+
Re as ADDON_ENV_CONTEXT_KEY,
|
|
1927
1886
|
X as GridTabs,
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
_t as useGridTabs,
|
|
1963
|
-
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
|
|
1964
1921
|
};
|