@qikdev/vue-ui 0.2.53 → 0.2.57

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
@@ -30,9 +30,9 @@ var __objRest = (source, exclude) => {
30
30
  }
31
31
  return target;
32
32
  };
33
- import { openBlock, createElementBlock, renderSlot, resolveComponent, normalizeClass, Fragment, createVNode, withCtx, renderList, toDisplayString, withDirectives, createBlock, resolveDynamicComponent, vShow, withModifiers, createTextVNode, createCommentVNode, createElementVNode, h, mergeProps, toHandlers, vModelSelect, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelText, withKeys, TransitionGroup, defineComponent, nextTick, vModelDynamic, reactive, watch } from "vue";
33
+ import { openBlock, createElementBlock, renderSlot, resolveComponent, normalizeClass, Fragment, createBlock, withCtx, createVNode, renderList, toDisplayString, createCommentVNode, withDirectives, resolveDynamicComponent, vShow, withModifiers, createTextVNode, createElementVNode, h, mergeProps, toHandlers, vModelSelect, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelText, withKeys, TransitionGroup, defineComponent, nextTick, vModelDynamic, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.2.53";
35
+ const version$1 = "0.2.57";
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;
@@ -109,7 +109,7 @@ function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
109
109
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
110
110
  ]);
111
111
  }
112
- var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1l], ["__scopeId", "data-v-50ae77fc"]]);
112
+ var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1l], ["__scopeId", "data-v-31dd6811"]]);
113
113
  var panelBody_vue_vue_type_style_index_0_scoped_true_lang = "";
114
114
  const _sfc_main$1k = {};
115
115
  const _hoisted_1$_ = { class: "panel-body" };
@@ -158,6 +158,9 @@ const _sfc_main$1h = {
158
158
  }
159
159
  },
160
160
  computed: {
161
+ menuRequired() {
162
+ return this.tabs.length > 1;
163
+ },
161
164
  tabs() {
162
165
  const self2 = this;
163
166
  const slotChildren = self2.$slots.default().map(function(child) {
@@ -186,7 +189,10 @@ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
186
189
  class: normalizeClass(["ux-tabset", { vertical: $props.vertical, horizontal: !$props.vertical, inline: $props.inline, block: !$props.inline }])
187
190
  }, [
188
191
  $props.vertical ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
189
- createVNode(_component_flex_column, { class: "tabset-menu" }, {
192
+ $options.menuRequired ? (openBlock(), createBlock(_component_flex_column, {
193
+ key: 0,
194
+ class: "tabset-menu"
195
+ }, {
190
196
  default: withCtx(() => [
191
197
  createVNode(_component_flex_body, null, {
192
198
  default: withCtx(() => [
@@ -202,7 +208,7 @@ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
202
208
  })
203
209
  ]),
204
210
  _: 1
205
- }),
211
+ })) : createCommentVNode("", true),
206
212
  createVNode(_component_flex_column, null, {
207
213
  default: withCtx(() => [
208
214
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.tabs, (tab, index2) => {
@@ -221,7 +227,10 @@ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
221
227
  _: 1
222
228
  })
223
229
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
224
- createVNode(_component_flex_header, { class: "tabset-menu" }, {
230
+ $options.menuRequired ? (openBlock(), createBlock(_component_flex_header, {
231
+ key: 0,
232
+ class: "tabset-menu"
233
+ }, {
225
234
  default: withCtx(() => [
226
235
  createVNode(_component_flex_row, null, {
227
236
  default: withCtx(() => [
@@ -237,7 +246,7 @@ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
237
246
  })
238
247
  ]),
239
248
  _: 1
240
- }),
249
+ })) : createCommentVNode("", true),
241
250
  createVNode(_component_flex_column, null, {
242
251
  default: withCtx(() => [
243
252
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.tabs, (tab, index2) => {
@@ -258,7 +267,7 @@ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
258
267
  ], 64))
259
268
  ], 2);
260
269
  }
261
- var UXTabset = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1h], ["__scopeId", "data-v-fc1e48c4"]]);
270
+ var UXTabset = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1h], ["__scopeId", "data-v-99e2c0be"]]);
262
271
  const _sfc_main$1g = {
263
272
  props: {
264
273
  heading: {
@@ -854,7 +863,6 @@ const _sfc_main$1d = {
854
863
  if (typeof button.text === "function") {
855
864
  return button.text(this);
856
865
  }
857
- console.log("BUTTON", button.text, typeof button.text);
858
866
  return button.text;
859
867
  }
860
868
  },
@@ -891,7 +899,7 @@ function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
891
899
  }, 8, ["color", "size", "loading", "onClick"])
892
900
  ]);
893
901
  }
894
- var ButtonCell = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1d], ["__scopeId", "data-v-ac248c56"]]);
902
+ var ButtonCell = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1d], ["__scopeId", "data-v-24957486"]]);
895
903
  class LuxonError extends Error {
896
904
  }
897
905
  class InvalidDateTimeError extends LuxonError {
@@ -4760,7 +4768,7 @@ function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
4760
4768
  ])) : createCommentVNode("", true)
4761
4769
  ]);
4762
4770
  }
4763
- var DateCell = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1c], ["__scopeId", "data-v-3687693f"]]);
4771
+ var DateCell = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1c], ["__scopeId", "data-v-18716d82"]]);
4764
4772
  var BooleanCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4765
4773
  const _sfc_main$1b = {
4766
4774
  mixins: [TableCellMixin],
@@ -5765,11 +5773,7 @@ var InputMixin = {
5765
5773
  },
5766
5774
  watch: {
5767
5775
  modelValue(val, old) {
5768
- var cleanedValue = this.cleanInput(val);
5769
- var cleanedModel = this.cleanInput(this.model);
5770
- if (safeJsonStringify(cleanedValue) != safeJsonStringify(cleanedModel)) {
5771
- this.model = cleanedValue;
5772
- }
5776
+ this.model = val;
5773
5777
  }
5774
5778
  },
5775
5779
  mounted() {
@@ -5797,9 +5801,22 @@ var InputMixin = {
5797
5801
  return cleaned;
5798
5802
  },
5799
5803
  set(val) {
5800
- this.value = this.cleanInput(val);
5801
- this.checkAutofocus();
5802
- this.dispatch();
5804
+ let force;
5805
+ if (this.isGroup || this.widget === "form") {
5806
+ if (val === this.value) {
5807
+ force = false;
5808
+ } else {
5809
+ force = true;
5810
+ }
5811
+ }
5812
+ const cleanedValue = this.cleanInput(val);
5813
+ const cleanedModel = this.cleanInput(this.value);
5814
+ const contentHasChanged = safeJsonStringify(cleanedValue) != safeJsonStringify(cleanedModel);
5815
+ if (contentHasChanged || force) {
5816
+ this.value = cleanedValue;
5817
+ this.checkAutofocus();
5818
+ this.dispatch();
5819
+ }
5803
5820
  }
5804
5821
  },
5805
5822
  options() {
@@ -6029,6 +6046,7 @@ var InputMixin = {
6029
6046
  },
6030
6047
  dispatch() {
6031
6048
  this.$emit("update:modelValue", this.value);
6049
+ console.log("Update", this.field.title);
6032
6050
  },
6033
6051
  cleanInputValue(val) {
6034
6052
  return val;
@@ -6266,7 +6284,7 @@ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
6266
6284
  ])
6267
6285
  ], 2);
6268
6286
  }
6269
- var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$13], ["__scopeId", "data-v-a06c20f2"]]);
6287
+ var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$13], ["__scopeId", "data-v-13291034"]]);
6270
6288
  var Pager_vue_vue_type_style_index_0_scoped_true_lang = "";
6271
6289
  const _sfc_main$12 = {
6272
6290
  props: {
@@ -6639,7 +6657,7 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
6639
6657
  _: 3
6640
6658
  }, 8, ["active", "loading", "to", "href", "target", "style", "class", "disabled"]);
6641
6659
  }
6642
- var UXButton = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$], ["__scopeId", "data-v-56c95efc"]]);
6660
+ var UXButton = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$], ["__scopeId", "data-v-75edf72d"]]);
6643
6661
  var checkbox_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
6644
6662
  const _sfc_main$_ = {
6645
6663
  props: {
@@ -6733,6 +6751,9 @@ const _sfc_main$Y = {
6733
6751
  },
6734
6752
  disabled: {
6735
6753
  type: Boolean
6754
+ },
6755
+ active: {
6756
+ type: Boolean
6736
6757
  }
6737
6758
  },
6738
6759
  methods: {
@@ -6774,6 +6795,9 @@ const _sfc_main$Y = {
6774
6795
  if (this.disabled) {
6775
6796
  array.push("disabled");
6776
6797
  }
6798
+ if (this.active) {
6799
+ array.push("active");
6800
+ }
6777
6801
  if (this.href || this.to) {
6778
6802
  array.push("haslink");
6779
6803
  }
@@ -6807,7 +6831,7 @@ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
6807
6831
  _: 3
6808
6832
  }, 8, ["onClick", "to", "href", "target", "class"]);
6809
6833
  }
6810
- var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y], ["__scopeId", "data-v-8b82829a"]]);
6834
+ var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y], ["__scopeId", "data-v-f100ab44"]]);
6811
6835
  var icon_vue_vue_type_style_index_0_scoped_true_lang = "";
6812
6836
  const _sfc_main$X = {
6813
6837
  props: {
@@ -7338,10 +7362,12 @@ const _sfc_main$T = {
7338
7362
  },
7339
7363
  computed: {
7340
7364
  mediaType() {
7341
- return this.model.mediaIntegrationType || "upload";
7365
+ var _a;
7366
+ return ((_a = this.model) == null ? void 0 : _a.mediaIntegrationType) || "upload";
7342
7367
  },
7343
7368
  mimetype() {
7344
- return this.model.fileMime || "video/mp4";
7369
+ var _a;
7370
+ return ((_a = this.model) == null ? void 0 : _a.fileMime) || "video/mp4";
7345
7371
  },
7346
7372
  actualWidth() {
7347
7373
  return parseInt(this.width) || this.modelWidth || 1920;
@@ -7415,7 +7441,7 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
7415
7441
  ])
7416
7442
  ], 6);
7417
7443
  }
7418
- var UXVideo = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$T], ["__scopeId", "data-v-c85ee2a2"]]);
7444
+ var UXVideo = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$T], ["__scopeId", "data-v-1f51798b"]]);
7419
7445
  var progressbar_vue_vue_type_style_index_0_scoped_true_lang = "";
7420
7446
  const _sfc_main$S = {
7421
7447
  props: {
@@ -12908,7 +12934,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
12908
12934
  ]))
12909
12935
  ], 64);
12910
12936
  }
12911
- var TextField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$D], ["__scopeId", "data-v-d9e8503e"]]);
12937
+ var TextField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$D], ["__scopeId", "data-v-33318d34"]]);
12912
12938
  var textarea_vue_vue_type_style_index_0_scoped_true_lang = "";
12913
12939
  const _sfc_main$C = {
12914
12940
  props: {
@@ -13162,7 +13188,7 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
13162
13188
  ])
13163
13189
  ], 64);
13164
13190
  }
13165
- var DateField = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$B], ["__scopeId", "data-v-1c86b484"]]);
13191
+ var DateField = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$B], ["__scopeId", "data-v-2e4bcb71"]]);
13166
13192
  var daterange_vue_vue_type_style_index_0_scoped_true_lang = "";
13167
13193
  const _sfc_main$A = {
13168
13194
  components: {
@@ -15141,11 +15167,8 @@ const _sfc_main$q = {
15141
15167
  return `${this.label} ${index2 + 1}`;
15142
15168
  },
15143
15169
  enterPress(event) {
15144
- if (this.canAddValue) {
15145
- event.stopImmediatePropagation();
15146
- event.preventDefault();
15147
- this.add();
15148
- }
15170
+ console.log("Enter", event);
15171
+ return;
15149
15172
  },
15150
15173
  refocus() {
15151
15174
  this.$nextTick(function() {
@@ -15578,7 +15601,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
15578
15601
  ], 64))
15579
15602
  ], 64));
15580
15603
  }
15581
- var FieldGroup$1 = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-66c6137b"]]);
15604
+ var FieldGroup$1 = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-f616ab46"]]);
15582
15605
  const _sfc_main$p = {
15583
15606
  props: {
15584
15607
  option: {
@@ -18554,7 +18577,8 @@ const _sfc_main$e = {
18554
18577
  },
18555
18578
  set(value) {
18556
18579
  var cleaned = this.cleanInput(value);
18557
- if (this.model[this.key] != cleaned) {
18580
+ const existing = this.model[this.key];
18581
+ if (existing != cleaned) {
18558
18582
  this.model[this.key] = cleaned;
18559
18583
  this.isDirty = true;
18560
18584
  this.$emit("update:modelValue", this.model);
@@ -18931,7 +18955,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
18931
18955
  $options.error && $data.validateResults.message ? (openBlock(), createElementBlock("div", _hoisted_1$b, toDisplayString($data.validateResults.message), 1)) : createCommentVNode("", true)
18932
18956
  ], 34)) : createCommentVNode("", true);
18933
18957
  }
18934
- var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-5b27e0f0"]]);
18958
+ var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-353dd59e"]]);
18935
18959
  function arrayReduce$1(array, iteratee, accumulator, initAccum) {
18936
18960
  var index2 = -1, length = array == null ? 0 : array.length;
18937
18961
  if (initAccum && length) {
@@ -21121,6 +21145,7 @@ const _sfc_main$6 = {
21121
21145
  case "audio":
21122
21146
  case "file":
21123
21147
  case "submission":
21148
+ case "export":
21124
21149
  case "log":
21125
21150
  defaultSort = {
21126
21151
  key: "meta.created",
@@ -21429,6 +21454,10 @@ const _sfc_main$6 = {
21429
21454
  }
21430
21455
  });
21431
21456
  const { data } = await promise;
21457
+ if (!data) {
21458
+ console.log("No data returned");
21459
+ return;
21460
+ }
21432
21461
  data.items.forEach(self2.ensureMeta);
21433
21462
  return data;
21434
21463
  }
@@ -21464,7 +21493,7 @@ const _sfc_main$6 = {
21464
21493
  };
21465
21494
  }
21466
21495
  };
21467
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-ebe5f108"), n2 = n2(), popScopeId(), n2);
21496
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-6a5fdde1"), n2 = n2(), popScopeId(), n2);
21468
21497
  const _hoisted_1$6 = { class: "footer" };
21469
21498
  const _hoisted_2$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("p", null, null, -1));
21470
21499
  const _hoisted_3$5 = { key: 0 };
@@ -21693,7 +21722,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
21693
21722
  _: 3
21694
21723
  })) : createCommentVNode("", true);
21695
21724
  }
21696
- var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-ebe5f108"]]);
21725
+ var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-6a5fdde1"]]);
21697
21726
  var ModalMixin = {
21698
21727
  props: {
21699
21728
  options: {
@@ -22591,6 +22620,15 @@ const QikUI = {
22591
22620
  sdk.modals.splice(modal.id, 0, modal);
22592
22621
  });
22593
22622
  };
22623
+ sdk.prompt = function(fields, options) {
22624
+ options = options || {};
22625
+ options.model = options.model || {};
22626
+ options.fields = fields;
22627
+ return sdk.modal({
22628
+ component: UxPromptModal,
22629
+ options
22630
+ });
22631
+ };
22594
22632
  sdk.browse = function(type, options) {
22595
22633
  options = options || {};
22596
22634
  options.type = type;
@@ -22608,6 +22646,14 @@ const QikUI = {
22608
22646
  options
22609
22647
  });
22610
22648
  };
22649
+ sdk.confirm = function(title, options) {
22650
+ options = options || {};
22651
+ options.title = title;
22652
+ return sdk.modal({
22653
+ component: UxConfirmModal,
22654
+ options
22655
+ });
22656
+ };
22611
22657
  sdk.options = function(choices, title, description) {
22612
22658
  return sdk.modal({
22613
22659
  component: UxOptionsModal,
@@ -22618,23 +22664,6 @@ const QikUI = {
22618
22664
  }
22619
22665
  });
22620
22666
  };
22621
- sdk.prompt = function(fields, options) {
22622
- options = options || {};
22623
- options.model = options.model || {};
22624
- options.fields = fields;
22625
- return sdk.modal({
22626
- component: UxPromptModal,
22627
- options
22628
- });
22629
- };
22630
- sdk.confirm = function(title, options) {
22631
- options = options || {};
22632
- options.title = title;
22633
- return sdk.modal({
22634
- component: UxConfirmModal,
22635
- options
22636
- });
22637
- };
22638
22667
  sdk.closeModal = function(id) {
22639
22668
  var modal = sdk.modals.find(function(modal2) {
22640
22669
  return modal2.id == id;