@turquoisehealth/pit-viper 2.122.0 → 2.122.1-dev.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.
- package/package.json +43 -13
- package/pv-components/dist/stats/vue/base/stats.html +4949 -0
- package/pv-components/dist/stats/vue/visualizations/stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-accordion-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-action-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-ai-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-avatar-group-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-avatar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-banner-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-checkbox-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-label-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-logo-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-counter-badge-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-date-picker-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-date-time-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-distribution-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-drawer-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-dropdown-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-expandable-content-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-ghost-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-icon-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-insight-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-modal-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-pagination-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-pill-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-menu-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-v2-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-progress-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-rating-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-release-badge-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-search-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-segmented-control-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-select-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-selectable-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-side-panel-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-skeleton-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-spinner-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-sprite-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-switch-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tab-list-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tabs-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-text-area-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toast-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toggle-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toggle-group-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tooltip-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tree-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-widget-stats.html +4949 -0
- package/pv-components/dist/vue/base/components/base/PvButton/helpers.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +6 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +206 -289
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +31 -0
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +0 -1
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +6 -1
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +20 -177
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +4 -9
- package/pv-components/dist/vue/base/pv-components-base.mjs +4943 -11629
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +4791 -10741
- package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +265 -0
- package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +134 -0
- package/pv-components/dist/web/components/pv-ai-button/pv-ai-button.js +225 -0
- package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +164 -0
- package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +170 -0
- package/pv-components/dist/web/components/pv-banner/pv-banner.js +224 -0
- package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +160 -0
- package/pv-components/dist/web/components/pv-button/pv-button.js +242 -0
- package/pv-components/dist/web/components/pv-card/pv-card.js +148 -0
- package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +145 -0
- package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +221 -0
- package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +192 -0
- package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +274 -0
- package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +157 -0
- package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +7550 -0
- package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +645 -0
- package/pv-components/dist/web/components/pv-distribution-bar/pv-distribution-bar.js +177 -0
- package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +556 -0
- package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +1792 -0
- package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +304 -0
- package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +320 -0
- package/pv-components/dist/web/components/pv-icon/pv-icon.js +150 -0
- package/pv-components/dist/web/components/pv-input/pv-input.js +191 -0
- package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +363 -0
- package/pv-components/dist/web/components/pv-modal/pv-modal.js +186 -0
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +8326 -0
- package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +355 -0
- package/pv-components/dist/web/components/pv-pill/pv-pill.js +229 -0
- package/pv-components/dist/web/components/pv-popover/pv-popover.js +1485 -0
- package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +1507 -0
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +1573 -0
- package/pv-components/dist/web/components/pv-progress-bar/pv-progress-bar.js +156 -0
- package/pv-components/dist/web/components/pv-rating/pv-rating.js +146 -0
- package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +142 -0
- package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +238 -0
- package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +214 -0
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +8093 -0
- package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +153 -0
- package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +148 -0
- package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +1593 -0
- package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +151 -0
- package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +150 -0
- package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +195 -0
- package/pv-components/dist/web/components/pv-switch/pv-switch.js +162 -0
- package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +168 -0
- package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +248 -0
- package/pv-components/dist/web/components/pv-tag/pv-tag.js +210 -0
- package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +188 -0
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +292 -0
- package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +208 -0
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +7479 -0
- package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +158 -0
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +7409 -0
- package/pv-components/dist/web/components/pv-tree/pv-tree.js +5107 -0
- package/pv-components/dist/web/components/pv-widget/pv-widget.js +159 -0
- package/pv-components/dist/web/pv-components.iife.js +50 -50
- package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +7 -0
- package/pv-components/dist/vue/base/pv-components-base.js +0 -1555
- package/pv-components/dist/vue/base/pv-components-base.umd.js +0 -1555
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +0 -185
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +0 -185
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { defineComponent as g, createElementBlock as m, openBlock as b, Fragment as y, createCommentVNode as v, createElementVNode as E, toDisplayString as w, normalizeStyle as C, defineCustomElement as A } from "vue";
|
|
2
|
+
const P = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "pv-text-brand pv-text-title-sm pv-stack-4"
|
|
5
|
+
}, S = ["data-disabled"], I = /* @__PURE__ */ g({
|
|
6
|
+
__name: "PvProgressBar",
|
|
7
|
+
props: {
|
|
8
|
+
progress: { type: Number },
|
|
9
|
+
showLabel: { type: Boolean },
|
|
10
|
+
disabled: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = e;
|
|
14
|
+
return (n, i) => (b(), m(
|
|
15
|
+
y,
|
|
16
|
+
null,
|
|
17
|
+
[
|
|
18
|
+
t.showLabel ? (b(), m(
|
|
19
|
+
"p",
|
|
20
|
+
P,
|
|
21
|
+
w(t.progress) + "% Complete",
|
|
22
|
+
1
|
|
23
|
+
/* TEXT */
|
|
24
|
+
)) : v("v-if", !0),
|
|
25
|
+
E("div", {
|
|
26
|
+
class: "pv-progress-bar",
|
|
27
|
+
"data-disabled": t.disabled ? !0 : void 0,
|
|
28
|
+
style: C({
|
|
29
|
+
"--progress": `${t.progress}%`
|
|
30
|
+
})
|
|
31
|
+
}, null, 12, S)
|
|
32
|
+
],
|
|
33
|
+
64
|
|
34
|
+
/* STABLE_FRAGMENT */
|
|
35
|
+
));
|
|
36
|
+
}
|
|
37
|
+
}), j = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
38
|
+
function k(e) {
|
|
39
|
+
return !j.has(e);
|
|
40
|
+
}
|
|
41
|
+
function h(e, t) {
|
|
42
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
43
|
+
if (!e.shadowRoot)
|
|
44
|
+
return !1;
|
|
45
|
+
if (n && e.shadowRoot) {
|
|
46
|
+
const i = n.href;
|
|
47
|
+
if (e.shadowRoot.querySelector(`link[href="${i}"]`))
|
|
48
|
+
return;
|
|
49
|
+
const l = document.createElement("link");
|
|
50
|
+
return l.rel = "stylesheet", l.href = i, e.shadowRoot.prepend(l), !0;
|
|
51
|
+
}
|
|
52
|
+
return !1;
|
|
53
|
+
}
|
|
54
|
+
function N(e) {
|
|
55
|
+
if (!h(e, "pit-viper-v2")) {
|
|
56
|
+
if (h(e, "pit-viper")) {
|
|
57
|
+
h(e, "pit-viper-v2-scoped");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
console.warn(
|
|
61
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const O = (e) => ({ shadowRoot: k(e) });
|
|
66
|
+
function $(e, t) {
|
|
67
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
68
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
69
|
+
), !1);
|
|
70
|
+
}
|
|
71
|
+
function B(e, t) {
|
|
72
|
+
const n = Number(t);
|
|
73
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
74
|
+
}
|
|
75
|
+
function x(e) {
|
|
76
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), p = (e.__vccOpts || e).props;
|
|
77
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([d, r]) => {
|
|
78
|
+
r === Boolean || r && r.type === Boolean ? t.add(d) : r === Number || r && r.type === Number ? n.add(d) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && i.add(d);
|
|
79
|
+
}), { booleanProps: t, numberProps: n, jsonProps: i };
|
|
80
|
+
}
|
|
81
|
+
function _(e, t) {
|
|
82
|
+
try {
|
|
83
|
+
return JSON.parse(t);
|
|
84
|
+
} catch (n) {
|
|
85
|
+
return console.warn(
|
|
86
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
87
|
+
), null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function D(e) {
|
|
91
|
+
const t = e.__name || e.name;
|
|
92
|
+
if (!t)
|
|
93
|
+
throw new Error("Component must have a __name or name property");
|
|
94
|
+
const n = A(e, O(t)), { booleanProps: i, numberProps: l, jsonProps: p } = x(e);
|
|
95
|
+
class d extends n {
|
|
96
|
+
_hiddenInput = null;
|
|
97
|
+
constructor() {
|
|
98
|
+
super(), this._parseAttributes();
|
|
99
|
+
}
|
|
100
|
+
disconnectedCallback() {
|
|
101
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Update the hidden input value
|
|
105
|
+
* Call this from the Vue component to sync form value
|
|
106
|
+
*/
|
|
107
|
+
setHiddenInputValue(a) {
|
|
108
|
+
this._hiddenInput && (this._hiddenInput.value = a ?? "");
|
|
109
|
+
}
|
|
110
|
+
_parseAttributes() {
|
|
111
|
+
i.forEach((s) => {
|
|
112
|
+
const o = this.getAttribute(s);
|
|
113
|
+
this[s] = $(s, o);
|
|
114
|
+
}), l.forEach((s) => {
|
|
115
|
+
const o = this.getAttribute(s);
|
|
116
|
+
o !== null && (this[s] = B(s, o));
|
|
117
|
+
}), p.forEach((s) => {
|
|
118
|
+
const o = this.getAttribute(s);
|
|
119
|
+
if (o !== null) {
|
|
120
|
+
const c = _(s, o);
|
|
121
|
+
c !== null && (this[s] = c);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const a = this.getAttribute("data-json-props");
|
|
125
|
+
a && a.split(",").map((o) => o.trim()).filter(Boolean).forEach((o) => {
|
|
126
|
+
const c = o.replace(/-([a-z])/g, (u) => u[1].toUpperCase());
|
|
127
|
+
let f = this.getAttribute(o);
|
|
128
|
+
if (f === null) {
|
|
129
|
+
const u = c.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
130
|
+
f = this.getAttribute(u);
|
|
131
|
+
}
|
|
132
|
+
if (f !== null && !this[c]) {
|
|
133
|
+
const u = _(c, f);
|
|
134
|
+
u !== null && (this[c] = u);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
this._parseAttributes(), super.connectedCallback?.(), N(this);
|
|
140
|
+
const a = this.getAttribute("name");
|
|
141
|
+
a && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = a, this.after(this._hiddenInput));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return d;
|
|
145
|
+
}
|
|
146
|
+
function L(e) {
|
|
147
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
148
|
+
}
|
|
149
|
+
function R(e) {
|
|
150
|
+
const t = e.__name || e.name;
|
|
151
|
+
if (!t)
|
|
152
|
+
throw new Error("Component must have a __name or name property");
|
|
153
|
+
const n = L(t), i = D(e);
|
|
154
|
+
customElements.get(n) || customElements.define(n, i);
|
|
155
|
+
}
|
|
156
|
+
R(I);
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { defineComponent as b, computed as v, createElementBlock as _, openBlock as g, normalizeStyle as y, createElementVNode as E, defineCustomElement as w } from "vue";
|
|
2
|
+
const A = ["data-rating"], C = ["value"], P = /* @__PURE__ */ b({
|
|
3
|
+
__name: "PvRating",
|
|
4
|
+
props: {
|
|
5
|
+
variant: { default: "dot", type: null },
|
|
6
|
+
value: { type: Number },
|
|
7
|
+
size: { default: 20, type: null }
|
|
8
|
+
},
|
|
9
|
+
setup(t) {
|
|
10
|
+
const e = t, n = v(() => e.variant === "dot" ? "dot" : void 0);
|
|
11
|
+
return (i, a) => (g(), _("div", {
|
|
12
|
+
class: "pv-rating",
|
|
13
|
+
"data-testid": "pv-rating",
|
|
14
|
+
style: y({
|
|
15
|
+
"--height": `${t.size}px`
|
|
16
|
+
}),
|
|
17
|
+
"data-rating": n.value
|
|
18
|
+
}, [
|
|
19
|
+
E("meter", {
|
|
20
|
+
id: "rating",
|
|
21
|
+
min: "0",
|
|
22
|
+
max: "5",
|
|
23
|
+
value: t.value
|
|
24
|
+
}, "4.0 stars", 8, C)
|
|
25
|
+
], 12, A));
|
|
26
|
+
}
|
|
27
|
+
}), S = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
28
|
+
function I(t) {
|
|
29
|
+
return !S.has(t);
|
|
30
|
+
}
|
|
31
|
+
function h(t, e) {
|
|
32
|
+
const n = document.querySelector('link[href*="' + e + '"]');
|
|
33
|
+
if (!t.shadowRoot)
|
|
34
|
+
return !1;
|
|
35
|
+
if (n && t.shadowRoot) {
|
|
36
|
+
const i = n.href;
|
|
37
|
+
if (t.shadowRoot.querySelector(`link[href="${i}"]`))
|
|
38
|
+
return;
|
|
39
|
+
const a = document.createElement("link");
|
|
40
|
+
return a.rel = "stylesheet", a.href = i, t.shadowRoot.prepend(a), !0;
|
|
41
|
+
}
|
|
42
|
+
return !1;
|
|
43
|
+
}
|
|
44
|
+
function j(t) {
|
|
45
|
+
if (!h(t, "pit-viper-v2")) {
|
|
46
|
+
if (h(t, "pit-viper")) {
|
|
47
|
+
h(t, "pit-viper-v2-scoped");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
console.warn(
|
|
51
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const O = (t) => ({ shadowRoot: I(t) });
|
|
56
|
+
function N(t, e) {
|
|
57
|
+
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
58
|
+
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
59
|
+
), !1);
|
|
60
|
+
}
|
|
61
|
+
function $(t, e) {
|
|
62
|
+
const n = Number(e);
|
|
63
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
|
|
64
|
+
}
|
|
65
|
+
function k(t) {
|
|
66
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), p = (t.__vccOpts || t).props;
|
|
67
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([d, r]) => {
|
|
68
|
+
r === Boolean || r && r.type === Boolean ? e.add(d) : r === Number || r && r.type === Number ? n.add(d) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && i.add(d);
|
|
69
|
+
}), { booleanProps: e, numberProps: n, jsonProps: i };
|
|
70
|
+
}
|
|
71
|
+
function m(t, e) {
|
|
72
|
+
try {
|
|
73
|
+
return JSON.parse(e);
|
|
74
|
+
} catch (n) {
|
|
75
|
+
return console.warn(
|
|
76
|
+
`Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
77
|
+
), null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function B(t) {
|
|
81
|
+
const e = t.__name || t.name;
|
|
82
|
+
if (!e)
|
|
83
|
+
throw new Error("Component must have a __name or name property");
|
|
84
|
+
const n = w(t, O(e)), { booleanProps: i, numberProps: a, jsonProps: p } = k(t);
|
|
85
|
+
class d extends n {
|
|
86
|
+
_hiddenInput = null;
|
|
87
|
+
constructor() {
|
|
88
|
+
super(), this._parseAttributes();
|
|
89
|
+
}
|
|
90
|
+
disconnectedCallback() {
|
|
91
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Update the hidden input value
|
|
95
|
+
* Call this from the Vue component to sync form value
|
|
96
|
+
*/
|
|
97
|
+
setHiddenInputValue(c) {
|
|
98
|
+
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
99
|
+
}
|
|
100
|
+
_parseAttributes() {
|
|
101
|
+
i.forEach((o) => {
|
|
102
|
+
const s = this.getAttribute(o);
|
|
103
|
+
this[o] = N(o, s);
|
|
104
|
+
}), a.forEach((o) => {
|
|
105
|
+
const s = this.getAttribute(o);
|
|
106
|
+
s !== null && (this[o] = $(o, s));
|
|
107
|
+
}), p.forEach((o) => {
|
|
108
|
+
const s = this.getAttribute(o);
|
|
109
|
+
if (s !== null) {
|
|
110
|
+
const u = m(o, s);
|
|
111
|
+
u !== null && (this[o] = u);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const c = this.getAttribute("data-json-props");
|
|
115
|
+
c && c.split(",").map((s) => s.trim()).filter(Boolean).forEach((s) => {
|
|
116
|
+
const u = s.replace(/-([a-z])/g, (l) => l[1].toUpperCase());
|
|
117
|
+
let f = this.getAttribute(s);
|
|
118
|
+
if (f === null) {
|
|
119
|
+
const l = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
120
|
+
f = this.getAttribute(l);
|
|
121
|
+
}
|
|
122
|
+
if (f !== null && !this[u]) {
|
|
123
|
+
const l = m(u, f);
|
|
124
|
+
l !== null && (this[u] = l);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
connectedCallback() {
|
|
129
|
+
this._parseAttributes(), super.connectedCallback?.(), j(this);
|
|
130
|
+
const c = this.getAttribute("name");
|
|
131
|
+
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return d;
|
|
135
|
+
}
|
|
136
|
+
function R(t) {
|
|
137
|
+
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
138
|
+
}
|
|
139
|
+
function x(t) {
|
|
140
|
+
const e = t.__name || t.name;
|
|
141
|
+
if (!e)
|
|
142
|
+
throw new Error("Component must have a __name or name property");
|
|
143
|
+
const n = R(e), i = B(t);
|
|
144
|
+
customElements.get(n) || customElements.define(n, i);
|
|
145
|
+
}
|
|
146
|
+
x(P);
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent as v, computed as m, createElementBlock as _, openBlock as g, normalizeClass as y, toDisplayString as E, defineCustomElement as A } from "vue";
|
|
2
|
+
const w = /* @__PURE__ */ v({
|
|
3
|
+
__name: "PvReleaseBadge",
|
|
4
|
+
props: {
|
|
5
|
+
variant: { type: String },
|
|
6
|
+
inverse: { type: Boolean }
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
const t = e, n = m(() => t.variant == "release-alpha" ? "ALPHA" : t.variant == "release-beta" ? "BETA" : ""), i = m(() => t.inverse ? "pv-tag-inverse" : {
|
|
10
|
+
"pv-tag-yellow": t.variant == "release-alpha",
|
|
11
|
+
"pv-tag-purple": t.variant == "release-beta"
|
|
12
|
+
});
|
|
13
|
+
return (a, l) => (g(), _(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
class: y(i.value)
|
|
17
|
+
},
|
|
18
|
+
E(n.value),
|
|
19
|
+
3
|
|
20
|
+
/* TEXT, CLASS */
|
|
21
|
+
));
|
|
22
|
+
}
|
|
23
|
+
}), C = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
24
|
+
function P(e) {
|
|
25
|
+
return !C.has(e);
|
|
26
|
+
}
|
|
27
|
+
function h(e, t) {
|
|
28
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
29
|
+
if (!e.shadowRoot)
|
|
30
|
+
return !1;
|
|
31
|
+
if (n && e.shadowRoot) {
|
|
32
|
+
const i = n.href;
|
|
33
|
+
if (e.shadowRoot.querySelector(`link[href="${i}"]`))
|
|
34
|
+
return;
|
|
35
|
+
const a = document.createElement("link");
|
|
36
|
+
return a.rel = "stylesheet", a.href = i, e.shadowRoot.prepend(a), !0;
|
|
37
|
+
}
|
|
38
|
+
return !1;
|
|
39
|
+
}
|
|
40
|
+
function S(e) {
|
|
41
|
+
if (!h(e, "pit-viper-v2")) {
|
|
42
|
+
if (h(e, "pit-viper")) {
|
|
43
|
+
h(e, "pit-viper-v2-scoped");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
console.warn(
|
|
47
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const I = (e) => ({ shadowRoot: P(e) });
|
|
52
|
+
function j(e, t) {
|
|
53
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
54
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
55
|
+
), !1);
|
|
56
|
+
}
|
|
57
|
+
function O(e, t) {
|
|
58
|
+
const n = Number(t);
|
|
59
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
60
|
+
}
|
|
61
|
+
function k(e) {
|
|
62
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), l = (e.__vccOpts || e).props;
|
|
63
|
+
return l && typeof l == "object" && Object.entries(l).forEach(([f, r]) => {
|
|
64
|
+
r === Boolean || r && r.type === Boolean ? t.add(f) : r === Number || r && r.type === Number ? n.add(f) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && i.add(f);
|
|
65
|
+
}), { booleanProps: t, numberProps: n, jsonProps: i };
|
|
66
|
+
}
|
|
67
|
+
function b(e, t) {
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(t);
|
|
70
|
+
} catch (n) {
|
|
71
|
+
return console.warn(
|
|
72
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
73
|
+
), null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function B(e) {
|
|
77
|
+
const t = e.__name || e.name;
|
|
78
|
+
if (!t)
|
|
79
|
+
throw new Error("Component must have a __name or name property");
|
|
80
|
+
const n = A(e, I(t)), { booleanProps: i, numberProps: a, jsonProps: l } = k(e);
|
|
81
|
+
class f extends n {
|
|
82
|
+
_hiddenInput = null;
|
|
83
|
+
constructor() {
|
|
84
|
+
super(), this._parseAttributes();
|
|
85
|
+
}
|
|
86
|
+
disconnectedCallback() {
|
|
87
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Update the hidden input value
|
|
91
|
+
* Call this from the Vue component to sync form value
|
|
92
|
+
*/
|
|
93
|
+
setHiddenInputValue(c) {
|
|
94
|
+
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
95
|
+
}
|
|
96
|
+
_parseAttributes() {
|
|
97
|
+
i.forEach((s) => {
|
|
98
|
+
const o = this.getAttribute(s);
|
|
99
|
+
this[s] = j(s, o);
|
|
100
|
+
}), a.forEach((s) => {
|
|
101
|
+
const o = this.getAttribute(s);
|
|
102
|
+
o !== null && (this[s] = O(s, o));
|
|
103
|
+
}), l.forEach((s) => {
|
|
104
|
+
const o = this.getAttribute(s);
|
|
105
|
+
if (o !== null) {
|
|
106
|
+
const u = b(s, o);
|
|
107
|
+
u !== null && (this[s] = u);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const c = this.getAttribute("data-json-props");
|
|
111
|
+
c && c.split(",").map((o) => o.trim()).filter(Boolean).forEach((o) => {
|
|
112
|
+
const u = o.replace(/-([a-z])/g, (p) => p[1].toUpperCase());
|
|
113
|
+
let d = this.getAttribute(o);
|
|
114
|
+
if (d === null) {
|
|
115
|
+
const p = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
116
|
+
d = this.getAttribute(p);
|
|
117
|
+
}
|
|
118
|
+
if (d !== null && !this[u]) {
|
|
119
|
+
const p = b(u, d);
|
|
120
|
+
p !== null && (this[u] = p);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
connectedCallback() {
|
|
125
|
+
this._parseAttributes(), super.connectedCallback?.(), S(this);
|
|
126
|
+
const c = this.getAttribute("name");
|
|
127
|
+
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return f;
|
|
131
|
+
}
|
|
132
|
+
function $(e) {
|
|
133
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
134
|
+
}
|
|
135
|
+
function N(e) {
|
|
136
|
+
const t = e.__name || e.name;
|
|
137
|
+
if (!t)
|
|
138
|
+
throw new Error("Component must have a __name or name property");
|
|
139
|
+
const n = $(t), i = B(e);
|
|
140
|
+
customElements.get(n) || customElements.define(n, i);
|
|
141
|
+
}
|
|
142
|
+
N(w);
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { watch as w, getCurrentScope as P, onScopeDispose as _, computed as C, toValue as h, unref as I, defineComponent as j, mergeModels as O, useTemplateRef as k, useModel as M, onMounted as N, createElementBlock as v, openBlock as y, withDirectives as T, createCommentVNode as $, createElementVNode as D, normalizeClass as B, vModelText as x, toDisplayString as L, defineCustomElement as V } from "vue";
|
|
2
|
+
function R(e) {
|
|
3
|
+
return P() ? (_(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
const W = typeof window < "u" && typeof document < "u";
|
|
6
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
7
|
+
const H = Object.prototype.toString, G = (e) => H.call(e) === "[object Object]";
|
|
8
|
+
function m(e) {
|
|
9
|
+
return Array.isArray(e) ? e : [e];
|
|
10
|
+
}
|
|
11
|
+
function U(e, t, o) {
|
|
12
|
+
return w(
|
|
13
|
+
e,
|
|
14
|
+
t,
|
|
15
|
+
{
|
|
16
|
+
...o,
|
|
17
|
+
immediate: !0
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const A = W ? window : void 0;
|
|
22
|
+
function q(e) {
|
|
23
|
+
var t;
|
|
24
|
+
const o = h(e);
|
|
25
|
+
return (t = o?.$el) != null ? t : o;
|
|
26
|
+
}
|
|
27
|
+
function J(...e) {
|
|
28
|
+
const t = [], o = () => {
|
|
29
|
+
t.forEach((n) => n()), t.length = 0;
|
|
30
|
+
}, u = (n, r, s, i) => (n.addEventListener(r, s, i), () => n.removeEventListener(r, s, i)), l = C(() => {
|
|
31
|
+
const n = m(h(e[0])).filter((r) => r != null);
|
|
32
|
+
return n.every((r) => typeof r != "string") ? n : void 0;
|
|
33
|
+
}), a = U(
|
|
34
|
+
() => {
|
|
35
|
+
var n, r;
|
|
36
|
+
return [
|
|
37
|
+
(r = (n = l.value) == null ? void 0 : n.map((s) => q(s))) != null ? r : [A].filter((s) => s != null),
|
|
38
|
+
m(h(l.value ? e[1] : e[0])),
|
|
39
|
+
m(I(l.value ? e[2] : e[1])),
|
|
40
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
41
|
+
h(l.value ? e[3] : e[2])
|
|
42
|
+
];
|
|
43
|
+
},
|
|
44
|
+
([n, r, s, i]) => {
|
|
45
|
+
if (o(), !n?.length || !r?.length || !s?.length)
|
|
46
|
+
return;
|
|
47
|
+
const d = G(i) ? { ...i } : i;
|
|
48
|
+
t.push(
|
|
49
|
+
...n.flatMap(
|
|
50
|
+
(f) => r.flatMap(
|
|
51
|
+
(p) => s.map((g) => u(f, p, g, d))
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
},
|
|
56
|
+
{ flush: "post" }
|
|
57
|
+
), c = () => {
|
|
58
|
+
a(), o();
|
|
59
|
+
};
|
|
60
|
+
return R(o), c;
|
|
61
|
+
}
|
|
62
|
+
function K(e) {
|
|
63
|
+
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
64
|
+
}
|
|
65
|
+
function z(...e) {
|
|
66
|
+
let t, o, u = {};
|
|
67
|
+
e.length === 3 ? (t = e[0], o = e[1], u = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, o = e[0], u = e[1]) : (t = e[0], o = e[1]) : (t = !0, o = e[0]);
|
|
68
|
+
const {
|
|
69
|
+
target: l = A,
|
|
70
|
+
eventName: a = "keydown",
|
|
71
|
+
passive: c = !1,
|
|
72
|
+
dedupe: n = !1
|
|
73
|
+
} = u, r = K(t);
|
|
74
|
+
return J(l, a, (i) => {
|
|
75
|
+
i.repeat && h(n) || r(i) && o(i);
|
|
76
|
+
}, c);
|
|
77
|
+
}
|
|
78
|
+
const Z = { class: "pv-relative" }, Q = ["disabled", "placeholder"], X = {
|
|
79
|
+
key: 0,
|
|
80
|
+
"data-testid": "pv-search-input-shortcut",
|
|
81
|
+
class: "pv-kbd"
|
|
82
|
+
}, E = "/", Y = /* @__PURE__ */ j({
|
|
83
|
+
__name: "PvSearchInput",
|
|
84
|
+
props: /* @__PURE__ */ O({
|
|
85
|
+
placeholder: { default: "Search", type: String },
|
|
86
|
+
disabled: { type: Boolean, default: !1 },
|
|
87
|
+
displayShortcut: { type: Boolean }
|
|
88
|
+
}, {
|
|
89
|
+
modelValue: { required: !1, default: "" },
|
|
90
|
+
modelModifiers: {}
|
|
91
|
+
}),
|
|
92
|
+
emits: ["update:modelValue"],
|
|
93
|
+
setup(e, { expose: t }) {
|
|
94
|
+
const o = e, u = k("search-input"), l = M(e, "modelValue"), a = C(() => ({
|
|
95
|
+
"pv-input-search": !0,
|
|
96
|
+
"pv-full-width": !0,
|
|
97
|
+
"pv-input-padded-end": !0
|
|
98
|
+
}));
|
|
99
|
+
return N(() => {
|
|
100
|
+
o.displayShortcut && z(E, (c) => {
|
|
101
|
+
const n = c.target, r = n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || (n?.isContentEditable ?? !1), s = document.activeElement === u.value;
|
|
102
|
+
(!r || s) && (s || (c.preventDefault(), u.value?.focus()));
|
|
103
|
+
});
|
|
104
|
+
}), t({ input: u }), (c, n) => (y(), v("div", Z, [
|
|
105
|
+
T(D("input", {
|
|
106
|
+
ref: "search-input",
|
|
107
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => l.value = r),
|
|
108
|
+
"data-testid": "pv-search-input",
|
|
109
|
+
type: "text",
|
|
110
|
+
disabled: e.disabled,
|
|
111
|
+
class: B(a.value),
|
|
112
|
+
placeholder: e.placeholder
|
|
113
|
+
}, null, 10, Q), [
|
|
114
|
+
[x, l.value]
|
|
115
|
+
]),
|
|
116
|
+
e.displayShortcut ? (y(), v("kbd", X, L(E))) : $("v-if", !0)
|
|
117
|
+
]));
|
|
118
|
+
}
|
|
119
|
+
}), F = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
120
|
+
function ee(e) {
|
|
121
|
+
return !F.has(e);
|
|
122
|
+
}
|
|
123
|
+
function b(e, t) {
|
|
124
|
+
const o = document.querySelector('link[href*="' + t + '"]');
|
|
125
|
+
if (!e.shadowRoot)
|
|
126
|
+
return !1;
|
|
127
|
+
if (o && e.shadowRoot) {
|
|
128
|
+
const u = o.href;
|
|
129
|
+
if (e.shadowRoot.querySelector(`link[href="${u}"]`))
|
|
130
|
+
return;
|
|
131
|
+
const l = document.createElement("link");
|
|
132
|
+
return l.rel = "stylesheet", l.href = u, e.shadowRoot.prepend(l), !0;
|
|
133
|
+
}
|
|
134
|
+
return !1;
|
|
135
|
+
}
|
|
136
|
+
function te(e) {
|
|
137
|
+
if (!b(e, "pit-viper-v2")) {
|
|
138
|
+
if (b(e, "pit-viper")) {
|
|
139
|
+
b(e, "pit-viper-v2-scoped");
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
console.warn(
|
|
143
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const ne = (e) => ({ shadowRoot: ee(e) });
|
|
148
|
+
function oe(e, t) {
|
|
149
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
150
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
151
|
+
), !1);
|
|
152
|
+
}
|
|
153
|
+
function re(e, t) {
|
|
154
|
+
const o = Number(t);
|
|
155
|
+
return isNaN(o) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), o;
|
|
156
|
+
}
|
|
157
|
+
function se(e) {
|
|
158
|
+
const t = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), a = (e.__vccOpts || e).props;
|
|
159
|
+
return a && typeof a == "object" && Object.entries(a).forEach(([c, n]) => {
|
|
160
|
+
n === Boolean || n && n.type === Boolean ? t.add(c) : n === Number || n && n.type === Number ? o.add(c) : (n === Object || n === Array || n && (n.type === Object || n.type === Array)) && u.add(c);
|
|
161
|
+
}), { booleanProps: t, numberProps: o, jsonProps: u };
|
|
162
|
+
}
|
|
163
|
+
function S(e, t) {
|
|
164
|
+
try {
|
|
165
|
+
return JSON.parse(t);
|
|
166
|
+
} catch (o) {
|
|
167
|
+
return console.warn(
|
|
168
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${o instanceof Error ? o.message : String(o)}`
|
|
169
|
+
), null;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function ie(e) {
|
|
173
|
+
const t = e.__name || e.name;
|
|
174
|
+
if (!t)
|
|
175
|
+
throw new Error("Component must have a __name or name property");
|
|
176
|
+
const o = V(e, ne(t)), { booleanProps: u, numberProps: l, jsonProps: a } = se(e);
|
|
177
|
+
class c extends o {
|
|
178
|
+
_hiddenInput = null;
|
|
179
|
+
constructor() {
|
|
180
|
+
super(), this._parseAttributes();
|
|
181
|
+
}
|
|
182
|
+
disconnectedCallback() {
|
|
183
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Update the hidden input value
|
|
187
|
+
* Call this from the Vue component to sync form value
|
|
188
|
+
*/
|
|
189
|
+
setHiddenInputValue(r) {
|
|
190
|
+
this._hiddenInput && (this._hiddenInput.value = r ?? "");
|
|
191
|
+
}
|
|
192
|
+
_parseAttributes() {
|
|
193
|
+
u.forEach((s) => {
|
|
194
|
+
const i = this.getAttribute(s);
|
|
195
|
+
this[s] = oe(s, i);
|
|
196
|
+
}), l.forEach((s) => {
|
|
197
|
+
const i = this.getAttribute(s);
|
|
198
|
+
i !== null && (this[s] = re(s, i));
|
|
199
|
+
}), a.forEach((s) => {
|
|
200
|
+
const i = this.getAttribute(s);
|
|
201
|
+
if (i !== null) {
|
|
202
|
+
const d = S(s, i);
|
|
203
|
+
d !== null && (this[s] = d);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
const r = this.getAttribute("data-json-props");
|
|
207
|
+
r && r.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
208
|
+
const d = i.replace(/-([a-z])/g, (p) => p[1].toUpperCase());
|
|
209
|
+
let f = this.getAttribute(i);
|
|
210
|
+
if (f === null) {
|
|
211
|
+
const p = d.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
212
|
+
f = this.getAttribute(p);
|
|
213
|
+
}
|
|
214
|
+
if (f !== null && !this[d]) {
|
|
215
|
+
const p = S(d, f);
|
|
216
|
+
p !== null && (this[d] = p);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
connectedCallback() {
|
|
221
|
+
this._parseAttributes(), super.connectedCallback?.(), te(this);
|
|
222
|
+
const r = this.getAttribute("name");
|
|
223
|
+
r && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = r, this.after(this._hiddenInput));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return c;
|
|
227
|
+
}
|
|
228
|
+
function ue(e) {
|
|
229
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
230
|
+
}
|
|
231
|
+
function le(e) {
|
|
232
|
+
const t = e.__name || e.name;
|
|
233
|
+
if (!t)
|
|
234
|
+
throw new Error("Component must have a __name or name property");
|
|
235
|
+
const o = ue(t), u = ie(e);
|
|
236
|
+
customElements.get(o) || customElements.define(o, u);
|
|
237
|
+
}
|
|
238
|
+
le(Y);
|