@qikdev/vue-ui 0.1.70 → 0.1.73

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, withModifiers, createTextVNode, createCommentVNode, createElementVNode, mergeProps, toHandlers, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelSelect, withKeys, vModelText, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.1.70";
35
+ const version$1 = "0.1.73";
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;
@@ -11757,7 +11757,7 @@ const _sfc_main$v = {
11757
11757
  singleReferenceField() {
11758
11758
  return {
11759
11759
  type: "reference",
11760
- referenceType,
11760
+ referenceType: this.referenceType,
11761
11761
  maximum: 1,
11762
11762
  minimum: 1
11763
11763
  };
@@ -11765,7 +11765,7 @@ const _sfc_main$v = {
11765
11765
  multiReferenceField() {
11766
11766
  return {
11767
11767
  type: "reference",
11768
- referenceType,
11768
+ referenceType: this.referenceType,
11769
11769
  maximum: 0,
11770
11770
  minimum: 1
11771
11771
  };
@@ -12531,12 +12531,12 @@ const _sfc_main$s = {
12531
12531
  },
12532
12532
  watch: {
12533
12533
  "field.referenceType": {
12534
- handler: async function(referenceType2) {
12535
- if (!referenceType2) {
12534
+ handler: async function(referenceType) {
12535
+ if (!referenceType) {
12536
12536
  return this.definition = null;
12537
12537
  }
12538
12538
  var glossary = await this.$sdk.content.glossary({ hash: true });
12539
- this.definition = glossary[referenceType2];
12539
+ this.definition = glossary[referenceType];
12540
12540
  },
12541
12541
  immediate: true
12542
12542
  }
@@ -16612,6 +16612,7 @@ const _sfc_main$b = {
16612
16612
  this.state = STATE_READY;
16613
16613
  this.error = null;
16614
16614
  this.submitAttempted = false;
16615
+ this.$emit("reset");
16615
16616
  },
16616
16617
  async submit() {
16617
16618
  const self2 = this;
@@ -16625,18 +16626,21 @@ const _sfc_main$b = {
16625
16626
  return;
16626
16627
  }
16627
16628
  self2.state = STATE_PROCESSING;
16629
+ self2.$emit("processing");
16628
16630
  await self2.preSubmit();
16629
16631
  const submission = JSON.parse(JSON.stringify(self2.model));
16630
16632
  self2.$sdk.api.post(`/form/${self2.formID}`, submission).then(submissionComplete, submissionFailed);
16631
16633
  async function submissionComplete(res) {
16632
16634
  await self2.postSubmit();
16633
16635
  self2.state = STATE_COMPLETE;
16636
+ self2.$emit("success", res.data);
16634
16637
  }
16635
16638
  async function submissionFailed(err) {
16636
16639
  var _a;
16637
16640
  err = ((_a = err.response) == null ? void 0 : _a.data) || err;
16638
16641
  self2.error = err;
16639
16642
  self2.state = STATE_ERROR;
16643
+ self2.$emit("error", err);
16640
16644
  }
16641
16645
  },
16642
16646
  async preSubmit() {
@@ -16667,6 +16671,9 @@ const _sfc_main$b = {
16667
16671
  watch: {
16668
16672
  modelValue(val, old) {
16669
16673
  this.model = val;
16674
+ },
16675
+ model(m) {
16676
+ this.$emit("update:modelValue", m);
16670
16677
  }
16671
16678
  },
16672
16679
  data() {
@@ -16704,7 +16711,7 @@ const _sfc_main$b = {
16704
16711
  }
16705
16712
  }
16706
16713
  };
16707
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-428ba5ea"), n2 = n2(), popScopeId(), n2);
16714
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-5d5b3222"), n2 = n2(), popScopeId(), n2);
16708
16715
  const _hoisted_1$9 = { class: "ux-submission-form" };
16709
16716
  const _hoisted_2$7 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h3", null, "An error occurred", -1));
16710
16717
  const _hoisted_3$5 = { key: 0 };
@@ -16777,7 +16784,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
16777
16784
  ], 64))
16778
16785
  ]);
16779
16786
  }
16780
- var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-428ba5ea"]]);
16787
+ var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-5d5b3222"]]);
16781
16788
  var search_vue_vue_type_style_index_0_scoped_true_lang = "";
16782
16789
  const _sfc_main$a = {
16783
16790
  props: {