bhl-forms 0.2.0 → 0.2.1
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 +322 -142
- package/dist/bhl-forms.iife.js +7 -7
- package/dist/bhl-forms.modern.es.js +382 -278
- package/dist/bhl-forms.modern.iife.js +10 -10
- package/dist/bhl-forms.modern.umd.js +10 -10
- package/dist/bhl-forms.umd.js +7 -7
- package/dist/forms/accidentsAndInjuries.es.js +33 -21
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +27 -17
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/appraisals.json +1 -1
- package/dist/forms/childAndFamily.es.js +33 -21
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/civilLawsuit.es.js +33 -21
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +27 -17
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/coins.json +1 -1
- package/dist/forms/contracts.es.js +94 -32
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +33 -21
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +33 -21
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalLegal.es.js +33 -21
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalPopUnder.es.js +33 -21
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderTF.es.js +33 -21
- package/dist/forms/generalLegalPopUnderTF.iife.js +1 -1
- package/dist/forms/generalLegalPopUnderTF.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +33 -21
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +33 -21
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/malpractice.es.js +94 -32
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +27 -17
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/mechanics.json +1 -1
- package/dist/forms/realEstate.es.js +33 -21
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +94 -32
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +183 -81
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +90 -29
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/testRedirects.es.js +19 -10
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/testRedirects.json +1 -1
- package/dist/forms/vets.es.js +27 -17
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/vets.json +1 -1
- package/dist/forms/willsAndTrusts.es.js +33 -21
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +4 -4
|
@@ -10279,10 +10279,6 @@ function init$2(obj) {
|
|
|
10279
10279
|
function slugify$1(str) {
|
|
10280
10280
|
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]/g, " ").trim().replace(/\s+/g, "-");
|
|
10281
10281
|
}
|
|
10282
|
-
function isScalar$1(value) {
|
|
10283
|
-
var t2 = typeof value;
|
|
10284
|
-
return value === null || t2 !== "function" && t2 !== "object";
|
|
10285
|
-
}
|
|
10286
10282
|
function createDispatcher$2() {
|
|
10287
10283
|
var middleware = [];
|
|
10288
10284
|
var currentIndex = 0;
|
|
@@ -10689,9 +10685,7 @@ function hydrate$1(node2, context) {
|
|
|
10689
10685
|
return;
|
|
10690
10686
|
if (child.name in _value) {
|
|
10691
10687
|
var childValue = child.type !== "input" || _value[child.name] && typeof _value[child.name] === "object" ? init$2(_value[child.name]) : _value[child.name];
|
|
10692
|
-
|
|
10693
|
-
child.input(childValue, false);
|
|
10694
|
-
}
|
|
10688
|
+
child.input(childValue, false);
|
|
10695
10689
|
} else {
|
|
10696
10690
|
if (node2.type !== "list" || typeof child.name === "number") {
|
|
10697
10691
|
partial$1(context, {
|
|
@@ -10749,34 +10743,35 @@ function destroy$1(node2, context) {
|
|
|
10749
10743
|
node2.emit("destroying", node2);
|
|
10750
10744
|
node2.store.filter(() => false);
|
|
10751
10745
|
if (node2.parent) {
|
|
10746
|
+
node2.parent.emit("childRemoved", node2);
|
|
10752
10747
|
node2.parent.remove(node2);
|
|
10753
10748
|
}
|
|
10754
10749
|
deregister$1(node2);
|
|
10755
10750
|
context._value = context.value = void 0;
|
|
10756
10751
|
node2.emit("destroyed", node2);
|
|
10757
10752
|
}
|
|
10758
|
-
function define$1(node2, context,
|
|
10759
|
-
context.type =
|
|
10760
|
-
context.props.definition = clone$1(
|
|
10753
|
+
function define$1(node2, context, definition2) {
|
|
10754
|
+
context.type = definition2.type;
|
|
10755
|
+
context.props.definition = clone$1(definition2);
|
|
10761
10756
|
context.value = context._value = createValue$1({
|
|
10762
10757
|
type: node2.type,
|
|
10763
10758
|
value: context.value
|
|
10764
10759
|
});
|
|
10765
|
-
if (
|
|
10760
|
+
if (definition2.forceTypeProp) {
|
|
10766
10761
|
if (node2.props.type)
|
|
10767
10762
|
node2.props.originalType = node2.props.type;
|
|
10768
|
-
context.props.type =
|
|
10763
|
+
context.props.type = definition2.forceTypeProp;
|
|
10769
10764
|
}
|
|
10770
|
-
if (
|
|
10771
|
-
context.props.family =
|
|
10765
|
+
if (definition2.family) {
|
|
10766
|
+
context.props.family = definition2.family;
|
|
10772
10767
|
}
|
|
10773
|
-
if (
|
|
10774
|
-
|
|
10768
|
+
if (definition2.features) {
|
|
10769
|
+
definition2.features.forEach((feature) => feature(node2));
|
|
10775
10770
|
}
|
|
10776
|
-
if (
|
|
10777
|
-
node2.addProps(
|
|
10771
|
+
if (definition2.props) {
|
|
10772
|
+
node2.addProps(definition2.props);
|
|
10778
10773
|
}
|
|
10779
|
-
node2.emit("defined",
|
|
10774
|
+
node2.emit("defined", definition2);
|
|
10780
10775
|
}
|
|
10781
10776
|
function addProps$1(node2, context, props2) {
|
|
10782
10777
|
var _a;
|
|
@@ -11858,10 +11853,6 @@ function applyExplicit(original, obj, explicit) {
|
|
|
11858
11853
|
}
|
|
11859
11854
|
return obj;
|
|
11860
11855
|
}
|
|
11861
|
-
function isScalar(value) {
|
|
11862
|
-
var t2 = typeof value;
|
|
11863
|
-
return value === null || t2 !== "function" && t2 !== "object";
|
|
11864
|
-
}
|
|
11865
11856
|
var _excluded$1 = ["$formkit", "for", "if", "children", "bind"], _excluded2 = ["$reset"];
|
|
11866
11857
|
function createDispatcher$1() {
|
|
11867
11858
|
var middleware = [];
|
|
@@ -12591,9 +12582,7 @@ function hydrate(node2, context) {
|
|
|
12591
12582
|
return;
|
|
12592
12583
|
if (child.name in _value) {
|
|
12593
12584
|
var childValue = child.type !== "input" || _value[child.name] && typeof _value[child.name] === "object" ? init$1(_value[child.name]) : _value[child.name];
|
|
12594
|
-
|
|
12595
|
-
child.input(childValue, false);
|
|
12596
|
-
}
|
|
12585
|
+
child.input(childValue, false);
|
|
12597
12586
|
} else {
|
|
12598
12587
|
if (node2.type !== "list" || typeof child.name === "number") {
|
|
12599
12588
|
partial(context, {
|
|
@@ -12651,34 +12640,35 @@ function destroy(node2, context) {
|
|
|
12651
12640
|
node2.emit("destroying", node2);
|
|
12652
12641
|
node2.store.filter(() => false);
|
|
12653
12642
|
if (node2.parent) {
|
|
12643
|
+
node2.parent.emit("childRemoved", node2);
|
|
12654
12644
|
node2.parent.remove(node2);
|
|
12655
12645
|
}
|
|
12656
12646
|
deregister(node2);
|
|
12657
12647
|
context._value = context.value = void 0;
|
|
12658
12648
|
node2.emit("destroyed", node2);
|
|
12659
12649
|
}
|
|
12660
|
-
function define(node2, context,
|
|
12661
|
-
context.type =
|
|
12662
|
-
context.props.definition = clone(
|
|
12650
|
+
function define(node2, context, definition2) {
|
|
12651
|
+
context.type = definition2.type;
|
|
12652
|
+
context.props.definition = clone(definition2);
|
|
12663
12653
|
context.value = context._value = createValue({
|
|
12664
12654
|
type: node2.type,
|
|
12665
12655
|
value: context.value
|
|
12666
12656
|
});
|
|
12667
|
-
if (
|
|
12657
|
+
if (definition2.forceTypeProp) {
|
|
12668
12658
|
if (node2.props.type)
|
|
12669
12659
|
node2.props.originalType = node2.props.type;
|
|
12670
|
-
context.props.type =
|
|
12660
|
+
context.props.type = definition2.forceTypeProp;
|
|
12671
12661
|
}
|
|
12672
|
-
if (
|
|
12673
|
-
context.props.family =
|
|
12662
|
+
if (definition2.family) {
|
|
12663
|
+
context.props.family = definition2.family;
|
|
12674
12664
|
}
|
|
12675
|
-
if (
|
|
12676
|
-
|
|
12665
|
+
if (definition2.features) {
|
|
12666
|
+
definition2.features.forEach((feature) => feature(node2));
|
|
12677
12667
|
}
|
|
12678
|
-
if (
|
|
12679
|
-
node2.addProps(
|
|
12668
|
+
if (definition2.props) {
|
|
12669
|
+
node2.addProps(definition2.props);
|
|
12680
12670
|
}
|
|
12681
|
-
node2.emit("defined",
|
|
12671
|
+
node2.emit("defined", definition2);
|
|
12682
12672
|
}
|
|
12683
12673
|
function addProps(node2, context, props2) {
|
|
12684
12674
|
var _a;
|
|
@@ -13511,20 +13501,39 @@ function generateClassList(node2, property) {
|
|
|
13511
13501
|
}
|
|
13512
13502
|
var combinedClassList = args.reduce((finalClassList, currentClassList) => {
|
|
13513
13503
|
if (!currentClassList)
|
|
13514
|
-
return finalClassList;
|
|
13504
|
+
return handleNegativeClasses(finalClassList);
|
|
13515
13505
|
var {
|
|
13516
13506
|
$reset
|
|
13517
13507
|
} = currentClassList, classList2 = _objectWithoutProperties(currentClassList, _excluded2);
|
|
13518
13508
|
if ($reset) {
|
|
13519
|
-
return classList2;
|
|
13509
|
+
return handleNegativeClasses(classList2);
|
|
13520
13510
|
}
|
|
13521
|
-
return Object.assign(finalClassList, classList2);
|
|
13511
|
+
return handleNegativeClasses(Object.assign(finalClassList, classList2));
|
|
13522
13512
|
}, {});
|
|
13523
13513
|
return Object.keys(node2.hook.classes.dispatch({
|
|
13524
13514
|
property,
|
|
13525
13515
|
classes: combinedClassList
|
|
13526
13516
|
}).classes).filter((key) => combinedClassList[key]).join(" ") || null;
|
|
13527
13517
|
}
|
|
13518
|
+
function handleNegativeClasses(classList2) {
|
|
13519
|
+
var removalToken = "$remove:";
|
|
13520
|
+
var hasNegativeClassValue = false;
|
|
13521
|
+
var applicableClasses = Object.keys(classList2).filter((className) => {
|
|
13522
|
+
if (classList2[className] && className.startsWith(removalToken)) {
|
|
13523
|
+
hasNegativeClassValue = true;
|
|
13524
|
+
}
|
|
13525
|
+
return classList2[className];
|
|
13526
|
+
});
|
|
13527
|
+
if (applicableClasses.length > 1 && hasNegativeClassValue) {
|
|
13528
|
+
var negativeClasses = applicableClasses.filter((className) => className.startsWith(removalToken));
|
|
13529
|
+
negativeClasses.map((negativeClass) => {
|
|
13530
|
+
var targetClass = negativeClass.substring(removalToken.length);
|
|
13531
|
+
classList2[targetClass] = false;
|
|
13532
|
+
classList2[negativeClass] = false;
|
|
13533
|
+
});
|
|
13534
|
+
}
|
|
13535
|
+
return classList2;
|
|
13536
|
+
}
|
|
13528
13537
|
function setErrors(id2, localErrors, childErrors) {
|
|
13529
13538
|
var node2 = getNode$1(id2);
|
|
13530
13539
|
if (node2) {
|
|
@@ -13542,7 +13551,7 @@ function clearErrors(id2) {
|
|
|
13542
13551
|
warn(652, id2);
|
|
13543
13552
|
}
|
|
13544
13553
|
}
|
|
13545
|
-
var FORMKIT_VERSION = "
|
|
13554
|
+
var FORMKIT_VERSION = "0.16.4";
|
|
13546
13555
|
function createLibraryPlugin() {
|
|
13547
13556
|
for (var _len = arguments.length, libraries = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13548
13557
|
libraries[_key] = arguments[_key];
|
|
@@ -13597,6 +13606,8 @@ function optionValue(options2, value) {
|
|
|
13597
13606
|
return value;
|
|
13598
13607
|
}
|
|
13599
13608
|
function shouldSelect(valueA, valueB) {
|
|
13609
|
+
if (valueA === null && valueB === void 0 || valueA === void 0 && valueB === null)
|
|
13610
|
+
return false;
|
|
13600
13611
|
if (valueA == valueB)
|
|
13601
13612
|
return true;
|
|
13602
13613
|
if (isPojo(valueA) && isPojo(valueB))
|
|
@@ -13643,11 +13654,11 @@ var label = createSection("label", () => ({
|
|
|
13643
13654
|
for: "$id"
|
|
13644
13655
|
}
|
|
13645
13656
|
}));
|
|
13646
|
-
var messages = createSection("messages", () => ({
|
|
13657
|
+
var messages$1 = createSection("messages", () => ({
|
|
13647
13658
|
$el: "ul",
|
|
13648
|
-
if: "$fns.length($messages)"
|
|
13659
|
+
if: "$defaultMessagePlacement && $fns.length($messages)"
|
|
13649
13660
|
}));
|
|
13650
|
-
var message = createSection("message", () => ({
|
|
13661
|
+
var message$1 = createSection("message", () => ({
|
|
13651
13662
|
$el: "li",
|
|
13652
13663
|
for: ["message", "$messages"],
|
|
13653
13664
|
attrs: {
|
|
@@ -13728,6 +13739,11 @@ var boxWrapper = createSection("wrapper", () => ({
|
|
|
13728
13739
|
if: "$options.length",
|
|
13729
13740
|
then: void 0,
|
|
13730
13741
|
else: "$disabled || undefined"
|
|
13742
|
+
},
|
|
13743
|
+
"data-checked": {
|
|
13744
|
+
if: "$options == undefined",
|
|
13745
|
+
then: "$fns.eq($_value, $onValue) || undefined",
|
|
13746
|
+
else: "$fns.isChecked($option.value) || undefined"
|
|
13731
13747
|
}
|
|
13732
13748
|
}
|
|
13733
13749
|
}));
|
|
@@ -13811,7 +13827,6 @@ var submitInput = createSection("submit", () => ({
|
|
|
13811
13827
|
$cmp: "FormKit",
|
|
13812
13828
|
bind: "$submitAttrs",
|
|
13813
13829
|
props: {
|
|
13814
|
-
ignore: true,
|
|
13815
13830
|
type: "submit",
|
|
13816
13831
|
disabled: "$disabled",
|
|
13817
13832
|
label: "$submitLabel"
|
|
@@ -13903,7 +13918,7 @@ function normalizeBoxes(node2) {
|
|
|
13903
13918
|
if (!((_a = option2.attrs) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
13904
13919
|
return extend(option2, {
|
|
13905
13920
|
attrs: {
|
|
13906
|
-
id: "".concat(node2.name, "-option-").concat(
|
|
13921
|
+
id: "".concat(node2.name, "-option-").concat(slugify(String(option2.value)))
|
|
13907
13922
|
}
|
|
13908
13923
|
});
|
|
13909
13924
|
}
|
|
@@ -14081,13 +14096,13 @@ function _handleSubmit() {
|
|
|
14081
14096
|
_handleSubmit = _asyncToGenerator(function* (node2, submitEvent) {
|
|
14082
14097
|
submitEvent.preventDefault();
|
|
14083
14098
|
yield node2.settled;
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14099
|
+
var setSubmitted = (n) => n.store.set(createMessage({
|
|
14100
|
+
key: "submitted",
|
|
14101
|
+
value: true,
|
|
14102
|
+
visible: false
|
|
14103
|
+
}));
|
|
14104
|
+
node2.walk(setSubmitted);
|
|
14105
|
+
setSubmitted(node2);
|
|
14091
14106
|
if (typeof node2.props.onSubmitRaw === "function") {
|
|
14092
14107
|
node2.props.onSubmitRaw(submitEvent, node2);
|
|
14093
14108
|
}
|
|
@@ -14319,7 +14334,7 @@ function extendSchema(schema) {
|
|
|
14319
14334
|
return extend(schema, extension);
|
|
14320
14335
|
}
|
|
14321
14336
|
function useSchema(inputSection) {
|
|
14322
|
-
return outer(wrapper(label("$label"), inner(prefix(), inputSection(), suffix())), help("$help"), messages(message("$message.value")));
|
|
14337
|
+
return outer(wrapper(label("$label"), inner(prefix(), inputSection(), suffix())), help("$help"), messages$1(message$1("$message.value")));
|
|
14323
14338
|
}
|
|
14324
14339
|
function createSection(section, el) {
|
|
14325
14340
|
var root = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
@@ -14352,6 +14367,7 @@ function createSection(section, el) {
|
|
|
14352
14367
|
else: section in extensions ? extendSchema(node2, extensions[section]) : node2
|
|
14353
14368
|
};
|
|
14354
14369
|
};
|
|
14370
|
+
extendable._s = section;
|
|
14355
14371
|
return root ? createRoot(extendable) : extendable;
|
|
14356
14372
|
};
|
|
14357
14373
|
}
|
|
@@ -14361,7 +14377,7 @@ function createRoot(rootSection) {
|
|
|
14361
14377
|
};
|
|
14362
14378
|
}
|
|
14363
14379
|
function $if(condition, then2, otherwise) {
|
|
14364
|
-
|
|
14380
|
+
var extendable = (extensions) => {
|
|
14365
14381
|
var node2 = then2(extensions);
|
|
14366
14382
|
if (otherwise || isSchemaObject(node2) && "if" in node2 || isSlotCondition(node2)) {
|
|
14367
14383
|
var conditionalNode = {
|
|
@@ -14383,24 +14399,28 @@ function $if(condition, then2, otherwise) {
|
|
|
14383
14399
|
}
|
|
14384
14400
|
return node2;
|
|
14385
14401
|
};
|
|
14402
|
+
extendable._s = token();
|
|
14403
|
+
return extendable;
|
|
14386
14404
|
}
|
|
14387
14405
|
function $extend(section, extendWith) {
|
|
14388
|
-
|
|
14406
|
+
var extendable = (extensions) => {
|
|
14389
14407
|
var node2 = section({});
|
|
14390
14408
|
if (isSlotCondition(node2)) {
|
|
14391
14409
|
if (Array.isArray(node2.else))
|
|
14392
14410
|
return node2;
|
|
14393
|
-
node2.else = extendSchema(extendSchema(node2.else, extendWith), extensions);
|
|
14411
|
+
node2.else = extendSchema(extendSchema(node2.else, extendWith), section._s ? extensions[section._s] : {});
|
|
14394
14412
|
return node2;
|
|
14395
14413
|
}
|
|
14396
|
-
return extendSchema(extendSchema(node2, extendWith), extensions);
|
|
14414
|
+
return extendSchema(extendSchema(node2, extendWith), section._s ? extensions[section._s] : {});
|
|
14397
14415
|
};
|
|
14416
|
+
extendable._s = section._s;
|
|
14417
|
+
return extendable;
|
|
14398
14418
|
}
|
|
14399
14419
|
function $root(section) {
|
|
14400
14420
|
return createRoot(section);
|
|
14401
14421
|
}
|
|
14402
14422
|
var button = {
|
|
14403
|
-
schema: outer(messages(message("$message.value")), wrapper(buttonInput(icon("prefix"), prefix(), buttonLabel("$label || $ui.submit.value"), suffix(), icon("suffix"))), help("$help")),
|
|
14423
|
+
schema: outer(messages$1(message$1("$message.value")), wrapper(buttonInput(icon("prefix"), prefix(), buttonLabel("$label || $ui.submit.value"), suffix(), icon("suffix"))), help("$help")),
|
|
14404
14424
|
type: "input",
|
|
14405
14425
|
family: "button",
|
|
14406
14426
|
props: [],
|
|
@@ -14425,7 +14445,7 @@ var checkbox = {
|
|
|
14425
14445
|
})), boxHelp("$option.help"))))
|
|
14426
14446
|
),
|
|
14427
14447
|
$if("$options == undefined && $help", help("$help")),
|
|
14428
|
-
messages(message("$message.value"))
|
|
14448
|
+
messages$1(message$1("$message.value"))
|
|
14429
14449
|
),
|
|
14430
14450
|
type: "input",
|
|
14431
14451
|
family: "box",
|
|
@@ -14433,14 +14453,14 @@ var checkbox = {
|
|
|
14433
14453
|
features: [options, checkboxes, defaultIcon("decorator", "checkboxDecorator")]
|
|
14434
14454
|
};
|
|
14435
14455
|
var file = {
|
|
14436
|
-
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"))),
|
|
14456
|
+
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$1(message$1("$message.value"))),
|
|
14437
14457
|
type: "input",
|
|
14438
14458
|
family: "text",
|
|
14439
14459
|
props: [],
|
|
14440
14460
|
features: [files, defaultIcon("fileItem", "fileItem"), defaultIcon("fileRemove", "fileRemove"), defaultIcon("noFiles", "noFiles")]
|
|
14441
14461
|
};
|
|
14442
14462
|
var form = {
|
|
14443
|
-
schema: formInput("$slots.default", messages(message("$message.value")), actions(submitInput())),
|
|
14463
|
+
schema: formInput("$slots.default", messages$1(message$1("$message.value")), actions(submitInput())),
|
|
14444
14464
|
type: "group",
|
|
14445
14465
|
props: ["actions", "submit", "submitLabel", "submitAttrs", "submitBehavior", "incompleteMessage"],
|
|
14446
14466
|
features: [form$1, disables]
|
|
@@ -14478,27 +14498,27 @@ var radio = {
|
|
|
14478
14498
|
}), decorator(icon("decorator")), suffix()), $if("$option.label", boxLabel("$option.label"))), boxHelp("$option.help"))))
|
|
14479
14499
|
),
|
|
14480
14500
|
$if("$options === undefined && $help", help("$help")),
|
|
14481
|
-
messages(message("$message.value"))
|
|
14501
|
+
messages$1(message$1("$message.value"))
|
|
14482
14502
|
),
|
|
14483
14503
|
type: "input",
|
|
14484
14504
|
family: "box",
|
|
14485
14505
|
props: ["options", "onValue", "offValue", "optionsLoader"],
|
|
14486
|
-
features: [options, radios, defaultIcon("decorator", "radioDecorator")]
|
|
14506
|
+
features: [disables, options, radios, defaultIcon("decorator", "radioDecorator")]
|
|
14487
14507
|
};
|
|
14488
14508
|
var select = {
|
|
14489
|
-
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"))),
|
|
14509
|
+
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$1(message$1("$message.value"))),
|
|
14490
14510
|
type: "input",
|
|
14491
14511
|
props: ["options", "placeholder", "optionsLoader"],
|
|
14492
14512
|
features: [options, select$1, defaultIcon("select", "select")]
|
|
14493
14513
|
};
|
|
14494
14514
|
var textarea = {
|
|
14495
|
-
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textareaInput(), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
14515
|
+
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textareaInput(), suffix(), icon("suffix"))), help("$help"), messages$1(message$1("$message.value"))),
|
|
14496
14516
|
type: "input",
|
|
14497
14517
|
props: [],
|
|
14498
14518
|
features: [initialValue]
|
|
14499
14519
|
};
|
|
14500
14520
|
var text = {
|
|
14501
|
-
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textInput(), suffix(), icon("suffix"))), help("$help"), messages(message("$message.value"))),
|
|
14521
|
+
schema: outer(wrapper(label("$label"), inner(icon("prefix", "label"), prefix(), textInput(), suffix(), icon("suffix"))), help("$help"), messages$1(message$1("$message.value"))),
|
|
14502
14522
|
type: "input",
|
|
14503
14523
|
family: "text",
|
|
14504
14524
|
props: [],
|
|
@@ -16089,10 +16109,12 @@ function createObserver(node2, dependencies) {
|
|
|
16089
16109
|
args[_key] = arguments[_key];
|
|
16090
16110
|
}
|
|
16091
16111
|
switch (args[1]) {
|
|
16112
|
+
case "_node":
|
|
16113
|
+
return node2;
|
|
16092
16114
|
case "deps":
|
|
16093
16115
|
return deps;
|
|
16094
16116
|
case "watch":
|
|
16095
|
-
return (block) => watch(observed, block);
|
|
16117
|
+
return (block, after) => watch(observed, block, after);
|
|
16096
16118
|
case "observe":
|
|
16097
16119
|
return () => {
|
|
16098
16120
|
var old = new Map(deps);
|
|
@@ -16113,6 +16135,7 @@ function createObserver(node2, dependencies) {
|
|
|
16113
16135
|
removeListeners(receipts2);
|
|
16114
16136
|
revokedObservers.add(args[2]);
|
|
16115
16137
|
revoke();
|
|
16138
|
+
return void 0;
|
|
16116
16139
|
};
|
|
16117
16140
|
}
|
|
16118
16141
|
var value = Reflect.get(...args);
|
|
@@ -16131,8 +16154,9 @@ function applyListeners(node2, _ref, callback) {
|
|
|
16131
16154
|
var [toAdd, toRemove] = _ref;
|
|
16132
16155
|
toAdd.forEach((events, depNode) => {
|
|
16133
16156
|
events.forEach((event) => {
|
|
16157
|
+
var _a;
|
|
16134
16158
|
node2.receipts.has(depNode) || node2.receipts.set(depNode, {});
|
|
16135
|
-
node2.receipts.set(depNode, Object.assign(node2.receipts.get(depNode), {
|
|
16159
|
+
node2.receipts.set(depNode, Object.assign((_a = node2.receipts.get(depNode)) !== null && _a !== void 0 ? _a : {}, {
|
|
16136
16160
|
[event]: depNode.on(event, callback)
|
|
16137
16161
|
}));
|
|
16138
16162
|
});
|
|
@@ -16157,20 +16181,20 @@ function removeListeners(receipts2) {
|
|
|
16157
16181
|
}
|
|
16158
16182
|
});
|
|
16159
16183
|
}
|
|
16160
|
-
function watch(
|
|
16161
|
-
|
|
16162
|
-
}
|
|
16163
|
-
function _watch() {
|
|
16164
|
-
_watch = _asyncToGenerator(function* (node2, block) {
|
|
16165
|
-
var oldDeps = new Map(node2.deps);
|
|
16166
|
-
node2.observe();
|
|
16167
|
-
var res = block(node2);
|
|
16168
|
-
if (res instanceof Promise)
|
|
16169
|
-
yield res;
|
|
16184
|
+
function watch(node2, block, after) {
|
|
16185
|
+
var doAfterObservation = (res2) => {
|
|
16170
16186
|
var newDeps = node2.stopObserve();
|
|
16171
|
-
applyListeners(node2, diffDeps(oldDeps, newDeps), () => watch(node2, block));
|
|
16172
|
-
|
|
16173
|
-
|
|
16187
|
+
applyListeners(node2, diffDeps(oldDeps, newDeps), () => watch(node2, block, after));
|
|
16188
|
+
if (after)
|
|
16189
|
+
after(res2);
|
|
16190
|
+
};
|
|
16191
|
+
var oldDeps = new Map(node2.deps);
|
|
16192
|
+
node2.observe();
|
|
16193
|
+
var res = block(node2);
|
|
16194
|
+
if (res instanceof Promise)
|
|
16195
|
+
res.then((val) => doAfterObservation(val));
|
|
16196
|
+
else
|
|
16197
|
+
doAfterObservation(res);
|
|
16174
16198
|
}
|
|
16175
16199
|
function diffDeps(previous, current) {
|
|
16176
16200
|
var toAdd = /* @__PURE__ */ new Map();
|
|
@@ -16210,7 +16234,8 @@ var validatingMessage = createMessage({
|
|
|
16210
16234
|
function createValidationPlugin() {
|
|
16211
16235
|
var baseRules = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16212
16236
|
return function validationPlugin(node2) {
|
|
16213
|
-
var
|
|
16237
|
+
var propRules = cloneAny(node2.props.validationRules || {});
|
|
16238
|
+
var availableRules = _objectSpread2(_objectSpread2({}, baseRules), propRules);
|
|
16214
16239
|
var observedNode = createObserver(node2);
|
|
16215
16240
|
var state = {
|
|
16216
16241
|
input: token(),
|
|
@@ -16231,11 +16256,17 @@ function createValidationPlugin() {
|
|
|
16231
16256
|
return reboot(validation, payload);
|
|
16232
16257
|
});
|
|
16233
16258
|
function reboot(newValidation, newRules) {
|
|
16234
|
-
|
|
16259
|
+
var _a;
|
|
16260
|
+
if (eq(Object.keys(propRules || {}), Object.keys(newRules || {})) && eq(validation, newValidation))
|
|
16235
16261
|
return;
|
|
16262
|
+
propRules = cloneAny(newRules);
|
|
16236
16263
|
validation = cloneAny(newValidation);
|
|
16237
|
-
availableRules = _objectSpread2(_objectSpread2({}, baseRules),
|
|
16264
|
+
availableRules = _objectSpread2(_objectSpread2({}, baseRules), propRules);
|
|
16238
16265
|
removeListeners(observedNode.receipts);
|
|
16266
|
+
(_a = node2.props.parsedRules) === null || _a === void 0 ? void 0 : _a.forEach((validation2) => {
|
|
16267
|
+
var _a2;
|
|
16268
|
+
validation2.messageObserver = (_a2 = validation2.messageObserver) === null || _a2 === void 0 ? void 0 : _a2.kill();
|
|
16269
|
+
});
|
|
16239
16270
|
node2.store.filter(() => false, "validation");
|
|
16240
16271
|
node2.props.parsedRules = parseRules(newValidation, availableRules);
|
|
16241
16272
|
observedNode.kill();
|
|
@@ -16322,27 +16353,38 @@ function runRule(validation, node2, after) {
|
|
|
16322
16353
|
}
|
|
16323
16354
|
function removeMessage(node2, validation) {
|
|
16324
16355
|
var key = "rule_".concat(validation.name);
|
|
16356
|
+
if (validation.messageObserver) {
|
|
16357
|
+
validation.messageObserver = validation.messageObserver.kill();
|
|
16358
|
+
}
|
|
16325
16359
|
if (has2(node2.store, key)) {
|
|
16326
16360
|
node2.store.remove(key);
|
|
16327
16361
|
}
|
|
16328
16362
|
}
|
|
16329
16363
|
function createFailedMessage(node2, validation, removeImmediately) {
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16339
|
-
|
|
16340
|
-
|
|
16341
|
-
|
|
16342
|
-
|
|
16364
|
+
if (isKilled(node2))
|
|
16365
|
+
return;
|
|
16366
|
+
if (!validation.messageObserver) {
|
|
16367
|
+
validation.messageObserver = createObserver(node2._node);
|
|
16368
|
+
}
|
|
16369
|
+
validation.messageObserver.watch((node3) => {
|
|
16370
|
+
var i18nArgs = createI18nArgs(node3, validation);
|
|
16371
|
+
return i18nArgs;
|
|
16372
|
+
}, (i18nArgs) => {
|
|
16373
|
+
var customMessage = createCustomMessage(node2, validation, i18nArgs);
|
|
16374
|
+
var message2 = createMessage({
|
|
16375
|
+
blocking: validation.blocking,
|
|
16376
|
+
key: "rule_".concat(validation.name),
|
|
16377
|
+
meta: {
|
|
16378
|
+
messageKey: validation.name,
|
|
16379
|
+
removeImmediately,
|
|
16380
|
+
localize: !customMessage,
|
|
16381
|
+
i18nArgs
|
|
16382
|
+
},
|
|
16383
|
+
type: "validation",
|
|
16384
|
+
value: customMessage || "This field is not valid."
|
|
16385
|
+
});
|
|
16386
|
+
node2.store.set(message2);
|
|
16343
16387
|
});
|
|
16344
|
-
node2.store.set(message2);
|
|
16345
|
-
return message2;
|
|
16346
16388
|
}
|
|
16347
16389
|
function createCustomMessage(node2, validation, i18nArgs) {
|
|
16348
16390
|
var customMessage = node2.props.validationMessages && has2(node2.props.validationMessages, validation.name) ? node2.props.validationMessages[validation.name] : void 0;
|
|
@@ -16492,9 +16534,7 @@ function date2(date3) {
|
|
|
16492
16534
|
if (!(dateTime instanceof Date)) {
|
|
16493
16535
|
return "(unknown)";
|
|
16494
16536
|
}
|
|
16495
|
-
return new Intl.DateTimeFormat(void 0, {
|
|
16496
|
-
dateStyle: "medium"
|
|
16497
|
-
}).format(dateTime);
|
|
16537
|
+
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeZone: "UTC" }).format(dateTime);
|
|
16498
16538
|
}
|
|
16499
16539
|
function order(first, second) {
|
|
16500
16540
|
return Number(first) >= Number(second) ? [second, first] : [first, second];
|
|
@@ -16509,106 +16549,82 @@ var ui$u = {
|
|
|
16509
16549
|
moveUp: "Move up",
|
|
16510
16550
|
moveDown: "Move down",
|
|
16511
16551
|
isLoading: "Loading...",
|
|
16512
|
-
loadMore: "Load more"
|
|
16552
|
+
loadMore: "Load more",
|
|
16553
|
+
next: "Next",
|
|
16554
|
+
prev: "Previous",
|
|
16555
|
+
addAllValues: "Add all values",
|
|
16556
|
+
addSelectedValues: "Add selected values",
|
|
16557
|
+
removeAllValues: "Remove all values",
|
|
16558
|
+
removeSelectedValues: "Remove selected values",
|
|
16559
|
+
chooseDate: "Choose date",
|
|
16560
|
+
changeDate: "Change date",
|
|
16561
|
+
invalidDate: "The selected date is invalid."
|
|
16513
16562
|
};
|
|
16514
16563
|
var validation$u = {
|
|
16515
|
-
accepted(
|
|
16516
|
-
var {
|
|
16517
|
-
name
|
|
16518
|
-
} = _ref147;
|
|
16564
|
+
accepted(_ref168) {
|
|
16565
|
+
var { name } = _ref168;
|
|
16519
16566
|
return "Please accept the ".concat(name, ".");
|
|
16520
16567
|
},
|
|
16521
|
-
date_after(
|
|
16522
|
-
var {
|
|
16523
|
-
name,
|
|
16524
|
-
args
|
|
16525
|
-
} = _ref148;
|
|
16568
|
+
date_after(_ref169) {
|
|
16569
|
+
var { name, args } = _ref169;
|
|
16526
16570
|
if (Array.isArray(args) && args.length) {
|
|
16527
16571
|
return "".concat(sentence(name), " must be after ").concat(date2(args[0]), ".");
|
|
16528
16572
|
}
|
|
16529
16573
|
return "".concat(sentence(name), " must be in the future.");
|
|
16530
16574
|
},
|
|
16531
|
-
alpha(
|
|
16532
|
-
var {
|
|
16533
|
-
name
|
|
16534
|
-
} = _ref149;
|
|
16575
|
+
alpha(_ref170) {
|
|
16576
|
+
var { name } = _ref170;
|
|
16535
16577
|
return "".concat(sentence(name), " can only contain alphabetical characters.");
|
|
16536
16578
|
},
|
|
16537
|
-
alphanumeric(
|
|
16538
|
-
var {
|
|
16539
|
-
name
|
|
16540
|
-
} = _ref150;
|
|
16579
|
+
alphanumeric(_ref171) {
|
|
16580
|
+
var { name } = _ref171;
|
|
16541
16581
|
return "".concat(sentence(name), " can only contain letters and numbers.");
|
|
16542
16582
|
},
|
|
16543
|
-
alpha_spaces(
|
|
16544
|
-
var {
|
|
16545
|
-
name
|
|
16546
|
-
} = _ref151;
|
|
16583
|
+
alpha_spaces(_ref172) {
|
|
16584
|
+
var { name } = _ref172;
|
|
16547
16585
|
return "".concat(sentence(name), " can only contain letters and spaces.");
|
|
16548
16586
|
},
|
|
16549
|
-
date_before(
|
|
16550
|
-
var {
|
|
16551
|
-
name,
|
|
16552
|
-
args
|
|
16553
|
-
} = _ref152;
|
|
16587
|
+
date_before(_ref173) {
|
|
16588
|
+
var { name, args } = _ref173;
|
|
16554
16589
|
if (Array.isArray(args) && args.length) {
|
|
16555
16590
|
return "".concat(sentence(name), " must be before ").concat(date2(args[0]), ".");
|
|
16556
16591
|
}
|
|
16557
16592
|
return "".concat(sentence(name), " must be in the past.");
|
|
16558
16593
|
},
|
|
16559
|
-
between(
|
|
16560
|
-
var {
|
|
16561
|
-
name,
|
|
16562
|
-
args
|
|
16563
|
-
} = _ref153;
|
|
16594
|
+
between(_ref174) {
|
|
16595
|
+
var { name, args } = _ref174;
|
|
16564
16596
|
if (isNaN(args[0]) || isNaN(args[1])) {
|
|
16565
16597
|
return "This field was configured incorrectly and can\u2019t be submitted.";
|
|
16566
16598
|
}
|
|
16567
16599
|
var [a3, b2] = order(args[0], args[1]);
|
|
16568
16600
|
return "".concat(sentence(name), " must be between ").concat(a3, " and ").concat(b2, ".");
|
|
16569
16601
|
},
|
|
16570
|
-
confirm(
|
|
16571
|
-
var {
|
|
16572
|
-
name
|
|
16573
|
-
} = _ref154;
|
|
16602
|
+
confirm(_ref175) {
|
|
16603
|
+
var { name } = _ref175;
|
|
16574
16604
|
return "".concat(sentence(name), " does not match.");
|
|
16575
16605
|
},
|
|
16576
|
-
date_format(
|
|
16577
|
-
var {
|
|
16578
|
-
name,
|
|
16579
|
-
args
|
|
16580
|
-
} = _ref155;
|
|
16606
|
+
date_format(_ref176) {
|
|
16607
|
+
var { name, args } = _ref176;
|
|
16581
16608
|
if (Array.isArray(args) && args.length) {
|
|
16582
16609
|
return "".concat(sentence(name), " is not a valid date, please use the format ").concat(args[0]);
|
|
16583
16610
|
}
|
|
16584
16611
|
return "This field was configured incorrectly and can\u2019t be submitted";
|
|
16585
16612
|
},
|
|
16586
|
-
date_between(
|
|
16587
|
-
var {
|
|
16588
|
-
name,
|
|
16589
|
-
args
|
|
16590
|
-
} = _ref156;
|
|
16613
|
+
date_between(_ref177) {
|
|
16614
|
+
var { name, args } = _ref177;
|
|
16591
16615
|
return "".concat(sentence(name), " must be between ").concat(date2(args[0]), " and ").concat(date2(args[1]));
|
|
16592
16616
|
},
|
|
16593
16617
|
email: "Please enter a valid email address.",
|
|
16594
|
-
ends_with(
|
|
16595
|
-
var {
|
|
16596
|
-
name,
|
|
16597
|
-
args
|
|
16598
|
-
} = _ref157;
|
|
16618
|
+
ends_with(_ref178) {
|
|
16619
|
+
var { name, args } = _ref178;
|
|
16599
16620
|
return "".concat(sentence(name), " doesn\u2019t end with ").concat(list(args), ".");
|
|
16600
16621
|
},
|
|
16601
|
-
is(
|
|
16602
|
-
var {
|
|
16603
|
-
name
|
|
16604
|
-
} = _ref158;
|
|
16622
|
+
is(_ref179) {
|
|
16623
|
+
var { name } = _ref179;
|
|
16605
16624
|
return "".concat(sentence(name), " is not an allowed value.");
|
|
16606
16625
|
},
|
|
16607
|
-
length(
|
|
16608
|
-
var {
|
|
16609
|
-
name,
|
|
16610
|
-
args: [first = 0, second = Infinity]
|
|
16611
|
-
} = _ref159;
|
|
16626
|
+
length(_ref180) {
|
|
16627
|
+
var { name, args: [first = 0, second = Infinity] } = _ref180;
|
|
16612
16628
|
var min3 = Number(first) <= Number(second) ? first : second;
|
|
16613
16629
|
var max3 = Number(second) >= Number(first) ? second : first;
|
|
16614
16630
|
if (min3 == 1 && max3 === Infinity) {
|
|
@@ -16625,93 +16641,58 @@ var validation$u = {
|
|
|
16625
16641
|
}
|
|
16626
16642
|
return "".concat(sentence(name), " must be between ").concat(min3, " and ").concat(max3, " characters.");
|
|
16627
16643
|
},
|
|
16628
|
-
matches(
|
|
16629
|
-
var {
|
|
16630
|
-
name
|
|
16631
|
-
} = _ref160;
|
|
16644
|
+
matches(_ref181) {
|
|
16645
|
+
var { name } = _ref181;
|
|
16632
16646
|
return "".concat(sentence(name), " is not an allowed value.");
|
|
16633
16647
|
},
|
|
16634
|
-
max(
|
|
16635
|
-
var {
|
|
16636
|
-
name,
|
|
16637
|
-
node: {
|
|
16638
|
-
value
|
|
16639
|
-
},
|
|
16640
|
-
args
|
|
16641
|
-
} = _ref161;
|
|
16648
|
+
max(_ref182) {
|
|
16649
|
+
var { name, node: { value }, args } = _ref182;
|
|
16642
16650
|
if (Array.isArray(value)) {
|
|
16643
16651
|
return "Cannot have more than ".concat(args[0], " ").concat(name, ".");
|
|
16644
16652
|
}
|
|
16645
16653
|
return "".concat(sentence(name), " must be less than or equal to ").concat(args[0], ".");
|
|
16646
16654
|
},
|
|
16647
|
-
mime(
|
|
16648
|
-
var {
|
|
16649
|
-
name,
|
|
16650
|
-
args
|
|
16651
|
-
} = _ref162;
|
|
16655
|
+
mime(_ref183) {
|
|
16656
|
+
var { name, args } = _ref183;
|
|
16652
16657
|
if (!args[0]) {
|
|
16653
16658
|
return "No file formats allowed.";
|
|
16654
16659
|
}
|
|
16655
16660
|
return "".concat(sentence(name), " must be of the type: ").concat(args[0]);
|
|
16656
16661
|
},
|
|
16657
|
-
min(
|
|
16658
|
-
var {
|
|
16659
|
-
name,
|
|
16660
|
-
node: {
|
|
16661
|
-
value
|
|
16662
|
-
},
|
|
16663
|
-
args
|
|
16664
|
-
} = _ref163;
|
|
16662
|
+
min(_ref184) {
|
|
16663
|
+
var { name, node: { value }, args } = _ref184;
|
|
16665
16664
|
if (Array.isArray(value)) {
|
|
16666
|
-
return "Cannot have
|
|
16665
|
+
return "Cannot have fewer than ".concat(args[0], " ").concat(name, ".");
|
|
16667
16666
|
}
|
|
16668
|
-
return "
|
|
16667
|
+
return "Must be at least ".concat(args[0], " ").concat(name, " .");
|
|
16669
16668
|
},
|
|
16670
|
-
not(
|
|
16671
|
-
var {
|
|
16672
|
-
name,
|
|
16673
|
-
node: {
|
|
16674
|
-
value
|
|
16675
|
-
}
|
|
16676
|
-
} = _ref164;
|
|
16669
|
+
not(_ref185) {
|
|
16670
|
+
var { name, node: { value } } = _ref185;
|
|
16677
16671
|
return "\u201C".concat(value, "\u201D is not an allowed ").concat(name, ".");
|
|
16678
16672
|
},
|
|
16679
|
-
number(
|
|
16680
|
-
var {
|
|
16681
|
-
name
|
|
16682
|
-
} = _ref165;
|
|
16673
|
+
number(_ref186) {
|
|
16674
|
+
var { name } = _ref186;
|
|
16683
16675
|
return "".concat(sentence(name), " must be a number.");
|
|
16684
16676
|
},
|
|
16685
|
-
required(
|
|
16686
|
-
var {
|
|
16687
|
-
name
|
|
16688
|
-
} = _ref166;
|
|
16677
|
+
required(_ref187) {
|
|
16678
|
+
var { name } = _ref187;
|
|
16689
16679
|
return "".concat(sentence(name), " is required.");
|
|
16690
16680
|
},
|
|
16691
|
-
starts_with(
|
|
16692
|
-
var {
|
|
16693
|
-
name,
|
|
16694
|
-
args
|
|
16695
|
-
} = _ref167;
|
|
16681
|
+
starts_with(_ref188) {
|
|
16682
|
+
var { name, args } = _ref188;
|
|
16696
16683
|
return "".concat(sentence(name), " doesn\u2019t start with ").concat(list(args), ".");
|
|
16697
16684
|
},
|
|
16698
16685
|
url() {
|
|
16699
|
-
return "Please
|
|
16686
|
+
return "Please enter a valid URL.";
|
|
16700
16687
|
}
|
|
16701
16688
|
};
|
|
16702
|
-
var en = /* @__PURE__ */ Object.freeze({
|
|
16703
|
-
__proto__: null,
|
|
16704
|
-
ui: ui$u,
|
|
16705
|
-
validation: validation$u
|
|
16706
|
-
});
|
|
16689
|
+
var en = /* @__PURE__ */ Object.freeze({ __proto__: null, ui: ui$u, validation: validation$u });
|
|
16707
16690
|
function createI18nPlugin(registry2) {
|
|
16708
16691
|
return function i18nPlugin(node2) {
|
|
16709
16692
|
var localeKey = parseLocale(node2.config.locale, registry2);
|
|
16710
16693
|
var locale2 = localeKey ? registry2[localeKey] : {};
|
|
16711
|
-
node2.on("prop:locale", (
|
|
16712
|
-
var {
|
|
16713
|
-
payload: lang
|
|
16714
|
-
} = _ref798;
|
|
16694
|
+
node2.on("prop:locale", (_ref819) => {
|
|
16695
|
+
var { payload: lang } = _ref819;
|
|
16715
16696
|
localeKey = parseLocale(lang, registry2);
|
|
16716
16697
|
locale2 = localeKey ? registry2[localeKey] : {};
|
|
16717
16698
|
node2.store.touch();
|
|
@@ -17096,11 +17077,11 @@ function createIconHandler(iconLoader, iconLoaderUrl) {
|
|
|
17096
17077
|
}
|
|
17097
17078
|
if (typeof iconName !== "string")
|
|
17098
17079
|
return;
|
|
17099
|
-
var icon2 = iconRegistry[iconName];
|
|
17100
17080
|
var isDefault = iconName.startsWith("default:");
|
|
17101
17081
|
iconName = isDefault ? iconName.split(":")[1] : iconName;
|
|
17082
|
+
var iconWasAlreadyLoaded = iconName in iconRegistry;
|
|
17102
17083
|
var loadedIcon = void 0;
|
|
17103
|
-
if (
|
|
17084
|
+
if (iconWasAlreadyLoaded) {
|
|
17104
17085
|
return iconRegistry[iconName];
|
|
17105
17086
|
} else if (!iconRequests[iconName]) {
|
|
17106
17087
|
loadedIcon = getIconFromStylesheet(iconName);
|
|
@@ -17364,7 +17345,9 @@ function getRef(token2, data2) {
|
|
|
17364
17345
|
return value;
|
|
17365
17346
|
}
|
|
17366
17347
|
var path = token2.split(".");
|
|
17367
|
-
watchEffect(() =>
|
|
17348
|
+
watchEffect(() => {
|
|
17349
|
+
value.value = getValue(isRef(data2) ? data2.value : data2, path);
|
|
17350
|
+
});
|
|
17368
17351
|
return value;
|
|
17369
17352
|
}
|
|
17370
17353
|
function getValue(set3, path) {
|
|
@@ -17701,17 +17684,17 @@ function createRenderFn(instanceCreator, data2, instanceKey2) {
|
|
|
17701
17684
|
return requirements.reduce((tokens, token2) => {
|
|
17702
17685
|
if (token2.startsWith("slots.")) {
|
|
17703
17686
|
var slot = token2.substring(6);
|
|
17704
|
-
var hasSlot = data2.slots && has2(data2.slots, slot);
|
|
17687
|
+
var hasSlot = () => data2.slots && has2(data2.slots, slot) && typeof data2.slots[slot] === "function";
|
|
17705
17688
|
if (hints.if) {
|
|
17706
|
-
tokens[token2] =
|
|
17707
|
-
} else if (data2.slots
|
|
17689
|
+
tokens[token2] = hasSlot;
|
|
17690
|
+
} else if (data2.slots) {
|
|
17708
17691
|
var scopedData = slotData(data2, instanceKey2);
|
|
17709
|
-
tokens[token2] = () => data2.slots[slot](scopedData);
|
|
17710
|
-
return tokens;
|
|
17692
|
+
tokens[token2] = () => hasSlot() ? data2.slots[slot](scopedData) : null;
|
|
17711
17693
|
}
|
|
17694
|
+
} else {
|
|
17695
|
+
var value = getRef(token2, data2);
|
|
17696
|
+
tokens[token2] = () => useScope(token2, value.value);
|
|
17712
17697
|
}
|
|
17713
|
-
var value = getRef(token2, data2);
|
|
17714
|
-
tokens[token2] = () => useScope(token2, value.value);
|
|
17715
17698
|
return tokens;
|
|
17716
17699
|
}, {});
|
|
17717
17700
|
}, instanceKey2);
|
|
@@ -18016,7 +17999,7 @@ function useRaw(obj) {
|
|
|
18016
17999
|
}
|
|
18017
18000
|
return obj;
|
|
18018
18001
|
}
|
|
18019
|
-
var pseudoProps = ["help", "label", "ignore", "disabled", "preserve", /^preserve(-e|E)rrors/, /^[a-z]+(?:-visibility|Visibility)$/, /^[a-zA-Z-]+(?:-class|Class)$/, "prefixIcon", "suffixIcon", /^[a-zA-Z-]+(?:-icon|Icon)$/];
|
|
18002
|
+
var pseudoProps = ["help", "label", "ignore", "disabled", "preserve", /^preserve(-e|E)rrors/, /^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/, /^[a-zA-Z-]+(?:-class|Class)$/, "prefixIcon", "suffixIcon", /^[a-zA-Z-]+(?:-icon|Icon)$/];
|
|
18020
18003
|
function classesToNodeProps(node2, props2) {
|
|
18021
18004
|
if (props2.classes) {
|
|
18022
18005
|
Object.keys(props2.classes).forEach((key) => {
|
|
@@ -18044,10 +18027,11 @@ function onlyListeners(props2) {
|
|
|
18044
18027
|
}
|
|
18045
18028
|
function useInput(props2, context) {
|
|
18046
18029
|
var options2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
18030
|
+
var _a;
|
|
18047
18031
|
var config = Object.assign({}, inject(optionsSymbol) || {}, options2);
|
|
18048
18032
|
var instance = getCurrentInstance();
|
|
18049
18033
|
var listeners = onlyListeners(instance === null || instance === void 0 ? void 0 : instance.vnode.props);
|
|
18050
|
-
var isVModeled =
|
|
18034
|
+
var isVModeled = "modelValue" in ((_a = instance === null || instance === void 0 ? void 0 : instance.vnode.props) !== null && _a !== void 0 ? _a : {});
|
|
18051
18035
|
var value = props2.modelValue !== void 0 ? props2.modelValue : cloneAny(context.attrs.value);
|
|
18052
18036
|
function createInitialProps() {
|
|
18053
18037
|
var initialProps2 = _objectSpread2(_objectSpread2({}, nodeProps(props2)), listeners);
|
|
@@ -18134,6 +18118,8 @@ function useInput(props2, context) {
|
|
|
18134
18118
|
}
|
|
18135
18119
|
watchEffect(() => {
|
|
18136
18120
|
var attrs = except(nodeProps(context.attrs), pseudoPropNames.value);
|
|
18121
|
+
if ("multiple" in attrs)
|
|
18122
|
+
attrs.multiple = undefine(attrs.multiple);
|
|
18137
18123
|
node2.props.attrs = Object.assign({}, node2.props.attrs || {}, attrs);
|
|
18138
18124
|
});
|
|
18139
18125
|
watchEffect(() => {
|
|
@@ -18179,8 +18165,8 @@ function useInput(props2, context) {
|
|
|
18179
18165
|
var inputTimeout;
|
|
18180
18166
|
var mutex = /* @__PURE__ */ new WeakSet();
|
|
18181
18167
|
node2.on("modelUpdated", () => {
|
|
18182
|
-
var
|
|
18183
|
-
context.emit("inputRaw", (
|
|
18168
|
+
var _a2, _b;
|
|
18169
|
+
context.emit("inputRaw", (_a2 = node2.context) === null || _a2 === void 0 ? void 0 : _a2.value, node2);
|
|
18184
18170
|
clearTimeout(inputTimeout);
|
|
18185
18171
|
inputTimeout = setTimeout(context.emit, 20, "input", (_b = node2.context) === null || _b === void 0 ? void 0 : _b.value, node2);
|
|
18186
18172
|
if (isVModeled && node2.context) {
|
|
@@ -18193,7 +18179,7 @@ function useInput(props2, context) {
|
|
|
18193
18179
|
});
|
|
18194
18180
|
if (isVModeled) {
|
|
18195
18181
|
watchVerbose(toRef(props2, "modelValue"), (path, value2) => {
|
|
18196
|
-
var
|
|
18182
|
+
var _a2;
|
|
18197
18183
|
var rawValue = useRaw(value2);
|
|
18198
18184
|
if (isObject(rawValue) && mutex.has(rawValue)) {
|
|
18199
18185
|
return mutex.delete(rawValue);
|
|
@@ -18201,7 +18187,7 @@ function useInput(props2, context) {
|
|
|
18201
18187
|
if (!path.length)
|
|
18202
18188
|
node2.input(value2, false);
|
|
18203
18189
|
else
|
|
18204
|
-
(
|
|
18190
|
+
(_a2 = node2.at(path)) === null || _a2 === void 0 ? void 0 : _a2.input(value2, false);
|
|
18205
18191
|
});
|
|
18206
18192
|
if (node2.value !== value) {
|
|
18207
18193
|
node2.emit("modelUpdated");
|
|
@@ -18216,7 +18202,7 @@ function isComponent(obj) {
|
|
|
18216
18202
|
}
|
|
18217
18203
|
function createInput(schemaOrComponent) {
|
|
18218
18204
|
var definitionOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
18219
|
-
var
|
|
18205
|
+
var definition2 = _objectSpread2({
|
|
18220
18206
|
type: "input"
|
|
18221
18207
|
}, definitionOptions);
|
|
18222
18208
|
var schema;
|
|
@@ -18228,7 +18214,7 @@ function createInput(schemaOrComponent) {
|
|
|
18228
18214
|
context: "$node.context"
|
|
18229
18215
|
}
|
|
18230
18216
|
}));
|
|
18231
|
-
|
|
18217
|
+
definition2.library = {
|
|
18232
18218
|
[cmpName]: markRaw(schemaOrComponent)
|
|
18233
18219
|
};
|
|
18234
18220
|
} else if (typeof schemaOrComponent === "function") {
|
|
@@ -18236,9 +18222,68 @@ function createInput(schemaOrComponent) {
|
|
|
18236
18222
|
} else {
|
|
18237
18223
|
schema = createSection("input", () => cloneAny(schemaOrComponent));
|
|
18238
18224
|
}
|
|
18239
|
-
|
|
18240
|
-
return
|
|
18225
|
+
definition2.schema = useSchema(schema || "Schema undefined");
|
|
18226
|
+
return definition2;
|
|
18241
18227
|
}
|
|
18228
|
+
var messages = createSection("messages", () => ({
|
|
18229
|
+
$el: "ul",
|
|
18230
|
+
if: "$fns.length($messages)"
|
|
18231
|
+
}), true);
|
|
18232
|
+
var message = createSection("message", () => ({
|
|
18233
|
+
$el: "li",
|
|
18234
|
+
for: ["message", "$messages"],
|
|
18235
|
+
attrs: {
|
|
18236
|
+
key: "$message.key",
|
|
18237
|
+
id: "$id + '-' + $message.key",
|
|
18238
|
+
"data-message-type": "$message.type"
|
|
18239
|
+
}
|
|
18240
|
+
}));
|
|
18241
|
+
var definition = messages(message("$message.value"));
|
|
18242
|
+
defineComponent({
|
|
18243
|
+
props: {
|
|
18244
|
+
node: {
|
|
18245
|
+
type: Object,
|
|
18246
|
+
required: false
|
|
18247
|
+
},
|
|
18248
|
+
sectionsSchema: {
|
|
18249
|
+
type: Object,
|
|
18250
|
+
default: {}
|
|
18251
|
+
},
|
|
18252
|
+
defaultPosition: {
|
|
18253
|
+
type: [String, Boolean],
|
|
18254
|
+
default: false
|
|
18255
|
+
}
|
|
18256
|
+
},
|
|
18257
|
+
setup(props2, context) {
|
|
18258
|
+
var node2 = computed(() => {
|
|
18259
|
+
return props2.node || inject(parentSymbol, void 0);
|
|
18260
|
+
});
|
|
18261
|
+
watch$1(node2, () => {
|
|
18262
|
+
var _a;
|
|
18263
|
+
if (((_a = node2.value) === null || _a === void 0 ? void 0 : _a.context) && !undefine(props2.defaultPosition)) {
|
|
18264
|
+
node2.value.context.defaultMessagePlacement = false;
|
|
18265
|
+
}
|
|
18266
|
+
}, {
|
|
18267
|
+
immediate: true
|
|
18268
|
+
});
|
|
18269
|
+
var schema = definition(props2.sectionsSchema || {});
|
|
18270
|
+
var data2 = computed(() => {
|
|
18271
|
+
var _a, _b, _c, _d, _e, _f;
|
|
18272
|
+
return {
|
|
18273
|
+
messages: ((_b = (_a = node2.value) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.messages) || {},
|
|
18274
|
+
fns: ((_d = (_c = node2.value) === null || _c === void 0 ? void 0 : _c.context) === null || _d === void 0 ? void 0 : _d.fns) || {},
|
|
18275
|
+
classes: ((_f = (_e = node2.value) === null || _e === void 0 ? void 0 : _e.context) === null || _f === void 0 ? void 0 : _f.classes) || {}
|
|
18276
|
+
};
|
|
18277
|
+
});
|
|
18278
|
+
return () => {
|
|
18279
|
+
var _a;
|
|
18280
|
+
return ((_a = node2.value) === null || _a === void 0 ? void 0 : _a.context) ? h(FormKitSchema, {
|
|
18281
|
+
schema,
|
|
18282
|
+
data: data2.value
|
|
18283
|
+
}, _objectSpread2({}, context.slots)) : null;
|
|
18284
|
+
};
|
|
18285
|
+
}
|
|
18286
|
+
});
|
|
18242
18287
|
var vueBindings = function vueBindings2(node2) {
|
|
18243
18288
|
node2.ledger.count("blocking", (m3) => m3.blocking);
|
|
18244
18289
|
var isValid2 = ref(!node2.ledger.value("blocking"));
|
|
@@ -18292,9 +18337,9 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18292
18337
|
var messages2 = computed(() => {
|
|
18293
18338
|
var visibleMessages = {};
|
|
18294
18339
|
for (var key in availableMessages) {
|
|
18295
|
-
var
|
|
18296
|
-
if (
|
|
18297
|
-
visibleMessages[key] =
|
|
18340
|
+
var _message = availableMessages[key];
|
|
18341
|
+
if (_message.type !== "validation" || validationVisible.value) {
|
|
18342
|
+
visibleMessages[key] = _message;
|
|
18298
18343
|
}
|
|
18299
18344
|
}
|
|
18300
18345
|
return visibleMessages;
|
|
@@ -18321,7 +18366,7 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18321
18366
|
var classesPropClasses = createClasses(property, node3, node3.props["_".concat(property, "Class")]);
|
|
18322
18367
|
var sectionPropClasses = createClasses(property, node3, node3.props["".concat(property, "Class")]);
|
|
18323
18368
|
className = generateClassList(node3, property, rootClasses, globalConfigClasses, classesPropClasses, sectionPropClasses);
|
|
18324
|
-
target[property] = className;
|
|
18369
|
+
target[property] = className !== null && className !== void 0 ? className : "";
|
|
18325
18370
|
});
|
|
18326
18371
|
}
|
|
18327
18372
|
}
|
|
@@ -18364,10 +18409,17 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18364
18409
|
}
|
|
18365
18410
|
},
|
|
18366
18411
|
touch: () => {
|
|
18412
|
+
var _a;
|
|
18413
|
+
var doCompare = context.dirtyBehavior === "compare";
|
|
18414
|
+
if (((_a = node2.store.dirty) === null || _a === void 0 ? void 0 : _a.value) && !doCompare)
|
|
18415
|
+
return;
|
|
18416
|
+
var isDirty = !eq(node2.props._init, node2._value);
|
|
18417
|
+
if (!isDirty && !doCompare)
|
|
18418
|
+
return;
|
|
18367
18419
|
node2.store.set(createMessage({
|
|
18368
18420
|
key: "dirty",
|
|
18369
18421
|
visible: false,
|
|
18370
|
-
value:
|
|
18422
|
+
value: isDirty
|
|
18371
18423
|
}));
|
|
18372
18424
|
},
|
|
18373
18425
|
DOMInput: (e2) => {
|
|
@@ -18381,6 +18433,7 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18381
18433
|
messages: messages2,
|
|
18382
18434
|
node: markRaw(node2),
|
|
18383
18435
|
options: node2.props.options,
|
|
18436
|
+
defaultMessagePlacement: true,
|
|
18384
18437
|
state: {
|
|
18385
18438
|
blurred: false,
|
|
18386
18439
|
complete: isComplete,
|
|
@@ -18405,12 +18458,15 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18405
18458
|
triggerRef(value);
|
|
18406
18459
|
triggerRef(_value);
|
|
18407
18460
|
}
|
|
18408
|
-
|
|
18461
|
+
_asyncToGenerator(function* () {
|
|
18462
|
+
yield node2.settled;
|
|
18463
|
+
node2.props._init = cloneAny(node2.value);
|
|
18464
|
+
})();
|
|
18409
18465
|
});
|
|
18410
|
-
node2.on("settled", (
|
|
18466
|
+
node2.on("settled", (_ref6) => {
|
|
18411
18467
|
var {
|
|
18412
18468
|
payload: isSettled
|
|
18413
|
-
} =
|
|
18469
|
+
} = _ref6;
|
|
18414
18470
|
context.state.settled = isSettled;
|
|
18415
18471
|
});
|
|
18416
18472
|
function observeProps(observe) {
|
|
@@ -18419,16 +18475,16 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18419
18475
|
if (!has2(context, prop) && has2(node2.props, prop)) {
|
|
18420
18476
|
context[prop] = node2.props[prop];
|
|
18421
18477
|
}
|
|
18422
|
-
node2.on("prop:".concat(prop), (
|
|
18478
|
+
node2.on("prop:".concat(prop), (_ref7) => {
|
|
18423
18479
|
var {
|
|
18424
18480
|
payload
|
|
18425
|
-
} =
|
|
18481
|
+
} = _ref7;
|
|
18426
18482
|
context[prop] = payload;
|
|
18427
18483
|
});
|
|
18428
18484
|
});
|
|
18429
18485
|
}
|
|
18430
18486
|
var rootProps = () => {
|
|
18431
|
-
var props2 = ["help", "label", "disabled", "options", "type", "attrs", "preserve", "preserveErrors", "id"];
|
|
18487
|
+
var props2 = ["help", "label", "disabled", "options", "type", "attrs", "preserve", "preserveErrors", "id", "dirtyBehavior"];
|
|
18432
18488
|
var iconPattern = /^[a-zA-Z-]+(?:-icon|Icon)$/;
|
|
18433
18489
|
var matchingProps = Object.keys(node2.props).filter((prop) => {
|
|
18434
18490
|
return iconPattern.test(prop);
|
|
@@ -18436,21 +18492,21 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18436
18492
|
return props2.concat(matchingProps);
|
|
18437
18493
|
};
|
|
18438
18494
|
observeProps(rootProps());
|
|
18439
|
-
function definedAs(
|
|
18440
|
-
if (
|
|
18441
|
-
observeProps(
|
|
18495
|
+
function definedAs(definition2) {
|
|
18496
|
+
if (definition2.props)
|
|
18497
|
+
observeProps(definition2.props);
|
|
18442
18498
|
}
|
|
18443
18499
|
node2.props.definition && definedAs(node2.props.definition);
|
|
18444
|
-
node2.on("added-props", (
|
|
18500
|
+
node2.on("added-props", (_ref8) => {
|
|
18445
18501
|
var {
|
|
18446
18502
|
payload
|
|
18447
|
-
} =
|
|
18503
|
+
} = _ref8;
|
|
18448
18504
|
return observeProps(payload);
|
|
18449
18505
|
});
|
|
18450
|
-
node2.on("input", (
|
|
18506
|
+
node2.on("input", (_ref9) => {
|
|
18451
18507
|
var {
|
|
18452
18508
|
payload
|
|
18453
|
-
} =
|
|
18509
|
+
} = _ref9;
|
|
18454
18510
|
if (node2.type !== "input" && !isRef(payload) && !isReactive(payload)) {
|
|
18455
18511
|
_value.value = shallowClone(payload);
|
|
18456
18512
|
} else {
|
|
@@ -18458,10 +18514,10 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18458
18514
|
triggerRef(_value);
|
|
18459
18515
|
}
|
|
18460
18516
|
});
|
|
18461
|
-
node2.on("commit", (
|
|
18517
|
+
node2.on("commit", (_ref10) => {
|
|
18462
18518
|
var {
|
|
18463
18519
|
payload
|
|
18464
|
-
} =
|
|
18520
|
+
} = _ref10;
|
|
18465
18521
|
if (node2.type !== "input" && !isRef(payload) && !isReactive(payload)) {
|
|
18466
18522
|
value.value = _value.value = shallowClone(payload);
|
|
18467
18523
|
} else {
|
|
@@ -18469,8 +18525,9 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18469
18525
|
triggerRef(value);
|
|
18470
18526
|
}
|
|
18471
18527
|
node2.emit("modelUpdated");
|
|
18472
|
-
if (!context.state.dirty && node2.isCreated && hasTicked
|
|
18528
|
+
if ((!context.state.dirty || context.dirtyBehavior === "compare") && node2.isCreated && hasTicked) {
|
|
18473
18529
|
context.handlers.touch();
|
|
18530
|
+
}
|
|
18474
18531
|
if (isComplete && node2.type === "input" && hasErrors.value && !undefine(node2.props.preserveErrors)) {
|
|
18475
18532
|
node2.store.filter((message2) => {
|
|
18476
18533
|
var _a;
|
|
@@ -18479,7 +18536,7 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18479
18536
|
}
|
|
18480
18537
|
});
|
|
18481
18538
|
var updateState = /* @__PURE__ */ function() {
|
|
18482
|
-
var
|
|
18539
|
+
var _ref11 = _asyncToGenerator(function* (message2) {
|
|
18483
18540
|
if (message2.type === "ui" && message2.visible && !message2.meta.showAsMessage) {
|
|
18484
18541
|
ui[message2.key] = message2;
|
|
18485
18542
|
} else if (message2.visible) {
|
|
@@ -18489,15 +18546,15 @@ var vueBindings = function vueBindings2(node2) {
|
|
|
18489
18546
|
}
|
|
18490
18547
|
});
|
|
18491
18548
|
return function updateState2(_x) {
|
|
18492
|
-
return
|
|
18549
|
+
return _ref11.apply(this, arguments);
|
|
18493
18550
|
};
|
|
18494
18551
|
}();
|
|
18495
18552
|
node2.on("message-added", (e2) => updateState(e2.payload));
|
|
18496
18553
|
node2.on("message-updated", (e2) => updateState(e2.payload));
|
|
18497
|
-
node2.on("message-removed", (
|
|
18554
|
+
node2.on("message-removed", (_ref12) => {
|
|
18498
18555
|
var {
|
|
18499
18556
|
payload: message2
|
|
18500
|
-
} =
|
|
18557
|
+
} = _ref12;
|
|
18501
18558
|
delete ui[message2.key];
|
|
18502
18559
|
delete availableMessages[message2.key];
|
|
18503
18560
|
delete context.state[message2.key];
|
|
@@ -18571,6 +18628,18 @@ defineComponent({
|
|
|
18571
18628
|
var config = inject(optionsSymbol, {});
|
|
18572
18629
|
var parent = inject(parentSymbol, null);
|
|
18573
18630
|
var iconHandler = void 0;
|
|
18631
|
+
function loadIcon() {
|
|
18632
|
+
if (!iconHandler || typeof iconHandler !== "function")
|
|
18633
|
+
return;
|
|
18634
|
+
var iconOrPromise = iconHandler(props2.icon);
|
|
18635
|
+
if (iconOrPromise instanceof Promise) {
|
|
18636
|
+
iconOrPromise.then((iconValue) => {
|
|
18637
|
+
icon2.value = iconValue;
|
|
18638
|
+
});
|
|
18639
|
+
} else {
|
|
18640
|
+
icon2.value = iconOrPromise;
|
|
18641
|
+
}
|
|
18642
|
+
}
|
|
18574
18643
|
if (props2.iconLoader && typeof props2.iconLoader === "function") {
|
|
18575
18644
|
iconHandler = createIconHandler(props2.iconLoader);
|
|
18576
18645
|
} else if (parent && ((_a = parent.props) === null || _a === void 0 ? void 0 : _a.iconLoader)) {
|
|
@@ -18585,18 +18654,13 @@ defineComponent({
|
|
|
18585
18654
|
iconHandler = iconPlugin.iconHandler;
|
|
18586
18655
|
}
|
|
18587
18656
|
}
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
});
|
|
18594
|
-
} else {
|
|
18595
|
-
icon2.value = iconOrPromise;
|
|
18596
|
-
}
|
|
18597
|
-
}
|
|
18657
|
+
watch$1(() => props2.icon, () => {
|
|
18658
|
+
loadIcon();
|
|
18659
|
+
}, {
|
|
18660
|
+
immediate: true
|
|
18661
|
+
});
|
|
18598
18662
|
return () => {
|
|
18599
|
-
if (icon2.value) {
|
|
18663
|
+
if (props2.icon && icon2.value) {
|
|
18600
18664
|
return h("span", {
|
|
18601
18665
|
class: "formkit-icon",
|
|
18602
18666
|
innerHTML: icon2.value
|
|
@@ -18792,7 +18856,7 @@ function prepData(formData) {
|
|
|
18792
18856
|
props2.vid = window.zar.getVID();
|
|
18793
18857
|
}
|
|
18794
18858
|
var tf = document.getElementsByName("xxTrustedFormCertUrl");
|
|
18795
|
-
if (tf.length > 0) {
|
|
18859
|
+
if (tf && tf.length > 0) {
|
|
18796
18860
|
props2.Trusted_Form_URL = tf[0].value;
|
|
18797
18861
|
dbg("TrustedFormCertUrl", props2.TrustedFormCertUrl);
|
|
18798
18862
|
}
|
|
@@ -18874,6 +18938,30 @@ var scrollAnchor = (formNode) => () => {
|
|
|
18874
18938
|
}
|
|
18875
18939
|
}
|
|
18876
18940
|
};
|
|
18941
|
+
var updateProgressBar = (formNode, stepHistory2, stepQueue2) => {
|
|
18942
|
+
try {
|
|
18943
|
+
var barId = formNode.attrs.progressBarId || "progress-bar";
|
|
18944
|
+
var textId = formNode.attrs.progressBarTextId || "progress-bar-text";
|
|
18945
|
+
var progress = document.getElementById(barId);
|
|
18946
|
+
if (progress) {
|
|
18947
|
+
var steps2 = stepHistory2.value.length + stepQueue2.value.length;
|
|
18948
|
+
var percent = stepHistory2.value.length / (steps2 - 1) * 100;
|
|
18949
|
+
progress.style.width = percent + "%";
|
|
18950
|
+
var progressText = document.getElementById(textId);
|
|
18951
|
+
if (progressText) {
|
|
18952
|
+
progressText.innerHTML = Math.round(percent) + "% Complete";
|
|
18953
|
+
}
|
|
18954
|
+
}
|
|
18955
|
+
} catch (err) {
|
|
18956
|
+
var msg = "failed to updateProgressBar: " + err.toString();
|
|
18957
|
+
console.warn(msg);
|
|
18958
|
+
rollbar("warning", msg);
|
|
18959
|
+
}
|
|
18960
|
+
};
|
|
18961
|
+
var prevStepFunc = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
18962
|
+
scrollAnchor(formNode)();
|
|
18963
|
+
updateProgressBar(formNode, stepHistory2, stepQueue2);
|
|
18964
|
+
};
|
|
18877
18965
|
var preStepFunc = (formNode) => (stepNode) => {
|
|
18878
18966
|
try {
|
|
18879
18967
|
if (formNode.attrs.valueOverrideMap) {
|
|
@@ -18889,6 +18977,7 @@ var fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
18889
18977
|
if (!stepResult) {
|
|
18890
18978
|
return;
|
|
18891
18979
|
}
|
|
18980
|
+
updateProgressBar(formNode, stepHistory2, stepQueue2);
|
|
18892
18981
|
var step_values = null;
|
|
18893
18982
|
try {
|
|
18894
18983
|
setTimeout(scrollAnchor(formNode), 100);
|
|
@@ -27854,6 +27943,7 @@ var init = () => {
|
|
|
27854
27943
|
data2.submitUrl = data2.submitUrl || defaultSubmitUrl;
|
|
27855
27944
|
data2.prepData = data2.prepData || prepData;
|
|
27856
27945
|
data2.preStepFunc = data2.preStepFunc || preStepFunc;
|
|
27946
|
+
data2.prevStepFunc = data2.prevStepFunc || prevStepFunc;
|
|
27857
27947
|
data2.fireStepEvent = data2.fireStepEvent || fireStepEvent;
|
|
27858
27948
|
data2.handleRedirect = data2.handleRedirect || handleRedirect;
|
|
27859
27949
|
data2.scrollAnchor = data2.scrollAnchor || scrollAnchor;
|
|
@@ -27876,6 +27966,20 @@ var init = () => {
|
|
|
27876
27966
|
}
|
|
27877
27967
|
}
|
|
27878
27968
|
};
|
|
27969
|
+
data2.onInput = (callback) => (e2, node2) => {
|
|
27970
|
+
var elem = document.getElementById(node2.props.id);
|
|
27971
|
+
if (elem && elem.offsetParent === null) {
|
|
27972
|
+
return;
|
|
27973
|
+
}
|
|
27974
|
+
try {
|
|
27975
|
+
callback();
|
|
27976
|
+
e2.preventDefault();
|
|
27977
|
+
} catch (err) {
|
|
27978
|
+
var msg = "onInput failed: " + err.toString();
|
|
27979
|
+
console.warn(msg);
|
|
27980
|
+
rollbar("warning", msg);
|
|
27981
|
+
}
|
|
27982
|
+
};
|
|
27879
27983
|
var app = createApp(_sfc_main$1, {
|
|
27880
27984
|
schema: schemaObj,
|
|
27881
27985
|
data: data2
|