bhl-forms 0.0.50 → 0.0.53
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 +563 -645
- package/dist/bhl-forms.iife.js +6 -6
- package/dist/bhl-forms.modern.es.js +977 -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 +3 -2
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/generalLegal.es.js +4 -3
- 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 +3 -4
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,112 @@ 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 getCoords$1 = (elem) => {
|
|
4679
|
+
let box2 = elem.getBoundingClientRect();
|
|
4680
|
+
return {
|
|
4681
|
+
top: box2.top + window.pageYOffset,
|
|
4682
|
+
right: box2.right + window.pageXOffset,
|
|
4683
|
+
bottom: box2.bottom + window.pageYOffset,
|
|
4684
|
+
left: box2.left + window.pageXOffset
|
|
4685
|
+
};
|
|
4686
|
+
};
|
|
4687
|
+
const postJSON = (url3, data) => __async(this, null, function* () {
|
|
4688
|
+
dbg$1("Post to: " + url3);
|
|
4689
|
+
const raw2 = yield fetch(url3, {
|
|
4690
|
+
method: "POST",
|
|
4691
|
+
headers: {
|
|
4692
|
+
"Accept": "application/json",
|
|
4693
|
+
"Content-Type": "application/json"
|
|
4694
|
+
},
|
|
4695
|
+
body: JSON.stringify(data)
|
|
4696
|
+
});
|
|
4697
|
+
if (!raw2.ok) {
|
|
4698
|
+
let error2 = new Error(raw2.statusText);
|
|
4699
|
+
Object.assign(error2, { response: raw2 });
|
|
4700
|
+
throw error2;
|
|
4701
|
+
}
|
|
4702
|
+
const res = yield raw2.json();
|
|
4703
|
+
dbg$1("Post resp: " + JSON.stringify(res, null, 2));
|
|
4704
|
+
return res;
|
|
4705
|
+
});
|
|
4706
|
+
const redirect = (url3) => {
|
|
4707
|
+
window.location.href = url3;
|
|
4708
|
+
};
|
|
4709
|
+
const handleSubmitError = (err, node) => {
|
|
4710
|
+
if (err.response) {
|
|
4711
|
+
const code = err.response.status;
|
|
4712
|
+
if (node.props.attrs.errorCodes && code in node.props.attrs.errorCodes) {
|
|
4713
|
+
const value = node.props.attrs.errorCodes[code];
|
|
4714
|
+
let message2 = null;
|
|
4715
|
+
let abort = true;
|
|
4716
|
+
if (typeof value === "string") {
|
|
4717
|
+
message2 = value;
|
|
4718
|
+
} else {
|
|
4719
|
+
if ("message" in value) {
|
|
4720
|
+
message2 = value.message;
|
|
4721
|
+
}
|
|
4722
|
+
if ("abort" in value) {
|
|
4723
|
+
abort = value.abort;
|
|
4724
|
+
}
|
|
4725
|
+
}
|
|
4726
|
+
if (message2) {
|
|
4727
|
+
node.setErrors(message2);
|
|
4728
|
+
}
|
|
4729
|
+
return abort;
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
node.setErrors(err.toString());
|
|
4733
|
+
return true;
|
|
4734
|
+
};
|
|
4735
|
+
const getKey = (d, path) => {
|
|
4736
|
+
if (typeof path === "string") {
|
|
4737
|
+
path = path.split(".");
|
|
4738
|
+
}
|
|
4739
|
+
return path.reduce((x, y) => x[y], d);
|
|
4740
|
+
};
|
|
4741
|
+
const keyValOverlap = (o1, o2) => {
|
|
4742
|
+
let result = null;
|
|
4743
|
+
for (var key of Object.keys(o2)) {
|
|
4744
|
+
if (key === "*") {
|
|
4745
|
+
continue;
|
|
4746
|
+
}
|
|
4747
|
+
const o1_value = getKey(o1, key);
|
|
4748
|
+
if (!o1_value) {
|
|
4749
|
+
continue;
|
|
4750
|
+
}
|
|
4751
|
+
if (o2[key][o1_value]) {
|
|
4752
|
+
result = o2[key][o1_value];
|
|
4753
|
+
break;
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
if (result === null) {
|
|
4757
|
+
if ("*" in o2) {
|
|
4758
|
+
return o2["*"];
|
|
4759
|
+
}
|
|
4760
|
+
throw Error("result not found and no default specified");
|
|
4761
|
+
}
|
|
4762
|
+
return result;
|
|
4763
|
+
};
|
|
4764
|
+
const strSubUrl = (str, obj) => str.replace(/\${(.*?)}/g, (x, g) => encodeURIComponent(getKey(obj, g)));
|
|
4671
4765
|
function usePrepop() {
|
|
4672
4766
|
let prepopSettings = {};
|
|
4673
4767
|
const urlParams2 = new URLSearchParams(window.location.search);
|
|
@@ -4697,11 +4791,11 @@ function usePrepop() {
|
|
|
4697
4791
|
}
|
|
4698
4792
|
}
|
|
4699
4793
|
if (!found) {
|
|
4700
|
-
|
|
4794
|
+
dbg$1("Prepop option not found for:", node.name, value);
|
|
4701
4795
|
return;
|
|
4702
4796
|
}
|
|
4703
4797
|
}
|
|
4704
|
-
|
|
4798
|
+
dbg$1("Setting prepop value for:", node.name, value);
|
|
4705
4799
|
node.input(value);
|
|
4706
4800
|
}
|
|
4707
4801
|
}
|
|
@@ -4725,8 +4819,8 @@ function eq$1(valA, valB, deep = true, explicit = ["__key"]) {
|
|
|
4725
4819
|
return false;
|
|
4726
4820
|
if (Object.keys(valA).length !== Object.keys(valB).length)
|
|
4727
4821
|
return false;
|
|
4728
|
-
for (const
|
|
4729
|
-
if ((
|
|
4822
|
+
for (const k of explicit) {
|
|
4823
|
+
if ((k in valA || k in valB) && valA[k] !== valB[k])
|
|
4730
4824
|
return false;
|
|
4731
4825
|
}
|
|
4732
4826
|
for (const key in valA) {
|
|
@@ -4742,7 +4836,7 @@ function eq$1(valA, valB, deep = true, explicit = ["__key"]) {
|
|
|
4742
4836
|
return false;
|
|
4743
4837
|
}
|
|
4744
4838
|
function camel$1(str) {
|
|
4745
|
-
return str.replace(/-([a-z0-9])/gi, (_s,
|
|
4839
|
+
return str.replace(/-([a-z0-9])/gi, (_s, g) => g.toUpperCase());
|
|
4746
4840
|
}
|
|
4747
4841
|
function kebab$1(str) {
|
|
4748
4842
|
return str.replace(/([a-z0-9])([A-Z])/g, (_s, trail, cap) => trail + "-" + cap.toLowerCase()).replace(" ", "-").toLowerCase();
|
|
@@ -4891,7 +4985,7 @@ function bubble$1(node, _context, event) {
|
|
|
4891
4985
|
}
|
|
4892
4986
|
return node;
|
|
4893
4987
|
}
|
|
4894
|
-
function on$
|
|
4988
|
+
function on$1(_node, context, name, listener) {
|
|
4895
4989
|
return context._e.on(name, listener);
|
|
4896
4990
|
}
|
|
4897
4991
|
function off$1(node, context, receipt) {
|
|
@@ -4920,18 +5014,18 @@ function error$1(code, data = {}) {
|
|
|
4920
5014
|
throw Error(errorHandler$1.dispatch({ code, data }).message);
|
|
4921
5015
|
}
|
|
4922
5016
|
function createMessage$1(conf, node) {
|
|
4923
|
-
const
|
|
5017
|
+
const m = __spreadValues2({
|
|
4924
5018
|
blocking: false,
|
|
4925
5019
|
key: token$1(),
|
|
4926
5020
|
meta: {},
|
|
4927
5021
|
type: "state",
|
|
4928
5022
|
visible: true
|
|
4929
5023
|
}, conf);
|
|
4930
|
-
if (node &&
|
|
4931
|
-
|
|
4932
|
-
|
|
5024
|
+
if (node && m.value && m.meta.localize !== false) {
|
|
5025
|
+
m.value = node.t(m);
|
|
5026
|
+
m.meta.locale = node.config.locale;
|
|
4933
5027
|
}
|
|
4934
|
-
return
|
|
5028
|
+
return m;
|
|
4935
5029
|
}
|
|
4936
5030
|
function createMessages$1(node, ...errors2) {
|
|
4937
5031
|
const sourceKey = `${node.name}-set`;
|
|
@@ -4941,7 +5035,7 @@ function createMessages$1(node, ...errors2) {
|
|
|
4941
5035
|
value: error2,
|
|
4942
5036
|
meta: { source: sourceKey, autoClear: true }
|
|
4943
5037
|
});
|
|
4944
|
-
return errors2.filter((
|
|
5038
|
+
return errors2.filter((m) => !!m).map((errorSet) => {
|
|
4945
5039
|
if (typeof errorSet === "string")
|
|
4946
5040
|
errorSet = [errorSet];
|
|
4947
5041
|
if (Array.isArray(errorSet)) {
|
|
@@ -4997,13 +5091,13 @@ function submitForm$1(id) {
|
|
|
4997
5091
|
warn$1(151, id);
|
|
4998
5092
|
}
|
|
4999
5093
|
function clearState$1(node) {
|
|
5000
|
-
const clear2 = (
|
|
5001
|
-
for (const key in
|
|
5002
|
-
const message2 =
|
|
5094
|
+
const clear2 = (n) => {
|
|
5095
|
+
for (const key in n.store) {
|
|
5096
|
+
const message2 = n.store[key];
|
|
5003
5097
|
if (message2.type === "error" || message2.type === "ui" && key === "incomplete") {
|
|
5004
|
-
|
|
5098
|
+
n.store.remove(key);
|
|
5005
5099
|
} else if (message2.type === "state") {
|
|
5006
|
-
|
|
5100
|
+
n.store.set(__spreadProps2(__spreadValues2({}, message2), { value: false }));
|
|
5007
5101
|
}
|
|
5008
5102
|
}
|
|
5009
5103
|
};
|
|
@@ -5013,7 +5107,7 @@ function clearState$1(node) {
|
|
|
5013
5107
|
function reset$1(id, resetTo) {
|
|
5014
5108
|
const node = typeof id === "string" ? getNode$1$1(id) : id;
|
|
5015
5109
|
if (node) {
|
|
5016
|
-
const initial = (
|
|
5110
|
+
const initial = (n) => cloneAny$1(n.props.initial) || (n.type === "group" ? {} : n.type === "list" ? [] : void 0);
|
|
5017
5111
|
node._e.pause(node);
|
|
5018
5112
|
node.input(cloneAny$1(resetTo) || initial(node), false);
|
|
5019
5113
|
node.walk((child) => child.input(initial(child), false));
|
|
@@ -5065,7 +5159,7 @@ const invalidSetter$1 = (node, _context, property) => {
|
|
|
5065
5159
|
each: trap$1(eachChild$1),
|
|
5066
5160
|
emit: trap$1(emit$1$1),
|
|
5067
5161
|
find: trap$1(find$1),
|
|
5068
|
-
on: trap$1(on$
|
|
5162
|
+
on: trap$1(on$1),
|
|
5069
5163
|
off: trap$1(off$1),
|
|
5070
5164
|
parent: trap$1(false, setParent$1),
|
|
5071
5165
|
plugins: trap$1(false),
|
|
@@ -5217,6 +5311,14 @@ function define$1(node, context, definition) {
|
|
|
5217
5311
|
type: node.type,
|
|
5218
5312
|
value: context.value
|
|
5219
5313
|
});
|
|
5314
|
+
if (definition.forceTypeProp) {
|
|
5315
|
+
if (node.props.type)
|
|
5316
|
+
node.props.originalType = node.props.type;
|
|
5317
|
+
context.props.type = definition.forceTypeProp;
|
|
5318
|
+
}
|
|
5319
|
+
if (definition.family) {
|
|
5320
|
+
context.props.family = definition.family;
|
|
5321
|
+
}
|
|
5220
5322
|
if (definition.features) {
|
|
5221
5323
|
definition.features.forEach((feature) => feature(node));
|
|
5222
5324
|
}
|
|
@@ -5343,7 +5445,7 @@ function walkTree$1(_node, context, callback, stopIfFalse = false) {
|
|
|
5343
5445
|
function resetConfig$1(node, context) {
|
|
5344
5446
|
const parent = node.parent || void 0;
|
|
5345
5447
|
context.config = createConfig$2(node.config._t, parent);
|
|
5346
|
-
node.walk((
|
|
5448
|
+
node.walk((n) => n.resetConfig());
|
|
5347
5449
|
}
|
|
5348
5450
|
function use$1(node, context, plugin2, run2 = true, library = true) {
|
|
5349
5451
|
if (Array.isArray(plugin2) || plugin2 instanceof Set) {
|
|
@@ -5421,7 +5523,7 @@ function getNode$2(node, _context, locator) {
|
|
|
5421
5523
|
pointer = node;
|
|
5422
5524
|
break;
|
|
5423
5525
|
default:
|
|
5424
|
-
pointer = pointer.children.find((
|
|
5526
|
+
pointer = pointer.children.find((c) => String(c.name) === String(name)) || select$3(pointer, name);
|
|
5425
5527
|
}
|
|
5426
5528
|
}
|
|
5427
5529
|
return pointer || void 0;
|
|
@@ -5444,7 +5546,7 @@ function find$1(node, _context, searchTerm, searcher) {
|
|
|
5444
5546
|
return bfs$1(node, searchTerm, searcher);
|
|
5445
5547
|
}
|
|
5446
5548
|
function bfs$1(tree, searchValue, searchGoal = "name") {
|
|
5447
|
-
const search = typeof searchGoal === "string" ? (
|
|
5549
|
+
const search = typeof searchGoal === "string" ? (n) => n[searchGoal] == searchValue : searchGoal;
|
|
5448
5550
|
const stack = [tree];
|
|
5449
5551
|
while (stack.length) {
|
|
5450
5552
|
const node = stack.shift();
|
|
@@ -5454,8 +5556,8 @@ function bfs$1(tree, searchValue, searchGoal = "name") {
|
|
|
5454
5556
|
}
|
|
5455
5557
|
return void 0;
|
|
5456
5558
|
}
|
|
5457
|
-
function getRoot$1(
|
|
5458
|
-
let node =
|
|
5559
|
+
function getRoot$1(n) {
|
|
5560
|
+
let node = n;
|
|
5459
5561
|
while (node.parent) {
|
|
5460
5562
|
node = node.parent;
|
|
5461
5563
|
}
|
|
@@ -5505,7 +5607,7 @@ function createConfig$2(target = {}, parent) {
|
|
|
5505
5607
|
if (node) {
|
|
5506
5608
|
node.emit(`config:${prop}`, value, false);
|
|
5507
5609
|
configChange$1(node, prop, value);
|
|
5508
|
-
node.walk((
|
|
5610
|
+
node.walk((n) => configChange$1(n, prop, value), true);
|
|
5509
5611
|
}
|
|
5510
5612
|
return didSet;
|
|
5511
5613
|
}
|
|
@@ -5555,96 +5657,28 @@ function clearErrors$1$1(node, context, clearChildErrors = true, sourceKey) {
|
|
|
5555
5657
|
}
|
|
5556
5658
|
return node;
|
|
5557
5659
|
}
|
|
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)));
|
|
5660
|
+
const autoFocusTypes = [
|
|
5661
|
+
"email",
|
|
5662
|
+
"number",
|
|
5663
|
+
"password",
|
|
5664
|
+
"search",
|
|
5665
|
+
"text",
|
|
5666
|
+
"textarea",
|
|
5667
|
+
"tel",
|
|
5668
|
+
"url"
|
|
5669
|
+
];
|
|
5636
5670
|
function useSteps() {
|
|
5637
5671
|
const activeStep2 = ref("");
|
|
5638
5672
|
const steps2 = reactive({});
|
|
5639
5673
|
let defaultOrder2 = [];
|
|
5640
5674
|
let stepQueue2 = ref([]);
|
|
5641
5675
|
let stepHistory2 = ref([]);
|
|
5642
|
-
const lastItem = (
|
|
5643
|
-
return
|
|
5676
|
+
const lastItem = (x) => {
|
|
5677
|
+
return x.value[x.value.length - 1];
|
|
5644
5678
|
};
|
|
5645
|
-
const findFirstInput = (
|
|
5646
|
-
for (var i2 = 0; i2 <
|
|
5647
|
-
const child =
|
|
5679
|
+
const findFirstInput = (n) => {
|
|
5680
|
+
for (var i2 = 0; i2 < n.children.length; i2++) {
|
|
5681
|
+
const child = n.children[i2];
|
|
5648
5682
|
if ((child.type === "input" || child.type === "list") && !(child.context.type === "hidden")) {
|
|
5649
5683
|
return child;
|
|
5650
5684
|
}
|
|
@@ -5655,6 +5689,27 @@ function useSteps() {
|
|
|
5655
5689
|
}
|
|
5656
5690
|
return null;
|
|
5657
5691
|
};
|
|
5692
|
+
const focusAndOpenKeyboard = (el, timeout) => {
|
|
5693
|
+
if (!timeout) {
|
|
5694
|
+
timeout = 100;
|
|
5695
|
+
}
|
|
5696
|
+
if (el) {
|
|
5697
|
+
var __tempEl__ = document.createElement("input");
|
|
5698
|
+
var coords = getCoords$1(el);
|
|
5699
|
+
__tempEl__.style.position = "absolute";
|
|
5700
|
+
__tempEl__.style.top = coords.top + 7 + "px";
|
|
5701
|
+
__tempEl__.style.left = coords.left + "px";
|
|
5702
|
+
__tempEl__.style.height = 0;
|
|
5703
|
+
__tempEl__.style.opacity = 0;
|
|
5704
|
+
document.body.appendChild(__tempEl__);
|
|
5705
|
+
__tempEl__.focus();
|
|
5706
|
+
setTimeout(function() {
|
|
5707
|
+
el.focus();
|
|
5708
|
+
el.click();
|
|
5709
|
+
document.body.removeChild(__tempEl__);
|
|
5710
|
+
}, timeout);
|
|
5711
|
+
}
|
|
5712
|
+
};
|
|
5658
5713
|
const firstStep2 = () => {
|
|
5659
5714
|
if (stepHistory2.value.length > 0) {
|
|
5660
5715
|
return stepHistory2.value[0];
|
|
@@ -5699,8 +5754,8 @@ function useSteps() {
|
|
|
5699
5754
|
const setStep2 = ({ nextStep = 1, validate: validate2 = true, autoFocus = true } = {}) => {
|
|
5700
5755
|
const node = steps2[activeStep2.value].node;
|
|
5701
5756
|
if (validate2) {
|
|
5702
|
-
node.walk((
|
|
5703
|
-
|
|
5757
|
+
node.walk((n) => {
|
|
5758
|
+
n.store.set(createMessage$1({
|
|
5704
5759
|
key: "submitted",
|
|
5705
5760
|
value: true,
|
|
5706
5761
|
visible: false
|
|
@@ -5723,14 +5778,15 @@ function useSteps() {
|
|
|
5723
5778
|
}
|
|
5724
5779
|
if (autoFocus) {
|
|
5725
5780
|
const newNode = steps2[activeStep2.value].node;
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
if (!firstInput) {
|
|
5729
|
-
return;
|
|
5730
|
-
}
|
|
5781
|
+
const firstInput = findFirstInput(newNode);
|
|
5782
|
+
if (firstInput && autoFocusTypes.indexOf(firstInput.context.type) > -1) {
|
|
5731
5783
|
const elem = document.getElementById(firstInput.context.id);
|
|
5732
|
-
|
|
5733
|
-
|
|
5784
|
+
try {
|
|
5785
|
+
focusAndOpenKeyboard(elem);
|
|
5786
|
+
} catch (e) {
|
|
5787
|
+
console.warn("Failed to autoFocus:", e);
|
|
5788
|
+
}
|
|
5789
|
+
}
|
|
5734
5790
|
}
|
|
5735
5791
|
return true;
|
|
5736
5792
|
};
|
|
@@ -5786,7 +5842,7 @@ function useSteps() {
|
|
|
5786
5842
|
}
|
|
5787
5843
|
let { prepopPlugin } = usePrepop();
|
|
5788
5844
|
let { stepPlugin, steps, stepHistory, stepQueue, enabledSteps, defaultOrder, activeStep, firstStep, lastStep, setStep, setNextStep, setPreviousStep } = useSteps();
|
|
5789
|
-
const urlParams$
|
|
5845
|
+
const urlParams$2 = new URLSearchParams(window.location.search);
|
|
5790
5846
|
const dataDefaults = {
|
|
5791
5847
|
steps,
|
|
5792
5848
|
activeStep,
|
|
@@ -5797,7 +5853,7 @@ const dataDefaults = {
|
|
|
5797
5853
|
prepopPlugin
|
|
5798
5854
|
],
|
|
5799
5855
|
urlParam: (name, backup = null) => {
|
|
5800
|
-
return urlParams$
|
|
5856
|
+
return urlParams$2.get(name) || backup;
|
|
5801
5857
|
},
|
|
5802
5858
|
firstStep: () => {
|
|
5803
5859
|
return firstStep();
|
|
@@ -5885,7 +5941,6 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
5885
5941
|
Object.assign(meta, node.data || {});
|
|
5886
5942
|
}
|
|
5887
5943
|
const mergedData = reactive(Object.assign({}, dataDefaults, { meta }, props2.data));
|
|
5888
|
-
console.debug("FormKitSchema data:", mergedData);
|
|
5889
5944
|
return (_ctx, _cache) => {
|
|
5890
5945
|
const _component_FormKitSchema = resolveComponent("FormKitSchema");
|
|
5891
5946
|
return openBlock(), createBlock(_component_FormKitSchema, {
|
|
@@ -5921,8 +5976,8 @@ function eq(valA, valB, deep = true, explicit = ["__key"]) {
|
|
|
5921
5976
|
return false;
|
|
5922
5977
|
if (Object.keys(valA).length !== Object.keys(valB).length)
|
|
5923
5978
|
return false;
|
|
5924
|
-
for (const
|
|
5925
|
-
if ((
|
|
5979
|
+
for (const k of explicit) {
|
|
5980
|
+
if ((k in valA || k in valB) && valA[k] !== valB[k])
|
|
5926
5981
|
return false;
|
|
5927
5982
|
}
|
|
5928
5983
|
for (const key in valA) {
|
|
@@ -5977,18 +6032,18 @@ function regexForFormat(format2) {
|
|
|
5977
6032
|
return regex.replace(format3, formats[format3]);
|
|
5978
6033
|
}, escaped));
|
|
5979
6034
|
}
|
|
5980
|
-
function isRecord(
|
|
5981
|
-
return Object.prototype.toString.call(
|
|
6035
|
+
function isRecord(o) {
|
|
6036
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
5982
6037
|
}
|
|
5983
|
-
function isObject(
|
|
5984
|
-
return isRecord(
|
|
6038
|
+
function isObject(o) {
|
|
6039
|
+
return isRecord(o) || Array.isArray(o);
|
|
5985
6040
|
}
|
|
5986
|
-
function isPojo(
|
|
5987
|
-
if (isRecord(
|
|
6041
|
+
function isPojo(o) {
|
|
6042
|
+
if (isRecord(o) === false)
|
|
5988
6043
|
return false;
|
|
5989
|
-
if (
|
|
6044
|
+
if (o.__FKNode__ || o.__POJO__ === false)
|
|
5990
6045
|
return false;
|
|
5991
|
-
const ctor =
|
|
6046
|
+
const ctor = o.constructor;
|
|
5992
6047
|
if (ctor === void 0)
|
|
5993
6048
|
return true;
|
|
5994
6049
|
const prot = ctor.prototype;
|
|
@@ -6095,7 +6150,7 @@ function parseArgs(str) {
|
|
|
6095
6150
|
}
|
|
6096
6151
|
function except(obj, toRemove) {
|
|
6097
6152
|
const clean = {};
|
|
6098
|
-
const exps = toRemove.filter((
|
|
6153
|
+
const exps = toRemove.filter((n) => n instanceof RegExp);
|
|
6099
6154
|
const keysToRemove = new Set(toRemove);
|
|
6100
6155
|
for (const key in obj) {
|
|
6101
6156
|
if (!keysToRemove.has(key) && !exps.some((exp) => exp.test(key))) {
|
|
@@ -6106,7 +6161,7 @@ function except(obj, toRemove) {
|
|
|
6106
6161
|
}
|
|
6107
6162
|
function only(obj, include) {
|
|
6108
6163
|
const clean = {};
|
|
6109
|
-
const exps = include.filter((
|
|
6164
|
+
const exps = include.filter((n) => n instanceof RegExp);
|
|
6110
6165
|
include.forEach((key) => {
|
|
6111
6166
|
if (!(key instanceof RegExp)) {
|
|
6112
6167
|
clean[key] = obj[key];
|
|
@@ -6120,7 +6175,7 @@ function only(obj, include) {
|
|
|
6120
6175
|
return clean;
|
|
6121
6176
|
}
|
|
6122
6177
|
function camel(str) {
|
|
6123
|
-
return str.replace(/-([a-z0-9])/gi, (_s,
|
|
6178
|
+
return str.replace(/-([a-z0-9])/gi, (_s, g) => g.toUpperCase());
|
|
6124
6179
|
}
|
|
6125
6180
|
function kebab(str) {
|
|
6126
6181
|
return str.replace(/([a-z0-9])([A-Z])/g, (_s, trail, cap) => trail + "-" + cap.toLowerCase()).replace(" ", "-").toLowerCase();
|
|
@@ -6158,15 +6213,15 @@ function getAt(obj, addr) {
|
|
|
6158
6213
|
if (!obj || typeof obj !== "object")
|
|
6159
6214
|
return null;
|
|
6160
6215
|
const segments = addr.split(".");
|
|
6161
|
-
let
|
|
6216
|
+
let o = obj;
|
|
6162
6217
|
for (const i2 in segments) {
|
|
6163
6218
|
const segment = segments[i2];
|
|
6164
|
-
if (has(
|
|
6165
|
-
|
|
6219
|
+
if (has(o, segment)) {
|
|
6220
|
+
o = o[segment];
|
|
6166
6221
|
}
|
|
6167
6222
|
if (+i2 === segments.length - 1)
|
|
6168
|
-
return
|
|
6169
|
-
if (!
|
|
6223
|
+
return o;
|
|
6224
|
+
if (!o || typeof o !== "object")
|
|
6170
6225
|
return null;
|
|
6171
6226
|
}
|
|
6172
6227
|
return null;
|
|
@@ -6286,7 +6341,7 @@ function bubble(node, _context, event) {
|
|
|
6286
6341
|
}
|
|
6287
6342
|
return node;
|
|
6288
6343
|
}
|
|
6289
|
-
function on
|
|
6344
|
+
function on(_node, context, name, listener) {
|
|
6290
6345
|
return context._e.on(name, listener);
|
|
6291
6346
|
}
|
|
6292
6347
|
function off(node, context, receipt) {
|
|
@@ -6315,18 +6370,18 @@ function error(code, data = {}) {
|
|
|
6315
6370
|
throw Error(errorHandler.dispatch({ code, data }).message);
|
|
6316
6371
|
}
|
|
6317
6372
|
function createMessage(conf, node) {
|
|
6318
|
-
const
|
|
6373
|
+
const m = __spreadValues({
|
|
6319
6374
|
blocking: false,
|
|
6320
6375
|
key: token(),
|
|
6321
6376
|
meta: {},
|
|
6322
6377
|
type: "state",
|
|
6323
6378
|
visible: true
|
|
6324
6379
|
}, conf);
|
|
6325
|
-
if (node &&
|
|
6326
|
-
|
|
6327
|
-
|
|
6380
|
+
if (node && m.value && m.meta.localize !== false) {
|
|
6381
|
+
m.value = node.t(m);
|
|
6382
|
+
m.meta.locale = node.config.locale;
|
|
6328
6383
|
}
|
|
6329
|
-
return
|
|
6384
|
+
return m;
|
|
6330
6385
|
}
|
|
6331
6386
|
const storeTraps = {
|
|
6332
6387
|
apply: applyMessages,
|
|
@@ -6395,9 +6450,9 @@ function setMessage(messageStore, store, node, message2) {
|
|
|
6395
6450
|
message2.meta.locale = node.props.locale;
|
|
6396
6451
|
}
|
|
6397
6452
|
}
|
|
6398
|
-
const
|
|
6453
|
+
const e = `message-${has(messageStore, message2.key) ? "updated" : "added"}`;
|
|
6399
6454
|
messageStore[message2.key] = Object.freeze(node.hook.message.dispatch(message2));
|
|
6400
|
-
node.emit(
|
|
6455
|
+
node.emit(e, message2);
|
|
6401
6456
|
}
|
|
6402
6457
|
return store;
|
|
6403
6458
|
}
|
|
@@ -6415,7 +6470,7 @@ function removeMessage$1(messageStore, store, node, key) {
|
|
|
6415
6470
|
}
|
|
6416
6471
|
if (store.buffer === true) {
|
|
6417
6472
|
store._b = store._b.filter((buffered) => {
|
|
6418
|
-
buffered[0] = buffered[0].filter((
|
|
6473
|
+
buffered[0] = buffered[0].filter((m) => m.key !== key);
|
|
6419
6474
|
return buffered[1] || buffered[0].length;
|
|
6420
6475
|
});
|
|
6421
6476
|
}
|
|
@@ -6470,7 +6525,7 @@ function createMessages(node, ...errors2) {
|
|
|
6470
6525
|
value: error2,
|
|
6471
6526
|
meta: { source: sourceKey, autoClear: true }
|
|
6472
6527
|
});
|
|
6473
|
-
return errors2.filter((
|
|
6528
|
+
return errors2.filter((m) => !!m).map((errorSet) => {
|
|
6474
6529
|
if (typeof errorSet === "string")
|
|
6475
6530
|
errorSet = [errorSet];
|
|
6476
6531
|
if (Array.isArray(errorSet)) {
|
|
@@ -6520,19 +6575,19 @@ function releaseBuffer(_messageStore, store) {
|
|
|
6520
6575
|
}
|
|
6521
6576
|
function createLedger() {
|
|
6522
6577
|
const ledger = {};
|
|
6523
|
-
let
|
|
6578
|
+
let n;
|
|
6524
6579
|
return {
|
|
6525
|
-
count: (...args) => createCounter(
|
|
6580
|
+
count: (...args) => createCounter(n, ledger, ...args),
|
|
6526
6581
|
init(node) {
|
|
6527
|
-
|
|
6582
|
+
n = node;
|
|
6528
6583
|
node.on("message-added.deep", add(ledger, 1));
|
|
6529
6584
|
node.on("message-removed.deep", add(ledger, -1));
|
|
6530
6585
|
},
|
|
6531
|
-
merge: (child) => merge(
|
|
6586
|
+
merge: (child) => merge(n, ledger, child),
|
|
6532
6587
|
settled(counterName) {
|
|
6533
6588
|
return has(ledger, counterName) ? ledger[counterName].promise : Promise.resolve();
|
|
6534
6589
|
},
|
|
6535
|
-
unmerge: (child) => merge(
|
|
6590
|
+
unmerge: (child) => merge(n, ledger, child, true),
|
|
6536
6591
|
value(counterName) {
|
|
6537
6592
|
return has(ledger, counterName) ? ledger[counterName].count : 0;
|
|
6538
6593
|
}
|
|
@@ -6551,7 +6606,7 @@ function createCounter(node, ledger, counterName, condition, increment = 0) {
|
|
|
6551
6606
|
}
|
|
6552
6607
|
};
|
|
6553
6608
|
ledger[counterName] = counter;
|
|
6554
|
-
increment = node.store.reduce((sum,
|
|
6609
|
+
increment = node.store.reduce((sum, m) => sum + counter.condition(m) * 1, increment);
|
|
6555
6610
|
node.each((child) => {
|
|
6556
6611
|
child.ledger.count(counter.name, counter.condition);
|
|
6557
6612
|
increment += child.ledger.value(counter.name);
|
|
@@ -6563,7 +6618,7 @@ function parseCondition(condition) {
|
|
|
6563
6618
|
if (typeof condition === "function") {
|
|
6564
6619
|
return condition;
|
|
6565
6620
|
}
|
|
6566
|
-
return (
|
|
6621
|
+
return (m) => m.type === condition;
|
|
6567
6622
|
}
|
|
6568
6623
|
function count(counter, increment) {
|
|
6569
6624
|
const initial = counter.count;
|
|
@@ -6571,7 +6626,7 @@ function count(counter, increment) {
|
|
|
6571
6626
|
counter.count = post;
|
|
6572
6627
|
if (initial === 0 && post !== 0) {
|
|
6573
6628
|
counter.node.emit(`unsettled:${counter.name}`, counter.count, false);
|
|
6574
|
-
counter.promise = new Promise((
|
|
6629
|
+
counter.promise = new Promise((r) => counter.resolve = r);
|
|
6575
6630
|
} else if (initial !== 0 && post === 0) {
|
|
6576
6631
|
counter.node.emit(`settled:${counter.name}`, counter.count, false);
|
|
6577
6632
|
counter.resolve();
|
|
@@ -6580,10 +6635,10 @@ function count(counter, increment) {
|
|
|
6580
6635
|
return counter;
|
|
6581
6636
|
}
|
|
6582
6637
|
function add(ledger, delta) {
|
|
6583
|
-
return (
|
|
6638
|
+
return (e) => {
|
|
6584
6639
|
for (const name in ledger) {
|
|
6585
6640
|
const counter = ledger[name];
|
|
6586
|
-
if (counter.condition(
|
|
6641
|
+
if (counter.condition(e.payload)) {
|
|
6587
6642
|
count(counter, delta);
|
|
6588
6643
|
}
|
|
6589
6644
|
}
|
|
@@ -6654,11 +6709,11 @@ function createConfig$1(options2 = {}) {
|
|
|
6654
6709
|
_rm: (node) => node.remove(node)
|
|
6655
6710
|
});
|
|
6656
6711
|
const rootConfig = new Proxy(target, {
|
|
6657
|
-
set(
|
|
6712
|
+
set(t, prop, value, r) {
|
|
6658
6713
|
if (typeof prop === "string") {
|
|
6659
6714
|
nodes.forEach((node) => configChange(node, prop, value));
|
|
6660
6715
|
}
|
|
6661
|
-
return Reflect.set(
|
|
6716
|
+
return Reflect.set(t, prop, value, r);
|
|
6662
6717
|
}
|
|
6663
6718
|
});
|
|
6664
6719
|
return rootConfig;
|
|
@@ -6673,13 +6728,13 @@ function submitForm(id) {
|
|
|
6673
6728
|
warn(151, id);
|
|
6674
6729
|
}
|
|
6675
6730
|
function clearState(node) {
|
|
6676
|
-
const clear2 = (
|
|
6677
|
-
for (const key in
|
|
6678
|
-
const message2 =
|
|
6731
|
+
const clear2 = (n) => {
|
|
6732
|
+
for (const key in n.store) {
|
|
6733
|
+
const message2 = n.store[key];
|
|
6679
6734
|
if (message2.type === "error" || message2.type === "ui" && key === "incomplete") {
|
|
6680
|
-
|
|
6735
|
+
n.store.remove(key);
|
|
6681
6736
|
} else if (message2.type === "state") {
|
|
6682
|
-
|
|
6737
|
+
n.store.set(__spreadProps(__spreadValues({}, message2), { value: false }));
|
|
6683
6738
|
}
|
|
6684
6739
|
}
|
|
6685
6740
|
};
|
|
@@ -6689,7 +6744,7 @@ function clearState(node) {
|
|
|
6689
6744
|
function reset(id, resetTo) {
|
|
6690
6745
|
const node = typeof id === "string" ? getNode$1(id) : id;
|
|
6691
6746
|
if (node) {
|
|
6692
|
-
const initial = (
|
|
6747
|
+
const initial = (n) => cloneAny(n.props.initial) || (n.type === "group" ? {} : n.type === "list" ? [] : void 0);
|
|
6693
6748
|
node._e.pause(node);
|
|
6694
6749
|
node.input(cloneAny(resetTo) || initial(node), false);
|
|
6695
6750
|
node.walk((child) => child.input(initial(child), false));
|
|
@@ -6741,7 +6796,7 @@ const traps = {
|
|
|
6741
6796
|
each: trap(eachChild),
|
|
6742
6797
|
emit: trap(emit$1),
|
|
6743
6798
|
find: trap(find),
|
|
6744
|
-
on: trap(on
|
|
6799
|
+
on: trap(on),
|
|
6745
6800
|
off: trap(off),
|
|
6746
6801
|
parent: trap(false, setParent),
|
|
6747
6802
|
plugins: trap(false),
|
|
@@ -6915,6 +6970,14 @@ function define(node, context, definition) {
|
|
|
6915
6970
|
type: node.type,
|
|
6916
6971
|
value: context.value
|
|
6917
6972
|
});
|
|
6973
|
+
if (definition.forceTypeProp) {
|
|
6974
|
+
if (node.props.type)
|
|
6975
|
+
node.props.originalType = node.props.type;
|
|
6976
|
+
context.props.type = definition.forceTypeProp;
|
|
6977
|
+
}
|
|
6978
|
+
if (definition.family) {
|
|
6979
|
+
context.props.family = definition.family;
|
|
6980
|
+
}
|
|
6918
6981
|
if (definition.features) {
|
|
6919
6982
|
definition.features.forEach((feature) => feature(node));
|
|
6920
6983
|
}
|
|
@@ -7041,7 +7104,7 @@ function walkTree(_node, context, callback, stopIfFalse = false) {
|
|
|
7041
7104
|
function resetConfig(node, context) {
|
|
7042
7105
|
const parent = node.parent || void 0;
|
|
7043
7106
|
context.config = createConfig(node.config._t, parent);
|
|
7044
|
-
node.walk((
|
|
7107
|
+
node.walk((n) => n.resetConfig());
|
|
7045
7108
|
}
|
|
7046
7109
|
function use(node, context, plugin2, run2 = true, library = true) {
|
|
7047
7110
|
if (Array.isArray(plugin2) || plugin2 instanceof Set) {
|
|
@@ -7119,7 +7182,7 @@ function getNode(node, _context, locator) {
|
|
|
7119
7182
|
pointer = node;
|
|
7120
7183
|
break;
|
|
7121
7184
|
default:
|
|
7122
|
-
pointer = pointer.children.find((
|
|
7185
|
+
pointer = pointer.children.find((c) => String(c.name) === String(name)) || select$2(pointer, name);
|
|
7123
7186
|
}
|
|
7124
7187
|
}
|
|
7125
7188
|
return pointer || void 0;
|
|
@@ -7142,7 +7205,7 @@ function find(node, _context, searchTerm, searcher) {
|
|
|
7142
7205
|
return bfs(node, searchTerm, searcher);
|
|
7143
7206
|
}
|
|
7144
7207
|
function bfs(tree, searchValue, searchGoal = "name") {
|
|
7145
|
-
const search = typeof searchGoal === "string" ? (
|
|
7208
|
+
const search = typeof searchGoal === "string" ? (n) => n[searchGoal] == searchValue : searchGoal;
|
|
7146
7209
|
const stack = [tree];
|
|
7147
7210
|
while (stack.length) {
|
|
7148
7211
|
const node = stack.shift();
|
|
@@ -7152,8 +7215,8 @@ function bfs(tree, searchValue, searchGoal = "name") {
|
|
|
7152
7215
|
}
|
|
7153
7216
|
return void 0;
|
|
7154
7217
|
}
|
|
7155
|
-
function getRoot(
|
|
7156
|
-
let node =
|
|
7218
|
+
function getRoot(n) {
|
|
7219
|
+
let node = n;
|
|
7157
7220
|
while (node.parent) {
|
|
7158
7221
|
node = node.parent;
|
|
7159
7222
|
}
|
|
@@ -7203,7 +7266,7 @@ function createConfig(target = {}, parent) {
|
|
|
7203
7266
|
if (node) {
|
|
7204
7267
|
node.emit(`config:${prop}`, value, false);
|
|
7205
7268
|
configChange(node, prop, value);
|
|
7206
|
-
node.walk((
|
|
7269
|
+
node.walk((n) => configChange(n, prop, value), true);
|
|
7207
7270
|
}
|
|
7208
7271
|
return didSet;
|
|
7209
7272
|
}
|
|
@@ -7422,36 +7485,36 @@ function sugar(node) {
|
|
|
7422
7485
|
function compile(expr) {
|
|
7423
7486
|
let provideTokens;
|
|
7424
7487
|
const requirements = /* @__PURE__ */ new Set();
|
|
7425
|
-
const
|
|
7488
|
+
const x = function expand(operand, tokens) {
|
|
7426
7489
|
return typeof operand === "function" ? operand(tokens) : operand;
|
|
7427
7490
|
};
|
|
7428
7491
|
const operatorRegistry = [
|
|
7429
7492
|
{
|
|
7430
|
-
"&&": (
|
|
7431
|
-
"||": (
|
|
7493
|
+
"&&": (l, r, t) => x(l, t) && x(r, t),
|
|
7494
|
+
"||": (l, r, t) => x(l, t) || x(r, t)
|
|
7432
7495
|
},
|
|
7433
7496
|
{
|
|
7434
|
-
"===": (
|
|
7435
|
-
"!==": (
|
|
7436
|
-
"==": (
|
|
7437
|
-
"!=": (
|
|
7438
|
-
">=": (
|
|
7439
|
-
"<=": (
|
|
7440
|
-
">": (
|
|
7441
|
-
"<": (
|
|
7497
|
+
"===": (l, r, t) => !!(x(l, t) === x(r, t)),
|
|
7498
|
+
"!==": (l, r, t) => !!(x(l, t) !== x(r, t)),
|
|
7499
|
+
"==": (l, r, t) => !!(x(l, t) == x(r, t)),
|
|
7500
|
+
"!=": (l, r, t) => !!(x(l, t) != x(r, t)),
|
|
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)),
|
|
7504
|
+
"<": (l, r, t) => !!(x(l, t) < x(r, t))
|
|
7442
7505
|
},
|
|
7443
7506
|
{
|
|
7444
|
-
"+": (
|
|
7445
|
-
"-": (
|
|
7507
|
+
"+": (l, r, t) => x(l, t) + x(r, t),
|
|
7508
|
+
"-": (l, r, t) => x(l, t) - x(r, t)
|
|
7446
7509
|
},
|
|
7447
7510
|
{
|
|
7448
|
-
"*": (
|
|
7449
|
-
"/": (
|
|
7450
|
-
"%": (
|
|
7511
|
+
"*": (l, r, t) => x(l, t) * x(r, t),
|
|
7512
|
+
"/": (l, r, t) => x(l, t) / x(r, t),
|
|
7513
|
+
"%": (l, r, t) => x(l, t) % x(r, t)
|
|
7451
7514
|
}
|
|
7452
7515
|
];
|
|
7453
|
-
const operatorSymbols = operatorRegistry.reduce((s,
|
|
7454
|
-
return s.concat(Object.keys(
|
|
7516
|
+
const operatorSymbols = operatorRegistry.reduce((s, g) => {
|
|
7517
|
+
return s.concat(Object.keys(g));
|
|
7455
7518
|
}, []);
|
|
7456
7519
|
const operatorChars = new Set(operatorSymbols.map((key) => key.charAt(0)));
|
|
7457
7520
|
function getOp(symbols, char, p2, expression) {
|
|
@@ -7609,8 +7672,8 @@ function compile(expr) {
|
|
|
7609
7672
|
}
|
|
7610
7673
|
op = !op && left ? left : op;
|
|
7611
7674
|
if (!op && operand) {
|
|
7612
|
-
op = (v,
|
|
7613
|
-
return typeof v === "function" ? v(
|
|
7675
|
+
op = (v, t) => {
|
|
7676
|
+
return typeof v === "function" ? v(t) : v;
|
|
7614
7677
|
};
|
|
7615
7678
|
op = op.bind(null, evaluate(operand, step));
|
|
7616
7679
|
}
|
|
@@ -7636,7 +7699,7 @@ function compile(expr) {
|
|
|
7636
7699
|
if (tailCall) {
|
|
7637
7700
|
tailCall = tailCall.provide((subTokens) => {
|
|
7638
7701
|
const rootTokens = provideTokens(subTokens);
|
|
7639
|
-
const
|
|
7702
|
+
const t = subTokens.reduce((tokenSet, token2) => {
|
|
7640
7703
|
const isTail = token2 === tail || (tail === null || tail === void 0 ? void 0 : tail.startsWith(`${token2}(`));
|
|
7641
7704
|
if (isTail) {
|
|
7642
7705
|
const value = getAt(userFuncReturn, token2);
|
|
@@ -7646,7 +7709,7 @@ function compile(expr) {
|
|
|
7646
7709
|
}
|
|
7647
7710
|
return tokenSet;
|
|
7648
7711
|
}, {});
|
|
7649
|
-
return
|
|
7712
|
+
return t;
|
|
7650
7713
|
});
|
|
7651
7714
|
}
|
|
7652
7715
|
return tailCall ? tailCall() : userFuncReturn;
|
|
@@ -7729,7 +7792,7 @@ function clearErrors(id, clearChildren = true) {
|
|
|
7729
7792
|
warn(652, id);
|
|
7730
7793
|
}
|
|
7731
7794
|
}
|
|
7732
|
-
const FORMKIT_VERSION = "1.0.0-beta.
|
|
7795
|
+
const FORMKIT_VERSION = "1.0.0-beta.10";
|
|
7733
7796
|
function createLibraryPlugin(...libraries) {
|
|
7734
7797
|
const library = libraries.reduce((merged, lib) => extend(merged, lib), {});
|
|
7735
7798
|
const plugin2 = () => {
|
|
@@ -7746,8 +7809,9 @@ const outer = createSection("outer", () => ({
|
|
|
7746
7809
|
$el: "div",
|
|
7747
7810
|
attrs: {
|
|
7748
7811
|
key: "$id",
|
|
7812
|
+
"data-family": "$family || undefined",
|
|
7749
7813
|
"data-type": "$type",
|
|
7750
|
-
"data-multiple":
|
|
7814
|
+
"data-multiple": '$attrs.multiple || ($type != "select" && $options != undefined) || undefined',
|
|
7751
7815
|
"data-disabled": "$disabled || undefined",
|
|
7752
7816
|
"data-complete": "$state.complete || undefined",
|
|
7753
7817
|
"data-invalid": "$state.valid === false && $state.validationVisible || undefined",
|
|
@@ -7852,7 +7916,7 @@ const boxWrapper = createSection("wrapper", () => ({
|
|
|
7852
7916
|
"data-disabled": {
|
|
7853
7917
|
if: "$options.length",
|
|
7854
7918
|
then: void 0,
|
|
7855
|
-
else: "$disabled"
|
|
7919
|
+
else: "$disabled || undefined"
|
|
7856
7920
|
}
|
|
7857
7921
|
}
|
|
7858
7922
|
}));
|
|
@@ -7973,6 +8037,7 @@ const selectInput$1 = createSection("input", () => ({
|
|
|
7973
8037
|
disabled: "$disabled",
|
|
7974
8038
|
class: "$classes.input",
|
|
7975
8039
|
name: "$node.name",
|
|
8040
|
+
onChange: "$handlers.onChange",
|
|
7976
8041
|
onInput: "$handlers.selectInput",
|
|
7977
8042
|
onBlur: "$handlers.blur",
|
|
7978
8043
|
"aria-describedby": "$describedBy"
|
|
@@ -8107,8 +8172,8 @@ function options(node) {
|
|
|
8107
8172
|
return next(prop);
|
|
8108
8173
|
});
|
|
8109
8174
|
}
|
|
8110
|
-
function toggleChecked$1(node,
|
|
8111
|
-
const el =
|
|
8175
|
+
function toggleChecked$1(node, e) {
|
|
8176
|
+
const el = e.target;
|
|
8112
8177
|
if (el instanceof HTMLInputElement) {
|
|
8113
8178
|
const value = Array.isArray(node.props.options) ? optionValue(node.props.options, el.value) : el.value;
|
|
8114
8179
|
if (Array.isArray(node.props.options) && node.props.options.length) {
|
|
@@ -8182,19 +8247,19 @@ function localize$2(key, value) {
|
|
|
8182
8247
|
};
|
|
8183
8248
|
}
|
|
8184
8249
|
const isBrowser = typeof window !== "undefined";
|
|
8185
|
-
function removeHover(
|
|
8186
|
-
if (
|
|
8187
|
-
|
|
8250
|
+
function removeHover(e) {
|
|
8251
|
+
if (e.target instanceof HTMLElement && e.target.hasAttribute("data-file-hover")) {
|
|
8252
|
+
e.target.removeAttribute("data-file-hover");
|
|
8188
8253
|
}
|
|
8189
8254
|
}
|
|
8190
|
-
function preventStrayDrop(type,
|
|
8191
|
-
if (!(
|
|
8192
|
-
|
|
8255
|
+
function preventStrayDrop(type, e) {
|
|
8256
|
+
if (!(e.target instanceof HTMLInputElement)) {
|
|
8257
|
+
e.preventDefault();
|
|
8193
8258
|
} else if (type === "dragover") {
|
|
8194
|
-
|
|
8259
|
+
e.target.setAttribute("data-file-hover", "true");
|
|
8195
8260
|
}
|
|
8196
8261
|
if (type === "drop") {
|
|
8197
|
-
removeHover(
|
|
8262
|
+
removeHover(e);
|
|
8198
8263
|
}
|
|
8199
8264
|
}
|
|
8200
8265
|
function files(node) {
|
|
@@ -8209,14 +8274,14 @@ function files(node) {
|
|
|
8209
8274
|
window._FormKit_File_Drop = true;
|
|
8210
8275
|
}
|
|
8211
8276
|
}
|
|
8277
|
+
node.hook.input((value, next) => next(Array.isArray(value) ? value : []));
|
|
8212
8278
|
node.on("created", () => {
|
|
8213
|
-
if (!Array.isArray(node.value))
|
|
8279
|
+
if (!Array.isArray(node.value))
|
|
8214
8280
|
node.input([], false);
|
|
8215
|
-
}
|
|
8216
8281
|
if (!node.context)
|
|
8217
8282
|
return;
|
|
8218
|
-
node.context.handlers.resetFiles = (
|
|
8219
|
-
|
|
8283
|
+
node.context.handlers.resetFiles = (e) => {
|
|
8284
|
+
e.preventDefault();
|
|
8220
8285
|
node.input([]);
|
|
8221
8286
|
if (node.props.id && isBrowser) {
|
|
8222
8287
|
const el = document.getElementById(node.props.id);
|
|
@@ -8224,13 +8289,13 @@ function files(node) {
|
|
|
8224
8289
|
el.value = "";
|
|
8225
8290
|
}
|
|
8226
8291
|
};
|
|
8227
|
-
node.context.handlers.files = (
|
|
8292
|
+
node.context.handlers.files = (e) => {
|
|
8228
8293
|
var _a, _b;
|
|
8229
8294
|
const files2 = [];
|
|
8230
|
-
if (
|
|
8231
|
-
for (let i2 = 0; i2 <
|
|
8295
|
+
if (e.target instanceof HTMLInputElement && e.target.files) {
|
|
8296
|
+
for (let i2 = 0; i2 < e.target.files.length; i2++) {
|
|
8232
8297
|
let file2;
|
|
8233
|
-
if (file2 =
|
|
8298
|
+
if (file2 = e.target.files.item(i2)) {
|
|
8234
8299
|
files2.push({ name: file2.name, file: file2 });
|
|
8235
8300
|
}
|
|
8236
8301
|
}
|
|
@@ -8239,7 +8304,7 @@ function files(node) {
|
|
|
8239
8304
|
if (node.context)
|
|
8240
8305
|
node.context.files = files2;
|
|
8241
8306
|
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(
|
|
8307
|
+
(_b = node.props.attrs) === null || _b === void 0 ? void 0 : _b.onChange(e);
|
|
8243
8308
|
}
|
|
8244
8309
|
};
|
|
8245
8310
|
});
|
|
@@ -8248,8 +8313,8 @@ function handleSubmit(node, submitEvent) {
|
|
|
8248
8313
|
return __async(this, null, function* () {
|
|
8249
8314
|
submitEvent.preventDefault();
|
|
8250
8315
|
yield node.settled;
|
|
8251
|
-
node.walk((
|
|
8252
|
-
|
|
8316
|
+
node.walk((n) => {
|
|
8317
|
+
n.store.set(createMessage({
|
|
8253
8318
|
key: "submitted",
|
|
8254
8319
|
value: true,
|
|
8255
8320
|
visible: false
|
|
@@ -8259,6 +8324,9 @@ function handleSubmit(node, submitEvent) {
|
|
|
8259
8324
|
node.props.onSubmitRaw(submitEvent, node);
|
|
8260
8325
|
}
|
|
8261
8326
|
if (node.ledger.value("blocking")) {
|
|
8327
|
+
if (typeof node.props.onSubmitInvalid === "function") {
|
|
8328
|
+
node.props.onSubmitInvalid(node);
|
|
8329
|
+
}
|
|
8262
8330
|
if (node.props.incompleteMessage !== false) {
|
|
8263
8331
|
node.store.set(createMessage({
|
|
8264
8332
|
blocking: false,
|
|
@@ -8354,9 +8422,19 @@ function isSelected(node, option2) {
|
|
|
8354
8422
|
const value = optionValue(node.props.options, option2);
|
|
8355
8423
|
return Array.isArray(node._value) ? node._value.some((optionA) => shouldSelect(optionA, value)) : node.value === void 0 && !option2 || shouldSelect(value, node._value);
|
|
8356
8424
|
}
|
|
8357
|
-
function
|
|
8358
|
-
|
|
8359
|
-
|
|
8425
|
+
function deferChange(node, e) {
|
|
8426
|
+
return __async(this, null, function* () {
|
|
8427
|
+
var _a;
|
|
8428
|
+
if (typeof ((_a = node.props.attrs) === null || _a === void 0 ? void 0 : _a.onChange) === "function") {
|
|
8429
|
+
yield new Promise((r) => setTimeout(r, 0));
|
|
8430
|
+
yield node.settled;
|
|
8431
|
+
node.props.attrs.onChange(e);
|
|
8432
|
+
}
|
|
8433
|
+
});
|
|
8434
|
+
}
|
|
8435
|
+
function selectInput(node, e) {
|
|
8436
|
+
const target = e.target;
|
|
8437
|
+
const value = target.hasAttribute("multiple") ? Array.from(target.selectedOptions).map((o) => optionValue(node.props.options, o.value)) : optionValue(node.props.options, target.value);
|
|
8360
8438
|
node.input(value);
|
|
8361
8439
|
}
|
|
8362
8440
|
function applyPlaceholder(options2, placeholder) {
|
|
@@ -8405,6 +8483,7 @@ function select$1(node) {
|
|
|
8405
8483
|
}
|
|
8406
8484
|
if ((_b = node.context) === null || _b === void 0 ? void 0 : _b.handlers) {
|
|
8407
8485
|
node.context.handlers.selectInput = selectInput.bind(null, node);
|
|
8486
|
+
node.context.handlers.onChange = deferChange.bind(null, node);
|
|
8408
8487
|
}
|
|
8409
8488
|
if ((_c = node.context) === null || _c === void 0 ? void 0 : _c.fns) {
|
|
8410
8489
|
node.context.fns.isSelected = isSelected.bind(null, node);
|
|
@@ -8513,30 +8592,38 @@ function $root(section) {
|
|
|
8513
8592
|
const button = {
|
|
8514
8593
|
schema: outer(messages(message("$message.value")), wrapper(buttonInput(icon("prefix"), prefix(), buttonLabel("$label || $ui.submit.value"), suffix(), icon("suffix"))), help("$help")),
|
|
8515
8594
|
type: "input",
|
|
8595
|
+
family: "button",
|
|
8516
8596
|
props: [],
|
|
8517
8597
|
features: [localize$2("submit"), ignore]
|
|
8518
8598
|
};
|
|
8519
8599
|
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(), {
|
|
8600
|
+
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
8601
|
bind: "$option.attrs",
|
|
8522
8602
|
attrs: {
|
|
8523
8603
|
id: "$option.attrs.id",
|
|
8524
8604
|
value: "$option.value",
|
|
8525
8605
|
checked: "$fns.isChecked($option.value)"
|
|
8526
8606
|
}
|
|
8527
|
-
}), decorator(), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options
|
|
8607
|
+
}), decorator(icon("decorator")), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options == undefined && $help", help("$help")), messages(message("$message.value"))),
|
|
8528
8608
|
type: "input",
|
|
8609
|
+
family: "box",
|
|
8529
8610
|
props: ["options", "onValue", "offValue"],
|
|
8530
|
-
features: [
|
|
8611
|
+
features: [
|
|
8612
|
+
options,
|
|
8613
|
+
checkboxes,
|
|
8614
|
+
defaultIcon("decorator", "checkboxDecorator")
|
|
8615
|
+
]
|
|
8531
8616
|
};
|
|
8532
8617
|
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("
|
|
8618
|
+
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
8619
|
type: "input",
|
|
8620
|
+
family: "text",
|
|
8535
8621
|
props: [],
|
|
8536
8622
|
features: [
|
|
8537
8623
|
files,
|
|
8538
|
-
defaultIcon("fileItem", "
|
|
8539
|
-
defaultIcon("fileRemove", "
|
|
8624
|
+
defaultIcon("fileItem", "fileItem"),
|
|
8625
|
+
defaultIcon("fileRemove", "fileRemove"),
|
|
8626
|
+
defaultIcon("noFiles", "noFiles")
|
|
8540
8627
|
]
|
|
8541
8628
|
};
|
|
8542
8629
|
const form = {
|
|
@@ -8571,23 +8658,24 @@ const list$1 = {
|
|
|
8571
8658
|
features: [disables]
|
|
8572
8659
|
};
|
|
8573
8660
|
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(), {
|
|
8661
|
+
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
8662
|
bind: "$option.attrs",
|
|
8576
8663
|
attrs: {
|
|
8577
8664
|
id: "$option.attrs.id",
|
|
8578
8665
|
value: "$option.value",
|
|
8579
8666
|
checked: "$fns.isChecked($option.value)"
|
|
8580
8667
|
}
|
|
8581
|
-
}), decorator(), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options
|
|
8668
|
+
}), decorator(icon("decorator")), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))), $if("$options == undefined && $help", help("$help")), messages(message("$message.value"))),
|
|
8582
8669
|
type: "input",
|
|
8670
|
+
family: "box",
|
|
8583
8671
|
props: ["options", "onValue", "offValue"],
|
|
8584
|
-
features: [options, radios]
|
|
8672
|
+
features: [options, radios, defaultIcon("decorator", "radioDecorator")]
|
|
8585
8673
|
};
|
|
8586
8674
|
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"))),
|
|
8675
|
+
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
8676
|
type: "input",
|
|
8589
8677
|
props: ["options", "placeholder"],
|
|
8590
|
-
features: [options, select$1, defaultIcon("select", "
|
|
8678
|
+
features: [options, select$1, defaultIcon("select", "select")]
|
|
8591
8679
|
};
|
|
8592
8680
|
const textarea = {
|
|
8593
8681
|
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textareaInput(), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
@@ -8598,6 +8686,7 @@ const textarea = {
|
|
|
8598
8686
|
const text = {
|
|
8599
8687
|
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textInput(), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
8600
8688
|
type: "input",
|
|
8689
|
+
family: "text",
|
|
8601
8690
|
props: [],
|
|
8602
8691
|
features: []
|
|
8603
8692
|
};
|
|
@@ -8671,8 +8760,8 @@ const between = function between2({ value }, from, to) {
|
|
|
8671
8760
|
const val = 1 * value;
|
|
8672
8761
|
from = Number(from);
|
|
8673
8762
|
to = Number(to);
|
|
8674
|
-
const [
|
|
8675
|
-
return val >= 1 *
|
|
8763
|
+
const [a, b] = from <= to ? [from, to] : [to, from];
|
|
8764
|
+
return val >= 1 * a && val <= 1 * b;
|
|
8676
8765
|
}
|
|
8677
8766
|
return false;
|
|
8678
8767
|
};
|
|
@@ -8791,7 +8880,7 @@ const url = function url2({ value }, ...stack) {
|
|
|
8791
8880
|
const protocols = stack.length ? stack : ["http:", "https:"];
|
|
8792
8881
|
const url3 = new URL(String(value));
|
|
8793
8882
|
return protocols.includes(url3.protocol);
|
|
8794
|
-
} catch (
|
|
8883
|
+
} catch (e) {
|
|
8795
8884
|
return false;
|
|
8796
8885
|
}
|
|
8797
8886
|
};
|
|
@@ -9050,7 +9139,7 @@ function run(current, validations, node, state, removeImmediately, complete) {
|
|
|
9050
9139
|
if ((!empty(node.value) || !validation.skipEmpty) && (state.isPassing || validation.force)) {
|
|
9051
9140
|
if (validation.queued) {
|
|
9052
9141
|
runRule(validation, node, (result) => {
|
|
9053
|
-
result instanceof Promise ? result.then((
|
|
9142
|
+
result instanceof Promise ? result.then((r) => next(true, r)) : next(false, result);
|
|
9054
9143
|
});
|
|
9055
9144
|
} else {
|
|
9056
9145
|
run(current + 1, validations, node, state, removeImmediately, complete);
|
|
@@ -9247,7 +9336,7 @@ function date2(date3) {
|
|
|
9247
9336
|
function order(first, second) {
|
|
9248
9337
|
return Number(first) >= Number(second) ? [second, first] : [first, second];
|
|
9249
9338
|
}
|
|
9250
|
-
const ui$
|
|
9339
|
+
const ui$s = {
|
|
9251
9340
|
add: "Add",
|
|
9252
9341
|
remove: "Remove",
|
|
9253
9342
|
removeAll: "Remove all",
|
|
@@ -9255,7 +9344,7 @@ const ui$q = {
|
|
|
9255
9344
|
submit: "Submit",
|
|
9256
9345
|
noFiles: "No file chosen"
|
|
9257
9346
|
};
|
|
9258
|
-
const validation$
|
|
9347
|
+
const validation$s = {
|
|
9259
9348
|
accepted({ name }) {
|
|
9260
9349
|
return `Please accept the ${name}.`;
|
|
9261
9350
|
},
|
|
@@ -9284,8 +9373,8 @@ const validation$q = {
|
|
|
9284
9373
|
if (isNaN(args[0]) || isNaN(args[1])) {
|
|
9285
9374
|
return `This field was configured incorrectly and can\u2019t be submitted.`;
|
|
9286
9375
|
}
|
|
9287
|
-
const [
|
|
9288
|
-
return `${sentence(name)} must be between ${
|
|
9376
|
+
const [a, b] = order(args[0], args[1]);
|
|
9377
|
+
return `${sentence(name)} must be between ${a} and ${b}.`;
|
|
9289
9378
|
},
|
|
9290
9379
|
confirm({ name }) {
|
|
9291
9380
|
return `${sentence(name)} does not match.`;
|
|
@@ -9359,8 +9448,8 @@ const validation$q = {
|
|
|
9359
9448
|
};
|
|
9360
9449
|
var en = /* @__PURE__ */ Object.freeze({
|
|
9361
9450
|
__proto__: null,
|
|
9362
|
-
ui: ui$
|
|
9363
|
-
validation: validation$
|
|
9451
|
+
ui: ui$s,
|
|
9452
|
+
validation: validation$s
|
|
9364
9453
|
});
|
|
9365
9454
|
function createI18nPlugin(registry2) {
|
|
9366
9455
|
return function i18nPlugin(node) {
|
|
@@ -9377,11 +9466,11 @@ function createI18nPlugin(registry2) {
|
|
|
9377
9466
|
var _a, _b;
|
|
9378
9467
|
const key = ((_a = fragment2.meta) === null || _a === void 0 ? void 0 : _a.messageKey) || fragment2.key;
|
|
9379
9468
|
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) ?
|
|
9469
|
+
const t = locale2[fragment2.type][key];
|
|
9470
|
+
if (typeof t === "function") {
|
|
9471
|
+
fragment2.value = Array.isArray((_b = fragment2.meta) === null || _b === void 0 ? void 0 : _b.i18nArgs) ? t(...fragment2.meta.i18nArgs) : t(fragment2);
|
|
9383
9472
|
} else {
|
|
9384
|
-
fragment2.value =
|
|
9473
|
+
fragment2.value = t;
|
|
9385
9474
|
}
|
|
9386
9475
|
}
|
|
9387
9476
|
return next(fragment2);
|
|
@@ -9424,10 +9513,14 @@ function generateClasses(classes) {
|
|
|
9424
9513
|
}
|
|
9425
9514
|
function addClassesBySection(node, _sectionKey, classesByType) {
|
|
9426
9515
|
const type = node.props.type;
|
|
9516
|
+
const family = node.props.family;
|
|
9427
9517
|
let classList = "";
|
|
9428
9518
|
if (classesByType.global) {
|
|
9429
9519
|
classList += classesByType.global + " ";
|
|
9430
9520
|
}
|
|
9521
|
+
if (classesByType[`family:${family}`]) {
|
|
9522
|
+
classList += classesByType[`family:${family}`] + " ";
|
|
9523
|
+
}
|
|
9431
9524
|
if (classesByType[type]) {
|
|
9432
9525
|
classList += classesByType[type];
|
|
9433
9526
|
}
|
|
@@ -9476,8 +9569,8 @@ function createThemePlugin(theme2, icons, iconLoaderUrl, iconLoader) {
|
|
|
9476
9569
|
const clickHandlerProp = `on${sectionKey.charAt(0).toUpperCase()}${sectionKey.slice(1)}IconClick`;
|
|
9477
9570
|
const handlerFunction = node.props[clickHandlerProp];
|
|
9478
9571
|
if (handlerFunction && typeof handlerFunction === "function") {
|
|
9479
|
-
return (
|
|
9480
|
-
return handlerFunction(node,
|
|
9572
|
+
return (e) => {
|
|
9573
|
+
return handlerFunction(node, e);
|
|
9481
9574
|
};
|
|
9482
9575
|
}
|
|
9483
9576
|
return void 0;
|
|
@@ -9579,14 +9672,14 @@ function getRemoteIcon(iconName, iconLoaderUrl) {
|
|
|
9579
9672
|
const fetchUrl = typeof iconLoaderUrl === "function" ? iconLoaderUrl(iconName) : `https://cdn.jsdelivr.net/npm/@formkit/icons@${formkitVersion}/dist/icons/${iconName}.svg`;
|
|
9580
9673
|
if (!isClient)
|
|
9581
9674
|
return void 0;
|
|
9582
|
-
return fetch(`${fetchUrl}`).then((
|
|
9583
|
-
const icon2 = yield
|
|
9675
|
+
return fetch(`${fetchUrl}`).then((r) => __async(this, null, function* () {
|
|
9676
|
+
const icon2 = yield r.text();
|
|
9584
9677
|
if (icon2.startsWith("<svg")) {
|
|
9585
9678
|
return icon2;
|
|
9586
9679
|
}
|
|
9587
9680
|
return void 0;
|
|
9588
|
-
})).catch((
|
|
9589
|
-
console.error(
|
|
9681
|
+
})).catch((e) => {
|
|
9682
|
+
console.error(e);
|
|
9590
9683
|
return void 0;
|
|
9591
9684
|
});
|
|
9592
9685
|
}
|
|
@@ -9741,25 +9834,25 @@ function parseSchema(library, schema) {
|
|
|
9741
9834
|
function parseConditionAttr(attr, _default2) {
|
|
9742
9835
|
var _a, _b;
|
|
9743
9836
|
const condition = provider(compile(attr.if));
|
|
9744
|
-
let
|
|
9745
|
-
let
|
|
9837
|
+
let b = () => _default2;
|
|
9838
|
+
let a = () => _default2;
|
|
9746
9839
|
if (typeof attr.then === "object") {
|
|
9747
|
-
|
|
9840
|
+
a = parseAttrs(attr.then, void 0);
|
|
9748
9841
|
} else if (typeof attr.then === "string" && ((_a = attr.then) === null || _a === void 0 ? void 0 : _a.startsWith("$"))) {
|
|
9749
|
-
|
|
9842
|
+
a = provider(compile(attr.then));
|
|
9750
9843
|
} else {
|
|
9751
|
-
|
|
9844
|
+
a = () => attr.then;
|
|
9752
9845
|
}
|
|
9753
9846
|
if (has(attr, "else")) {
|
|
9754
9847
|
if (typeof attr.else === "object") {
|
|
9755
|
-
|
|
9848
|
+
b = parseAttrs(attr.else);
|
|
9756
9849
|
} else if (typeof attr.else === "string" && ((_b = attr.else) === null || _b === void 0 ? void 0 : _b.startsWith("$"))) {
|
|
9757
|
-
|
|
9850
|
+
b = provider(compile(attr.else));
|
|
9758
9851
|
} else {
|
|
9759
|
-
|
|
9852
|
+
b = () => attr.else;
|
|
9760
9853
|
}
|
|
9761
9854
|
}
|
|
9762
|
-
return () => condition() ?
|
|
9855
|
+
return () => condition() ? a() : b();
|
|
9763
9856
|
}
|
|
9764
9857
|
function parseAttrs(unparsedAttrs, bindExp, _default2 = {}) {
|
|
9765
9858
|
const explicitAttrs = new Set(Object.keys(unparsedAttrs || {}));
|
|
@@ -9801,7 +9894,7 @@ function parseSchema(library, schema) {
|
|
|
9801
9894
|
}
|
|
9802
9895
|
}
|
|
9803
9896
|
return () => {
|
|
9804
|
-
const attrs = {};
|
|
9897
|
+
const attrs = Array.isArray(unparsedAttrs) ? [] : {};
|
|
9805
9898
|
setters.forEach((setter) => setter(attrs));
|
|
9806
9899
|
return attrs;
|
|
9807
9900
|
};
|
|
@@ -9852,8 +9945,8 @@ function parseSchema(library, schema) {
|
|
|
9852
9945
|
} else if (Array.isArray(node.children)) {
|
|
9853
9946
|
children = createElements(library2, node.children);
|
|
9854
9947
|
} else {
|
|
9855
|
-
const [childCondition,
|
|
9856
|
-
children = (iterationData) => childCondition && childCondition() ?
|
|
9948
|
+
const [childCondition, c, a] = parseCondition2(library2, node.children);
|
|
9949
|
+
children = (iterationData) => childCondition && childCondition() ? c && c(iterationData) : a && a(iterationData);
|
|
9857
9950
|
}
|
|
9858
9951
|
}
|
|
9859
9952
|
if (isComponent$1(node)) {
|
|
@@ -9870,13 +9963,13 @@ function parseSchema(library, schema) {
|
|
|
9870
9963
|
(_a = instanceScopes.get(instanceKey)) === null || _a === void 0 ? void 0 : _a.unshift(slotData2);
|
|
9871
9964
|
if (iterationData)
|
|
9872
9965
|
(_b = instanceScopes.get(instanceKey)) === null || _b === void 0 ? void 0 : _b.unshift(iterationData);
|
|
9873
|
-
const
|
|
9966
|
+
const c = produceChildren(iterationData);
|
|
9874
9967
|
if (slotData2)
|
|
9875
9968
|
(_c = instanceScopes.get(instanceKey)) === null || _c === void 0 ? void 0 : _c.shift();
|
|
9876
9969
|
if (iterationData)
|
|
9877
9970
|
(_d = instanceScopes.get(instanceKey)) === null || _d === void 0 ? void 0 : _d.shift();
|
|
9878
9971
|
instanceKey = currentKey;
|
|
9879
|
-
return
|
|
9972
|
+
return c;
|
|
9880
9973
|
}
|
|
9881
9974
|
};
|
|
9882
9975
|
};
|
|
@@ -9921,7 +10014,7 @@ function parseSchema(library, schema) {
|
|
|
9921
10014
|
return children(iterationData);
|
|
9922
10015
|
const el = resolve2 ? resolveComponent(element) : element;
|
|
9923
10016
|
const slots = (children === null || children === void 0 ? void 0 : children.slot) ? createSlots(children, iterationData) : null;
|
|
9924
|
-
return h
|
|
10017
|
+
return h(el, attrs(), slots || (children ? children(iterationData) : []));
|
|
9925
10018
|
}
|
|
9926
10019
|
return typeof alternate === "function" ? alternate(iterationData) : alternate;
|
|
9927
10020
|
};
|
|
@@ -10027,7 +10120,7 @@ function createRenderFn(instanceCreator, data, instanceKey2) {
|
|
|
10027
10120
|
}, {});
|
|
10028
10121
|
}, instanceKey2);
|
|
10029
10122
|
}
|
|
10030
|
-
let i
|
|
10123
|
+
let i = 0;
|
|
10031
10124
|
const FormKitSchema = defineComponent({
|
|
10032
10125
|
name: "FormKitSchema",
|
|
10033
10126
|
props: {
|
|
@@ -10046,14 +10139,14 @@ const FormKitSchema = defineComponent({
|
|
|
10046
10139
|
},
|
|
10047
10140
|
setup(props2, context) {
|
|
10048
10141
|
const instance = getCurrentInstance();
|
|
10049
|
-
let instanceKey2 = Symbol(String(i
|
|
10142
|
+
let instanceKey2 = Symbol(String(i++));
|
|
10050
10143
|
instanceScopes.set(instanceKey2, []);
|
|
10051
10144
|
let provider = parseSchema(props2.library, props2.schema);
|
|
10052
10145
|
let render2;
|
|
10053
10146
|
let data;
|
|
10054
10147
|
watch$1(() => props2.schema, (newSchema, oldSchema) => {
|
|
10055
10148
|
var _a;
|
|
10056
|
-
instanceKey2 = Symbol(String(i
|
|
10149
|
+
instanceKey2 = Symbol(String(i++));
|
|
10057
10150
|
provider = parseSchema(props2.library, props2.schema);
|
|
10058
10151
|
render2 = createRenderFn(provider, data, instanceKey2);
|
|
10059
10152
|
if (newSchema === oldSchema) {
|
|
@@ -10148,7 +10241,8 @@ const FormKit = defineComponent({
|
|
|
10148
10241
|
"update:modelValue": (_value) => true,
|
|
10149
10242
|
node: (node) => !!node,
|
|
10150
10243
|
submit: (_data, _node) => true,
|
|
10151
|
-
submitRaw: (_event, _node) => true
|
|
10244
|
+
submitRaw: (_event, _node) => true,
|
|
10245
|
+
submitInvalid: (_node) => true
|
|
10152
10246
|
},
|
|
10153
10247
|
inheritAttrs: false,
|
|
10154
10248
|
setup(props2, context) {
|
|
@@ -10158,7 +10252,7 @@ const FormKit = defineComponent({
|
|
|
10158
10252
|
if (node.props.definition.component) {
|
|
10159
10253
|
return () => {
|
|
10160
10254
|
var _a;
|
|
10161
|
-
return h
|
|
10255
|
+
return h((_a = node.props.definition) === null || _a === void 0 ? void 0 : _a.component, {
|
|
10162
10256
|
context: node.context
|
|
10163
10257
|
}, __spreadValues({}, context.slots));
|
|
10164
10258
|
};
|
|
@@ -10176,7 +10270,7 @@ const FormKit = defineComponent({
|
|
|
10176
10270
|
context.emit("node", node);
|
|
10177
10271
|
const library = node.props.definition.library;
|
|
10178
10272
|
context.expose({ node });
|
|
10179
|
-
return () => h
|
|
10273
|
+
return () => h(FormKitSchema, { schema: schema.value, data: node.context, library }, __spreadValues({}, context.slots));
|
|
10180
10274
|
}
|
|
10181
10275
|
});
|
|
10182
10276
|
function createPlugin$4(app, options2) {
|
|
@@ -10331,7 +10425,7 @@ function classesToNodeProps(node, props2) {
|
|
|
10331
10425
|
function onlyListeners(props2) {
|
|
10332
10426
|
if (!props2)
|
|
10333
10427
|
return {};
|
|
10334
|
-
const knownListeners = ["Submit", "SubmitRaw"].reduce((listeners, listener) => {
|
|
10428
|
+
const knownListeners = ["Submit", "SubmitRaw", "SubmitInvalid"].reduce((listeners, listener) => {
|
|
10335
10429
|
const name = `on${listener}`;
|
|
10336
10430
|
if (name in props2) {
|
|
10337
10431
|
if (typeof props2[name] === "function") {
|
|
@@ -10516,9 +10610,9 @@ function createInput(schemaOrComponent, definitionOptions = {}) {
|
|
|
10516
10610
|
return definition;
|
|
10517
10611
|
}
|
|
10518
10612
|
const vueBindings = function vueBindings2(node) {
|
|
10519
|
-
node.ledger.count("blocking", (
|
|
10613
|
+
node.ledger.count("blocking", (m) => m.blocking);
|
|
10520
10614
|
const isValid2 = ref(!node.ledger.value("blocking"));
|
|
10521
|
-
node.ledger.count("errors", (
|
|
10615
|
+
node.ledger.count("errors", (m) => m.type === "error");
|
|
10522
10616
|
const hasErrors = ref(!!node.ledger.value("errors"));
|
|
10523
10617
|
let hasTicked = false;
|
|
10524
10618
|
nextTick(() => {
|
|
@@ -10620,18 +10714,18 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10620
10714
|
eq
|
|
10621
10715
|
},
|
|
10622
10716
|
handlers: {
|
|
10623
|
-
blur: (
|
|
10717
|
+
blur: (e) => {
|
|
10624
10718
|
node.store.set(createMessage({ key: "blurred", visible: false, value: true }));
|
|
10625
10719
|
if (typeof node.props.attrs.onBlur === "function") {
|
|
10626
|
-
node.props.attrs.onBlur(
|
|
10720
|
+
node.props.attrs.onBlur(e);
|
|
10627
10721
|
}
|
|
10628
10722
|
},
|
|
10629
10723
|
touch: () => {
|
|
10630
10724
|
node.store.set(createMessage({ key: "dirty", visible: false, value: true }));
|
|
10631
10725
|
},
|
|
10632
|
-
DOMInput: (
|
|
10633
|
-
node.input(
|
|
10634
|
-
node.emit("dom-input-event",
|
|
10726
|
+
DOMInput: (e) => {
|
|
10727
|
+
node.input(e.target.value);
|
|
10728
|
+
node.emit("dom-input-event", e);
|
|
10635
10729
|
}
|
|
10636
10730
|
},
|
|
10637
10731
|
help: node.props.help,
|
|
@@ -10652,6 +10746,7 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10652
10746
|
validationVisible
|
|
10653
10747
|
},
|
|
10654
10748
|
type: node.props.type,
|
|
10749
|
+
family: node.props.family,
|
|
10655
10750
|
ui,
|
|
10656
10751
|
value,
|
|
10657
10752
|
classes
|
|
@@ -10663,6 +10758,7 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10663
10758
|
triggerRef(value);
|
|
10664
10759
|
triggerRef(_value);
|
|
10665
10760
|
}
|
|
10761
|
+
node.props._init = cloneAny(node.value);
|
|
10666
10762
|
});
|
|
10667
10763
|
node.on("settled", ({ payload: isSettled }) => {
|
|
10668
10764
|
context.state.settled = isSettled;
|
|
@@ -10711,7 +10807,7 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10711
10807
|
value.value = _value.value = payload;
|
|
10712
10808
|
triggerRef(value);
|
|
10713
10809
|
node.emit("modelUpdated");
|
|
10714
|
-
if (!context.state.dirty && node.isCreated && hasTicked)
|
|
10810
|
+
if (!context.state.dirty && node.isCreated && hasTicked && !eq(value.value, node.props._init))
|
|
10715
10811
|
context.handlers.touch();
|
|
10716
10812
|
if (isComplete && node.type === "input" && hasErrors.value && !undefine(node.props.preserveErrors)) {
|
|
10717
10813
|
node.store.filter((message2) => {
|
|
@@ -10729,8 +10825,8 @@ const vueBindings = function vueBindings2(node) {
|
|
|
10729
10825
|
context.state[message2.key] = !!message2.value;
|
|
10730
10826
|
}
|
|
10731
10827
|
});
|
|
10732
|
-
node.on("message-added", (
|
|
10733
|
-
node.on("message-updated", (
|
|
10828
|
+
node.on("message-added", (e) => updateState(e.payload));
|
|
10829
|
+
node.on("message-updated", (e) => updateState(e.payload));
|
|
10734
10830
|
node.on("message-removed", ({ payload: message2 }) => {
|
|
10735
10831
|
delete ui[message2.key];
|
|
10736
10832
|
delete availableMessages[message2.key];
|
|
@@ -10767,6 +10863,7 @@ const defaultConfig = (options2 = {}) => {
|
|
|
10767
10863
|
}, !locale2 ? {} : { config: { locale: locale2 } }), nodeOptions || {}, true);
|
|
10768
10864
|
};
|
|
10769
10865
|
defineComponent({
|
|
10866
|
+
name: "FormKitIcon",
|
|
10770
10867
|
props: {
|
|
10771
10868
|
icon: {
|
|
10772
10869
|
type: String,
|
|
@@ -10813,7 +10910,7 @@ defineComponent({
|
|
|
10813
10910
|
}
|
|
10814
10911
|
return () => {
|
|
10815
10912
|
if (icon2.value) {
|
|
10816
|
-
return h
|
|
10913
|
+
return h("span", {
|
|
10817
10914
|
class: "formkit-icon",
|
|
10818
10915
|
innerHTML: icon2.value
|
|
10819
10916
|
});
|
|
@@ -10910,207 +11007,8 @@ plugin(({ addVariant }) => {
|
|
|
10910
11007
|
'[data-message-type="error"]&'
|
|
10911
11008
|
]);
|
|
10912
11009
|
});
|
|
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";
|
|
11010
|
+
const EXPERIMENT_PREFIX = "_form_experiments_";
|
|
11011
|
+
const DEFAULT_TTL_SECS = 60 * 60 * 24 * 30;
|
|
11114
11012
|
const urlParams = new URLSearchParams(window.location.search);
|
|
11115
11013
|
const DEBUG = urlParams.get("fdbg");
|
|
11116
11014
|
function dbg() {
|
|
@@ -11127,17 +11025,33 @@ function rollbar(type, msg) {
|
|
|
11127
11025
|
}
|
|
11128
11026
|
}
|
|
11129
11027
|
}
|
|
11028
|
+
function cookie(name, value, ttl, path, samesite, secure, domain) {
|
|
11029
|
+
name = name.replace(/\s/g, "_");
|
|
11030
|
+
var isSet2 = arguments.length > 1;
|
|
11031
|
+
try {
|
|
11032
|
+
if (isSet2) {
|
|
11033
|
+
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"));
|
|
11034
|
+
}
|
|
11035
|
+
return decodeURIComponent((("; " + document.cookie).split("; " + name + "=")[1] || "").split(";")[0]);
|
|
11036
|
+
} catch (e) {
|
|
11037
|
+
console.warn("cookies unsupported");
|
|
11038
|
+
return null;
|
|
11039
|
+
}
|
|
11040
|
+
}
|
|
11130
11041
|
function chooseVariant(exp) {
|
|
11131
|
-
let variant = null,
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
variant =
|
|
11042
|
+
let variant = null, fromCache = false;
|
|
11043
|
+
if (!exp.noCache) {
|
|
11044
|
+
const cookieVal = cookie(EXPERIMENT_PREFIX + exp.name);
|
|
11045
|
+
variant = cookieVal ? JSON.parse(cookieVal) : null;
|
|
11046
|
+
}
|
|
11047
|
+
if (variant && variant.name) {
|
|
11135
11048
|
fromCache = true;
|
|
11136
11049
|
} else {
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11050
|
+
variant = exp.variants[Math.floor(Math.random() * exp.variants.length)];
|
|
11051
|
+
var ttl = DEFAULT_TTL_SECS;
|
|
11052
|
+
var path = "/";
|
|
11053
|
+
var samesite = "Strict";
|
|
11054
|
+
cookie(EXPERIMENT_PREFIX + exp.name, JSON.stringify(variant), ttl, path, samesite);
|
|
11141
11055
|
}
|
|
11142
11056
|
dbg("Chose variant:", variant, "fromCache:", fromCache);
|
|
11143
11057
|
return { variant, fromCache };
|
|
@@ -11170,12 +11084,8 @@ const flattenObj = (obj) => {
|
|
|
11170
11084
|
function prepData(formData) {
|
|
11171
11085
|
const props2 = flattenObj(formData);
|
|
11172
11086
|
props2.vid = "";
|
|
11173
|
-
props2.sid = "";
|
|
11174
|
-
props2.cid = "";
|
|
11175
11087
|
if (typeof window.zar !== "undefined") {
|
|
11176
11088
|
props2.vid = window.zar.getVID();
|
|
11177
|
-
props2.sid = window.zar.getSID();
|
|
11178
|
-
props2.cid = window.zar.getCID();
|
|
11179
11089
|
}
|
|
11180
11090
|
const data = {
|
|
11181
11091
|
post_source: window.location.hostname,
|
|
@@ -11200,6 +11110,7 @@ const scrollAnchor = (formNode) => () => {
|
|
|
11200
11110
|
const anchor = document.getElementById(anchorId);
|
|
11201
11111
|
if (anchor) {
|
|
11202
11112
|
const pos = getCoords(anchor);
|
|
11113
|
+
dbg("scrollTo", pos);
|
|
11203
11114
|
window.scrollTo(pos.right, pos.top);
|
|
11204
11115
|
}
|
|
11205
11116
|
}
|
|
@@ -11208,14 +11119,20 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
11208
11119
|
if (!stepResult) {
|
|
11209
11120
|
return;
|
|
11210
11121
|
}
|
|
11211
|
-
scrollAnchor(formNode)();
|
|
11212
11122
|
var step_values = null;
|
|
11213
|
-
|
|
11214
|
-
|
|
11123
|
+
try {
|
|
11124
|
+
scrollAnchor(formNode)();
|
|
11125
|
+
if (stepHistory2.value.length > 0) {
|
|
11126
|
+
step_values = flattenObj(formNode.value[stepHistory2.value[stepHistory2.value.length - 1]] || {});
|
|
11127
|
+
}
|
|
11128
|
+
} catch (err) {
|
|
11129
|
+
const msg = "failed to prep fireStepEvent: " + err.toString();
|
|
11130
|
+
console.warn(msg);
|
|
11131
|
+
rollbar("warning", msg);
|
|
11215
11132
|
}
|
|
11216
|
-
const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
|
|
11217
11133
|
if (typeof window._analytics !== "undefined") {
|
|
11218
11134
|
try {
|
|
11135
|
+
const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
|
|
11219
11136
|
var body = {
|
|
11220
11137
|
"form_source": "formkit",
|
|
11221
11138
|
"form_id": form_id,
|
|
@@ -11323,12 +11240,12 @@ if (!Object.fromEntries) {
|
|
|
11323
11240
|
if (!entries || !entries[Symbol.iterator]) {
|
|
11324
11241
|
throw new Error("Object.fromEntries() requires a single iterable argument");
|
|
11325
11242
|
}
|
|
11326
|
-
const
|
|
11243
|
+
const o = {};
|
|
11327
11244
|
Object.keys(entries).forEach((key) => {
|
|
11328
|
-
const [
|
|
11329
|
-
|
|
11245
|
+
const [k, v] = entries[key];
|
|
11246
|
+
o[k] = v;
|
|
11330
11247
|
});
|
|
11331
|
-
return
|
|
11248
|
+
return o;
|
|
11332
11249
|
}
|
|
11333
11250
|
});
|
|
11334
11251
|
}
|
|
@@ -13155,8 +13072,8 @@ function parseTimezonePattern(pattern, string) {
|
|
|
13155
13072
|
function parseAnyDigitsSigned(string, valueCallback) {
|
|
13156
13073
|
return parseNumericPattern(numericPatterns.anyDigitsSigned, string, valueCallback);
|
|
13157
13074
|
}
|
|
13158
|
-
function parseNDigits(
|
|
13159
|
-
switch (
|
|
13075
|
+
function parseNDigits(n, string, valueCallback) {
|
|
13076
|
+
switch (n) {
|
|
13160
13077
|
case 1:
|
|
13161
13078
|
return parseNumericPattern(numericPatterns.singleDigit, string, valueCallback);
|
|
13162
13079
|
case 2:
|
|
@@ -13166,11 +13083,11 @@ function parseNDigits(n2, string, valueCallback) {
|
|
|
13166
13083
|
case 4:
|
|
13167
13084
|
return parseNumericPattern(numericPatterns.fourDigits, string, valueCallback);
|
|
13168
13085
|
default:
|
|
13169
|
-
return parseNumericPattern(new RegExp("^\\d{1," +
|
|
13086
|
+
return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), string, valueCallback);
|
|
13170
13087
|
}
|
|
13171
13088
|
}
|
|
13172
|
-
function parseNDigitsSigned(
|
|
13173
|
-
switch (
|
|
13089
|
+
function parseNDigitsSigned(n, string, valueCallback) {
|
|
13090
|
+
switch (n) {
|
|
13174
13091
|
case 1:
|
|
13175
13092
|
return parseNumericPattern(numericPatterns.singleDigitSigned, string, valueCallback);
|
|
13176
13093
|
case 2:
|
|
@@ -13180,7 +13097,7 @@ function parseNDigitsSigned(n2, string, valueCallback) {
|
|
|
13180
13097
|
case 4:
|
|
13181
13098
|
return parseNumericPattern(numericPatterns.fourDigitsSigned, string, valueCallback);
|
|
13182
13099
|
default:
|
|
13183
|
-
return parseNumericPattern(new RegExp("^-?\\d{1," +
|
|
13100
|
+
return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), string, valueCallback);
|
|
13184
13101
|
}
|
|
13185
13102
|
}
|
|
13186
13103
|
function dayPeriodEnumToHours(enumValue) {
|
|
@@ -14422,15 +14339,15 @@ function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, dirtyOpti
|
|
|
14422
14339
|
}
|
|
14423
14340
|
var uniquePrioritySetters = setters.map(function(setter2) {
|
|
14424
14341
|
return setter2.priority;
|
|
14425
|
-
}).sort(function(
|
|
14426
|
-
return
|
|
14342
|
+
}).sort(function(a, b) {
|
|
14343
|
+
return b - a;
|
|
14427
14344
|
}).filter(function(priority, index2, array) {
|
|
14428
14345
|
return array.indexOf(priority) === index2;
|
|
14429
14346
|
}).map(function(priority) {
|
|
14430
14347
|
return setters.filter(function(setter2) {
|
|
14431
14348
|
return setter2.priority === priority;
|
|
14432
|
-
}).sort(function(
|
|
14433
|
-
return
|
|
14349
|
+
}).sort(function(a, b) {
|
|
14350
|
+
return b.subPriority - a.subPriority;
|
|
14434
14351
|
});
|
|
14435
14352
|
}).map(function(setterArray) {
|
|
14436
14353
|
return setterArray[0];
|
|
@@ -14587,15 +14504,15 @@ function subYears(dirtyDate, dirtyAmount) {
|
|
|
14587
14504
|
return addYears(dirtyDate, -amount);
|
|
14588
14505
|
}
|
|
14589
14506
|
function convertToFP(fn, arity) {
|
|
14590
|
-
var
|
|
14591
|
-
if (
|
|
14592
|
-
return fn.apply(null,
|
|
14507
|
+
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
14508
|
+
if (a.length >= arity) {
|
|
14509
|
+
return fn.apply(null, a.slice(0, arity).reverse());
|
|
14593
14510
|
}
|
|
14594
14511
|
return function() {
|
|
14595
14512
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14596
14513
|
args[_key] = arguments[_key];
|
|
14597
14514
|
}
|
|
14598
|
-
return convertToFP(fn, arity,
|
|
14515
|
+
return convertToFP(fn, arity, a.concat(args));
|
|
14599
14516
|
};
|
|
14600
14517
|
}
|
|
14601
14518
|
var formatWithOptions = convertToFP(format, 3);
|
|
@@ -15467,7 +15384,7 @@ var script = defineComponent({
|
|
|
15467
15384
|
viewShown,
|
|
15468
15385
|
clearModelValue,
|
|
15469
15386
|
initialView,
|
|
15470
|
-
log: (
|
|
15387
|
+
log: (e) => console.log(e),
|
|
15471
15388
|
variables
|
|
15472
15389
|
};
|
|
15473
15390
|
}
|
|
@@ -15585,7 +15502,8 @@ const _sfc_main = {
|
|
|
15585
15502
|
modelValue: picked.value,
|
|
15586
15503
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => picked.value = $event),
|
|
15587
15504
|
upperLimit: new Date(),
|
|
15588
|
-
placeholder: "
|
|
15505
|
+
placeholder: "YYYY-MM-DD",
|
|
15506
|
+
typeable: false
|
|
15589
15507
|
}, null, 8, ["modelValue", "upperLimit"]);
|
|
15590
15508
|
};
|
|
15591
15509
|
}
|
|
@@ -15622,8 +15540,8 @@ const init = () => {
|
|
|
15622
15540
|
data.prepData = data.prepData || prepData;
|
|
15623
15541
|
data.fireStepEvent = data.fireStepEvent || fireStepEvent;
|
|
15624
15542
|
data.scrollAnchor = data.scrollAnchor || scrollAnchor;
|
|
15625
|
-
data.onEnter = (callback) => (
|
|
15626
|
-
if (
|
|
15543
|
+
data.onEnter = (callback) => (e) => {
|
|
15544
|
+
if (e.key === "Enter" || e.keyCode === 13) {
|
|
15627
15545
|
callback();
|
|
15628
15546
|
}
|
|
15629
15547
|
};
|