@wanlianyida/portal-kit 0.1.1 → 0.1.2

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import './style.css';
2
- import { defineComponent as xe, computed as M, ref as y, reactive as j, watch as U, onUnmounted as We, openBlock as C, createBlock as _e, Teleport as Ee, createElementBlock as P, normalizeStyle as Ce, normalizeClass as Z, createElementVNode as s, toDisplayString as v, createVNode as f, unref as p, withModifiers as Ge, withCtx as h, Fragment as He, renderList as Ke, createTextVNode as I, createCommentVNode as ee, onMounted as Ye, onBeforeUnmount as Xe, renderSlot as Ze, withDirectives as Je, vModelText as Qe } from "vue";
3
- import { ElForm as je, ElFormItem as J, ElRadioGroup as et, ElRadio as ie, ElInput as we, ElButton as te, ElTooltip as tt, ElMessage as ce, ElDialog as ot } from "element-plus";
2
+ import { defineComponent as se, computed as F, ref as E, watch as J, reactive as te, onUnmounted as Ae, openBlock as I, createBlock as ue, Teleport as de, createElementBlock as x, normalizeStyle as me, normalizeClass as P, createElementVNode as g, toDisplayString as y, createVNode as p, unref as m, withModifiers as Ce, withCtx as h, Fragment as Re, renderList as Ie, createTextVNode as T, createCommentVNode as Y, onMounted as Se, onBeforeUnmount as Qe, renderSlot as Be, withDirectives as Te, vModelText as xe } from "vue";
3
+ import { ElForm as Ge, ElFormItem as D, ElRadioGroup as Me, ElRadio as ee, ElInput as ie, ElButton as X, ElTooltip as Ne, ElMessage as oe, ElDialog as He } from "element-plus";
4
4
  import "element-plus/es/components/button/style/css";
5
5
  import "element-plus/es/components/form/style/css";
6
6
  import "element-plus/es/components/form-item/style/css";
@@ -10,30 +10,30 @@ import "element-plus/es/components/radio/style/css";
10
10
  import "element-plus/es/components/radio-group/style/css";
11
11
  import "element-plus/es/components/tooltip/style/css";
12
12
  import "element-plus/es/components/dialog/style/css";
13
- const nt = ["", "很差", "较差", "一般", "较好", "很好"], at = {
13
+ const Fe = ["", "很差", "较差", "一般", "较好", "很好"], Ue = {
14
14
  experience: "体验问题",
15
15
  suggestion: "功能建议",
16
16
  other: "其他"
17
- }, rt = ["feishu.cn", "larksuite.com", "larkoffice.com"], Se = "https://bytedance.larkoffice.com/base/workflow/webhook/event/D9h2a3gAkwESDohg6xKcqhq7nZe";
18
- class se extends Error {
17
+ }, Je = ["feishu.cn", "larksuite.com", "larkoffice.com"], fe = "https://bytedance.larkoffice.com/base/workflow/webhook/event/D9h2a3gAkwESDohg6xKcqhq7nZe";
18
+ class ne extends Error {
19
19
  constructor() {
20
20
  super("Feishu feedback webhook is missing or not an https Feishu host"), this.name = "FeedbackChannelError";
21
21
  }
22
22
  }
23
- function Me(a) {
23
+ function pe(n) {
24
24
  try {
25
- const o = new URL(a);
26
- if (o.protocol !== "https:") return !1;
27
- const t = o.hostname.toLowerCase();
28
- return rt.some((m) => t === m || t.endsWith(`.${m}`));
25
+ const t = new URL(n);
26
+ if (t.protocol !== "https:") return !1;
27
+ const e = t.hostname.toLowerCase();
28
+ return Je.some((f) => e === f || e.endsWith(`.${f}`));
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
32
  }
33
- function Fe(a, o) {
34
- return a || Me(o);
33
+ function ge(n, t) {
34
+ return n || pe(t);
35
35
  }
36
- function lt(a) {
36
+ function Oe(n) {
37
37
  return new Intl.DateTimeFormat("sv-SE", {
38
38
  timeZone: "Asia/Shanghai",
39
39
  year: "numeric",
@@ -43,41 +43,41 @@ function lt(a) {
43
43
  minute: "2-digit",
44
44
  second: "2-digit",
45
45
  hourCycle: "h23"
46
- }).format(a).replace("T", " ");
46
+ }).format(n).replace("T", " ");
47
47
  }
48
- function it(a, o = /* @__PURE__ */ new Date()) {
49
- var m;
50
- const t = a.score;
48
+ function Le(n, t = /* @__PURE__ */ new Date()) {
49
+ var f;
50
+ const e = n.score;
51
51
  return {
52
- score: t,
53
- scoreLabel: nt[t] ?? "",
54
- category: a.category,
55
- categoryLabel: at[a.category],
56
- content: a.content.trim().slice(0, 500),
57
- contact: a.contact.trim().slice(0, 80),
58
- source: a.source.trim().slice(0, 40),
59
- page: a.page.slice(0, 200),
60
- appName: a.appName.slice(0, 80),
61
- appKey: a.appKey.slice(0, 80),
62
- merchant: a.merchant.slice(0, 80),
63
- locale: a.locale.slice(0, 16),
64
- kind: (((m = a.kind) == null ? void 0 : m.trim()) || "反馈").slice(0, 20),
65
- quote: (a.quote ?? "").trim().slice(0, 500),
66
- submittedAt: lt(o),
52
+ score: e,
53
+ scoreLabel: Fe[e] ?? "",
54
+ category: n.category,
55
+ categoryLabel: Ue[n.category],
56
+ content: n.content.trim().slice(0, 500),
57
+ contact: n.contact.trim().slice(0, 80),
58
+ source: n.source.trim().slice(0, 40),
59
+ page: n.page.slice(0, 200),
60
+ appName: n.appName.slice(0, 80),
61
+ appKey: n.appKey.slice(0, 80),
62
+ merchant: n.merchant.slice(0, 80),
63
+ locale: n.locale.slice(0, 16),
64
+ kind: (((f = n.kind) == null ? void 0 : f.trim()) || "反馈").slice(0, 20),
65
+ quote: (n.quote ?? "").trim().slice(0, 500),
66
+ submittedAt: Oe(t),
67
67
  userAgent: (typeof navigator > "u" ? "" : navigator.userAgent).slice(0, 300)
68
68
  };
69
69
  }
70
- async function Le(a, o, t = /* @__PURE__ */ new Date()) {
71
- const m = o.trim();
72
- if (!Me(m)) throw new se();
73
- await fetch(m, {
70
+ async function he(n, t, e = /* @__PURE__ */ new Date()) {
71
+ const f = t.trim();
72
+ if (!pe(f)) throw new ne();
73
+ await fetch(f, {
74
74
  method: "POST",
75
75
  mode: "no-cors",
76
76
  headers: { "Content-Type": "text/plain;charset=UTF-8" },
77
- body: JSON.stringify(it(a, t))
77
+ body: JSON.stringify(Le(n, e))
78
78
  });
79
79
  }
80
- const ct = {
80
+ const qe = {
81
81
  entry: "问题反馈",
82
82
  title: "问题反馈",
83
83
  hint: "说说这次使用的感受,我们会记下来跟进。",
@@ -104,7 +104,7 @@ const ct = {
104
104
  channelMissing: "反馈通道还没配置,暂时无法提交",
105
105
  close: "关闭反馈",
106
106
  cancel: "取消"
107
- }, st = {
107
+ }, We = {
108
108
  entry: "Feedback",
109
109
  title: "Feedback",
110
110
  hint: "Tell us how this visit felt. We will record it and follow up.",
@@ -132,19 +132,13 @@ const ct = {
132
132
  close: "Close feedback",
133
133
  cancel: "Cancel"
134
134
  };
135
- function ut(a, o) {
136
- return (a.toLowerCase().startsWith("en") ? st : ct)[o];
135
+ function Ke(n, t) {
136
+ return (n.toLowerCase().startsWith("en") ? We : qe)[t];
137
137
  }
138
- const dt = { class: "feedback-head" }, mt = { id: "feedback-title" }, ft = ["aria-label"], pt = { class: "feedback-hint" }, ht = ["aria-label"], gt = ["aria-pressed", "aria-label", "onClick"], vt = { class: "feedback-context" }, yt = { class: "feedback-actions" }, bt = ["aria-label", "aria-expanded"], wt = {
139
- class: "feedback-mark",
140
- viewBox: "0 0 24 24",
141
- width: "28",
142
- height: "28",
143
- "aria-hidden": "true"
144
- }, kt = ["transform"], xt = ["transform"], _t = ["transform"], Q = 56, N = 12, ke = "wop-feedback-anchor", Et = 700, Ct = 5, St = 2.05, Mt = 1.55, Ft = /* @__PURE__ */ xe({
138
+ const je = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AeydCbhdVXXH7xNlUAvKPImBhBIxhJhiAxZrmMoMKWGWGoqKVWoAERRpgVS+gB8IJKVCoRXjJ4OAWgGHMgWxhdKAhEEt/VLURKWACEgBrcPz93/vhnff47779tpnuPucs9631tvn3LvW3mv/9/7fM+2z96ta/ucIOALjIuAEGRca/8IRaLWcIN4LHIEeCDhBeoDjXzkCThDvA45ADwQKJEiPUv0rR6AiCDhBKtJQHmZ/EHCC9Ad3L7UiCDhBKtJQHmZ/EHCC9Ad3L7UiCFSTIBUB18OsPgJOkOq3odegQAScIAWC61lXHwEnSPXb0GtQIAJOkALB9ayrj4ATZEwb+q4j0ImAE6QTDd92BMYg4AQZA4jvOgKdC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JfTDbL8R/RCqtwX1kE9zNh3Gd/5uBqC4jEagMQRZXW2I8Cx6KarJIvSQr7JzNq2uk6fFIdA4ghQHpedcRwScIHVsVa9TbghUgCC51dUzcgTMCDhBzJC5Q5MQcII0qbW9rmYEnCBmyNyhSQg4QZrU2l5XMwLNJogZLndoGgJOkKa1uNfXhIATxASXGzcNASdI01rc62tCwAligsuNm4aAE6SgFvds64HA7wEAAP///QMAOQAAAAZJREFUAwD6UGQnl56o1QAAAABJRU5ErkJggg==", Ve = { class: "feedback-head" }, Pe = { id: "feedback-title" }, De = ["aria-label"], Ze = { class: "feedback-hint" }, Ye = ["aria-label"], Xe = ["aria-pressed", "aria-label", "onClick"], ze = { class: "feedback-context" }, _e = { class: "feedback-actions" }, $e = ["aria-label", "aria-expanded"], et = ["src"], Z = 56, H = 12, ce = "wop-feedback-anchor", tt = 700, ot = 5, nt = /* @__PURE__ */ se({
145
139
  __name: "FeedbackWidget",
146
140
  props: {
147
- webhookUrl: { default: Se },
141
+ webhookUrl: { default: fe },
148
142
  dev: { type: Boolean, default: !1 },
149
143
  page: { default: "" },
150
144
  locale: { default: "zh-CN" },
@@ -153,298 +147,261 @@ const dt = { class: "feedback-head" }, mt = { id: "feedback-title" }, ft = ["ari
153
147
  appKey: { default: "" },
154
148
  merchant: { default: "" }
155
149
  },
156
- setup(a) {
157
- const o = a;
158
- function t(e) {
159
- return ut(o.locale, e);
160
- }
161
- const m = M(() => Fe(o.dev, o.webhookUrl)), d = y(!1), F = y(), u = y(R()), x = y(!S()), _ = y(!1), g = j({ x: 0, y: 0, angle: 0 }), z = M(() => `translate(${g.x.toFixed(2)} ${g.y.toFixed(2)})`), b = M(() => `rotate(${g.angle.toFixed(1)} 9.7 12.2)`), oe = M(() => `rotate(${g.angle.toFixed(1)} 14.7 12.2)`);
162
- let w = 0, q = 0, B = !1, $ = !1, L = 0, r = null, c = !1, k = 0;
163
- function S() {
150
+ setup(n) {
151
+ const t = n;
152
+ function e(o) {
153
+ return Ke(t.locale, o);
154
+ }
155
+ const f = F(() => ge(t.dev, t.webhookUrl)), d = E(!1), B = E(), i = E(L()), b = E(!O()), k = E(!1);
156
+ let c = null, G = !1, v = 0;
157
+ function O() {
164
158
  return typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
165
159
  }
166
- function T(e, n) {
167
- const l = Math.max(N, window.innerWidth - Q - N), D = Math.max(N, window.innerHeight - Q - N);
160
+ function w(o, a) {
161
+ const r = Math.max(H, window.innerWidth - Z - H), le = Math.max(H, window.innerHeight - Z - H);
168
162
  return {
169
- x: Math.min(Math.max(N, e), l),
170
- y: Math.min(Math.max(N, n), D)
163
+ x: Math.min(Math.max(H, o), r),
164
+ y: Math.min(Math.max(H, a), le)
171
165
  };
172
166
  }
173
- function R() {
167
+ function L() {
174
168
  try {
175
- const e = localStorage.getItem(ke);
176
- if (!e) return null;
177
- const n = JSON.parse(e);
178
- return typeof n.x != "number" || typeof n.y != "number" ? null : T(n.x, n.y);
169
+ const o = localStorage.getItem(ce);
170
+ if (!o) return null;
171
+ const a = JSON.parse(o);
172
+ return typeof a.x != "number" || typeof a.y != "number" ? null : w(a.x, a.y);
179
173
  } catch {
180
174
  return null;
181
175
  }
182
176
  }
183
- function V(e) {
177
+ function q(o) {
184
178
  try {
185
- localStorage.setItem(ke, JSON.stringify(e));
179
+ localStorage.setItem(ce, JSON.stringify(o));
186
180
  } catch {
187
181
  }
188
182
  }
189
- const W = M(
190
- () => u.value ? { left: `${u.value.x}px`, top: `${u.value.y}px` } : void 0
183
+ const z = F(
184
+ () => i.value ? { left: `${i.value.x}px`, top: `${i.value.y}px` } : void 0
191
185
  );
192
- function A() {
193
- return u.value ? u.value : {
194
- x: window.innerWidth - Q - 24,
195
- y: window.innerHeight - Q - 24
186
+ function W() {
187
+ return i.value ? i.value : {
188
+ x: window.innerWidth - Z - 24,
189
+ y: window.innerHeight - Z - 24
196
190
  };
197
191
  }
198
- const O = M(() => A().x < window.innerWidth * 0.45), Te = M(() => A().y < 280);
199
- function ue() {
200
- if (window.clearTimeout(k), S()) {
201
- x.value = !1;
192
+ const s = F(() => W().x < window.innerWidth * 0.45), u = F(() => W().y < 280);
193
+ function A() {
194
+ if (window.clearTimeout(v), O()) {
195
+ b.value = !1;
202
196
  return;
203
197
  }
204
- x.value = !1, k = window.setTimeout(() => {
205
- r || (x.value = !0);
206
- }, Et);
207
- }
208
- function Re(e) {
209
- w = e.clientX, q = e.clientY, B = !0;
198
+ b.value = !1, v = window.setTimeout(() => {
199
+ c || (b.value = !0);
200
+ }, tt);
210
201
  }
211
- function Ae(e) {
212
- const n = Math.sin(e / 900) * 0.12, l = Math.cos(e / 1100) * 0.08, D = Math.sin(e / 800) * 4, ye = F.value;
213
- if (!ye || !B)
214
- return {
215
- x: Math.sin(e / 1400) * 0.35,
216
- y: Math.cos(e / 1600) * 0.2,
217
- angle: Math.sin(e / 1300) * 12
218
- };
219
- const Y = ye.getBoundingClientRect(), re = w - (Y.left + Y.width / 2), le = q - (Y.top + Y.height / 2), X = Math.hypot(re, le);
220
- if (X < 8) return { x: n, y: l, angle: D };
221
- const be = Math.min(X / 240, 1), Ve = Math.atan2(le, re) * 180 / Math.PI;
222
- return {
223
- x: re / X * St * be + n,
224
- y: le / X * Mt * be + l,
225
- angle: Ve + D
226
- };
227
- }
228
- function de(e) {
229
- if (L = 0, !!$) {
230
- if (!document.hidden) {
231
- const n = Ae(e);
232
- g.x += (n.x - g.x) * 0.14, g.y += (n.y - g.y) * 0.14;
233
- let l = n.angle - g.angle;
234
- l = ((l + 180) % 360 + 360) % 360 - 180, g.angle += l * 0.14;
235
- }
236
- L = requestAnimationFrame(de);
237
- }
238
- }
239
- function Oe() {
240
- $ || S() || ($ = !0, L = requestAnimationFrame(de));
241
- }
242
- function Ie() {
243
- $ = !1, L && cancelAnimationFrame(L), L = 0;
244
- }
245
- function me(e) {
246
- Re(e), !r && ue();
202
+ function S() {
203
+ c || A();
247
204
  }
248
- function fe() {
249
- u.value && (u.value = T(u.value.x, u.value.y));
205
+ function M() {
206
+ i.value && (i.value = w(i.value.x, i.value.y));
250
207
  }
251
- function pe() {
252
- window.removeEventListener("pointermove", he), window.removeEventListener("pointerup", G), window.removeEventListener("pointercancel", G);
208
+ function Q() {
209
+ window.removeEventListener("pointermove", U), window.removeEventListener("pointerup", R), window.removeEventListener("pointercancel", R);
253
210
  }
254
- function $e(e) {
255
- var l;
256
- if (e.button !== 0 || !K.value) return;
257
- const n = K.value.getBoundingClientRect();
258
- r = {
259
- pointerId: e.pointerId,
260
- x: e.clientX,
261
- y: e.clientY,
262
- left: n.left,
263
- top: n.top,
211
+ function K(o) {
212
+ var r;
213
+ if (o.button !== 0 || !V.value) return;
214
+ const a = V.value.getBoundingClientRect();
215
+ c = {
216
+ pointerId: o.pointerId,
217
+ x: o.clientX,
218
+ y: o.clientY,
219
+ left: a.left,
220
+ top: a.top,
264
221
  moved: !1
265
- }, x.value = !1, window.addEventListener("pointermove", he), window.addEventListener("pointerup", G), window.addEventListener("pointercancel", G);
222
+ }, b.value = !1, window.addEventListener("pointermove", U), window.addEventListener("pointerup", R), window.addEventListener("pointercancel", R);
266
223
  try {
267
- (l = F.value) == null || l.setPointerCapture(e.pointerId);
224
+ (r = B.value) == null || r.setPointerCapture(o.pointerId);
268
225
  } catch {
269
226
  }
270
227
  }
271
- function he(e) {
272
- if (!r || e.pointerId !== r.pointerId) return;
273
- const n = e.clientX - r.x, l = e.clientY - r.y;
274
- !r.moved && Math.hypot(n, l) < Ct || (r.moved = !0, _.value = !0, u.value = T(r.left + n, r.top + l));
228
+ function U(o) {
229
+ if (!c || o.pointerId !== c.pointerId) return;
230
+ const a = o.clientX - c.x, r = o.clientY - c.y;
231
+ !c.moved && Math.hypot(a, r) < ot || (c.moved = !0, k.value = !0, i.value = w(c.left + a, c.top + r));
275
232
  }
276
- function G(e) {
277
- if (!r || e.pointerId !== r.pointerId) return;
278
- const n = r.moved;
279
- r = null, _.value = !1, pe(), n && u.value && (c = !0, V(u.value)), ue();
233
+ function R(o) {
234
+ if (!c || o.pointerId !== c.pointerId) return;
235
+ const a = c.moved;
236
+ c = null, k.value = !1, Q(), a && i.value && (G = !0, q(i.value)), A();
280
237
  }
281
- function Ne() {
282
- if (c) {
283
- c = !1;
238
+ function N() {
239
+ if (G) {
240
+ G = !1;
284
241
  return;
285
242
  }
286
243
  d.value = !d.value;
287
244
  }
288
- function qe() {
289
- window.addEventListener("pointermove", me, { passive: !0 }), window.addEventListener("resize", fe), Oe();
245
+ function ye() {
246
+ window.addEventListener("pointermove", S, { passive: !0 }), window.addEventListener("resize", M);
290
247
  }
291
- function ge() {
292
- window.removeEventListener("pointermove", me), window.removeEventListener("resize", fe), pe(), window.clearTimeout(k), Ie();
248
+ function ae() {
249
+ window.removeEventListener("pointermove", S), window.removeEventListener("resize", M), Q(), window.clearTimeout(v);
293
250
  }
294
- U(m, (e) => e ? qe() : ge(), { immediate: !0 });
295
- const H = y(!1), K = y(), i = j({
251
+ J(f, (o) => o ? ye() : ae(), { immediate: !0 });
252
+ const j = E(!1), V = E(), l = te({
296
253
  score: 0,
297
254
  category: "experience",
298
255
  content: "",
299
256
  contact: ""
300
- }), E = j({ score: "", content: "" }), Be = M(() => [
301
- { value: 1, label: t("scorePoor") },
302
- { value: 2, label: t("scoreFair") },
303
- { value: 3, label: t("scoreOk") },
304
- { value: 4, label: t("scoreGood") },
305
- { value: 5, label: t("scoreGreat") }
257
+ }), C = te({ score: "", content: "" }), we = F(() => [
258
+ { value: 1, label: e("scorePoor") },
259
+ { value: 2, label: e("scoreFair") },
260
+ { value: 3, label: e("scoreOk") },
261
+ { value: 4, label: e("scoreGood") },
262
+ { value: 5, label: e("scoreGreat") }
306
263
  ]);
307
- function ve() {
308
- i.score = 0, i.category = "experience", i.content = "", i.contact = "", E.score = "", E.content = "";
264
+ function re() {
265
+ l.score = 0, l.category = "experience", l.content = "", l.contact = "", C.score = "", C.content = "";
309
266
  }
310
- function ne(e) {
311
- var l;
312
- const n = e.target;
313
- !(n instanceof Node) || (l = K.value) != null && l.contains(n) || (d.value = !1);
267
+ function _(o) {
268
+ var r;
269
+ const a = o.target;
270
+ !(a instanceof Node) || (r = V.value) != null && r.contains(a) || (d.value = !1);
314
271
  }
315
- function ae(e) {
316
- e.key === "Escape" && (d.value = !1);
272
+ function $(o) {
273
+ o.key === "Escape" && (d.value = !1);
317
274
  }
318
- U(d, (e) => {
319
- if (e) {
320
- document.addEventListener("pointerdown", ne), document.addEventListener("keydown", ae);
275
+ J(d, (o) => {
276
+ if (o) {
277
+ document.addEventListener("pointerdown", _), document.addEventListener("keydown", $);
321
278
  return;
322
279
  }
323
- ve(), document.removeEventListener("pointerdown", ne), document.removeEventListener("keydown", ae);
324
- }), U(
325
- () => i.score,
326
- (e) => {
327
- e >= 1 && (E.score = "");
280
+ re(), document.removeEventListener("pointerdown", _), document.removeEventListener("keydown", $);
281
+ }), J(
282
+ () => l.score,
283
+ (o) => {
284
+ o >= 1 && (C.score = "");
328
285
  }
329
- ), U(
330
- () => i.content,
331
- (e) => {
332
- e.trim() && (E.content = "");
286
+ ), J(
287
+ () => l.content,
288
+ (o) => {
289
+ o.trim() && (C.content = "");
333
290
  }
334
- ), We(() => {
335
- ge(), document.removeEventListener("pointerdown", ne), document.removeEventListener("keydown", ae);
291
+ ), Ae(() => {
292
+ ae(), document.removeEventListener("pointerdown", _), document.removeEventListener("keydown", $);
336
293
  });
337
- function De() {
338
- return o.page ? o.page : typeof window > "u" ? "" : window.location.pathname;
294
+ function Ee() {
295
+ return t.page ? t.page : typeof window > "u" ? "" : window.location.pathname;
339
296
  }
340
- function Ue() {
341
- return E.score = i.score >= 1 && i.score <= 5 ? "" : t("scoreRequired"), E.content = i.content.trim() ? "" : t("contentRequired"), !E.score && !E.content;
297
+ function be() {
298
+ return C.score = l.score >= 1 && l.score <= 5 ? "" : e("scoreRequired"), C.content = l.content.trim() ? "" : e("contentRequired"), !C.score && !C.content;
342
299
  }
343
- async function ze() {
344
- if (!(H.value || !Ue())) {
345
- H.value = !0;
300
+ async function ke() {
301
+ if (!(j.value || !be())) {
302
+ j.value = !0;
346
303
  try {
347
- await Le(
304
+ await he(
348
305
  {
349
- score: i.score,
350
- category: i.category,
351
- content: i.content,
352
- contact: i.contact,
353
- page: De(),
354
- source: o.source,
355
- appName: o.appName,
356
- appKey: o.appKey,
357
- merchant: o.merchant,
358
- locale: o.locale,
306
+ score: l.score,
307
+ category: l.category,
308
+ content: l.content,
309
+ contact: l.contact,
310
+ page: Ee(),
311
+ source: t.source,
312
+ appName: t.appName,
313
+ appKey: t.appKey,
314
+ merchant: t.merchant,
315
+ locale: t.locale,
359
316
  kind: "反馈"
360
317
  },
361
- o.webhookUrl
362
- ), ce.success(t("submitted")), d.value = !1, ve();
363
- } catch (e) {
364
- const n = e instanceof se ? t("channelMissing") : t("submitFailed");
365
- ce.error(n);
318
+ t.webhookUrl
319
+ ), oe.success(e("submitted")), d.value = !1, re();
320
+ } catch (o) {
321
+ const a = o instanceof ne ? e("channelMissing") : e("submitFailed");
322
+ oe.error(a);
366
323
  } finally {
367
- H.value = !1;
324
+ j.value = !1;
368
325
  }
369
326
  }
370
327
  }
371
- return (e, n) => (C(), _e(Ee, { to: "body" }, [
372
- m.value ? (C(), P("div", {
328
+ return (o, a) => (I(), ue(de, { to: "body" }, [
329
+ f.value ? (I(), x("div", {
373
330
  key: 0,
374
331
  ref_key: "root",
375
- ref: K,
376
- class: Z(["feedback", { "is-placed": u.value, "is-dragging": _.value }]),
377
- style: Ce(W.value)
332
+ ref: V,
333
+ class: P(["feedback", { "is-placed": i.value, "is-dragging": k.value }]),
334
+ style: me(z.value)
378
335
  }, [
379
- d.value ? (C(), P("section", {
336
+ d.value ? (I(), x("section", {
380
337
  key: 0,
381
- class: Z(["feedback-panel", { "is-on-right": O.value, "is-below": Te.value }]),
338
+ class: P(["feedback-panel", { "is-on-right": s.value, "is-below": u.value }]),
382
339
  role: "dialog",
383
340
  "aria-labelledby": "feedback-title"
384
341
  }, [
385
- s("header", dt, [
386
- s("h2", mt, v(t("title")), 1),
387
- s("button", {
342
+ g("header", Ve, [
343
+ g("h2", Pe, y(e("title")), 1),
344
+ g("button", {
388
345
  type: "button",
389
346
  class: "feedback-close",
390
- "aria-label": t("close"),
391
- onClick: n[0] || (n[0] = (l) => d.value = !1)
392
- }, " × ", 8, ft)
347
+ "aria-label": e("close"),
348
+ onClick: a[0] || (a[0] = (r) => d.value = !1)
349
+ }, " × ", 8, De)
393
350
  ]),
394
- s("p", pt, v(t("hint")), 1),
395
- f(p(je), {
351
+ g("p", Ze, y(e("hint")), 1),
352
+ p(m(Ge), {
396
353
  "label-position": "top",
397
354
  "require-asterisk-position": "right",
398
- onSubmit: Ge(ze, ["prevent"])
355
+ onSubmit: Ce(ke, ["prevent"])
399
356
  }, {
400
357
  default: h(() => [
401
- f(p(J), {
402
- label: t("score"),
403
- error: E.score,
358
+ p(m(D), {
359
+ label: e("score"),
360
+ error: C.score,
404
361
  required: ""
405
362
  }, {
406
363
  default: h(() => [
407
- s("div", {
364
+ g("div", {
408
365
  class: "feedback-scores",
409
366
  role: "group",
410
- "aria-label": t("score")
367
+ "aria-label": e("score")
411
368
  }, [
412
- (C(!0), P(He, null, Ke(Be.value, (l) => (C(), P("button", {
413
- key: l.value,
369
+ (I(!0), x(Re, null, Ie(we.value, (r) => (I(), x("button", {
370
+ key: r.value,
414
371
  type: "button",
415
- class: Z(["feedback-score", { "is-active": i.score === l.value }]),
416
- "aria-pressed": i.score === l.value,
417
- "aria-label": l.label,
418
- onClick: (D) => i.score = l.value
419
- }, v(l.label), 11, gt))), 128))
420
- ], 8, ht)
372
+ class: P(["feedback-score", { "is-active": l.score === r.value }]),
373
+ "aria-pressed": l.score === r.value,
374
+ "aria-label": r.label,
375
+ onClick: (le) => l.score = r.value
376
+ }, y(r.label), 11, Xe))), 128))
377
+ ], 8, Ye)
421
378
  ]),
422
379
  _: 1
423
380
  }, 8, ["label", "error"]),
424
- f(p(J), {
425
- label: t("category")
381
+ p(m(D), {
382
+ label: e("category")
426
383
  }, {
427
384
  default: h(() => [
428
- f(p(et), {
429
- modelValue: i.category,
430
- "onUpdate:modelValue": n[1] || (n[1] = (l) => i.category = l)
385
+ p(m(Me), {
386
+ modelValue: l.category,
387
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => l.category = r)
431
388
  }, {
432
389
  default: h(() => [
433
- f(p(ie), { value: "experience" }, {
390
+ p(m(ee), { value: "experience" }, {
434
391
  default: h(() => [
435
- I(v(t("categoryExperience")), 1)
392
+ T(y(e("categoryExperience")), 1)
436
393
  ]),
437
394
  _: 1
438
395
  }),
439
- f(p(ie), { value: "suggestion" }, {
396
+ p(m(ee), { value: "suggestion" }, {
440
397
  default: h(() => [
441
- I(v(t("categorySuggestion")), 1)
398
+ T(y(e("categorySuggestion")), 1)
442
399
  ]),
443
400
  _: 1
444
401
  }),
445
- f(p(ie), { value: "other" }, {
402
+ p(m(ee), { value: "other" }, {
446
403
  default: h(() => [
447
- I(v(t("categoryOther")), 1)
404
+ T(y(e("categoryOther")), 1)
448
405
  ]),
449
406
  _: 1
450
407
  })
@@ -454,54 +411,54 @@ const dt = { class: "feedback-head" }, mt = { id: "feedback-title" }, ft = ["ari
454
411
  ]),
455
412
  _: 1
456
413
  }, 8, ["label"]),
457
- f(p(J), {
458
- label: t("content"),
459
- error: E.content,
414
+ p(m(D), {
415
+ label: e("content"),
416
+ error: C.content,
460
417
  required: ""
461
418
  }, {
462
419
  default: h(() => [
463
- f(p(we), {
464
- modelValue: i.content,
465
- "onUpdate:modelValue": n[2] || (n[2] = (l) => i.content = l),
420
+ p(m(ie), {
421
+ modelValue: l.content,
422
+ "onUpdate:modelValue": a[2] || (a[2] = (r) => l.content = r),
466
423
  type: "textarea",
467
424
  rows: 4,
468
425
  maxlength: "500",
469
426
  "show-word-limit": "",
470
- placeholder: t("contentPlaceholder")
427
+ placeholder: e("contentPlaceholder")
471
428
  }, null, 8, ["modelValue", "placeholder"])
472
429
  ]),
473
430
  _: 1
474
431
  }, 8, ["label", "error"]),
475
- f(p(J), {
476
- label: t("contact")
432
+ p(m(D), {
433
+ label: e("contact")
477
434
  }, {
478
435
  default: h(() => [
479
- f(p(we), {
480
- modelValue: i.contact,
481
- "onUpdate:modelValue": n[3] || (n[3] = (l) => i.contact = l),
436
+ p(m(ie), {
437
+ modelValue: l.contact,
438
+ "onUpdate:modelValue": a[3] || (a[3] = (r) => l.contact = r),
482
439
  maxlength: "80",
483
- placeholder: t("contactPlaceholder")
440
+ placeholder: e("contactPlaceholder")
484
441
  }, null, 8, ["modelValue", "placeholder"])
485
442
  ]),
486
443
  _: 1
487
444
  }, 8, ["label"]),
488
- s("p", vt, v(t("context")), 1),
489
- s("div", yt, [
490
- f(p(te), {
491
- onClick: n[4] || (n[4] = (l) => d.value = !1)
445
+ g("p", ze, y(e("context")), 1),
446
+ g("div", _e, [
447
+ p(m(X), {
448
+ onClick: a[4] || (a[4] = (r) => d.value = !1)
492
449
  }, {
493
450
  default: h(() => [
494
- I(v(t("cancel")), 1)
451
+ T(y(e("cancel")), 1)
495
452
  ]),
496
453
  _: 1
497
454
  }),
498
- f(p(te), {
455
+ p(m(X), {
499
456
  type: "primary",
500
457
  "native-type": "submit",
501
- loading: H.value
458
+ loading: j.value
502
459
  }, {
503
460
  default: h(() => [
504
- I(v(t("submit")), 1)
461
+ T(y(e("submit")), 1)
505
462
  ]),
506
463
  _: 1
507
464
  }, 8, ["loading"])
@@ -509,64 +466,43 @@ const dt = { class: "feedback-head" }, mt = { id: "feedback-title" }, ft = ["ari
509
466
  ]),
510
467
  _: 1
511
468
  })
512
- ], 2)) : ee("", !0),
513
- f(p(tt), {
514
- content: t("entry"),
515
- placement: O.value ? "right" : "left",
516
- disabled: d.value || _.value
469
+ ], 2)) : Y("", !0),
470
+ p(m(Ne), {
471
+ content: e("entry"),
472
+ placement: s.value ? "right" : "left",
473
+ disabled: d.value || k.value
517
474
  }, {
518
475
  default: h(() => [
519
- s("button", {
476
+ g("button", {
520
477
  ref_key: "entryRef",
521
- ref: F,
478
+ ref: B,
522
479
  type: "button",
523
480
  class: "feedback-entry",
524
- "aria-label": t("entry"),
481
+ "aria-label": e("entry"),
525
482
  "aria-expanded": d.value,
526
- onPointerdown: $e,
527
- onClick: Ne
483
+ onPointerdown: K,
484
+ onClick: N
528
485
  }, [
529
- (C(), P("svg", wt, [
530
- s("g", {
531
- class: Z(["feedback-frame", { "is-hopping": x.value }])
532
- }, [
533
- n[5] || (n[5] = s("rect", {
534
- x: "2.5",
535
- y: "5",
536
- width: "19",
537
- height: "14",
538
- rx: "2.2",
539
- fill: "none",
540
- stroke: "currentColor",
541
- "stroke-width": "1.7"
542
- }, null, -1)),
543
- s("g", { transform: z.value }, [
544
- s("path", {
545
- fill: "currentColor",
546
- transform: b.value,
547
- d: "M8.1 12.2 9.7 10.6 11.3 12.2 9.7 13.8Z"
548
- }, null, 8, xt),
549
- s("path", {
550
- fill: "currentColor",
551
- transform: oe.value,
552
- d: "M13.1 12.2 14.7 10.6 16.3 12.2 14.7 13.8Z"
553
- }, null, 8, _t)
554
- ], 8, kt)
555
- ], 2)
556
- ]))
557
- ], 40, bt)
486
+ g("img", {
487
+ class: P(["feedback-mark feedback-frame", { "is-hopping": b.value }]),
488
+ src: m(je),
489
+ alt: "",
490
+ width: "28",
491
+ height: "28"
492
+ }, null, 10, et)
493
+ ], 40, $e)
558
494
  ]),
559
495
  _: 1
560
496
  }, 8, ["content", "placement", "disabled"])
561
- ], 6)) : ee("", !0)
497
+ ], 6)) : Y("", !0)
562
498
  ]));
563
499
  }
564
- }), Pe = (a, o) => {
565
- const t = a.__vccOpts || a;
566
- for (const [m, d] of o)
567
- t[m] = d;
568
- return t;
569
- }, Jt = /* @__PURE__ */ Pe(Ft, [["__scopeId", "data-v-526e0404"]]), Lt = {
500
+ }), ve = (n, t) => {
501
+ const e = n.__vccOpts || n;
502
+ for (const [f, d] of t)
503
+ e[f] = d;
504
+ return e;
505
+ }, It = /* @__PURE__ */ ve(nt, [["__scopeId", "data-v-d99340e3"]]), at = {
570
506
  commentButton: "评论",
571
507
  commentTitle: "划线评论",
572
508
  commentQuote: "划线内容",
@@ -578,7 +514,7 @@ const dt = { class: "feedback-head" }, mt = { id: "feedback-title" }, ft = ["ari
578
514
  submitFailed: "提交失败,请稍后再试",
579
515
  channelMissing: "反馈通道还没配置,暂时无法提交",
580
516
  cancel: "取消"
581
- }, Pt = {
517
+ }, rt = {
582
518
  commentButton: "Comment",
583
519
  commentTitle: "Inline comment",
584
520
  commentQuote: "Selected text",
@@ -591,16 +527,16 @@ const dt = { class: "feedback-head" }, mt = { id: "feedback-title" }, ft = ["ari
591
527
  channelMissing: "The feedback channel is not configured yet",
592
528
  cancel: "Cancel"
593
529
  };
594
- function Tt(a, o) {
595
- return (a.toLowerCase().startsWith("en") ? Pt : Lt)[o];
530
+ function lt(n, t) {
531
+ return (n.toLowerCase().startsWith("en") ? rt : at)[t];
596
532
  }
597
- const Rt = ["aria-label"], At = { class: "selection-comment-label" }, Ot = { class: "selection-comment-quote" }, It = { class: "selection-comment-field" }, $t = { class: "selection-comment-label" }, Nt = ["placeholder"], qt = {
533
+ const it = ["aria-label"], ct = { class: "selection-comment-label" }, st = { class: "selection-comment-quote" }, ut = { class: "selection-comment-field" }, dt = { class: "selection-comment-label" }, mt = ["placeholder"], ft = {
598
534
  key: 0,
599
535
  class: "selection-comment-error"
600
- }, Bt = /* @__PURE__ */ xe({
536
+ }, pt = /* @__PURE__ */ se({
601
537
  __name: "SelectionComment",
602
538
  props: {
603
- webhookUrl: { default: Se },
539
+ webhookUrl: { default: fe },
604
540
  dev: { type: Boolean, default: !1 },
605
541
  page: { default: "" },
606
542
  locale: { default: "zh-CN" },
@@ -609,115 +545,115 @@ const Rt = ["aria-label"], At = { class: "selection-comment-label" }, Ot = { cla
609
545
  appKey: { default: "" },
610
546
  merchant: { default: "" }
611
547
  },
612
- setup(a) {
613
- const o = a, t = y(), m = y(!1), d = j({ top: 8, left: 8 }), F = y(""), u = y(!1), x = y(""), _ = y(""), g = y(!1), z = M(() => Fe(o.dev, o.webhookUrl));
614
- function b(r) {
615
- return Tt(o.locale, r);
548
+ setup(n) {
549
+ const t = n, e = E(), f = E(!1), d = te({ top: 8, left: 8 }), B = E(""), i = E(!1), b = E(""), k = E(""), c = E(!1), G = F(() => ge(t.dev, t.webhookUrl));
550
+ function v(s) {
551
+ return lt(t.locale, s);
616
552
  }
617
- function oe() {
618
- return o.page ? o.page : typeof window > "u" ? "" : window.location.pathname;
553
+ function O() {
554
+ return t.page ? t.page : typeof window > "u" ? "" : window.location.pathname;
619
555
  }
620
556
  function w() {
621
- m.value = !1;
557
+ f.value = !1;
622
558
  }
623
- function q() {
624
- if (!z.value || u.value) {
559
+ function L() {
560
+ if (!G.value || i.value) {
625
561
  w();
626
562
  return;
627
563
  }
628
- const r = t.value, c = window.getSelection();
629
- if (!r || !c || c.rangeCount === 0 || c.isCollapsed) {
564
+ const s = e.value, u = window.getSelection();
565
+ if (!s || !u || u.rangeCount === 0 || u.isCollapsed) {
630
566
  w();
631
567
  return;
632
568
  }
633
- const k = c.toString().replace(/\s+/g, " ").trim(), S = c.anchorNode, T = S instanceof Element ? S : S == null ? void 0 : S.parentElement;
634
- if (!k || !T || !r.contains(T)) {
569
+ const A = u.toString().replace(/\s+/g, " ").trim(), S = u.anchorNode, M = S instanceof Element ? S : S == null ? void 0 : S.parentElement;
570
+ if (!A || !M || !s.contains(M)) {
635
571
  w();
636
572
  return;
637
573
  }
638
- if (T.closest("input, textarea, .selection-comment-trigger, .selection-comment-dialog")) {
574
+ if (M.closest("input, textarea, .selection-comment-trigger, .selection-comment-dialog")) {
639
575
  w();
640
576
  return;
641
577
  }
642
- const R = c.getRangeAt(0).getBoundingClientRect(), V = 36, W = window.innerWidth || 0;
643
- let A = R.top - 44, O = R.right - V;
644
- !R.width && !R.height ? (A = 8, O = 8) : A < 8 && (A = R.bottom + 8), W > 0 && (O = Math.min(Math.max(8, O), W - V - 8)), d.top = A, d.left = O, F.value = k.slice(0, 500), m.value = !0;
578
+ const Q = u.getRangeAt(0).getBoundingClientRect(), K = 36, U = window.innerWidth || 0;
579
+ let R = Q.top - 44, N = Q.right - K;
580
+ !Q.width && !Q.height ? (R = 8, N = 8) : R < 8 && (R = Q.bottom + 8), U > 0 && (N = Math.min(Math.max(8, N), U - K - 8)), d.top = R, d.left = N, B.value = A.slice(0, 500), f.value = !0;
645
581
  }
646
- function B(r) {
647
- r.preventDefault();
582
+ function q(s) {
583
+ s.preventDefault();
648
584
  }
649
- function $() {
650
- var r;
651
- F.value && (x.value = "", _.value = "", u.value = !0, w(), (r = window.getSelection()) == null || r.removeAllRanges());
585
+ function z() {
586
+ var s;
587
+ B.value && (b.value = "", k.value = "", i.value = !0, w(), (s = window.getSelection()) == null || s.removeAllRanges());
652
588
  }
653
- async function L() {
654
- const r = x.value.trim();
655
- if (!r) {
656
- _.value = b("commentRequired");
589
+ async function W() {
590
+ const s = b.value.trim();
591
+ if (!s) {
592
+ k.value = v("commentRequired");
657
593
  return;
658
594
  }
659
- if (!g.value) {
660
- g.value = !0;
595
+ if (!c.value) {
596
+ c.value = !0;
661
597
  try {
662
- await Le(
598
+ await he(
663
599
  {
664
600
  score: 0,
665
601
  category: "other",
666
- content: r,
602
+ content: s,
667
603
  contact: "",
668
- source: o.source,
669
- page: oe(),
670
- appName: o.appName,
671
- appKey: o.appKey,
672
- merchant: o.merchant,
673
- locale: o.locale,
604
+ source: t.source,
605
+ page: O(),
606
+ appName: t.appName,
607
+ appKey: t.appKey,
608
+ merchant: t.merchant,
609
+ locale: t.locale,
674
610
  kind: "划线评论",
675
- quote: F.value
611
+ quote: B.value
676
612
  },
677
- o.webhookUrl
678
- ), u.value = !1, ce.success(b("submitted"));
679
- } catch (c) {
680
- _.value = c instanceof se ? b("channelMissing") : b("submitFailed");
613
+ t.webhookUrl
614
+ ), i.value = !1, oe.success(v("submitted"));
615
+ } catch (u) {
616
+ k.value = u instanceof ne ? v("channelMissing") : v("submitFailed");
681
617
  } finally {
682
- g.value = !1;
618
+ c.value = !1;
683
619
  }
684
620
  }
685
621
  }
686
- return U(z, (r) => {
687
- r || w();
688
- }), Ye(() => {
689
- document.addEventListener("selectionchange", q), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w);
690
- }), Xe(() => {
691
- document.removeEventListener("selectionchange", q), window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
692
- }), (r, c) => (C(), P("div", {
622
+ return J(G, (s) => {
623
+ s || w();
624
+ }), Se(() => {
625
+ document.addEventListener("selectionchange", L), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w);
626
+ }), Qe(() => {
627
+ document.removeEventListener("selectionchange", L), window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
628
+ }), (s, u) => (I(), x("div", {
693
629
  ref_key: "root",
694
- ref: t,
630
+ ref: e,
695
631
  class: "selection-comment"
696
632
  }, [
697
- Ze(r.$slots, "default", {}, void 0, !0),
698
- (C(), _e(Ee, { to: "body" }, [
699
- m.value ? (C(), P("button", {
633
+ Be(s.$slots, "default", {}, void 0, !0),
634
+ (I(), ue(de, { to: "body" }, [
635
+ f.value ? (I(), x("button", {
700
636
  key: 0,
701
637
  type: "button",
702
638
  class: "selection-comment-trigger",
703
- style: Ce({ top: `${d.top}px`, left: `${d.left}px` }),
704
- "aria-label": b("commentButton"),
705
- onPointerdown: B,
706
- onMousedown: B,
707
- onClick: $
708
- }, [...c[3] || (c[3] = [
709
- s("svg", {
639
+ style: me({ top: `${d.top}px`, left: `${d.left}px` }),
640
+ "aria-label": v("commentButton"),
641
+ onPointerdown: q,
642
+ onMousedown: q,
643
+ onClick: z
644
+ }, [...u[3] || (u[3] = [
645
+ g("svg", {
710
646
  viewBox: "0 0 24 24",
711
647
  "aria-hidden": "true"
712
648
  }, [
713
- s("path", {
649
+ g("path", {
714
650
  d: "M5 5.5h14a1.5 1.5 0 0 1 1.5 1.5v8A1.5 1.5 0 0 1 19 16.5H9.2L5 20v-3.5A1.5 1.5 0 0 1 3.5 15V7A1.5 1.5 0 0 1 5 5.5Z",
715
651
  fill: "none",
716
652
  stroke: "currentColor",
717
653
  "stroke-width": "1.6",
718
654
  "stroke-linejoin": "round"
719
655
  }),
720
- s("path", {
656
+ g("path", {
721
657
  d: "M8 9.5h8M8 12.5h5",
722
658
  fill: "none",
723
659
  stroke: "currentColor",
@@ -725,65 +661,65 @@ const Rt = ["aria-label"], At = { class: "selection-comment-label" }, Ot = { cla
725
661
  "stroke-linecap": "round"
726
662
  })
727
663
  ], -1)
728
- ])], 44, Rt)) : ee("", !0)
664
+ ])], 44, it)) : Y("", !0)
729
665
  ])),
730
- f(p(ot), {
731
- modelValue: u.value,
732
- "onUpdate:modelValue": c[2] || (c[2] = (k) => u.value = k),
666
+ p(m(He), {
667
+ modelValue: i.value,
668
+ "onUpdate:modelValue": u[2] || (u[2] = (A) => i.value = A),
733
669
  class: "selection-comment-dialog",
734
- title: b("commentTitle"),
670
+ title: v("commentTitle"),
735
671
  width: "480px",
736
672
  "append-to-body": ""
737
673
  }, {
738
674
  footer: h(() => [
739
- f(p(te), {
740
- onClick: c[1] || (c[1] = (k) => u.value = !1)
675
+ p(m(X), {
676
+ onClick: u[1] || (u[1] = (A) => i.value = !1)
741
677
  }, {
742
678
  default: h(() => [
743
- I(v(b("cancel")), 1)
679
+ T(y(v("cancel")), 1)
744
680
  ]),
745
681
  _: 1
746
682
  }),
747
- f(p(te), {
683
+ p(m(X), {
748
684
  type: "primary",
749
- loading: g.value,
750
- onClick: L
685
+ loading: c.value,
686
+ onClick: W
751
687
  }, {
752
688
  default: h(() => [
753
- I(v(b("submit")), 1)
689
+ T(y(v("submit")), 1)
754
690
  ]),
755
691
  _: 1
756
692
  }, 8, ["loading"])
757
693
  ]),
758
694
  default: h(() => [
759
- s("p", At, v(b("commentQuote")), 1),
760
- s("blockquote", Ot, v(F.value), 1),
761
- s("label", It, [
762
- s("span", $t, v(b("commentContent")), 1),
763
- Je(s("textarea", {
764
- "onUpdate:modelValue": c[0] || (c[0] = (k) => x.value = k),
695
+ g("p", ct, y(v("commentQuote")), 1),
696
+ g("blockquote", st, y(B.value), 1),
697
+ g("label", ut, [
698
+ g("span", dt, y(v("commentContent")), 1),
699
+ Te(g("textarea", {
700
+ "onUpdate:modelValue": u[0] || (u[0] = (A) => b.value = A),
765
701
  maxlength: "500",
766
702
  rows: "4",
767
- placeholder: b("commentPlaceholder")
768
- }, null, 8, Nt), [
769
- [Qe, x.value]
703
+ placeholder: v("commentPlaceholder")
704
+ }, null, 8, mt), [
705
+ [xe, b.value]
770
706
  ])
771
707
  ]),
772
- _.value ? (C(), P("p", qt, v(_.value), 1)) : ee("", !0)
708
+ k.value ? (I(), x("p", ft, y(k.value), 1)) : Y("", !0)
773
709
  ]),
774
710
  _: 1
775
711
  }, 8, ["modelValue", "title"])
776
712
  ], 512));
777
713
  }
778
- }), Qt = /* @__PURE__ */ Pe(Bt, [["__scopeId", "data-v-1bf1af9c"]]);
714
+ }), St = /* @__PURE__ */ ve(pt, [["__scopeId", "data-v-1bf1af9c"]]);
779
715
  export {
780
- Se as DEFAULT_FEEDBACK_WEBHOOK,
781
- se as FeedbackChannelError,
782
- Jt as FeedbackWidget,
783
- Qt as SelectionComment,
784
- it as buildFeedbackPayload,
785
- lt as formatFeedbackTime,
786
- Me as isFeishuWebhook,
787
- Le as postFeedback,
788
- Fe as showFeedbackEntry
716
+ fe as DEFAULT_FEEDBACK_WEBHOOK,
717
+ ne as FeedbackChannelError,
718
+ It as FeedbackWidget,
719
+ St as SelectionComment,
720
+ Le as buildFeedbackPayload,
721
+ Oe as formatFeedbackTime,
722
+ pe as isFeishuWebhook,
723
+ he as postFeedback,
724
+ ge as showFeedbackEntry
789
725
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .feedback[data-v-526e0404]{--el-color-primary: #165dff;--el-color-primary-dark-2: #0e42d2;--el-color-primary-light-3: #4080ff;--el-color-primary-light-5: #94bfff;--el-color-primary-light-7: #c9ddff;--el-color-primary-light-8: #d9e5ff;--el-color-primary-light-9: #e8f3ff;position:fixed;right:24px;bottom:24px;z-index:30;width:56px}.feedback.is-placed[data-v-526e0404]{right:auto;bottom:auto}.feedback-panel[data-v-526e0404]{position:absolute;right:0;bottom:72px;display:flex;flex-direction:column;box-sizing:border-box;width:min(360px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 112px));padding:20px;overflow:auto;background:#fff;border:1px solid #e5e6eb;border-radius:12px;box-shadow:0 4px 12px #0d253d1a}.feedback-panel.is-on-right[data-v-526e0404]{right:auto;left:0}.feedback-panel.is-below[data-v-526e0404]{top:72px;bottom:auto}.feedback-head[data-v-526e0404]{display:flex;align-items:center;justify-content:space-between}.feedback-head h2[data-v-526e0404]{margin:0;color:#1d2129;font-weight:600;font-size:16px;line-height:24px}.feedback-close[data-v-526e0404]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;color:#86909c;font-size:20px;line-height:1;background:transparent;border:0;border-radius:4px;cursor:pointer}.feedback-close[data-v-526e0404]:hover{color:#1d2129;background:#1d21290f}.feedback-hint[data-v-526e0404],.feedback-context[data-v-526e0404]{margin:0;color:#86909c;font-size:12px;line-height:20px}.feedback-hint[data-v-526e0404]{margin:4px 0 16px}.feedback-scores[data-v-526e0404]{display:flex;gap:8px;width:100%}.feedback-score[data-v-526e0404]{flex:1;height:36px;padding:0 4px;color:var(--el-text-color-regular, #606266);font-size:13px;background:var(--el-fill-color-blank, #fff);border:1px solid var(--el-border-color, #dcdfe6);border-radius:6px;cursor:pointer}.feedback-score[data-v-526e0404]:hover{color:var(--el-text-color-regular, #606266);background:var(--el-fill-color-light, #f5f7fa);border-color:var(--el-border-color-darker, #cdd0d6)}.feedback-score.is-active[data-v-526e0404],.feedback-score.is-active[data-v-526e0404]:hover{color:var(--el-color-primary, #165dff);font-weight:600;background:var(--el-fill-color-blank, #fff);border-color:var(--el-color-primary, #165dff)}.feedback-panel[data-v-526e0404] .el-form-item{margin-bottom:16px}.feedback-panel[data-v-526e0404] .el-radio{margin-right:16px}.feedback-context[data-v-526e0404]{margin-bottom:16px}.feedback-actions[data-v-526e0404]{display:flex;gap:8px;justify-content:flex-end}.feedback-mark[data-v-526e0404]{display:block;overflow:visible}.feedback-frame[data-v-526e0404]{transform-box:fill-box;transform-origin:center}.feedback-frame.is-hopping[data-v-526e0404]{animation:feedback-frame-hop-526e0404 2.8s cubic-bezier(.37,.08,.2,1) infinite}@keyframes feedback-frame-hop-526e0404{0%,42%,to{transform:translateY(0)}14%{transform:translateY(-3.2px)}26%{transform:translateY(0)}34%{transform:translateY(-1.2px)}}.feedback-entry[data-v-526e0404]{display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;color:#fff;background:#3c4043;border:0;border-radius:50%;box-shadow:0 2px 8px #1f23291f;cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none}.feedback.is-dragging .feedback-entry[data-v-526e0404]{cursor:grabbing}.feedback-entry[data-v-526e0404]:hover,.feedback-entry[aria-expanded=true][data-v-526e0404]{background:#2a2d31}.feedback-entry[data-v-526e0404]:focus-visible,.feedback-close[data-v-526e0404]:focus-visible,.feedback-score[data-v-526e0404]:focus-visible{outline:2px solid var(--el-color-primary, #165dff);outline-offset:3px}.selection-comment-trigger[data-v-1bf1af9c]{position:fixed;z-index:3000;display:grid;width:36px;height:36px;padding:0;color:#1f2329;background:#fff;border:1px solid #e5e6eb;border-radius:8px;box-shadow:0 4px 16px #1f23291f;place-items:center;cursor:pointer}.selection-comment-trigger svg[data-v-1bf1af9c]{width:18px;height:18px}.selection-comment-trigger[data-v-1bf1af9c]:hover{color:#165dff;border-color:#165dff}.selection-comment-dialog{--el-color-primary: #165dff;--el-color-primary-dark-2: #0e42d2;--el-color-primary-light-3: #4080ff;--el-color-primary-light-5: #94bfff;--el-color-primary-light-7: #c9ddff;--el-color-primary-light-8: #d9e5ff;--el-color-primary-light-9: #e8f3ff}.selection-comment-label{margin:0 0 8px;color:var(--el-text-color-regular, #606266);font-size:14px}.selection-comment-quote{margin:0 0 16px;padding:8px 12px;color:#1f2329;font-size:14px;line-height:1.6;background:#f7f8fa;border-left:3px solid #165dff}.selection-comment-field{display:block}.selection-comment-field textarea{box-sizing:border-box;width:100%;padding:8px 12px;color:#1f2329;font:inherit;border:1px solid #dcdfe6;border-radius:4px;resize:vertical}.selection-comment-field textarea:focus{border-color:#165dff;outline:none}.selection-comment-error{margin:8px 0 0;color:var(--el-color-danger, #f53f3f);font-size:13px}
1
+ .feedback[data-v-d99340e3]{--el-color-primary: #165dff;--el-color-primary-dark-2: #0e42d2;--el-color-primary-light-3: #4080ff;--el-color-primary-light-5: #94bfff;--el-color-primary-light-7: #c9ddff;--el-color-primary-light-8: #d9e5ff;--el-color-primary-light-9: #e8f3ff;position:fixed;right:24px;bottom:24px;z-index:30;width:56px}.feedback.is-placed[data-v-d99340e3]{right:auto;bottom:auto}.feedback-panel[data-v-d99340e3]{position:absolute;right:0;bottom:72px;display:flex;flex-direction:column;box-sizing:border-box;width:min(360px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 112px));padding:20px;overflow:auto;background:#fff;border:1px solid #e5e6eb;border-radius:12px;box-shadow:0 4px 12px #0d253d1a}.feedback-panel.is-on-right[data-v-d99340e3]{right:auto;left:0}.feedback-panel.is-below[data-v-d99340e3]{top:72px;bottom:auto}.feedback-head[data-v-d99340e3]{display:flex;align-items:center;justify-content:space-between}.feedback-head h2[data-v-d99340e3]{margin:0;color:#1d2129;font-weight:600;font-size:16px;line-height:24px}.feedback-close[data-v-d99340e3]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;color:#86909c;font-size:20px;line-height:1;background:transparent;border:0;border-radius:4px;cursor:pointer}.feedback-close[data-v-d99340e3]:hover{color:#1d2129;background:#1d21290f}.feedback-hint[data-v-d99340e3],.feedback-context[data-v-d99340e3]{margin:0;color:#86909c;font-size:12px;line-height:20px}.feedback-hint[data-v-d99340e3]{margin:4px 0 16px}.feedback-scores[data-v-d99340e3]{display:flex;gap:8px;width:100%}.feedback-score[data-v-d99340e3]{flex:1;height:36px;padding:0 4px;color:var(--el-text-color-regular, #606266);font-size:13px;background:var(--el-fill-color-blank, #fff);border:1px solid var(--el-border-color, #dcdfe6);border-radius:6px;cursor:pointer}.feedback-score[data-v-d99340e3]:hover{color:var(--el-text-color-regular, #606266);background:var(--el-fill-color-light, #f5f7fa);border-color:var(--el-border-color-darker, #cdd0d6)}.feedback-score.is-active[data-v-d99340e3],.feedback-score.is-active[data-v-d99340e3]:hover{color:var(--el-color-primary, #165dff);font-weight:600;background:var(--el-fill-color-blank, #fff);border-color:var(--el-color-primary, #165dff)}.feedback-panel[data-v-d99340e3] .el-form-item{margin-bottom:16px}.feedback-panel[data-v-d99340e3] .el-radio{margin-right:16px}.feedback-context[data-v-d99340e3]{margin-bottom:16px}.feedback-actions[data-v-d99340e3]{display:flex;gap:8px;justify-content:flex-end}.feedback-mark[data-v-d99340e3]{display:block;width:28px;height:28px;object-fit:contain;pointer-events:none}.feedback-frame[data-v-d99340e3]{transform-box:fill-box;transform-origin:center}.feedback-frame.is-hopping[data-v-d99340e3]{animation:feedback-frame-hop-d99340e3 2.8s cubic-bezier(.37,.08,.2,1) infinite}@keyframes feedback-frame-hop-d99340e3{0%,42%,to{transform:translateY(0)}14%{transform:translateY(-3.2px)}26%{transform:translateY(0)}34%{transform:translateY(-1.2px)}}.feedback-entry[data-v-d99340e3]{display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;color:#fff;background:#3c4043;border:0;border-radius:50%;box-shadow:0 2px 8px #1f23291f;cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none}.feedback.is-dragging .feedback-entry[data-v-d99340e3]{cursor:grabbing}.feedback-entry[data-v-d99340e3]:hover,.feedback-entry[aria-expanded=true][data-v-d99340e3]{background:#2a2d31}.feedback-entry[data-v-d99340e3]:focus-visible,.feedback-close[data-v-d99340e3]:focus-visible,.feedback-score[data-v-d99340e3]:focus-visible{outline:2px solid var(--el-color-primary, #165dff);outline-offset:3px}.selection-comment-trigger[data-v-1bf1af9c]{position:fixed;z-index:3000;display:grid;width:36px;height:36px;padding:0;color:#1f2329;background:#fff;border:1px solid #e5e6eb;border-radius:8px;box-shadow:0 4px 16px #1f23291f;place-items:center;cursor:pointer}.selection-comment-trigger svg[data-v-1bf1af9c]{width:18px;height:18px}.selection-comment-trigger[data-v-1bf1af9c]:hover{color:#165dff;border-color:#165dff}.selection-comment-dialog{--el-color-primary: #165dff;--el-color-primary-dark-2: #0e42d2;--el-color-primary-light-3: #4080ff;--el-color-primary-light-5: #94bfff;--el-color-primary-light-7: #c9ddff;--el-color-primary-light-8: #d9e5ff;--el-color-primary-light-9: #e8f3ff}.selection-comment-label{margin:0 0 8px;color:var(--el-text-color-regular, #606266);font-size:14px}.selection-comment-quote{margin:0 0 16px;padding:8px 12px;color:#1f2329;font-size:14px;line-height:1.6;background:#f7f8fa;border-left:3px solid #165dff}.selection-comment-field{display:block}.selection-comment-field textarea{box-sizing:border-box;width:100%;padding:8px 12px;color:#1f2329;font:inherit;border:1px solid #dcdfe6;border-radius:4px;resize:vertical}.selection-comment-field textarea:focus{border-color:#165dff;outline:none}.selection-comment-error{margin:8px 0 0;color:var(--el-color-danger, #f53f3f);font-size:13px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wanlianyida/portal-kit",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "开放平台共享组件,包含问题反馈和划线评论。",
5
5
  "type": "module",
6
6
  "files": [