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