bhl-forms 0.0.49 → 0.0.52
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/bhl-forms.es.js +553 -645
- package/dist/bhl-forms.iife.js +6 -6
- package/dist/bhl-forms.modern.es.js +967 -1079
- package/dist/bhl-forms.modern.iife.js +9 -9
- package/dist/bhl-forms.modern.umd.js +9 -9
- package/dist/bhl-forms.umd.js +6 -6
- package/dist/forms/childAndFamily.es.js +7 -3
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/generalLegal.es.js +7 -4
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/testForm.es.js +81 -20
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +4 -5
package/dist/bhl-forms.es.js
CHANGED
|
@@ -5,18 +5,18 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (
|
|
9
|
-
for (var prop in
|
|
10
|
-
if (__hasOwnProp.call(
|
|
11
|
-
__defNormalProp(
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
12
|
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(
|
|
14
|
-
if (__propIsEnum.call(
|
|
15
|
-
__defNormalProp(
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return a;
|
|
18
18
|
};
|
|
19
|
-
var __spreadProps = (
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
var __objRest = (source, exclude) => {
|
|
21
21
|
var target = {};
|
|
22
22
|
for (var prop in source)
|
|
@@ -34,18 +34,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34
34
|
var fulfilled = (value) => {
|
|
35
35
|
try {
|
|
36
36
|
step(generator.next(value));
|
|
37
|
-
} catch (
|
|
38
|
-
reject(
|
|
37
|
+
} catch (e) {
|
|
38
|
+
reject(e);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
var rejected = (value) => {
|
|
42
42
|
try {
|
|
43
43
|
step(generator.throw(value));
|
|
44
|
-
} catch (
|
|
45
|
-
reject(
|
|
44
|
+
} catch (e) {
|
|
45
|
+
reject(e);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
var step = (
|
|
48
|
+
var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
@@ -179,7 +179,7 @@ const cacheStringFunction = (fn) => {
|
|
|
179
179
|
};
|
|
180
180
|
const camelizeRE = /-(\w)/g;
|
|
181
181
|
const camelize = cacheStringFunction((str) => {
|
|
182
|
-
return str.replace(camelizeRE, (_,
|
|
182
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
183
183
|
});
|
|
184
184
|
const hyphenateRE = /\B([A-Z])/g;
|
|
185
185
|
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
@@ -199,8 +199,8 @@ const def = (obj, key, value) => {
|
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
201
|
const toNumber = (val) => {
|
|
202
|
-
const
|
|
203
|
-
return isNaN(
|
|
202
|
+
const n = parseFloat(val);
|
|
203
|
+
return isNaN(n) ? val : n;
|
|
204
204
|
};
|
|
205
205
|
let _globalThis;
|
|
206
206
|
const getGlobalThis = () => {
|
|
@@ -236,15 +236,15 @@ class EffectScope {
|
|
|
236
236
|
}
|
|
237
237
|
stop(fromParent) {
|
|
238
238
|
if (this.active) {
|
|
239
|
-
let i2,
|
|
240
|
-
for (i2 = 0,
|
|
239
|
+
let i2, l;
|
|
240
|
+
for (i2 = 0, l = this.effects.length; i2 < l; i2++) {
|
|
241
241
|
this.effects[i2].stop();
|
|
242
242
|
}
|
|
243
|
-
for (i2 = 0,
|
|
243
|
+
for (i2 = 0, l = this.cleanups.length; i2 < l; i2++) {
|
|
244
244
|
this.cleanups[i2]();
|
|
245
245
|
}
|
|
246
246
|
if (this.scopes) {
|
|
247
|
-
for (i2 = 0,
|
|
247
|
+
for (i2 = 0, l = this.scopes.length; i2 < l; i2++) {
|
|
248
248
|
this.scopes[i2].stop(true);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -502,7 +502,7 @@ function createArrayInstrumentations() {
|
|
|
502
502
|
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
|
|
503
503
|
instrumentations[key] = function(...args) {
|
|
504
504
|
const arr = toRaw(this);
|
|
505
|
-
for (let i2 = 0,
|
|
505
|
+
for (let i2 = 0, l = this.length; i2 < l; i2++) {
|
|
506
506
|
track(arr, "get", i2 + "");
|
|
507
507
|
}
|
|
508
508
|
const res = arr[key](...args);
|
|
@@ -951,8 +951,8 @@ function triggerRefValue(ref2, newVal) {
|
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
}
|
|
954
|
-
function isRef(
|
|
955
|
-
return !!(
|
|
954
|
+
function isRef(r) {
|
|
955
|
+
return !!(r && r.__v_isRef === true);
|
|
956
956
|
}
|
|
957
957
|
function ref(value) {
|
|
958
958
|
return createRef(value, false);
|
|
@@ -1211,7 +1211,7 @@ function flushPostFlushCbs(seen) {
|
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
1213
|
activePostFlushCbs = deduped;
|
|
1214
|
-
activePostFlushCbs.sort((
|
|
1214
|
+
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
|
1215
1215
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1216
1216
|
activePostFlushCbs[postFlushIndex]();
|
|
1217
1217
|
}
|
|
@@ -1224,7 +1224,7 @@ function flushJobs(seen) {
|
|
|
1224
1224
|
isFlushPending = false;
|
|
1225
1225
|
isFlushing = true;
|
|
1226
1226
|
flushPreFlushCbs(seen);
|
|
1227
|
-
queue.sort((
|
|
1227
|
+
queue.sort((a, b) => getId(a) - getId(b));
|
|
1228
1228
|
const check = NOOP;
|
|
1229
1229
|
try {
|
|
1230
1230
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
@@ -1257,7 +1257,7 @@ function emit$1$2(instance, event, ...rawArgs) {
|
|
|
1257
1257
|
const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
|
|
1258
1258
|
const { number: number3, trim } = props2[modifiersKey] || EMPTY_OBJ;
|
|
1259
1259
|
if (trim) {
|
|
1260
|
-
args = rawArgs.map((
|
|
1260
|
+
args = rawArgs.map((a) => a.trim());
|
|
1261
1261
|
}
|
|
1262
1262
|
if (number3) {
|
|
1263
1263
|
args = rawArgs.map(toNumber);
|
|
@@ -1878,7 +1878,7 @@ function renderList(source, renderItem, cache, index2) {
|
|
|
1878
1878
|
const cached = cache && cache[index2];
|
|
1879
1879
|
if (isArray(source) || isString(source)) {
|
|
1880
1880
|
ret = new Array(source.length);
|
|
1881
|
-
for (let i2 = 0,
|
|
1881
|
+
for (let i2 = 0, l = source.length; i2 < l; i2++) {
|
|
1882
1882
|
ret[i2] = renderItem(source[i2], i2, void 0, cached && cached[i2]);
|
|
1883
1883
|
}
|
|
1884
1884
|
} else if (typeof source === "number") {
|
|
@@ -1892,7 +1892,7 @@ function renderList(source, renderItem, cache, index2) {
|
|
|
1892
1892
|
} else {
|
|
1893
1893
|
const keys = Object.keys(source);
|
|
1894
1894
|
ret = new Array(keys.length);
|
|
1895
|
-
for (let i2 = 0,
|
|
1895
|
+
for (let i2 = 0, l = keys.length; i2 < l; i2++) {
|
|
1896
1896
|
const key = keys[i2];
|
|
1897
1897
|
ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]);
|
|
1898
1898
|
}
|
|
@@ -1963,9 +1963,9 @@ const PublicInstanceProxyHandlers = {
|
|
|
1963
1963
|
const { ctx, setupState, data, props: props2, accessCache, type, appContext } = instance;
|
|
1964
1964
|
let normalizedProps;
|
|
1965
1965
|
if (key[0] !== "$") {
|
|
1966
|
-
const
|
|
1967
|
-
if (
|
|
1968
|
-
switch (
|
|
1966
|
+
const n = accessCache[key];
|
|
1967
|
+
if (n !== void 0) {
|
|
1968
|
+
switch (n) {
|
|
1969
1969
|
case 1:
|
|
1970
1970
|
return setupState[key];
|
|
1971
1971
|
case 2:
|
|
@@ -2109,15 +2109,15 @@ function applyOptions(instance) {
|
|
|
2109
2109
|
const opt = computedOptions[key];
|
|
2110
2110
|
const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
2111
2111
|
const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
|
|
2112
|
-
const
|
|
2112
|
+
const c = computed({
|
|
2113
2113
|
get: get2,
|
|
2114
2114
|
set: set2
|
|
2115
2115
|
});
|
|
2116
2116
|
Object.defineProperty(ctx, key, {
|
|
2117
2117
|
enumerable: true,
|
|
2118
2118
|
configurable: true,
|
|
2119
|
-
get: () =>
|
|
2120
|
-
set: (v) =>
|
|
2119
|
+
get: () => c.value,
|
|
2120
|
+
set: (v) => c.value = v
|
|
2121
2121
|
});
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
@@ -2224,7 +2224,7 @@ function createWatcher(raw2, ctx, publicThis, key) {
|
|
|
2224
2224
|
watch$1(getter, raw2.bind(publicThis));
|
|
2225
2225
|
} else if (isObject$1(raw2)) {
|
|
2226
2226
|
if (isArray(raw2)) {
|
|
2227
|
-
raw2.forEach((
|
|
2227
|
+
raw2.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
2228
2228
|
} else {
|
|
2229
2229
|
const handler = isFunction(raw2.handler) ? raw2.handler.bind(publicThis) : ctx[raw2.handler];
|
|
2230
2230
|
if (isFunction(handler)) {
|
|
@@ -2249,7 +2249,7 @@ function resolveMergedOptions(instance) {
|
|
|
2249
2249
|
} else {
|
|
2250
2250
|
resolved = {};
|
|
2251
2251
|
if (globalMixins.length) {
|
|
2252
|
-
globalMixins.forEach((
|
|
2252
|
+
globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
|
|
2253
2253
|
}
|
|
2254
2254
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
2255
2255
|
}
|
|
@@ -2262,7 +2262,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
|
|
|
2262
2262
|
mergeOptions(to, extendsOptions, strats, true);
|
|
2263
2263
|
}
|
|
2264
2264
|
if (mixins) {
|
|
2265
|
-
mixins.forEach((
|
|
2265
|
+
mixins.forEach((m) => mergeOptions(to, m, strats, true));
|
|
2266
2266
|
}
|
|
2267
2267
|
for (const key in from) {
|
|
2268
2268
|
if (asMixin && key === "expose")
|
|
@@ -2559,12 +2559,12 @@ function getType(ctor) {
|
|
|
2559
2559
|
const match2 = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
2560
2560
|
return match2 ? match2[1] : ctor === null ? "null" : "";
|
|
2561
2561
|
}
|
|
2562
|
-
function isSameType(
|
|
2563
|
-
return getType(
|
|
2562
|
+
function isSameType(a, b) {
|
|
2563
|
+
return getType(a) === getType(b);
|
|
2564
2564
|
}
|
|
2565
2565
|
function getTypeIndex(type, expectedTypes) {
|
|
2566
2566
|
if (isArray(expectedTypes)) {
|
|
2567
|
-
return expectedTypes.findIndex((
|
|
2567
|
+
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
2568
2568
|
} else if (isFunction(expectedTypes)) {
|
|
2569
2569
|
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
2570
2570
|
}
|
|
@@ -2761,7 +2761,7 @@ function createAppAPI(render2, hydrate2) {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
2763
2763
|
if (isArray(rawRef)) {
|
|
2764
|
-
rawRef.forEach((
|
|
2764
|
+
rawRef.forEach((r, i2) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i2] : oldRawRef), parentSuspense, vnode, isUnmount));
|
|
2765
2765
|
return;
|
|
2766
2766
|
}
|
|
2767
2767
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
@@ -3164,7 +3164,7 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3164
3164
|
if (!instance.isMounted) {
|
|
3165
3165
|
let vnodeHook;
|
|
3166
3166
|
const { el, props: props2 } = initialVNode;
|
|
3167
|
-
const { bm, m
|
|
3167
|
+
const { bm, m, parent } = instance;
|
|
3168
3168
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
3169
3169
|
toggleRecurse(instance, false);
|
|
3170
3170
|
if (bm) {
|
|
@@ -3189,8 +3189,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3189
3189
|
patch(null, subTree, container, anchor, instance, parentSuspense, isSVG);
|
|
3190
3190
|
initialVNode.el = subTree.el;
|
|
3191
3191
|
}
|
|
3192
|
-
if (
|
|
3193
|
-
queuePostRenderEffect(
|
|
3192
|
+
if (m) {
|
|
3193
|
+
queuePostRenderEffect(m, parentSuspense);
|
|
3194
3194
|
}
|
|
3195
3195
|
if (!isAsyncWrapperVNode && (vnodeHook = props2 && props2.onVnodeMounted)) {
|
|
3196
3196
|
const scopedInitialVNode = initialVNode;
|
|
@@ -3202,7 +3202,7 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3202
3202
|
instance.isMounted = true;
|
|
3203
3203
|
initialVNode = container = anchor = null;
|
|
3204
3204
|
} else {
|
|
3205
|
-
let { next, bu, u
|
|
3205
|
+
let { next, bu, u, parent, vnode } = instance;
|
|
3206
3206
|
let originNext = next;
|
|
3207
3207
|
let vnodeHook;
|
|
3208
3208
|
toggleRecurse(instance, false);
|
|
@@ -3227,8 +3227,8 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3227
3227
|
if (originNext === null) {
|
|
3228
3228
|
updateHOCHostEl(instance, nextTree.el);
|
|
3229
3229
|
}
|
|
3230
|
-
if (
|
|
3231
|
-
queuePostRenderEffect(
|
|
3230
|
+
if (u) {
|
|
3231
|
+
queuePostRenderEffect(u, parentSuspense);
|
|
3232
3232
|
}
|
|
3233
3233
|
if (vnodeHook = next.props && next.props.onVnodeUpdated) {
|
|
3234
3234
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
@@ -3357,7 +3357,7 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3357
3357
|
keyToNewIndexMap.set(nextChild.key, i2);
|
|
3358
3358
|
}
|
|
3359
3359
|
}
|
|
3360
|
-
let
|
|
3360
|
+
let j;
|
|
3361
3361
|
let patched = 0;
|
|
3362
3362
|
const toBePatched = e2 - s2 + 1;
|
|
3363
3363
|
let moved = false;
|
|
@@ -3375,9 +3375,9 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3375
3375
|
if (prevChild.key != null) {
|
|
3376
3376
|
newIndex = keyToNewIndexMap.get(prevChild.key);
|
|
3377
3377
|
} else {
|
|
3378
|
-
for (
|
|
3379
|
-
if (newIndexToOldIndexMap[
|
|
3380
|
-
newIndex =
|
|
3378
|
+
for (j = s2; j <= e2; j++) {
|
|
3379
|
+
if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
|
|
3380
|
+
newIndex = j;
|
|
3381
3381
|
break;
|
|
3382
3382
|
}
|
|
3383
3383
|
}
|
|
@@ -3396,7 +3396,7 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3396
3396
|
}
|
|
3397
3397
|
}
|
|
3398
3398
|
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
|
|
3399
|
-
|
|
3399
|
+
j = increasingNewIndexSequence.length - 1;
|
|
3400
3400
|
for (i2 = toBePatched - 1; i2 >= 0; i2--) {
|
|
3401
3401
|
const nextIndex = s2 + i2;
|
|
3402
3402
|
const nextChild = c2[nextIndex];
|
|
@@ -3404,10 +3404,10 @@ function baseCreateRenderer(options2, createHydrationFns) {
|
|
|
3404
3404
|
if (newIndexToOldIndexMap[i2] === 0) {
|
|
3405
3405
|
patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
|
|
3406
3406
|
} else if (moved) {
|
|
3407
|
-
if (
|
|
3407
|
+
if (j < 0 || i2 !== increasingNewIndexSequence[j]) {
|
|
3408
3408
|
move(nextChild, container, anchor, 2);
|
|
3409
3409
|
} else {
|
|
3410
|
-
|
|
3410
|
+
j--;
|
|
3411
3411
|
}
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
@@ -3641,39 +3641,39 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
3641
3641
|
function getSequence(arr) {
|
|
3642
3642
|
const p2 = arr.slice();
|
|
3643
3643
|
const result = [0];
|
|
3644
|
-
let i2,
|
|
3644
|
+
let i2, j, u, v, c;
|
|
3645
3645
|
const len = arr.length;
|
|
3646
3646
|
for (i2 = 0; i2 < len; i2++) {
|
|
3647
3647
|
const arrI = arr[i2];
|
|
3648
3648
|
if (arrI !== 0) {
|
|
3649
|
-
|
|
3650
|
-
if (arr[
|
|
3651
|
-
p2[i2] =
|
|
3649
|
+
j = result[result.length - 1];
|
|
3650
|
+
if (arr[j] < arrI) {
|
|
3651
|
+
p2[i2] = j;
|
|
3652
3652
|
result.push(i2);
|
|
3653
3653
|
continue;
|
|
3654
3654
|
}
|
|
3655
|
-
|
|
3655
|
+
u = 0;
|
|
3656
3656
|
v = result.length - 1;
|
|
3657
|
-
while (
|
|
3658
|
-
|
|
3659
|
-
if (arr[result[
|
|
3660
|
-
|
|
3657
|
+
while (u < v) {
|
|
3658
|
+
c = u + v >> 1;
|
|
3659
|
+
if (arr[result[c]] < arrI) {
|
|
3660
|
+
u = c + 1;
|
|
3661
3661
|
} else {
|
|
3662
|
-
v =
|
|
3662
|
+
v = c;
|
|
3663
3663
|
}
|
|
3664
3664
|
}
|
|
3665
|
-
if (arrI < arr[result[
|
|
3666
|
-
if (
|
|
3667
|
-
p2[i2] = result[
|
|
3665
|
+
if (arrI < arr[result[u]]) {
|
|
3666
|
+
if (u > 0) {
|
|
3667
|
+
p2[i2] = result[u - 1];
|
|
3668
3668
|
}
|
|
3669
|
-
result[
|
|
3669
|
+
result[u] = i2;
|
|
3670
3670
|
}
|
|
3671
3671
|
}
|
|
3672
3672
|
}
|
|
3673
|
-
|
|
3674
|
-
v = result[
|
|
3675
|
-
while (
|
|
3676
|
-
result[
|
|
3673
|
+
u = result.length;
|
|
3674
|
+
v = result[u - 1];
|
|
3675
|
+
while (u-- > 0) {
|
|
3676
|
+
result[u] = v;
|
|
3677
3677
|
v = p2[v];
|
|
3678
3678
|
}
|
|
3679
3679
|
return result;
|
|
@@ -4044,8 +4044,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
4044
4044
|
if (isSSR) {
|
|
4045
4045
|
return setupResult.then((resolvedResult) => {
|
|
4046
4046
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
4047
|
-
}).catch((
|
|
4048
|
-
handleError(
|
|
4047
|
+
}).catch((e) => {
|
|
4048
|
+
handleError(e, instance, 0);
|
|
4049
4049
|
});
|
|
4050
4050
|
} else {
|
|
4051
4051
|
instance.asyncDep = setupResult;
|
|
@@ -4142,9 +4142,9 @@ function isClassComponent(value) {
|
|
|
4142
4142
|
const computed = (getterOrOptions, debugOptions) => {
|
|
4143
4143
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
4144
4144
|
};
|
|
4145
|
-
function h
|
|
4146
|
-
const
|
|
4147
|
-
if (
|
|
4145
|
+
function h(type, propsOrChildren, children) {
|
|
4146
|
+
const l = arguments.length;
|
|
4147
|
+
if (l === 2) {
|
|
4148
4148
|
if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
4149
4149
|
if (isVNode(propsOrChildren)) {
|
|
4150
4150
|
return createVNode(type, null, [propsOrChildren]);
|
|
@@ -4154,9 +4154,9 @@ function h$1(type, propsOrChildren, children) {
|
|
|
4154
4154
|
return createVNode(type, null, propsOrChildren);
|
|
4155
4155
|
}
|
|
4156
4156
|
} else {
|
|
4157
|
-
if (
|
|
4157
|
+
if (l > 3) {
|
|
4158
4158
|
children = Array.prototype.slice.call(arguments, 2);
|
|
4159
|
-
} else if (
|
|
4159
|
+
} else if (l === 3 && isVNode(children)) {
|
|
4160
4160
|
children = [children];
|
|
4161
4161
|
}
|
|
4162
4162
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -4361,7 +4361,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
4361
4361
|
}
|
|
4362
4362
|
try {
|
|
4363
4363
|
el[key] = value;
|
|
4364
|
-
} catch (
|
|
4364
|
+
} catch (e) {
|
|
4365
4365
|
}
|
|
4366
4366
|
needRemove && el.removeAttribute(key);
|
|
4367
4367
|
}
|
|
@@ -4410,33 +4410,33 @@ function parseName(name) {
|
|
|
4410
4410
|
let options2;
|
|
4411
4411
|
if (optionsModifierRE.test(name)) {
|
|
4412
4412
|
options2 = {};
|
|
4413
|
-
let
|
|
4414
|
-
while (
|
|
4415
|
-
name = name.slice(0, name.length -
|
|
4416
|
-
options2[
|
|
4413
|
+
let m;
|
|
4414
|
+
while (m = name.match(optionsModifierRE)) {
|
|
4415
|
+
name = name.slice(0, name.length - m[0].length);
|
|
4416
|
+
options2[m[0].toLowerCase()] = true;
|
|
4417
4417
|
}
|
|
4418
4418
|
}
|
|
4419
4419
|
return [hyphenate(name.slice(2)), options2];
|
|
4420
4420
|
}
|
|
4421
4421
|
function createInvoker(initialValue2, instance) {
|
|
4422
|
-
const invoker = (
|
|
4423
|
-
const timeStamp =
|
|
4422
|
+
const invoker = (e) => {
|
|
4423
|
+
const timeStamp = e.timeStamp || _getNow();
|
|
4424
4424
|
if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {
|
|
4425
|
-
callWithAsyncErrorHandling(patchStopImmediatePropagation(
|
|
4425
|
+
callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
|
|
4426
4426
|
}
|
|
4427
4427
|
};
|
|
4428
4428
|
invoker.value = initialValue2;
|
|
4429
4429
|
invoker.attached = getNow();
|
|
4430
4430
|
return invoker;
|
|
4431
4431
|
}
|
|
4432
|
-
function patchStopImmediatePropagation(
|
|
4432
|
+
function patchStopImmediatePropagation(e, value) {
|
|
4433
4433
|
if (isArray(value)) {
|
|
4434
|
-
const originalStop =
|
|
4435
|
-
|
|
4436
|
-
originalStop.call(
|
|
4437
|
-
|
|
4434
|
+
const originalStop = e.stopImmediatePropagation;
|
|
4435
|
+
e.stopImmediatePropagation = () => {
|
|
4436
|
+
originalStop.call(e);
|
|
4437
|
+
e._stopped = true;
|
|
4438
4438
|
};
|
|
4439
|
-
return value.map((fn) => (
|
|
4439
|
+
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
4440
4440
|
} else {
|
|
4441
4441
|
return value;
|
|
4442
4442
|
}
|
|
@@ -4493,11 +4493,11 @@ const getModelAssigner = (vnode) => {
|
|
|
4493
4493
|
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
4494
4494
|
return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
|
|
4495
4495
|
};
|
|
4496
|
-
function onCompositionStart(
|
|
4497
|
-
|
|
4496
|
+
function onCompositionStart(e) {
|
|
4497
|
+
e.target.composing = true;
|
|
4498
4498
|
}
|
|
4499
|
-
function onCompositionEnd(
|
|
4500
|
-
const target =
|
|
4499
|
+
function onCompositionEnd(e) {
|
|
4500
|
+
const target = e.target;
|
|
4501
4501
|
if (target.composing) {
|
|
4502
4502
|
target.composing = false;
|
|
4503
4503
|
target.dispatchEvent(new Event("input"));
|
|
@@ -4507,8 +4507,8 @@ const vModelText = {
|
|
|
4507
4507
|
created(el, { modifiers: { lazy, trim, number: number3 } }, vnode) {
|
|
4508
4508
|
el._assign = getModelAssigner(vnode);
|
|
4509
4509
|
const castToNumber = number3 || vnode.props && vnode.props.type === "number";
|
|
4510
|
-
addEventListener(el, lazy ? "change" : "input", (
|
|
4511
|
-
if (
|
|
4510
|
+
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
4511
|
+
if (e.target.composing)
|
|
4512
4512
|
return;
|
|
4513
4513
|
let domValue = el.value;
|
|
4514
4514
|
if (trim) {
|
|
@@ -4556,17 +4556,17 @@ const vModelText = {
|
|
|
4556
4556
|
};
|
|
4557
4557
|
const systemModifiers = ["ctrl", "shift", "alt", "meta"];
|
|
4558
4558
|
const modifierGuards = {
|
|
4559
|
-
stop: (
|
|
4560
|
-
prevent: (
|
|
4561
|
-
self: (
|
|
4562
|
-
ctrl: (
|
|
4563
|
-
shift: (
|
|
4564
|
-
alt: (
|
|
4565
|
-
meta: (
|
|
4566
|
-
left: (
|
|
4567
|
-
middle: (
|
|
4568
|
-
right: (
|
|
4569
|
-
exact: (
|
|
4559
|
+
stop: (e) => e.stopPropagation(),
|
|
4560
|
+
prevent: (e) => e.preventDefault(),
|
|
4561
|
+
self: (e) => e.target !== e.currentTarget,
|
|
4562
|
+
ctrl: (e) => !e.ctrlKey,
|
|
4563
|
+
shift: (e) => !e.shiftKey,
|
|
4564
|
+
alt: (e) => !e.altKey,
|
|
4565
|
+
meta: (e) => !e.metaKey,
|
|
4566
|
+
left: (e) => "button" in e && e.button !== 0,
|
|
4567
|
+
middle: (e) => "button" in e && e.button !== 1,
|
|
4568
|
+
right: (e) => "button" in e && e.button !== 2,
|
|
4569
|
+
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
4570
4570
|
};
|
|
4571
4571
|
const withModifiers = (fn, modifiers) => {
|
|
4572
4572
|
return (event, ...args) => {
|
|
@@ -4656,18 +4656,103 @@ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
|
|
|
4656
4656
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
4657
4657
|
var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
|
|
4658
4658
|
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4659
|
-
var __spreadValues2 = (
|
|
4660
|
-
for (var prop in
|
|
4661
|
-
if (__hasOwnProp2.call(
|
|
4662
|
-
__defNormalProp2(
|
|
4659
|
+
var __spreadValues2 = (a, b) => {
|
|
4660
|
+
for (var prop in b || (b = {}))
|
|
4661
|
+
if (__hasOwnProp2.call(b, prop))
|
|
4662
|
+
__defNormalProp2(a, prop, b[prop]);
|
|
4663
4663
|
if (__getOwnPropSymbols2)
|
|
4664
|
-
for (var prop of __getOwnPropSymbols2(
|
|
4665
|
-
if (__propIsEnum2.call(
|
|
4666
|
-
__defNormalProp2(
|
|
4664
|
+
for (var prop of __getOwnPropSymbols2(b)) {
|
|
4665
|
+
if (__propIsEnum2.call(b, prop))
|
|
4666
|
+
__defNormalProp2(a, prop, b[prop]);
|
|
4667
4667
|
}
|
|
4668
|
-
return
|
|
4668
|
+
return a;
|
|
4669
4669
|
};
|
|
4670
|
-
var __spreadProps2 = (
|
|
4670
|
+
var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
|
|
4671
|
+
const urlParams$1 = new URLSearchParams(window.location.search);
|
|
4672
|
+
const DEBUG$1 = urlParams$1.get("fdbg");
|
|
4673
|
+
function dbg$1() {
|
|
4674
|
+
if (DEBUG$1 != 1)
|
|
4675
|
+
return;
|
|
4676
|
+
console.debug(...arguments);
|
|
4677
|
+
}
|
|
4678
|
+
const postJSON = (url3, data) => __async(this, null, function* () {
|
|
4679
|
+
dbg$1("Post to: " + url3);
|
|
4680
|
+
const raw2 = yield fetch(url3, {
|
|
4681
|
+
method: "POST",
|
|
4682
|
+
headers: {
|
|
4683
|
+
"Accept": "application/json",
|
|
4684
|
+
"Content-Type": "application/json"
|
|
4685
|
+
},
|
|
4686
|
+
body: JSON.stringify(data)
|
|
4687
|
+
});
|
|
4688
|
+
if (!raw2.ok) {
|
|
4689
|
+
let error2 = new Error(raw2.statusText);
|
|
4690
|
+
Object.assign(error2, { response: raw2 });
|
|
4691
|
+
throw error2;
|
|
4692
|
+
}
|
|
4693
|
+
const res = yield raw2.json();
|
|
4694
|
+
dbg$1("Post resp: " + JSON.stringify(res, null, 2));
|
|
4695
|
+
return res;
|
|
4696
|
+
});
|
|
4697
|
+
const redirect = (url3) => {
|
|
4698
|
+
window.location.href = url3;
|
|
4699
|
+
};
|
|
4700
|
+
const handleSubmitError = (err, node) => {
|
|
4701
|
+
if (err.response) {
|
|
4702
|
+
const code = err.response.status;
|
|
4703
|
+
if (node.props.attrs.errorCodes && code in node.props.attrs.errorCodes) {
|
|
4704
|
+
const value = node.props.attrs.errorCodes[code];
|
|
4705
|
+
let message2 = null;
|
|
4706
|
+
let abort = true;
|
|
4707
|
+
if (typeof value === "string") {
|
|
4708
|
+
message2 = value;
|
|
4709
|
+
} else {
|
|
4710
|
+
if ("message" in value) {
|
|
4711
|
+
message2 = value.message;
|
|
4712
|
+
}
|
|
4713
|
+
if ("abort" in value) {
|
|
4714
|
+
abort = value.abort;
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4717
|
+
if (message2) {
|
|
4718
|
+
node.setErrors(message2);
|
|
4719
|
+
}
|
|
4720
|
+
return abort;
|
|
4721
|
+
}
|
|
4722
|
+
}
|
|
4723
|
+
node.setErrors(err.toString());
|
|
4724
|
+
return true;
|
|
4725
|
+
};
|
|
4726
|
+
const getKey = (d, path) => {
|
|
4727
|
+
if (typeof path === "string") {
|
|
4728
|
+
path = path.split(".");
|
|
4729
|
+
}
|
|
4730
|
+
return path.reduce((x, y) => x[y], d);
|
|
4731
|
+
};
|
|
4732
|
+
const keyValOverlap = (o1, o2) => {
|
|
4733
|
+
let result = null;
|
|
4734
|
+
for (var key of Object.keys(o2)) {
|
|
4735
|
+
if (key === "*") {
|
|
4736
|
+
continue;
|
|
4737
|
+
}
|
|
4738
|
+
const o1_value = getKey(o1, key);
|
|
4739
|
+
if (!o1_value) {
|
|
4740
|
+
continue;
|
|
4741
|
+
}
|
|
4742
|
+
if (o2[key][o1_value]) {
|
|
4743
|
+
result = o2[key][o1_value];
|
|
4744
|
+
break;
|
|
4745
|
+
}
|
|
4746
|
+
}
|
|
4747
|
+
if (result === null) {
|
|
4748
|
+
if ("*" in o2) {
|
|
4749
|
+
return o2["*"];
|
|
4750
|
+
}
|
|
4751
|
+
throw Error("result not found and no default specified");
|
|
4752
|
+
}
|
|
4753
|
+
return result;
|
|
4754
|
+
};
|
|
4755
|
+
const strSubUrl = (str, obj) => str.replace(/\${(.*?)}/g, (x, g) => encodeURIComponent(getKey(obj, g)));
|
|
4671
4756
|
function usePrepop() {
|
|
4672
4757
|
let prepopSettings = {};
|
|
4673
4758
|
const urlParams2 = new URLSearchParams(window.location.search);
|
|
@@ -4697,11 +4782,11 @@ function usePrepop() {
|
|
|
4697
4782
|
}
|
|
4698
4783
|
}
|
|
4699
4784
|
if (!found) {
|
|
4700
|
-
|
|
4785
|
+
dbg$1("Prepop option not found for:", node.name, value);
|
|
4701
4786
|
return;
|
|
4702
4787
|
}
|
|
4703
4788
|
}
|
|
4704
|
-
|
|
4789
|
+
dbg$1("Setting prepop value for:", node.name, value);
|
|
4705
4790
|
node.input(value);
|
|
4706
4791
|
}
|
|
4707
4792
|
}
|
|
@@ -4725,8 +4810,8 @@ function eq$1(valA, valB, deep = true, explicit = ["__key"]) {
|
|
|
4725
4810
|
return false;
|
|
4726
4811
|
if (Object.keys(valA).length !== Object.keys(valB).length)
|
|
4727
4812
|
return false;
|
|
4728
|
-
for (const
|
|
4729
|
-
if ((
|
|
4813
|
+
for (const k of explicit) {
|
|
4814
|
+
if ((k in valA || k in valB) && valA[k] !== valB[k])
|
|
4730
4815
|
return false;
|
|
4731
4816
|
}
|
|
4732
4817
|
for (const key in valA) {
|
|
@@ -4742,7 +4827,7 @@ function eq$1(valA, valB, deep = true, explicit = ["__key"]) {
|
|
|
4742
4827
|
return false;
|
|
4743
4828
|
}
|
|
4744
4829
|
function camel$1(str) {
|
|
4745
|
-
return str.replace(/-([a-z0-9])/gi, (_s,
|
|
4830
|
+
return str.replace(/-([a-z0-9])/gi, (_s, g) => g.toUpperCase());
|
|
4746
4831
|
}
|
|
4747
4832
|
function kebab$1(str) {
|
|
4748
4833
|
return str.replace(/([a-z0-9])([A-Z])/g, (_s, trail, cap) => trail + "-" + cap.toLowerCase()).replace(" ", "-").toLowerCase();
|
|
@@ -4891,7 +4976,7 @@ function bubble$1(node, _context, event) {
|
|
|
4891
4976
|
}
|
|
4892
4977
|
return node;
|
|
4893
4978
|
}
|
|
4894
|
-
function on$
|
|
4979
|
+
function on$1(_node, context, name, listener) {
|
|
4895
4980
|
return context._e.on(name, listener);
|
|
4896
4981
|
}
|
|
4897
4982
|
function off$1(node, context, receipt) {
|
|
@@ -4920,18 +5005,18 @@ function error$1(code, data = {}) {
|
|
|
4920
5005
|
throw Error(errorHandler$1.dispatch({ code, data }).message);
|
|
4921
5006
|
}
|
|
4922
5007
|
function createMessage$1(conf, node) {
|
|
4923
|
-
const
|
|
5008
|
+
const m = __spreadValues2({
|
|
4924
5009
|
blocking: false,
|
|
4925
5010
|
key: token$1(),
|
|
4926
5011
|
meta: {},
|
|
4927
5012
|
type: "state",
|
|
4928
5013
|
visible: true
|
|
4929
5014
|
}, conf);
|
|
4930
|
-
if (node &&
|
|
4931
|
-
|
|
4932
|
-
|
|
5015
|
+
if (node && m.value && m.meta.localize !== false) {
|
|
5016
|
+
m.value = node.t(m);
|
|
5017
|
+
m.meta.locale = node.config.locale;
|
|
4933
5018
|
}
|
|
4934
|
-
return
|
|
5019
|
+
return m;
|
|
4935
5020
|
}
|
|
4936
5021
|
function createMessages$1(node, ...errors2) {
|
|
4937
5022
|
const sourceKey = `${node.name}-set`;
|
|
@@ -4941,7 +5026,7 @@ function createMessages$1(node, ...errors2) {
|
|
|
4941
5026
|
value: error2,
|
|
4942
5027
|
meta: { source: sourceKey, autoClear: true }
|
|
4943
5028
|
});
|
|
4944
|
-
return errors2.filter((
|
|
5029
|
+
return errors2.filter((m) => !!m).map((errorSet) => {
|
|
4945
5030
|
if (typeof errorSet === "string")
|
|
4946
5031
|
errorSet = [errorSet];
|
|
4947
5032
|
if (Array.isArray(errorSet)) {
|
|
@@ -4997,13 +5082,13 @@ function submitForm$1(id) {
|
|
|
4997
5082
|
warn$1(151, id);
|
|
4998
5083
|
}
|
|
4999
5084
|
function clearState$1(node) {
|
|
5000
|
-
const clear2 = (
|
|
5001
|
-
for (const key in
|
|
5002
|
-
const message2 =
|
|
5085
|
+
const clear2 = (n) => {
|
|
5086
|
+
for (const key in n.store) {
|
|
5087
|
+
const message2 = n.store[key];
|
|
5003
5088
|
if (message2.type === "error" || message2.type === "ui" && key === "incomplete") {
|
|
5004
|
-
|
|
5089
|
+
n.store.remove(key);
|
|
5005
5090
|
} else if (message2.type === "state") {
|
|
5006
|
-
|
|
5091
|
+
n.store.set(__spreadProps2(__spreadValues2({}, message2), { value: false }));
|
|
5007
5092
|
}
|
|
5008
5093
|
}
|
|
5009
5094
|
};
|
|
@@ -5013,7 +5098,7 @@ function clearState$1(node) {
|
|
|
5013
5098
|
function reset$1(id, resetTo) {
|
|
5014
5099
|
const node = typeof id === "string" ? getNode$1$1(id) : id;
|
|
5015
5100
|
if (node) {
|
|
5016
|
-
const initial = (
|
|
5101
|
+
const initial = (n) => cloneAny$1(n.props.initial) || (n.type === "group" ? {} : n.type === "list" ? [] : void 0);
|
|
5017
5102
|
node._e.pause(node);
|
|
5018
5103
|
node.input(cloneAny$1(resetTo) || initial(node), false);
|
|
5019
5104
|
node.walk((child) => child.input(initial(child), false));
|
|
@@ -5065,7 +5150,7 @@ const invalidSetter$1 = (node, _context, property) => {
|
|
|
5065
5150
|
each: trap$1(eachChild$1),
|
|
5066
5151
|
emit: trap$1(emit$1$1),
|
|
5067
5152
|
find: trap$1(find$1),
|
|
5068
|
-
on: trap$1(on$
|
|
5153
|
+
on: trap$1(on$1),
|
|
5069
5154
|
off: trap$1(off$1),
|
|
5070
5155
|
parent: trap$1(false, setParent$1),
|
|
5071
5156
|
plugins: trap$1(false),
|
|
@@ -5217,6 +5302,14 @@ function define$1(node, context, definition) {
|
|
|
5217
5302
|
type: node.type,
|
|
5218
5303
|
value: context.value
|
|
5219
5304
|
});
|
|
5305
|
+
if (definition.forceTypeProp) {
|
|
5306
|
+
if (node.props.type)
|
|
5307
|
+
node.props.originalType = node.props.type;
|
|
5308
|
+
context.props.type = definition.forceTypeProp;
|
|
5309
|
+
}
|
|
5310
|
+
if (definition.family) {
|
|
5311
|
+
context.props.family = definition.family;
|
|
5312
|
+
}
|
|
5220
5313
|
if (definition.features) {
|
|
5221
5314
|
definition.features.forEach((feature) => feature(node));
|
|
5222
5315
|
}
|
|
@@ -5343,7 +5436,7 @@ function walkTree$1(_node, context, callback, stopIfFalse = false) {
|
|
|
5343
5436
|
function resetConfig$1(node, context) {
|
|
5344
5437
|
const parent = node.parent || void 0;
|
|
5345
5438
|
context.config = createConfig$2(node.config._t, parent);
|
|
5346
|
-
node.walk((
|
|
5439
|
+
node.walk((n) => n.resetConfig());
|
|
5347
5440
|
}
|
|
5348
5441
|
function use$1(node, context, plugin2, run2 = true, library = true) {
|
|
5349
5442
|
if (Array.isArray(plugin2) || plugin2 instanceof Set) {
|
|
@@ -5421,7 +5514,7 @@ function getNode$2(node, _context, locator) {
|
|
|
5421
5514
|
pointer = node;
|
|
5422
5515
|
break;
|
|
5423
5516
|
default:
|
|
5424
|
-
pointer = pointer.children.find((
|
|
5517
|
+
pointer = pointer.children.find((c) => String(c.name) === String(name)) || select$3(pointer, name);
|
|
5425
5518
|
}
|
|
5426
5519
|
}
|
|
5427
5520
|
return pointer || void 0;
|
|
@@ -5444,7 +5537,7 @@ function find$1(node, _context, searchTerm, searcher) {
|
|
|
5444
5537
|
return bfs$1(node, searchTerm, searcher);
|
|
5445
5538
|
}
|
|
5446
5539
|
function bfs$1(tree, searchValue, searchGoal = "name") {
|
|
5447
|
-
const search = typeof searchGoal === "string" ? (
|
|
5540
|
+
const search = typeof searchGoal === "string" ? (n) => n[searchGoal] == searchValue : searchGoal;
|
|
5448
5541
|
const stack = [tree];
|
|
5449
5542
|
while (stack.length) {
|
|
5450
5543
|
const node = stack.shift();
|
|
@@ -5454,8 +5547,8 @@ function bfs$1(tree, searchValue, searchGoal = "name") {
|
|
|
5454
5547
|
}
|
|
5455
5548
|
return void 0;
|
|
5456
5549
|
}
|
|
5457
|
-
function getRoot$1(
|
|
5458
|
-
let node =
|
|
5550
|
+
function getRoot$1(n) {
|
|
5551
|
+
let node = n;
|
|
5459
5552
|
while (node.parent) {
|
|
5460
5553
|
node = node.parent;
|
|
5461
5554
|
}
|
|
@@ -5505,7 +5598,7 @@ function createConfig$2(target = {}, parent) {
|
|
|
5505
5598
|
if (node) {
|
|
5506
5599
|
node.emit(`config:${prop}`, value, false);
|
|
5507
5600
|
configChange$1(node, prop, value);
|
|
5508
|
-
node.walk((
|
|
5601
|
+
node.walk((n) => configChange$1(n, prop, value), true);
|
|
5509
5602
|
}
|
|
5510
5603
|
return didSet;
|
|
5511
5604
|
}
|
|
@@ -5555,96 +5648,28 @@ function clearErrors$1$1(node, context, clearChildErrors = true, sourceKey) {
|
|
|
5555
5648
|
}
|
|
5556
5649
|
return node;
|
|
5557
5650
|
}
|
|
5558
|
-
const
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
if (!raw2.ok) {
|
|
5569
|
-
let error2 = new Error(raw2.statusText);
|
|
5570
|
-
Object.assign(error2, { response: raw2 });
|
|
5571
|
-
throw error2;
|
|
5572
|
-
}
|
|
5573
|
-
const res = yield raw2.json();
|
|
5574
|
-
console.debug("POST response:" + JSON.stringify(res, null, 2));
|
|
5575
|
-
return res;
|
|
5576
|
-
});
|
|
5577
|
-
const redirect = (url3) => {
|
|
5578
|
-
window.location.href = url3;
|
|
5579
|
-
};
|
|
5580
|
-
const handleSubmitError = (err, node) => {
|
|
5581
|
-
if (err.response) {
|
|
5582
|
-
const code = err.response.status;
|
|
5583
|
-
if (node.props.attrs.errorCodes && code in node.props.attrs.errorCodes) {
|
|
5584
|
-
const value = node.props.attrs.errorCodes[code];
|
|
5585
|
-
let message2 = null;
|
|
5586
|
-
let abort = true;
|
|
5587
|
-
if (typeof value === "string") {
|
|
5588
|
-
message2 = value;
|
|
5589
|
-
} else {
|
|
5590
|
-
if ("message" in value) {
|
|
5591
|
-
message2 = value.message;
|
|
5592
|
-
}
|
|
5593
|
-
if ("abort" in value) {
|
|
5594
|
-
abort = value.abort;
|
|
5595
|
-
}
|
|
5596
|
-
}
|
|
5597
|
-
if (message2) {
|
|
5598
|
-
node.setErrors(message2);
|
|
5599
|
-
}
|
|
5600
|
-
return abort;
|
|
5601
|
-
}
|
|
5602
|
-
}
|
|
5603
|
-
node.setErrors(err.toString());
|
|
5604
|
-
return true;
|
|
5605
|
-
};
|
|
5606
|
-
const getKey = (d2, path) => {
|
|
5607
|
-
if (typeof path === "string") {
|
|
5608
|
-
path = path.split(".");
|
|
5609
|
-
}
|
|
5610
|
-
return path.reduce((x2, y) => x2[y], d2);
|
|
5611
|
-
};
|
|
5612
|
-
const keyValOverlap = (o1, o2) => {
|
|
5613
|
-
let result = null;
|
|
5614
|
-
for (var key of Object.keys(o2)) {
|
|
5615
|
-
if (key === "*") {
|
|
5616
|
-
continue;
|
|
5617
|
-
}
|
|
5618
|
-
const o1_value = getKey(o1, key);
|
|
5619
|
-
if (!o1_value) {
|
|
5620
|
-
continue;
|
|
5621
|
-
}
|
|
5622
|
-
if (o2[key][o1_value]) {
|
|
5623
|
-
result = o2[key][o1_value];
|
|
5624
|
-
break;
|
|
5625
|
-
}
|
|
5626
|
-
}
|
|
5627
|
-
if (result === null) {
|
|
5628
|
-
if ("*" in o2) {
|
|
5629
|
-
return o2["*"];
|
|
5630
|
-
}
|
|
5631
|
-
throw Error("result not found and no default specified");
|
|
5632
|
-
}
|
|
5633
|
-
return result;
|
|
5634
|
-
};
|
|
5635
|
-
const strSubUrl = (str, obj) => str.replace(/\${(.*?)}/g, (x2, g2) => encodeURIComponent(getKey(obj, g2)));
|
|
5651
|
+
const autoFocusTypes = [
|
|
5652
|
+
"email",
|
|
5653
|
+
"number",
|
|
5654
|
+
"password",
|
|
5655
|
+
"search",
|
|
5656
|
+
"text",
|
|
5657
|
+
"textarea",
|
|
5658
|
+
"tel",
|
|
5659
|
+
"url"
|
|
5660
|
+
];
|
|
5636
5661
|
function useSteps() {
|
|
5637
5662
|
const activeStep2 = ref("");
|
|
5638
5663
|
const steps2 = reactive({});
|
|
5639
5664
|
let defaultOrder2 = [];
|
|
5640
5665
|
let stepQueue2 = ref([]);
|
|
5641
5666
|
let stepHistory2 = ref([]);
|
|
5642
|
-
const lastItem = (
|
|
5643
|
-
return
|
|
5667
|
+
const lastItem = (x) => {
|
|
5668
|
+
return x.value[x.value.length - 1];
|
|
5644
5669
|
};
|
|
5645
|
-
const findFirstInput = (
|
|
5646
|
-
for (var i2 = 0; i2 <
|
|
5647
|
-
const child =
|
|
5670
|
+
const findFirstInput = (n) => {
|
|
5671
|
+
for (var i2 = 0; i2 < n.children.length; i2++) {
|
|
5672
|
+
const child = n.children[i2];
|
|
5648
5673
|
if ((child.type === "input" || child.type === "list") && !(child.context.type === "hidden")) {
|
|
5649
5674
|
return child;
|
|
5650
5675
|
}
|
|
@@ -5655,6 +5680,26 @@ function useSteps() {
|
|
|
5655
5680
|
}
|
|
5656
5681
|
return null;
|
|
5657
5682
|
};
|
|
5683
|
+
const focusAndOpenKeyboard = (el, timeout) => {
|
|
5684
|
+
if (!timeout) {
|
|
5685
|
+
timeout = 100;
|
|
5686
|
+
}
|
|
5687
|
+
if (el) {
|
|
5688
|
+
var __tempEl__ = document.createElement("input");
|
|
5689
|
+
__tempEl__.style.position = "absolute";
|
|
5690
|
+
__tempEl__.style.top = el.offsetTop + 7 + "px";
|
|
5691
|
+
__tempEl__.style.left = el.offsetLeft + "px";
|
|
5692
|
+
__tempEl__.style.height = 0;
|
|
5693
|
+
__tempEl__.style.opacity = 0;
|
|
5694
|
+
document.body.appendChild(__tempEl__);
|
|
5695
|
+
__tempEl__.focus();
|
|
5696
|
+
setTimeout(function() {
|
|
5697
|
+
el.focus();
|
|
5698
|
+
el.click();
|
|
5699
|
+
document.body.removeChild(__tempEl__);
|
|
5700
|
+
}, timeout);
|
|
5701
|
+
}
|
|
5702
|
+
};
|
|
5658
5703
|
const firstStep2 = () => {
|
|
5659
5704
|
if (stepHistory2.value.length > 0) {
|
|
5660
5705
|
return stepHistory2.value[0];
|
|
@@ -5699,8 +5744,8 @@ function useSteps() {
|
|
|
5699
5744
|
const setStep2 = ({ nextStep = 1, validate: validate2 = true, autoFocus = true } = {}) => {
|
|
5700
5745
|
const node = steps2[activeStep2.value].node;
|
|
5701
5746
|
if (validate2) {
|
|
5702
|
-
node.walk((
|
|
5703
|
-
|
|
5747
|
+
node.walk((n) => {
|
|
5748
|
+
n.store.set(createMessage$1({
|
|
5704
5749
|
key: "submitted",
|
|
5705
5750
|
value: true,
|
|
5706
5751
|
visible: false
|
|
@@ -5723,14 +5768,15 @@ function useSteps() {
|
|
|
5723
5768
|
}
|
|
5724
5769
|
if (autoFocus) {
|
|
5725
5770
|
const newNode = steps2[activeStep2.value].node;
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
if (!firstInput) {
|
|
5729
|
-
return;
|
|
5730
|
-
}
|
|
5771
|
+
const firstInput = findFirstInput(newNode);
|
|
5772
|
+
if (firstInput && autoFocusTypes.indexOf(firstInput.context.type) > -1) {
|
|
5731
5773
|
const elem = document.getElementById(firstInput.context.id);
|
|
5732
|
-
|
|
5733
|
-
|
|
5774
|
+
try {
|
|
5775
|
+
focusAndOpenKeyboard(elem);
|
|
5776
|
+
} catch (e) {
|
|
5777
|
+
console.warn("Failed to autoFocus:", e);
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5734
5780
|
}
|
|
5735
5781
|
return true;
|
|
5736
5782
|
};
|
|
@@ -5786,7 +5832,7 @@ function useSteps() {
|
|
|
5786
5832
|
}
|
|
5787
5833
|
let { prepopPlugin } = usePrepop();
|
|
5788
5834
|
let { stepPlugin, steps, stepHistory, stepQueue, enabledSteps, defaultOrder, activeStep, firstStep, lastStep, setStep, setNextStep, setPreviousStep } = useSteps();
|
|
5789
|
-
const urlParams$
|
|
5835
|
+
const urlParams$2 = new URLSearchParams(window.location.search);
|
|
5790
5836
|
const dataDefaults = {
|
|
5791
5837
|
steps,
|
|
5792
5838
|
activeStep,
|
|
@@ -5797,7 +5843,7 @@ const dataDefaults = {
|
|
|
5797
5843
|
prepopPlugin
|
|
5798
5844
|
],
|
|
5799
5845
|
urlParam: (name, backup = null) => {
|
|
5800
|
-
return urlParams$
|
|
5846
|
+
return urlParams$2.get(name) || backup;
|
|
5801
5847
|
},
|
|
5802
5848
|
firstStep: () => {
|
|
5803
5849
|
return firstStep();
|
|
@@ -5885,7 +5931,6 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
5885
5931
|
Object.assign(meta, node.data || {});
|
|
5886
5932
|
}
|
|
5887
5933
|
const mergedData = reactive(Object.assign({}, dataDefaults, { meta }, props2.data));
|
|
5888
|
-
console.debug("FormKitSchema data:", mergedData);
|
|
5889
5934
|
return (_ctx, _cache) => {
|
|
5890
5935
|
const _component_FormKitSchema = resolveComponent("FormKitSchema");
|
|
5891
5936
|
return openBlock(), createBlock(_component_FormKitSchema, {
|
|
@@ -5921,8 +5966,8 @@ function eq(valA, valB, deep = true, explicit = ["__key"]) {
|
|
|
5921
5966
|
return false;
|
|
5922
5967
|
if (Object.keys(valA).length !== Object.keys(valB).length)
|
|
5923
5968
|
return false;
|
|
5924
|
-
for (const
|
|
5925
|
-
if ((
|
|
5969
|
+
for (const k of explicit) {
|
|
5970
|
+
if ((k in valA || k in valB) && valA[k] !== valB[k])
|
|
5926
5971
|
return false;
|
|
5927
5972
|
}
|
|
5928
5973
|
for (const key in valA) {
|
|
@@ -5977,18 +6022,18 @@ function regexForFormat(format2) {
|
|
|
5977
6022
|
return regex.replace(format3, formats[format3]);
|
|
5978
6023
|
}, escaped));
|
|
5979
6024
|
}
|
|
5980
|
-
function isRecord(
|
|
5981
|
-
return Object.prototype.toString.call(
|
|
6025
|
+
function isRecord(o) {
|
|
6026
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
5982
6027
|
}
|
|
5983
|
-
function isObject(
|
|
5984
|
-
return isRecord(
|
|
6028
|
+
function isObject(o) {
|
|
6029
|
+
return isRecord(o) || Array.isArray(o);
|
|
5985
6030
|
}
|
|
5986
|
-
function isPojo(
|
|
5987
|
-
if (isRecord(
|
|
6031
|
+
function isPojo(o) {
|
|
6032
|
+
if (isRecord(o) === false)
|
|
5988
6033
|
return false;
|
|
5989
|
-
if (
|
|
6034
|
+
if (o.__FKNode__ || o.__POJO__ === false)
|
|
5990
6035
|
return false;
|
|
5991
|
-
const ctor =
|
|
6036
|
+
const ctor = o.constructor;
|
|
5992
6037
|
if (ctor === void 0)
|
|
5993
6038
|
return true;
|
|
5994
6039
|
const prot = ctor.prototype;
|
|
@@ -6095,7 +6140,7 @@ function parseArgs(str) {
|
|
|
6095
6140
|
}
|
|
6096
6141
|
function except(obj, toRemove) {
|
|
6097
6142
|
const clean = {};
|
|
6098
|
-
const exps = toRemove.filter((
|
|
6143
|
+
const exps = toRemove.filter((n) => n instanceof RegExp);
|
|
6099
6144
|
const keysToRemove = new Set(toRemove);
|
|
6100
6145
|
for (const key in obj) {
|
|
6101
6146
|
if (!keysToRemove.has(key) && !exps.some((exp) => exp.test(key))) {
|
|
@@ -6106,7 +6151,7 @@ function except(obj, toRemove) {
|
|
|
6106
6151
|
}
|
|
6107
6152
|
function only(obj, include) {
|
|
6108
6153
|
const clean = {};
|
|
6109
|
-
const exps = include.filter((
|
|
6154
|
+
const exps = include.filter((n) => n instanceof RegExp);
|
|
6110
6155
|
include.forEach((key) => {
|
|
6111
6156
|
if (!(key instanceof RegExp)) {
|
|
6112
6157
|
clean[key] = obj[key];
|
|
@@ -6120,7 +6165,7 @@ function only(obj, include) {
|
|
|
6120
6165
|
return clean;
|
|
6121
6166
|
}
|
|
6122
6167
|
function camel(str) {
|
|
6123
|
-
return str.replace(/-([a-z0-9])/gi, (_s,
|
|
6168
|
+
return str.replace(/-([a-z0-9])/gi, (_s, g) => g.toUpperCase());
|
|
6124
6169
|
}
|
|
6125
6170
|
function kebab(str) {
|
|
6126
6171
|
return str.replace(/([a-z0-9])([A-Z])/g, (_s, trail, cap) => trail + "-" + cap.toLowerCase()).replace(" ", "-").toLowerCase();
|
|
@@ -6158,15 +6203,15 @@ function getAt(obj, addr) {
|
|
|
6158
6203
|
if (!obj || typeof obj !== "object")
|
|
6159
6204
|
return null;
|
|
6160
6205
|
const segments = addr.split(".");
|
|
6161
|
-
let
|
|
6206
|
+
let o = obj;
|
|
6162
6207
|
for (const i2 in segments) {
|
|
6163
6208
|
const segment = segments[i2];
|
|
6164
|
-
if (has(
|
|
6165
|
-
|
|
6209
|
+
if (has(o, segment)) {
|
|
6210
|
+
o = o[segment];
|
|
6166
6211
|
}
|
|
6167
6212
|
if (+i2 === segments.length - 1)
|
|
6168
|
-
return
|
|
6169
|
-
if (!
|
|
6213
|
+
return o;
|
|
6214
|
+
if (!o || typeof o !== "object")
|
|
6170
6215
|
return null;
|
|
6171
6216
|
}
|
|
6172
6217
|
return null;
|
|
@@ -6286,7 +6331,7 @@ function bubble(node, _context, event) {
|
|
|
6286
6331
|
}
|
|
6287
6332
|
return node;
|
|
6288
6333
|
}
|
|
6289
|
-
function on
|
|
6334
|
+
function on(_node, context, name, listener) {
|
|
6290
6335
|
return context._e.on(name, listener);
|
|
6291
6336
|
}
|
|
6292
6337
|
function off(node, context, receipt) {
|
|
@@ -6315,18 +6360,18 @@ function error(code, data = {}) {
|
|
|
6315
6360
|
throw Error(errorHandler.dispatch({ code, data }).message);
|
|
6316
6361
|
}
|
|
6317
6362
|
function createMessage(conf, node) {
|
|
6318
|
-
const
|
|
6363
|
+
const m = __spreadValues({
|
|
6319
6364
|
blocking: false,
|
|
6320
6365
|
key: token(),
|
|
6321
6366
|
meta: {},
|
|
6322
6367
|
type: "state",
|
|
6323
6368
|
visible: true
|
|
6324
6369
|
}, conf);
|
|
6325
|
-
if (node &&
|
|
6326
|
-
|
|
6327
|
-
|
|
6370
|
+
if (node && m.value && m.meta.localize !== false) {
|
|
6371
|
+
m.value = node.t(m);
|
|
6372
|
+
m.meta.locale = node.config.locale;
|
|
6328
6373
|
}
|
|
6329
|
-
return
|
|
6374
|
+
return m;
|
|
6330
6375
|
}
|
|
6331
6376
|
const storeTraps = {
|
|
6332
6377
|
apply: applyMessages,
|
|
@@ -6395,9 +6440,9 @@ function setMessage(messageStore, store, node, message2) {
|
|
|
6395
6440
|
message2.meta.locale = node.props.locale;
|
|
6396
6441
|
}
|
|
6397
6442
|
}
|
|
6398
|
-
const
|
|
6443
|
+
const e = `message-${has(messageStore, message2.key) ? "updated" : "added"}`;
|
|
6399
6444
|
messageStore[message2.key] = Object.freeze(node.hook.message.dispatch(message2));
|
|
6400
|
-
node.emit(
|
|
6445
|
+
node.emit(e, message2);
|
|
6401
6446
|
}
|
|
6402
6447
|
return store;
|
|
6403
6448
|
}
|
|
@@ -6415,7 +6460,7 @@ function removeMessage$1(messageStore, store, node, key) {
|
|
|
6415
6460
|
}
|
|
6416
6461
|
if (store.buffer === true) {
|
|
6417
6462
|
store._b = store._b.filter((buffered) => {
|
|
6418
|
-
buffered[0] = buffered[0].filter((
|
|
6463
|
+
buffered[0] = buffered[0].filter((m) => m.key !== key);
|
|
6419
6464
|
return buffered[1] || buffered[0].length;
|
|
6420
6465
|
});
|
|
6421
6466
|
}
|
|
@@ -6470,7 +6515,7 @@ function createMessages(node, ...errors2) {
|
|
|
6470
6515
|
value: error2,
|
|
6471
6516
|
meta: { source: sourceKey, autoClear: true }
|
|
6472
6517
|
});
|
|
6473
|
-
return errors2.filter((
|
|
6518
|
+
return errors2.filter((m) => !!m).map((errorSet) => {
|
|
6474
6519
|
if (typeof errorSet === "string")
|
|
6475
6520
|
errorSet = [errorSet];
|
|
6476
6521
|
if (Array.isArray(errorSet)) {
|
|
@@ -6520,19 +6565,19 @@ function releaseBuffer(_messageStore, store) {
|
|
|
6520
6565
|
}
|
|
6521
6566
|
function createLedger() {
|
|
6522
6567
|
const ledger = {};
|
|
6523
|
-
let
|
|
6568
|
+
let n;
|
|
6524
6569
|
return {
|
|
6525
|
-
count: (...args) => createCounter(
|
|
6570
|
+
count: (...args) => createCounter(n, ledger, ...args),
|
|
6526
6571
|
init(node) {
|
|
6527
|
-
|
|
6572
|
+
n = node;
|
|
6528
6573
|
node.on("message-added.deep", add(ledger, 1));
|
|
6529
6574
|
node.on("message-removed.deep", add(ledger, -1));
|
|
6530
6575
|
},
|
|
6531
|
-
merge: (child) => merge(
|
|
6576
|
+
merge: (child) => merge(n, ledger, child),
|
|
6532
6577
|
settled(counterName) {
|
|
6533
6578
|
return has(ledger, counterName) ? ledger[counterName].promise : Promise.resolve();
|
|
6534
6579
|
},
|
|
6535
|
-
unmerge: (child) => merge(
|
|
6580
|
+
unmerge: (child) => merge(n, ledger, child, true),
|
|
6536
6581
|
value(counterName) {
|
|
6537
6582
|
return has(ledger, counterName) ? ledger[counterName].count : 0;
|
|
6538
6583
|
}
|
|
@@ -6551,7 +6596,7 @@ function createCounter(node, ledger, counterName, condition, increment = 0) {
|
|
|
6551
6596
|
}
|
|
6552
6597
|
};
|
|
6553
6598
|
ledger[counterName] = counter;
|
|
6554
|
-
increment = node.store.reduce((sum,
|
|
6599
|
+
increment = node.store.reduce((sum, m) => sum + counter.condition(m) * 1, increment);
|
|
6555
6600
|
node.each((child) => {
|
|
6556
6601
|
child.ledger.count(counter.name, counter.condition);
|
|
6557
6602
|
increment += child.ledger.value(counter.name);
|
|
@@ -6563,7 +6608,7 @@ function parseCondition(condition) {
|
|
|
6563
6608
|
if (typeof condition === "function") {
|
|
6564
6609
|
return condition;
|
|
6565
6610
|
}
|
|
6566
|
-
return (
|
|
6611
|
+
return (m) => m.type === condition;
|
|
6567
6612
|
}
|
|
6568
6613
|
function count(counter, increment) {
|
|
6569
6614
|
const initial = counter.count;
|
|
@@ -6571,7 +6616,7 @@ function count(counter, increment) {
|
|
|
6571
6616
|
counter.count = post;
|
|
6572
6617
|
if (initial === 0 && post !== 0) {
|
|
6573
6618
|
counter.node.emit(`unsettled:${counter.name}`, counter.count, false);
|
|
6574
|
-
counter.promise = new Promise((
|
|
6619
|
+
counter.promise = new Promise((r) => counter.resolve = r);
|
|
6575
6620
|
} else if (initial !== 0 && post === 0) {
|
|
6576
6621
|
counter.node.emit(`settled:${counter.name}`, counter.count, false);
|
|
6577
6622
|
counter.resolve();
|
|
@@ -6580,10 +6625,10 @@ function count(counter, increment) {
|
|
|
6580
6625
|
return counter;
|
|
6581
6626
|
}
|
|
6582
6627
|
function add(ledger, delta) {
|
|
6583
|
-
return (
|
|
6628
|
+
return (e) => {
|
|
6584
6629
|
for (const name in ledger) {
|
|
6585
6630
|
const counter = ledger[name];
|
|
6586
|
-
if (counter.condition(
|
|
6631
|
+
if (counter.condition(e.payload)) {
|
|
6587
6632
|
count(counter, delta);
|
|
6588
6633
|
}
|
|
6589
6634
|
}
|
|
@@ -6654,11 +6699,11 @@ function createConfig$1(options2 = {}) {
|
|
|
6654
6699
|
_rm: (node) => node.remove(node)
|
|
6655
6700
|
});
|
|
6656
6701
|
const rootConfig = new Proxy(target, {
|
|
6657
|
-
set(
|
|
6702
|
+
set(t, prop, value, r) {
|
|
6658
6703
|
if (typeof prop === "string") {
|
|
6659
6704
|
nodes.forEach((node) => configChange(node, prop, value));
|
|
6660
6705
|
}
|
|
6661
|
-
return Reflect.set(
|
|
6706
|
+
return Reflect.set(t, prop, value, r);
|
|
6662
6707
|
}
|
|
6663
6708
|
});
|
|
6664
6709
|
return rootConfig;
|
|
@@ -6673,13 +6718,13 @@ function submitForm(id) {
|
|
|
6673
6718
|
warn(151, id);
|
|
6674
6719
|
}
|
|
6675
6720
|
function clearState(node) {
|
|
6676
|
-
const clear2 = (
|
|
6677
|
-
for (const key in
|
|
6678
|
-
const message2 =
|
|
6721
|
+
const clear2 = (n) => {
|
|
6722
|
+
for (const key in n.store) {
|
|
6723
|
+
const message2 = n.store[key];
|
|
6679
6724
|
if (message2.type === "error" || message2.type === "ui" && key === "incomplete") {
|
|
6680
|
-
|
|
6725
|
+
n.store.remove(key);
|
|
6681
6726
|
} else if (message2.type === "state") {
|
|
6682
|
-
|
|
6727
|
+
n.store.set(__spreadProps(__spreadValues({}, message2), { value: false }));
|
|
6683
6728
|
}
|
|
6684
6729
|
}
|
|
6685
6730
|
};
|
|
@@ -6689,7 +6734,7 @@ function clearState(node) {
|
|
|
6689
6734
|
function reset(id, resetTo) {
|
|
6690
6735
|
const node = typeof id === "string" ? getNode$1(id) : id;
|
|
6691
6736
|
if (node) {
|
|
6692
|
-
const initial = (
|
|
6737
|
+
const initial = (n) => cloneAny(n.props.initial) || (n.type === "group" ? {} : n.type === "list" ? [] : void 0);
|
|
6693
6738
|
node._e.pause(node);
|
|
6694
6739
|
node.input(cloneAny(resetTo) || initial(node), false);
|
|
6695
6740
|
node.walk((child) => child.input(initial(child), false));
|
|
@@ -6741,7 +6786,7 @@ const traps = {
|
|
|
6741
6786
|
each: trap(eachChild),
|
|
6742
6787
|
emit: trap(emit$1),
|
|
6743
6788
|
find: trap(find),
|
|
6744
|
-
on: trap(on
|
|
6789
|
+
on: trap(on),
|
|
6745
6790
|
off: trap(off),
|
|
6746
6791
|
parent: trap(false, setParent),
|
|
6747
6792
|
plugins: trap(false),
|
|
@@ -6915,6 +6960,14 @@ function define(node, context, definition) {
|
|
|
6915
6960
|
type: node.type,
|
|
6916
6961
|
value: context.value
|
|
6917
6962
|
});
|
|
6963
|
+
if (definition.forceTypeProp) {
|
|
6964
|
+
if (node.props.type)
|
|
6965
|
+
node.props.originalType = node.props.type;
|
|
6966
|
+
context.props.type = definition.forceTypeProp;
|
|
6967
|
+
}
|
|
6968
|
+
if (definition.family) {
|
|
6969
|
+
context.props.family = definition.family;
|
|
6970
|
+
}
|
|
6918
6971
|
if (definition.features) {
|
|
6919
6972
|
definition.features.forEach((feature) => feature(node));
|
|
6920
6973
|
}
|
|
@@ -7041,7 +7094,7 @@ function walkTree(_node, context, callback, stopIfFalse = false) {
|
|
|
7041
7094
|
function resetConfig(node, context) {
|
|
7042
7095
|
const parent = node.parent || void 0;
|
|
7043
7096
|
context.config = createConfig(node.config._t, parent);
|
|
7044
|
-
node.walk((
|
|
7097
|
+
node.walk((n) => n.resetConfig());
|
|
7045
7098
|
}
|
|
7046
7099
|
function use(node, context, plugin2, run2 = true, library = true) {
|
|
7047
7100
|
if (Array.isArray(plugin2) || plugin2 instanceof Set) {
|
|
@@ -7119,7 +7172,7 @@ function getNode(node, _context, locator) {
|
|
|
7119
7172
|
pointer = node;
|
|
7120
7173
|
break;
|
|
7121
7174
|
default:
|
|
7122
|
-
pointer = pointer.children.find((
|
|
7175
|
+
pointer = pointer.children.find((c) => String(c.name) === String(name)) || select$2(pointer, name);
|
|
7123
7176
|
}
|
|
7124
7177
|
}
|
|
7125
7178
|
return pointer || void 0;
|
|
@@ -7142,7 +7195,7 @@ function find(node, _context, searchTerm, searcher) {
|
|
|
7142
7195
|
return bfs(node, searchTerm, searcher);
|
|
7143
7196
|
}
|
|
7144
7197
|
function bfs(tree, searchValue, searchGoal = "name") {
|
|
7145
|
-
const search = typeof searchGoal === "string" ? (
|
|
7198
|
+
const search = typeof searchGoal === "string" ? (n) => n[searchGoal] == searchValue : searchGoal;
|
|
7146
7199
|
const stack = [tree];
|
|
7147
7200
|
while (stack.length) {
|
|
7148
7201
|
const node = stack.shift();
|
|
@@ -7152,8 +7205,8 @@ function bfs(tree, searchValue, searchGoal = "name") {
|
|
|
7152
7205
|
}
|
|
7153
7206
|
return void 0;
|
|
7154
7207
|
}
|
|
7155
|
-
function getRoot(
|
|
7156
|
-
let node =
|
|
7208
|
+
function getRoot(n) {
|
|
7209
|
+
let node = n;
|
|
7157
7210
|
while (node.parent) {
|
|
7158
7211
|
node = node.parent;
|
|
7159
7212
|
}
|
|
@@ -7203,7 +7256,7 @@ function createConfig(target = {}, parent) {
|
|
|
7203
7256
|
if (node) {
|
|
7204
7257
|
node.emit(`config:${prop}`, value, false);
|
|
7205
7258
|
configChange(node, prop, value);
|
|
7206
|
-
node.walk((
|
|
7259
|
+
node.walk((n) => configChange(n, prop, value), true);
|
|
7207
7260
|
}
|
|
7208
7261
|
return didSet;
|
|
7209
7262
|
}
|
|
@@ -7422,36 +7475,36 @@ function sugar(node) {
|
|
|
7422
7475
|
function compile(expr) {
|
|
7423
7476
|
let provideTokens;
|
|
7424
7477
|
const requirements = /* @__PURE__ */ new Set();
|
|
7425
|
-
const
|
|
7478
|
+
const x = function expand(operand, tokens) {
|
|
7426
7479
|
return typeof operand === "function" ? operand(tokens) : operand;
|
|
7427
7480
|
};
|
|
7428
7481
|
const operatorRegistry = [
|
|
7429
7482
|
{
|
|
7430
|
-
"&&": (
|
|
7431
|
-
"||": (
|
|
7483
|
+
"&&": (l, r, t) => x(l, t) && x(r, t),
|
|
7484
|
+
"||": (l, r, t) => x(l, t) || x(r, t)
|
|
7432
7485
|
},
|
|
7433
7486
|
{
|
|
7434
|
-
"===": (
|
|
7435
|
-
"!==": (
|
|
7436
|
-
"==": (
|
|
7437
|
-
"!=": (
|
|
7438
|
-
">=": (
|
|
7439
|
-
"<=": (
|
|
7440
|
-
">": (
|
|
7441
|
-
"<": (
|
|
7487
|
+
"===": (l, r, t) => !!(x(l, t) === x(r, t)),
|
|
7488
|
+
"!==": (l, r, t) => !!(x(l, t) !== x(r, t)),
|
|
7489
|
+
"==": (l, r, t) => !!(x(l, t) == x(r, t)),
|
|
7490
|
+
"!=": (l, r, t) => !!(x(l, t) != x(r, t)),
|
|
7491
|
+
">=": (l, r, t) => !!(x(l, t) >= x(r, t)),
|
|
7492
|
+
"<=": (l, r, t) => !!(x(l, t) <= x(r, t)),
|
|
7493
|
+
">": (l, r, t) => !!(x(l, t) > x(r, t)),
|
|
7494
|
+
"<": (l, r, t) => !!(x(l, t) < x(r, t))
|
|
7442
7495
|
},
|
|
7443
7496
|
{
|
|
7444
|
-
"+": (
|
|
7445
|
-
"-": (
|
|
7497
|
+
"+": (l, r, t) => x(l, t) + x(r, t),
|
|
7498
|
+
"-": (l, r, t) => x(l, t) - x(r, t)
|
|
7446
7499
|
},
|
|
7447
7500
|
{
|
|
7448
|
-
"*": (
|
|
7449
|
-
"/": (
|
|
7450
|
-
"%": (
|
|
7501
|
+
"*": (l, r, t) => x(l, t) * x(r, t),
|
|
7502
|
+
"/": (l, r, t) => x(l, t) / x(r, t),
|
|
7503
|
+
"%": (l, r, t) => x(l, t) % x(r, t)
|
|
7451
7504
|
}
|
|
7452
7505
|
];
|
|
7453
|
-
const operatorSymbols = operatorRegistry.reduce((s,
|
|
7454
|
-
return s.concat(Object.keys(
|
|
7506
|
+
const operatorSymbols = operatorRegistry.reduce((s, g) => {
|
|
7507
|
+
return s.concat(Object.keys(g));
|
|
7455
7508
|
}, []);
|
|
7456
7509
|
const operatorChars = new Set(operatorSymbols.map((key) => key.charAt(0)));
|
|
7457
7510
|
function getOp(symbols, char, p2, expression) {
|
|
@@ -7609,8 +7662,8 @@ function compile(expr) {
|
|
|
7609
7662
|
}
|
|
7610
7663
|
op = !op && left ? left : op;
|
|
7611
7664
|
if (!op && operand) {
|
|
7612
|
-
op = (v,
|
|
7613
|
-
return typeof v === "function" ? v(
|
|
7665
|
+
op = (v, t) => {
|
|
7666
|
+
return typeof v === "function" ? v(t) : v;
|
|
7614
7667
|
};
|
|
7615
7668
|
op = op.bind(null, evaluate(operand, step));
|
|
7616
7669
|
}
|
|
@@ -7636,7 +7689,7 @@ function compile(expr) {
|
|
|
7636
7689
|
if (tailCall) {
|
|
7637
7690
|
tailCall = tailCall.provide((subTokens) => {
|
|
7638
7691
|
const rootTokens = provideTokens(subTokens);
|
|
7639
|
-
const
|
|
7692
|
+
const t = subTokens.reduce((tokenSet, token2) => {
|
|
7640
7693
|
const isTail = token2 === tail || (tail === null || tail === void 0 ? void 0 : tail.startsWith(`${token2}(`));
|
|
7641
7694
|
if (isTail) {
|
|
7642
7695
|
const value = getAt(userFuncReturn, token2);
|
|
@@ -7646,7 +7699,7 @@ function compile(expr) {
|
|
|
7646
7699
|
}
|
|
7647
7700
|
return tokenSet;
|
|
7648
7701
|
}, {});
|
|
7649
|
-
return
|
|
7702
|
+
return t;
|
|
7650
7703
|
});
|
|
7651
7704
|
}
|
|
7652
7705
|
return tailCall ? tailCall() : userFuncReturn;
|
|
@@ -7729,7 +7782,7 @@ function clearErrors(id, clearChildren = true) {
|
|
|
7729
7782
|
warn(652, id);
|
|
7730
7783
|
}
|
|
7731
7784
|
}
|
|
7732
|
-
const FORMKIT_VERSION = "1.0.0-beta.
|
|
7785
|
+
const FORMKIT_VERSION = "1.0.0-beta.10";
|
|
7733
7786
|
function createLibraryPlugin(...libraries) {
|
|
7734
7787
|
const library = libraries.reduce((merged, lib) => extend(merged, lib), {});
|
|
7735
7788
|
const plugin2 = () => {
|
|
@@ -7746,8 +7799,9 @@ const outer = createSection("outer", () => ({
|
|
|
7746
7799
|
$el: "div",
|
|
7747
7800
|
attrs: {
|
|
7748
7801
|
key: "$id",
|
|
7802
|
+
"data-family": "$family || undefined",
|
|
7749
7803
|
"data-type": "$type",
|
|
7750
|
-
"data-multiple":
|
|
7804
|
+
"data-multiple": '$attrs.multiple || ($type != "select" && $options != undefined) || undefined',
|
|
7751
7805
|
"data-disabled": "$disabled || undefined",
|
|
7752
7806
|
"data-complete": "$state.complete || undefined",
|
|
7753
7807
|
"data-invalid": "$state.valid === false && $state.validationVisible || undefined",
|
|
@@ -7852,7 +7906,7 @@ const boxWrapper = createSection("wrapper", () => ({
|
|
|
7852
7906
|
"data-disabled": {
|
|
7853
7907
|
if: "$options.length",
|
|
7854
7908
|
then: void 0,
|
|
7855
|
-
else: "$disabled"
|
|
7909
|
+
else: "$disabled || undefined"
|
|
7856
7910
|
}
|
|
7857
7911
|
}
|
|
7858
7912
|
}));
|
|
@@ -7973,6 +8027,7 @@ const selectInput$1 = createSection("input", () => ({
|
|
|
7973
8027
|
disabled: "$disabled",
|
|
7974
8028
|
class: "$classes.input",
|
|
7975
8029
|
name: "$node.name",
|
|
8030
|
+
onChange: "$handlers.onChange",
|
|
7976
8031
|
onInput: "$handlers.selectInput",
|
|
7977
8032
|
onBlur: "$handlers.blur",
|
|
7978
8033
|
"aria-describedby": "$describedBy"
|
|
@@ -8107,8 +8162,8 @@ function options(node) {
|
|
|
8107
8162
|
return next(prop);
|
|
8108
8163
|
});
|
|
8109
8164
|
}
|
|
8110
|
-
function toggleChecked$1(node,
|
|
8111
|
-
const el =
|
|
8165
|
+
function toggleChecked$1(node, e) {
|
|
8166
|
+
const el = e.target;
|
|
8112
8167
|
if (el instanceof HTMLInputElement) {
|
|
8113
8168
|
const value = Array.isArray(node.props.options) ? optionValue(node.props.options, el.value) : el.value;
|
|
8114
8169
|
if (Array.isArray(node.props.options) && node.props.options.length) {
|
|
@@ -8182,19 +8237,19 @@ function localize$2(key, value) {
|
|
|
8182
8237
|
};
|
|
8183
8238
|
}
|
|
8184
8239
|
const isBrowser = typeof window !== "undefined";
|
|
8185
|
-
function removeHover(
|
|
8186
|
-
if (
|
|
8187
|
-
|
|
8240
|
+
function removeHover(e) {
|
|
8241
|
+
if (e.target instanceof HTMLElement && e.target.hasAttribute("data-file-hover")) {
|
|
8242
|
+
e.target.removeAttribute("data-file-hover");
|
|
8188
8243
|
}
|
|
8189
8244
|
}
|
|
8190
|
-
function preventStrayDrop(type,
|
|
8191
|
-
if (!(
|
|
8192
|
-
|
|
8245
|
+
function preventStrayDrop(type, e) {
|
|
8246
|
+
if (!(e.target instanceof HTMLInputElement)) {
|
|
8247
|
+
e.preventDefault();
|
|
8193
8248
|
} else if (type === "dragover") {
|
|
8194
|
-
|
|
8249
|
+
e.target.setAttribute("data-file-hover", "true");
|
|
8195
8250
|
}
|
|
8196
8251
|
if (type === "drop") {
|
|
8197
|
-
removeHover(
|
|
8252
|
+
removeHover(e);
|
|
8198
8253
|
}
|
|
8199
8254
|
}
|
|
8200
8255
|
function files(node) {
|
|
@@ -8209,14 +8264,14 @@ function files(node) {
|
|
|
8209
8264
|
window._FormKit_File_Drop = true;
|
|
8210
8265
|
}
|
|
8211
8266
|
}
|
|
8267
|
+
node.hook.input((value, next) => next(Array.isArray(value) ? value : []));
|
|
8212
8268
|
node.on("created", () => {
|
|
8213
|
-
if (!Array.isArray(node.value))
|
|
8269
|
+
if (!Array.isArray(node.value))
|
|
8214
8270
|
node.input([], false);
|
|
8215
|
-
}
|
|
8216
8271
|
if (!node.context)
|
|
8217
8272
|
return;
|
|
8218
|
-
node.context.handlers.resetFiles = (
|
|
8219
|
-
|
|
8273
|
+
node.context.handlers.resetFiles = (e) => {
|
|
8274
|
+
e.preventDefault();
|
|
8220
8275
|
node.input([]);
|
|
8221
8276
|
if (node.props.id && isBrowser) {
|
|
8222
8277
|
const el = document.getElementById(node.props.id);
|
|
@@ -8224,13 +8279,13 @@ function files(node) {
|
|
|
8224
8279
|
el.value = "";
|
|
8225
8280
|
}
|
|
8226
8281
|
};
|
|
8227
|
-
node.context.handlers.files = (
|
|
8282
|
+
node.context.handlers.files = (e) => {
|
|
8228
8283
|
var _a, _b;
|
|
8229
8284
|
const files2 = [];
|
|
8230
|
-
if (
|
|
8231
|
-
for (let i2 = 0; i2 <
|
|
8285
|
+
if (e.target instanceof HTMLInputElement && e.target.files) {
|
|
8286
|
+
for (let i2 = 0; i2 < e.target.files.length; i2++) {
|
|
8232
8287
|
let file2;
|
|
8233
|
-
if (file2 =
|
|
8288
|
+
if (file2 = e.target.files.item(i2)) {
|
|
8234
8289
|
files2.push({ name: file2.name, file: file2 });
|
|
8235
8290
|
}
|
|
8236
8291
|
}
|
|
@@ -8239,7 +8294,7 @@ function files(node) {
|
|
|
8239
8294
|
if (node.context)
|
|
8240
8295
|
node.context.files = files2;
|
|
8241
8296
|
if (typeof ((_a = node.props.attrs) === null || _a === void 0 ? void 0 : _a.onChange) === "function") {
|
|
8242
|
-
(_b = node.props.attrs) === null || _b === void 0 ? void 0 : _b.onChange(
|
|
8297
|
+
(_b = node.props.attrs) === null || _b === void 0 ? void 0 : _b.onChange(e);
|
|
8243
8298
|
}
|
|
8244
8299
|
};
|
|
8245
8300
|
});
|
|
@@ -8248,8 +8303,8 @@ function handleSubmit(node, submitEvent) {
|
|
|
8248
8303
|
return __async(this, null, function* () {
|
|
8249
8304
|
submitEvent.preventDefault();
|
|
8250
8305
|
yield node.settled;
|
|
8251
|
-
node.walk((
|
|
8252
|
-
|
|
8306
|
+
node.walk((n) => {
|
|
8307
|
+
n.store.set(createMessage({
|
|
8253
8308
|
key: "submitted",
|
|
8254
8309
|
value: true,
|
|
8255
8310
|
visible: false
|
|
@@ -8259,6 +8314,9 @@ function handleSubmit(node, submitEvent) {
|
|
|
8259
8314
|
node.props.onSubmitRaw(submitEvent, node);
|
|
8260
8315
|
}
|
|
8261
8316
|
if (node.ledger.value("blocking")) {
|
|
8317
|
+
if (typeof node.props.onSubmitInvalid === "function") {
|
|
8318
|
+
node.props.onSubmitInvalid(node);
|
|
8319
|
+
}
|
|
8262
8320
|
if (node.props.incompleteMessage !== false) {
|
|
8263
8321
|
node.store.set(createMessage({
|
|
8264
8322
|
blocking: false,
|
|
@@ -8354,9 +8412,19 @@ function isSelected(node, option2) {
|
|
|
8354
8412
|
const value = optionValue(node.props.options, option2);
|
|
8355
8413
|
return Array.isArray(node._value) ? node._value.some((optionA) => shouldSelect(optionA, value)) : node.value === void 0 && !option2 || shouldSelect(value, node._value);
|
|
8356
8414
|
}
|
|
8357
|
-
function
|
|
8358
|
-
|
|
8359
|
-
|
|
8415
|
+
function deferChange(node, e) {
|
|
8416
|
+
return __async(this, null, function* () {
|
|
8417
|
+
var _a;
|
|
8418
|
+
if (typeof ((_a = node.props.attrs) === null || _a === void 0 ? void 0 : _a.onChange) === "function") {
|
|
8419
|
+
yield new Promise((r) => setTimeout(r, 0));
|
|
8420
|
+
yield node.settled;
|
|
8421
|
+
node.props.attrs.onChange(e);
|
|
8422
|
+
}
|
|
8423
|
+
});
|
|
8424
|
+
}
|
|
8425
|
+
function selectInput(node, e) {
|
|
8426
|
+
const target = e.target;
|
|
8427
|
+
const value = target.hasAttribute("multiple") ? Array.from(target.selectedOptions).map((o) => optionValue(node.props.options, o.value)) : optionValue(node.props.options, target.value);
|
|
8360
8428
|
node.input(value);
|
|
8361
8429
|
}
|
|
8362
8430
|
function applyPlaceholder(options2, placeholder) {
|
|
@@ -8405,6 +8473,7 @@ function select$1(node) {
|
|
|
8405
8473
|
}
|
|
8406
8474
|
if ((_b = node.context) === null || _b === void 0 ? void 0 : _b.handlers) {
|
|
8407
8475
|
node.context.handlers.selectInput = selectInput.bind(null, node);
|
|
8476
|
+
node.context.handlers.onChange = deferChange.bind(null, node);
|
|
8408
8477
|
}
|
|
8409
8478
|
if ((_c = node.context) === null || _c === void 0 ? void 0 : _c.fns) {
|
|
8410
8479
|
node.context.fns.isSelected = isSelected.bind(null, node);
|
|
@@ -8513,30 +8582,38 @@ function $root(section) {
|
|
|
8513
8582
|
const button = {
|
|
8514
8583
|
schema: outer(messages(message("$message.value")), wrapper(buttonInput(icon("prefix"), prefix(), buttonLabel("$label || $ui.submit.value"), suffix(), icon("suffix"))), help("$help")),
|
|
8515
8584
|
type: "input",
|
|
8585
|
+
family: "button",
|
|
8516
8586
|
props: [],
|
|
8517
8587
|
features: [localize$2("submit"), ignore]
|
|
8518
8588
|
};
|
|
8519
8589
|
const checkbox = {
|
|
8520
|
-
schema: outer($if("$options == undefined", boxWrapper(inner(prefix(), box(), decorator(), suffix()), $if("$label", boxLabel("$label"))), fieldset(legend("$label"), help("$help"), boxOptions(boxOption(boxWrapper(inner(prefix(), $extend(box(), {
|
|
8590
|
+
schema: outer($if("$options == undefined", boxWrapper(inner(prefix(), box(), decorator(icon("decorator")), suffix()), $if("$label", boxLabel("$label"))), fieldset(legend("$label"), help("$help"), boxOptions(boxOption(boxWrapper(inner(prefix(), $extend(box(), {
|
|
8521
8591
|
bind: "$option.attrs",
|
|
8522
8592
|
attrs: {
|
|
8523
8593
|
id: "$option.attrs.id",
|
|
8524
8594
|
value: "$option.value",
|
|
8525
8595
|
checked: "$fns.isChecked($option.value)"
|
|
8526
8596
|
}
|
|
8527
|
-
}), decorator(), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options
|
|
8597
|
+
}), decorator(icon("decorator")), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options == undefined && $help", help("$help")), messages(message("$message.value"))),
|
|
8528
8598
|
type: "input",
|
|
8599
|
+
family: "box",
|
|
8529
8600
|
props: ["options", "onValue", "offValue"],
|
|
8530
|
-
features: [
|
|
8601
|
+
features: [
|
|
8602
|
+
options,
|
|
8603
|
+
checkboxes,
|
|
8604
|
+
defaultIcon("decorator", "checkboxDecorator")
|
|
8605
|
+
]
|
|
8531
8606
|
};
|
|
8532
8607
|
const file = {
|
|
8533
|
-
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), fileInput(), fileList(fileItem(icon("fileItem"), fileName("$file.name"), $if("$value.length === 1", fileRemove(icon("fileRemove"), "$ui.remove.value")))), $if("$value.length > 1", fileRemove("$ui.removeAll.value")), noFiles(icon("
|
|
8608
|
+
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), fileInput(), fileList(fileItem(icon("fileItem"), fileName("$file.name"), $if("$value.length === 1", fileRemove(icon("fileRemove"), "$ui.remove.value")))), $if("$value.length > 1", fileRemove("$ui.removeAll.value")), noFiles(icon("noFiles"), "$ui.noFiles.value"), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
8534
8609
|
type: "input",
|
|
8610
|
+
family: "text",
|
|
8535
8611
|
props: [],
|
|
8536
8612
|
features: [
|
|
8537
8613
|
files,
|
|
8538
|
-
defaultIcon("fileItem", "
|
|
8539
|
-
defaultIcon("fileRemove", "
|
|
8614
|
+
defaultIcon("fileItem", "fileItem"),
|
|
8615
|
+
defaultIcon("fileRemove", "fileRemove"),
|
|
8616
|
+
defaultIcon("noFiles", "noFiles")
|
|
8540
8617
|
]
|
|
8541
8618
|
};
|
|
8542
8619
|
const form = {
|
|
@@ -8571,23 +8648,24 @@ const list$1 = {
|
|
|
8571
8648
|
features: [disables]
|
|
8572
8649
|
};
|
|
8573
8650
|
const radio = {
|
|
8574
|
-
schema: outer($if("$options == undefined", boxWrapper(inner(prefix(), box(), decorator(), suffix()), $if("$label", boxLabel("$label"))), fieldset(legend("$label"), help("$help"), boxOptions(boxOption(boxWrapper(inner(prefix(), $extend(box(), {
|
|
8651
|
+
schema: outer($if("$options == undefined", boxWrapper(inner(prefix(), box(), decorator(icon("decorator")), suffix()), $if("$label", boxLabel("$label"))), fieldset(legend("$label"), help("$help"), boxOptions(boxOption(boxWrapper(inner(prefix(), $extend(box(), {
|
|
8575
8652
|
bind: "$option.attrs",
|
|
8576
8653
|
attrs: {
|
|
8577
8654
|
id: "$option.attrs.id",
|
|
8578
8655
|
value: "$option.value",
|
|
8579
8656
|
checked: "$fns.isChecked($option.value)"
|
|
8580
8657
|
}
|
|
8581
|
-
}), decorator(), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options
|
|
8658
|
+
}), decorator(icon("decorator")), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options == undefined && $help", help("$help")), messages(message("$message.value"))),
|
|
8582
8659
|
type: "input",
|
|
8660
|
+
family: "box",
|
|
8583
8661
|
props: ["options", "onValue", "offValue"],
|
|
8584
|
-
features: [options, radios]
|
|
8662
|
+
features: [options, radios, defaultIcon("decorator", "radioDecorator")]
|
|
8585
8663
|
};
|
|
8586
8664
|
const select = {
|
|
8587
|
-
schema: outer(wrapper(label("$label"), inner(icon("prefix"), prefix(), selectInput$1($if("$slots.default", () => "$slots.default", $if("$slots.option", optionSlot, option("$option.label")))), icon("select"), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
8665
|
+
schema: outer(wrapper(label("$label"), inner(icon("prefix"), prefix(), selectInput$1($if("$slots.default", () => "$slots.default", $if("$slots.option", optionSlot, option("$option.label")))), $if("$attrs.multiple !== undefined", () => "", icon("select")), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
8588
8666
|
type: "input",
|
|
8589
8667
|
props: ["options", "placeholder"],
|
|
8590
|
-
features: [options, select$1, defaultIcon("select", "
|
|
8668
|
+
features: [options, select$1, defaultIcon("select", "select")]
|
|
8591
8669
|
};
|
|
8592
8670
|
const textarea = {
|
|
8593
8671
|
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textareaInput(), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
@@ -8598,6 +8676,7 @@ const textarea = {
|
|
|
8598
8676
|
const text = {
|
|
8599
8677
|
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textInput(), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
8600
8678
|
type: "input",
|
|
8679
|
+
family: "text",
|
|
8601
8680
|
props: [],
|
|
8602
8681
|
features: []
|
|
8603
8682
|
};
|
|
@@ -8671,8 +8750,8 @@ const between = function between2({ value }, from, to) {
|
|
|
8671
8750
|
const val = 1 * value;
|
|
8672
8751
|
from = Number(from);
|
|
8673
8752
|
to = Number(to);
|
|
8674
|
-
const [
|
|
8675
|
-
return val >= 1 *
|
|
8753
|
+
const [a, b] = from <= to ? [from, to] : [to, from];
|
|
8754
|
+
return val >= 1 * a && val <= 1 * b;
|
|
8676
8755
|
}
|
|
8677
8756
|
return false;
|
|
8678
8757
|
};
|
|
@@ -8791,7 +8870,7 @@ const url = function url2({ value }, ...stack) {
|
|
|
8791
8870
|
const protocols = stack.length ? stack : ["http:", "https:"];
|
|
8792
8871
|
const url3 = new URL(String(value));
|
|
8793
8872
|
return protocols.includes(url3.protocol);
|
|
8794
|
-
} catch (
|
|
8873
|
+
} catch (e) {
|
|
8795
8874
|
return false;
|
|
8796
8875
|
}
|
|
8797
8876
|
};
|
|
@@ -9050,7 +9129,7 @@ function run(current, validations, node, state, removeImmediately, complete) {
|
|
|
9050
9129
|
if ((!empty(node.value) || !validation.skipEmpty) && (state.isPassing || validation.force)) {
|
|
9051
9130
|
if (validation.queued) {
|
|
9052
9131
|
runRule(validation, node, (result) => {
|
|
9053
|
-
result instanceof Promise ? result.then((
|
|
9132
|
+
result instanceof Promise ? result.then((r) => next(true, r)) : next(false, result);
|
|
9054
9133
|
});
|
|
9055
9134
|
} else {
|
|
9056
9135
|
run(current + 1, validations, node, state, removeImmediately, complete);
|
|
@@ -9247,7 +9326,7 @@ function date2(date3) {
|
|
|
9247
9326
|
function order(first, second) {
|
|
9248
9327
|
return Number(first) >= Number(second) ? [second, first] : [first, second];
|
|
9249
9328
|
}
|
|
9250
|
-
const ui$
|
|
9329
|
+
const ui$s = {
|
|
9251
9330
|
add: "Add",
|
|
9252
9331
|
remove: "Remove",
|
|
9253
9332
|
removeAll: "Remove all",
|
|
@@ -9255,7 +9334,7 @@ const ui$q = {
|
|
|
9255
9334
|
submit: "Submit",
|
|
9256
9335
|
noFiles: "No file chosen"
|
|
9257
9336
|
};
|
|
9258
|
-
const validation$
|
|
9337
|
+
const validation$s = {
|
|
9259
9338
|
accepted({ name }) {
|
|
9260
9339
|
return `Please accept the ${name}.`;
|
|
9261
9340
|
},
|
|
@@ -9284,8 +9363,8 @@ const validation$q = {
|
|
|
9284
9363
|
if (isNaN(args[0]) || isNaN(args[1])) {
|
|
9285
9364
|
return `This field was configured incorrectly and can\u2019t be submitted.`;
|
|
9286
9365
|
}
|
|
9287
|
-
const [
|
|
9288
|
-
return `${sentence(name)} must be between ${
|
|
9366
|
+
const [a, b] = order(args[0], args[1]);
|
|
9367
|
+
return `${sentence(name)} must be between ${a} and ${b}.`;
|
|
9289
9368
|
},
|
|
9290
9369
|
confirm({ name }) {
|
|
9291
9370
|
return `${sentence(name)} does not match.`;
|
|
@@ -9359,8 +9438,8 @@ const validation$q = {
|
|
|
9359
9438
|
};
|
|
9360
9439
|
var en = /* @__PURE__ */ Object.freeze({
|
|
9361
9440
|
__proto__: null,
|
|
9362
|
-
ui: ui$
|
|
9363
|
-
validation: validation$
|
|
9441
|
+
ui: ui$s,
|
|
9442
|
+
validation: validation$s
|
|
9364
9443
|
});
|
|
9365
9444
|
function createI18nPlugin(registry2) {
|
|
9366
9445
|
return function i18nPlugin(node) {
|
|
@@ -9377,11 +9456,11 @@ function createI18nPlugin(registry2) {
|
|
|
9377
9456
|
var _a, _b;
|
|
9378
9457
|
const key = ((_a = fragment2.meta) === null || _a === void 0 ? void 0 : _a.messageKey) || fragment2.key;
|
|
9379
9458
|
if (has(locale2, fragment2.type) && has(locale2[fragment2.type], key)) {
|
|
9380
|
-
const
|
|
9381
|
-
if (typeof
|
|
9382
|
-
fragment2.value = Array.isArray((_b = fragment2.meta) === null || _b === void 0 ? void 0 : _b.i18nArgs) ?
|
|
9459
|
+
const t = locale2[fragment2.type][key];
|
|
9460
|
+
if (typeof t === "function") {
|
|
9461
|
+
fragment2.value = Array.isArray((_b = fragment2.meta) === null || _b === void 0 ? void 0 : _b.i18nArgs) ? t(...fragment2.meta.i18nArgs) : t(fragment2);
|
|
9383
9462
|
} else {
|
|
9384
|
-
fragment2.value =
|
|
9463
|
+
fragment2.value = t;
|
|
9385
9464
|
}
|
|
9386
9465
|
}
|
|
9387
9466
|
return next(fragment2);
|
|
@@ -9424,10 +9503,14 @@ function generateClasses(classes) {
|
|
|
9424
9503
|
}
|
|
9425
9504
|
function addClassesBySection(node, _sectionKey, classesByType) {
|
|
9426
9505
|
const type = node.props.type;
|
|
9506
|
+
const family = node.props.family;
|
|
9427
9507
|
let classList = "";
|
|
9428
9508
|
if (classesByType.global) {
|
|
9429
9509
|
classList += classesByType.global + " ";
|
|
9430
9510
|
}
|
|
9511
|
+
if (classesByType[`family:${family}`]) {
|
|
9512
|
+
classList += classesByType[`family:${family}`] + " ";
|
|
9513
|
+
}
|
|
9431
9514
|
if (classesByType[type]) {
|
|
9432
9515
|
classList += classesByType[type];
|
|
9433
9516
|
}
|
|
@@ -9476,8 +9559,8 @@ function createThemePlugin(theme2, icons, iconLoaderUrl, iconLoader) {
|
|
|
9476
9559
|
const clickHandlerProp = `on${sectionKey.charAt(0).toUpperCase()}${sectionKey.slice(1)}IconClick`;
|
|
9477
9560
|
const handlerFunction = node.props[clickHandlerProp];
|
|
9478
9561
|
if (handlerFunction && typeof handlerFunction === "function") {
|
|
9479
|
-
return (
|
|
9480
|
-
return handlerFunction(node,
|
|
9562
|
+
return (e) => {
|
|
9563
|
+
return handlerFunction(node, e);
|
|
9481
9564
|
};
|
|
9482
9565
|
}
|
|
9483
9566
|
return void 0;
|
|
@@ -9579,14 +9662,14 @@ function getRemoteIcon(iconName, iconLoaderUrl) {
|
|
|
9579
9662
|
const fetchUrl = typeof iconLoaderUrl === "function" ? iconLoaderUrl(iconName) : `https://cdn.jsdelivr.net/npm/@formkit/icons@${formkitVersion}/dist/icons/${iconName}.svg`;
|
|
9580
9663
|
if (!isClient)
|
|
9581
9664
|
return void 0;
|
|
9582
|
-
return fetch(`${fetchUrl}`).then((
|
|
9583
|
-
const icon2 = yield
|
|
9665
|
+
return fetch(`${fetchUrl}`).then((r) => __async(this, null, function* () {
|
|
9666
|
+
const icon2 = yield r.text();
|
|
9584
9667
|
if (icon2.startsWith("<svg")) {
|
|
9585
9668
|
return icon2;
|
|
9586
9669
|
}
|
|
9587
9670
|
return void 0;
|
|
9588
|
-
})).catch((
|
|
9589
|
-
console.error(
|
|
9671
|
+
})).catch((e) => {
|
|
9672
|
+
console.error(e);
|
|
9590
9673
|
return void 0;
|
|
9591
9674
|
});
|
|
9592
9675
|
}
|
|
@@ -9741,25 +9824,25 @@ function parseSchema(library, schema) {
|
|
|
9741
9824
|
function parseConditionAttr(attr, _default2) {
|
|
9742
9825
|
var _a, _b;
|
|
9743
9826
|
const condition = provider(compile(attr.if));
|
|
9744
|
-
let
|
|
9745
|
-
let
|
|
9827
|
+
let b = () => _default2;
|
|
9828
|
+
let a = () => _default2;
|
|
9746
9829
|
if (typeof attr.then === "object") {
|
|
9747
|
-
|
|
9830
|
+
a = parseAttrs(attr.then, void 0);
|
|
9748
9831
|
} else if (typeof attr.then === "string" && ((_a = attr.then) === null || _a === void 0 ? void 0 : _a.startsWith("$"))) {
|
|
9749
|
-
|
|
9832
|
+
a = provider(compile(attr.then));
|
|
9750
9833
|
} else {
|
|
9751
|
-
|
|
9834
|
+
a = () => attr.then;
|
|
9752
9835
|
}
|
|
9753
9836
|
if (has(attr, "else")) {
|
|
9754
9837
|
if (typeof attr.else === "object") {
|
|
9755
|
-
|
|
9838
|
+
b = parseAttrs(attr.else);
|
|
9756
9839
|
} else if (typeof attr.else === "string" && ((_b = attr.else) === null || _b === void 0 ? void 0 : _b.startsWith("$"))) {
|
|
9757
|
-
|
|
9840
|
+
b = provider(compile(attr.else));
|
|
9758
9841
|
} else {
|
|
9759
|
-
|
|
9842
|
+
b = () => attr.else;
|
|
9760
9843
|
}
|
|
9761
9844
|
}
|
|
9762
|
-
return () => condition() ?
|
|
9845
|
+
return () => condition() ? a() : b();
|
|
9763
9846
|
}
|
|
9764
9847
|
function parseAttrs(unparsedAttrs, bindExp, _default2 = {}) {
|
|
9765
9848
|
const explicitAttrs = new Set(Object.keys(unparsedAttrs || {}));
|
|
@@ -9801,7 +9884,7 @@ function parseSchema(library, schema) {
|
|
|
9801
9884
|
}
|
|
9802
9885
|
}
|
|
9803
9886
|
return () => {
|
|
9804
|
-
const attrs = {};
|
|
9887
|
+
const attrs = Array.isArray(unparsedAttrs) ? [] : {};
|
|
9805
9888
|
setters.forEach((setter) => setter(attrs));
|
|
9806
9889
|
return attrs;
|
|
9807
9890
|
};
|
|
@@ -9852,8 +9935,8 @@ function parseSchema(library, schema) {
|
|
|
9852
9935
|
} else if (Array.isArray(node.children)) {
|
|
9853
9936
|
children = createElements(library2, node.children);
|
|
9854
9937
|
} else {
|
|
9855
|
-
const [childCondition,
|
|
9856
|
-
children = (iterationData) => childCondition && childCondition() ?
|
|
9938
|
+
const [childCondition, c, a] = parseCondition2(library2, node.children);
|
|
9939
|
+
children = (iterationData) => childCondition && childCondition() ? c && c(iterationData) : a && a(iterationData);
|
|
9857
9940
|
}
|
|
9858
9941
|
}
|
|
9859
9942
|
if (isComponent$1(node)) {
|
|
@@ -9870,13 +9953,13 @@ function parseSchema(library, schema) {
|
|
|
9870
9953
|
(_a = instanceScopes.get(instanceKey)) === null || _a === void 0 ? void 0 : _a.unshift(slotData2);
|
|
9871
9954
|
if (iterationData)
|
|
9872
9955
|
(_b = instanceScopes.get(instanceKey)) === null || _b === void 0 ? void 0 : _b.unshift(iterationData);
|
|
9873
|
-
const
|
|
9956
|
+
const c = produceChildren(iterationData);
|
|
9874
9957
|
if (slotData2)
|
|
9875
9958
|
(_c = instanceScopes.get(instanceKey)) === null || _c === void 0 ? void 0 : _c.shift();
|
|
9876
9959
|
if (iterationData)
|
|
9877
9960
|
(_d = instanceScopes.get(instanceKey)) === null || _d === void 0 ? void 0 : _d.shift();
|
|
9878
9961
|
instanceKey = currentKey;
|
|
9879
|
-
return
|
|
9962
|
+
return c;
|
|
9880
9963
|
}
|
|
9881
9964
|
};
|
|
9882
9965
|
};
|
|
@@ -9921,7 +10004,7 @@ function parseSchema(library, schema) {
|
|
|
9921
10004
|
return children(iterationData);
|
|
9922
10005
|
const el = resolve2 ? resolveComponent(element) : element;
|
|
9923
10006
|
const slots = (children === null || children === void 0 ? void 0 : children.slot) ? createSlots(children, iterationData) : null;
|
|
9924
|
-
return h
|
|
10007
|
+
return h(el, attrs(), slots || (children ? children(iterationData) : []));
|
|
9925
10008
|
}
|
|
9926
10009
|
return typeof alternate === "function" ? alternate(iterationData) : alternate;
|
|
9927
10010
|
};
|
|
@@ -10027,7 +10110,7 @@ function createRenderFn(instanceCreator, data, instanceKey2) {
|
|
|
10027
10110
|
}, {});
|
|
10028
10111
|
}, instanceKey2);
|
|
10029
10112
|
}
|
|
10030
|
-
let i
|
|
10113
|
+
let i = 0;
|
|
10031
10114
|
const FormKitSchema = defineComponent({
|
|
10032
10115
|
name: "FormKitSchema",
|
|
10033
10116
|
props: {
|
|
@@ -10046,14 +10129,14 @@ const FormKitSchema = defineComponent({
|
|
|
10046
10129
|
},
|
|
10047
10130
|
setup(props2, context) {
|
|
10048
10131
|
const instance = getCurrentInstance();
|
|
10049
|
-
let instanceKey2 = Symbol(String(i
|
|
10132
|
+
let instanceKey2 = Symbol(String(i++));
|
|
10050
10133
|
instanceScopes.set(instanceKey2, []);
|
|
10051
10134
|
let provider = parseSchema(props2.library, props2.schema);
|
|
10052
10135
|
let render2;
|
|
10053
10136
|
let data;
|
|
10054
10137
|
watch$1(() => props2.schema, (newSchema, oldSchema) => {
|
|
10055
10138
|
var _a;
|
|
10056
|
-
instanceKey2 = Symbol(String(i
|
|
10139
|
+
instanceKey2 = Symbol(String(i++));
|
|
10057
10140
|
provider = parseSchema(props2.library, props2.schema);
|
|
10058
10141
|
render2 = createRenderFn(provider, data, instanceKey2);
|
|
10059
10142
|
if (newSchema === oldSchema) {
|
|
@@ -10148,7 +10231,8 @@ const FormKit = defineComponent({
|
|
|
10148
10231
|
"update:modelValue": (_value) => true,
|
|
10149
10232
|
node: (node) => !!node,
|
|
10150
10233
|
submit: (_data, _node) => true,
|
|
10151
|
-
submitRaw: (_event, _node) => true
|
|
10234
|
+
submitRaw: (_event, _node) => true,
|
|
10235
|
+
submitInvalid: (_node) => true
|
|
10152
10236
|
},
|
|
10153
10237
|
inheritAttrs: false,
|
|
10154
10238
|
setup(props2, context) {
|
|
@@ -10158,7 +10242,7 @@ const FormKit = defineComponent({
|
|
|
10158
10242
|
if (node.props.definition.component) {
|
|
10159
10243
|
return () => {
|
|
10160
10244
|
var _a;
|
|
10161
|
-
return h
|
|
10245
|
+
return h((_a = node.props.definition) === null || _a === void 0 ? void 0 : _a.component, {
|
|
10162
10246
|
context: node.context
|
|
10163
10247
|
}, __spreadValues({}, context.slots));
|
|
10164
10248
|
};
|
|
@@ -10176,7 +10260,7 @@ const FormKit = defineComponent({
|
|
|
10176
10260
|
context.emit("node", node);
|
|
10177
10261
|
const library = node.props.definition.library;
|
|
10178
10262
|
context.expose({ node });
|
|
10179
|
-
return () => h
|
|
10263
|
+
return () => h(FormKitSchema, { schema: schema.value, data: node.context, library }, __spreadValues({}, context.slots));
|
|
10180
10264
|
}
|
|
10181
10265
|
});
|
|
10182
10266
|
function createPlugin$4(app, options2) {
|
|
@@ -10331,7 +10415,7 @@ function classesToNodeProps(node, props2) {
|
|
|
10331
10415
|
function onlyListeners(props2) {
|
|
10332
10416
|
if (!props2)
|
|
10333
10417
|
return {};
|
|
10334
|
-
const knownListeners = ["Submit", "SubmitRaw"].reduce((listeners, listener) => {
|
|
10418
|
+
const knownListeners = ["Submit", "SubmitRaw", "SubmitInvalid"].reduce((listeners, listener) => {
|
|
10335
10419
|
const name = `on${listener}`;
|
|
10336
10420
|
if (name in props2) {
|
|
10337
10421
|
if (typeof props2[name] === "function") {
|
|
@@ -10516,9 +10600,9 @@ function createInput(schemaOrComponent, definitionOptions = {}) {
|
|
|
10516
10600
|
return definition;
|
|
10517
10601
|
}
|
|
10518
10602
|
const vueBindings = function vueBindings2(node) {
|
|
10519
|
-
node.ledger.count("blocking", (
|
|
10603
|
+
node.ledger.count("blocking", (m) => m.blocking);
|
|
10520
10604
|
const isValid2 = ref(!node.ledger.value("blocking"));
|
|
10521
|
-
node.ledger.count("errors", (
|
|
10605
|
+
node.ledger.count("errors", (m) => m.type === "error");
|
|
10522
10606
|
const hasErrors = ref(!!node.ledger.value("errors"));
|
|
10523
10607
|
let hasTicked = false;
|
|
10524
10608
|
nextTick(() => {
|
|
@@ -10620,18 +10704,18 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10620
10704
|
eq
|
|
10621
10705
|
},
|
|
10622
10706
|
handlers: {
|
|
10623
|
-
blur: (
|
|
10707
|
+
blur: (e) => {
|
|
10624
10708
|
node.store.set(createMessage({ key: "blurred", visible: false, value: true }));
|
|
10625
10709
|
if (typeof node.props.attrs.onBlur === "function") {
|
|
10626
|
-
node.props.attrs.onBlur(
|
|
10710
|
+
node.props.attrs.onBlur(e);
|
|
10627
10711
|
}
|
|
10628
10712
|
},
|
|
10629
10713
|
touch: () => {
|
|
10630
10714
|
node.store.set(createMessage({ key: "dirty", visible: false, value: true }));
|
|
10631
10715
|
},
|
|
10632
|
-
DOMInput: (
|
|
10633
|
-
node.input(
|
|
10634
|
-
node.emit("dom-input-event",
|
|
10716
|
+
DOMInput: (e) => {
|
|
10717
|
+
node.input(e.target.value);
|
|
10718
|
+
node.emit("dom-input-event", e);
|
|
10635
10719
|
}
|
|
10636
10720
|
},
|
|
10637
10721
|
help: node.props.help,
|
|
@@ -10652,6 +10736,7 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10652
10736
|
validationVisible
|
|
10653
10737
|
},
|
|
10654
10738
|
type: node.props.type,
|
|
10739
|
+
family: node.props.family,
|
|
10655
10740
|
ui,
|
|
10656
10741
|
value,
|
|
10657
10742
|
classes
|
|
@@ -10663,6 +10748,7 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10663
10748
|
triggerRef(value);
|
|
10664
10749
|
triggerRef(_value);
|
|
10665
10750
|
}
|
|
10751
|
+
node.props._init = cloneAny(node.value);
|
|
10666
10752
|
});
|
|
10667
10753
|
node.on("settled", ({ payload: isSettled }) => {
|
|
10668
10754
|
context.state.settled = isSettled;
|
|
@@ -10711,7 +10797,7 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10711
10797
|
value.value = _value.value = payload;
|
|
10712
10798
|
triggerRef(value);
|
|
10713
10799
|
node.emit("modelUpdated");
|
|
10714
|
-
if (!context.state.dirty && node.isCreated && hasTicked)
|
|
10800
|
+
if (!context.state.dirty && node.isCreated && hasTicked && !eq(value.value, node.props._init))
|
|
10715
10801
|
context.handlers.touch();
|
|
10716
10802
|
if (isComplete && node.type === "input" && hasErrors.value && !undefine(node.props.preserveErrors)) {
|
|
10717
10803
|
node.store.filter((message2) => {
|
|
@@ -10729,8 +10815,8 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10729
10815
|
context.state[message2.key] = !!message2.value;
|
|
10730
10816
|
}
|
|
10731
10817
|
});
|
|
10732
|
-
node.on("message-added", (
|
|
10733
|
-
node.on("message-updated", (
|
|
10818
|
+
node.on("message-added", (e) => updateState(e.payload));
|
|
10819
|
+
node.on("message-updated", (e) => updateState(e.payload));
|
|
10734
10820
|
node.on("message-removed", ({ payload: message2 }) => {
|
|
10735
10821
|
delete ui[message2.key];
|
|
10736
10822
|
delete availableMessages[message2.key];
|
|
@@ -10767,6 +10853,7 @@ const defaultConfig = (options2 = {}) => {
|
|
|
10767
10853
|
}, !locale2 ? {} : { config: { locale: locale2 } }), nodeOptions || {}, true);
|
|
10768
10854
|
};
|
|
10769
10855
|
defineComponent({
|
|
10856
|
+
name: "FormKitIcon",
|
|
10770
10857
|
props: {
|
|
10771
10858
|
icon: {
|
|
10772
10859
|
type: String,
|
|
@@ -10813,7 +10900,7 @@ defineComponent({
|
|
|
10813
10900
|
}
|
|
10814
10901
|
return () => {
|
|
10815
10902
|
if (icon2.value) {
|
|
10816
|
-
return h
|
|
10903
|
+
return h("span", {
|
|
10817
10904
|
class: "formkit-icon",
|
|
10818
10905
|
innerHTML: icon2.value
|
|
10819
10906
|
});
|
|
@@ -10910,207 +10997,8 @@ plugin(({ addVariant }) => {
|
|
|
10910
10997
|
'[data-message-type="error"]&'
|
|
10911
10998
|
]);
|
|
10912
10999
|
});
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
var $ = typeof window != "undefined";
|
|
10916
|
-
F$1.versions != null && F$1.versions.node != null;
|
|
10917
|
-
typeof Deno != "undefined" && Deno.core !== void 0;
|
|
10918
|
-
$ && window.name === "nodejs" || typeof navigator != "undefined" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
10919
|
-
function M(n2, t2) {
|
|
10920
|
-
return t2.charAt(0)[n2]() + t2.slice(1);
|
|
10921
|
-
}
|
|
10922
|
-
var U = M.bind(null, "toUpperCase"), H = M.bind(null, "toLowerCase");
|
|
10923
|
-
function J(n2) {
|
|
10924
|
-
return Y(n2) ? U("null") : typeof n2 == "object" ? yn(n2) : Object.prototype.toString.call(n2).slice(8, -1);
|
|
10925
|
-
}
|
|
10926
|
-
function R(n2, t2) {
|
|
10927
|
-
t2 === void 0 && (t2 = true);
|
|
10928
|
-
var e2 = J(n2);
|
|
10929
|
-
return t2 ? H(e2) : e2;
|
|
10930
|
-
}
|
|
10931
|
-
function V(n2, t2) {
|
|
10932
|
-
return typeof t2 === n2;
|
|
10933
|
-
}
|
|
10934
|
-
var W = V.bind(null, "function"), q = V.bind(null, "string"), I$1 = V.bind(null, "undefined");
|
|
10935
|
-
V.bind(null, "boolean");
|
|
10936
|
-
V.bind(null, "symbol");
|
|
10937
|
-
function Y(n2) {
|
|
10938
|
-
return n2 === null;
|
|
10939
|
-
}
|
|
10940
|
-
function nn(n2) {
|
|
10941
|
-
return R(n2) === "number" && !isNaN(n2);
|
|
10942
|
-
}
|
|
10943
|
-
function on(n2) {
|
|
10944
|
-
if (!un(n2))
|
|
10945
|
-
return false;
|
|
10946
|
-
for (var t2 = n2; Object.getPrototypeOf(t2) !== null; )
|
|
10947
|
-
t2 = Object.getPrototypeOf(t2);
|
|
10948
|
-
return Object.getPrototypeOf(n2) === t2;
|
|
10949
|
-
}
|
|
10950
|
-
function un(n2) {
|
|
10951
|
-
return n2 && (typeof n2 == "object" || n2 !== null);
|
|
10952
|
-
}
|
|
10953
|
-
function yn(n2) {
|
|
10954
|
-
return W(n2.constructor) ? n2.constructor.name : null;
|
|
10955
|
-
}
|
|
10956
|
-
function hn(n2) {
|
|
10957
|
-
return n2 instanceof Error || q(n2.message) && n2.constructor && nn(n2.constructor.stackTraceLimit);
|
|
10958
|
-
}
|
|
10959
|
-
function On(n2, t2) {
|
|
10960
|
-
if (typeof t2 != "object" || Y(t2))
|
|
10961
|
-
return false;
|
|
10962
|
-
if (t2 instanceof n2)
|
|
10963
|
-
return true;
|
|
10964
|
-
var e2 = R(new n2(""));
|
|
10965
|
-
if (hn(t2))
|
|
10966
|
-
for (; t2; ) {
|
|
10967
|
-
if (R(t2) === e2)
|
|
10968
|
-
return true;
|
|
10969
|
-
t2 = Object.getPrototypeOf(t2);
|
|
10970
|
-
}
|
|
10971
|
-
return false;
|
|
10972
|
-
}
|
|
10973
|
-
On.bind(null, TypeError);
|
|
10974
|
-
On.bind(null, SyntaxError);
|
|
10975
|
-
function $n(n2, t2) {
|
|
10976
|
-
var e2 = n2 instanceof Element || n2 instanceof HTMLDocument;
|
|
10977
|
-
return e2 && t2 ? Tn(n2, t2) : e2;
|
|
10978
|
-
}
|
|
10979
|
-
function Tn(n2, t2) {
|
|
10980
|
-
return t2 === void 0 && (t2 = ""), n2 && n2.nodeName === t2.toUpperCase();
|
|
10981
|
-
}
|
|
10982
|
-
function _n(n2) {
|
|
10983
|
-
var t2 = [].slice.call(arguments, 1);
|
|
10984
|
-
return function() {
|
|
10985
|
-
return n2.apply(void 0, [].slice.call(arguments).concat(t2));
|
|
10986
|
-
};
|
|
10987
|
-
}
|
|
10988
|
-
_n($n, "form");
|
|
10989
|
-
_n($n, "button");
|
|
10990
|
-
_n($n, "input");
|
|
10991
|
-
_n($n, "select");
|
|
10992
|
-
var l = "global", o = j + "global" + j, n = typeof self === o$1 && self.self === self && self || typeof global === o$1 && global.global === global && global || void 0;
|
|
10993
|
-
function a$2(t2) {
|
|
10994
|
-
return n[o][t2];
|
|
10995
|
-
}
|
|
10996
|
-
function f(t2, e2) {
|
|
10997
|
-
return n[o][t2] = e2;
|
|
10998
|
-
}
|
|
10999
|
-
function i$2(t2) {
|
|
11000
|
-
delete n[o][t2];
|
|
11001
|
-
}
|
|
11002
|
-
function u$1(t2, e2, r2) {
|
|
11003
|
-
var l2;
|
|
11004
|
-
try {
|
|
11005
|
-
if (b(t2)) {
|
|
11006
|
-
var o2 = window[t2];
|
|
11007
|
-
l2 = o2[e2].bind(o2);
|
|
11008
|
-
}
|
|
11009
|
-
} catch (t3) {
|
|
11010
|
-
}
|
|
11011
|
-
return l2 || r2;
|
|
11012
|
-
}
|
|
11013
|
-
n[o] || (n[o] = {});
|
|
11014
|
-
var c$1 = {};
|
|
11015
|
-
function b(t2) {
|
|
11016
|
-
if (typeof c$1[t2] !== e)
|
|
11017
|
-
return c$1[t2];
|
|
11018
|
-
try {
|
|
11019
|
-
var e$1 = window[t2];
|
|
11020
|
-
e$1.setItem(e, e), e$1.removeItem(e);
|
|
11021
|
-
} catch (e2) {
|
|
11022
|
-
return c$1[t2] = false;
|
|
11023
|
-
}
|
|
11024
|
-
return c$1[t2] = true;
|
|
11025
|
-
}
|
|
11026
|
-
var t = "cookie", i$1 = a$1(), r$1 = d$1, c = d$1;
|
|
11027
|
-
function u(o2) {
|
|
11028
|
-
return i$1 ? d$1(o2, "", -1) : i$2(o2);
|
|
11029
|
-
}
|
|
11030
|
-
function a$1() {
|
|
11031
|
-
if (i$1 !== void 0)
|
|
11032
|
-
return i$1;
|
|
11033
|
-
var e2 = "cookiecookie";
|
|
11034
|
-
try {
|
|
11035
|
-
d$1(e2, e2), i$1 = document.cookie.indexOf(e2) !== -1, u(e2);
|
|
11036
|
-
} catch (e3) {
|
|
11037
|
-
i$1 = false;
|
|
11038
|
-
}
|
|
11039
|
-
return i$1;
|
|
11040
|
-
}
|
|
11041
|
-
function d$1(e2, t2, r2, c2, u2, a2) {
|
|
11042
|
-
if (typeof window != "undefined") {
|
|
11043
|
-
var d2 = arguments.length > 1;
|
|
11044
|
-
return i$1 === false && (d2 ? f(e2, t2) : a$2(e2)), d2 ? document.cookie = e2 + "=" + encodeURIComponent(t2) + (r2 ? "; expires=" + new Date(+new Date() + 1e3 * r2).toUTCString() + (c2 ? "; path=" + c2 : "") + (u2 ? "; domain=" + u2 : "") + (a2 ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + e2 + "=")[1] || "").split(";")[0]);
|
|
11045
|
-
}
|
|
11046
|
-
}
|
|
11047
|
-
var r = "localStorage", g = b.bind(null, "localStorage");
|
|
11048
|
-
u$1("localStorage", "getItem", a$2);
|
|
11049
|
-
u$1("localStorage", "setItem", f);
|
|
11050
|
-
u$1("localStorage", "removeItem", i$2);
|
|
11051
|
-
var a = "sessionStorage", i = b.bind(null, "sessionStorage");
|
|
11052
|
-
u$1("sessionStorage", "getItem", a$2);
|
|
11053
|
-
u$1("sessionStorage", "setItem", f);
|
|
11054
|
-
u$1("sessionStorage", "removeItem", i$2);
|
|
11055
|
-
function I(t2) {
|
|
11056
|
-
var o2 = t2;
|
|
11057
|
-
try {
|
|
11058
|
-
if ((o2 = JSON.parse(t2)) === "true")
|
|
11059
|
-
return true;
|
|
11060
|
-
if (o2 === "false")
|
|
11061
|
-
return false;
|
|
11062
|
-
if (on(o2))
|
|
11063
|
-
return o2;
|
|
11064
|
-
parseFloat(o2) === o2 && (o2 = parseFloat(o2));
|
|
11065
|
-
} catch (t3) {
|
|
11066
|
-
}
|
|
11067
|
-
if (o2 !== null && o2 !== "")
|
|
11068
|
-
return o2;
|
|
11069
|
-
}
|
|
11070
|
-
var k = g(), O = i(), x = a$1();
|
|
11071
|
-
function C(o2, e2) {
|
|
11072
|
-
if (o2) {
|
|
11073
|
-
var r2 = A(e2), a2 = !N(r2), i2 = d(r2) ? I(localStorage.getItem(o2)) : void 0;
|
|
11074
|
-
if (a2 && !I$1(i2))
|
|
11075
|
-
return i2;
|
|
11076
|
-
var n2 = h(r2) ? I(r$1(o2)) : void 0;
|
|
11077
|
-
if (a2 && n2)
|
|
11078
|
-
return n2;
|
|
11079
|
-
var l2 = E(r2) ? I(sessionStorage.getItem(o2)) : void 0;
|
|
11080
|
-
if (a2 && l2)
|
|
11081
|
-
return l2;
|
|
11082
|
-
var u2 = a$2(o2);
|
|
11083
|
-
return a2 ? u2 : { localStorage: i2, sessionStorage: l2, cookie: n2, global: u2 };
|
|
11084
|
-
}
|
|
11085
|
-
}
|
|
11086
|
-
function L(r$2, a$12, l$1) {
|
|
11087
|
-
if (r$2 && !I$1(a$12)) {
|
|
11088
|
-
var u2 = {}, g2 = A(l$1), m2 = JSON.stringify(a$12), S = !N(g2);
|
|
11089
|
-
return d(g2) && (u2[r] = F(r, a$12, I(localStorage.getItem(r$2))), localStorage.setItem(r$2, m2), S) ? u2[r] : h(g2) && (u2[t] = F(t, a$12, I(r$1(r$2))), c(r$2, m2), S) ? u2[t] : E(g2) && (u2[a] = F(a, a$12, I(sessionStorage.getItem(r$2))), sessionStorage.setItem(r$2, m2), S) ? u2[a] : (u2[l] = F(l, a$12, a$2(r$2)), f(r$2, a$12), S ? u2[l] : u2);
|
|
11090
|
-
}
|
|
11091
|
-
}
|
|
11092
|
-
function A(t2) {
|
|
11093
|
-
return t2 ? q(t2) ? t2 : t2.storage : g$1;
|
|
11094
|
-
}
|
|
11095
|
-
function d(t2) {
|
|
11096
|
-
return k && G(t2, r);
|
|
11097
|
-
}
|
|
11098
|
-
function h(t$1) {
|
|
11099
|
-
return x && G(t$1, t);
|
|
11100
|
-
}
|
|
11101
|
-
function E(t2) {
|
|
11102
|
-
return O && G(t2, a);
|
|
11103
|
-
}
|
|
11104
|
-
function N(t2) {
|
|
11105
|
-
return t2 === m || t2 === "all";
|
|
11106
|
-
}
|
|
11107
|
-
function G(t2, o2) {
|
|
11108
|
-
return t2 === g$1 || t2 === o2 || N(t2);
|
|
11109
|
-
}
|
|
11110
|
-
function F(t2, o2, e2) {
|
|
11111
|
-
return { location: t2, current: o2, previous: e2 };
|
|
11112
|
-
}
|
|
11113
|
-
const EXPERIMENT_KEY = "__form_experiments";
|
|
11000
|
+
const EXPERIMENT_PREFIX = "_form_experiments_";
|
|
11001
|
+
const DEFAULT_TTL_SECS = 60 * 60 * 24 * 30;
|
|
11114
11002
|
const urlParams = new URLSearchParams(window.location.search);
|
|
11115
11003
|
const DEBUG = urlParams.get("fdbg");
|
|
11116
11004
|
function dbg() {
|
|
@@ -11127,17 +11015,33 @@ function rollbar(type, msg) {
|
|
|
11127
11015
|
}
|
|
11128
11016
|
}
|
|
11129
11017
|
}
|
|
11018
|
+
function cookie(name, value, ttl, path, samesite, secure, domain) {
|
|
11019
|
+
name = name.replace(/\s/g, "_");
|
|
11020
|
+
var isSet2 = arguments.length > 1;
|
|
11021
|
+
try {
|
|
11022
|
+
if (isSet2) {
|
|
11023
|
+
return document.cookie = name + "=" + encodeURIComponent(value) + (!ttl ? "" : "; expires=" + new Date(+new Date() + ttl * 1e3).toUTCString() + (!path ? "" : "; path=" + path) + (!samesite ? "" : "; SameSite=" + samesite) + (!domain ? "" : "; domain=" + domain) + (!secure ? "" : "; secure"));
|
|
11024
|
+
}
|
|
11025
|
+
return decodeURIComponent((("; " + document.cookie).split("; " + name + "=")[1] || "").split(";")[0]);
|
|
11026
|
+
} catch (e) {
|
|
11027
|
+
console.warn("cookies unsupported");
|
|
11028
|
+
return null;
|
|
11029
|
+
}
|
|
11030
|
+
}
|
|
11130
11031
|
function chooseVariant(exp) {
|
|
11131
|
-
let variant = null,
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
variant =
|
|
11032
|
+
let variant = null, fromCache = false;
|
|
11033
|
+
if (!exp.noCache) {
|
|
11034
|
+
const cookieVal = cookie(EXPERIMENT_PREFIX + exp.name);
|
|
11035
|
+
variant = cookieVal ? JSON.parse(cookieVal) : null;
|
|
11036
|
+
}
|
|
11037
|
+
if (variant && variant.name) {
|
|
11135
11038
|
fromCache = true;
|
|
11136
11039
|
} else {
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11040
|
+
variant = exp.variants[Math.floor(Math.random() * exp.variants.length)];
|
|
11041
|
+
var ttl = DEFAULT_TTL_SECS;
|
|
11042
|
+
var path = "/";
|
|
11043
|
+
var samesite = "Strict";
|
|
11044
|
+
cookie(EXPERIMENT_PREFIX + exp.name, JSON.stringify(variant), ttl, path, samesite);
|
|
11141
11045
|
}
|
|
11142
11046
|
dbg("Chose variant:", variant, "fromCache:", fromCache);
|
|
11143
11047
|
return { variant, fromCache };
|
|
@@ -11170,12 +11074,8 @@ const flattenObj = (obj) => {
|
|
|
11170
11074
|
function prepData(formData) {
|
|
11171
11075
|
const props2 = flattenObj(formData);
|
|
11172
11076
|
props2.vid = "";
|
|
11173
|
-
props2.sid = "";
|
|
11174
|
-
props2.cid = "";
|
|
11175
11077
|
if (typeof window.zar !== "undefined") {
|
|
11176
11078
|
props2.vid = window.zar.getVID();
|
|
11177
|
-
props2.sid = window.zar.getSID();
|
|
11178
|
-
props2.cid = window.zar.getCID();
|
|
11179
11079
|
}
|
|
11180
11080
|
const data = {
|
|
11181
11081
|
post_source: window.location.hostname,
|
|
@@ -11200,6 +11100,7 @@ const scrollAnchor = (formNode) => () => {
|
|
|
11200
11100
|
const anchor = document.getElementById(anchorId);
|
|
11201
11101
|
if (anchor) {
|
|
11202
11102
|
const pos = getCoords(anchor);
|
|
11103
|
+
dbg("scrollTo", pos);
|
|
11203
11104
|
window.scrollTo(pos.right, pos.top);
|
|
11204
11105
|
}
|
|
11205
11106
|
}
|
|
@@ -11208,14 +11109,20 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
11208
11109
|
if (!stepResult) {
|
|
11209
11110
|
return;
|
|
11210
11111
|
}
|
|
11211
|
-
scrollAnchor(formNode)();
|
|
11212
11112
|
var step_values = null;
|
|
11213
|
-
|
|
11214
|
-
|
|
11113
|
+
try {
|
|
11114
|
+
scrollAnchor(formNode)();
|
|
11115
|
+
if (stepHistory2.value.length > 0) {
|
|
11116
|
+
step_values = flattenObj(formNode.value[stepHistory2.value[stepHistory2.value.length - 1]] || {});
|
|
11117
|
+
}
|
|
11118
|
+
} catch (err) {
|
|
11119
|
+
const msg = "failed to prep fireStepEvent: " + err.toString();
|
|
11120
|
+
console.warn(msg);
|
|
11121
|
+
rollbar("warning", msg);
|
|
11215
11122
|
}
|
|
11216
|
-
const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
|
|
11217
11123
|
if (typeof window._analytics !== "undefined") {
|
|
11218
11124
|
try {
|
|
11125
|
+
const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
|
|
11219
11126
|
var body = {
|
|
11220
11127
|
"form_source": "formkit",
|
|
11221
11128
|
"form_id": form_id,
|
|
@@ -11323,12 +11230,12 @@ if (!Object.fromEntries) {
|
|
|
11323
11230
|
if (!entries || !entries[Symbol.iterator]) {
|
|
11324
11231
|
throw new Error("Object.fromEntries() requires a single iterable argument");
|
|
11325
11232
|
}
|
|
11326
|
-
const
|
|
11233
|
+
const o = {};
|
|
11327
11234
|
Object.keys(entries).forEach((key) => {
|
|
11328
|
-
const [
|
|
11329
|
-
|
|
11235
|
+
const [k, v] = entries[key];
|
|
11236
|
+
o[k] = v;
|
|
11330
11237
|
});
|
|
11331
|
-
return
|
|
11238
|
+
return o;
|
|
11332
11239
|
}
|
|
11333
11240
|
});
|
|
11334
11241
|
}
|
|
@@ -13155,8 +13062,8 @@ function parseTimezonePattern(pattern, string) {
|
|
|
13155
13062
|
function parseAnyDigitsSigned(string, valueCallback) {
|
|
13156
13063
|
return parseNumericPattern(numericPatterns.anyDigitsSigned, string, valueCallback);
|
|
13157
13064
|
}
|
|
13158
|
-
function parseNDigits(
|
|
13159
|
-
switch (
|
|
13065
|
+
function parseNDigits(n, string, valueCallback) {
|
|
13066
|
+
switch (n) {
|
|
13160
13067
|
case 1:
|
|
13161
13068
|
return parseNumericPattern(numericPatterns.singleDigit, string, valueCallback);
|
|
13162
13069
|
case 2:
|
|
@@ -13166,11 +13073,11 @@ function parseNDigits(n2, string, valueCallback) {
|
|
|
13166
13073
|
case 4:
|
|
13167
13074
|
return parseNumericPattern(numericPatterns.fourDigits, string, valueCallback);
|
|
13168
13075
|
default:
|
|
13169
|
-
return parseNumericPattern(new RegExp("^\\d{1," +
|
|
13076
|
+
return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), string, valueCallback);
|
|
13170
13077
|
}
|
|
13171
13078
|
}
|
|
13172
|
-
function parseNDigitsSigned(
|
|
13173
|
-
switch (
|
|
13079
|
+
function parseNDigitsSigned(n, string, valueCallback) {
|
|
13080
|
+
switch (n) {
|
|
13174
13081
|
case 1:
|
|
13175
13082
|
return parseNumericPattern(numericPatterns.singleDigitSigned, string, valueCallback);
|
|
13176
13083
|
case 2:
|
|
@@ -13180,7 +13087,7 @@ function parseNDigitsSigned(n2, string, valueCallback) {
|
|
|
13180
13087
|
case 4:
|
|
13181
13088
|
return parseNumericPattern(numericPatterns.fourDigitsSigned, string, valueCallback);
|
|
13182
13089
|
default:
|
|
13183
|
-
return parseNumericPattern(new RegExp("^-?\\d{1," +
|
|
13090
|
+
return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), string, valueCallback);
|
|
13184
13091
|
}
|
|
13185
13092
|
}
|
|
13186
13093
|
function dayPeriodEnumToHours(enumValue) {
|
|
@@ -14422,15 +14329,15 @@ function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, dirtyOpti
|
|
|
14422
14329
|
}
|
|
14423
14330
|
var uniquePrioritySetters = setters.map(function(setter2) {
|
|
14424
14331
|
return setter2.priority;
|
|
14425
|
-
}).sort(function(
|
|
14426
|
-
return
|
|
14332
|
+
}).sort(function(a, b) {
|
|
14333
|
+
return b - a;
|
|
14427
14334
|
}).filter(function(priority, index2, array) {
|
|
14428
14335
|
return array.indexOf(priority) === index2;
|
|
14429
14336
|
}).map(function(priority) {
|
|
14430
14337
|
return setters.filter(function(setter2) {
|
|
14431
14338
|
return setter2.priority === priority;
|
|
14432
|
-
}).sort(function(
|
|
14433
|
-
return
|
|
14339
|
+
}).sort(function(a, b) {
|
|
14340
|
+
return b.subPriority - a.subPriority;
|
|
14434
14341
|
});
|
|
14435
14342
|
}).map(function(setterArray) {
|
|
14436
14343
|
return setterArray[0];
|
|
@@ -14587,15 +14494,15 @@ function subYears(dirtyDate, dirtyAmount) {
|
|
|
14587
14494
|
return addYears(dirtyDate, -amount);
|
|
14588
14495
|
}
|
|
14589
14496
|
function convertToFP(fn, arity) {
|
|
14590
|
-
var
|
|
14591
|
-
if (
|
|
14592
|
-
return fn.apply(null,
|
|
14497
|
+
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
14498
|
+
if (a.length >= arity) {
|
|
14499
|
+
return fn.apply(null, a.slice(0, arity).reverse());
|
|
14593
14500
|
}
|
|
14594
14501
|
return function() {
|
|
14595
14502
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14596
14503
|
args[_key] = arguments[_key];
|
|
14597
14504
|
}
|
|
14598
|
-
return convertToFP(fn, arity,
|
|
14505
|
+
return convertToFP(fn, arity, a.concat(args));
|
|
14599
14506
|
};
|
|
14600
14507
|
}
|
|
14601
14508
|
var formatWithOptions = convertToFP(format, 3);
|
|
@@ -15467,7 +15374,7 @@ var script = defineComponent({
|
|
|
15467
15374
|
viewShown,
|
|
15468
15375
|
clearModelValue,
|
|
15469
15376
|
initialView,
|
|
15470
|
-
log: (
|
|
15377
|
+
log: (e) => console.log(e),
|
|
15471
15378
|
variables
|
|
15472
15379
|
};
|
|
15473
15380
|
}
|
|
@@ -15585,7 +15492,8 @@ const _sfc_main = {
|
|
|
15585
15492
|
modelValue: picked.value,
|
|
15586
15493
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => picked.value = $event),
|
|
15587
15494
|
upperLimit: new Date(),
|
|
15588
|
-
placeholder: "
|
|
15495
|
+
placeholder: "YYYY-MM-DD",
|
|
15496
|
+
typeable: false
|
|
15589
15497
|
}, null, 8, ["modelValue", "upperLimit"]);
|
|
15590
15498
|
};
|
|
15591
15499
|
}
|
|
@@ -15622,8 +15530,8 @@ const init = () => {
|
|
|
15622
15530
|
data.prepData = data.prepData || prepData;
|
|
15623
15531
|
data.fireStepEvent = data.fireStepEvent || fireStepEvent;
|
|
15624
15532
|
data.scrollAnchor = data.scrollAnchor || scrollAnchor;
|
|
15625
|
-
data.onEnter = (callback) => (
|
|
15626
|
-
if (
|
|
15533
|
+
data.onEnter = (callback) => (e) => {
|
|
15534
|
+
if (e.key === "Enter" || e.keyCode === 13) {
|
|
15627
15535
|
callback();
|
|
15628
15536
|
}
|
|
15629
15537
|
};
|