@huyooo/ui 0.14.8 → 0.15.0

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as z, openBlock as d, createElementBlock as b, normalizeClass as me, createVNode as s, unref as t, computed as C, createElementVNode as y, createCommentVNode as I, createBlock as k, ref as S, withCtx as f, createTextVNode as $, watchEffect as ee, Fragment as G, renderList as te, toDisplayString as O, useSlots as re, renderSlot as N, normalizeStyle as Q, onMounted as j, onUnmounted as ie } from "vue";
1
+ import { defineComponent as z, openBlock as d, createElementBlock as b, normalizeClass as me, createVNode as s, unref as t, computed as C, createElementVNode as y, createCommentVNode as I, createBlock as k, ref as S, withCtx as f, createTextVNode as $, watchEffect as ee, Fragment as G, renderList as te, toDisplayString as x, useSlots as re, renderSlot as N, normalizeStyle as Q, onMounted as j, onUnmounted as ie } from "vue";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import "./index-D3Kp6R4z.js";
5
- import { Form as x, FormItem as A, Input as V, Button as B, Link as M, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as E, Alert as le } from "@arco-design/web-vue";
5
+ import { Form as O, FormItem as A, Input as V, Button as B, Link as M, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as E, Alert as le } from "@arco-design/web-vue";
6
6
  import { u as F } from "./useAuthkitAuth-C--qS6UE.js";
7
7
  import { e as T, u as ge, s as he, g as ye } from "./apiClients-CkI47p36.js";
8
8
  import { u as H } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
@@ -149,7 +149,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
149
149
  p || n("submit", e.value);
150
150
  });
151
151
  }
152
- return (p, c) => (d(), b("div", Ue, [s(t(x), {
152
+ return (p, c) => (d(), b("div", Ue, [s(t(O), {
153
153
  ref_key: "formRef",
154
154
  ref: r,
155
155
  model: e.value,
@@ -259,7 +259,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
259
259
  class: "content"
260
260
  }, Te = {
261
261
  class: "sendVerifyCodeItem"
262
- }, Oe = /* @__PURE__ */ z({
262
+ }, xe = /* @__PURE__ */ z({
263
263
  __name: "AuthkitPhonePasswordUpdateAndVerify",
264
264
  props: {
265
265
  size: {
@@ -318,7 +318,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
318
318
  });
319
319
  });
320
320
  }
321
- return (c, a) => (d(), b("div", Be, [s(t(x), {
321
+ return (c, a) => (d(), b("div", Be, [s(t(O), {
322
322
  ref_key: "formRef",
323
323
  ref: r,
324
324
  model: e.value,
@@ -417,7 +417,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
417
417
  _: 1
418
418
  }, 8, ["model", "size"])]));
419
419
  }
420
- }), xe = /* @__PURE__ */ P(Oe, [["__scopeId", "data-v-717c5c0f"]]), Le = {
420
+ }), Oe = /* @__PURE__ */ P(xe, [["__scopeId", "data-v-717c5c0f"]]), Le = {
421
421
  class: "SwitchSignIn"
422
422
  }, Me = /* @__PURE__ */ z({
423
423
  __name: "AuthkitSwitchSignIn",
@@ -509,7 +509,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
509
509
  loading: g.loading,
510
510
  size: o.size,
511
511
  onSubmit: i
512
- }, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (d(), k(xe, {
512
+ }, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (d(), k(Oe, {
513
513
  key: 2,
514
514
  loading: g.loading,
515
515
  size: o.size,
@@ -548,13 +548,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
548
548
  key: 0,
549
549
  onClick: e
550
550
  }, {
551
- default: f(() => [$(O(v.value.label), 1)]),
551
+ default: f(() => [$(x(v.value.label), 1)]),
552
552
  _: 1
553
553
  })) : I("", !0), v.value && l.value ? (d(), b("span", je, "和")) : I("", !0), l.value ? (d(), k(t(M), {
554
554
  key: 2,
555
555
  onClick: h
556
556
  }, {
557
- default: f(() => [$(O(l.value.label), 1)]),
557
+ default: f(() => [$(x(l.value.label), 1)]),
558
558
  _: 1
559
559
  })) : I("", !0)])) : I("", !0);
560
560
  }
@@ -592,7 +592,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
592
592
  e || n("submit", l.value);
593
593
  });
594
594
  }
595
- return (e, h) => (d(), b("div", Qe, [s(t(x), {
595
+ return (e, h) => (d(), b("div", Qe, [s(t(O), {
596
596
  ref_key: "formRef",
597
597
  ref: v,
598
598
  model: l.value,
@@ -742,7 +742,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
742
742
  });
743
743
  });
744
744
  }
745
- return (_, w) => (d(), b("div", it, [y("div", ot, [s(t(x), {
745
+ return (_, w) => (d(), b("div", it, [y("div", ot, [s(t(O), {
746
746
  ref_key: "formRef",
747
747
  ref: h,
748
748
  model: i.value,
@@ -861,7 +861,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
861
861
  });
862
862
  });
863
863
  }
864
- return (p, c) => (d(), b("div", rt, [s(t(x), {
864
+ return (p, c) => (d(), b("div", rt, [s(t(O), {
865
865
  ref_key: "formRef",
866
866
  ref: r,
867
867
  model: e.value,
@@ -1084,7 +1084,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1084
1084
  });
1085
1085
  });
1086
1086
  }
1087
- return (a, m) => (d(), b("div", gt, [y("div", ht, [s(t(x), {
1087
+ return (a, m) => (d(), b("div", gt, [y("div", ht, [s(t(O), {
1088
1088
  ref_key: "formRef",
1089
1089
  ref: r,
1090
1090
  model: e.value,
@@ -1320,7 +1320,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1320
1320
  style: Q({
1321
1321
  width: n
1322
1322
  })
1323
- }, null, 12, At)) : I("", !0), y("span", null, O(e.value), 1), N(h.$slots, "default", {}, void 0, !0)], 4));
1323
+ }, null, 12, At)) : I("", !0), y("span", null, x(e.value), 1), N(h.$slots, "default", {}, void 0, !0)], 4));
1324
1324
  }
1325
1325
  }), pe = /* @__PURE__ */ P(Vt, [["__scopeId", "data-v-8ebe7939"]]), Ut = {
1326
1326
  class: "Auth"
@@ -1580,9 +1580,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1580
1580
  onToUserServiceAgreement: c[1] || (c[1] = (a) => o("toUserServiceAgreement"))
1581
1581
  }, null, 8, ["size"])) : I("", !0)], 64));
1582
1582
  }
1583
- }), Ot = {
1583
+ }), xt = {
1584
1584
  class: "header"
1585
- }, xt = ["href"], Lt = {
1585
+ }, Ot = ["href"], Lt = {
1586
1586
  class: "container"
1587
1587
  }, Mt = /* @__PURE__ */ z({
1588
1588
  __name: "AuthkitAuthContainer",
@@ -1635,7 +1635,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1635
1635
  return (o, v) => (d(), b("div", {
1636
1636
  class: "auth",
1637
1637
  style: Q(n.value)
1638
- }, [y("div", Ot, [u.name ? (d(), b("a", {
1638
+ }, [y("div", xt, [u.name ? (d(), b("a", {
1639
1639
  key: 0,
1640
1640
  href: u.appHomePage,
1641
1641
  target: "_self",
@@ -1643,7 +1643,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1643
1643
  style: Q({
1644
1644
  color: u.linkColor
1645
1645
  })
1646
- }, " 返回主页 ", 12, xt)) : I("", !0)]), y("div", Lt, [N(o.$slots, "default", {}, void 0, !0)])], 4));
1646
+ }, " 返回主页 ", 12, Ot)) : I("", !0)]), y("div", Lt, [N(o.$slots, "default", {}, void 0, !0)])], 4));
1647
1647
  }
1648
1648
  }), Ai = /* @__PURE__ */ P(Mt, [["__scopeId", "data-v-0e13d3ff"]]), Ft = {
1649
1649
  class: "box"
@@ -1717,10 +1717,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1717
1717
  async function v() {
1718
1718
  const {
1719
1719
  data: r
1720
- } = await T.apps.findOne.post({
1721
- id: n.clientId
1720
+ } = await T.apps.authPageInfo.post({});
1721
+ r && (o.value = {
1722
+ appKey: "",
1723
+ name: r.name,
1724
+ homePageUrl: r.homePageUrl || "",
1725
+ createAt: "",
1726
+ authorizationCallback: r.authorizationCallback || ""
1722
1727
  });
1723
- r && (o.value = r);
1724
1728
  }
1725
1729
  v();
1726
1730
  async function l() {
@@ -1736,7 +1740,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1736
1740
  });
1737
1741
  u.value = !1, r && (window.location = r.authorizeUrl);
1738
1742
  }
1739
- return (r, e) => (d(), b("div", Ft, [y("div", Ht, O(`授权 ${o.value.name}`), 1), y("div", Dt, [s(t(ve), null, {
1743
+ return (r, e) => (d(), b("div", Ft, [y("div", Ht, x(`授权 ${o.value.name}`), 1), y("div", Dt, [s(t(ve), null, {
1740
1744
  default: f(() => [s(t(X), null, {
1741
1745
  default: f(() => {
1742
1746
  var h;
@@ -1801,9 +1805,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1801
1805
  _: 1
1802
1806
  }, 8, ["size", "loading"]), y("div", Et, [e[3] || (e[3] = y("div", {
1803
1807
  class: "redirect-hint"
1804
- }, "授权后将跳转至", -1)), y("div", Gt, O(o.value.authorizationCallback), 1)])])]));
1808
+ }, "授权后将跳转至", -1)), y("div", Gt, x(o.value.authorizationCallback), 1)])])]));
1805
1809
  }
1806
- }), Vi = /* @__PURE__ */ P(Nt, [["__scopeId", "data-v-5665e1c4"]]), jt = {
1810
+ }), Vi = /* @__PURE__ */ P(Nt, [["__scopeId", "data-v-64edc8c9"]]), jt = {
1807
1811
  class: "oauth-callback"
1808
1812
  }, Kt = {
1809
1813
  key: 0,
@@ -1897,14 +1901,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1897
1901
  l.value = "无效的访问", v.value = !1;
1898
1902
  }), (a, m) => (d(), b("div", jt, [v.value ? (d(), b("div", Kt, [m[0] || (m[0] = y("div", {
1899
1903
  class: "spinner"
1900
- }, null, -1)), y("p", null, O(g.loadingText), 1)])) : l.value ? (d(), b("div", Wt, [m[1] || (m[1] = y("div", {
1904
+ }, null, -1)), y("p", null, x(g.loadingText), 1)])) : l.value ? (d(), b("div", Wt, [m[1] || (m[1] = y("div", {
1901
1905
  class: "error-icon"
1902
- }, "✕", -1)), m[2] || (m[2] = y("h2", null, "登录失败", -1)), y("p", null, O(l.value), 1), y("button", {
1906
+ }, "✕", -1)), m[2] || (m[2] = y("h2", null, "登录失败", -1)), y("p", null, x(l.value), 1), y("button", {
1903
1907
  class: "retry-btn",
1904
1908
  onClick: c
1905
1909
  }, "返回重试")])) : (d(), b("div", Qt, [m[3] || (m[3] = y("div", {
1906
1910
  class: "success-icon"
1907
- }, "✓", -1)), y("p", null, O(r.value), 1)]))]));
1911
+ }, "✓", -1)), y("p", null, x(r.value), 1)]))]));
1908
1912
  }
1909
1913
  }), Ui = /* @__PURE__ */ P(Jt, [["__scopeId", "data-v-4b4b59a1"]]), Xt = {
1910
1914
  class: "BindEmail"
@@ -1974,7 +1978,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1974
1978
  class: "title"
1975
1979
  }, "绑定邮箱"), y("p", {
1976
1980
  class: "subtitle"
1977
- }, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", Yt, [s(t(x), {
1981
+ }, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", Yt, [s(t(O), {
1978
1982
  ref_key: "formRef",
1979
1983
  ref: r,
1980
1984
  model: e.value,
@@ -2158,7 +2162,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2158
2162
  _: 1
2159
2163
  })), y("div", si, [w[4] || (w[4] = y("div", {
2160
2164
  class: "oauth-binding-account__provider"
2161
- }, "GitHub", -1)), y("div", ai, O(((K = (L = t(u)) == null ? void 0 : L.github) == null ? void 0 : K.login) || "GitHub"), 1)])])];
2165
+ }, "GitHub", -1)), y("div", ai, x(((K = (L = t(u)) == null ? void 0 : L.github) == null ? void 0 : K.login) || "GitHub"), 1)])])];
2162
2166
  }),
2163
2167
  _: 1
2164
2168
  })) : I("", !0), o.value === "bind" || o.value === "unbind" ? (d(), k(_e, {
@@ -2186,7 +2190,7 @@ export {
2186
2190
  Ui as g,
2187
2191
  Ve as h,
2188
2192
  qe as i,
2189
- xe as j,
2193
+ Oe as j,
2190
2194
  Pi as k,
2191
2195
  vt as l,
2192
2196
  lt as m,
package/dist/authkit.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { A as a, B as s, E as u, a as e, b as h, O as A, P as r, c as o, _ as k, d as n, S as d, e as p, u as P } from "./AuthkitAppSetting-Xe-QQSQ4.js";
2
- import { A as l, a as m, b as g, c as S, d as O, e as c, f as L, _ as U, g as w, O as x, h as E, P as b, i as B, j as C, k as y, R as I, S as V, l as _, m as v, n as G, o as R, p as D, q as M } from "./AuthkitGithubBinding-CK6ijijV.js";
2
+ import { A as l, a as m, b as g, c as S, d as O, e as c, f as L, _ as U, g as w, O as x, h as E, P as b, i as B, j as C, k as y, R as I, S as V, l as _, m as v, n as G, o as R, p as D, q as M } from "./AuthkitGithubBinding-Uya3rVdX.js";
3
3
  import { u as q } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
4
4
  import { u as K } from "./useAuthkitAuth-C--qS6UE.js";
5
5
  import { u as Y } from "./apiClients-CkI47p36.js";
package/dist/main.js CHANGED
@@ -16,7 +16,7 @@ import { u as A3 } from "./useUserMenu-ClPBlvaM.js";
16
16
  import { u as b3, a as D3 } from "./useSubscriptionCheckout-CHAF20s-.js";
17
17
  import { I as B3, P as O3, R as T3, c as I3, u as $3, a as N3, b as R3 } from "./useBillingStatusOptions-D5Ehwtbj.js";
18
18
  import { A as z3, B as W3, E as q3, a as K3, b as Q3, O as Y3, P as J3, c as X3, _ as e4, d as t4, S as o4, e as a4, u as s4 } from "./AuthkitAppSetting-Xe-QQSQ4.js";
19
- import { A as n4, a as r4, b as c4, c as C4, d as l4, e as d4, f as p4, _ as f4, g as u4, O as h4, h as _4, P as g4, i as L4, j as m4, k as F4, R as w4, S as y4, l as M4, m as x4, n as v4, o as Z4, p as V4, q as U4 } from "./AuthkitGithubBinding-CK6ijijV.js";
19
+ import { A as n4, a as r4, b as c4, c as C4, d as l4, e as d4, f as p4, _ as f4, g as u4, O as h4, h as _4, P as g4, i as L4, j as m4, k as F4, R as w4, S as y4, l as M4, m as x4, n as v4, o as Z4, p as V4, q as U4 } from "./AuthkitGithubBinding-Uya3rVdX.js";
20
20
  import { u as E4 } from "./useEnsureAuthenticated-C4tsSfv6.js";
21
21
  import { A as S4, C as A4, _ as G4, a as b4, D as D4, E as P4, b as B4, M as O4, N as T4, c as I4, d as $4 } from "./MessageHandle-rRAQnE-q.js";
22
22
  import { I as R4, M as j4 } from "./MessageList-CrCF8mU6.js";