@budibase/server
Version:
Budibase Web Server
186 lines (185 loc) • 4.36 kB
JavaScript
import { S as D, i as S, s as w, bS as C, c as g, m as c, k as _, n as P, p as z, ae as q } from "./index-fc73233e.js";
import { D as v } from "./DatePicker-20aa1683.js";
function E(t) {
let n, i;
return n = new v({
props: {
error: (
/*error*/
t[5]
),
disabled: (
/*disabled*/
t[3]
),
readonly: (
/*readonly*/
t[4]
),
value: (
/*value*/
t[0]
),
placeholder: (
/*placeholder*/
t[8]
),
enableTime: (
/*enableTime*/
t[6]
),
timeOnly: (
/*timeOnly*/
t[7]
),
appendTo: (
/*appendTo*/
t[9]
),
ignoreTimezones: (
/*ignoreTimezones*/
t[10]
)
}
}), n.$on(
"change",
/*onChange*/
t[12]
), {
c() {
g(n.$$.fragment);
},
m(e, a) {
c(n, e, a), i = !0;
},
p(e, a) {
const o = {};
a & /*error*/
32 && (o.error = /*error*/
e[5]), a & /*disabled*/
8 && (o.disabled = /*disabled*/
e[3]), a & /*readonly*/
16 && (o.readonly = /*readonly*/
e[4]), a & /*value*/
1 && (o.value = /*value*/
e[0]), a & /*placeholder*/
256 && (o.placeholder = /*placeholder*/
e[8]), a & /*enableTime*/
64 && (o.enableTime = /*enableTime*/
e[6]), a & /*timeOnly*/
128 && (o.timeOnly = /*timeOnly*/
e[7]), a & /*appendTo*/
512 && (o.appendTo = /*appendTo*/
e[9]), a & /*ignoreTimezones*/
1024 && (o.ignoreTimezones = /*ignoreTimezones*/
e[10]), n.$set(o);
},
i(e) {
i || (_(n.$$.fragment, e), i = !0);
},
o(e) {
P(n.$$.fragment, e), i = !1;
},
d(e) {
z(n, e);
}
};
}
function F(t) {
let n, i;
return n = new C({
props: {
helpText: (
/*helpText*/
t[11]
),
label: (
/*label*/
t[1]
),
labelPosition: (
/*labelPosition*/
t[2]
),
error: (
/*error*/
t[5]
),
$$slots: { default: [E] },
$$scope: { ctx: t }
}
}), {
c() {
g(n.$$.fragment);
},
m(e, a) {
c(n, e, a), i = !0;
},
p(e, [a]) {
const o = {};
a & /*helpText*/
2048 && (o.helpText = /*helpText*/
e[11]), a & /*label*/
2 && (o.label = /*label*/
e[1]), a & /*labelPosition*/
4 && (o.labelPosition = /*labelPosition*/
e[2]), a & /*error*/
32 && (o.error = /*error*/
e[5]), a & /*$$scope, error, disabled, readonly, value, placeholder, enableTime, timeOnly, appendTo, ignoreTimezones*/
18425 && (o.$$scope = { dirty: a, ctx: e }), n.$set(o);
},
i(e) {
i || (_(n.$$.fragment, e), i = !0);
},
o(e) {
P(n.$$.fragment, e), i = !1;
},
d(e) {
z(n, e);
}
};
}
function j(t, n, i) {
let { value: e = null } = n, { label: a = void 0 } = n, { labelPosition: o = "above" } = n, { disabled: f = !1 } = n, { readonly: r = !1 } = n, { error: m = void 0 } = n, { enableTime: s = !0 } = n, { timeOnly: u = !1 } = n, { placeholder: b = null } = n, { appendTo: T = void 0 } = n, { ignoreTimezones: d = !1 } = n, { helpText: h = void 0 } = n;
const O = q(), k = (l) => {
i(0, e = l.detail), O("change", l.detail);
};
return t.$$set = (l) => {
"value" in l && i(0, e = l.value), "label" in l && i(1, a = l.label), "labelPosition" in l && i(2, o = l.labelPosition), "disabled" in l && i(3, f = l.disabled), "readonly" in l && i(4, r = l.readonly), "error" in l && i(5, m = l.error), "enableTime" in l && i(6, s = l.enableTime), "timeOnly" in l && i(7, u = l.timeOnly), "placeholder" in l && i(8, b = l.placeholder), "appendTo" in l && i(9, T = l.appendTo), "ignoreTimezones" in l && i(10, d = l.ignoreTimezones), "helpText" in l && i(11, h = l.helpText);
}, [
e,
a,
o,
f,
r,
m,
s,
u,
b,
T,
d,
h,
k
];
}
class B extends D {
constructor(n) {
super(), S(this, n, j, F, w, {
value: 0,
label: 1,
labelPosition: 2,
disabled: 3,
readonly: 4,
error: 5,
enableTime: 6,
timeOnly: 7,
placeholder: 8,
appendTo: 9,
ignoreTimezones: 10,
helpText: 11
});
}
}
export {
B as D
};