@budibase/bbui 3.39.29 → 3.39.31
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/bbui.mjs +170 -146
- package/package.json +7 -4
- package/src/Form/Core/File.svelte +18 -5
- package/src/Form/File.svelte +4 -1
- package/src/helpers.test.ts +29 -0
- package/src/helpers.ts +10 -2
package/dist/bbui.mjs
CHANGED
|
@@ -2990,7 +2990,7 @@ function slide(l, { delay: u = 0, duration: f = 400, easing: p = cubic_out, axis
|
|
|
2990
2990
|
}
|
|
2991
2991
|
//#endregion
|
|
2992
2992
|
//#region src/Tooltip/AbsTooltip.svelte
|
|
2993
|
-
var root_2$
|
|
2993
|
+
var root_2$31 = /* @__PURE__ */ from_html("<span><span class=\"spectrum-Tooltip-label svelte-mr5ag\"> </span> <span class=\"spectrum-Tooltip-tip svelte-mr5ag\"></span></span>"), root$89 = /* @__PURE__ */ from_html("<div class=\"abs-tooltip svelte-mr5ag\"><!></div> <!>", 1);
|
|
2994
2994
|
function AbsTooltip(l, u) {
|
|
2995
2995
|
push$1(u, !1);
|
|
2996
2996
|
let f = /* @__PURE__ */ mutable_source(), p = /* @__PURE__ */ mutable_source(), m = prop(u, "position", 24, () => TooltipPosition.Top), v = prop(u, "type", 24, () => TooltipType.Default), y = prop(u, "text", 8, ""), b = prop(u, "fixed", 8, !1), x = prop(u, "color", 24, () => void 0), S = prop(u, "noWrap", 8, !1), w = prop(u, "offset", 8, 0), T = /* @__PURE__ */ mutable_source(), E = /* @__PURE__ */ mutable_source(!1), D = /* @__PURE__ */ mutable_source(), O = /* @__PURE__ */ mutable_source(), k = /* @__PURE__ */ mutable_source(!1), j = /* @__PURE__ */ mutable_source(), M, N = () => {
|
|
@@ -3019,7 +3019,7 @@ function AbsTooltip(l, u) {
|
|
|
3019
3019
|
main_es_default(l, {
|
|
3020
3020
|
target: ".spectrum",
|
|
3021
3021
|
children: (l, u) => {
|
|
3022
|
-
var b = root_2$
|
|
3022
|
+
var b = root_2$31();
|
|
3023
3023
|
let x;
|
|
3024
3024
|
var w = child(b), T = child(w, !0);
|
|
3025
3025
|
reset(w);
|
|
@@ -3917,9 +3917,10 @@ var Theme = /* @__PURE__ */ function(l) {
|
|
|
3917
3917
|
uuid: () => uuid$1
|
|
3918
3918
|
}), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min()), deepGet = deepGet$1;
|
|
3919
3919
|
function uuid$1() {
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3920
|
+
let l = () => globalThis.crypto?.getRandomValues ? globalThis.crypto.getRandomValues(new Uint8Array(1))[0] & 15 : Math.random() * 16 | 0;
|
|
3921
|
+
return "cxxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, (u) => {
|
|
3922
|
+
let f = l();
|
|
3923
|
+
return (u === "x" ? f : f & 3 | 8).toString(16);
|
|
3923
3924
|
});
|
|
3924
3925
|
}
|
|
3925
3926
|
var capitalise = (l) => l ? l.substring(0, 1).toUpperCase() + l.substring(1) : "", hashString = (l) => {
|
|
@@ -3966,7 +3967,7 @@ var capitalise = (l) => l ? l.substring(0, 1).toUpperCase() + l.substring(1) : "
|
|
|
3966
3967
|
case "month": return "M".repeat(l.value.length);
|
|
3967
3968
|
case "year": return "Y".repeat(l.value.length);
|
|
3968
3969
|
case "literal": return l.value;
|
|
3969
|
-
default: return console.
|
|
3970
|
+
default: return console.warn("Unsupported date part", l), "";
|
|
3970
3971
|
}
|
|
3971
3972
|
}, localeDateFormat = new Intl.DateTimeFormat().formatToParts(/* @__PURE__ */ new Date("2021-01-01")).map(getPatternForPart).join(""), getDateDisplayValue = (l, { enableTime: u = !0, timeOnly: f = !1 } = {}) => (typeof l == "string" && (l = (0, import_dayjs_min.default)(l)), l?.isValid() ? f ? l.format("HH:mm") : u ? l.format(`${localeDateFormat} HH:mm`) : l.format(localeDateFormat) : ""), hexToRGBA = (l, u) => (l.includes("#") && (l = l.replace("#", "")), `rgba(${parseInt(l.substring(0, 2), 16)}, ${parseInt(l.substring(2, 4), 16)}, ${parseInt(l.substring(4, 6), 16)}, ${u})`);
|
|
3972
3973
|
function rgbToHex(l) {
|
|
@@ -5104,7 +5105,7 @@ function Icon(l, u) {
|
|
|
5104
5105
|
}
|
|
5105
5106
|
//#endregion
|
|
5106
5107
|
//#region src/Tooltip/TooltipWrapper.svelte
|
|
5107
|
-
var root_2$
|
|
5108
|
+
var root_2$30 = /* @__PURE__ */ from_html("<div><!></div>"), root_1$46 = /* @__PURE__ */ from_html("<div class=\"icon-container svelte-9w6x79\"><!></div>"), root$87 = /* @__PURE__ */ from_html("<div><!> <!></div>");
|
|
5108
5109
|
function TooltipWrapper(l, u) {
|
|
5109
5110
|
let f = prop(u, "tooltip", 8, ""), p = prop(u, "size", 8, "M"), m = prop(u, "disabled", 8, !0), v = prop(u, "position", 24, () => void 0);
|
|
5110
5111
|
var y = root$87();
|
|
@@ -5121,7 +5122,7 @@ function TooltipWrapper(l, u) {
|
|
|
5121
5122
|
return v();
|
|
5122
5123
|
},
|
|
5123
5124
|
children: (l, f) => {
|
|
5124
|
-
var v = root_2$
|
|
5125
|
+
var v = root_2$30();
|
|
5125
5126
|
let y;
|
|
5126
5127
|
Icon(child(v), {
|
|
5127
5128
|
name: "info",
|
|
@@ -5143,7 +5144,7 @@ function TooltipWrapper(l, u) {
|
|
|
5143
5144
|
}
|
|
5144
5145
|
//#endregion
|
|
5145
5146
|
//#region src/Form/FieldLabel.svelte
|
|
5146
|
-
var root_2$
|
|
5147
|
+
var root_2$29 = /* @__PURE__ */ from_html("<sup class=\"required-asterisk svelte-nn5ob0\">*</sup>"), root_1$45 = /* @__PURE__ */ from_html("<label> <!></label>");
|
|
5147
5148
|
function FieldLabel(l, u) {
|
|
5148
5149
|
push$1(u, !1);
|
|
5149
5150
|
let f = /* @__PURE__ */ mutable_source(), p = prop(u, "forId", 24, () => void 0), m = prop(u, "label", 8), v = prop(u, "position", 8, "above"), y = prop(u, "tooltip", 8, ""), b = prop(u, "required", 8, !1);
|
|
@@ -5156,7 +5157,7 @@ function FieldLabel(l, u) {
|
|
|
5156
5157
|
size: "S",
|
|
5157
5158
|
children: (l, u) => {
|
|
5158
5159
|
var v = root_1$45(), y = child(v), x = sibling(y), S = (l) => {
|
|
5159
|
-
append$1(l, root_2$
|
|
5160
|
+
append$1(l, root_2$29());
|
|
5160
5161
|
};
|
|
5161
5162
|
if_block(x, (l) => {
|
|
5162
5163
|
b() && l(S);
|
|
@@ -5189,7 +5190,7 @@ function Label(l, u) {
|
|
|
5189
5190
|
}
|
|
5190
5191
|
//#endregion
|
|
5191
5192
|
//#region src/Form/Field.svelte
|
|
5192
|
-
var root_2$
|
|
5193
|
+
var root_2$28 = /* @__PURE__ */ from_html("<div class=\"description svelte-1kba3c6\"><!></div>"), root_4$17 = /* @__PURE__ */ from_html("<div class=\"error svelte-1kba3c6\"> </div>"), root_6$8 = /* @__PURE__ */ from_html("<div class=\"helpText svelte-1kba3c6\"><!> <span class=\"svelte-1kba3c6\"> </span></div>"), root$86 = /* @__PURE__ */ from_html("<div><!> <!> <div class=\"spectrum-Form-itemField svelte-1kba3c6\"><!> <!></div></div>");
|
|
5193
5194
|
function Field(l, u) {
|
|
5194
5195
|
let f = prop(u, "id", 24, () => void 0), p = prop(u, "label", 24, () => void 0), m = prop(u, "labelPosition", 8, "above"), v = prop(u, "error", 24, () => void 0), y = prop(u, "description", 24, () => void 0), b = prop(u, "helpText", 24, () => void 0), x = prop(u, "tooltip", 24, () => void 0), S = prop(u, "required", 8, !1);
|
|
5195
5196
|
var w = root$86();
|
|
@@ -5217,7 +5218,7 @@ function Field(l, u) {
|
|
|
5217
5218
|
p() && l(D);
|
|
5218
5219
|
});
|
|
5219
5220
|
var O = sibling(E, 2), k = (l) => {
|
|
5220
|
-
var u = root_2$
|
|
5221
|
+
var u = root_2$28();
|
|
5221
5222
|
Label(child(u), {
|
|
5222
5223
|
muted: !0,
|
|
5223
5224
|
children: (l, u) => {
|
|
@@ -5253,7 +5254,7 @@ function Field(l, u) {
|
|
|
5253
5254
|
}
|
|
5254
5255
|
//#endregion
|
|
5255
5256
|
//#region src/Form/Core/Checkbox.svelte
|
|
5256
|
-
var root_1$43 = /* @__PURE__ */ from_html("<span class=\"icon svelte-d686sj\"><!></span>"), root_3$
|
|
5257
|
+
var root_1$43 = /* @__PURE__ */ from_html("<span class=\"icon svelte-d686sj\"><!></span>"), root_3$22 = /* @__PURE__ */ from_html("<span class=\"icon svelte-d686sj\"><!></span>"), root_4$16 = /* @__PURE__ */ from_html("<span class=\"spectrum-Checkbox-label\"> </span>"), root$85 = /* @__PURE__ */ from_html("<label><input type=\"checkbox\" class=\"spectrum-Checkbox-input svelte-d686sj\"/> <span class=\"spectrum-Checkbox-box\"><!></span> <!></label>");
|
|
5257
5258
|
function Checkbox(l, u) {
|
|
5258
5259
|
push$1(u, !1);
|
|
5259
5260
|
let f = /* @__PURE__ */ mutable_source(), p = prop(u, "value", 8, !1), m = prop(u, "id", 24, () => void 0), v = prop(u, "text", 24, () => void 0), y = prop(u, "disabled", 8, !1), b = prop(u, "readonly", 8, !1), x = prop(u, "quiet", 8, !1), S = prop(u, "size", 8, "M"), w = prop(u, "indeterminate", 8, !1), T = createEventDispatcher(), E = (l) => {
|
|
@@ -5275,7 +5276,7 @@ function Checkbox(l, u) {
|
|
|
5275
5276
|
}), reset(u), append$1(l, u);
|
|
5276
5277
|
}, P = (l) => {
|
|
5277
5278
|
var u = comment(), f = first_child(u), m = (l) => {
|
|
5278
|
-
var u = root_3$
|
|
5279
|
+
var u = root_3$22();
|
|
5279
5280
|
Icon(child(u), {
|
|
5280
5281
|
name: "check",
|
|
5281
5282
|
weight: "bold",
|
|
@@ -5497,7 +5498,7 @@ var context_default = {
|
|
|
5497
5498
|
Modal: "bbui-modal",
|
|
5498
5499
|
PopoverRoot: "bbui-popover-root",
|
|
5499
5500
|
PopoverPortalOverride: "bbui-popover-portal-override"
|
|
5500
|
-
}, root_2$
|
|
5501
|
+
}, root_2$27 = /* @__PURE__ */ from_html("<div tabindex=\"0\" role=\"presentation\"><!></div>");
|
|
5501
5502
|
function Popover(l, u) {
|
|
5502
5503
|
push$1(u, !1);
|
|
5503
5504
|
let f = () => store_get(J, "$popoverPortalOverride", p), [p, m] = setup_stores(), v = /* @__PURE__ */ mutable_source(), y = prop(u, "anchor", 8), b = prop(u, "align", 24, () => PopoverAlignment.Right), x = prop(u, "portalTarget", 24, () => void 0), S = prop(u, "minWidth", 24, () => void 0), w = prop(u, "maxWidth", 24, () => void 0), T = prop(u, "maxHeight", 24, () => void 0), E = prop(u, "borderRadius", 24, () => void 0), D = prop(u, "open", 12, !1), O = prop(u, "widthMode", 8, "no-anchor"), k = prop(u, "dismissible", 8, !0), j = prop(u, "offset", 8, 4), M = prop(u, "customHeight", 24, () => void 0), N = prop(u, "animate", 8, !0), P = prop(u, "customZIndex", 24, () => void 0), F = prop(u, "handlePositionUpdate", 24, () => void 0), L = prop(u, "showPopover", 8, !0), R = prop(u, "clickOutsideOverride", 8, !1), z = prop(u, "resizable", 8, !0), B = prop(u, "wrap", 8, !1), V = prop(u, "closeOnScroll", 8, !1), H = createEventDispatcher(), U = 260, W = /* @__PURE__ */ mutable_source(), K = /* @__PURE__ */ mutable_source(!1), q = getContext$1(context_default.PopoverRoot), J = getContext$1(context_default.PopoverPortalOverride), Y = () => {
|
|
@@ -5536,7 +5537,7 @@ function Popover(l, u) {
|
|
|
5536
5537
|
return get$2(v);
|
|
5537
5538
|
},
|
|
5538
5539
|
children: (l, f) => {
|
|
5539
|
-
var p = root_2$
|
|
5540
|
+
var p = root_2$27();
|
|
5540
5541
|
let m;
|
|
5541
5542
|
slot(child(p), u, "default", {}, null), reset(p), action(p, (l, u) => positionDropdown?.(l, u), () => ({
|
|
5542
5543
|
anchor: y(),
|
|
@@ -5579,7 +5580,7 @@ function Popover(l, u) {
|
|
|
5579
5580
|
}
|
|
5580
5581
|
//#endregion
|
|
5581
5582
|
//#region src/Form/Core/Combobox.svelte
|
|
5582
|
-
var root_3$
|
|
5583
|
+
var root_3$21 = /* @__PURE__ */ from_html("<li role=\"option\" aria-selected=\"true\" tabindex=\"0\"><span class=\"spectrum-Menu-itemLabel svelte-1i32u11\"> </span> <div class=\"check svelte-1i32u11\"><!></div></li>"), root_4$15 = /* @__PURE__ */ from_html("<li class=\"spectrum-Menu-item empty svelte-1i32u11\">No results</li>"), root_1$42 = /* @__PURE__ */ from_html("<div><ul class=\"spectrum-Menu\" role=\"listbox\"><!></ul></div>"), root$84 = /* @__PURE__ */ from_html("<div><div><input type=\"text\" class=\"spectrum-Textfield-input spectrum-InputGroup-input svelte-1i32u11\"/></div> <button class=\"spectrum-Picker spectrum-Picker--sizeM spectrum-InputGroup-button\" tabindex=\"-1\" aria-haspopup=\"true\"><!></button></div> <!>", 1);
|
|
5583
5584
|
function Combobox(l, u) {
|
|
5584
5585
|
push$1(u, !1);
|
|
5585
5586
|
let f = /* @__PURE__ */ mutable_source(), p = prop(u, "value", 24, () => void 0), m = prop(u, "id", 24, () => void 0), v = prop(u, "placeholder", 8, "Choose an option or type"), y = prop(u, "disabled", 8, !1), b = prop(u, "readonly", 8, !1), x = prop(u, "options", 24, () => []), S = prop(u, "getOptionLabel", 8, (l) => `${l}`), w = prop(u, "getOptionValue", 8, (l) => `${l}`), T = prop(u, "popoverAutoWidth", 8, !1), E = prop(u, "wrapText", 8, !1), D = createEventDispatcher(), O = /* @__PURE__ */ mutable_source(!1), k = /* @__PURE__ */ mutable_source(!1), j = /* @__PURE__ */ mutable_source(), M = /* @__PURE__ */ mutable_source(""), N = (l) => l == null ? "" : String(l).toLowerCase(), P = (l, u = !0) => {
|
|
@@ -5635,7 +5636,7 @@ function Combobox(l, u) {
|
|
|
5635
5636
|
var b = child(v), x = child(b), D = (l) => {
|
|
5636
5637
|
var m = comment();
|
|
5637
5638
|
each$1(first_child(m), 1, () => get$2(f), index, (l, f) => {
|
|
5638
|
-
var m = root_3$
|
|
5639
|
+
var m = root_3$21();
|
|
5639
5640
|
let v;
|
|
5640
5641
|
var y = child(m), b = child(y, !0);
|
|
5641
5642
|
reset(y);
|
|
@@ -5753,7 +5754,7 @@ function Combobox_1(l, u) {
|
|
|
5753
5754
|
}
|
|
5754
5755
|
//#endregion
|
|
5755
5756
|
//#region src/Form/Core/DatePicker/DateInput.svelte
|
|
5756
|
-
var root_1$41 = /* @__PURE__ */ from_html("<div class=\"error-icon svelte-gvbq07\"><!></div>"), root_2$
|
|
5757
|
+
var root_1$41 = /* @__PURE__ */ from_html("<div class=\"error-icon svelte-gvbq07\"><!></div>"), root_2$26 = /* @__PURE__ */ from_html("<button type=\"button\" tabindex=\"-1\"><!></button>"), root$83 = /* @__PURE__ */ from_html("<div aria-required=\"false\" aria-haspopup=\"true\"><div><!> <input data-input=\"\" type=\"text\"/></div> <!></div>");
|
|
5757
5758
|
function DateInput(l, u) {
|
|
5758
5759
|
push$1(u, !1);
|
|
5759
5760
|
let f = /* @__PURE__ */ mutable_source(), p = prop(u, "anchor", 12), m = prop(u, "disabled", 8), v = prop(u, "readonly", 8), y = prop(u, "error", 8), b = prop(u, "focused", 8), x = prop(u, "placeholder", 8), S = prop(u, "id", 8), w = prop(u, "value", 8), T = prop(u, "icon", 8), E = prop(u, "enableTime", 8), D = prop(u, "timeOnly", 8);
|
|
@@ -5782,7 +5783,7 @@ function DateInput(l, u) {
|
|
|
5782
5783
|
let L;
|
|
5783
5784
|
reset(j);
|
|
5784
5785
|
var R = sibling(j, 2), z = (l) => {
|
|
5785
|
-
var u = root_2$
|
|
5786
|
+
var u = root_2$26();
|
|
5786
5787
|
let f;
|
|
5787
5788
|
Icon(child(u), { get name() {
|
|
5788
5789
|
return T();
|
|
@@ -46251,7 +46252,7 @@ function StatusLight(l, u) {
|
|
|
46251
46252
|
}
|
|
46252
46253
|
//#endregion
|
|
46253
46254
|
//#region src/Avatar/Avatar.svelte
|
|
46254
|
-
var root_1$40 = /* @__PURE__ */ from_html("<img alt=\"Avatar\"/>"), root_2$
|
|
46255
|
+
var root_1$40 = /* @__PURE__ */ from_html("<img alt=\"Avatar\"/>"), root_2$25 = /* @__PURE__ */ from_html("<div> </div>");
|
|
46255
46256
|
function Avatar(l, u) {
|
|
46256
46257
|
push$1(u, !1);
|
|
46257
46258
|
let f = /* @__PURE__ */ new Map([
|
|
@@ -46284,7 +46285,7 @@ function Avatar(l, u) {
|
|
|
46284
46285
|
() => (deep_read_state(p()), untrack(() => f.get(p())))
|
|
46285
46286
|
]), append$1(l, u);
|
|
46286
46287
|
}, j = (l) => {
|
|
46287
|
-
var u = root_2$
|
|
46288
|
+
var u = root_2$25();
|
|
46288
46289
|
let f;
|
|
46289
46290
|
var p = child(u, !0);
|
|
46290
46291
|
reset(u), template_effect((l) => {
|
|
@@ -46460,7 +46461,7 @@ function PickerIcon(l, u) {
|
|
|
46460
46461
|
}
|
|
46461
46462
|
//#endregion
|
|
46462
46463
|
//#region src/Form/Core/Picker.svelte
|
|
46463
|
-
var root_1$39 = /* @__PURE__ */ from_html("<span><!></span>"), root_2$
|
|
46464
|
+
var root_1$39 = /* @__PURE__ */ from_html("<span><!></span>"), root_2$24 = /* @__PURE__ */ from_html("<span class=\"option-extra svelte-fvzgyg\"><!></span>"), root_3$20 = /* @__PURE__ */ from_html("<span class=\"picker-label-subtitle svelte-fvzgyg\"> </span>"), root_8$4 = /* @__PURE__ */ from_html("<div class=\"check select-all-check svelte-fvzgyg\"><!></div>"), root_7$6 = /* @__PURE__ */ from_html("<li class=\"spectrum-Menu-item select-all-item svelte-fvzgyg\" role=\"option\" aria-selected=\"true\" tabindex=\"0\"><span class=\"spectrum-Menu-itemLabel svelte-fvzgyg\"> </span> <!></li>"), root_9$1 = /* @__PURE__ */ from_html("<li role=\"option\" aria-selected=\"true\" tabindex=\"0\"><span class=\"spectrum-Menu-itemLabel svelte-fvzgyg\"> </span> <div class=\"check svelte-fvzgyg\"><!></div></li>"), root_11$2 = /* @__PURE__ */ from_html("<li class=\"virtual-spacer svelte-fvzgyg\" aria-hidden=\"true\"></li>"), root_13$1 = /* @__PURE__ */ from_html("<span class=\"option-extra icon svelte-fvzgyg\"><!></span>"), root_14$2 = /* @__PURE__ */ from_html("<span class=\"option-extra svelte-fvzgyg\"><!></span>"), root_15$1 = /* @__PURE__ */ from_html("<span class=\"subtitle-text svelte-fvzgyg\"> </span>"), root_16$1 = /* @__PURE__ */ from_html("<span class=\"option-tag svelte-fvzgyg\"><!></span>"), root_12$1 = /* @__PURE__ */ from_html("<li role=\"option\" aria-selected=\"true\" tabindex=\"0\"><!> <!> <span class=\"spectrum-Menu-itemLabel svelte-fvzgyg\"> <!></span> <!> <!> <div class=\"check svelte-fvzgyg\"><!></div></li>"), root_21$2 = /* @__PURE__ */ from_html("<li class=\"virtual-spacer svelte-fvzgyg\" aria-hidden=\"true\"></li>"), root_10$2 = /* @__PURE__ */ from_html("<!> <!> <!>", 1), root_22$1 = /* @__PURE__ */ from_html("<div><!></div>"), root_23$2 = /* @__PURE__ */ from_html("<div class=\"footer svelte-fvzgyg\"> </div>"), root_5$9 = /* @__PURE__ */ from_html("<div><!> <ul class=\"spectrum-Menu\" role=\"listbox\"><!> <!> <!></ul> <!> <!></div>"), root$74 = /* @__PURE__ */ from_html("<button aria-haspopup=\"listbox\"><!> <!> <span><span class=\"picker-label-text svelte-fvzgyg\"> </span> <!></span> <!></button> <!>", 1);
|
|
46464
46465
|
function Picker(l, u) {
|
|
46465
46466
|
push$1(u, !1);
|
|
46466
46467
|
let f = /* @__PURE__ */ mutable_source(), p = /* @__PURE__ */ mutable_source(), m = /* @__PURE__ */ mutable_source(), v = /* @__PURE__ */ mutable_source(), y = /* @__PURE__ */ mutable_source(), b = prop(u, "id", 24, () => void 0), x = prop(u, "size", 8, "M"), S = prop(u, "disabled", 8, !1), w = prop(u, "bordered", 8, !0), T = prop(u, "fieldText", 8, ""), E = prop(u, "fieldIcon", 24, () => void 0), D = prop(u, "fieldColour", 8, ""), O = prop(u, "fieldSubtitle", 8, null), k = prop(u, "isPlaceholder", 8, !1), j = prop(u, "placeholderOption", 24, () => void 0), M = prop(u, "options", 24, () => []), N = prop(u, "isOptionSelected", 8, (l) => l), P = prop(u, "isOptionEnabled", 8, (l, u) => l), F = prop(u, "tooltipMessage", 24, () => void 0), L = prop(u, "onSelectOption", 8, () => {}), R = prop(u, "getOptionLabel", 8, (l, u) => `${l}`), z = prop(u, "getOptionValue", 8, (l, u) => l), B = prop(u, "getOptionIcon", 8, (l, u) => l?.icon ?? void 0), V = prop(u, "getOptionColour", 8, (l, u) => l?.colour ?? void 0), H = prop(u, "getOptionSubtitle", 8, (l, u) => l?.subtitle ?? void 0), U = prop(u, "getOptionTooltip", 8, (l, u) => l?.tooltip ?? void 0), W = prop(u, "useOptionIconImage", 8, !1), K = prop(u, "open", 12, !1), q = prop(u, "readonly", 8, !1), J = prop(u, "quiet", 8, !1), Y = prop(u, "autoWidth", 8, !1), X = prop(u, "popoverAutoWidth", 8, !1), Z = prop(u, "autocomplete", 8, !1), Q = prop(u, "sort", 8, !1), ee = prop(u, "searchTerm", 12, null), ne = prop(u, "searchPlaceholder", 8, "Search"), $ = prop(u, "customPopoverHeight", 24, () => void 0), re = prop(u, "align", 24, () => PopoverAlignment.Left), ie = prop(u, "footer", 24, () => void 0), ae = prop(u, "customAnchor", 24, () => void 0), oe = prop(u, "loading", 8, !1), ce = prop(u, "onOptionMouseenter", 8, () => {}), le = prop(u, "onOptionMouseleave", 8, () => {}), ue = prop(u, "showSelectAll", 8, !1), fe = prop(u, "selectAllText", 8, "Select all"), pe = prop(u, "indeterminate", 8, !1), me = prop(u, "allSelected", 8, !1), ge = prop(u, "toggleSelectAll", 8, () => {}), _e = prop(u, "wrapText", 8, !1), ve = prop(u, "fieldTooltip", 8, null), ye = 360, xe = 200, Se = 6, Ce = 36, we = createEventDispatcher(), Te = /* @__PURE__ */ mutable_source(null), Ee = /* @__PURE__ */ mutable_source(null), De = /* @__PURE__ */ mutable_source([]), Oe = /* @__PURE__ */ mutable_source(0), ke = /* @__PURE__ */ mutable_source(0), Ae = (l) => l ? typeof l == "object" && l.component ? {
|
|
@@ -46534,7 +46535,7 @@ function Picker(l, u) {
|
|
|
46534
46535
|
get$2(p) && l(Ve);
|
|
46535
46536
|
});
|
|
46536
46537
|
var He = sibling(Be, 2), Ue = (l) => {
|
|
46537
|
-
var u = root_2$
|
|
46538
|
+
var u = root_2$24();
|
|
46538
46539
|
StatusLight(child(u), {
|
|
46539
46540
|
square: !0,
|
|
46540
46541
|
get color() {
|
|
@@ -46550,7 +46551,7 @@ function Picker(l, u) {
|
|
|
46550
46551
|
var Ke = child(We), qe = child(Ke, !0);
|
|
46551
46552
|
reset(Ke);
|
|
46552
46553
|
var Je = sibling(Ke, 2), Ye = (l) => {
|
|
46553
|
-
var u = root_3$
|
|
46554
|
+
var u = root_3$20(), f = child(u, !0);
|
|
46554
46555
|
reset(u), template_effect(() => set_text(f, O())), append$1(l, u);
|
|
46555
46556
|
};
|
|
46556
46557
|
if_block(Je, (l) => {
|
|
@@ -46591,7 +46592,7 @@ function Picker(l, u) {
|
|
|
46591
46592
|
closeOnScroll: !0,
|
|
46592
46593
|
$$events: { close: () => K(!1) },
|
|
46593
46594
|
children: (l, u) => {
|
|
46594
|
-
var p = root_5$
|
|
46595
|
+
var p = root_5$9();
|
|
46595
46596
|
let m;
|
|
46596
46597
|
var b = child(p), w = (l) => {
|
|
46597
46598
|
Search(l, {
|
|
@@ -46611,10 +46612,10 @@ function Picker(l, u) {
|
|
|
46611
46612
|
Z() && l(w);
|
|
46612
46613
|
});
|
|
46613
46614
|
var T = sibling(b, 2), E = child(T), D = (l) => {
|
|
46614
|
-
var u = root_7$
|
|
46615
|
+
var u = root_7$6(), f = child(u), p = child(f, !0);
|
|
46615
46616
|
reset(f);
|
|
46616
46617
|
var m = sibling(f, 2), v = (l) => {
|
|
46617
|
-
var u = root_8$
|
|
46618
|
+
var u = root_8$4(), f = child(u);
|
|
46618
46619
|
{
|
|
46619
46620
|
let l = /* @__PURE__ */ derived_safe_equal(() => pe() ? "minus" : "check");
|
|
46620
46621
|
Icon(f, {
|
|
@@ -46638,7 +46639,7 @@ function Picker(l, u) {
|
|
|
46638
46639
|
deep_read_state(ue()), get$2(v), untrack(() => ue() && get$2(v).length > 0) && l(D);
|
|
46639
46640
|
});
|
|
46640
46641
|
var O = sibling(E, 2), M = (l) => {
|
|
46641
|
-
var u = root_9$
|
|
46642
|
+
var u = root_9$1();
|
|
46642
46643
|
let f;
|
|
46643
46644
|
var p = child(u), m = child(p, !0);
|
|
46644
46645
|
reset(p);
|
|
@@ -46657,7 +46658,7 @@ function Picker(l, u) {
|
|
|
46657
46658
|
});
|
|
46658
46659
|
var q = sibling(O, 2), J = (l) => {
|
|
46659
46660
|
var u = root_10$2(), f = first_child(u), p = (l) => {
|
|
46660
|
-
var u = root_11$
|
|
46661
|
+
var u = root_11$2();
|
|
46661
46662
|
template_effect(() => set_style(u, `height:${get$2(Oe)}px`)), append$1(l, u);
|
|
46662
46663
|
};
|
|
46663
46664
|
if_block(f, (l) => {
|
|
@@ -47113,7 +47114,7 @@ function Select_1(l, u) {
|
|
|
47113
47114
|
}
|
|
47114
47115
|
//#endregion
|
|
47115
47116
|
//#region src/Form/Core/DatePicker/Calendar.svelte
|
|
47116
|
-
var root_1$38 = /* @__PURE__ */ from_html("<th scope=\"col\" class=\"spectrum-Calendar-tableCell svelte-16a6zot\"><abbr class=\"spectrum-Calendar-dayOfWeek svelte-16a6zot\"> </abbr></th>"), root_3$
|
|
47117
|
+
var root_1$38 = /* @__PURE__ */ from_html("<th scope=\"col\" class=\"spectrum-Calendar-tableCell svelte-16a6zot\"><abbr class=\"spectrum-Calendar-dayOfWeek svelte-16a6zot\"> </abbr></th>"), root_3$19 = /* @__PURE__ */ from_html("<td class=\"spectrum-Calendar-tableCell svelte-16a6zot\" aria-disabled=\"true\" aria-selected=\"false\" aria-invalid=\"false\"><span role=\"presentation\"> </span></td>"), root_2$23 = /* @__PURE__ */ from_html("<tr class=\"svelte-16a6zot\"></tr>"), root$73 = /* @__PURE__ */ from_html("<div class=\"spectrum-Calendar svelte-16a6zot\"><div class=\"spectrum-Calendar-header svelte-16a6zot\"><div class=\"spectrum-Calendar-title svelte-16a6zot\" aria-live=\"assertive\" aria-atomic=\"true\"><div class=\"month-selector svelte-16a6zot\"><!></div> <!></div> <button aria-label=\"Previous\" title=\"Previous\" class=\"spectrum-ActionButton spectrum-ActionButton--quiet spectrum-Calendar-prevMonth svelte-16a6zot\"><!></button> <button aria-label=\"Next\" title=\"Next\" class=\"spectrum-ActionButton spectrum-ActionButton--quiet spectrum-Calendar-nextMonth svelte-16a6zot\"><!></button></div> <div class=\"spectrum-Calendar-body\" aria-readonly=\"true\" aria-disabled=\"false\"><table role=\"presentation\" class=\"spectrum-Calendar-table\"><thead role=\"presentation\"><tr class=\"svelte-16a6zot\"></tr></thead><tbody role=\"presentation\"></tbody></table></div></div>");
|
|
47117
47118
|
function Calendar(l, u) {
|
|
47118
47119
|
push$1(u, !1);
|
|
47119
47120
|
let f = /* @__PURE__ */ mutable_source(), p = /* @__PURE__ */ mutable_source(), m = /* @__PURE__ */ mutable_source(), v = prop(u, "value", 8), y = prop(u, "startDayOfWeek", 8, "Monday"), b = prop(u, "calendarLabels", 24, () => resolveTranslationGroup("calendar")), x = createEventDispatcher(), S = [
|
|
@@ -47245,7 +47246,7 @@ function Calendar(l, u) {
|
|
|
47245
47246
|
}), reset(le), reset(ce);
|
|
47246
47247
|
var ue = sibling(ce);
|
|
47247
47248
|
return each$1(ue, 5, () => get$2(p), index, (l, u) => {
|
|
47248
|
-
var f = root_2$
|
|
47249
|
+
var f = root_2$23();
|
|
47249
47250
|
each$1(f, 4, () => [
|
|
47250
47251
|
0,
|
|
47251
47252
|
1,
|
|
@@ -47256,7 +47257,7 @@ function Calendar(l, u) {
|
|
|
47256
47257
|
6
|
|
47257
47258
|
], index, (l, f) => {
|
|
47258
47259
|
let p = /* @__PURE__ */ derived_safe_equal(() => (get$2(u), untrack(() => get$2(u).add(f, "days")))), m = /* @__PURE__ */ derived_safe_equal(() => (deep_read_state(get$2(p)), get$2(D), untrack(() => get$2(p).month() !== get$2(D).month())));
|
|
47259
|
-
var y = root_3$
|
|
47260
|
+
var y = root_3$19(), b = child(y);
|
|
47260
47261
|
let x;
|
|
47261
47262
|
var S = child(b, !0);
|
|
47262
47263
|
reset(b), reset(y), template_effect((l, u, f) => {
|
|
@@ -47275,7 +47276,7 @@ function Calendar(l, u) {
|
|
|
47275
47276
|
}
|
|
47276
47277
|
//#endregion
|
|
47277
47278
|
//#region src/Tooltip/Tooltip.svelte
|
|
47278
|
-
var root_1$37 = /* @__PURE__ */ from_html("<span><span class=\"spectrum-Tooltip-label svelte-avjlz6\"> </span> <span class=\"spectrum-Tooltip-tip svelte-avjlz6\"></span></span>"), root_2$
|
|
47279
|
+
var root_1$37 = /* @__PURE__ */ from_html("<span><span class=\"spectrum-Tooltip-label svelte-avjlz6\"> </span> <span class=\"spectrum-Tooltip-tip svelte-avjlz6\"></span></span>"), root_2$22 = /* @__PURE__ */ from_html("<span class=\"u-tooltip-showOnHover tooltip svelte-avjlz6\"><!> <div><span class=\"spectrum-Tooltip-label svelte-avjlz6\"> </span> <span class=\"spectrum-Tooltip-tip svelte-avjlz6\"></span></div></span>");
|
|
47279
47280
|
function Tooltip(l, u) {
|
|
47280
47281
|
let f = prop(u, "direction", 8, "top"), p = prop(u, "text", 8, ""), m = prop(u, "textWrapping", 8, !1);
|
|
47281
47282
|
var v = comment(), y = first_child(v), b = (l) => {
|
|
@@ -47284,7 +47285,7 @@ function Tooltip(l, u) {
|
|
|
47284
47285
|
set_class(u, 1, `spectrum-Tooltip spectrum-Tooltip--${f() ?? ""} is-open tooltip`, "svelte-avjlz6"), set_text(v, p());
|
|
47285
47286
|
}), append$1(l, u);
|
|
47286
47287
|
}, x = (l) => {
|
|
47287
|
-
var m = root_2$
|
|
47288
|
+
var m = root_2$22(), v = child(m);
|
|
47288
47289
|
slot(v, u, "default", {}, null);
|
|
47289
47290
|
var y = sibling(v, 2), b = child(y), x = child(b, !0);
|
|
47290
47291
|
reset(b), next(2), reset(y), reset(m), template_effect(() => {
|
|
@@ -47297,7 +47298,7 @@ function Tooltip(l, u) {
|
|
|
47297
47298
|
}
|
|
47298
47299
|
//#endregion
|
|
47299
47300
|
//#region src/ActionButton/ActionButton.svelte
|
|
47300
|
-
var root_2$
|
|
47301
|
+
var root_2$21 = /* @__PURE__ */ from_html("<img alt=\"\" aria-hidden=\"true\"/>"), root_6$7 = /* @__PURE__ */ from_html("<span class=\"spectrum-ActionButton-label svelte-1x47x3g\"><!></span>"), root_7$5 = /* @__PURE__ */ from_html("<div class=\"tooltip svelte-1x47x3g\"><!></div>"), root$72 = /* @__PURE__ */ from_html("<button><!> <!> <!></button>");
|
|
47301
47302
|
function ActionButton(l, u) {
|
|
47302
47303
|
let f = sanitize_slots(u);
|
|
47303
47304
|
push$1(u, !1);
|
|
@@ -47316,7 +47317,7 @@ function ActionButton(l, u) {
|
|
|
47316
47317
|
let P;
|
|
47317
47318
|
var F = child(N), L = (l) => {
|
|
47318
47319
|
var u = comment(), p = first_child(u), v = (l) => {
|
|
47319
|
-
var u = root_2$
|
|
47320
|
+
var u = root_2$21();
|
|
47320
47321
|
template_effect(() => {
|
|
47321
47322
|
set_class(u, 1, `custom-icon custom-icon-${S() ?? ""}`, "svelte-1x47x3g"), set_attribute(u, "src", x());
|
|
47322
47323
|
}), append$1(l, u);
|
|
@@ -47353,7 +47354,7 @@ function ActionButton(l, u) {
|
|
|
47353
47354
|
k() ? l(z) : l(B, !1);
|
|
47354
47355
|
});
|
|
47355
47356
|
var V = sibling(R, 2), H = (l) => {
|
|
47356
|
-
var u = root_7$
|
|
47357
|
+
var u = root_7$5();
|
|
47357
47358
|
Tooltip(child(u), {
|
|
47358
47359
|
textWrapping: !0,
|
|
47359
47360
|
direction: "bottom",
|
|
@@ -47818,7 +47819,7 @@ function Link(l, u) {
|
|
|
47818
47819
|
}
|
|
47819
47820
|
//#endregion
|
|
47820
47821
|
//#region src/Form/Core/Dropzone.svelte
|
|
47821
|
-
var root_6$6 = /* @__PURE__ */ from_html("<div class=\"filesize\"><!></div>"), root_9
|
|
47822
|
+
var root_6$6 = /* @__PURE__ */ from_html("<div class=\"filesize\"><!></div>"), root_9 = /* @__PURE__ */ from_html("<div class=\"delete-button svelte-sm3c1d\"><!></div>"), root_10$1 = /* @__PURE__ */ from_html("<img alt=\"preview\" class=\"svelte-sm3c1d\"/>"), root_11$1 = /* @__PURE__ */ from_html("<div class=\"placeholder svelte-sm3c1d\"><div class=\"extension svelte-sm3c1d\"> </div> <div>Preview not supported</div></div>"), root_12 = /* @__PURE__ */ from_html("<div class=\"footer\"> </div>"), root_2$20 = /* @__PURE__ */ from_html("<div class=\"gallery svelte-sm3c1d\"><div class=\"title svelte-sm3c1d\"><div class=\"filename svelte-sm3c1d\"><!></div> <!> <!></div> <!> <div><!></div> <div><!></div> <!></div>"), root_16 = /* @__PURE__ */ from_html("<div class=\"filesize\"><!></div>"), root_19$1 = /* @__PURE__ */ from_html("<div class=\"delete-button svelte-sm3c1d\"><!></div>"), root_15 = /* @__PURE__ */ from_html("<div class=\"gallery svelte-sm3c1d\"><div class=\"title svelte-sm3c1d\"><div class=\"filename svelte-sm3c1d\"> </div> <!> <!></div></div>"), root_21$1 = /* @__PURE__ */ from_html("<svg class=\"spectrum-IllustratedMessage-illustration\" width=\"125\" height=\"60\" viewBox=\"0 0 199 97.7\"><defs><style>.cls-1,\n .cls-2 {\n fill: none;\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n .cls-1 {\n stroke-width: 3px;\n }\n .cls-2 {\n stroke-width: 2px;\n }</style></defs><path class=\"cls-1\" d=\"M110.53,85.66,100.26,95.89a1.09,1.09,0,0,1-1.52,0L88.47,85.66\"></path><line class=\"cls-1\" x1=\"99.5\" y1=\"95.5\" x2=\"99.5\" y2=\"58.5\"></line><path class=\"cls-1\" d=\"M105.5,73.5h19a2,2,0,0,0,2-2v-43\"></path><path class=\"cls-1\" d=\"M126.5,22.5h-19a2,2,0,0,1-2-2V1.5h-31a2,2,0,0,0-2,2v68a2,2,0,0,0,2,2h19\"></path><line class=\"cls-1\" x1=\"105.5\" y1=\"1.5\" x2=\"126.5\" y2=\"22.5\"></line><path class=\"cls-2\" d=\"M47.93,50.49a5,5,0,1,0-4.83-5A4.93,4.93,0,0,0,47.93,50.49Z\"></path><path class=\"cls-2\" d=\"M36.6,65.93,42.05,60A2.06,2.06,0,0,1,45,60l12.68,13.2\"></path><path class=\"cls-2\" d=\"M3.14,73.23,22.42,53.76a1.65,1.65,0,0,1,2.38,0l19.05,19.7\"></path><path class=\"cls-1\" d=\"M139.5,36.5H196A1.49,1.49,0,0,1,197.5,38V72A1.49,1.49,0,0,1,196,73.5H141A1.49,1.49,0,0,1,139.5,72V32A1.49,1.49,0,0,1,141,30.5H154a2.43,2.43,0,0,1,1.67.66l6,5.66\"></path><rect class=\"cls-1\" x=\"1.5\" y=\"34.5\" width=\"58\" height=\"39\" rx=\"2\" ry=\"2\"></rect></svg> <h2 class=\"spectrum-Heading spectrum-Heading--sizeL spectrum-Heading--light spectrum-IllustratedMessage-heading svelte-sm3c1d\"> </h2>", 1), root_23$1 = /* @__PURE__ */ from_html("<br/> ", 1), root_26$1 = /* @__PURE__ */ from_html("<div class=\"tag svelte-sm3c1d\"><!></div>"), root_25 = /* @__PURE__ */ from_html("<div class=\"tags svelte-sm3c1d\"></div>"), root_22 = /* @__PURE__ */ from_html("<p class=\"spectrum-Body spectrum-Body--sizeS spectrum-IllustratedMessage-description svelte-sm3c1d\"><label class=\"spectrum-Link\"> </label> <!></p> <!>", 1), root_28 = /* @__PURE__ */ from_html("<div class=\"loading svelte-sm3c1d\"><!></div>"), root_20$1 = /* @__PURE__ */ from_html("<div role=\"region\" tabindex=\"0\"><div class=\"spectrum-IllustratedMessage spectrum-IllustratedMessage--cta\"><input type=\"file\" class=\"svelte-sm3c1d\"/> <!> <!></div> <!></div>"), root$67 = /* @__PURE__ */ from_html("<div><!> <!></div>");
|
|
47822
47823
|
function Dropzone(l, u) {
|
|
47823
47824
|
push$1(u, !1);
|
|
47824
47825
|
let f = /* @__PURE__ */ mutable_source(), p = /* @__PURE__ */ mutable_source(), m = /* @__PURE__ */ mutable_source(), v = /* @__PURE__ */ mutable_source(), y = 1e3, b = 1e6, x = prop(u, "value", 24, () => []), S = prop(u, "id", 8, null), w = prop(u, "disabled", 8, !1), T = prop(u, "compact", 8, !1), E = prop(u, "fileSizeLimit", 8, b * 20), D = prop(u, "processFiles", 8, null), O = prop(u, "deleteAttachments", 8, null), k = prop(u, "handleFileTooLarge", 8, null), j = prop(u, "handleTooManyFiles", 8, null), M = prop(u, "gallery", 8, !0), N = prop(u, "fileTags", 24, () => []), P = prop(u, "maximum", 24, () => void 0), F = prop(u, "extensions", 8, "*"), L = prop(u, "titleText", 8, null), R = prop(u, "clickText", 8, null), z = prop(u, "addText", 8, null), B = createEventDispatcher(), V = [
|
|
@@ -47898,7 +47899,7 @@ function Dropzone(l, u) {
|
|
|
47898
47899
|
let ae;
|
|
47899
47900
|
var oe = child(ie), ce = (l) => {
|
|
47900
47901
|
var u = comment(), v = first_child(u), S = (l) => {
|
|
47901
|
-
var u = root_2$
|
|
47902
|
+
var u = root_2$20(), v = child(u), x = child(v), S = child(x), T = (l) => {
|
|
47902
47903
|
Link(l, {
|
|
47903
47904
|
target: "_blank",
|
|
47904
47905
|
get download() {
|
|
@@ -47937,7 +47938,7 @@ function Dropzone(l, u) {
|
|
|
47937
47938
|
get$2(f), untrack(() => get$2(f).size) && l(O);
|
|
47938
47939
|
});
|
|
47939
47940
|
var k = sibling(D, 2), j = (l) => {
|
|
47940
|
-
var u = root_9
|
|
47941
|
+
var u = root_9();
|
|
47941
47942
|
Icon(child(u), { name: "trash" }), reset(u), event("click", u, X), append$1(l, u);
|
|
47942
47943
|
};
|
|
47943
47944
|
if_block(k, (l) => {
|
|
@@ -47947,7 +47948,7 @@ function Dropzone(l, u) {
|
|
|
47947
47948
|
var u = root_10$1();
|
|
47948
47949
|
template_effect(() => set_attribute(u, "src", get$2(K))), append$1(l, u);
|
|
47949
47950
|
}, F = (l) => {
|
|
47950
|
-
var u = root_11(), p = child(u), m = child(p, !0);
|
|
47951
|
+
var u = root_11$1(), p = child(u), m = child(p, !0);
|
|
47951
47952
|
reset(p), next(2), reset(u), template_effect(() => set_text(m, (get$2(f), untrack(() => get$2(f).name || "Unknown file")))), append$1(l, u);
|
|
47952
47953
|
};
|
|
47953
47954
|
if_block(M, (l) => {
|
|
@@ -48153,7 +48154,7 @@ function Divider(l, u) {
|
|
|
48153
48154
|
}
|
|
48154
48155
|
//#endregion
|
|
48155
48156
|
//#region src/Form/Core/EnvDropdown.svelte
|
|
48156
|
-
var root_2$
|
|
48157
|
+
var root_2$19 = /* @__PURE__ */ from_html("<div class=\"no-variables-text primary-text svelte-13nhtdc\">Upgrade your plan to get environment variables</div>"), root_5$8 = /* @__PURE__ */ from_html("<li class=\"spectrum-Menu-item\" role=\"option\" aria-selected=\"false\" tabindex=\"0\"><div class=\"spectrum-Menu-itemLabel\"><div class=\"primary-text svelte-13nhtdc\"> <span></span></div></div></li>"), root_4$13 = /* @__PURE__ */ from_html("<div style=\"max-height: 100px\"></div>"), root_6$5 = /* @__PURE__ */ from_html("<div class=\"no-variables-text primary-text svelte-13nhtdc\">You don't have any environment variables yet</div>"), root_7$4 = /* @__PURE__ */ from_html("<div class=\"add-variable svelte-13nhtdc\"><!> <div class=\"primary-text svelte-13nhtdc\">Add Variable</div></div>"), root_8$3 = /* @__PURE__ */ from_html("<div class=\"add-variable svelte-13nhtdc\"><!> <div class=\"primary-text svelte-13nhtdc\">Upgrade plan</div></div>"), root_1$35 = /* @__PURE__ */ from_html("<div class=\"spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open svelte-13nhtdc\"><ul class=\"spectrum-Menu\" role=\"listbox\"><!></ul> <!> <!></div>"), root$65 = /* @__PURE__ */ from_html("<div class=\"spectrum-InputGroup svelte-13nhtdc\"><div><div class=\"inline-icon svelte-13nhtdc\"><!></div> <input class=\"spectrum-Textfield-input\"/></div> <!></div>");
|
|
48157
48158
|
function EnvDropdown(l, u) {
|
|
48158
48159
|
push$1(u, !1);
|
|
48159
48160
|
let f = /* @__PURE__ */ mutable_source(), p = prop(u, "value", 24, () => void 0), m = prop(u, "placeholder", 24, () => void 0), v = prop(u, "type", 8, "text"), y = prop(u, "disabled", 8, !1), b = prop(u, "id", 24, () => void 0), x = prop(u, "readonly", 8, !1), S = prop(u, "updateOnChange", 8, !0), w = prop(u, "align", 24, () => void 0), T = prop(u, "autofocus", 8, !1), E = prop(u, "autocomplete", 24, () => void 0), D = prop(u, "variables", 8), O = prop(u, "showModal", 8), k = prop(u, "environmentVariablesEnabled", 8), j = prop(u, "handleUpgradePanel", 8), M = createEventDispatcher(), N = /* @__PURE__ */ mutable_source(), P = /* @__PURE__ */ mutable_source(!1), F = /* @__PURE__ */ mutable_source(!1), L = /{{\s*env\.([^\s]+)\s*}}/g, R = (l) => {
|
|
@@ -48207,12 +48208,12 @@ function EnvDropdown(l, u) {
|
|
|
48207
48208
|
remove_input_defaults(Q), bind_this(Q, (l) => set(N, l), () => get$2(N)), reset(J);
|
|
48208
48209
|
var ee = sibling(J, 2), ne = (l) => {
|
|
48209
48210
|
var u = root_1$35(), f = child(u), p = child(f), m = (l) => {
|
|
48210
|
-
append$1(l, root_2$
|
|
48211
|
+
append$1(l, root_2$19());
|
|
48211
48212
|
}, v = (l) => {
|
|
48212
48213
|
var u = comment(), f = first_child(u), p = (l) => {
|
|
48213
48214
|
var u = root_4$13();
|
|
48214
48215
|
each$1(u, 5, D, index, (l, u) => {
|
|
48215
|
-
var f = root_5$
|
|
48216
|
+
var f = root_5$8(), p = child(f), m = child(p), v = child(m);
|
|
48216
48217
|
next(), reset(m), reset(p), reset(f), template_effect(() => set_text(v, `${(get$2(u), untrack(() => get$2(u).name)) ?? ""} `)), event("click", f, () => U(get$2(u).name)), append$1(l, f);
|
|
48217
48218
|
}), reset(u), append$1(l, u);
|
|
48218
48219
|
}, m = (l) => {
|
|
@@ -48228,13 +48229,13 @@ function EnvDropdown(l, u) {
|
|
|
48228
48229
|
var y = sibling(f, 2);
|
|
48229
48230
|
Divider(y, { noMargin: !0 });
|
|
48230
48231
|
var b = sibling(y, 2), x = (l) => {
|
|
48231
|
-
var u = root_7$
|
|
48232
|
+
var u = root_7$4();
|
|
48232
48233
|
Icon(child(u), {
|
|
48233
48234
|
name: "plus",
|
|
48234
48235
|
size: "S"
|
|
48235
48236
|
}), next(2), reset(u), event("click", u, () => O()()), append$1(l, u);
|
|
48236
48237
|
}, S = (l) => {
|
|
48237
|
-
var u = root_8$
|
|
48238
|
+
var u = root_8$3();
|
|
48238
48239
|
Icon(child(u), {
|
|
48239
48240
|
name: "arrow-up",
|
|
48240
48241
|
size: "S"
|
|
@@ -48352,7 +48353,7 @@ function EnvDropdown_1(l, u) {
|
|
|
48352
48353
|
}
|
|
48353
48354
|
//#endregion
|
|
48354
48355
|
//#region src/Form/Core/CheckboxGroup.svelte
|
|
48355
|
-
var root_1$34 = /* @__PURE__ */ from_html("<div><label class=\"spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item svelte-1mkd6ji\"><input type=\"checkbox\" class=\"spectrum-Checkbox-input svelte-1mkd6ji\"/> <span class=\"spectrum-Checkbox-box\"><span><!></span></span> <span class=\"spectrum-Checkbox-label\"> </span></label></div>"), root_3$
|
|
48356
|
+
var root_1$34 = /* @__PURE__ */ from_html("<div><label class=\"spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item svelte-1mkd6ji\"><input type=\"checkbox\" class=\"spectrum-Checkbox-input svelte-1mkd6ji\"/> <span class=\"spectrum-Checkbox-box\"><span><!></span></span> <span class=\"spectrum-Checkbox-label\"> </span></label></div>"), root_3$18 = /* @__PURE__ */ from_html("<div><label class=\"spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item svelte-1mkd6ji\"><input type=\"checkbox\" class=\"spectrum-Checkbox-input svelte-1mkd6ji\"/> <span class=\"spectrum-Checkbox-box\"><span><!></span></span> <span class=\"spectrum-Checkbox-label\"> </span></label></div>"), root$64 = /* @__PURE__ */ from_html("<div><!> <!></div>");
|
|
48356
48357
|
function CheckboxGroup(l, u) {
|
|
48357
48358
|
push$1(u, !1);
|
|
48358
48359
|
let f = /* @__PURE__ */ mutable_source(), p = /* @__PURE__ */ mutable_source(), m = /* @__PURE__ */ mutable_source(), v = /* @__PURE__ */ mutable_source(), y = /* @__PURE__ */ mutable_source(), b = prop(u, "direction", 8, "vertical"), x = prop(u, "value", 24, () => []), S = prop(u, "options", 24, () => []), w = prop(u, "disabled", 8, !1), T = prop(u, "readonly", 8, !1), E = prop(u, "columns", 8, 1), D = prop(u, "getOptionLabel", 8, (l) => `${l}`), O = prop(u, "getOptionValue", 8, (l) => l), k = prop(u, "showSelectAll", 8, !1), j = prop(u, "selectAllText", 8, "Select all"), M = createEventDispatcher(), N = (l) => {
|
|
@@ -48404,7 +48405,7 @@ function CheckboxGroup(l, u) {
|
|
|
48404
48405
|
var u = comment();
|
|
48405
48406
|
each$1(first_child(u), 1, S, index, (l, u) => {
|
|
48406
48407
|
let f = /* @__PURE__ */ derived_safe_equal(() => (deep_read_state(O()), get$2(u), untrack(() => O()(get$2(u))))), p = /* @__PURE__ */ derived_safe_equal(() => (deep_read_state(x()), deep_read_state(get$2(f)), untrack(() => x().includes(get$2(f)))));
|
|
48407
|
-
var m = root_3$
|
|
48408
|
+
var m = root_3$18();
|
|
48408
48409
|
let v;
|
|
48409
48410
|
var y = child(m), b = child(y);
|
|
48410
48411
|
remove_input_defaults(b);
|
|
@@ -48434,112 +48435,129 @@ function CheckboxGroup(l, u) {
|
|
|
48434
48435
|
}
|
|
48435
48436
|
//#endregion
|
|
48436
48437
|
//#region src/Form/Core/File.svelte
|
|
48437
|
-
var
|
|
48438
|
+
var root_1$33 = /* @__PURE__ */ from_html("<div class=\"file-view svelte-9esg10\"><!></div>"), root_4$12 = /* @__PURE__ */ from_html("<div class=\"delete-button svelte-9esg10\"><!></div>"), root_3$17 = /* @__PURE__ */ from_html("<div><div class=\"filename svelte-9esg10\"> </div> <!></div>"), root_7$3 = /* @__PURE__ */ from_html("<img class=\"preview svelte-9esg10\" alt=\"\"/>"), root_8$2 = /* @__PURE__ */ from_html("<div class=\"filesize svelte-9esg10\"><!></div>"), root_11 = /* @__PURE__ */ from_html("<div class=\"delete-button svelte-9esg10\"><!></div>"), root_6$4 = /* @__PURE__ */ from_html("<div><!> <div class=\"filename svelte-9esg10\"> </div> <!> <!></div>"), root$63 = /* @__PURE__ */ from_html("<input type=\"file\" class=\"svelte-9esg10\"/> <div class=\"field svelte-9esg10\"><!> <!></div>", 1);
|
|
48438
48439
|
function File$1(l, u) {
|
|
48439
48440
|
push$1(u, !1);
|
|
48440
|
-
let f = /* @__PURE__ */ mutable_source(), p = 1e6, m = prop(u, "value", 24, () => void 0), v = prop(u, "statusText", 24, () => void 0), y = prop(u, "title", 8, "Upload file"), b = prop(u, "disabled", 8, !1), x = prop(u, "allowClear", 24, () => void 0),
|
|
48441
|
-
async function
|
|
48441
|
+
let f = /* @__PURE__ */ mutable_source(), p = 1e6, m = prop(u, "value", 24, () => void 0), v = prop(u, "statusText", 24, () => void 0), y = prop(u, "title", 8, "Upload file"), b = prop(u, "disabled", 8, !1), x = prop(u, "loading", 8, !1), S = prop(u, "hideButtonWhenSet", 8, !1), w = prop(u, "allowClear", 24, () => void 0), T = prop(u, "extensions", 24, () => void 0), E = prop(u, "handleFileTooLarge", 24, () => void 0), D = prop(u, "fileSizeLimit", 8, p * 20), O = prop(u, "id", 24, () => void 0), k = prop(u, "previewUrl", 24, () => void 0), j = O() || uuid$1(), M = 1e3, N = createEventDispatcher(), P = /* @__PURE__ */ mutable_source();
|
|
48442
|
+
async function F(l) {
|
|
48442
48443
|
if (l) {
|
|
48443
|
-
if (
|
|
48444
|
-
|
|
48444
|
+
if (E() && l.size >= D()) {
|
|
48445
|
+
E()(l);
|
|
48445
48446
|
return;
|
|
48446
48447
|
}
|
|
48447
|
-
|
|
48448
|
+
N("change", l);
|
|
48448
48449
|
}
|
|
48449
48450
|
}
|
|
48450
|
-
function
|
|
48451
|
+
function L(l) {
|
|
48451
48452
|
let u = l.target;
|
|
48452
|
-
|
|
48453
|
+
F(u.files?.[0]), u.value = "";
|
|
48453
48454
|
}
|
|
48454
|
-
function
|
|
48455
|
-
b() ||
|
|
48455
|
+
function R() {
|
|
48456
|
+
b() || N("change", void 0);
|
|
48456
48457
|
}
|
|
48457
|
-
legacy_pre_effect(() => deep_read_state(
|
|
48458
|
-
set(f, Array.isArray(
|
|
48458
|
+
legacy_pre_effect(() => deep_read_state(T()), () => {
|
|
48459
|
+
set(f, Array.isArray(T()) ? T().join(",") : "*");
|
|
48459
48460
|
}), legacy_pre_effect_reset(), init$1();
|
|
48460
|
-
var
|
|
48461
|
-
bind_this(
|
|
48462
|
-
var
|
|
48461
|
+
var z = root$63(), B = first_child(z);
|
|
48462
|
+
bind_this(B, (l) => set(P, l), () => get$2(P));
|
|
48463
|
+
var V = sibling(B, 2), H = child(V), U = (l) => {
|
|
48463
48464
|
var u = root_1$33();
|
|
48464
|
-
|
|
48465
|
-
|
|
48466
|
-
|
|
48467
|
-
|
|
48468
|
-
var u = root_2$19();
|
|
48469
|
-
Icon(child(u), {
|
|
48470
|
-
name: "x",
|
|
48471
|
-
size: "XS"
|
|
48472
|
-
}), reset(u), event("click", u, F), append$1(l, u);
|
|
48473
|
-
};
|
|
48474
|
-
if_block(y, (l) => {
|
|
48475
|
-
(!b() || x() === !0 && b()) && l(S);
|
|
48476
|
-
}), reset(u), template_effect((l) => {
|
|
48477
|
-
f = set_class(u, 1, "file-view status svelte-9esg10", null, f, l), set_text(m, v());
|
|
48478
|
-
}, [() => ({ disabled: b() })]), append$1(l, u);
|
|
48479
|
-
}, H = (l) => {
|
|
48480
|
-
var u = comment(), f = first_child(u), v = (l) => {
|
|
48481
|
-
var u = root_4$12();
|
|
48465
|
+
ProgressCircle(child(u), { size: "S" }), reset(u), append$1(l, u);
|
|
48466
|
+
}, W = (l) => {
|
|
48467
|
+
var u = comment(), f = first_child(u), y = (l) => {
|
|
48468
|
+
var u = root_3$17();
|
|
48482
48469
|
let f;
|
|
48483
|
-
var
|
|
48484
|
-
|
|
48485
|
-
|
|
48486
|
-
|
|
48487
|
-
if_block(v, (l) => {
|
|
48488
|
-
D() && l(y);
|
|
48489
|
-
});
|
|
48490
|
-
var S = sibling(v, 2), w = child(S, !0);
|
|
48491
|
-
reset(S);
|
|
48492
|
-
var T = sibling(S, 2), E = (l) => {
|
|
48493
|
-
var u = root_6$4(), f = child(u), v = (l) => {
|
|
48494
|
-
var u = text();
|
|
48495
|
-
template_effect(() => set_text(u, (deep_read_state(m()), untrack(() => `${m().size / 1e3} KB`)))), append$1(l, u);
|
|
48496
|
-
}, y = (l) => {
|
|
48497
|
-
var u = text();
|
|
48498
|
-
template_effect(() => set_text(u, (deep_read_state(m()), untrack(() => `${m().size / p} MB`)))), append$1(l, u);
|
|
48499
|
-
};
|
|
48500
|
-
if_block(f, (l) => {
|
|
48501
|
-
deep_read_state(m()), untrack(() => m().size <= p) ? l(v) : l(y, !1);
|
|
48502
|
-
}), reset(u), append$1(l, u);
|
|
48503
|
-
};
|
|
48504
|
-
if_block(T, (l) => {
|
|
48505
|
-
deep_read_state(m()), untrack(() => m().size) && l(E);
|
|
48506
|
-
});
|
|
48507
|
-
var O = sibling(T, 2), k = (l) => {
|
|
48508
|
-
var u = root_9();
|
|
48470
|
+
var p = child(u), m = child(p, !0);
|
|
48471
|
+
reset(p);
|
|
48472
|
+
var y = sibling(p, 2), x = (l) => {
|
|
48473
|
+
var u = root_4$12();
|
|
48509
48474
|
Icon(child(u), {
|
|
48510
48475
|
name: "x",
|
|
48511
|
-
size: "XS"
|
|
48512
|
-
|
|
48513
|
-
return b();
|
|
48514
|
-
}
|
|
48515
|
-
}), reset(u), event("click", u, F), append$1(l, u);
|
|
48476
|
+
size: "XS"
|
|
48477
|
+
}), reset(u), event("click", u, R), append$1(l, u);
|
|
48516
48478
|
};
|
|
48517
|
-
if_block(
|
|
48518
|
-
(!b() ||
|
|
48479
|
+
if_block(y, (l) => {
|
|
48480
|
+
(!b() || w() === !0 && b()) && l(x);
|
|
48519
48481
|
}), reset(u), template_effect((l) => {
|
|
48520
|
-
f = set_class(u, 1, "file-view svelte-9esg10", null, f, l), set_text(
|
|
48482
|
+
f = set_class(u, 1, "file-view status svelte-9esg10", null, f, l), set_text(m, v());
|
|
48521
48483
|
}, [() => ({ disabled: b() })]), append$1(l, u);
|
|
48484
|
+
}, x = (l) => {
|
|
48485
|
+
var u = comment(), f = first_child(u), v = (l) => {
|
|
48486
|
+
var u = root_6$4();
|
|
48487
|
+
let f;
|
|
48488
|
+
var v = child(u), y = (l) => {
|
|
48489
|
+
var u = root_7$3();
|
|
48490
|
+
template_effect(() => set_attribute(u, "src", k())), append$1(l, u);
|
|
48491
|
+
};
|
|
48492
|
+
if_block(v, (l) => {
|
|
48493
|
+
k() && l(y);
|
|
48494
|
+
});
|
|
48495
|
+
var x = sibling(v, 2), S = child(x, !0);
|
|
48496
|
+
reset(x);
|
|
48497
|
+
var T = sibling(x, 2), E = (l) => {
|
|
48498
|
+
var u = root_8$2(), f = child(u), v = (l) => {
|
|
48499
|
+
var u = text();
|
|
48500
|
+
template_effect(() => set_text(u, (deep_read_state(m()), untrack(() => `${m().size / 1e3} KB`)))), append$1(l, u);
|
|
48501
|
+
}, y = (l) => {
|
|
48502
|
+
var u = text();
|
|
48503
|
+
template_effect(() => set_text(u, (deep_read_state(m()), untrack(() => `${m().size / p} MB`)))), append$1(l, u);
|
|
48504
|
+
};
|
|
48505
|
+
if_block(f, (l) => {
|
|
48506
|
+
deep_read_state(m()), untrack(() => m().size <= p) ? l(v) : l(y, !1);
|
|
48507
|
+
}), reset(u), append$1(l, u);
|
|
48508
|
+
};
|
|
48509
|
+
if_block(T, (l) => {
|
|
48510
|
+
deep_read_state(m()), untrack(() => m().size) && l(E);
|
|
48511
|
+
});
|
|
48512
|
+
var D = sibling(T, 2), O = (l) => {
|
|
48513
|
+
var u = root_11();
|
|
48514
|
+
Icon(child(u), {
|
|
48515
|
+
name: "x",
|
|
48516
|
+
size: "XS",
|
|
48517
|
+
get disabled() {
|
|
48518
|
+
return b();
|
|
48519
|
+
}
|
|
48520
|
+
}), reset(u), event("click", u, R), append$1(l, u);
|
|
48521
|
+
};
|
|
48522
|
+
if_block(D, (l) => {
|
|
48523
|
+
(!b() || w() === !0 && b()) && l(O);
|
|
48524
|
+
}), reset(u), template_effect((l) => {
|
|
48525
|
+
f = set_class(u, 1, "file-view svelte-9esg10", null, f, l), set_text(S, (deep_read_state(m()), untrack(() => m().name)));
|
|
48526
|
+
}, [() => ({ disabled: b() })]), append$1(l, u);
|
|
48527
|
+
};
|
|
48528
|
+
if_block(f, (l) => {
|
|
48529
|
+
m() && l(v);
|
|
48530
|
+
}, !0), append$1(l, u);
|
|
48522
48531
|
};
|
|
48523
48532
|
if_block(f, (l) => {
|
|
48524
|
-
|
|
48533
|
+
v() ? l(y) : l(x, !1);
|
|
48525
48534
|
}, !0), append$1(l, u);
|
|
48526
48535
|
};
|
|
48527
|
-
if_block(
|
|
48528
|
-
|
|
48529
|
-
})
|
|
48530
|
-
|
|
48531
|
-
|
|
48532
|
-
|
|
48533
|
-
|
|
48534
|
-
|
|
48535
|
-
|
|
48536
|
-
|
|
48537
|
-
|
|
48538
|
-
|
|
48539
|
-
|
|
48540
|
-
|
|
48541
|
-
|
|
48542
|
-
|
|
48536
|
+
if_block(H, (l) => {
|
|
48537
|
+
x() ? l(U) : l(W, !1);
|
|
48538
|
+
});
|
|
48539
|
+
var K = sibling(H, 2), q = (l) => {
|
|
48540
|
+
{
|
|
48541
|
+
let u = /* @__PURE__ */ derived_safe_equal(() => b() || x());
|
|
48542
|
+
ActionButton(l, {
|
|
48543
|
+
get disabled() {
|
|
48544
|
+
return get$2(u);
|
|
48545
|
+
},
|
|
48546
|
+
$$events: { click: () => get$2(P)?.click() },
|
|
48547
|
+
children: (l, u) => {
|
|
48548
|
+
next();
|
|
48549
|
+
var f = text();
|
|
48550
|
+
template_effect(() => set_text(f, y())), append$1(l, f);
|
|
48551
|
+
},
|
|
48552
|
+
$$slots: { default: !0 }
|
|
48553
|
+
});
|
|
48554
|
+
}
|
|
48555
|
+
};
|
|
48556
|
+
if_block(K, (l) => {
|
|
48557
|
+
(!S() || !(x() || v() || m())) && l(q);
|
|
48558
|
+
}), reset(V), template_effect(() => {
|
|
48559
|
+
set_attribute(B, "id", j), B.disabled = b() || x(), set_attribute(B, "accept", get$2(f));
|
|
48560
|
+
}), event("change", B, L), append$1(l, z), pop();
|
|
48543
48561
|
}
|
|
48544
48562
|
//#endregion
|
|
48545
48563
|
//#region src/Form/Core/Multiselect.svelte
|
|
@@ -49760,12 +49778,12 @@ function TextArea(l, u) {
|
|
|
49760
49778
|
//#region src/Form/File.svelte
|
|
49761
49779
|
function File$2(l, u) {
|
|
49762
49780
|
push$1(u, !1);
|
|
49763
|
-
let f = prop(u, "label", 24, () => void 0), p = prop(u, "labelPosition", 8, "above"), m = prop(u, "disabled", 8, !1), v = prop(u, "allowClear", 24, () => void 0),
|
|
49764
|
-
|
|
49781
|
+
let f = prop(u, "label", 24, () => void 0), p = prop(u, "labelPosition", 8, "above"), m = prop(u, "disabled", 8, !1), v = prop(u, "loading", 8, !1), y = prop(u, "hideButtonWhenSet", 8, !1), b = prop(u, "allowClear", 24, () => void 0), x = prop(u, "handleFileTooLarge", 8, () => {}), S = prop(u, "previewUrl", 24, () => void 0), w = prop(u, "extensions", 24, () => void 0), T = prop(u, "error", 24, () => void 0), E = prop(u, "title", 24, () => void 0), D = prop(u, "value", 24, () => void 0), O = prop(u, "statusText", 24, () => void 0), k = prop(u, "tooltip", 24, () => void 0), j = prop(u, "helpText", 24, () => void 0), M = createEventDispatcher(), N = (l) => {
|
|
49782
|
+
M("change", l.detail);
|
|
49765
49783
|
};
|
|
49766
49784
|
init$1(), Field(l, {
|
|
49767
49785
|
get helpText() {
|
|
49768
|
-
return
|
|
49786
|
+
return j();
|
|
49769
49787
|
},
|
|
49770
49788
|
get label() {
|
|
49771
49789
|
return f();
|
|
@@ -49774,38 +49792,44 @@ function File$2(l, u) {
|
|
|
49774
49792
|
return p();
|
|
49775
49793
|
},
|
|
49776
49794
|
get error() {
|
|
49777
|
-
return
|
|
49795
|
+
return T();
|
|
49778
49796
|
},
|
|
49779
49797
|
get tooltip() {
|
|
49780
|
-
return
|
|
49798
|
+
return k();
|
|
49781
49799
|
},
|
|
49782
49800
|
children: (l, u) => {
|
|
49783
49801
|
File$1(l, {
|
|
49784
49802
|
get disabled() {
|
|
49785
49803
|
return m();
|
|
49786
49804
|
},
|
|
49787
|
-
get
|
|
49805
|
+
get loading() {
|
|
49788
49806
|
return v();
|
|
49789
49807
|
},
|
|
49808
|
+
get hideButtonWhenSet() {
|
|
49809
|
+
return y();
|
|
49810
|
+
},
|
|
49811
|
+
get allowClear() {
|
|
49812
|
+
return b();
|
|
49813
|
+
},
|
|
49790
49814
|
get title() {
|
|
49791
|
-
return
|
|
49815
|
+
return E();
|
|
49792
49816
|
},
|
|
49793
49817
|
get value() {
|
|
49794
|
-
return
|
|
49818
|
+
return D();
|
|
49795
49819
|
},
|
|
49796
49820
|
get statusText() {
|
|
49797
|
-
return
|
|
49821
|
+
return O();
|
|
49798
49822
|
},
|
|
49799
49823
|
get previewUrl() {
|
|
49800
|
-
return
|
|
49824
|
+
return S();
|
|
49801
49825
|
},
|
|
49802
49826
|
get handleFileTooLarge() {
|
|
49803
|
-
return
|
|
49827
|
+
return x();
|
|
49804
49828
|
},
|
|
49805
49829
|
get extensions() {
|
|
49806
|
-
return
|
|
49830
|
+
return w();
|
|
49807
49831
|
},
|
|
49808
|
-
$$events: { change:
|
|
49832
|
+
$$events: { change: N }
|
|
49809
49833
|
});
|
|
49810
49834
|
},
|
|
49811
49835
|
$$slots: { default: !0 }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "3.39.
|
|
4
|
+
"version": "3.39.31",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"module": "dist/bbui.mjs",
|
|
7
7
|
"exports": {
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "vite build",
|
|
16
|
-
"dev": "vite build --watch --mode=dev"
|
|
16
|
+
"dev": "vite build --watch --mode=dev",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest"
|
|
17
19
|
},
|
|
18
20
|
"devDependencies": {
|
|
19
21
|
"@sveltejs/vite-plugin-svelte": "^6.1.3",
|
|
20
22
|
"@types/sanitize-html": "^2.13.0",
|
|
21
|
-
"vite-plugin-css-injected-by-js": "3.5.2"
|
|
23
|
+
"vite-plugin-css-injected-by-js": "3.5.2",
|
|
24
|
+
"vitest": "^4.1.8"
|
|
22
25
|
},
|
|
23
26
|
"keywords": [
|
|
24
27
|
"svelte"
|
|
@@ -105,5 +108,5 @@
|
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
},
|
|
108
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "11952e46cb13544c703a56d89e8bef8c189fd989"
|
|
109
112
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import ActionButton from "../../ActionButton/ActionButton.svelte"
|
|
3
3
|
import { uuid } from "../../helpers"
|
|
4
4
|
import Icon from "../../Icon/Icon.svelte"
|
|
5
|
+
import ProgressCircle from "../../ProgressCircle/ProgressCircle.svelte"
|
|
5
6
|
import { createEventDispatcher } from "svelte"
|
|
6
7
|
|
|
7
8
|
const BYTES_IN_MB = 1000000
|
|
@@ -10,6 +11,8 @@
|
|
|
10
11
|
export let statusText: string | undefined = undefined
|
|
11
12
|
export let title: string = "Upload file"
|
|
12
13
|
export let disabled: boolean = false
|
|
14
|
+
export let loading: boolean = false
|
|
15
|
+
export let hideButtonWhenSet: boolean = false
|
|
13
16
|
export let allowClear: boolean | undefined = undefined
|
|
14
17
|
export let extensions: string[] | undefined = undefined
|
|
15
18
|
export let handleFileTooLarge: ((_file: File) => void) | undefined = undefined
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
function handleFile(evt: Event) {
|
|
40
43
|
const target = evt.target as HTMLInputElement
|
|
41
44
|
processFile(target.files?.[0])
|
|
45
|
+
target.value = ""
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
function clearFile() {
|
|
@@ -48,7 +52,7 @@
|
|
|
48
52
|
|
|
49
53
|
<input
|
|
50
54
|
id={fieldId}
|
|
51
|
-
{disabled}
|
|
55
|
+
disabled={disabled || loading}
|
|
52
56
|
type="file"
|
|
53
57
|
accept={inputAccept}
|
|
54
58
|
bind:this={fileInput}
|
|
@@ -58,7 +62,11 @@
|
|
|
58
62
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
59
63
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
60
64
|
<div class="field">
|
|
61
|
-
{#if
|
|
65
|
+
{#if loading}
|
|
66
|
+
<div class="file-view">
|
|
67
|
+
<ProgressCircle size="S" />
|
|
68
|
+
</div>
|
|
69
|
+
{:else if statusText}
|
|
62
70
|
<div class="file-view status" class:disabled>
|
|
63
71
|
<div class="filename">{statusText}</div>
|
|
64
72
|
{#if !disabled || (allowClear === true && disabled)}
|
|
@@ -89,9 +97,14 @@
|
|
|
89
97
|
{/if}
|
|
90
98
|
</div>
|
|
91
99
|
{/if}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
{#if !hideButtonWhenSet || !(loading || statusText || value)}
|
|
101
|
+
<ActionButton
|
|
102
|
+
disabled={disabled || loading}
|
|
103
|
+
on:click={() => fileInput?.click()}
|
|
104
|
+
>
|
|
105
|
+
{title}
|
|
106
|
+
</ActionButton>
|
|
107
|
+
{/if}
|
|
95
108
|
</div>
|
|
96
109
|
|
|
97
110
|
<style>
|
package/src/Form/File.svelte
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
export let label: string | undefined = undefined
|
|
8
8
|
export let labelPosition: LabelPosition = "above"
|
|
9
9
|
export let disabled: boolean = false
|
|
10
|
+
export let loading: boolean = false
|
|
11
|
+
export let hideButtonWhenSet: boolean = false
|
|
10
12
|
export let allowClear: boolean | undefined = undefined
|
|
11
13
|
export let handleFileTooLarge: (_file: File) => void = () => {}
|
|
12
14
|
export let previewUrl: string | undefined = undefined
|
|
@@ -20,7 +22,6 @@
|
|
|
20
22
|
|
|
21
23
|
const dispatch = createEventDispatcher()
|
|
22
24
|
const onChange = (e: CustomEvent) => {
|
|
23
|
-
value = e.detail
|
|
24
25
|
dispatch("change", e.detail)
|
|
25
26
|
}
|
|
26
27
|
</script>
|
|
@@ -28,6 +29,8 @@
|
|
|
28
29
|
<Field {helpText} {label} {labelPosition} {error} {tooltip}>
|
|
29
30
|
<CoreFile
|
|
30
31
|
{disabled}
|
|
32
|
+
{loading}
|
|
33
|
+
{hideButtonWhenSet}
|
|
31
34
|
{allowClear}
|
|
32
35
|
{title}
|
|
33
36
|
{value}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, vi } from "vitest"
|
|
2
|
+
import { uuid } from "./helpers"
|
|
3
|
+
|
|
4
|
+
describe("uuid", () => {
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
vi.restoreAllMocks()
|
|
7
|
+
vi.unstubAllGlobals()
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it("uses crypto.getRandomValues when available", () => {
|
|
11
|
+
const getRandomValues = vi.fn((array: Uint8Array) => {
|
|
12
|
+
array[0] = 0xab
|
|
13
|
+
return array
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
vi.stubGlobal("crypto", { getRandomValues })
|
|
17
|
+
|
|
18
|
+
expect(uuid()).toMatch(/^c[a-f0-9]{12}4[a-f0-9]{3}[89ab][a-f0-9]{15}$/)
|
|
19
|
+
expect(getRandomValues).toHaveBeenCalled()
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it("falls back to Math.random when crypto is unavailable", () => {
|
|
23
|
+
vi.stubGlobal("crypto", undefined)
|
|
24
|
+
vi.spyOn(Math, "random").mockReturnValue(0)
|
|
25
|
+
|
|
26
|
+
expect(uuid()).toMatch(/^c[a-f0-9]{12}4[a-f0-9]{3}[89ab][a-f0-9]{15}$/)
|
|
27
|
+
expect(Math.random).toHaveBeenCalled()
|
|
28
|
+
})
|
|
29
|
+
})
|
package/src/helpers.ts
CHANGED
|
@@ -8,8 +8,16 @@ export const deepGet = helpers.deepGet
|
|
|
8
8
|
* Starting with a letter is important to make it DOM safe.
|
|
9
9
|
*/
|
|
10
10
|
export function uuid(): string {
|
|
11
|
+
const getRandomNibble = () => {
|
|
12
|
+
if (globalThis.crypto?.getRandomValues) {
|
|
13
|
+
return globalThis.crypto.getRandomValues(new Uint8Array(1))[0] & 0xf
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (Math.random() * 16) | 0
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
return "cxxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, c => {
|
|
12
|
-
const r = (
|
|
20
|
+
const r = getRandomNibble()
|
|
13
21
|
const v = c === "x" ? r : (r & 0x3) | 0x8
|
|
14
22
|
return v.toString(16)
|
|
15
23
|
})
|
|
@@ -200,7 +208,7 @@ const getPatternForPart = (part: Intl.DateTimeFormatPart): string => {
|
|
|
200
208
|
case "literal":
|
|
201
209
|
return part.value
|
|
202
210
|
default:
|
|
203
|
-
console.
|
|
211
|
+
console.warn("Unsupported date part", part)
|
|
204
212
|
return ""
|
|
205
213
|
}
|
|
206
214
|
}
|