@kong-ui-public/misc-widgets 0.2.16 → 0.2.17
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/misc-widgets.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as vt, h as Kt, computed as Zt, ref as Yt, onMounted as Wt, resolveComponent as zt, openBlock as qt, createElementBlock as Qt, createVNode as Jt, unref as X, withCtx as $t, createElementVNode as at, toDisplayString as tr, createCommentVNode as rr } from "vue";
|
|
2
2
|
var W = function(t, r) {
|
|
3
3
|
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, e) {
|
|
4
4
|
n.__proto__ = e;
|
|
@@ -1747,7 +1747,7 @@ var K, gr = new RegExp("^".concat(It.source, "*")), Er = new RegExp("".concat(It
|
|
|
1747
1747
|
function E(t, r) {
|
|
1748
1748
|
return { start: t, end: r };
|
|
1749
1749
|
}
|
|
1750
|
-
var br = !!String.prototype.startsWith, yr = !!String.fromCodePoint,
|
|
1750
|
+
var br = !!String.prototype.startsWith, yr = !!String.fromCodePoint, dr = !!Object.fromEntries, vr = !!String.prototype.codePointAt, Tr = !!String.prototype.trimStart, _r = !!String.prototype.trimEnd, Ar = !!Number.isSafeInteger, Hr = Ar ? Number.isSafeInteger : function(t) {
|
|
1751
1751
|
return typeof t == "number" && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991;
|
|
1752
1752
|
}, q = !0;
|
|
1753
1753
|
try {
|
|
@@ -1780,7 +1780,7 @@ var lt = br ? (
|
|
|
1780
1780
|
}
|
|
1781
1781
|
), ft = (
|
|
1782
1782
|
// native
|
|
1783
|
-
|
|
1783
|
+
dr ? Object.fromEntries : (
|
|
1784
1784
|
// Ponyfill
|
|
1785
1785
|
function(t) {
|
|
1786
1786
|
for (var r = {}, n = 0, e = t; n < e.length; n++) {
|
|
@@ -1790,7 +1790,7 @@ var lt = br ? (
|
|
|
1790
1790
|
return r;
|
|
1791
1791
|
}
|
|
1792
1792
|
)
|
|
1793
|
-
), Ot =
|
|
1793
|
+
), Ot = vr ? (
|
|
1794
1794
|
// Native
|
|
1795
1795
|
function(t, r) {
|
|
1796
1796
|
return t.codePointAt(r);
|
|
@@ -2051,23 +2051,23 @@ var Ir = (
|
|
|
2051
2051
|
var p = E(h, this.clonePosition());
|
|
2052
2052
|
u = { style: f, styleLocation: p };
|
|
2053
2053
|
}
|
|
2054
|
-
var
|
|
2055
|
-
if (
|
|
2056
|
-
return
|
|
2054
|
+
var d = this.tryParseArgumentClose(i);
|
|
2055
|
+
if (d.err)
|
|
2056
|
+
return d;
|
|
2057
2057
|
var b = E(i, this.clonePosition());
|
|
2058
2058
|
if (u && lt(u == null ? void 0 : u.style, "::", 0)) {
|
|
2059
|
-
var
|
|
2059
|
+
var v = Br(u.style.slice(2));
|
|
2060
2060
|
if (s === "number") {
|
|
2061
|
-
var l = this.parseNumberSkeletonFromString(
|
|
2061
|
+
var l = this.parseNumberSkeletonFromString(v, u.styleLocation);
|
|
2062
2062
|
return l.err ? l : {
|
|
2063
2063
|
val: { type: y.number, value: e, location: b, style: l.val },
|
|
2064
2064
|
err: null
|
|
2065
2065
|
};
|
|
2066
2066
|
} else {
|
|
2067
|
-
if (
|
|
2067
|
+
if (v.length === 0)
|
|
2068
2068
|
return this.error(g.EXPECT_DATE_TIME_SKELETON, b);
|
|
2069
|
-
var T =
|
|
2070
|
-
this.locale && (T = mr(
|
|
2069
|
+
var T = v;
|
|
2070
|
+
this.locale && (T = mr(v, this.locale));
|
|
2071
2071
|
var f = {
|
|
2072
2072
|
type: D.dateTime,
|
|
2073
2073
|
pattern: T,
|
|
@@ -2110,9 +2110,9 @@ var Ir = (
|
|
|
2110
2110
|
var F = this.tryParsePluralOrSelectOptions(r, s, n, U);
|
|
2111
2111
|
if (F.err)
|
|
2112
2112
|
return F;
|
|
2113
|
-
var
|
|
2114
|
-
if (
|
|
2115
|
-
return
|
|
2113
|
+
var d = this.tryParseArgumentClose(i);
|
|
2114
|
+
if (d.err)
|
|
2115
|
+
return d;
|
|
2116
2116
|
var ot = E(i, this.clonePosition());
|
|
2117
2117
|
return s === "select" ? {
|
|
2118
2118
|
val: {
|
|
@@ -2208,16 +2208,16 @@ var Ir = (
|
|
|
2208
2208
|
var p = this.clonePosition();
|
|
2209
2209
|
if (!this.bumpIf("{"))
|
|
2210
2210
|
return this.error(n === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, E(this.clonePosition(), this.clonePosition()));
|
|
2211
|
-
var
|
|
2212
|
-
if (
|
|
2213
|
-
return
|
|
2211
|
+
var d = this.parseMessage(r + 1, n, e);
|
|
2212
|
+
if (d.err)
|
|
2213
|
+
return d;
|
|
2214
2214
|
var b = this.tryParseArgumentClose(p);
|
|
2215
2215
|
if (b.err)
|
|
2216
2216
|
return b;
|
|
2217
2217
|
s.push([
|
|
2218
2218
|
u,
|
|
2219
2219
|
{
|
|
2220
|
-
value:
|
|
2220
|
+
value: d.val,
|
|
2221
2221
|
location: E(p, this.clonePosition())
|
|
2222
2222
|
}
|
|
2223
2223
|
]), c.add(u), this.bumpSpace(), o = this.parseIdentifierIfPossible(), u = o.value, h = o.location;
|
|
@@ -2499,10 +2499,10 @@ function V(t, r, n, e, i, o, a) {
|
|
|
2499
2499
|
continue;
|
|
2500
2500
|
}
|
|
2501
2501
|
if (Bt(h)) {
|
|
2502
|
-
var
|
|
2503
|
-
if (!Vr(
|
|
2502
|
+
var d = h.children, b = h.value, v = i[b];
|
|
2503
|
+
if (!Vr(v))
|
|
2504
2504
|
throw new Fr(b, "function", a);
|
|
2505
|
-
var T = V(
|
|
2505
|
+
var T = V(d, r, n, e, i, o), B = v(T.map(function(M) {
|
|
2506
2506
|
return M.value;
|
|
2507
2507
|
}));
|
|
2508
2508
|
Array.isArray(B) || (B = [B]), s.push.apply(s, B.map(function(M) {
|
|
@@ -2925,13 +2925,13 @@ function bt(t, r) {
|
|
|
2925
2925
|
var yt = function(t, r, n, e, i) {
|
|
2926
2926
|
var o = t.locale, a = t.formats, s = t.messages, c = t.defaultLocale, u = t.defaultFormats, h = t.fallbackOnEmptyString, l = t.onError, f = t.timeZone, p = t.defaultRichTextElements;
|
|
2927
2927
|
n === void 0 && (n = { id: "" });
|
|
2928
|
-
var
|
|
2929
|
-
$r(!!
|
|
2930
|
-
var
|
|
2928
|
+
var d = n.id, b = n.defaultMessage;
|
|
2929
|
+
$r(!!d, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
2930
|
+
var v = String(d), T = (
|
|
2931
2931
|
// In case messages is Object.create(null)
|
|
2932
2932
|
// e.g import('foo.json') from webpack)
|
|
2933
2933
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
2934
|
-
s && Object.prototype.hasOwnProperty.call(s,
|
|
2934
|
+
s && Object.prototype.hasOwnProperty.call(s, v) && s[v]
|
|
2935
2935
|
);
|
|
2936
2936
|
if (Array.isArray(T) && T.length === 1 && T[0].type === y.literal)
|
|
2937
2937
|
return T[0].value;
|
|
@@ -2945,24 +2945,24 @@ var yt = function(t, r, n, e, i) {
|
|
|
2945
2945
|
var B = r.getMessageFormat(b, c, u, i);
|
|
2946
2946
|
return B.format(e);
|
|
2947
2947
|
} catch (_) {
|
|
2948
|
-
return l(new Y('Error formatting default message for: "'.concat(
|
|
2948
|
+
return l(new Y('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), o, n, _)), typeof b == "string" ? b : v;
|
|
2949
2949
|
}
|
|
2950
|
-
return
|
|
2950
|
+
return v;
|
|
2951
2951
|
}
|
|
2952
2952
|
try {
|
|
2953
2953
|
var B = r.getMessageFormat(T, o, a, m({ formatters: r }, i || {}));
|
|
2954
2954
|
return B.format(e);
|
|
2955
2955
|
} catch (_) {
|
|
2956
|
-
l(new Y('Error formatting message: "'.concat(
|
|
2956
|
+
l(new Y('Error formatting message: "'.concat(v, '", using ').concat(b ? "default message" : "id", " as fallback."), o, n, _));
|
|
2957
2957
|
}
|
|
2958
2958
|
if (b)
|
|
2959
2959
|
try {
|
|
2960
2960
|
var B = r.getMessageFormat(b, c, u, i);
|
|
2961
2961
|
return B.format(e);
|
|
2962
2962
|
} catch (_) {
|
|
2963
|
-
l(new Y('Error formatting the default message for: "'.concat(
|
|
2963
|
+
l(new Y('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), o, n, _));
|
|
2964
2964
|
}
|
|
2965
|
-
return typeof T == "string" ? T : typeof b == "string" ? b :
|
|
2965
|
+
return typeof T == "string" ? T : typeof b == "string" ? b : v;
|
|
2966
2966
|
}, Ft = [
|
|
2967
2967
|
"formatMatcher",
|
|
2968
2968
|
"timeZone",
|
|
@@ -3066,9 +3066,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
3066
3066
|
var se = [
|
|
3067
3067
|
"type",
|
|
3068
3068
|
"style"
|
|
3069
|
-
],
|
|
3069
|
+
], dt = Date.now();
|
|
3070
3070
|
function he(t) {
|
|
3071
|
-
return "".concat(
|
|
3071
|
+
return "".concat(dt, "_").concat(t, "_").concat(dt);
|
|
3072
3072
|
}
|
|
3073
3073
|
function ue(t, r, n, e) {
|
|
3074
3074
|
e === void 0 && (e = {});
|
|
@@ -3186,14 +3186,14 @@ function ye(t) {
|
|
|
3186
3186
|
var r = t ? t[Object.keys(t)[0]] : void 0;
|
|
3187
3187
|
return typeof r == "string";
|
|
3188
3188
|
}
|
|
3189
|
-
function
|
|
3189
|
+
function de(t) {
|
|
3190
3190
|
t.onWarn && t.defaultRichTextElements && ye(t.messages || {}) && t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
3191
3191
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
3192
3192
|
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3193
3193
|
}
|
|
3194
|
-
function
|
|
3194
|
+
function ve(t, r) {
|
|
3195
3195
|
var n = Jr(r), e = m(m({}, Qr), t), i = e.locale, o = e.defaultLocale, a = e.onError;
|
|
3196
|
-
return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && a ? a(new gt('Missing locale data for locale: "'.concat(i, '" in Intl.NumberFormat. Using default locale: "').concat(o, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(i).length && a && a(new gt('Missing locale data for locale: "'.concat(i, '" in Intl.DateTimeFormat. Using default locale: "').concat(o, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (a && a(new Yr('"locale" was not configured, using "'.concat(o, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), e.locale = e.defaultLocale || "en"),
|
|
3196
|
+
return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && a ? a(new gt('Missing locale data for locale: "'.concat(i, '" in Intl.NumberFormat. Using default locale: "').concat(o, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(i).length && a && a(new gt('Missing locale data for locale: "'.concat(i, '" in Intl.DateTimeFormat. Using default locale: "').concat(o, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (a && a(new Yr('"locale" was not configured, using "'.concat(o, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), e.locale = e.defaultLocale || "en"), de(e), m(m({}, e), {
|
|
3197
3197
|
formatters: n,
|
|
3198
3198
|
formatNumber: Ee.bind(null, e, n.getNumberFormat),
|
|
3199
3199
|
formatNumberToParts: be.bind(null, e, n.getNumberFormat),
|
|
@@ -3227,10 +3227,10 @@ function G(t, r) {
|
|
|
3227
3227
|
const n = r.delimiter || ".", e = r.maxDepth, i = r.transformKey || xt, o = {};
|
|
3228
3228
|
function a(s, c, u) {
|
|
3229
3229
|
u = u || 1, Object.keys(s).forEach(function(h) {
|
|
3230
|
-
const l = s[h], f = r.safe && Array.isArray(l), p = Object.prototype.toString.call(l),
|
|
3231
|
-
if (!f && !
|
|
3232
|
-
return a(l,
|
|
3233
|
-
o[
|
|
3230
|
+
const l = s[h], f = r.safe && Array.isArray(l), p = Object.prototype.toString.call(l), d = Vt(l), b = p === "[object Object]" || p === "[object Array]", v = c ? c + n + i(h) : i(h);
|
|
3231
|
+
if (!f && !d && b && Object.keys(l).length && (!r.maxDepth || u < e))
|
|
3232
|
+
return a(l, v, u + 1);
|
|
3233
|
+
o[v] = l;
|
|
3234
3234
|
});
|
|
3235
3235
|
}
|
|
3236
3236
|
return a(t), o;
|
|
@@ -3272,7 +3272,7 @@ function Xt(t, r) {
|
|
|
3272
3272
|
for (; f !== void 0; ) {
|
|
3273
3273
|
if (l === "__proto__")
|
|
3274
3274
|
return;
|
|
3275
|
-
const
|
|
3275
|
+
const d = Object.prototype.toString.call(p[l]), b = d === "[object Object]" || d === "[object Array]";
|
|
3276
3276
|
if (!e && !b && typeof p[l] < "u")
|
|
3277
3277
|
return;
|
|
3278
3278
|
(e && !b || !e && p[l] == null) && (p[l] = typeof f == "number" && !r.object ? [] : {}), p = p[l], h.length > 0 && (l = a(h.shift()), f = a(h[0]));
|
|
@@ -3281,7 +3281,7 @@ function Xt(t, r) {
|
|
|
3281
3281
|
}), o;
|
|
3282
3282
|
}
|
|
3283
3283
|
const _e = Gt(), Ae = (t, r, n = !1) => {
|
|
3284
|
-
const e =
|
|
3284
|
+
const e = ve(
|
|
3285
3285
|
{
|
|
3286
3286
|
locale: t,
|
|
3287
3287
|
messages: Te.flatten(r, {
|
|
@@ -3298,7 +3298,7 @@ const _e = Gt(), Ae = (t, r, n = !1) => {
|
|
|
3298
3298
|
...e,
|
|
3299
3299
|
source: r
|
|
3300
3300
|
};
|
|
3301
|
-
}, He = (t = null) =>
|
|
3301
|
+
}, He = (t = null) => vt({
|
|
3302
3302
|
name: "I18nT",
|
|
3303
3303
|
props: {
|
|
3304
3304
|
i18n: {
|
|
@@ -3356,8 +3356,9 @@ const Re = {
|
|
|
3356
3356
|
}, Le = {
|
|
3357
3357
|
key: 0,
|
|
3358
3358
|
class: "kong-ui-public-misc-widgets-github-star",
|
|
3359
|
-
"data-testid": "github-star"
|
|
3360
|
-
|
|
3359
|
+
"data-testid": "github-star",
|
|
3360
|
+
"data-tracking-id": "github-star"
|
|
3361
|
+
}, Pe = ["aria-label", "href"], Oe = /* @__PURE__ */ vt({
|
|
3361
3362
|
__name: "GithubStar",
|
|
3362
3363
|
props: {
|
|
3363
3364
|
url: {
|
|
@@ -3404,7 +3405,7 @@ const Me = (t, r) => {
|
|
|
3404
3405
|
for (const [e, i] of r)
|
|
3405
3406
|
n[e] = i;
|
|
3406
3407
|
return n;
|
|
3407
|
-
}, we = /* @__PURE__ */ Me(Oe, [["__scopeId", "data-v-
|
|
3408
|
+
}, we = /* @__PURE__ */ Me(Oe, [["__scopeId", "data-v-a048effd"]]);
|
|
3408
3409
|
export {
|
|
3409
3410
|
we as GithubStar
|
|
3410
3411
|
};
|