@qikdev/vue-ui 0.1.45 → 0.1.46

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/lib.es.js CHANGED
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
32
32
  };
33
33
  import { openBlock, createElementBlock, renderSlot, resolveComponent, createBlock, withCtx, createVNode, Fragment, renderList, normalizeClass, toDisplayString, withDirectives, resolveDynamicComponent, vShow, pushScopeId, popScopeId, createElementVNode, normalizeStyle, createCommentVNode, Teleport, createTextVNode, vModelSelect, withKeys, withModifiers, vModelText, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, mergeProps, toHandlers, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.1.45";
35
+ const version$1 = "0.1.46";
36
36
  var flexColumn_vue_vue_type_style_index_0_scoped_true_lang = "";
37
37
  var _export_sfc = (sfc, props2) => {
38
38
  const target = sfc.__vccOpts || sfc;
@@ -240,8 +240,8 @@ const _sfc_main$Y = {
240
240
  }
241
241
  }
242
242
  };
243
- const _withScopeId$4 = (n2) => (pushScopeId("data-v-27f20370"), n2 = n2(), popScopeId(), n2);
244
- const _hoisted_1$M = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode("i", { class: "fa fa-spin fa-spinner" }, null, -1));
243
+ const _withScopeId$5 = (n2) => (pushScopeId("data-v-27f20370"), n2 = n2(), popScopeId(), n2);
244
+ const _hoisted_1$M = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("i", { class: "fa fa-spin fa-spinner" }, null, -1));
245
245
  const _hoisted_2$B = [
246
246
  _hoisted_1$M
247
247
  ];
@@ -909,9 +909,9 @@ const _sfc_main$Q = {
909
909
  }
910
910
  }
911
911
  };
912
- const _withScopeId$3 = (n2) => (pushScopeId("data-v-6581fb86"), n2 = n2(), popScopeId(), n2);
912
+ const _withScopeId$4 = (n2) => (pushScopeId("data-v-6581fb86"), n2 = n2(), popScopeId(), n2);
913
913
  const _hoisted_1$J = { class: "ux-progress" };
914
- const _hoisted_2$A = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "ux-progress-bg" }, null, -1));
914
+ const _hoisted_2$A = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode("div", { class: "ux-progress-bg" }, null, -1));
915
915
  function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
916
916
  return openBlock(), createElementBlock("div", _hoisted_1$J, [
917
917
  _hoisted_2$A,
@@ -1448,11 +1448,11 @@ const _hoisted_4$r = {
1448
1448
  class: "ui-select-button"
1449
1449
  };
1450
1450
  const _hoisted_5$k = ["multiple"];
1451
- const _hoisted_6$g = {
1451
+ const _hoisted_6$h = {
1452
1452
  key: 0,
1453
1453
  value: ""
1454
1454
  };
1455
- const _hoisted_7$e = ["value"];
1455
+ const _hoisted_7$f = ["value"];
1456
1456
  function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
1457
1457
  const _component_ux_button = resolveComponent("ux-button");
1458
1458
  return openBlock(), createElementBlock("div", {
@@ -1478,11 +1478,11 @@ function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
1478
1478
  multiple: _ctx.multiValue,
1479
1479
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
1480
1480
  }, [
1481
- _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$g, "None")) : createCommentVNode("", true),
1481
+ _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$h, "None")) : createCommentVNode("", true),
1482
1482
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
1483
1483
  return openBlock(), createElementBlock("option", {
1484
1484
  value: option2.value
1485
- }, toDisplayString(option2.title), 9, _hoisted_7$e);
1485
+ }, toDisplayString(option2.title), 9, _hoisted_7$f);
1486
1486
  }), 256))
1487
1487
  ], 40, _hoisted_5$k), [
1488
1488
  [vModelSelect, _ctx.model]
@@ -1562,7 +1562,7 @@ const _sfc_main$M = {
1562
1562
  }
1563
1563
  }
1564
1564
  };
1565
- const _withScopeId$2 = (n2) => (pushScopeId("data-v-856e04c2"), n2 = n2(), popScopeId(), n2);
1565
+ const _withScopeId$3 = (n2) => (pushScopeId("data-v-856e04c2"), n2 = n2(), popScopeId(), n2);
1566
1566
  const _hoisted_1$F = {
1567
1567
  key: 0,
1568
1568
  class: "ux-field-title"
@@ -1577,11 +1577,11 @@ const _hoisted_3$u = {
1577
1577
  };
1578
1578
  const _hoisted_4$q = { key: 2 };
1579
1579
  const _hoisted_5$j = /* @__PURE__ */ createTextVNode(" Country Code ");
1580
- const _hoisted_6$f = { key: 0 };
1581
- const _hoisted_7$d = { key: 1 };
1582
- const _hoisted_8$7 = { class: "ux-text-wrap" };
1583
- const _hoisted_9$5 = ["placeholder", "onUpdate:modelValue"];
1584
- const _hoisted_10$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("option", { value: "" }, "None", -1));
1580
+ const _hoisted_6$g = { key: 0 };
1581
+ const _hoisted_7$e = { key: 1 };
1582
+ const _hoisted_8$8 = { class: "ux-text-wrap" };
1583
+ const _hoisted_9$6 = ["placeholder", "onUpdate:modelValue"];
1584
+ const _hoisted_10$5 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("option", { value: "" }, "None", -1));
1585
1585
  const _hoisted_11$4 = ["value"];
1586
1586
  const _hoisted_12$4 = { class: "ux-text-wrap" };
1587
1587
  const _hoisted_13$3 = ["placeholder"];
@@ -1616,7 +1616,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
1616
1616
  !entry.countryCode ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1617
1617
  _hoisted_5$j
1618
1618
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1619
- $data.lookup[entry.countryCode] ? (openBlock(), createElementBlock("div", _hoisted_6$f, toDisplayString($data.lookup[entry.countryCode].emoji) + " - " + toDisplayString($data.lookup[entry.countryCode].alpha2), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$d, "Loading"))
1619
+ $data.lookup[entry.countryCode] ? (openBlock(), createElementBlock("div", _hoisted_6$g, toDisplayString($data.lookup[entry.countryCode].emoji) + " - " + toDisplayString($data.lookup[entry.countryCode].alpha2), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$e, "Loading"))
1620
1620
  ], 64))
1621
1621
  ]),
1622
1622
  _: 2
@@ -1626,7 +1626,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
1626
1626
  }, 1024),
1627
1627
  createVNode(_component_flex_cell, null, {
1628
1628
  default: withCtx(() => [
1629
- createElementVNode("div", _hoisted_8$7, [
1629
+ createElementVNode("div", _hoisted_8$8, [
1630
1630
  withDirectives(createElementVNode("input", {
1631
1631
  class: "ux-field-focus ux-text-input-multiple",
1632
1632
  placeholder: $options.actualPlaceholder,
@@ -1635,7 +1635,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
1635
1635
  ref: "input",
1636
1636
  onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
1637
1637
  "onUpdate:modelValue": ($event) => entry.number = $event
1638
- }, null, 40, _hoisted_9$5), [
1638
+ }, null, 40, _hoisted_9$6), [
1639
1639
  [vModelText, entry.number]
1640
1640
  ])
1641
1641
  ])
@@ -1690,7 +1690,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
1690
1690
  class: "ux-country-code-select",
1691
1691
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.model.countryCode = $event)
1692
1692
  }, [
1693
- _hoisted_10$4,
1693
+ _hoisted_10$5,
1694
1694
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.countryCodes, (country) => {
1695
1695
  return openBlock(), createElementBlock("option", {
1696
1696
  value: country.value
@@ -2271,11 +2271,11 @@ const _hoisted_4$p = {
2271
2271
  class: "ui-select-button"
2272
2272
  };
2273
2273
  const _hoisted_5$i = ["multiple"];
2274
- const _hoisted_6$e = {
2274
+ const _hoisted_6$f = {
2275
2275
  key: 0,
2276
2276
  value: ""
2277
2277
  };
2278
- const _hoisted_7$c = ["value"];
2278
+ const _hoisted_7$d = ["value"];
2279
2279
  function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
2280
2280
  const _component_ux_button = resolveComponent("ux-button");
2281
2281
  return openBlock(), createElementBlock("div", {
@@ -2301,11 +2301,11 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
2301
2301
  multiple: _ctx.multiValue,
2302
2302
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
2303
2303
  }, [
2304
- _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$e, "None")) : createCommentVNode("", true),
2304
+ _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$f, "None")) : createCommentVNode("", true),
2305
2305
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
2306
2306
  return openBlock(), createElementBlock("option", {
2307
2307
  value: option2.value
2308
- }, toDisplayString(option2.title), 9, _hoisted_7$c);
2308
+ }, toDisplayString(option2.title), 9, _hoisted_7$d);
2309
2309
  }), 256))
2310
2310
  ], 40, _hoisted_5$i), [
2311
2311
  [vModelSelect, _ctx.model]
@@ -5363,11 +5363,11 @@ const _hoisted_4$n = {
5363
5363
  class: "ui-select-button"
5364
5364
  };
5365
5365
  const _hoisted_5$h = ["multiple"];
5366
- const _hoisted_6$d = {
5366
+ const _hoisted_6$e = {
5367
5367
  key: 0,
5368
5368
  value: ""
5369
5369
  };
5370
- const _hoisted_7$b = ["value"];
5370
+ const _hoisted_7$c = ["value"];
5371
5371
  function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
5372
5372
  const _component_ux_button = resolveComponent("ux-button");
5373
5373
  return openBlock(), createElementBlock("div", {
@@ -5393,11 +5393,11 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
5393
5393
  multiple: _ctx.multiValue,
5394
5394
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
5395
5395
  }, [
5396
- _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$d, "None")) : createCommentVNode("", true),
5396
+ _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$e, "None")) : createCommentVNode("", true),
5397
5397
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
5398
5398
  return openBlock(), createElementBlock("option", {
5399
5399
  value: option2.value
5400
- }, toDisplayString(option2.title), 9, _hoisted_7$b);
5400
+ }, toDisplayString(option2.title), 9, _hoisted_7$c);
5401
5401
  }), 256))
5402
5402
  ], 40, _hoisted_5$h), [
5403
5403
  [vModelSelect, _ctx.model]
@@ -5501,16 +5501,16 @@ const _hoisted_5$g = {
5501
5501
  key: 0,
5502
5502
  class: "ux-text-prefix"
5503
5503
  };
5504
- const _hoisted_6$c = ["onBlur", "onUpdate:modelValue"];
5505
- const _hoisted_7$a = {
5504
+ const _hoisted_6$d = ["onBlur", "onUpdate:modelValue"];
5505
+ const _hoisted_7$b = {
5506
5506
  key: 1,
5507
5507
  class: "ux-text-suffix"
5508
5508
  };
5509
- const _hoisted_8$6 = {
5509
+ const _hoisted_8$7 = {
5510
5510
  key: 0,
5511
5511
  class: "ux-text-prefix"
5512
5512
  };
5513
- const _hoisted_9$4 = {
5513
+ const _hoisted_9$5 = {
5514
5514
  key: 1,
5515
5515
  class: "ux-text-suffix"
5516
5516
  };
@@ -5548,7 +5548,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
5548
5548
  onBlur: ($event) => $options.update($event, index2),
5549
5549
  "onUpdate:modelValue": ($event) => $options.proxy[index2] = $event,
5550
5550
  onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.touch && _ctx.touch(...args))
5551
- }, null, 40, _hoisted_6$c)), [
5551
+ }, null, 40, _hoisted_6$d)), [
5552
5552
  [
5553
5553
  vModelText,
5554
5554
  $options.proxy[index2],
@@ -5556,7 +5556,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
5556
5556
  { lazy: true }
5557
5557
  ]
5558
5558
  ]),
5559
- $options.suffix ? (openBlock(), createElementBlock("span", _hoisted_7$a, toDisplayString($options.suffix), 1)) : createCommentVNode("", true)
5559
+ $options.suffix ? (openBlock(), createElementBlock("span", _hoisted_7$b, toDisplayString($options.suffix), 1)) : createCommentVNode("", true)
5560
5560
  ], 2)
5561
5561
  ]),
5562
5562
  _: 2
@@ -5601,7 +5601,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
5601
5601
  key: 3,
5602
5602
  class: normalizeClass(["ux-text-wrap", { prefixed: $options.prefix, suffixed: $options.suffix }])
5603
5603
  }, [
5604
- $options.prefix ? (openBlock(), createElementBlock("span", _hoisted_8$6, toDisplayString($options.prefix), 1)) : createCommentVNode("", true),
5604
+ $options.prefix ? (openBlock(), createElementBlock("span", _hoisted_8$7, toDisplayString($options.prefix), 1)) : createCommentVNode("", true),
5605
5605
  withDirectives((openBlock(), createElementBlock("input", {
5606
5606
  class: "ux-field-focus ux-text-input-single",
5607
5607
  ref: "input",
@@ -5618,7 +5618,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
5618
5618
  { lazy: true }
5619
5619
  ]
5620
5620
  ]),
5621
- $options.suffix ? (openBlock(), createElementBlock("span", _hoisted_9$4, toDisplayString($options.suffix), 1)) : createCommentVNode("", true)
5621
+ $options.suffix ? (openBlock(), createElementBlock("span", _hoisted_9$5, toDisplayString($options.suffix), 1)) : createCommentVNode("", true)
5622
5622
  ], 2))
5623
5623
  ], 64);
5624
5624
  }
@@ -5701,17 +5701,17 @@ const _hoisted_3$p = {
5701
5701
  };
5702
5702
  const _hoisted_4$l = { key: 2 };
5703
5703
  const _hoisted_5$f = { class: "ux-text-wrap" };
5704
- const _hoisted_6$b = {
5704
+ const _hoisted_6$c = {
5705
5705
  key: 0,
5706
5706
  class: "ux-text-prefix"
5707
5707
  };
5708
- const _hoisted_7$9 = ["type", "placeholder", "onUpdate:modelValue"];
5709
- const _hoisted_8$5 = ["type", "placeholder", "onUpdate:modelValue"];
5710
- const _hoisted_9$3 = {
5708
+ const _hoisted_7$a = ["type", "placeholder", "onUpdate:modelValue"];
5709
+ const _hoisted_8$6 = ["type", "placeholder", "onUpdate:modelValue"];
5710
+ const _hoisted_9$4 = {
5711
5711
  key: 3,
5712
5712
  class: "ux-text-suffix"
5713
5713
  };
5714
- const _hoisted_10$3 = {
5714
+ const _hoisted_10$4 = {
5715
5715
  key: 3,
5716
5716
  class: "ux-text-wrap"
5717
5717
  };
@@ -5746,7 +5746,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
5746
5746
  createVNode(_component_flex_cell, null, {
5747
5747
  default: withCtx(() => [
5748
5748
  createElementVNode("div", _hoisted_5$f, [
5749
- _ctx.prefix ? (openBlock(), createElementBlock("span", _hoisted_6$b, toDisplayString(_ctx.prefix), 1)) : createCommentVNode("", true),
5749
+ _ctx.prefix ? (openBlock(), createElementBlock("span", _hoisted_6$c, toDisplayString(_ctx.prefix), 1)) : createCommentVNode("", true),
5750
5750
  $options.lazy ? withDirectives((openBlock(), createElementBlock("input", {
5751
5751
  key: 1,
5752
5752
  type: $options.inputType,
@@ -5757,7 +5757,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
5757
5757
  ref: "input",
5758
5758
  onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
5759
5759
  "onUpdate:modelValue": ($event) => _ctx.model[index2] = $event
5760
- }, null, 40, _hoisted_7$9)), [
5760
+ }, null, 40, _hoisted_7$a)), [
5761
5761
  [
5762
5762
  vModelDynamic,
5763
5763
  _ctx.model[index2],
@@ -5775,10 +5775,10 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
5775
5775
  ref: "input",
5776
5776
  onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
5777
5777
  "onUpdate:modelValue": ($event) => _ctx.model[index2] = $event
5778
- }, null, 40, _hoisted_8$5)), [
5778
+ }, null, 40, _hoisted_8$6)), [
5779
5779
  [vModelDynamic, _ctx.model[index2]]
5780
5780
  ]) : createCommentVNode("", true),
5781
- _ctx.suffix ? (openBlock(), createElementBlock("span", _hoisted_9$3, toDisplayString(_ctx.suffix), 1)) : createCommentVNode("", true)
5781
+ _ctx.suffix ? (openBlock(), createElementBlock("span", _hoisted_9$4, toDisplayString(_ctx.suffix), 1)) : createCommentVNode("", true)
5782
5782
  ])
5783
5783
  ]),
5784
5784
  _: 2
@@ -5819,7 +5819,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
5819
5819
  ]),
5820
5820
  _: 1
5821
5821
  })) : createCommentVNode("", true)
5822
- ])) : (openBlock(), createElementBlock("div", _hoisted_10$3, [
5822
+ ])) : (openBlock(), createElementBlock("div", _hoisted_10$4, [
5823
5823
  _ctx.prefix ? (openBlock(), createElementBlock("span", _hoisted_11$3, toDisplayString(_ctx.prefix), 1)) : createCommentVNode("", true),
5824
5824
  $options.lazy ? withDirectives((openBlock(), createElementBlock("input", {
5825
5825
  key: 1,
@@ -6543,11 +6543,11 @@ const _hoisted_2$o = { key: 0 };
6543
6543
  const _hoisted_3$k = { key: 1 };
6544
6544
  const _hoisted_4$i = /* @__PURE__ */ createTextVNode(" And ");
6545
6545
  const _hoisted_5$c = { key: 2 };
6546
- const _hoisted_6$a = { key: 3 };
6547
- const _hoisted_7$8 = /* @__PURE__ */ createTextVNode(" And ");
6548
- const _hoisted_8$4 = { key: 4 };
6549
- const _hoisted_9$2 = { key: 5 };
6550
- const _hoisted_10$2 = { key: 6 };
6546
+ const _hoisted_6$b = { key: 3 };
6547
+ const _hoisted_7$9 = /* @__PURE__ */ createTextVNode(" And ");
6548
+ const _hoisted_8$5 = { key: 4 };
6549
+ const _hoisted_9$3 = { key: 5 };
6550
+ const _hoisted_10$3 = { key: 6 };
6551
6551
  const _hoisted_11$2 = { key: 7 };
6552
6552
  const _hoisted_12$2 = { key: 8 };
6553
6553
  const _hoisted_13$1 = { key: 9 };
@@ -6641,34 +6641,34 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
6641
6641
  _: 1
6642
6642
  })
6643
6643
  ])) : createCommentVNode("", true),
6644
- $options.inputType == "daterange" ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
6644
+ $options.inputType == "daterange" ? (openBlock(), createElementBlock("div", _hoisted_6$b, [
6645
6645
  createVNode(_component_date_field, {
6646
6646
  field: $options.dateField,
6647
6647
  modelValue: $data.model.value,
6648
6648
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.model.value = $event)
6649
6649
  }, null, 8, ["field", "modelValue"]),
6650
- _hoisted_7$8,
6650
+ _hoisted_7$9,
6651
6651
  createVNode(_component_date_field, {
6652
6652
  field: $options.dateField,
6653
6653
  modelValue: $data.model.value2,
6654
6654
  "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.model.value2 = $event)
6655
6655
  }, null, 8, ["field", "modelValue"])
6656
6656
  ])) : createCommentVNode("", true),
6657
- $options.inputType == "date" ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
6657
+ $options.inputType == "date" ? (openBlock(), createElementBlock("div", _hoisted_8$5, [
6658
6658
  createVNode(_component_date_field, {
6659
6659
  field: $options.dateField,
6660
6660
  modelValue: $data.model.value,
6661
6661
  "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.model.value = $event)
6662
6662
  }, null, 8, ["field", "modelValue"])
6663
6663
  ])) : createCommentVNode("", true),
6664
- $options.inputType == "reference" ? (openBlock(), createElementBlock("div", _hoisted_9$2, [
6664
+ $options.inputType == "reference" ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
6665
6665
  createVNode(_component_content_select, {
6666
6666
  field: $options.singleReferenceField,
6667
6667
  modelValue: $data.model.value,
6668
6668
  "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.model.value = $event)
6669
6669
  }, null, 8, ["field", "modelValue"])
6670
6670
  ])) : createCommentVNode("", true),
6671
- $options.inputType == "multireference" ? (openBlock(), createElementBlock("div", _hoisted_10$2, [
6671
+ $options.inputType == "multireference" ? (openBlock(), createElementBlock("div", _hoisted_10$3, [
6672
6672
  createVNode(_component_content_select, {
6673
6673
  field: $options.multiReferenceField,
6674
6674
  modelValue: $data.model.values,
@@ -7071,9 +7071,9 @@ const _hoisted_2$n = { class: "top" };
7071
7071
  const _hoisted_3$j = { class: "summary" };
7072
7072
  const _hoisted_4$h = /* @__PURE__ */ createTextVNode(" Match ");
7073
7073
  const _hoisted_5$b = /* @__PURE__ */ createTextVNode(" of the following conditions ");
7074
- const _hoisted_6$9 = /* @__PURE__ */ createElementVNode("span", { class: "line" }, null, -1);
7075
- const _hoisted_7$7 = { class: "operator" };
7076
- const _hoisted_8$3 = /* @__PURE__ */ createTextVNode("Add Condition");
7074
+ const _hoisted_6$a = /* @__PURE__ */ createElementVNode("span", { class: "line" }, null, -1);
7075
+ const _hoisted_7$8 = { class: "operator" };
7076
+ const _hoisted_8$4 = /* @__PURE__ */ createTextVNode("Add Condition");
7077
7077
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
7078
7078
  const _component_native_select = resolveComponent("native-select");
7079
7079
  const _component_flex_cell = resolveComponent("flex-cell");
@@ -7138,8 +7138,8 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
7138
7138
  shrink: ""
7139
7139
  }, {
7140
7140
  default: withCtx(() => [
7141
- _hoisted_6$9,
7142
- createElementVNode("div", _hoisted_7$7, toDisplayString($data.model.operator), 1)
7141
+ _hoisted_6$a,
7142
+ createElementVNode("div", _hoisted_7$8, toDisplayString($data.model.operator), 1)
7143
7143
  ]),
7144
7144
  _: 2
7145
7145
  }, 1032, ["class"])) : createCommentVNode("", true),
@@ -7161,7 +7161,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
7161
7161
  }), 128)),
7162
7162
  createVNode(_component_ux_button, { onClick: $options.addCondition }, {
7163
7163
  default: withCtx(() => [
7164
- _hoisted_8$3
7164
+ _hoisted_8$4
7165
7165
  ]),
7166
7166
  _: 1
7167
7167
  }, 8, ["onClick"])
@@ -7278,7 +7278,7 @@ const _hoisted_2$m = {
7278
7278
  const _hoisted_3$i = { class: "summary" };
7279
7279
  const _hoisted_4$g = /* @__PURE__ */ createTextVNode(" Match ");
7280
7280
  const _hoisted_5$a = /* @__PURE__ */ createTextVNode(" of the following rules ");
7281
- const _hoisted_6$8 = /* @__PURE__ */ createTextVNode("Add Filter Rule");
7281
+ const _hoisted_6$9 = /* @__PURE__ */ createTextVNode("Add Filter Rule");
7282
7282
  function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
7283
7283
  const _component_native_select = resolveComponent("native-select");
7284
7284
  const _component_filter_rule = resolveComponent("filter-rule");
@@ -7321,7 +7321,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
7321
7321
  onClick: _cache[1] || (_cache[1] = ($event) => $options.addRule())
7322
7322
  }, {
7323
7323
  default: withCtx(() => [
7324
- _hoisted_6$8
7324
+ _hoisted_6$9
7325
7325
  ]),
7326
7326
  _: 1
7327
7327
  })
@@ -7765,8 +7765,8 @@ const _hoisted_4$e = {
7765
7765
  class: "files"
7766
7766
  };
7767
7767
  const _hoisted_5$9 = { class: "size" };
7768
- const _hoisted_6$7 = /* @__PURE__ */ createTextVNode("Select Files");
7769
- const _hoisted_7$6 = /* @__PURE__ */ createTextVNode("Select File");
7768
+ const _hoisted_6$8 = /* @__PURE__ */ createTextVNode("Select Files");
7769
+ const _hoisted_7$7 = /* @__PURE__ */ createTextVNode("Select File");
7770
7770
  function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
7771
7771
  const _component_progress_bar = resolveComponent("progress-bar");
7772
7772
  const _component_flex_cell = resolveComponent("flex-cell");
@@ -7827,7 +7827,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
7827
7827
  default: withCtx(() => [
7828
7828
  createVNode(_component_ux_button, null, {
7829
7829
  default: withCtx(() => [
7830
- _hoisted_6$7
7830
+ _hoisted_6$8
7831
7831
  ]),
7832
7832
  _: 1
7833
7833
  })
@@ -7841,7 +7841,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
7841
7841
  default: withCtx(() => [
7842
7842
  createVNode(_component_ux_button, null, {
7843
7843
  default: withCtx(() => [
7844
- _hoisted_7$6
7844
+ _hoisted_7$7
7845
7845
  ]),
7846
7846
  _: 1
7847
7847
  })
@@ -7856,6 +7856,10 @@ const _sfc_main$u = {
7856
7856
  mixins: [InputMixin],
7857
7857
  components: { draggable: draggableComponent },
7858
7858
  props: {
7859
+ submission: {
7860
+ type: Boolean,
7861
+ default: false
7862
+ },
7859
7863
  modelValue: {
7860
7864
  type: [Object, Array]
7861
7865
  }
@@ -8026,13 +8030,14 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
8026
8030
  default: withCtx(() => [
8027
8031
  createVNode(_component_ux_form, {
8028
8032
  ref: "form",
8033
+ submission: $props.submission,
8029
8034
  "onForm:state": $options.stateChange,
8030
8035
  parentModel: _ctx.parentModel,
8031
8036
  modelValue: _ctx.model[index2],
8032
8037
  "onUpdate:modelValue": ($event) => _ctx.model[index2] = $event,
8033
8038
  flex: $options.sameLine,
8034
8039
  fields: _ctx.field.fields
8035
- }, null, 8, ["onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
8040
+ }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
8036
8041
  ]),
8037
8042
  _: 2
8038
8043
  }, 1536), [
@@ -8127,13 +8132,14 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
8127
8132
  createVNode(_component_ux_form, {
8128
8133
  ref_for: true,
8129
8134
  ref: "form",
8135
+ submission: $props.submission,
8130
8136
  "onForm:state": $options.stateChange,
8131
8137
  parentModel: _ctx.parentModel,
8132
8138
  modelValue: _ctx.model[index2],
8133
8139
  "onUpdate:modelValue": ($event) => _ctx.model[index2] = $event,
8134
8140
  flex: $options.sameLine,
8135
8141
  fields: _ctx.field.fields
8136
- }, null, 8, ["onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
8142
+ }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
8137
8143
  ]),
8138
8144
  _: 2
8139
8145
  }, 1536), [
@@ -8159,15 +8165,16 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
8159
8165
  ])) : (openBlock(), createBlock(_component_ux_form, {
8160
8166
  key: 1,
8161
8167
  ref: "form",
8168
+ submission: $props.submission,
8162
8169
  "onForm:state": $options.stateChange,
8163
8170
  parentModel: _ctx.parentModel,
8164
8171
  modelValue: _ctx.model,
8165
8172
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.model = $event),
8166
8173
  flex: $options.sameLine,
8167
8174
  fields: _ctx.field.fields
8168
- }, null, 8, ["onForm:state", "parentModel", "modelValue", "flex", "fields"]));
8175
+ }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"]));
8169
8176
  }
8170
- var FieldGroup$1 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$u], ["__scopeId", "data-v-121d7a2c"]]);
8177
+ var FieldGroup$1 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$u], ["__scopeId", "data-v-106e1cf4"]]);
8171
8178
  const _sfc_main$t = {
8172
8179
  props: {
8173
8180
  option: {
@@ -8547,7 +8554,7 @@ const _sfc_main$q = {
8547
8554
  }
8548
8555
  }
8549
8556
  };
8550
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-42a51394"), n2 = n2(), popScopeId(), n2);
8557
+ const _withScopeId$2 = (n2) => (pushScopeId("data-v-42a51394"), n2 = n2(), popScopeId(), n2);
8551
8558
  const _hoisted_1$l = {
8552
8559
  key: 0,
8553
8560
  class: "ux-field-title"
@@ -8562,17 +8569,17 @@ const _hoisted_3$c = {
8562
8569
  };
8563
8570
  const _hoisted_4$b = { key: 2 };
8564
8571
  const _hoisted_5$7 = { class: "ux-text-wrap prefixed" };
8565
- const _hoisted_6$6 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Label", -1));
8566
- const _hoisted_7$5 = ["onBlur", "onUpdate:modelValue"];
8567
- const _hoisted_8$2 = ["onBlur", "onUpdate:modelValue"];
8568
- const _hoisted_9$1 = { class: "ux-text-wrap prefixed" };
8569
- const _hoisted_10$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Value", -1));
8572
+ const _hoisted_6$7 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Label", -1));
8573
+ const _hoisted_7$6 = ["onBlur", "onUpdate:modelValue"];
8574
+ const _hoisted_8$3 = ["onBlur", "onUpdate:modelValue"];
8575
+ const _hoisted_9$2 = { class: "ux-text-wrap prefixed" };
8576
+ const _hoisted_10$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Value", -1));
8570
8577
  const _hoisted_11$1 = ["onFocus", "onUpdate:modelValue"];
8571
8578
  const _hoisted_12$1 = ["onFocus", "onUpdate:modelValue"];
8572
8579
  const _hoisted_13 = { class: "ux-text-wrap prefixed" };
8573
- const _hoisted_14 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Label", -1));
8580
+ const _hoisted_14 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Label", -1));
8574
8581
  const _hoisted_15 = { class: "ux-text-wrap prefixed" };
8575
- const _hoisted_16 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Value", -1));
8582
+ const _hoisted_16 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Value", -1));
8576
8583
  function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
8577
8584
  const _component_flex_cell = resolveComponent("flex-cell");
8578
8585
  const _component_ux_icon = resolveComponent("ux-icon");
@@ -8594,7 +8601,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
8594
8601
  createVNode(_component_flex_cell, null, {
8595
8602
  default: withCtx(() => [
8596
8603
  createElementVNode("div", _hoisted_5$7, [
8597
- _hoisted_6$6,
8604
+ _hoisted_6$7,
8598
8605
  $options.lazy ? withDirectives((openBlock(), createElementBlock("input", {
8599
8606
  key: 0,
8600
8607
  class: "ux-field-focus ux-text-input-multiple",
@@ -8605,7 +8612,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
8605
8612
  onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
8606
8613
  onBlur: ($event) => $options.titleBlurred(index2),
8607
8614
  "onUpdate:modelValue": [($event) => $options.entryTitleChanged(index2), ($event) => _ctx.model[index2].title = $event]
8608
- }, null, 40, _hoisted_7$5)), [
8615
+ }, null, 40, _hoisted_7$6)), [
8609
8616
  [
8610
8617
  vModelText,
8611
8618
  _ctx.model[index2].title,
@@ -8623,7 +8630,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
8623
8630
  onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
8624
8631
  onBlur: ($event) => $options.titleBlurred(index2),
8625
8632
  "onUpdate:modelValue": [($event) => $options.entryTitleChanged(index2), ($event) => _ctx.model[index2].title = $event]
8626
- }, null, 40, _hoisted_8$2)), [
8633
+ }, null, 40, _hoisted_8$3)), [
8627
8634
  [vModelText, _ctx.model[index2].title]
8628
8635
  ]) : createCommentVNode("", true)
8629
8636
  ])
@@ -8632,8 +8639,8 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
8632
8639
  }, 1024),
8633
8640
  createVNode(_component_flex_cell, null, {
8634
8641
  default: withCtx(() => [
8635
- createElementVNode("div", _hoisted_9$1, [
8636
- _hoisted_10$1,
8642
+ createElementVNode("div", _hoisted_9$2, [
8643
+ _hoisted_10$2,
8637
8644
  $options.lazy ? withDirectives((openBlock(), createElementBlock("input", {
8638
8645
  key: 0,
8639
8646
  class: "ux-field-focus ux-text-input-multiple",
@@ -8884,7 +8891,7 @@ const _hoisted_3$b = {
8884
8891
  };
8885
8892
  const _hoisted_4$a = { key: 2 };
8886
8893
  const _hoisted_5$6 = { class: "code-editor-field-wrap" };
8887
- const _hoisted_6$5 = {
8894
+ const _hoisted_6$6 = {
8888
8895
  key: 3,
8889
8896
  class: "code-editor-field-wrap"
8890
8897
  };
@@ -8955,7 +8962,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
8955
8962
  ]),
8956
8963
  _: 1
8957
8964
  })) : createCommentVNode("", true)
8958
- ])) : (openBlock(), createElementBlock("div", _hoisted_6$5, [
8965
+ ])) : (openBlock(), createElementBlock("div", _hoisted_6$6, [
8959
8966
  createVNode(_component_code_editor, {
8960
8967
  lang: $options.syntax,
8961
8968
  class: "ux-code-editor ux-field-focus ux-text-area-single",
@@ -9107,11 +9114,11 @@ const _hoisted_4$9 = {
9107
9114
  class: "ui-select-button"
9108
9115
  };
9109
9116
  const _hoisted_5$5 = ["multiple"];
9110
- const _hoisted_6$4 = {
9117
+ const _hoisted_6$5 = {
9111
9118
  key: 0,
9112
9119
  value: ""
9113
9120
  };
9114
- const _hoisted_7$4 = ["value"];
9121
+ const _hoisted_7$5 = ["value"];
9115
9122
  function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
9116
9123
  const _component_ux_button = resolveComponent("ux-button");
9117
9124
  return openBlock(), createElementBlock("div", {
@@ -9137,11 +9144,11 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
9137
9144
  multiple: _ctx.multiValue,
9138
9145
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
9139
9146
  }, [
9140
- _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$4, "None")) : createCommentVNode("", true),
9147
+ _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$5, "None")) : createCommentVNode("", true),
9141
9148
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
9142
9149
  return openBlock(), createElementBlock("option", {
9143
9150
  value: option2.value
9144
- }, toDisplayString(option2.title), 9, _hoisted_7$4);
9151
+ }, toDisplayString(option2.title), 9, _hoisted_7$5);
9145
9152
  }), 256))
9146
9153
  ], 40, _hoisted_5$5), [
9147
9154
  [vModelSelect, _ctx.model]
@@ -9273,11 +9280,11 @@ const _hoisted_4$8 = {
9273
9280
  class: "ui-select-button"
9274
9281
  };
9275
9282
  const _hoisted_5$4 = ["multiple"];
9276
- const _hoisted_6$3 = {
9283
+ const _hoisted_6$4 = {
9277
9284
  key: 0,
9278
9285
  value: ""
9279
9286
  };
9280
- const _hoisted_7$3 = ["value"];
9287
+ const _hoisted_7$4 = ["value"];
9281
9288
  function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
9282
9289
  const _component_ux_button = resolveComponent("ux-button");
9283
9290
  return openBlock(), createElementBlock("div", {
@@ -9303,11 +9310,11 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
9303
9310
  multiple: _ctx.multiValue,
9304
9311
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
9305
9312
  }, [
9306
- _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$3, "None")) : createCommentVNode("", true),
9313
+ _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$4, "None")) : createCommentVNode("", true),
9307
9314
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
9308
9315
  return openBlock(), createElementBlock("option", {
9309
9316
  value: option2.value
9310
- }, toDisplayString(option2.title), 9, _hoisted_7$3);
9317
+ }, toDisplayString(option2.title), 9, _hoisted_7$4);
9311
9318
  }), 256))
9312
9319
  ], 40, _hoisted_5$4), [
9313
9320
  [vModelSelect, _ctx.model]
@@ -9950,7 +9957,10 @@ function getDefaultValue(fieldData, currentValue) {
9950
9957
  var ask = parseInt(fieldData.ask || 0);
9951
9958
  ask = Math.max(ask, minimum);
9952
9959
  ask = maximum ? Math.min(ask, maximum) : ask;
9953
- var singleValue = maximum == 1;
9960
+ var singleValue = maximum === 1;
9961
+ if (fieldData.asObject && fieldData.type === "group") {
9962
+ singleValue = maximum === minimum === 1;
9963
+ }
9954
9964
  var multiValue = !singleValue;
9955
9965
  var defaultValues = (fieldData.type === "reference" ? fieldData.defaultReferences : fieldData.defaultValues) || [];
9956
9966
  var firstDefaultValue = defaultValues[0];
@@ -10228,12 +10238,12 @@ const _sfc_main$l = {
10228
10238
  this.fieldModel = this.getExpressionValue;
10229
10239
  }
10230
10240
  },
10231
- reset() {
10232
- this.touched = false;
10233
- },
10234
10241
  touch() {
10235
10242
  this.touched = true;
10236
10243
  },
10244
+ reset() {
10245
+ this.touched = false;
10246
+ },
10237
10247
  cleanInput(val) {
10238
10248
  return this.fieldCleanInput(val);
10239
10249
  },
@@ -10324,7 +10334,10 @@ const _sfc_main$l = {
10324
10334
  },
10325
10335
  computed: {
10326
10336
  fieldDefaultValue() {
10327
- return this.cleanInput(this.expressions && this.expressions.defaultValue ? this.getExpressionDefaultValue : getDefaultValue(this.actualField));
10337
+ var expressionDefaultValue = this.expressions && this.expressions.defaultValue ? this.getExpressionDefaultValue : void 0;
10338
+ var normalDefaultValue = getDefaultValue(this.actualField);
10339
+ var defaultValue = this.cleanInput(expressionDefaultValue || normalDefaultValue);
10340
+ return defaultValue;
10328
10341
  },
10329
10342
  title() {
10330
10343
  return this.field.title;
@@ -10772,7 +10785,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
10772
10785
  $options.error && $data.validateResults.message ? (openBlock(), createElementBlock("div", _hoisted_1$h, toDisplayString($data.validateResults.message), 1)) : createCommentVNode("", true)
10773
10786
  ], 34)) : createCommentVNode("", true);
10774
10787
  }
10775
- var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-54e7b3ce"]]);
10788
+ var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-3e31f9aa"]]);
10776
10789
  var form_vue_vue_type_style_index_0_scoped_true_lang = "";
10777
10790
  const _sfc_main$k = {
10778
10791
  props: {
@@ -10823,7 +10836,20 @@ const _sfc_main$k = {
10823
10836
  this.mounted = false;
10824
10837
  },
10825
10838
  methods: {
10839
+ touch() {
10840
+ this.childFields.forEach(function(field) {
10841
+ field.touch();
10842
+ });
10843
+ this.touched = true;
10844
+ },
10826
10845
  reset() {
10846
+ this.childFields.forEach(function(field) {
10847
+ field.reset();
10848
+ });
10849
+ this.touched = false;
10850
+ },
10851
+ validate() {
10852
+ console.log("VALIDATE FORM");
10827
10853
  },
10828
10854
  fieldUnmounted(field) {
10829
10855
  this.fieldStateChange(field, "unmount");
@@ -10878,7 +10904,8 @@ const _sfc_main$k = {
10878
10904
  invalid = true;
10879
10905
  invalidFields.push({
10880
10906
  title: field.field.title,
10881
- key: field.field.key
10907
+ key: field.field.key,
10908
+ message: field.invalidMessage
10882
10909
  });
10883
10910
  }
10884
10911
  if (field.error) {
@@ -11021,23 +11048,48 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
11021
11048
  ], true)
11022
11049
  ], 2);
11023
11050
  }
11024
- var UXForm = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-03d1fed4"]]);
11051
+ var UXForm = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-30496a0c"]]);
11052
+ var submissionform_vue_vue_type_style_index_0_scoped_true_lang = "";
11025
11053
  const STATE_READY = "form.ready";
11026
11054
  const STATE_PROCESSING = "form.processing";
11027
11055
  const STATE_COMPLETE = "form.complete";
11028
11056
  const STATE_ERROR = "form.error";
11029
11057
  const _sfc_main$j = {
11030
11058
  methods: {
11059
+ formStateUpdated(state) {
11060
+ this.formState = state;
11061
+ },
11031
11062
  softReset() {
11032
11063
  this.state = STATE_READY;
11033
11064
  },
11065
+ touch() {
11066
+ if (this.$refs.form) {
11067
+ this.$refs.form.touch();
11068
+ }
11069
+ },
11070
+ untouch() {
11071
+ if (this.$refs.form) {
11072
+ this.$refs.form.reset();
11073
+ }
11074
+ },
11034
11075
  reset() {
11035
11076
  this.model = {};
11077
+ this.untouch();
11036
11078
  this.state = STATE_READY;
11037
11079
  this.error = null;
11080
+ this.submitAttempted = false;
11038
11081
  },
11039
11082
  async submit() {
11040
11083
  const self2 = this;
11084
+ self2.touch();
11085
+ if (!self2.submitAttempted) {
11086
+ self2.submitAttempted = true;
11087
+ self2.touch();
11088
+ }
11089
+ if (self2.buttonDisabled) {
11090
+ console.log("Form is invalid", this.formState);
11091
+ return;
11092
+ }
11041
11093
  self2.state = STATE_PROCESSING;
11042
11094
  await self2.preSubmit();
11043
11095
  const submission = JSON.parse(JSON.stringify(self2.model));
@@ -11047,6 +11099,8 @@ const _sfc_main$j = {
11047
11099
  self2.state = STATE_COMPLETE;
11048
11100
  }
11049
11101
  async function submissionFailed(err) {
11102
+ var _a;
11103
+ err = ((_a = err.response) == null ? void 0 : _a.data) || err;
11050
11104
  self2.error = err;
11051
11105
  self2.state = STATE_ERROR;
11052
11106
  }
@@ -11078,6 +11132,8 @@ const _sfc_main$j = {
11078
11132
  },
11079
11133
  data() {
11080
11134
  return {
11135
+ submitAttempted: false,
11136
+ formState: null,
11081
11137
  state: STATE_READY,
11082
11138
  mounted: false,
11083
11139
  model: this.modelValue,
@@ -11091,6 +11147,16 @@ const _sfc_main$j = {
11091
11147
  this.mounted = false;
11092
11148
  },
11093
11149
  computed: {
11150
+ tooltip() {
11151
+ return this.buttonDisabled ? "Please check the errors in your form" : void 0;
11152
+ },
11153
+ buttonDisabled() {
11154
+ return this.submitAttempted && this.invalid;
11155
+ },
11156
+ invalid() {
11157
+ var _a;
11158
+ return (_a = this.formState) == null ? void 0 : _a.invalid;
11159
+ },
11094
11160
  formID() {
11095
11161
  return this.$qik.utils.id(this.form);
11096
11162
  },
@@ -11099,52 +11165,80 @@ const _sfc_main$j = {
11099
11165
  }
11100
11166
  }
11101
11167
  };
11168
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-227974b0"), n2 = n2(), popScopeId(), n2);
11102
11169
  const _hoisted_1$g = { class: "ux-submission-form" };
11103
- const _hoisted_2$b = /* @__PURE__ */ createTextVNode(" Try again ");
11104
- const _hoisted_3$8 = /* @__PURE__ */ createTextVNode(" Complete! ");
11105
- const _hoisted_4$7 = /* @__PURE__ */ createTextVNode(" Back to form ");
11106
- const _hoisted_5$3 = /* @__PURE__ */ createTextVNode(" Submit ");
11170
+ const _hoisted_2$b = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h3", null, "An error occurred", -1));
11171
+ const _hoisted_3$8 = { key: 0 };
11172
+ const _hoisted_4$7 = { key: 1 };
11173
+ const _hoisted_5$3 = { key: 2 };
11174
+ const _hoisted_6$3 = /* @__PURE__ */ createTextVNode(" Try again ");
11175
+ const _hoisted_7$3 = /* @__PURE__ */ createTextVNode(" Complete! ");
11176
+ const _hoisted_8$2 = /* @__PURE__ */ createTextVNode(" Back to form ");
11177
+ const _hoisted_9$1 = ["tooltip"];
11178
+ const _hoisted_10$1 = /* @__PURE__ */ createTextVNode(" Submit ");
11107
11179
  function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
11180
+ var _a;
11181
+ const _component_ux_icon = resolveComponent("ux-icon");
11108
11182
  const _component_ux_button = resolveComponent("ux-button");
11109
11183
  const _component_ux_form = resolveComponent("ux-form");
11110
11184
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
11111
11185
  $data.state === "form.error" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
11112
- createElementVNode("pre", null, toDisplayString($data.error), 1),
11113
- createVNode(_component_ux_button, { onClick: $options.softReset }, {
11186
+ _hoisted_2$b,
11187
+ $data.error.message ? (openBlock(), createElementBlock("pre", _hoisted_3$8, toDisplayString($data.error.message), 1)) : createCommentVNode("", true),
11188
+ ((_a = $data.error.data) == null ? void 0 : _a.errors) ? (openBlock(), createElementBlock("div", _hoisted_4$7, [
11189
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.error.data.errors, (field) => {
11190
+ return openBlock(), createElementBlock("pre", {
11191
+ key: field.path
11192
+ }, toDisplayString(field.message), 1);
11193
+ }), 128))
11194
+ ])) : (openBlock(), createElementBlock("pre", _hoisted_5$3, toDisplayString($data.error), 1)),
11195
+ createVNode(_component_ux_button, {
11196
+ color: "primary",
11197
+ onClick: $options.softReset
11198
+ }, {
11114
11199
  default: withCtx(() => [
11115
- _hoisted_2$b
11200
+ _hoisted_6$3,
11201
+ createVNode(_component_ux_icon, {
11202
+ right: "",
11203
+ icon: "fa-undo"
11204
+ })
11116
11205
  ]),
11117
11206
  _: 1
11118
11207
  }, 8, ["onClick"])
11119
11208
  ], 64)) : $data.state === "form.complete" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
11120
- _hoisted_3$8,
11209
+ _hoisted_7$3,
11121
11210
  createVNode(_component_ux_button, { onClick: $options.reset }, {
11122
11211
  default: withCtx(() => [
11123
- _hoisted_4$7
11212
+ _hoisted_8$2
11124
11213
  ]),
11125
11214
  _: 1
11126
11215
  }, 8, ["onClick"])
11127
11216
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
11128
11217
  createVNode(_component_ux_form, {
11129
11218
  submission: "",
11219
+ ref: "form",
11130
11220
  modelValue: $data.model,
11131
11221
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.model = $event),
11222
+ "onForm:state": $options.formStateUpdated,
11132
11223
  fields: $options.fields
11133
- }, null, 8, ["modelValue", "fields"]),
11134
- createVNode(_component_ux_button, {
11135
- color: "primary",
11136
- onClick: $options.submit,
11137
- loading: $data.state === "form.processing"
11138
- }, {
11139
- default: withCtx(() => [
11140
- _hoisted_5$3
11141
- ]),
11142
- _: 1
11143
- }, 8, ["onClick", "loading"])
11224
+ }, null, 8, ["modelValue", "onForm:state", "fields"]),
11225
+ createElementVNode("span", { tooltip: $options.tooltip }, [
11226
+ createVNode(_component_ux_button, {
11227
+ disabled: $options.buttonDisabled,
11228
+ color: "primary",
11229
+ onClick: $options.submit,
11230
+ loading: $data.state === "form.processing"
11231
+ }, {
11232
+ default: withCtx(() => [
11233
+ _hoisted_10$1
11234
+ ]),
11235
+ _: 1
11236
+ }, 8, ["disabled", "onClick", "loading"])
11237
+ ], 8, _hoisted_9$1)
11144
11238
  ], 64))
11145
11239
  ]);
11146
11240
  }
11147
- var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j]]);
11241
+ var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-227974b0"]]);
11148
11242
  var search_vue_vue_type_style_index_0_scoped_true_lang = "";
11149
11243
  const _sfc_main$i = {
11150
11244
  props: {