@qikdev/vue-ui 0.1.66 → 0.1.70

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.66";
35
+ const version$1 = "0.1.70";
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;
@@ -6182,6 +6182,7 @@ var InputMixin = {
6182
6182
  mounted() {
6183
6183
  this.checkAutofocus();
6184
6184
  },
6185
+ inject: ["form", "fieldPath"],
6185
6186
  computed: {
6186
6187
  optionLookup() {
6187
6188
  var self2 = this;
@@ -12835,10 +12836,9 @@ const _sfc_main$p = {
12835
12836
  fileItem.state = "processing";
12836
12837
  var body = new FormData();
12837
12838
  var jsonData = {};
12838
- var allScopeIDs = self2.user ? Object.keys(self2.user.permissions) : [];
12839
- jsonData.meta = {
12840
- scopes: allScopeIDs
12841
- };
12839
+ jsonData.attachment = true;
12840
+ jsonData.form = self2.$sdk.utils.id(self2.form);
12841
+ jsonData.fieldPath = self2.fieldPath;
12842
12842
  body.append("json", JSON.stringify(jsonData));
12843
12843
  body.append("file", fileItem.file, fileItem.name);
12844
12844
  var config = {
@@ -12870,9 +12870,6 @@ const _sfc_main$p = {
12870
12870
  let uploadURL = `/file/upload`;
12871
12871
  if (self2.$sdk.fileAPI) {
12872
12872
  uploadURL = `${self2.$sdk.fileAPI}${uploadURL}`;
12873
- console.log("UPLOADING BINARY", uploadURL);
12874
- } else {
12875
- console.log("PROXY UPLOAD");
12876
12873
  }
12877
12874
  return self2.$sdk.api.post(uploadURL, body, config).then(function(res) {
12878
12875
  fileItem.state = "complete";
@@ -13038,7 +13035,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
13038
13035
  }, 8, ["onFiles"]))
13039
13036
  ], 64);
13040
13037
  }
13041
- var Upload = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__scopeId", "data-v-5c2c5882"]]);
13038
+ var Upload = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__scopeId", "data-v-397fdaa7"]]);
13042
13039
  var group_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
13043
13040
  const _sfc_main$o = {
13044
13041
  mixins: [InputMixin],
@@ -13050,6 +13047,12 @@ const _sfc_main$o = {
13050
13047
  },
13051
13048
  modelValue: {
13052
13049
  type: [Object, Array]
13050
+ },
13051
+ trail: {
13052
+ type: Array,
13053
+ default() {
13054
+ return [];
13055
+ }
13053
13056
  }
13054
13057
  },
13055
13058
  data() {
@@ -13221,6 +13224,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13221
13224
  }, {
13222
13225
  default: withCtx(() => [
13223
13226
  createVNode(_component_ux_form, {
13227
+ trail: $props.trail,
13224
13228
  ref: "form",
13225
13229
  submission: $props.submission,
13226
13230
  "onForm:state": $options.stateChange,
@@ -13229,7 +13233,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13229
13233
  "onUpdate:modelValue": ($event) => _ctx.model[index2] = $event,
13230
13234
  flex: $options.sameLine,
13231
13235
  fields: _ctx.field.fields
13232
- }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
13236
+ }, null, 8, ["trail", "submission", "onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
13233
13237
  ]),
13234
13238
  _: 2
13235
13239
  }, 1536), [
@@ -13324,6 +13328,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13324
13328
  createVNode(_component_ux_form, {
13325
13329
  ref_for: true,
13326
13330
  ref: "form",
13331
+ trail: $props.trail,
13327
13332
  submission: $props.submission,
13328
13333
  "onForm:state": $options.stateChange,
13329
13334
  parentModel: _ctx.parentModel,
@@ -13331,7 +13336,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13331
13336
  "onUpdate:modelValue": ($event) => _ctx.model[index2] = $event,
13332
13337
  flex: $options.sameLine,
13333
13338
  fields: _ctx.field.fields
13334
- }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
13339
+ }, null, 8, ["trail", "submission", "onForm:state", "parentModel", "modelValue", "onUpdate:modelValue", "flex", "fields"])
13335
13340
  ]),
13336
13341
  _: 2
13337
13342
  }, 1536), [
@@ -13402,6 +13407,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13402
13407
  default: withCtx(() => [
13403
13408
  createVNode(_component_ux_form, {
13404
13409
  ref: "form",
13410
+ trail: $props.trail,
13405
13411
  submission: $props.submission,
13406
13412
  "onForm:state": $options.stateChange,
13407
13413
  parentModel: _ctx.parentModel,
@@ -13409,7 +13415,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13409
13415
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.model = $event),
13410
13416
  flex: $options.sameLine,
13411
13417
  fields: _ctx.field.fields
13412
- }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"])
13418
+ }, null, 8, ["trail", "submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"])
13413
13419
  ]),
13414
13420
  _: 1
13415
13421
  })
@@ -13418,6 +13424,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13418
13424
  })) : (openBlock(), createBlock(_component_ux_form, {
13419
13425
  key: 1,
13420
13426
  ref: "form",
13427
+ trail: $props.trail,
13421
13428
  submission: $props.submission,
13422
13429
  "onForm:state": $options.stateChange,
13423
13430
  parentModel: _ctx.parentModel,
@@ -13425,7 +13432,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13425
13432
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => _ctx.model = $event),
13426
13433
  flex: $options.sameLine,
13427
13434
  fields: _ctx.field.fields
13428
- }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"]))
13435
+ }, null, 8, ["trail", "submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"]))
13429
13436
  ], 64)) : (openBlock(), createBlock(_component_ux_button, {
13430
13437
  key: 1,
13431
13438
  onClick: _cache[9] || (_cache[9] = ($event) => $options.createSingleObject())
@@ -13442,6 +13449,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13442
13449
  ], 64)) : (openBlock(), createBlock(_component_ux_form, {
13443
13450
  key: 1,
13444
13451
  ref: "form",
13452
+ trail: $props.trail,
13445
13453
  submission: $props.submission,
13446
13454
  "onForm:state": $options.stateChange,
13447
13455
  parentModel: _ctx.parentModel,
@@ -13449,10 +13457,10 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
13449
13457
  "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.model = $event),
13450
13458
  flex: $options.sameLine,
13451
13459
  fields: _ctx.field.fields
13452
- }, null, 8, ["submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"]))
13460
+ }, null, 8, ["trail", "submission", "onForm:state", "parentModel", "modelValue", "flex", "fields"]))
13453
13461
  ], 64));
13454
13462
  }
13455
- var FieldGroup$1 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-53c1ace8"]]);
13463
+ var FieldGroup$1 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-71c41d3a"]]);
13456
13464
  const _sfc_main$n = {
13457
13465
  props: {
13458
13466
  option: {
@@ -15663,6 +15671,12 @@ const _sfc_main$d = {
15663
15671
  RichTextField
15664
15672
  },
15665
15673
  props: {
15674
+ trail: {
15675
+ type: Array,
15676
+ default() {
15677
+ return [];
15678
+ }
15679
+ },
15666
15680
  submission: {
15667
15681
  type: Boolean,
15668
15682
  default: false
@@ -15694,6 +15708,11 @@ const _sfc_main$d = {
15694
15708
  };
15695
15709
  },
15696
15710
  inject: ["parentFormElement"],
15711
+ provide() {
15712
+ return {
15713
+ fieldPath: this.fieldPath
15714
+ };
15715
+ },
15697
15716
  created() {
15698
15717
  this.checkDirtyState();
15699
15718
  },
@@ -15856,6 +15875,14 @@ const _sfc_main$d = {
15856
15875
  }
15857
15876
  },
15858
15877
  computed: {
15878
+ fieldPath() {
15879
+ return this.currentTrail.join(".");
15880
+ },
15881
+ currentTrail() {
15882
+ var trail = this.trail.slice();
15883
+ trail.push(this.field.key);
15884
+ return trail;
15885
+ },
15859
15886
  title() {
15860
15887
  return this.field.title;
15861
15888
  },
@@ -16155,6 +16182,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
16155
16182
  $options.widget == "group" ? (openBlock(), createElementBlock(Fragment, { key: 8 }, [
16156
16183
  $options.asObject ? (openBlock(), createBlock(_component_field_group, {
16157
16184
  key: 0,
16185
+ trail: $options.currentTrail,
16158
16186
  submission: $props.submission,
16159
16187
  "onForm:state": $options.groupStateAltered,
16160
16188
  ref: "group",
@@ -16163,8 +16191,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
16163
16191
  parentModel: $props.parentModel,
16164
16192
  modelValue: $options.fieldModel,
16165
16193
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $options.fieldModel = $event)
16166
- }, null, 8, ["submission", "onForm:state", "onTouched", "field", "parentModel", "modelValue"])) : (openBlock(), createBlock(_component_field_group, {
16194
+ }, null, 8, ["trail", "submission", "onForm:state", "onTouched", "field", "parentModel", "modelValue"])) : (openBlock(), createBlock(_component_field_group, {
16167
16195
  key: 1,
16196
+ trail: $props.trail,
16168
16197
  submission: $props.submission,
16169
16198
  "onForm:state": $options.groupStateAltered,
16170
16199
  ref: "group",
@@ -16173,10 +16202,11 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
16173
16202
  parentModel: $props.parentModel,
16174
16203
  modelValue: $options.sourceModel,
16175
16204
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $options.sourceModel = $event)
16176
- }, null, 8, ["submission", "onForm:state", "onTouched", "field", "parentModel", "modelValue"]))
16205
+ }, null, 8, ["trail", "submission", "onForm:state", "onTouched", "field", "parentModel", "modelValue"]))
16177
16206
  ], 64)) : createCommentVNode("", true),
16178
16207
  $options.widget == "form" ? (openBlock(), createBlock(_component_field_group, {
16179
16208
  key: 9,
16209
+ trail: $options.currentTrail,
16180
16210
  submission: $props.submission,
16181
16211
  "onForm:state": $options.groupStateAltered,
16182
16212
  ref: "group",
@@ -16185,7 +16215,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
16185
16215
  parentModel: $props.parentModel,
16186
16216
  modelValue: $options.fieldModel,
16187
16217
  "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $options.fieldModel = $event)
16188
- }, null, 8, ["submission", "onForm:state", "onTouched", "field", "parentModel", "modelValue"])) : createCommentVNode("", true),
16218
+ }, null, 8, ["trail", "submission", "onForm:state", "onTouched", "field", "parentModel", "modelValue"])) : createCommentVNode("", true),
16189
16219
  $options.widget == "select" ? (openBlock(), createBlock(_component_native_select, {
16190
16220
  key: 10,
16191
16221
  onTouched: $options.touch,
@@ -16295,13 +16325,22 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
16295
16325
  $options.error && $data.validateResults.message ? (openBlock(), createElementBlock("div", _hoisted_1$a, toDisplayString($data.validateResults.message), 1)) : createCommentVNode("", true)
16296
16326
  ], 34)) : createCommentVNode("", true);
16297
16327
  }
16298
- var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-6c49b812"]]);
16328
+ var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-77633d3c"]]);
16299
16329
  var form_vue_vue_type_style_index_0_scoped_true_lang = "";
16300
16330
  const _sfc_main$c = {
16301
16331
  props: {
16302
16332
  parentModel: {
16303
16333
  type: Object
16304
16334
  },
16335
+ parentForm: {
16336
+ type: Object
16337
+ },
16338
+ trail: {
16339
+ type: Array,
16340
+ default() {
16341
+ return [];
16342
+ }
16343
+ },
16305
16344
  fields: {
16306
16345
  type: Array,
16307
16346
  default() {
@@ -16323,6 +16362,7 @@ const _sfc_main$c = {
16323
16362
  default: false
16324
16363
  }
16325
16364
  },
16365
+ inject: ["form", "parentFormElement"],
16326
16366
  watch: {
16327
16367
  modelValue(val, old) {
16328
16368
  this.model = val;
@@ -16346,7 +16386,6 @@ const _sfc_main$c = {
16346
16386
  parentFormElement
16347
16387
  };
16348
16388
  },
16349
- inject: ["parentFormElement"],
16350
16389
  mounted() {
16351
16390
  const self2 = this;
16352
16391
  self2.mounted = true;
@@ -16463,6 +16502,9 @@ const _sfc_main$c = {
16463
16502
  UxField: UXFormField
16464
16503
  },
16465
16504
  computed: {
16505
+ currentTrail() {
16506
+ return this.trail;
16507
+ },
16466
16508
  fieldHash() {
16467
16509
  return this.renderFields.reduce(function(set, field) {
16468
16510
  if (!field) {
@@ -16516,6 +16558,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
16516
16558
  return openBlock(), createBlock(_component_ux_field, {
16517
16559
  ref_for: true,
16518
16560
  ref: "field",
16561
+ trail: $options.currentTrail,
16519
16562
  submission: $props.submission,
16520
16563
  "onField:mount": $options.fieldMounted,
16521
16564
  "onField:unmount": $options.fieldUnmounted,
@@ -16532,12 +16575,12 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
16532
16575
  parentModel: $props.parentModel || $options.formModel,
16533
16576
  class: normalizeClass($options.fieldClass),
16534
16577
  key: `ux-form-field-${field.key}-${index2}`
16535
- }, null, 8, ["submission", "onField:mount", "onField:unmount", "onField:dirty", "onField:invalid", "onField:valid", "onField:error", "onField:focus", "onField:blur", "onField:touched", "field", "modelValue", "parentModel", "class"]);
16578
+ }, null, 8, ["trail", "submission", "onField:mount", "onField:unmount", "onField:dirty", "onField:invalid", "onField:valid", "onField:error", "onField:focus", "onField:blur", "onField:touched", "field", "modelValue", "parentModel", "class"]);
16536
16579
  }), 128))
16537
16580
  ], true)
16538
16581
  ], 2);
16539
16582
  }
16540
- var UXForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-6296f844"]]);
16583
+ var UXForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-f463bb0c"]]);
16541
16584
  var submissionform_vue_vue_type_style_index_0_scoped_true_lang = "";
16542
16585
  const STATE_READY = "form.ready";
16543
16586
  const STATE_PROCESSING = "form.processing";
@@ -16604,6 +16647,11 @@ const _sfc_main$b = {
16604
16647
  components: {
16605
16648
  UxForm: UXForm
16606
16649
  },
16650
+ provide() {
16651
+ return {
16652
+ form: this.form
16653
+ };
16654
+ },
16607
16655
  props: {
16608
16656
  modelValue: {
16609
16657
  type: Object,
@@ -16656,7 +16704,7 @@ const _sfc_main$b = {
16656
16704
  }
16657
16705
  }
16658
16706
  };
16659
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-7ac54a6a"), n2 = n2(), popScopeId(), n2);
16707
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-428ba5ea"), n2 = n2(), popScopeId(), n2);
16660
16708
  const _hoisted_1$9 = { class: "ux-submission-form" };
16661
16709
  const _hoisted_2$7 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h3", null, "An error occurred", -1));
16662
16710
  const _hoisted_3$5 = { key: 0 };
@@ -16729,7 +16777,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
16729
16777
  ], 64))
16730
16778
  ]);
16731
16779
  }
16732
- var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-7ac54a6a"]]);
16780
+ var UXSubmissionForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-428ba5ea"]]);
16733
16781
  var search_vue_vue_type_style_index_0_scoped_true_lang = "";
16734
16782
  const _sfc_main$a = {
16735
16783
  props: {