@qikdev/vue-ui 0.2.23 → 0.2.25

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, mergeProps, toHandlers, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelText, vModelSelect, withKeys, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, reactive, watch } from "vue";
33
+ import { openBlock, createElementBlock, renderSlot, resolveComponent, normalizeClass, Fragment, createVNode, withCtx, renderList, toDisplayString, withDirectives, createBlock, resolveDynamicComponent, vShow, withModifiers, createTextVNode, createCommentVNode, createElementVNode, mergeProps, toHandlers, vModelSelect, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelText, withKeys, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, reactive, watch } from "vue";
34
34
  import { EventDispatcher } from "@qikdev/sdk";
35
- const version$1 = "0.2.23";
35
+ const version$1 = "0.2.25";
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;
@@ -41,104 +41,104 @@ var _export_sfc = (sfc, props2) => {
41
41
  }
42
42
  return target;
43
43
  };
44
- const _sfc_main$1m = {};
44
+ const _sfc_main$1n = {};
45
45
  const _hoisted_1$12 = { class: "flex-column" };
46
- function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
46
+ function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
47
47
  return openBlock(), createElementBlock("div", _hoisted_1$12, [
48
48
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
49
49
  ]);
50
50
  }
51
- var FlexColumn = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1m], ["__scopeId", "data-v-203ea86f"]]);
51
+ var FlexColumn = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1n], ["__scopeId", "data-v-203ea86f"]]);
52
52
  var flexBody_vue_vue_type_style_index_0_scoped_true_lang = "";
53
- const _sfc_main$1l = {};
53
+ const _sfc_main$1m = {};
54
54
  const _hoisted_1$11 = { class: "flex-column-body" };
55
- function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
55
+ function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
56
56
  return openBlock(), createElementBlock("div", _hoisted_1$11, [
57
57
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
58
58
  ]);
59
59
  }
60
- var FlexBody = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1l], ["__scopeId", "data-v-64850355"]]);
60
+ var FlexBody = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1m], ["__scopeId", "data-v-64850355"]]);
61
61
  var flexHeader_vue_vue_type_style_index_0_scoped_true_lang = "";
62
- const _sfc_main$1k = {};
62
+ const _sfc_main$1l = {};
63
63
  const _hoisted_1$10 = { class: "flex-column-header" };
64
- function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
64
+ function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
65
65
  return openBlock(), createElementBlock("div", _hoisted_1$10, [
66
66
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
67
67
  ]);
68
68
  }
69
- var FlexHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1k], ["__scopeId", "data-v-10b28f00"]]);
69
+ var FlexHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1l], ["__scopeId", "data-v-10b28f00"]]);
70
70
  var flexFooter_vue_vue_type_style_index_0_scoped_true_lang = "";
71
- const _sfc_main$1j = {};
71
+ const _sfc_main$1k = {};
72
72
  const _hoisted_1$$ = { class: "flex-column-footer" };
73
- function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
73
+ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
74
74
  return openBlock(), createElementBlock("div", _hoisted_1$$, [
75
75
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
76
76
  ]);
77
77
  }
78
- var FlexFooter = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1j], ["__scopeId", "data-v-68216a72"]]);
78
+ var FlexFooter = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1k], ["__scopeId", "data-v-68216a72"]]);
79
79
  var flexCell_vue_vue_type_style_index_0_scoped_true_lang = "";
80
- const _sfc_main$1i = {};
80
+ const _sfc_main$1j = {};
81
81
  const _hoisted_1$_ = { class: "flex-cell" };
82
- function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
82
+ function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
83
83
  return openBlock(), createElementBlock("div", _hoisted_1$_, [
84
84
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
85
85
  ]);
86
86
  }
87
- var FlexCell = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1i], ["__scopeId", "data-v-644bb279"]]);
87
+ var FlexCell = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1j], ["__scopeId", "data-v-644bb279"]]);
88
88
  var flexRow_vue_vue_type_style_index_0_scoped_true_lang = "";
89
- const _sfc_main$1h = {};
89
+ const _sfc_main$1i = {};
90
90
  const _hoisted_1$Z = { class: "flex-row" };
91
- function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
91
+ function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
92
92
  return openBlock(), createElementBlock("div", _hoisted_1$Z, [
93
93
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
94
94
  ]);
95
95
  }
96
- var FlexRow = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1h], ["__scopeId", "data-v-5b76ad1f"]]);
96
+ var FlexRow = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1i], ["__scopeId", "data-v-5b76ad1f"]]);
97
97
  var flexSpacer_vue_vue_type_style_index_0_scoped_true_lang = "";
98
- const _sfc_main$1g = {};
98
+ const _sfc_main$1h = {};
99
99
  const _hoisted_1$Y = { class: "flex-spacer" };
100
- function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
100
+ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
101
101
  return openBlock(), createElementBlock("div", _hoisted_1$Y);
102
102
  }
103
- var FlexSpacer = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1g], ["__scopeId", "data-v-35b15579"]]);
103
+ var FlexSpacer = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1h], ["__scopeId", "data-v-35b15579"]]);
104
104
  var panel_vue_vue_type_style_index_0_scoped_true_lang = "";
105
- const _sfc_main$1f = {};
105
+ const _sfc_main$1g = {};
106
106
  const _hoisted_1$X = { class: "panel" };
107
- function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
107
+ function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
108
108
  return openBlock(), createElementBlock("div", _hoisted_1$X, [
109
109
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
110
110
  ]);
111
111
  }
112
- var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1f], ["__scopeId", "data-v-50ae77fc"]]);
112
+ var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1g], ["__scopeId", "data-v-50ae77fc"]]);
113
113
  var panelBody_vue_vue_type_style_index_0_scoped_true_lang = "";
114
- const _sfc_main$1e = {};
114
+ const _sfc_main$1f = {};
115
115
  const _hoisted_1$W = { class: "panel-body" };
116
- function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
116
+ function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
117
117
  return openBlock(), createElementBlock("div", _hoisted_1$W, [
118
118
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
119
119
  ]);
120
120
  }
121
- var PanelBody = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1e], ["__scopeId", "data-v-c82dca76"]]);
121
+ var PanelBody = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1f], ["__scopeId", "data-v-c82dca76"]]);
122
122
  var panelHeader_vue_vue_type_style_index_0_scoped_true_lang = "";
123
- const _sfc_main$1d = {};
123
+ const _sfc_main$1e = {};
124
124
  const _hoisted_1$V = { class: "panel-header" };
125
- function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
125
+ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
126
126
  return openBlock(), createElementBlock("div", _hoisted_1$V, [
127
127
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
128
128
  ]);
129
129
  }
130
- var PanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1d], ["__scopeId", "data-v-13bf11da"]]);
130
+ var PanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1e], ["__scopeId", "data-v-13bf11da"]]);
131
131
  var panelFooter_vue_vue_type_style_index_0_scoped_true_lang = "";
132
- const _sfc_main$1c = {};
132
+ const _sfc_main$1d = {};
133
133
  const _hoisted_1$U = { class: "panel-footer" };
134
- function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
134
+ function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
135
135
  return openBlock(), createElementBlock("div", _hoisted_1$U, [
136
136
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
137
137
  ]);
138
138
  }
139
- var PanelFooter = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1c], ["__scopeId", "data-v-b4f4786a"]]);
139
+ var PanelFooter = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1d], ["__scopeId", "data-v-b4f4786a"]]);
140
140
  var tabset_vue_vue_type_style_index_0_scoped_true_lang = "";
141
- const _sfc_main$1b = {
141
+ const _sfc_main$1c = {
142
142
  props: {
143
143
  vertical: {
144
144
  type: Boolean
@@ -169,7 +169,7 @@ const _sfc_main$1b = {
169
169
  };
170
170
  const _hoisted_1$T = ["onClick"];
171
171
  const _hoisted_2$J = ["onClick"];
172
- function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
172
+ function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
173
173
  const _component_flex_body = resolveComponent("flex-body");
174
174
  const _component_flex_column = resolveComponent("flex-column");
175
175
  const _component_flex_row = resolveComponent("flex-row");
@@ -250,8 +250,8 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
250
250
  ], 64))
251
251
  ], 2);
252
252
  }
253
- var UXTabset = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1b], ["__scopeId", "data-v-2a0551fe"]]);
254
- const _sfc_main$1a = {
253
+ var UXTabset = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1c], ["__scopeId", "data-v-2a0551fe"]]);
254
+ const _sfc_main$1b = {
255
255
  props: {
256
256
  heading: {
257
257
  type: String,
@@ -278,7 +278,7 @@ const _sfc_main$1a = {
278
278
  }
279
279
  }
280
280
  };
281
- function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
281
+ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
282
282
  const _component_flex_column = resolveComponent("flex-column");
283
283
  return openBlock(), createBlock(_component_flex_column, null, {
284
284
  default: withCtx(() => [
@@ -287,7 +287,7 @@ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
287
287
  _: 3
288
288
  });
289
289
  }
290
- var UXTab = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$1a]]);
290
+ var UXTab = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1b]]);
291
291
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
292
292
  var isArray$5 = Array.isArray;
293
293
  var isArray_1 = isArray$5;
@@ -755,7 +755,7 @@ var TableCellMixin = {
755
755
  }
756
756
  };
757
757
  var Thumbnail_vue_vue_type_style_index_0_scoped_true_lang = "";
758
- const _sfc_main$19 = {
758
+ const _sfc_main$1a = {
759
759
  mixins: [TableCellMixin],
760
760
  computed: {
761
761
  imageSource() {
@@ -773,7 +773,7 @@ const _sfc_main$19 = {
773
773
  }
774
774
  };
775
775
  const _hoisted_1$S = { class: "table-image-cell" };
776
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
776
+ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
777
777
  const _component_ux_image = resolveComponent("ux-image");
778
778
  const _component_ux_icon = resolveComponent("ux-icon");
779
779
  return openBlock(), createElementBlock("td", _hoisted_1$S, [
@@ -794,9 +794,9 @@ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
794
794
  }))
795
795
  ]);
796
796
  }
797
- var ThumbnailCell = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$19], ["__scopeId", "data-v-246a2688"]]);
797
+ var ThumbnailCell = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$1a], ["__scopeId", "data-v-246a2688"]]);
798
798
  var Currency_vue_vue_type_style_index_0_scoped_true_lang = "";
799
- const _sfc_main$18 = {
799
+ const _sfc_main$19 = {
800
800
  mixins: [TableCellMixin],
801
801
  computed: {
802
802
  string() {
@@ -819,14 +819,14 @@ const _sfc_main$18 = {
819
819
  }
820
820
  }
821
821
  };
822
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
822
+ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
823
823
  return openBlock(), createElementBlock("td", {
824
824
  class: normalizeClass(["table-currency-cell", { credit: $options.credit, empty: $options.empty, debit: $options.debit }])
825
825
  }, toDisplayString($options.string), 3);
826
826
  }
827
- var CurrencyCell = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$18], ["__scopeId", "data-v-33a0b926"]]);
827
+ var CurrencyCell = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$19], ["__scopeId", "data-v-33a0b926"]]);
828
828
  var Button_vue_vue_type_style_index_0_scoped_true_lang = "";
829
- const _sfc_main$17 = {
829
+ const _sfc_main$18 = {
830
830
  data() {
831
831
  return {
832
832
  processing: false
@@ -851,7 +851,7 @@ const _sfc_main$17 = {
851
851
  }
852
852
  };
853
853
  const _hoisted_1$R = { class: "table-button-cell" };
854
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
854
+ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
855
855
  const _component_ux_icon = resolveComponent("ux-icon");
856
856
  const _component_ux_button = resolveComponent("ux-button");
857
857
  return openBlock(), createElementBlock("td", _hoisted_1$R, [
@@ -875,7 +875,7 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
875
875
  }, 8, ["color", "size", "loading", "onClick"])
876
876
  ]);
877
877
  }
878
- var ButtonCell = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$17], ["__scopeId", "data-v-36768853"]]);
878
+ var ButtonCell = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$18], ["__scopeId", "data-v-36768853"]]);
879
879
  class LuxonError extends Error {
880
880
  }
881
881
  class InvalidDateTimeError extends LuxonError {
@@ -4709,7 +4709,7 @@ function friendlyDateTime(dateTimeish) {
4709
4709
  }
4710
4710
  }
4711
4711
  var DateCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4712
- const _sfc_main$16 = {
4712
+ const _sfc_main$17 = {
4713
4713
  mixins: [TableCellMixin],
4714
4714
  computed: {
4715
4715
  hasValue() {
@@ -4735,7 +4735,7 @@ const _hoisted_2$I = { key: 0 };
4735
4735
  const _hoisted_3$A = { class: "off" };
4736
4736
  const _hoisted_4$w = { class: "on" };
4737
4737
  const _hoisted_5$p = { class: "spacer" };
4738
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
4738
+ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
4739
4739
  return openBlock(), createElementBlock("td", _hoisted_1$Q, [
4740
4740
  $options.hasValue ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
4741
4741
  createElementVNode("span", _hoisted_3$A, toDisplayString($options.readable), 1),
@@ -4744,9 +4744,9 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
4744
4744
  ])) : createCommentVNode("", true)
4745
4745
  ]);
4746
4746
  }
4747
- var DateCell = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$16], ["__scopeId", "data-v-3687693f"]]);
4747
+ var DateCell = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$17], ["__scopeId", "data-v-3687693f"]]);
4748
4748
  var BooleanCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4749
- const _sfc_main$15 = {
4749
+ const _sfc_main$16 = {
4750
4750
  mixins: [TableCellMixin],
4751
4751
  computed: {
4752
4752
  boolean() {
@@ -4754,7 +4754,7 @@ const _sfc_main$15 = {
4754
4754
  }
4755
4755
  }
4756
4756
  };
4757
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
4757
+ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
4758
4758
  const _component_ux_icon = resolveComponent("ux-icon");
4759
4759
  return openBlock(), createElementBlock("td", {
4760
4760
  class: normalizeClass(["table-boolean-cell", { true: $options.boolean, false: !$options.boolean }])
@@ -4764,9 +4764,9 @@ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
4764
4764
  }, null, 8, ["icon"])
4765
4765
  ], 2);
4766
4766
  }
4767
- var BooleanCell = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$15], ["__scopeId", "data-v-27f127ae"]]);
4767
+ var BooleanCell = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$16], ["__scopeId", "data-v-27f127ae"]]);
4768
4768
  var SecurityCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4769
- const _sfc_main$14 = {
4769
+ const _sfc_main$15 = {
4770
4770
  mixins: [TableCellMixin],
4771
4771
  computed: {
4772
4772
  public() {
@@ -4777,7 +4777,7 @@ const _sfc_main$14 = {
4777
4777
  }
4778
4778
  }
4779
4779
  };
4780
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
4780
+ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
4781
4781
  const _component_ux_icon = resolveComponent("ux-icon");
4782
4782
  return openBlock(), createElementBlock("td", {
4783
4783
  class: normalizeClass(["table-security-cell", $options.security])
@@ -4787,9 +4787,9 @@ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
4787
4787
  }, null, 8, ["icon"])
4788
4788
  ], 2);
4789
4789
  }
4790
- var SecurityCell = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$14], ["__scopeId", "data-v-51f8608e"]]);
4790
+ var SecurityCell = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$15], ["__scopeId", "data-v-51f8608e"]]);
4791
4791
  var URLCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4792
- const _sfc_main$13 = {
4792
+ const _sfc_main$14 = {
4793
4793
  mixins: [TableCellMixin],
4794
4794
  methods: {
4795
4795
  open() {
@@ -4804,7 +4804,7 @@ const _sfc_main$13 = {
4804
4804
  };
4805
4805
  const _hoisted_1$P = { class: "table-url-cell" };
4806
4806
  const _hoisted_2$H = ["href"];
4807
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
4807
+ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
4808
4808
  const _component_ux_icon = resolveComponent("ux-icon");
4809
4809
  return openBlock(), createElementBlock("td", _hoisted_1$P, [
4810
4810
  createElementVNode("a", {
@@ -4820,9 +4820,9 @@ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
4820
4820
  ], 8, _hoisted_2$H)
4821
4821
  ]);
4822
4822
  }
4823
- var URLCell = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$13], ["__scopeId", "data-v-17cf3a86"]]);
4823
+ var URLCell = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$14], ["__scopeId", "data-v-17cf3a86"]]);
4824
4824
  var Value_vue_vue_type_style_index_0_scoped_true_lang = "";
4825
- const _sfc_main$12 = {
4825
+ const _sfc_main$13 = {
4826
4826
  props: {
4827
4827
  multi: {
4828
4828
  type: Boolean
@@ -4871,7 +4871,7 @@ const _sfc_main$12 = {
4871
4871
  }
4872
4872
  };
4873
4873
  const _hoisted_1$O = /* @__PURE__ */ createTextVNode(",\xA0");
4874
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
4874
+ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
4875
4875
  return $options.reference ? (openBlock(), createElementBlock("a", {
4876
4876
  key: 0,
4877
4877
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => $options.clicked($props.value), ["stop", "prevent"]))
@@ -4884,7 +4884,7 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
4884
4884
  ], 64)) : createCommentVNode("", true)
4885
4885
  ], 64));
4886
4886
  }
4887
- var ValueRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$12], ["__scopeId", "data-v-255b9ec8"]]);
4887
+ var ValueRenderer = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$13], ["__scopeId", "data-v-255b9ec8"]]);
4888
4888
  var TableCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4889
4889
  function extract(row, path) {
4890
4890
  if (!row) {
@@ -4909,7 +4909,7 @@ function extract(row, path) {
4909
4909
  return extract(stub, remainder);
4910
4910
  }
4911
4911
  }
4912
- const _sfc_main$11 = {
4912
+ const _sfc_main$12 = {
4913
4913
  data() {
4914
4914
  return {
4915
4915
  component: null
@@ -5007,7 +5007,7 @@ const _hoisted_1$N = {
5007
5007
  };
5008
5008
  const _hoisted_2$G = { class: "value" };
5009
5009
  const _hoisted_3$z = { class: "value" };
5010
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
5010
+ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
5011
5011
  const _component_value_renderer = resolveComponent("value-renderer");
5012
5012
  return $data.component ? (openBlock(), createBlock(resolveDynamicComponent($data.component), {
5013
5013
  key: 0,
@@ -5042,8 +5042,8 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
5042
5042
  }, null, 8, ["type", "value"]))
5043
5043
  ]));
5044
5044
  }
5045
- var TableCell = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$11], ["__scopeId", "data-v-44c51175"]]);
5046
- const _sfc_main$10 = {
5045
+ var TableCell = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$12], ["__scopeId", "data-v-44c51175"]]);
5046
+ const _sfc_main$11 = {
5047
5047
  components: {
5048
5048
  TableCell
5049
5049
  },
@@ -5098,7 +5098,7 @@ const _sfc_main$10 = {
5098
5098
  }
5099
5099
  }
5100
5100
  };
5101
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5101
+ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
5102
5102
  const _component_ux_checkbox = resolveComponent("ux-checkbox");
5103
5103
  const _component_table_cell = resolveComponent("table-cell");
5104
5104
  const _component_ux_icon = resolveComponent("ux-icon");
@@ -5140,7 +5140,7 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5140
5140
  ])
5141
5141
  ], 2);
5142
5142
  }
5143
- var TableRow = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10]]);
5143
+ var TableRow = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$11]]);
5144
5144
  var RememberScrollMixin = {
5145
5145
  data() {
5146
5146
  return {
@@ -5171,7 +5171,7 @@ var RememberScrollMixin = {
5171
5171
  }
5172
5172
  };
5173
5173
  var Table_vue_vue_type_style_index_0_scoped_true_lang = "";
5174
- const _sfc_main$$ = {
5174
+ const _sfc_main$10 = {
5175
5175
  mixins: [RememberScrollMixin],
5176
5176
  components: {
5177
5177
  TableRow,
@@ -5426,7 +5426,7 @@ const _hoisted_8$9 = {
5426
5426
  key: 1,
5427
5427
  class: "last shrink"
5428
5428
  };
5429
- function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
5429
+ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
5430
5430
  const _component_ux_checkbox = resolveComponent("ux-checkbox");
5431
5431
  const _component_ux_list_item = resolveComponent("ux-list-item");
5432
5432
  const _component_ux_list = resolveComponent("ux-list");
@@ -5550,1591 +5550,1807 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
5550
5550
  ], 512)
5551
5551
  ]);
5552
5552
  }
5553
- var NativeTable = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$], ["__scopeId", "data-v-03eb874f"]]);
5554
- var avatar_vue_vue_type_style_index_0_lang = "";
5555
- const _sfc_main$_ = {
5556
- props: {
5557
- id: {
5558
- type: [Object, String]
5559
- }
5560
- },
5561
- computed: {
5562
- stringID() {
5563
- return this.$sdk.utils.id(this.id);
5564
- },
5565
- url() {
5553
+ var NativeTable = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10], ["__scopeId", "data-v-03eb874f"]]);
5554
+ var safeJsonStringify$1 = { exports: {} };
5555
+ var hasProp = Object.prototype.hasOwnProperty;
5556
+ function throwsMessage(err) {
5557
+ return "[Throws: " + (err ? err.message : "?") + "]";
5558
+ }
5559
+ function safeGetValueFromPropertyOnObject(obj, property) {
5560
+ if (hasProp.call(obj, property)) {
5561
+ try {
5562
+ return obj[property];
5563
+ } catch (err) {
5564
+ return throwsMessage(err);
5566
5565
  }
5567
5566
  }
5568
- };
5569
- const _hoisted_1$L = { class: "avatar" };
5570
- function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
5571
- return openBlock(), createElementBlock("div", _hoisted_1$L);
5567
+ return obj[property];
5572
5568
  }
5573
- var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_]]);
5574
- var spinner_vue_vue_type_style_index_0_scoped_true_lang = "";
5575
- const _sfc_main$Z = {
5576
- props: {
5577
- large: {
5578
- type: Boolean
5569
+ function ensureProperties(obj) {
5570
+ var seen = [];
5571
+ function visit(obj2) {
5572
+ if (obj2 === null || typeof obj2 !== "object") {
5573
+ return obj2;
5579
5574
  }
5575
+ if (seen.indexOf(obj2) !== -1) {
5576
+ return "[Circular]";
5577
+ }
5578
+ seen.push(obj2);
5579
+ if (typeof obj2.toJSON === "function") {
5580
+ try {
5581
+ var fResult = visit(obj2.toJSON());
5582
+ seen.pop();
5583
+ return fResult;
5584
+ } catch (err) {
5585
+ return throwsMessage(err);
5586
+ }
5587
+ }
5588
+ if (Array.isArray(obj2)) {
5589
+ var aResult = obj2.map(visit);
5590
+ seen.pop();
5591
+ return aResult;
5592
+ }
5593
+ var result = Object.keys(obj2).reduce(function(result2, prop) {
5594
+ result2[prop] = visit(safeGetValueFromPropertyOnObject(obj2, prop));
5595
+ return result2;
5596
+ }, {});
5597
+ seen.pop();
5598
+ return result;
5580
5599
  }
5600
+ return visit(obj);
5601
+ }
5602
+ safeJsonStringify$1.exports = function(data, replacer, space) {
5603
+ return JSON.stringify(ensureProperties(data), replacer, space);
5581
5604
  };
5582
- const _withScopeId$7 = (n2) => (pushScopeId("data-v-27f20370"), n2 = n2(), popScopeId(), n2);
5583
- const _hoisted_1$K = /* @__PURE__ */ _withScopeId$7(() => /* @__PURE__ */ createElementVNode("i", { class: "fa fa-spin fa-spinner" }, null, -1));
5584
- const _hoisted_2$E = [
5585
- _hoisted_1$K
5586
- ];
5587
- function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
5588
- return openBlock(), createElementBlock("div", {
5589
- class: normalizeClass(["ux-spinner", { large: $props.large }])
5590
- }, _hoisted_2$E, 2);
5605
+ safeJsonStringify$1.exports.ensureProperties = ensureProperties;
5606
+ var safeJsonStringify = safeJsonStringify$1.exports;
5607
+ function isUndefined$6(v, type) {
5608
+ return v === void 0 || v === null || type == "date" && v.toString && v.toString() === "Invalid Date";
5591
5609
  }
5592
- var Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Z], ["__scopeId", "data-v-27f20370"]]);
5593
- var button_vue_vue_type_style_index_0_scoped_true_lang = "";
5594
- const _sfc_main$Y = {
5595
- components: {
5596
- Spinner
5597
- },
5610
+ function isNotEmpty(value) {
5611
+ return value !== void 0 && value !== null;
5612
+ }
5613
+ var InputMixin = {
5598
5614
  props: {
5599
- to: {
5600
- type: [Object, String]
5615
+ field: {
5616
+ type: Object,
5617
+ default() {
5618
+ return {};
5619
+ }
5601
5620
  },
5602
- icon: {
5603
- type: Boolean
5621
+ parentModel: {
5622
+ type: Object
5623
+ }
5624
+ },
5625
+ data() {
5626
+ return {
5627
+ value: this.modelValue
5628
+ };
5629
+ },
5630
+ watch: {
5631
+ modelValue(val, old) {
5632
+ var cleanedValue = this.cleanInput(val);
5633
+ var cleanedModel = this.cleanInput(this.model);
5634
+ if (safeJsonStringify(cleanedValue) != safeJsonStringify(cleanedModel)) {
5635
+ this.model = cleanedValue;
5636
+ }
5637
+ }
5638
+ },
5639
+ mounted() {
5640
+ this.checkAutofocus();
5641
+ },
5642
+ inject: ["form", "fieldPath"],
5643
+ computed: {
5644
+ optionLookup() {
5645
+ var self2 = this;
5646
+ return self2.options.reduce(function(set, option2) {
5647
+ const key = self2.getValue(option2);
5648
+ set[key] = option2;
5649
+ return set;
5650
+ }, {});
5604
5651
  },
5605
- color: {
5606
- type: String,
5607
- default: "default"
5652
+ selectableOptions() {
5653
+ return this.options;
5608
5654
  },
5609
- bgColor: {
5610
- type: String
5655
+ required() {
5656
+ return this.minimum;
5611
5657
  },
5612
- fgColor: {
5613
- type: String
5658
+ model: {
5659
+ get() {
5660
+ var cleaned = this.cleanOutput(this.value);
5661
+ return cleaned;
5662
+ },
5663
+ set(val) {
5664
+ this.value = this.cleanInput(val);
5665
+ this.checkAutofocus();
5666
+ this.dispatch();
5667
+ }
5614
5668
  },
5615
- tag: {
5616
- type: String
5669
+ options() {
5670
+ var self2 = this;
5671
+ return (this.field.options || []).reduce(function(set, option2) {
5672
+ if (!option2) {
5673
+ return set;
5674
+ }
5675
+ const value = self2.getValue(option2);
5676
+ const title = option2.title || option2.name || option2.label || value;
5677
+ var output = {
5678
+ title,
5679
+ value,
5680
+ source: option2
5681
+ };
5682
+ if (self2.field.type == "reference") {
5683
+ output._id = value;
5684
+ }
5685
+ set.push(output);
5686
+ return set;
5687
+ }, []);
5617
5688
  },
5618
- href: {
5619
- type: String
5689
+ prefix() {
5690
+ return this.field.suffix;
5620
5691
  },
5621
- target: {
5622
- type: String
5692
+ suffix() {
5693
+ return this.field.suffix;
5623
5694
  },
5624
- loading: {
5625
- type: Boolean
5695
+ type() {
5696
+ return this.field.type || "string";
5626
5697
  },
5627
- active: {
5628
- type: Boolean
5698
+ key() {
5699
+ return this.field.key;
5629
5700
  },
5630
- disabled: {
5631
- type: Boolean
5701
+ isGroup() {
5702
+ return this.type === "group";
5632
5703
  },
5633
- block: {
5634
- type: Boolean
5704
+ asObject() {
5705
+ return this.isGroup && !!this.field.asObject;
5635
5706
  },
5636
- size: {
5637
- type: String,
5638
- default: "md"
5639
- }
5640
- },
5641
- computed: {
5642
- style() {
5643
- var object = {};
5644
- if (this.bgColor) {
5645
- object["backgroundColor"] = this.bgColor;
5707
+ layoutGroup() {
5708
+ return this.isGroup && !this.field.asObject;
5709
+ },
5710
+ canAddValue() {
5711
+ if (this.singleValue) {
5712
+ return;
5646
5713
  }
5647
- if (this.fgColor) {
5648
- object["color"] = this.fgColor;
5714
+ return this.maximum === 0 || this.numValues < this.maximum;
5715
+ },
5716
+ canRemoveValue() {
5717
+ return this.numValues > this.minimum;
5718
+ },
5719
+ widget() {
5720
+ return this.field.widget;
5721
+ },
5722
+ singleValue() {
5723
+ if (this.asObject) {
5724
+ var isSingle = this.minimum === 1 && this.maximum === 1;
5725
+ return isSingle;
5726
+ } else {
5727
+ return this.maximum === 1;
5649
5728
  }
5650
- return object;
5651
5729
  },
5652
- classes() {
5653
- var array = [];
5654
- array.push(`ux-btn-${this.size}`);
5655
- if (this.block) {
5656
- array.push(`ux-btn-block`);
5730
+ multiValue() {
5731
+ return !this.singleValue;
5732
+ },
5733
+ label() {
5734
+ return this.field.title;
5735
+ },
5736
+ title() {
5737
+ return this.label;
5738
+ },
5739
+ plural() {
5740
+ return this.field.plural;
5741
+ },
5742
+ description() {
5743
+ return this.field.description;
5744
+ },
5745
+ placeholder() {
5746
+ return this.field.placeholder || this.field.hint;
5747
+ },
5748
+ addLabel() {
5749
+ if (this.numValues) {
5750
+ return `Add another ${this.label}`;
5751
+ } else {
5752
+ return `Add ${this.label}`;
5657
5753
  }
5658
- if (this.loading) {
5659
- array.push(`ux-btn-loading`);
5754
+ },
5755
+ removeLabel() {
5756
+ return `Remove`;
5757
+ },
5758
+ numValues() {
5759
+ if (this.singleValue) {
5760
+ return 1;
5660
5761
  }
5661
- if (this.active) {
5662
- array.push(`ux-btn-active`);
5762
+ return (this.value || []).length || 0;
5763
+ },
5764
+ showLabel() {
5765
+ return this.field.title;
5766
+ },
5767
+ showDescription() {
5768
+ return this.description;
5769
+ },
5770
+ fields() {
5771
+ var subFields = this.field.fields;
5772
+ if (subFields && subFields.length) {
5773
+ return subFields;
5663
5774
  }
5664
- if (this.icon) {
5665
- array.push(`ux-btn-icon`);
5775
+ },
5776
+ minimum() {
5777
+ if (this.layoutGroup) {
5778
+ return 1;
5666
5779
  }
5667
- array.push(`ux-btn-color-${this.color}`);
5668
- if (this.disabled) {
5669
- array.push(`ux-btn-disabled`);
5780
+ var int2 = parseInt(this.field.minimum || 0);
5781
+ if (isNaN(int2)) {
5782
+ int2 = 0;
5670
5783
  }
5671
- return array;
5784
+ int2 = Math.max(int2, 0);
5785
+ int2 = this.maximum ? Math.min(int2, this.maximum) : int2;
5786
+ return parseInt(int2);
5672
5787
  },
5673
- element() {
5674
- switch (this.tag) {
5675
- case "span":
5676
- return this.tag;
5677
- case "submit":
5678
- return "button";
5679
- default:
5680
- if (this.to || this.href) {
5681
- return "ux-link";
5682
- }
5683
- return this.tag || "button";
5788
+ maximum() {
5789
+ if (this.layoutGroup) {
5790
+ return 1;
5684
5791
  }
5685
- }
5686
- }
5687
- };
5688
- const _hoisted_1$J = { class: "ux-btn-text" };
5689
- function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
5690
- const _component_spinner = resolveComponent("spinner");
5691
- return openBlock(), createBlock(resolveDynamicComponent($options.element), {
5692
- active: $props.active,
5693
- loading: $props.loading,
5694
- to: $props.to,
5695
- href: $props.href,
5696
- target: $props.target,
5697
- style: normalizeStyle($options.style),
5698
- class: normalizeClass([$options.classes, "ux-btn"]),
5699
- disabled: $props.disabled
5700
- }, {
5701
- default: withCtx(() => [
5702
- $props.loading ? (openBlock(), createBlock(_component_spinner, { key: 0 })) : createCommentVNode("", true),
5703
- createElementVNode("span", _hoisted_1$J, [
5704
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
5705
- ])
5706
- ]),
5707
- _: 3
5708
- }, 8, ["active", "loading", "to", "href", "target", "style", "class", "disabled"]);
5709
- }
5710
- var UXButton = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y], ["__scopeId", "data-v-56c95efc"]]);
5711
- var checkbox_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
5712
- const _sfc_main$X = {
5713
- props: {
5714
- value: {
5715
- type: Boolean,
5716
- default() {
5717
- return false;
5792
+ var int2 = parseInt(this.field.maximum || 0);
5793
+ if (isNaN(int2)) {
5794
+ int2 = 0;
5795
+ }
5796
+ int2 = Math.max(int2, 0);
5797
+ return parseInt(int2);
5798
+ },
5799
+ ask() {
5800
+ var int2 = parseInt(this.field.ask);
5801
+ int2 = Math.max(int2, this.minimum);
5802
+ if (this.maximum) {
5803
+ int2 = Math.min(int2, this.maximum);
5718
5804
  }
5805
+ return int2;
5719
5806
  }
5720
5807
  },
5721
- computed: {
5722
- classes() {
5723
- var array = [];
5724
- if (this.value) {
5725
- array.push(`ux-checkbox-true`);
5726
- } else {
5727
- array.push(`ux-checkbox-false`);
5808
+ methods: {
5809
+ cleanTextInput(val, type, instance) {
5810
+ switch (type) {
5811
+ case "url":
5812
+ val = instance.$sdk.utils.parseURL(val);
5813
+ break;
5814
+ case "key":
5815
+ val = String(instance.$sdk.utils.machineName(val)).trim();
5816
+ break;
5817
+ case "integer":
5818
+ val = parseInt(String(val).replace(/[^0-9-]/g, ""));
5819
+ if (isNaN(val)) {
5820
+ val = void 0;
5821
+ }
5822
+ break;
5823
+ case "number":
5824
+ case "decimal":
5825
+ case "float":
5826
+ val = Number(String(val).replace(/[^0-9.-]/g, ""));
5827
+ if (isNaN(val)) {
5828
+ val = void 0;
5829
+ }
5830
+ break;
5728
5831
  }
5729
- return array;
5730
- }
5731
- }
5732
- };
5733
- function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
5734
- const _component_ux_icon = resolveComponent("ux-icon");
5735
- return openBlock(), createElementBlock("button", {
5736
- class: normalizeClass(["ux-checkbox", $options.classes])
5737
- }, [
5738
- createVNode(_component_ux_icon, {
5739
- class: "icon",
5740
- icon: "fa-check"
5741
- })
5742
- ], 2);
5743
- }
5744
- var UXCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X], ["__scopeId", "data-v-6b7b7539"]]);
5745
- var switch_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
5746
- const _sfc_main$W = {
5747
- props: {
5748
- value: {
5749
- type: Boolean,
5750
- default() {
5751
- return false;
5832
+ return val;
5833
+ },
5834
+ checkAutofocus() {
5835
+ if (this.field.autofocus) {
5836
+ if (this.value) {
5837
+ return;
5838
+ }
5839
+ this.$nextTick(function() {
5840
+ this.refocus();
5841
+ });
5752
5842
  }
5753
5843
  },
5754
- loading: {
5755
- type: Boolean,
5756
- default() {
5757
- return false;
5844
+ getValue(option2) {
5845
+ if (!option2) {
5846
+ return this.cleanTextInput(option2);
5758
5847
  }
5759
- }
5760
- },
5761
- computed: {
5762
- classes() {
5763
- var array = [];
5764
- if (this.value) {
5765
- array.push(`ux-switch-true`);
5766
- } else {
5767
- array.push(`ux-switch-false`);
5848
+ var value = this.cleanTextInput(option2._id || option2.value);
5849
+ var hasValue = isNotEmpty(value);
5850
+ if (!hasValue && option2.title && !this.returnObject) {
5851
+ value = option2.title;
5768
5852
  }
5769
- if (this.loading) {
5770
- array.push(`ux-switch-loading`);
5853
+ value = this.cleanTextInput(value);
5854
+ return isNotEmpty(value) ? value : option2;
5855
+ },
5856
+ getLabel(option2) {
5857
+ if (!option2) {
5858
+ return;
5859
+ }
5860
+ var label = option2.title || option2.name || option2.label;
5861
+ if (typeof label == "object") {
5862
+ return "(no title)";
5863
+ } else {
5864
+ return label;
5771
5865
  }
5772
- return array;
5773
- }
5774
- }
5775
- };
5776
- function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
5777
- const _component_ux_icon = resolveComponent("ux-icon");
5778
- return openBlock(), createElementBlock("a", {
5779
- class: normalizeClass(["ux-switch", $options.classes])
5780
- }, [
5781
- createElementVNode("span", null, [
5782
- createVNode(_component_ux_icon, {
5783
- spin: "",
5784
- icon: "fa-spinner"
5785
- })
5786
- ])
5787
- ], 2);
5788
- }
5789
- var UXSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$W], ["__scopeId", "data-v-57a418e1"]]);
5790
- var link_vue_vue_type_style_index_0_scoped_true_lang = "";
5791
- const _sfc_main$V = {
5792
- props: {
5793
- to: {
5794
- type: [Object, String]
5795
5866
  },
5796
- href: {
5797
- type: String
5867
+ touch() {
5868
+ this.$emit("touched");
5798
5869
  },
5799
- target: {
5800
- type: String
5870
+ getNewDefaultEntry() {
5871
+ return void 0;
5801
5872
  },
5802
- disabled: {
5803
- type: Boolean
5804
- }
5805
- },
5806
- methods: {
5807
- clicked(event) {
5808
- var self2 = this;
5809
- if (self2.to) {
5810
- if (self2.buildMode || self2.nuxtMode) {
5811
- event.preventDefault();
5812
- event.stopImmediatePropagation();
5813
- return self2.$sdk.app.to(self2.to);
5814
- }
5815
- }
5816
- if (self2.href) {
5817
- if (self2.buildMode || self2.nuxtMode) {
5818
- event.preventDefault();
5819
- event.stopImmediatePropagation();
5820
- return;
5821
- }
5822
- }
5823
- }
5824
- },
5825
- computed: {
5826
- actualHref() {
5827
- if (this.href) {
5828
- return this.href;
5873
+ add() {
5874
+ if (!this.canAddValue) {
5875
+ return;
5829
5876
  }
5830
- if (this.nuxtMode) {
5831
- return this.$sdk.app.createHref(this.to);
5877
+ var defaultEntry = this.cleanInputValue(this.getNewDefaultEntry());
5878
+ if (!this.value || !Array.isArray(this.value)) {
5879
+ this.value = [];
5832
5880
  }
5881
+ this.value.push(defaultEntry);
5882
+ this.dispatch();
5883
+ this.$nextTick(function() {
5884
+ this.refocus();
5885
+ });
5886
+ this.touch();
5833
5887
  },
5834
- nuxtMode() {
5835
- return this.to && this.$sdk.nuxt && this.$sdk.app && this.$sdk.app.createHref;
5888
+ remove(entry) {
5889
+ var index2 = this.model.indexOf(entry);
5890
+ this.value.splice(index2, 1);
5891
+ this.dispatch();
5892
+ this.touch();
5836
5893
  },
5837
- buildMode() {
5838
- return !!this.$sdk && this.$sdk.app && this.$sdk.app.builder;
5894
+ dispatch() {
5895
+ this.$emit("update:modelValue", this.value);
5839
5896
  },
5840
- class() {
5841
- var array = [];
5842
- if (this.disabled) {
5843
- array.push("disabled");
5897
+ cleanInputValue(val) {
5898
+ return val;
5899
+ },
5900
+ cleanOutputValue(val) {
5901
+ return val;
5902
+ },
5903
+ cleanOutput(val) {
5904
+ var self2 = this;
5905
+ if (isUndefined$6(val, self2.field.type)) {
5906
+ if (self2.multiValue) {
5907
+ val = [];
5908
+ } else {
5909
+ val = void 0;
5910
+ }
5911
+ } else {
5912
+ if (self2.multiValue) {
5913
+ if (!Array.isArray(val)) {
5914
+ val = [];
5915
+ }
5916
+ val.forEach(function(v, i2) {
5917
+ val[i2] = self2.cleanOutputValue(v);
5918
+ });
5919
+ } else {
5920
+ val = self2.cleanOutputValue(val);
5921
+ }
5844
5922
  }
5845
- if (this.href || this.to) {
5846
- array.push("haslink");
5923
+ return val;
5924
+ },
5925
+ cleanInput(val) {
5926
+ var self2 = this;
5927
+ if (self2.multiValue) {
5928
+ if (!val) {
5929
+ val = [];
5930
+ }
5931
+ if (!Array.isArray(val)) {
5932
+ val = [val];
5933
+ }
5934
+ if (self2.maximum) {
5935
+ if (val.length > self2.maximum) {
5936
+ val.length = self2.maximum;
5937
+ }
5938
+ }
5939
+ while (val.length < self2.minimum) {
5940
+ val.push(self2.cleanInputValue(self2.getNewDefaultEntry()));
5941
+ }
5942
+ val = val.map(function(v) {
5943
+ var d = self2.cleanInputValue(v);
5944
+ return d;
5945
+ });
5946
+ } else {
5947
+ if (val) {
5948
+ val = self2.cleanInputValue(val);
5949
+ }
5847
5950
  }
5848
- return array;
5951
+ return val;
5849
5952
  },
5850
- element() {
5851
- if (this.nuxtMode) {
5852
- return "a";
5953
+ refocus() {
5954
+ var elements = this.$refs.input;
5955
+ if (!elements) {
5956
+ return;
5853
5957
  }
5854
- if (this.buildMode) {
5855
- return "a";
5958
+ var input;
5959
+ if (Array.isArray(elements)) {
5960
+ input = elements[elements.length - 1];
5961
+ } else {
5962
+ input = elements;
5856
5963
  }
5857
- if (this.to) {
5858
- return `router-link`;
5964
+ if (input) {
5965
+ input.focus();
5859
5966
  }
5860
- return "a";
5861
5967
  }
5862
5968
  }
5863
5969
  };
5864
- function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
5865
- return openBlock(), createBlock(resolveDynamicComponent($options.element), {
5866
- onClick: $options.clicked,
5867
- to: $props.to,
5868
- href: $options.actualHref,
5869
- target: $props.target,
5870
- class: normalizeClass([$options.class, "ux-link"])
5871
- }, {
5872
- default: withCtx(() => [
5873
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
5874
- ]),
5875
- _: 3
5876
- }, 8, ["onClick", "to", "href", "target", "class"]);
5970
+ var select_vue_vue_type_style_index_0_scoped_true_lang = "";
5971
+ function isUndefined$5(entry) {
5972
+ return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
5877
5973
  }
5878
- var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$V], ["__scopeId", "data-v-8b82829a"]]);
5879
- var icon_vue_vue_type_style_index_0_scoped_true_lang = "";
5880
- const _sfc_main$U = {
5974
+ const _sfc_main$$ = {
5881
5975
  props: {
5882
- icon: {
5883
- type: [Object, String]
5884
- },
5885
- spin: {
5886
- type: Boolean
5887
- },
5888
- left: {
5889
- type: Boolean
5976
+ title: {
5977
+ type: String
5890
5978
  },
5891
- right: {
5892
- type: Boolean
5893
- }
5979
+ modelValue: {}
5894
5980
  },
5895
- computed: {
5896
- classes() {
5897
- var array = [];
5898
- array.push(this.icon);
5899
- if (this.spin) {
5900
- array.push(`fa-spin`);
5901
- }
5902
- if (this.left) {
5903
- array.push("ux-icon-left");
5904
- }
5905
- if (this.right) {
5906
- array.push("ux-icon-right");
5981
+ mixins: [InputMixin],
5982
+ created() {
5983
+ this.model = this.model;
5984
+ },
5985
+ methods: {
5986
+ cleanOutput(val) {
5987
+ var self2 = this;
5988
+ if (isUndefined$5(val)) {
5989
+ if (self2.multiValue) {
5990
+ val = [];
5991
+ } else {
5992
+ val = void 0;
5993
+ }
5994
+ } else {
5995
+ if (self2.multiValue) {
5996
+ val = (val || []).filter(function(i2) {
5997
+ return i2 !== void 0 && i2 !== null;
5998
+ }).map(function(i2) {
5999
+ return self2.getValue(i2);
6000
+ });
6001
+ } else {
6002
+ val = self2.getValue(val);
6003
+ }
5907
6004
  }
5908
- return array;
6005
+ return val;
5909
6006
  },
5910
- element() {
5911
- return "i";
5912
- }
5913
- }
5914
- };
5915
- function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
5916
- return openBlock(), createBlock(resolveDynamicComponent($options.element), {
5917
- class: normalizeClass(["ux-icon fa", $options.classes])
5918
- }, null, 8, ["class"]);
5919
- }
5920
- var UXIcon = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$U], ["__scopeId", "data-v-1764a3d0"]]);
5921
- var UXMenuService = {
5922
- cache: {}
5923
- };
5924
- var menu_vue_vue_type_style_index_0_scoped_true_lang = "";
5925
- const _sfc_main$T = {
5926
- props: {
5927
- group: {
5928
- type: String
6007
+ cleanInput(val) {
6008
+ var self2 = this;
6009
+ if (self2.multiValue) {
6010
+ if (!val) {
6011
+ val = [];
6012
+ }
6013
+ if (!Array.isArray(val)) {
6014
+ val = [val];
6015
+ }
6016
+ if (self2.maximum) {
6017
+ if (val.length > self2.maximum) {
6018
+ val.length = self2.maximum;
6019
+ }
6020
+ }
6021
+ val = val.filter(function(v) {
6022
+ return v !== void 0 && v !== null;
6023
+ }).map(function(v) {
6024
+ var valueKey2 = self2.getValue(v);
6025
+ return self2.returnObject ? self2.optionLookup[valueKey2] : valueKey2;
6026
+ });
6027
+ } else {
6028
+ var valueKey = self2.getValue(val);
6029
+ val = self2.returnObject ? self2.optionLookup[valueKey] : valueKey;
6030
+ switch (val) {
6031
+ case "":
6032
+ switch (self2.type) {
6033
+ case "decimal":
6034
+ case "float":
6035
+ case "number":
6036
+ case "integer":
6037
+ val = void 0;
6038
+ break;
6039
+ }
6040
+ break;
6041
+ }
6042
+ }
6043
+ return val;
6044
+ }
6045
+ },
6046
+ computed: {
6047
+ returnObject() {
6048
+ return this.type == "reference";
5929
6049
  },
5930
- right: {
5931
- type: Boolean,
5932
- default: false
6050
+ classes() {
6051
+ var array = [];
6052
+ if (this.multiValue) {
6053
+ array.push("multiple");
6054
+ } else {
6055
+ array.push("single");
6056
+ }
6057
+ return array;
5933
6058
  },
5934
- bottom: {
5935
- type: Boolean,
5936
- default: false
6059
+ optionLookup() {
6060
+ var self2 = this;
6061
+ return self2.options.reduce(function(set, option2) {
6062
+ const key = self2.getValue(option2);
6063
+ set[key] = option2;
6064
+ return set;
6065
+ }, {});
5937
6066
  },
5938
- stop: {
5939
- type: Boolean,
5940
- default: false
6067
+ summary() {
6068
+ return this.model ? this.getLabel(this.optionLookup[this.model]) : this.title || "Click to select";
5941
6069
  },
5942
- closeOnClick: {
5943
- type: Boolean,
6070
+ selectableOptions() {
6071
+ return this.options;
6072
+ }
6073
+ }
6074
+ };
6075
+ const _hoisted_1$L = {
6076
+ key: 0,
6077
+ class: "ux-field-title"
6078
+ };
6079
+ const _hoisted_2$E = {
6080
+ key: 0,
6081
+ class: "ux-required-marker"
6082
+ };
6083
+ const _hoisted_3$x = {
6084
+ key: 1,
6085
+ class: "ux-field-description"
6086
+ };
6087
+ const _hoisted_4$u = {
6088
+ key: 2,
6089
+ class: "ui-select-button"
6090
+ };
6091
+ const _hoisted_5$n = ["multiple"];
6092
+ const _hoisted_6$i = {
6093
+ key: 0,
6094
+ value: ""
6095
+ };
6096
+ const _hoisted_7$f = ["value"];
6097
+ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
6098
+ const _component_ux_button = resolveComponent("ux-button");
6099
+ return openBlock(), createElementBlock("div", {
6100
+ class: normalizeClass(["native-select", $options.classes])
6101
+ }, [
6102
+ _ctx.showLabel ? (openBlock(), createElementBlock("label", _hoisted_1$L, [
6103
+ createTextVNode(toDisplayString(_ctx.label) + " ", 1),
6104
+ _ctx.required ? (openBlock(), createElementBlock("span", _hoisted_2$E, "*")) : createCommentVNode("", true)
6105
+ ])) : createCommentVNode("", true),
6106
+ _ctx.showDescription ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
6107
+ _ctx.singleValue ? (openBlock(), createElementBlock("div", _hoisted_4$u, [
6108
+ renderSlot(_ctx.$slots, "default", {}, () => [
6109
+ createVNode(_component_ux_button, { tag: "div" }, {
6110
+ default: withCtx(() => [
6111
+ createTextVNode(toDisplayString($options.summary), 1)
6112
+ ]),
6113
+ _: 1
6114
+ })
6115
+ ], true)
6116
+ ])) : createCommentVNode("", true),
6117
+ withDirectives(createElementVNode("select", {
6118
+ onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.touch && _ctx.touch(...args)),
6119
+ multiple: _ctx.multiValue,
6120
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
6121
+ }, [
6122
+ _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$i, "None")) : createCommentVNode("", true),
6123
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
6124
+ return openBlock(), createElementBlock("option", {
6125
+ value: option2.value
6126
+ }, toDisplayString(option2.title), 9, _hoisted_7$f);
6127
+ }), 256))
6128
+ ], 40, _hoisted_5$n), [
6129
+ [vModelSelect, _ctx.model]
6130
+ ])
6131
+ ], 2);
6132
+ }
6133
+ var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$], ["__scopeId", "data-v-a06c20f2"]]);
6134
+ var Pager_vue_vue_type_style_index_0_scoped_true_lang = "";
6135
+ const _sfc_main$_ = {
6136
+ props: {
6137
+ total: {
6138
+ type: Number,
5944
6139
  default() {
5945
- return true;
6140
+ return 0;
5946
6141
  }
5947
6142
  },
5948
- modelValue: {
5949
- type: Boolean,
6143
+ page: {
6144
+ type: Object,
5950
6145
  default() {
5951
- return false;
6146
+ return {
6147
+ size: 50,
6148
+ index: 1
6149
+ };
5952
6150
  }
5953
6151
  }
5954
6152
  },
5955
- data() {
5956
- return {
5957
- outerStyle: {},
5958
- innerStyle: {},
5959
- isExpanded: this.modelValue,
5960
- triggerEvent: null,
5961
- refMenu: null,
5962
- mounted: false
5963
- };
6153
+ components: {
6154
+ NativeSelect
5964
6155
  },
5965
6156
  watch: {
5966
- modelValue(m) {
5967
- this.expanded = m;
5968
- }
5969
- },
5970
- mounted() {
5971
- this.refMenu = this.$refs.menu;
5972
- this.mounted = true;
5973
- },
5974
- beforeUnmount() {
5975
- this.removeListeners();
5976
- this.refMenu = null;
5977
- this.mounted = false;
5978
- if (UXMenuService.cache[this.group] === this) {
5979
- UXMenuService.cache[this.group] = null;
6157
+ totalPages() {
6158
+ this.currentPage = 0;
5980
6159
  }
5981
6160
  },
5982
- methods: {
5983
- removeListeners() {
5984
- document.removeEventListener("click", this.globalClick);
5985
- if (this.refMenu) {
5986
- this.refMenu.removeEventListener("click", this.immediateClick);
6161
+ computed: {
6162
+ perPage: {
6163
+ get() {
6164
+ return this.pageModel.size;
6165
+ },
6166
+ set(i2) {
6167
+ i2 = Math.max(i2, 1);
6168
+ this.pageModel.size = i2;
6169
+ this.dispatch();
5987
6170
  }
5988
6171
  },
5989
- addEventListeners() {
5990
- document.addEventListener("click", this.globalClick);
5991
- if (this.refMenu) {
5992
- this.refMenu.addEventListener("click", this.immediateClick);
5993
- }
6172
+ pageField() {
6173
+ return {
6174
+ type: "integer",
6175
+ maximum: 1,
6176
+ minimum: 1,
6177
+ options: Array(this.totalPages).fill(1).map((x, y) => x + y)
6178
+ };
5994
6179
  },
5995
- immediateClick(event) {
5996
- if (this.expanded) {
5997
- if (this.closeOnClick) {
5998
- event.stopImmediatePropagation();
5999
- this.expanded = false;
6000
- }
6001
- }
6180
+ totalPages() {
6181
+ return Math.ceil(this.total / this.perPage);
6002
6182
  },
6003
- globalClick(event) {
6004
- if (this.triggerEvent === event) {
6005
- return;
6006
- }
6007
- var parentElement = this.$refs.menu;
6008
- var childElement = event.srcElement;
6009
- if (parentElement && parentElement.contains(childElement)) {
6010
- if (this.closeOnClick) {
6011
- this.expanded = false;
6012
- }
6013
- } else {
6014
- this.expanded = false;
6015
- }
6183
+ startIndex() {
6184
+ return (this.currentPage - 1) * this.pageModel.size;
6016
6185
  },
6017
- position() {
6018
- const rect = this.$el.getBoundingClientRect();
6019
- this.outerStyle.left = `${rect.left + window.scrollX}px`;
6020
- this.outerStyle.top = `${rect.bottom + window.scrollY}px`;
6021
- if (this.right) {
6022
- this.innerStyle.right = `-${rect.width}px`;
6023
- }
6024
- if (this.bottom) {
6025
- this.innerStyle.bottom = `${rect.height}px`;
6026
- }
6027
- var zIndex = this.getMaxZIndex();
6028
- this.outerStyle.zIndex = zIndex;
6186
+ displayStartIndex() {
6187
+ return this.total ? this.startIndex + 1 : 0;
6029
6188
  },
6030
- getMaxZIndex() {
6031
- return Math.max(...Array.from(document.querySelectorAll("body *"), (el) => parseFloat(window.getComputedStyle(el).zIndex)).filter((zIndex) => !Number.isNaN(zIndex)), 0);
6189
+ endIndex() {
6190
+ return Math.min(this.startIndex + this.pageModel.size, this.total);
6032
6191
  },
6033
- close() {
6034
- this.expanded = false;
6035
- }
6036
- },
6037
- computed: {
6038
- expanded: {
6192
+ currentPage: {
6039
6193
  get() {
6040
- return this.isExpanded;
6194
+ return this.pageModel.index;
6041
6195
  },
6042
- set(v) {
6043
- var previousActivatedEntity;
6044
- if (this.group) {
6045
- previousActivatedEntity = UXMenuService.cache[this.group];
6046
- }
6047
- if (this.isExpanded != v) {
6048
- this.isExpanded = v;
6049
- if (v) {
6050
- this.position();
6051
- this.addEventListeners();
6052
- UXMenuService.cache[this.group] = this;
6053
- if (previousActivatedEntity && previousActivatedEntity != this) {
6054
- previousActivatedEntity.expanded = false;
6055
- }
6056
- } else {
6057
- this.removeListeners();
6058
- }
6059
- this.$emit("update:modelValue", v);
6060
- }
6061
- }
6062
- },
6063
- on() {
6064
- var self2 = this;
6065
- return {
6066
- click(event) {
6067
- if (self2.stop) {
6068
- event.stopImmediatePropagation();
6069
- }
6070
- self2.triggerEvent = event;
6071
- self2.expanded = !self2.expanded;
6196
+ set(index2) {
6197
+ if (this.totalPages) {
6198
+ index2 = Math.min(this.totalPages, index2);
6072
6199
  }
6073
- };
6074
- }
6075
- }
6076
- };
6077
- function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
6078
- return openBlock(), createElementBlock("div", {
6079
- class: normalizeClass(["ux-menu", { right: $props.right }])
6080
- }, [
6081
- createElementVNode("span", null, [
6082
- renderSlot(_ctx.$slots, "activator", { on: $options.on }, void 0, true)
6083
- ]),
6084
- (openBlock(), createBlock(Teleport, { to: "body" }, [
6085
- $data.isExpanded ? (openBlock(), createElementBlock("div", {
6086
- key: 0,
6087
- class: "ux-menu-outer",
6088
- style: normalizeStyle($data.outerStyle)
6089
- }, [
6090
- createElementVNode("div", {
6091
- class: "ux-menu-panel",
6092
- ref: "menu",
6093
- style: normalizeStyle($data.innerStyle)
6094
- }, [
6095
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
6096
- ], 4)
6097
- ], 4)) : createCommentVNode("", true)
6098
- ]))
6099
- ], 2);
6100
- }
6101
- var UXMenu = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$T], ["__scopeId", "data-v-29d476a2"]]);
6102
- const _sfc_main$S = {
6103
- name: "menulist",
6104
- props: {
6105
- items: {
6106
- type: Array,
6107
- default() {
6108
- return [];
6200
+ index2 = Math.max(index2, 1);
6201
+ this.pageModel.index = index2;
6202
+ this.dispatch();
6109
6203
  }
6110
- },
6111
- expandOn: {
6112
- type: String,
6113
- default: "none"
6114
- }
6115
- },
6116
- computed: {
6117
- filteredItems() {
6118
- return this.items.filter(function(item) {
6119
- return !item.disabled;
6120
- });
6121
6204
  }
6122
6205
  },
6123
6206
  methods: {
6124
- toggle(item) {
6125
- item.expanded = !item.expanded;
6126
- item.collapsed = !item.expanded;
6207
+ dispatch() {
6208
+ return this.$emit("update:page", this.pageModel);
6209
+ },
6210
+ previousPage() {
6211
+ this.currentPage--;
6212
+ },
6213
+ nextPage() {
6214
+ this.currentPage++;
6127
6215
  }
6128
6216
  },
6129
6217
  data() {
6130
- return {};
6218
+ return {
6219
+ pageModel: this.page,
6220
+ perPageField: {
6221
+ minimum: 1,
6222
+ maximum: 1,
6223
+ options: [
6224
+ {
6225
+ title: "50 per page",
6226
+ value: 50
6227
+ },
6228
+ {
6229
+ title: "100 per page",
6230
+ value: 100
6231
+ },
6232
+ {
6233
+ title: "250 per page",
6234
+ value: 250
6235
+ },
6236
+ {
6237
+ title: "500 per page",
6238
+ value: 500
6239
+ }
6240
+ ]
6241
+ }
6242
+ };
6131
6243
  }
6132
6244
  };
6133
- function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
6134
- const _component_ux_link = resolveComponent("ux-link");
6135
- const _component_menulist = resolveComponent("menulist", true);
6136
- return openBlock(), createElementBlock("ul", null, [
6137
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.filteredItems, (item) => {
6138
- var _a;
6139
- return openBlock(), createElementBlock("li", {
6140
- class: normalizeClass({ expanded: item.expanded, collapsed: item.collapsed })
6141
- }, [
6142
- $props.expandOn === "click" && ((_a = item.items) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_ux_link, {
6143
- key: 0,
6144
- onClick: withModifiers(($event) => $options.toggle(item), ["stop", "prevent"]),
6145
- class: normalizeClass(item.class)
6146
- }, {
6147
- default: withCtx(() => [
6148
- createTextVNode(toDisplayString(item.title), 1)
6149
- ]),
6150
- _: 2
6151
- }, 1032, ["onClick", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6152
- item.type === "url" ? (openBlock(), createBlock(_component_ux_link, {
6153
- key: 0,
6154
- class: normalizeClass(item.class),
6155
- target: item.target,
6156
- href: item.href || item.url
6245
+ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
6246
+ const _component_native_select = resolveComponent("native-select");
6247
+ const _component_flex_cell = resolveComponent("flex-cell");
6248
+ const _component_ux_icon = resolveComponent("ux-icon");
6249
+ const _component_ux_button = resolveComponent("ux-button");
6250
+ const _component_flex_row = resolveComponent("flex-row");
6251
+ return openBlock(), createBlock(_component_flex_row, {
6252
+ center: "",
6253
+ gap: ""
6254
+ }, {
6255
+ default: withCtx(() => [
6256
+ createVNode(_component_flex_cell, {
6257
+ shrink: "",
6258
+ class: "text"
6259
+ }, {
6260
+ default: withCtx(() => [
6261
+ createVNode(_component_native_select, {
6262
+ modelValue: $options.perPage,
6263
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.perPage = $event),
6264
+ field: $data.perPageField
6157
6265
  }, {
6158
6266
  default: withCtx(() => [
6159
- createTextVNode(toDisplayString(item.title), 1)
6267
+ _ctx.$device.breakpoint.xs ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6268
+ createTextVNode(toDisplayString($options.displayStartIndex) + "-" + toDisplayString($options.endIndex) + " of " + toDisplayString($props.total), 1)
6269
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6270
+ createTextVNode("Showing " + toDisplayString($options.displayStartIndex) + " to " + toDisplayString($options.endIndex) + " of " + toDisplayString($props.total) + " total", 1)
6271
+ ], 64))
6160
6272
  ]),
6161
- _: 2
6162
- }, 1032, ["class", "target", "href"])) : item.type === "route" ? (openBlock(), createBlock(_component_ux_link, {
6163
- key: 1,
6164
- class: normalizeClass(item.class),
6165
- to: { name: item.route }
6273
+ _: 1
6274
+ }, 8, ["modelValue", "field"])
6275
+ ]),
6276
+ _: 1
6277
+ }),
6278
+ createVNode(_component_flex_cell),
6279
+ $options.totalPages > 1 ? (openBlock(), createBlock(_component_flex_cell, {
6280
+ key: 0,
6281
+ shrink: ""
6282
+ }, {
6283
+ default: withCtx(() => [
6284
+ createVNode(_component_flex_row, {
6285
+ gap: "",
6286
+ center: ""
6166
6287
  }, {
6167
6288
  default: withCtx(() => [
6168
- createTextVNode(toDisplayString(item.title), 1)
6289
+ createVNode(_component_flex_cell, {
6290
+ shrink: "",
6291
+ class: "text"
6292
+ }, {
6293
+ default: withCtx(() => [
6294
+ createVNode(_component_native_select, {
6295
+ modelValue: $options.currentPage,
6296
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $options.currentPage = $event),
6297
+ field: $options.pageField
6298
+ }, {
6299
+ default: withCtx(() => [
6300
+ _ctx.$device.breakpoint.xs ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6301
+ createTextVNode(toDisplayString($options.currentPage) + "/" + toDisplayString($options.totalPages), 1)
6302
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6303
+ createTextVNode("Page " + toDisplayString($options.currentPage) + " of " + toDisplayString($options.totalPages), 1)
6304
+ ], 64))
6305
+ ]),
6306
+ _: 1
6307
+ }, 8, ["modelValue", "field"])
6308
+ ]),
6309
+ _: 1
6310
+ }),
6311
+ createVNode(_component_flex_cell, { shrink: "" }, {
6312
+ default: withCtx(() => [
6313
+ createVNode(_component_ux_button, {
6314
+ icon: "",
6315
+ onClick: _cache[2] || (_cache[2] = ($event) => $options.previousPage())
6316
+ }, {
6317
+ default: withCtx(() => [
6318
+ createVNode(_component_ux_icon, { icon: "fa-arrow-left" })
6319
+ ]),
6320
+ _: 1
6321
+ })
6322
+ ]),
6323
+ _: 1
6324
+ }),
6325
+ createVNode(_component_flex_cell, { shrink: "" }, {
6326
+ default: withCtx(() => [
6327
+ createVNode(_component_ux_button, {
6328
+ icon: "",
6329
+ onClick: _cache[3] || (_cache[3] = ($event) => $options.nextPage())
6330
+ }, {
6331
+ default: withCtx(() => [
6332
+ createVNode(_component_ux_icon, { icon: "fa-arrow-right" })
6333
+ ]),
6334
+ _: 1
6335
+ })
6336
+ ]),
6337
+ _: 1
6338
+ })
6169
6339
  ]),
6170
- _: 2
6171
- }, 1032, ["class", "to"])) : createCommentVNode("", true)
6172
- ], 64)),
6173
- item.items && item.items.length ? (openBlock(), createBlock(_component_menulist, {
6174
- key: 2,
6175
- items: item.items
6176
- }, null, 8, ["items"])) : createCommentVNode("", true)
6177
- ], 2);
6178
- }), 256))
6179
- ]);
6340
+ _: 1
6341
+ })
6342
+ ]),
6343
+ _: 1
6344
+ })) : createCommentVNode("", true)
6345
+ ]),
6346
+ _: 1
6347
+ });
6180
6348
  }
6181
- var UXMenuList = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$S]]);
6182
- var image_vue_vue_type_style_index_0_scoped_true_lang = "";
6183
- const _sfc_main$R = {
6349
+ var Pager$1 = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_], ["__scopeId", "data-v-93d2aed8"]]);
6350
+ var avatar_vue_vue_type_style_index_0_lang = "";
6351
+ const _sfc_main$Z = {
6184
6352
  props: {
6185
- item: {
6186
- type: Object
6353
+ id: {
6354
+ type: [Object, String]
6355
+ }
6356
+ },
6357
+ computed: {
6358
+ stringID() {
6359
+ return this.$sdk.utils.id(this.id);
6360
+ },
6361
+ url() {
6362
+ }
6363
+ }
6364
+ };
6365
+ const _hoisted_1$K = { class: "avatar" };
6366
+ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
6367
+ return openBlock(), createElementBlock("div", _hoisted_1$K);
6368
+ }
6369
+ var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Z]]);
6370
+ var spinner_vue_vue_type_style_index_0_scoped_true_lang = "";
6371
+ const _sfc_main$Y = {
6372
+ props: {
6373
+ large: {
6374
+ type: Boolean
6375
+ }
6376
+ }
6377
+ };
6378
+ const _withScopeId$7 = (n2) => (pushScopeId("data-v-27f20370"), n2 = n2(), popScopeId(), n2);
6379
+ const _hoisted_1$J = /* @__PURE__ */ _withScopeId$7(() => /* @__PURE__ */ createElementVNode("i", { class: "fa fa-spin fa-spinner" }, null, -1));
6380
+ const _hoisted_2$D = [
6381
+ _hoisted_1$J
6382
+ ];
6383
+ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
6384
+ return openBlock(), createElementBlock("div", {
6385
+ class: normalizeClass(["ux-spinner", { large: $props.large }])
6386
+ }, _hoisted_2$D, 2);
6387
+ }
6388
+ var Spinner = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y], ["__scopeId", "data-v-27f20370"]]);
6389
+ var button_vue_vue_type_style_index_0_scoped_true_lang = "";
6390
+ const _sfc_main$X = {
6391
+ components: {
6392
+ Spinner
6393
+ },
6394
+ props: {
6395
+ to: {
6396
+ type: [Object, String]
6397
+ },
6398
+ icon: {
6399
+ type: Boolean
6400
+ },
6401
+ color: {
6402
+ type: String,
6403
+ default: "default"
6187
6404
  },
6188
- alt: {
6405
+ bgColor: {
6189
6406
  type: String
6190
6407
  },
6191
- width: {
6192
- type: Number
6193
- },
6194
- height: {
6195
- type: Number
6408
+ fgColor: {
6409
+ type: String
6196
6410
  },
6197
- inline: {
6198
- type: Boolean
6411
+ tag: {
6412
+ type: String
6199
6413
  },
6200
- quality: {
6201
- type: Number
6414
+ href: {
6415
+ type: String
6202
6416
  },
6203
- contain: {
6204
- type: Boolean,
6205
- default: true
6417
+ target: {
6418
+ type: String
6206
6419
  },
6207
- preview: {
6208
- type: Boolean,
6209
- default: false
6420
+ loading: {
6421
+ type: Boolean
6210
6422
  },
6211
- crop: {
6423
+ active: {
6212
6424
  type: Boolean
6213
6425
  },
6214
- format: {
6215
- type: String
6426
+ disabled: {
6427
+ type: Boolean
6216
6428
  },
6217
- upscale: {
6218
- type: Boolean,
6219
- default: true
6429
+ block: {
6430
+ type: Boolean
6220
6431
  },
6221
- type: {
6432
+ size: {
6222
6433
  type: String,
6223
- default: "image"
6224
- },
6225
- svg: {
6226
- type: Boolean
6434
+ default: "md"
6227
6435
  }
6228
6436
  },
6229
- data() {
6230
- return {
6231
- model: this.item
6232
- };
6233
- },
6234
6437
  computed: {
6235
- altText() {
6236
- return this.alt || this.model.title;
6237
- },
6238
- className() {
6239
- var classes = [];
6240
- if (this.portrait) {
6241
- classes.push("img-portrait");
6242
- }
6243
- return classes.join(" ");
6244
- },
6245
- isSvg() {
6246
- var _a;
6247
- if (this.svg) {
6248
- return true;
6438
+ style() {
6439
+ var object = {};
6440
+ if (this.bgColor) {
6441
+ object["backgroundColor"] = this.bgColor;
6249
6442
  }
6250
- switch ((_a = this.item) == null ? void 0 : _a.fileMime) {
6251
- case "image/svg+xml":
6252
- case "image/svg":
6253
- return true;
6443
+ if (this.fgColor) {
6444
+ object["color"] = this.fgColor;
6254
6445
  }
6446
+ return object;
6255
6447
  },
6256
- portrait() {
6257
- return this.crop ? this.dimensionHeight > this.dimensionWidth : this.modelHeight > this.modelWidth;
6258
- },
6259
- imageWidth() {
6260
- return parseInt(this.width);
6261
- },
6262
- imageHeight() {
6263
- return parseInt(this.height);
6264
- },
6265
- modelWidth() {
6266
- var _a;
6267
- return parseInt((_a = this.model) == null ? void 0 : _a.width);
6268
- },
6269
- modelHeight() {
6270
- var _a;
6271
- return parseInt((_a = this.model) == null ? void 0 : _a.height);
6272
- },
6273
- id() {
6274
- return this.$sdk.utils.id(this.model);
6275
- },
6276
- params() {
6277
- var params = {};
6278
- params.access_token = this.$sdk.auth.getCurrentToken();
6279
- if (this.imageWidth) {
6280
- params.w = this.imageWidth ? this.imageWidth : null;
6281
- }
6282
- if (this.imageHeight) {
6283
- params.h = this.imageHeight ? this.imageHeight : null;
6448
+ classes() {
6449
+ var array = [];
6450
+ array.push(`ux-btn-${this.size}`);
6451
+ if (this.block) {
6452
+ array.push(`ux-btn-block`);
6284
6453
  }
6285
- if (this.crop) {
6286
- params.c = true;
6287
- } else {
6288
- if (!this.contain) {
6289
- params.c = this.imageWidth && this.imageHeight;
6290
- }
6454
+ if (this.loading) {
6455
+ array.push(`ux-btn-loading`);
6291
6456
  }
6292
- if (this.quality) {
6293
- params.q = parseInt(this.quality);
6457
+ if (this.active) {
6458
+ array.push(`ux-btn-active`);
6294
6459
  }
6295
- if (this.upscale) {
6296
- params.u = true;
6460
+ if (this.icon) {
6461
+ array.push(`ux-btn-icon`);
6297
6462
  }
6298
- if (this.format) {
6299
- params.f = this.format;
6463
+ array.push(`ux-btn-color-${this.color}`);
6464
+ if (this.disabled) {
6465
+ array.push(`ux-btn-disabled`);
6300
6466
  }
6301
- return params;
6302
- },
6303
- src() {
6304
- return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, this.params, { file: true });
6305
- },
6306
- previewSrc() {
6307
- var params = Object.assign({}, this.params);
6308
- params.w = 50;
6309
- delete params.h;
6310
- return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, params, { file: true });
6467
+ return array;
6311
6468
  },
6312
- imageStyle() {
6313
- var style = {};
6314
- if (!this.crop) {
6315
- style["object-fit"] = "contain";
6469
+ element() {
6470
+ switch (this.tag) {
6471
+ case "span":
6472
+ return this.tag;
6473
+ case "submit":
6474
+ return "button";
6475
+ default:
6476
+ if (this.to || this.href) {
6477
+ return "ux-link";
6478
+ }
6479
+ return this.tag || "button";
6316
6480
  }
6317
- if (this.inline) {
6318
- style.maxWidth = "100%";
6319
- } else {
6320
- style.width = "100%";
6321
- style.height = "100%";
6322
- style.top = `0`;
6323
- style.left = `0`;
6324
- style.position = "absolute";
6481
+ }
6482
+ }
6483
+ };
6484
+ const _hoisted_1$I = { class: "ux-btn-text" };
6485
+ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
6486
+ const _component_spinner = resolveComponent("spinner");
6487
+ return openBlock(), createBlock(resolveDynamicComponent($options.element), {
6488
+ active: $props.active,
6489
+ loading: $props.loading,
6490
+ to: $props.to,
6491
+ href: $props.href,
6492
+ target: $props.target,
6493
+ style: normalizeStyle($options.style),
6494
+ class: normalizeClass([$options.classes, "ux-btn"]),
6495
+ disabled: $props.disabled
6496
+ }, {
6497
+ default: withCtx(() => [
6498
+ $props.loading ? (openBlock(), createBlock(_component_spinner, { key: 0 })) : createCommentVNode("", true),
6499
+ createElementVNode("span", _hoisted_1$I, [
6500
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
6501
+ ])
6502
+ ]),
6503
+ _: 3
6504
+ }, 8, ["active", "loading", "to", "href", "target", "style", "class", "disabled"]);
6505
+ }
6506
+ var UXButton = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X], ["__scopeId", "data-v-56c95efc"]]);
6507
+ var checkbox_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
6508
+ const _sfc_main$W = {
6509
+ props: {
6510
+ value: {
6511
+ type: Boolean,
6512
+ default() {
6513
+ return false;
6325
6514
  }
6326
- return style;
6327
- },
6328
- dimensionWidth() {
6329
- return this.imageWidth && this.imageHeight ? this.imageWidth : this.modelWidth;
6330
- },
6331
- dimensionHeight() {
6332
- return this.imageWidth && this.imageHeight ? this.imageHeight : this.modelHeight;
6333
- },
6334
- style() {
6335
- var _a, _b, _c;
6336
- var style = {};
6337
- if (this.inline) {
6338
- style.display = "inline-block";
6515
+ }
6516
+ },
6517
+ computed: {
6518
+ classes() {
6519
+ var array = [];
6520
+ if (this.value) {
6521
+ array.push(`ux-checkbox-true`);
6339
6522
  } else {
6340
- if (this.dimensionHeight && this.dimensionWidth) {
6341
- style.height = 0;
6342
- style.overflow = "hidden";
6343
- style.paddingBottom = `${this.dimensionHeight / this.dimensionWidth * 100}%`;
6344
- style.position = "relative";
6345
- }
6346
- }
6347
- var colors = (_c = (_b = (_a = this.model) == null ? void 0 : _a.fileMeta) == null ? void 0 : _b.colors) == null ? void 0 : _c.colors;
6348
- if (colors && colors.length) {
6349
- style.backgroundColor = colors[0];
6350
- }
6351
- if (this.isSvg)
6352
- ;
6353
- else {
6354
- if (this.preview) {
6355
- style.backgroundImage = `url(${this.previewSrc})`;
6356
- }
6523
+ array.push(`ux-checkbox-false`);
6357
6524
  }
6358
- return style;
6525
+ return array;
6359
6526
  }
6360
6527
  }
6361
6528
  };
6362
- const _hoisted_1$I = ["alt", "data"];
6363
- const _hoisted_2$D = ["alt", "src"];
6364
- function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
6365
- return openBlock(), createElementBlock("div", {
6366
- class: normalizeClass(["ux-image", $options.className]),
6367
- style: normalizeStyle($options.style)
6529
+ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
6530
+ const _component_ux_icon = resolveComponent("ux-icon");
6531
+ return openBlock(), createElementBlock("button", {
6532
+ class: normalizeClass(["ux-checkbox", $options.classes])
6368
6533
  }, [
6369
- $props.svg ? (openBlock(), createElementBlock("object", {
6370
- key: 0,
6371
- alt: $options.altText,
6372
- type: "image/svg+xml",
6373
- data: $options.src
6374
- }, null, 8, _hoisted_1$I)) : (openBlock(), createElementBlock("img", {
6375
- key: 1,
6376
- alt: $options.altText,
6377
- style: normalizeStyle($options.imageStyle),
6378
- src: $options.src
6379
- }, null, 12, _hoisted_2$D))
6380
- ], 6);
6534
+ createVNode(_component_ux_icon, {
6535
+ class: "icon",
6536
+ icon: "fa-check"
6537
+ })
6538
+ ], 2);
6381
6539
  }
6382
- var UXImage = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-a7872864"]]);
6383
- var progressbar_vue_vue_type_style_index_0_scoped_true_lang = "";
6384
- const _sfc_main$Q = {
6540
+ var UXCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$W], ["__scopeId", "data-v-6b7b7539"]]);
6541
+ var switch_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
6542
+ const _sfc_main$V = {
6385
6543
  props: {
6386
6544
  value: {
6387
- type: Number
6545
+ type: Boolean,
6546
+ default() {
6547
+ return false;
6548
+ }
6549
+ },
6550
+ loading: {
6551
+ type: Boolean,
6552
+ default() {
6553
+ return false;
6554
+ }
6388
6555
  }
6389
6556
  },
6390
6557
  computed: {
6391
6558
  classes() {
6392
6559
  var array = [];
6393
- array.push(this.icon);
6394
- if (this.spin) {
6395
- array.push(`fa-spin`);
6396
- }
6397
- if (this.left) {
6398
- array.push("ux-icon-left");
6560
+ if (this.value) {
6561
+ array.push(`ux-switch-true`);
6562
+ } else {
6563
+ array.push(`ux-switch-false`);
6399
6564
  }
6400
- if (this.right) {
6401
- array.push("ux-icon-right");
6565
+ if (this.loading) {
6566
+ array.push(`ux-switch-loading`);
6402
6567
  }
6403
6568
  return array;
6404
- },
6405
- percent() {
6406
- return this.value;
6407
- },
6408
- barStyle() {
6409
- return {
6410
- width: `${this.percent}%`
6411
- };
6412
- },
6413
- element() {
6414
- return "i";
6415
6569
  }
6416
6570
  }
6417
6571
  };
6418
- const _withScopeId$6 = (n2) => (pushScopeId("data-v-317a7690"), n2 = n2(), popScopeId(), n2);
6419
- const _hoisted_1$H = { class: "ux-progress" };
6420
- const _hoisted_2$C = /* @__PURE__ */ _withScopeId$6(() => /* @__PURE__ */ createElementVNode("div", { class: "ux-progress-bg" }, null, -1));
6421
- function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
6422
- return openBlock(), createElementBlock("div", _hoisted_1$H, [
6423
- _hoisted_2$C,
6424
- createElementVNode("div", {
6425
- class: "ux-progress-fg",
6426
- style: normalizeStyle($options.barStyle)
6427
- }, null, 4)
6428
- ]);
6429
- }
6430
- var ProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$Q], ["__scopeId", "data-v-317a7690"]]);
6431
- var list_vue_vue_type_style_index_0_scoped_true_lang = "";
6432
- const _sfc_main$P = {};
6433
- const _hoisted_1$G = { class: "ux-list" };
6434
- function _sfc_render$P(_ctx, _cache) {
6435
- return openBlock(), createElementBlock("ul", _hoisted_1$G, [
6436
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
6437
- ]);
6438
- }
6439
- var UXList = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$P], ["__scopeId", "data-v-98e1e4e2"]]);
6440
- var listItem_vue_vue_type_style_index_0_scoped_true_lang = "";
6441
- const _sfc_main$O = {};
6442
- const _hoisted_1$F = { class: "ux-list-item" };
6443
- function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
6444
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
6445
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
6446
- ]);
6447
- }
6448
- var UXListItem = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O], ["__scopeId", "data-v-0e73c260"]]);
6449
- var daterange_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
6450
- function checkDate(d) {
6451
- var date = new Date(d);
6452
- if (date instanceof Date && !isNaN(date)) {
6453
- return date;
6454
- }
6455
- return;
6572
+ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
6573
+ const _component_ux_icon = resolveComponent("ux-icon");
6574
+ return openBlock(), createElementBlock("a", {
6575
+ class: normalizeClass(["ux-switch", $options.classes])
6576
+ }, [
6577
+ createElementVNode("span", null, [
6578
+ createVNode(_component_ux_icon, {
6579
+ spin: "",
6580
+ icon: "fa-spinner"
6581
+ })
6582
+ ])
6583
+ ], 2);
6456
6584
  }
6457
- const _sfc_main$N = {
6585
+ var UXSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$V], ["__scopeId", "data-v-57a418e1"]]);
6586
+ var link_vue_vue_type_style_index_0_scoped_true_lang = "";
6587
+ const _sfc_main$U = {
6458
6588
  props: {
6459
- modelValue: {
6460
- type: Object
6589
+ to: {
6590
+ type: [Object, String]
6591
+ },
6592
+ href: {
6593
+ type: String
6594
+ },
6595
+ target: {
6596
+ type: String
6597
+ },
6598
+ disabled: {
6599
+ type: Boolean
6461
6600
  }
6462
6601
  },
6463
- data() {
6464
- return {
6465
- model: this.modelValue
6466
- };
6467
- },
6468
- computed: {
6469
- startDate: {
6470
- get() {
6471
- var _a;
6472
- return (_a = checkDate(this.model.startDate)) == null ? void 0 : _a.toISOString().slice(0, 10);
6473
- },
6474
- set(d) {
6475
- d = checkDate(d);
6476
- if (d) {
6477
- this.model.startDate = d;
6478
- } else {
6479
- this.model.startDate = void 0;
6602
+ methods: {
6603
+ clicked(event) {
6604
+ var self2 = this;
6605
+ if (self2.to) {
6606
+ if (self2.buildMode || self2.nuxtMode) {
6607
+ event.preventDefault();
6608
+ event.stopImmediatePropagation();
6609
+ return self2.$sdk.app.to(self2.to);
6480
6610
  }
6481
6611
  }
6482
- },
6483
- endDate: {
6484
- get() {
6485
- var _a;
6486
- return (_a = checkDate(this.model.endDate)) == null ? void 0 : _a.toISOString().slice(0, 10);
6487
- },
6488
- set(d) {
6489
- d = checkDate(d);
6490
- if (checkDate(d)) {
6491
- this.model.endDate = d;
6492
- } else {
6493
- this.model.endDate = void 0;
6612
+ if (self2.href) {
6613
+ if (self2.buildMode || self2.nuxtMode) {
6614
+ event.preventDefault();
6615
+ event.stopImmediatePropagation();
6616
+ return;
6494
6617
  }
6495
6618
  }
6496
6619
  }
6497
6620
  },
6498
- watch: {
6499
- model(m) {
6500
- this.$emit("updated:modelValue", m);
6621
+ computed: {
6622
+ actualHref() {
6623
+ if (this.href) {
6624
+ return this.href;
6625
+ }
6626
+ if (this.nuxtMode) {
6627
+ return this.$sdk.app.createHref(this.to);
6628
+ }
6501
6629
  },
6502
- modelValue(m) {
6503
- this.model = m;
6630
+ nuxtMode() {
6631
+ return this.to && this.$sdk.nuxt && this.$sdk.app && this.$sdk.app.createHref;
6632
+ },
6633
+ buildMode() {
6634
+ return !!this.$sdk && this.$sdk.app && this.$sdk.app.builder;
6635
+ },
6636
+ class() {
6637
+ var array = [];
6638
+ if (this.disabled) {
6639
+ array.push("disabled");
6640
+ }
6641
+ if (this.href || this.to) {
6642
+ array.push("haslink");
6643
+ }
6644
+ return array;
6645
+ },
6646
+ element() {
6647
+ if (this.nuxtMode) {
6648
+ return "a";
6649
+ }
6650
+ if (this.buildMode) {
6651
+ return "a";
6652
+ }
6653
+ if (this.to) {
6654
+ return `router-link`;
6655
+ }
6656
+ return "a";
6504
6657
  }
6505
6658
  }
6506
6659
  };
6507
- const _withScopeId$5 = (n2) => (pushScopeId("data-v-61cbf45e"), n2 = n2(), popScopeId(), n2);
6508
- const _hoisted_1$E = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("label", null, "From Date", -1));
6509
- const _hoisted_2$B = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("label", null, "To Date", -1));
6510
- function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
6511
- const _component_flex_cell = resolveComponent("flex-cell");
6512
- const _component_flex_row = resolveComponent("flex-row");
6513
- return openBlock(), createElementBlock("div", null, [
6514
- createVNode(_component_flex_row, {
6515
- wrap: "",
6516
- gap: "",
6517
- vcenter: ""
6518
- }, {
6519
- default: withCtx(() => [
6520
- createVNode(_component_flex_cell, { class: "cell" }, {
6521
- default: withCtx(() => [
6522
- createElementVNode("div", null, [
6523
- _hoisted_1$E,
6524
- withDirectives(createElementVNode("input", {
6525
- type: "date",
6526
- class: "ux-field-focus ux-text-input-multiple",
6527
- ref: "input",
6528
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.startDate = $event)
6529
- }, null, 512), [
6530
- [vModelText, $options.startDate]
6531
- ])
6532
- ])
6533
- ]),
6534
- _: 1
6535
- }),
6536
- createVNode(_component_flex_cell, { class: "cell" }, {
6537
- default: withCtx(() => [
6538
- createElementVNode("div", null, [
6539
- _hoisted_2$B,
6540
- withDirectives(createElementVNode("input", {
6541
- type: "date",
6542
- class: "ux-field-focus ux-text-input-multiple",
6543
- ref: "input",
6544
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $options.endDate = $event)
6545
- }, null, 512), [
6546
- [vModelText, $options.endDate]
6547
- ])
6548
- ])
6549
- ]),
6550
- _: 1
6551
- })
6552
- ]),
6553
- _: 1
6554
- })
6555
- ]);
6556
- }
6557
- var Daterange = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$N], ["__scopeId", "data-v-61cbf45e"]]);
6558
- var safeJsonStringify$1 = { exports: {} };
6559
- var hasProp = Object.prototype.hasOwnProperty;
6560
- function throwsMessage(err) {
6561
- return "[Throws: " + (err ? err.message : "?") + "]";
6562
- }
6563
- function safeGetValueFromPropertyOnObject(obj, property) {
6564
- if (hasProp.call(obj, property)) {
6565
- try {
6566
- return obj[property];
6567
- } catch (err) {
6568
- return throwsMessage(err);
6569
- }
6570
- }
6571
- return obj[property];
6660
+ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
6661
+ return openBlock(), createBlock(resolveDynamicComponent($options.element), {
6662
+ onClick: $options.clicked,
6663
+ to: $props.to,
6664
+ href: $options.actualHref,
6665
+ target: $props.target,
6666
+ class: normalizeClass([$options.class, "ux-link"])
6667
+ }, {
6668
+ default: withCtx(() => [
6669
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
6670
+ ]),
6671
+ _: 3
6672
+ }, 8, ["onClick", "to", "href", "target", "class"]);
6572
6673
  }
6573
- function ensureProperties(obj) {
6574
- var seen = [];
6575
- function visit(obj2) {
6576
- if (obj2 === null || typeof obj2 !== "object") {
6577
- return obj2;
6578
- }
6579
- if (seen.indexOf(obj2) !== -1) {
6580
- return "[Circular]";
6674
+ var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$U], ["__scopeId", "data-v-8b82829a"]]);
6675
+ var icon_vue_vue_type_style_index_0_scoped_true_lang = "";
6676
+ const _sfc_main$T = {
6677
+ props: {
6678
+ icon: {
6679
+ type: [Object, String]
6680
+ },
6681
+ spin: {
6682
+ type: Boolean
6683
+ },
6684
+ left: {
6685
+ type: Boolean
6686
+ },
6687
+ right: {
6688
+ type: Boolean
6581
6689
  }
6582
- seen.push(obj2);
6583
- if (typeof obj2.toJSON === "function") {
6584
- try {
6585
- var fResult = visit(obj2.toJSON());
6586
- seen.pop();
6587
- return fResult;
6588
- } catch (err) {
6589
- return throwsMessage(err);
6690
+ },
6691
+ computed: {
6692
+ classes() {
6693
+ var array = [];
6694
+ array.push(this.icon);
6695
+ if (this.spin) {
6696
+ array.push(`fa-spin`);
6590
6697
  }
6698
+ if (this.left) {
6699
+ array.push("ux-icon-left");
6700
+ }
6701
+ if (this.right) {
6702
+ array.push("ux-icon-right");
6703
+ }
6704
+ return array;
6705
+ },
6706
+ element() {
6707
+ return "i";
6591
6708
  }
6592
- if (Array.isArray(obj2)) {
6593
- var aResult = obj2.map(visit);
6594
- seen.pop();
6595
- return aResult;
6596
- }
6597
- var result = Object.keys(obj2).reduce(function(result2, prop) {
6598
- result2[prop] = visit(safeGetValueFromPropertyOnObject(obj2, prop));
6599
- return result2;
6600
- }, {});
6601
- seen.pop();
6602
- return result;
6603
6709
  }
6604
- return visit(obj);
6605
- }
6606
- safeJsonStringify$1.exports = function(data, replacer, space) {
6607
- return JSON.stringify(ensureProperties(data), replacer, space);
6608
6710
  };
6609
- safeJsonStringify$1.exports.ensureProperties = ensureProperties;
6610
- var safeJsonStringify = safeJsonStringify$1.exports;
6611
- function isUndefined$6(v, type) {
6612
- return v === void 0 || v === null || type == "date" && v.toString && v.toString() === "Invalid Date";
6613
- }
6614
- function isNotEmpty(value) {
6615
- return value !== void 0 && value !== null;
6711
+ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
6712
+ return openBlock(), createBlock(resolveDynamicComponent($options.element), {
6713
+ class: normalizeClass(["ux-icon fa", $options.classes])
6714
+ }, null, 8, ["class"]);
6616
6715
  }
6617
- var InputMixin = {
6716
+ var UXIcon = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$T], ["__scopeId", "data-v-1764a3d0"]]);
6717
+ var UXMenuService = {
6718
+ cache: {}
6719
+ };
6720
+ var menu_vue_vue_type_style_index_0_scoped_true_lang = "";
6721
+ const _sfc_main$S = {
6618
6722
  props: {
6619
- field: {
6620
- type: Object,
6723
+ group: {
6724
+ type: String
6725
+ },
6726
+ right: {
6727
+ type: Boolean,
6728
+ default: false
6729
+ },
6730
+ bottom: {
6731
+ type: Boolean,
6732
+ default: false
6733
+ },
6734
+ stop: {
6735
+ type: Boolean,
6736
+ default: false
6737
+ },
6738
+ closeOnClick: {
6739
+ type: Boolean,
6621
6740
  default() {
6622
- return {};
6741
+ return true;
6623
6742
  }
6624
6743
  },
6625
- parentModel: {
6626
- type: Object
6744
+ modelValue: {
6745
+ type: Boolean,
6746
+ default() {
6747
+ return false;
6748
+ }
6627
6749
  }
6628
6750
  },
6629
6751
  data() {
6630
6752
  return {
6631
- value: this.modelValue
6753
+ outerStyle: {},
6754
+ innerStyle: {},
6755
+ isExpanded: this.modelValue,
6756
+ triggerEvent: null,
6757
+ refMenu: null,
6758
+ mounted: false
6632
6759
  };
6633
6760
  },
6634
6761
  watch: {
6635
- modelValue(val, old) {
6636
- var cleanedValue = this.cleanInput(val);
6637
- var cleanedModel = this.cleanInput(this.model);
6638
- if (safeJsonStringify(cleanedValue) != safeJsonStringify(cleanedModel)) {
6639
- this.model = cleanedValue;
6640
- }
6762
+ modelValue(m) {
6763
+ this.expanded = m;
6641
6764
  }
6642
6765
  },
6643
6766
  mounted() {
6644
- this.checkAutofocus();
6767
+ this.refMenu = this.$refs.menu;
6768
+ this.mounted = true;
6645
6769
  },
6646
- inject: ["form", "fieldPath"],
6647
- computed: {
6648
- optionLookup() {
6649
- var self2 = this;
6650
- return self2.options.reduce(function(set, option2) {
6651
- const key = self2.getValue(option2);
6652
- set[key] = option2;
6653
- return set;
6654
- }, {});
6655
- },
6656
- selectableOptions() {
6657
- return this.options;
6658
- },
6659
- required() {
6660
- return this.minimum;
6770
+ beforeUnmount() {
6771
+ this.removeListeners();
6772
+ this.refMenu = null;
6773
+ this.mounted = false;
6774
+ if (UXMenuService.cache[this.group] === this) {
6775
+ UXMenuService.cache[this.group] = null;
6776
+ }
6777
+ },
6778
+ methods: {
6779
+ removeListeners() {
6780
+ document.removeEventListener("click", this.globalClick);
6781
+ if (this.refMenu) {
6782
+ this.refMenu.removeEventListener("click", this.immediateClick);
6783
+ }
6661
6784
  },
6662
- model: {
6663
- get() {
6664
- var cleaned = this.cleanOutput(this.value);
6665
- return cleaned;
6666
- },
6667
- set(val) {
6668
- this.value = this.cleanInput(val);
6669
- this.checkAutofocus();
6670
- this.dispatch();
6785
+ addEventListeners() {
6786
+ document.addEventListener("click", this.globalClick);
6787
+ if (this.refMenu) {
6788
+ this.refMenu.addEventListener("click", this.immediateClick);
6671
6789
  }
6672
6790
  },
6673
- options() {
6674
- var self2 = this;
6675
- return (this.field.options || []).reduce(function(set, option2) {
6676
- if (!option2) {
6677
- return set;
6678
- }
6679
- const value = self2.getValue(option2);
6680
- const title = option2.title || option2.name || option2.label || value;
6681
- var output = {
6682
- title,
6683
- value,
6684
- source: option2
6685
- };
6686
- if (self2.field.type == "reference") {
6687
- output._id = value;
6791
+ immediateClick(event) {
6792
+ if (this.expanded) {
6793
+ if (this.closeOnClick) {
6794
+ event.stopImmediatePropagation();
6795
+ this.expanded = false;
6688
6796
  }
6689
- set.push(output);
6690
- return set;
6691
- }, []);
6692
- },
6693
- prefix() {
6694
- return this.field.suffix;
6695
- },
6696
- suffix() {
6697
- return this.field.suffix;
6698
- },
6699
- type() {
6700
- return this.field.type || "string";
6701
- },
6702
- key() {
6703
- return this.field.key;
6797
+ }
6704
6798
  },
6705
- isGroup() {
6706
- return this.type === "group";
6799
+ globalClick(event) {
6800
+ if (this.triggerEvent === event) {
6801
+ return;
6802
+ }
6803
+ var parentElement = this.$refs.menu;
6804
+ var childElement = event.srcElement;
6805
+ if (parentElement && parentElement.contains(childElement)) {
6806
+ if (this.closeOnClick) {
6807
+ this.expanded = false;
6808
+ }
6809
+ } else {
6810
+ this.expanded = false;
6811
+ }
6707
6812
  },
6708
- asObject() {
6709
- return this.isGroup && !!this.field.asObject;
6813
+ position() {
6814
+ const rect = this.$el.getBoundingClientRect();
6815
+ this.outerStyle.left = `${rect.left + window.scrollX}px`;
6816
+ this.outerStyle.top = `${rect.bottom + window.scrollY}px`;
6817
+ if (this.right) {
6818
+ this.innerStyle.right = `-${rect.width}px`;
6819
+ }
6820
+ if (this.bottom) {
6821
+ this.innerStyle.bottom = `${rect.height}px`;
6822
+ }
6823
+ var zIndex = this.getMaxZIndex();
6824
+ this.outerStyle.zIndex = zIndex;
6710
6825
  },
6711
- layoutGroup() {
6712
- return this.isGroup && !this.field.asObject;
6826
+ getMaxZIndex() {
6827
+ return Math.max(...Array.from(document.querySelectorAll("body *"), (el) => parseFloat(window.getComputedStyle(el).zIndex)).filter((zIndex) => !Number.isNaN(zIndex)), 0);
6713
6828
  },
6714
- canAddValue() {
6715
- if (this.singleValue) {
6716
- return;
6829
+ close() {
6830
+ this.expanded = false;
6831
+ }
6832
+ },
6833
+ computed: {
6834
+ expanded: {
6835
+ get() {
6836
+ return this.isExpanded;
6837
+ },
6838
+ set(v) {
6839
+ var previousActivatedEntity;
6840
+ if (this.group) {
6841
+ previousActivatedEntity = UXMenuService.cache[this.group];
6842
+ }
6843
+ if (this.isExpanded != v) {
6844
+ this.isExpanded = v;
6845
+ if (v) {
6846
+ this.position();
6847
+ this.addEventListeners();
6848
+ UXMenuService.cache[this.group] = this;
6849
+ if (previousActivatedEntity && previousActivatedEntity != this) {
6850
+ previousActivatedEntity.expanded = false;
6851
+ }
6852
+ } else {
6853
+ this.removeListeners();
6854
+ }
6855
+ this.$emit("update:modelValue", v);
6856
+ }
6717
6857
  }
6718
- return this.maximum === 0 || this.numValues < this.maximum;
6719
- },
6720
- canRemoveValue() {
6721
- return this.numValues > this.minimum;
6722
- },
6723
- widget() {
6724
- return this.field.widget;
6725
6858
  },
6726
- singleValue() {
6727
- if (this.asObject) {
6728
- var isSingle = this.minimum === 1 && this.maximum === 1;
6729
- return isSingle;
6730
- } else {
6731
- return this.maximum === 1;
6859
+ on() {
6860
+ var self2 = this;
6861
+ return {
6862
+ click(event) {
6863
+ if (self2.stop) {
6864
+ event.stopImmediatePropagation();
6865
+ }
6866
+ self2.triggerEvent = event;
6867
+ self2.expanded = !self2.expanded;
6868
+ }
6869
+ };
6870
+ }
6871
+ }
6872
+ };
6873
+ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
6874
+ return openBlock(), createElementBlock("div", {
6875
+ class: normalizeClass(["ux-menu", { right: $props.right }])
6876
+ }, [
6877
+ createElementVNode("span", null, [
6878
+ renderSlot(_ctx.$slots, "activator", { on: $options.on }, void 0, true)
6879
+ ]),
6880
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
6881
+ $data.isExpanded ? (openBlock(), createElementBlock("div", {
6882
+ key: 0,
6883
+ class: "ux-menu-outer",
6884
+ style: normalizeStyle($data.outerStyle)
6885
+ }, [
6886
+ createElementVNode("div", {
6887
+ class: "ux-menu-panel",
6888
+ ref: "menu",
6889
+ style: normalizeStyle($data.innerStyle)
6890
+ }, [
6891
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
6892
+ ], 4)
6893
+ ], 4)) : createCommentVNode("", true)
6894
+ ]))
6895
+ ], 2);
6896
+ }
6897
+ var UXMenu = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$S], ["__scopeId", "data-v-29d476a2"]]);
6898
+ const _sfc_main$R = {
6899
+ name: "menulist",
6900
+ props: {
6901
+ items: {
6902
+ type: Array,
6903
+ default() {
6904
+ return [];
6732
6905
  }
6733
6906
  },
6734
- multiValue() {
6735
- return !this.singleValue;
6736
- },
6737
- label() {
6738
- return this.field.title;
6739
- },
6740
- title() {
6741
- return this.label;
6907
+ expandOn: {
6908
+ type: String,
6909
+ default: "none"
6910
+ }
6911
+ },
6912
+ computed: {
6913
+ filteredItems() {
6914
+ return this.items.filter(function(item) {
6915
+ return !item.disabled;
6916
+ });
6917
+ }
6918
+ },
6919
+ methods: {
6920
+ toggle(item) {
6921
+ item.expanded = !item.expanded;
6922
+ item.collapsed = !item.expanded;
6923
+ }
6924
+ },
6925
+ data() {
6926
+ return {};
6927
+ }
6928
+ };
6929
+ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
6930
+ const _component_ux_link = resolveComponent("ux-link");
6931
+ const _component_menulist = resolveComponent("menulist", true);
6932
+ return openBlock(), createElementBlock("ul", null, [
6933
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.filteredItems, (item) => {
6934
+ var _a;
6935
+ return openBlock(), createElementBlock("li", {
6936
+ class: normalizeClass({ expanded: item.expanded, collapsed: item.collapsed })
6937
+ }, [
6938
+ $props.expandOn === "click" && ((_a = item.items) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_ux_link, {
6939
+ key: 0,
6940
+ onClick: withModifiers(($event) => $options.toggle(item), ["stop", "prevent"]),
6941
+ class: normalizeClass(item.class)
6942
+ }, {
6943
+ default: withCtx(() => [
6944
+ createTextVNode(toDisplayString(item.title), 1)
6945
+ ]),
6946
+ _: 2
6947
+ }, 1032, ["onClick", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6948
+ item.type === "url" ? (openBlock(), createBlock(_component_ux_link, {
6949
+ key: 0,
6950
+ class: normalizeClass(item.class),
6951
+ target: item.target,
6952
+ href: item.href || item.url
6953
+ }, {
6954
+ default: withCtx(() => [
6955
+ createTextVNode(toDisplayString(item.title), 1)
6956
+ ]),
6957
+ _: 2
6958
+ }, 1032, ["class", "target", "href"])) : item.type === "route" ? (openBlock(), createBlock(_component_ux_link, {
6959
+ key: 1,
6960
+ class: normalizeClass(item.class),
6961
+ to: { name: item.route }
6962
+ }, {
6963
+ default: withCtx(() => [
6964
+ createTextVNode(toDisplayString(item.title), 1)
6965
+ ]),
6966
+ _: 2
6967
+ }, 1032, ["class", "to"])) : createCommentVNode("", true)
6968
+ ], 64)),
6969
+ item.items && item.items.length ? (openBlock(), createBlock(_component_menulist, {
6970
+ key: 2,
6971
+ items: item.items
6972
+ }, null, 8, ["items"])) : createCommentVNode("", true)
6973
+ ], 2);
6974
+ }), 256))
6975
+ ]);
6976
+ }
6977
+ var UXMenuList = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R]]);
6978
+ var image_vue_vue_type_style_index_0_scoped_true_lang = "";
6979
+ const _sfc_main$Q = {
6980
+ props: {
6981
+ item: {
6982
+ type: Object
6742
6983
  },
6743
- plural() {
6744
- return this.field.plural;
6984
+ alt: {
6985
+ type: String
6745
6986
  },
6746
- description() {
6747
- return this.field.description;
6987
+ width: {
6988
+ type: Number
6748
6989
  },
6749
- placeholder() {
6750
- return this.field.placeholder || this.field.hint;
6990
+ height: {
6991
+ type: Number
6751
6992
  },
6752
- addLabel() {
6753
- if (this.numValues) {
6754
- return `Add another ${this.label}`;
6755
- } else {
6756
- return `Add ${this.label}`;
6757
- }
6993
+ inline: {
6994
+ type: Boolean
6758
6995
  },
6759
- removeLabel() {
6760
- return `Remove`;
6996
+ quality: {
6997
+ type: Number
6761
6998
  },
6762
- numValues() {
6763
- if (this.singleValue) {
6764
- return 1;
6765
- }
6766
- return (this.value || []).length || 0;
6999
+ contain: {
7000
+ type: Boolean,
7001
+ default: true
6767
7002
  },
6768
- showLabel() {
6769
- return this.field.title;
7003
+ preview: {
7004
+ type: Boolean,
7005
+ default: false
6770
7006
  },
6771
- showDescription() {
6772
- return this.description;
7007
+ crop: {
7008
+ type: Boolean
6773
7009
  },
6774
- fields() {
6775
- var subFields = this.field.fields;
6776
- if (subFields && subFields.length) {
6777
- return subFields;
6778
- }
7010
+ format: {
7011
+ type: String
6779
7012
  },
6780
- minimum() {
6781
- if (this.layoutGroup) {
6782
- return 1;
6783
- }
6784
- var int2 = parseInt(this.field.minimum || 0);
6785
- if (isNaN(int2)) {
6786
- int2 = 0;
6787
- }
6788
- int2 = Math.max(int2, 0);
6789
- int2 = this.maximum ? Math.min(int2, this.maximum) : int2;
6790
- return parseInt(int2);
7013
+ upscale: {
7014
+ type: Boolean,
7015
+ default: true
6791
7016
  },
6792
- maximum() {
6793
- if (this.layoutGroup) {
6794
- return 1;
6795
- }
6796
- var int2 = parseInt(this.field.maximum || 0);
6797
- if (isNaN(int2)) {
6798
- int2 = 0;
6799
- }
6800
- int2 = Math.max(int2, 0);
6801
- return parseInt(int2);
7017
+ type: {
7018
+ type: String,
7019
+ default: "image"
6802
7020
  },
6803
- ask() {
6804
- var int2 = parseInt(this.field.ask);
6805
- int2 = Math.max(int2, this.minimum);
6806
- if (this.maximum) {
6807
- int2 = Math.min(int2, this.maximum);
6808
- }
6809
- return int2;
7021
+ svg: {
7022
+ type: Boolean
6810
7023
  }
6811
7024
  },
6812
- methods: {
6813
- cleanTextInput(val, type, instance) {
6814
- switch (type) {
6815
- case "url":
6816
- val = instance.$sdk.utils.parseURL(val);
6817
- break;
6818
- case "key":
6819
- val = String(instance.$sdk.utils.machineName(val)).trim();
6820
- break;
6821
- case "integer":
6822
- val = parseInt(String(val).replace(/[^0-9-]/g, ""));
6823
- if (isNaN(val)) {
6824
- val = void 0;
6825
- }
6826
- break;
6827
- case "number":
6828
- case "decimal":
6829
- case "float":
6830
- val = Number(String(val).replace(/[^0-9.-]/g, ""));
6831
- if (isNaN(val)) {
6832
- val = void 0;
6833
- }
6834
- break;
6835
- }
6836
- return val;
7025
+ data() {
7026
+ return {
7027
+ model: this.item
7028
+ };
7029
+ },
7030
+ computed: {
7031
+ altText() {
7032
+ return this.alt || this.model.title;
6837
7033
  },
6838
- checkAutofocus() {
6839
- if (this.field.autofocus) {
6840
- if (this.value) {
6841
- return;
6842
- }
6843
- this.$nextTick(function() {
6844
- this.refocus();
6845
- });
7034
+ className() {
7035
+ var classes = [];
7036
+ if (this.portrait) {
7037
+ classes.push("img-portrait");
6846
7038
  }
7039
+ return classes.join(" ");
6847
7040
  },
6848
- getValue(option2) {
6849
- if (!option2) {
6850
- return this.cleanTextInput(option2);
7041
+ isSvg() {
7042
+ var _a;
7043
+ if (this.svg) {
7044
+ return true;
6851
7045
  }
6852
- var value = this.cleanTextInput(option2._id || option2.value);
6853
- var hasValue = isNotEmpty(value);
6854
- if (!hasValue && option2.title && !this.returnObject) {
6855
- value = option2.title;
7046
+ switch ((_a = this.item) == null ? void 0 : _a.fileMime) {
7047
+ case "image/svg+xml":
7048
+ case "image/svg":
7049
+ return true;
6856
7050
  }
6857
- value = this.cleanTextInput(value);
6858
- return isNotEmpty(value) ? value : option2;
6859
7051
  },
6860
- getLabel(option2) {
6861
- if (!option2) {
6862
- return;
7052
+ portrait() {
7053
+ return this.crop ? this.dimensionHeight > this.dimensionWidth : this.modelHeight > this.modelWidth;
7054
+ },
7055
+ imageWidth() {
7056
+ return parseInt(this.width);
7057
+ },
7058
+ imageHeight() {
7059
+ return parseInt(this.height);
7060
+ },
7061
+ modelWidth() {
7062
+ var _a;
7063
+ return parseInt((_a = this.model) == null ? void 0 : _a.width);
7064
+ },
7065
+ modelHeight() {
7066
+ var _a;
7067
+ return parseInt((_a = this.model) == null ? void 0 : _a.height);
7068
+ },
7069
+ id() {
7070
+ return this.$sdk.utils.id(this.model);
7071
+ },
7072
+ params() {
7073
+ var params = {};
7074
+ params.access_token = this.$sdk.auth.getCurrentToken();
7075
+ if (this.imageWidth) {
7076
+ params.w = this.imageWidth ? this.imageWidth : null;
6863
7077
  }
6864
- var label = option2.title || option2.name || option2.label;
6865
- if (typeof label == "object") {
6866
- return "(no title)";
7078
+ if (this.imageHeight) {
7079
+ params.h = this.imageHeight ? this.imageHeight : null;
7080
+ }
7081
+ if (this.crop) {
7082
+ params.c = true;
6867
7083
  } else {
6868
- return label;
7084
+ if (!this.contain) {
7085
+ params.c = this.imageWidth && this.imageHeight;
7086
+ }
7087
+ }
7088
+ if (this.quality) {
7089
+ params.q = parseInt(this.quality);
7090
+ }
7091
+ if (this.upscale) {
7092
+ params.u = true;
6869
7093
  }
7094
+ if (this.format) {
7095
+ params.f = this.format;
7096
+ }
7097
+ return params;
6870
7098
  },
6871
- touch() {
6872
- this.$emit("touched");
7099
+ src() {
7100
+ return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, this.params, { file: true });
6873
7101
  },
6874
- getNewDefaultEntry() {
6875
- return void 0;
7102
+ previewSrc() {
7103
+ var params = Object.assign({}, this.params);
7104
+ params.w = 50;
7105
+ delete params.h;
7106
+ return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, params, { file: true });
6876
7107
  },
6877
- add() {
6878
- if (!this.canAddValue) {
6879
- return;
7108
+ imageStyle() {
7109
+ var style = {};
7110
+ if (!this.crop) {
7111
+ style["object-fit"] = "contain";
6880
7112
  }
6881
- var defaultEntry = this.cleanInputValue(this.getNewDefaultEntry());
6882
- if (!this.value || !Array.isArray(this.value)) {
6883
- this.value = [];
7113
+ if (this.inline) {
7114
+ style.maxWidth = "100%";
7115
+ } else {
7116
+ style.width = "100%";
7117
+ style.height = "100%";
7118
+ style.top = `0`;
7119
+ style.left = `0`;
7120
+ style.position = "absolute";
6884
7121
  }
6885
- this.value.push(defaultEntry);
6886
- this.dispatch();
6887
- this.$nextTick(function() {
6888
- this.refocus();
6889
- });
6890
- this.touch();
6891
- },
6892
- remove(entry) {
6893
- var index2 = this.model.indexOf(entry);
6894
- this.value.splice(index2, 1);
6895
- this.dispatch();
6896
- this.touch();
6897
- },
6898
- dispatch() {
6899
- this.$emit("update:modelValue", this.value);
7122
+ return style;
6900
7123
  },
6901
- cleanInputValue(val) {
6902
- return val;
7124
+ dimensionWidth() {
7125
+ return this.imageWidth && this.imageHeight ? this.imageWidth : this.modelWidth;
6903
7126
  },
6904
- cleanOutputValue(val) {
6905
- return val;
7127
+ dimensionHeight() {
7128
+ return this.imageWidth && this.imageHeight ? this.imageHeight : this.modelHeight;
6906
7129
  },
6907
- cleanOutput(val) {
6908
- var self2 = this;
6909
- if (isUndefined$6(val, self2.field.type)) {
6910
- if (self2.multiValue) {
6911
- val = [];
6912
- } else {
6913
- val = void 0;
6914
- }
7130
+ style() {
7131
+ var _a, _b, _c;
7132
+ var style = {};
7133
+ if (this.inline) {
7134
+ style.display = "inline-block";
6915
7135
  } else {
6916
- if (self2.multiValue) {
6917
- if (!Array.isArray(val)) {
6918
- val = [];
6919
- }
6920
- val.forEach(function(v, i2) {
6921
- val[i2] = self2.cleanOutputValue(v);
6922
- });
6923
- } else {
6924
- val = self2.cleanOutputValue(val);
7136
+ if (this.dimensionHeight && this.dimensionWidth) {
7137
+ style.height = 0;
7138
+ style.overflow = "hidden";
7139
+ style.paddingBottom = `${this.dimensionHeight / this.dimensionWidth * 100}%`;
7140
+ style.position = "relative";
6925
7141
  }
6926
7142
  }
6927
- return val;
6928
- },
6929
- cleanInput(val) {
6930
- var self2 = this;
6931
- if (self2.multiValue) {
6932
- if (!val) {
6933
- val = [];
6934
- }
6935
- if (!Array.isArray(val)) {
6936
- val = [val];
6937
- }
6938
- if (self2.maximum) {
6939
- if (val.length > self2.maximum) {
6940
- val.length = self2.maximum;
6941
- }
6942
- }
6943
- while (val.length < self2.minimum) {
6944
- val.push(self2.cleanInputValue(self2.getNewDefaultEntry()));
6945
- }
6946
- val = val.map(function(v) {
6947
- var d = self2.cleanInputValue(v);
6948
- return d;
6949
- });
6950
- } else {
6951
- if (val) {
6952
- val = self2.cleanInputValue(val);
7143
+ var colors = (_c = (_b = (_a = this.model) == null ? void 0 : _a.fileMeta) == null ? void 0 : _b.colors) == null ? void 0 : _c.colors;
7144
+ if (colors && colors.length) {
7145
+ style.backgroundColor = colors[0];
7146
+ }
7147
+ if (this.isSvg)
7148
+ ;
7149
+ else {
7150
+ if (this.preview) {
7151
+ style.backgroundImage = `url(${this.previewSrc})`;
6953
7152
  }
6954
7153
  }
6955
- return val;
6956
- },
6957
- refocus() {
6958
- var elements = this.$refs.input;
6959
- if (!elements) {
6960
- return;
7154
+ return style;
7155
+ }
7156
+ }
7157
+ };
7158
+ const _hoisted_1$H = ["alt", "data"];
7159
+ const _hoisted_2$C = ["alt", "src"];
7160
+ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
7161
+ return openBlock(), createElementBlock("div", {
7162
+ class: normalizeClass(["ux-image", $options.className]),
7163
+ style: normalizeStyle($options.style)
7164
+ }, [
7165
+ $props.svg ? (openBlock(), createElementBlock("object", {
7166
+ key: 0,
7167
+ alt: $options.altText,
7168
+ type: "image/svg+xml",
7169
+ data: $options.src
7170
+ }, null, 8, _hoisted_1$H)) : (openBlock(), createElementBlock("img", {
7171
+ key: 1,
7172
+ alt: $options.altText,
7173
+ style: normalizeStyle($options.imageStyle),
7174
+ src: $options.src
7175
+ }, null, 12, _hoisted_2$C))
7176
+ ], 6);
7177
+ }
7178
+ var UXImage = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$Q], ["__scopeId", "data-v-a7872864"]]);
7179
+ var progressbar_vue_vue_type_style_index_0_scoped_true_lang = "";
7180
+ const _sfc_main$P = {
7181
+ props: {
7182
+ value: {
7183
+ type: Number
7184
+ }
7185
+ },
7186
+ computed: {
7187
+ classes() {
7188
+ var array = [];
7189
+ array.push(this.icon);
7190
+ if (this.spin) {
7191
+ array.push(`fa-spin`);
6961
7192
  }
6962
- var input;
6963
- if (Array.isArray(elements)) {
6964
- input = elements[elements.length - 1];
6965
- } else {
6966
- input = elements;
7193
+ if (this.left) {
7194
+ array.push("ux-icon-left");
6967
7195
  }
6968
- if (input) {
6969
- input.focus();
7196
+ if (this.right) {
7197
+ array.push("ux-icon-right");
6970
7198
  }
7199
+ return array;
7200
+ },
7201
+ percent() {
7202
+ return this.value;
7203
+ },
7204
+ barStyle() {
7205
+ return {
7206
+ width: `${this.percent}%`
7207
+ };
7208
+ },
7209
+ element() {
7210
+ return "i";
6971
7211
  }
6972
7212
  }
6973
7213
  };
6974
- var select_vue_vue_type_style_index_0_scoped_true_lang = "";
6975
- function isUndefined$5(entry) {
6976
- return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
7214
+ const _withScopeId$6 = (n2) => (pushScopeId("data-v-317a7690"), n2 = n2(), popScopeId(), n2);
7215
+ const _hoisted_1$G = { class: "ux-progress" };
7216
+ const _hoisted_2$B = /* @__PURE__ */ _withScopeId$6(() => /* @__PURE__ */ createElementVNode("div", { class: "ux-progress-bg" }, null, -1));
7217
+ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
7218
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
7219
+ _hoisted_2$B,
7220
+ createElementVNode("div", {
7221
+ class: "ux-progress-fg",
7222
+ style: normalizeStyle($options.barStyle)
7223
+ }, null, 4)
7224
+ ]);
7225
+ }
7226
+ var ProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$P], ["__scopeId", "data-v-317a7690"]]);
7227
+ var list_vue_vue_type_style_index_0_scoped_true_lang = "";
7228
+ const _sfc_main$O = {};
7229
+ const _hoisted_1$F = { class: "ux-list" };
7230
+ function _sfc_render$O(_ctx, _cache) {
7231
+ return openBlock(), createElementBlock("ul", _hoisted_1$F, [
7232
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
7233
+ ]);
7234
+ }
7235
+ var UXList = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O], ["__scopeId", "data-v-98e1e4e2"]]);
7236
+ var listItem_vue_vue_type_style_index_0_scoped_true_lang = "";
7237
+ const _sfc_main$N = {};
7238
+ const _hoisted_1$E = { class: "ux-list-item" };
7239
+ function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
7240
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
7241
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
7242
+ ]);
7243
+ }
7244
+ var UXListItem = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$N], ["__scopeId", "data-v-0e73c260"]]);
7245
+ var daterange_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
7246
+ function checkDate(d) {
7247
+ var date = new Date(d);
7248
+ if (date instanceof Date && !isNaN(date)) {
7249
+ return date;
7250
+ }
7251
+ return;
6977
7252
  }
6978
7253
  const _sfc_main$M = {
6979
7254
  props: {
6980
- title: {
6981
- type: String
6982
- },
6983
- modelValue: {}
7255
+ modelValue: {
7256
+ type: Object
7257
+ }
6984
7258
  },
6985
- mixins: [InputMixin],
6986
- created() {
6987
- this.model = this.model;
7259
+ data() {
7260
+ return {
7261
+ model: this.modelValue
7262
+ };
6988
7263
  },
6989
- methods: {
6990
- cleanOutput(val) {
6991
- var self2 = this;
6992
- if (isUndefined$5(val)) {
6993
- if (self2.multiValue) {
6994
- val = [];
6995
- } else {
6996
- val = void 0;
6997
- }
6998
- } else {
6999
- if (self2.multiValue) {
7000
- val = (val || []).filter(function(i2) {
7001
- return i2 !== void 0 && i2 !== null;
7002
- }).map(function(i2) {
7003
- return self2.getValue(i2);
7004
- });
7264
+ computed: {
7265
+ startDate: {
7266
+ get() {
7267
+ var _a;
7268
+ return (_a = checkDate(this.model.startDate)) == null ? void 0 : _a.toISOString().slice(0, 10);
7269
+ },
7270
+ set(d) {
7271
+ d = checkDate(d);
7272
+ if (d) {
7273
+ this.model.startDate = d;
7005
7274
  } else {
7006
- val = self2.getValue(val);
7275
+ this.model.startDate = void 0;
7007
7276
  }
7008
7277
  }
7009
- return val;
7010
7278
  },
7011
- cleanInput(val) {
7012
- var self2 = this;
7013
- if (self2.multiValue) {
7014
- if (!val) {
7015
- val = [];
7016
- }
7017
- if (!Array.isArray(val)) {
7018
- val = [val];
7019
- }
7020
- if (self2.maximum) {
7021
- if (val.length > self2.maximum) {
7022
- val.length = self2.maximum;
7023
- }
7024
- }
7025
- val = val.filter(function(v) {
7026
- return v !== void 0 && v !== null;
7027
- }).map(function(v) {
7028
- var valueKey2 = self2.getValue(v);
7029
- return self2.returnObject ? self2.optionLookup[valueKey2] : valueKey2;
7030
- });
7031
- } else {
7032
- var valueKey = self2.getValue(val);
7033
- val = self2.returnObject ? self2.optionLookup[valueKey] : valueKey;
7034
- switch (val) {
7035
- case "":
7036
- switch (self2.type) {
7037
- case "decimal":
7038
- case "float":
7039
- case "number":
7040
- case "integer":
7041
- val = void 0;
7042
- break;
7043
- }
7044
- break;
7279
+ endDate: {
7280
+ get() {
7281
+ var _a;
7282
+ return (_a = checkDate(this.model.endDate)) == null ? void 0 : _a.toISOString().slice(0, 10);
7283
+ },
7284
+ set(d) {
7285
+ d = checkDate(d);
7286
+ if (checkDate(d)) {
7287
+ this.model.endDate = d;
7288
+ } else {
7289
+ this.model.endDate = void 0;
7045
7290
  }
7046
7291
  }
7047
- return val;
7048
7292
  }
7049
7293
  },
7050
- computed: {
7051
- returnObject() {
7052
- return this.type == "reference";
7053
- },
7054
- classes() {
7055
- var array = [];
7056
- if (this.multiValue) {
7057
- array.push("multiple");
7058
- } else {
7059
- array.push("single");
7060
- }
7061
- return array;
7062
- },
7063
- optionLookup() {
7064
- var self2 = this;
7065
- return self2.options.reduce(function(set, option2) {
7066
- const key = self2.getValue(option2);
7067
- set[key] = option2;
7068
- return set;
7069
- }, {});
7070
- },
7071
- summary() {
7072
- return this.model ? this.getLabel(this.optionLookup[this.model]) : this.title || "Click to select";
7294
+ watch: {
7295
+ model(m) {
7296
+ this.$emit("updated:modelValue", m);
7073
7297
  },
7074
- selectableOptions() {
7075
- return this.options;
7298
+ modelValue(m) {
7299
+ this.model = m;
7076
7300
  }
7077
7301
  }
7078
7302
  };
7079
- const _hoisted_1$D = {
7080
- key: 0,
7081
- class: "ux-field-title"
7082
- };
7083
- const _hoisted_2$A = {
7084
- key: 0,
7085
- class: "ux-required-marker"
7086
- };
7087
- const _hoisted_3$x = {
7088
- key: 1,
7089
- class: "ux-field-description"
7090
- };
7091
- const _hoisted_4$u = {
7092
- key: 2,
7093
- class: "ui-select-button"
7094
- };
7095
- const _hoisted_5$n = ["multiple"];
7096
- const _hoisted_6$i = {
7097
- key: 0,
7098
- value: ""
7099
- };
7100
- const _hoisted_7$f = ["value"];
7303
+ const _withScopeId$5 = (n2) => (pushScopeId("data-v-61cbf45e"), n2 = n2(), popScopeId(), n2);
7304
+ const _hoisted_1$D = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("label", null, "From Date", -1));
7305
+ const _hoisted_2$A = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("label", null, "To Date", -1));
7101
7306
  function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
7102
- const _component_ux_button = resolveComponent("ux-button");
7103
- return openBlock(), createElementBlock("div", {
7104
- class: normalizeClass(["native-select", $options.classes])
7105
- }, [
7106
- _ctx.showLabel ? (openBlock(), createElementBlock("label", _hoisted_1$D, [
7107
- createTextVNode(toDisplayString(_ctx.label) + " ", 1),
7108
- _ctx.required ? (openBlock(), createElementBlock("span", _hoisted_2$A, "*")) : createCommentVNode("", true)
7109
- ])) : createCommentVNode("", true),
7110
- _ctx.showDescription ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
7111
- _ctx.singleValue ? (openBlock(), createElementBlock("div", _hoisted_4$u, [
7112
- renderSlot(_ctx.$slots, "default", {}, () => [
7113
- createVNode(_component_ux_button, { tag: "div" }, {
7307
+ const _component_flex_cell = resolveComponent("flex-cell");
7308
+ const _component_flex_row = resolveComponent("flex-row");
7309
+ return openBlock(), createElementBlock("div", null, [
7310
+ createVNode(_component_flex_row, {
7311
+ wrap: "",
7312
+ gap: "",
7313
+ vcenter: ""
7314
+ }, {
7315
+ default: withCtx(() => [
7316
+ createVNode(_component_flex_cell, { class: "cell" }, {
7114
7317
  default: withCtx(() => [
7115
- createTextVNode(toDisplayString($options.summary), 1)
7318
+ createElementVNode("div", null, [
7319
+ _hoisted_1$D,
7320
+ withDirectives(createElementVNode("input", {
7321
+ type: "date",
7322
+ class: "ux-field-focus ux-text-input-multiple",
7323
+ ref: "input",
7324
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.startDate = $event)
7325
+ }, null, 512), [
7326
+ [vModelText, $options.startDate]
7327
+ ])
7328
+ ])
7329
+ ]),
7330
+ _: 1
7331
+ }),
7332
+ createVNode(_component_flex_cell, { class: "cell" }, {
7333
+ default: withCtx(() => [
7334
+ createElementVNode("div", null, [
7335
+ _hoisted_2$A,
7336
+ withDirectives(createElementVNode("input", {
7337
+ type: "date",
7338
+ class: "ux-field-focus ux-text-input-multiple",
7339
+ ref: "input",
7340
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $options.endDate = $event)
7341
+ }, null, 512), [
7342
+ [vModelText, $options.endDate]
7343
+ ])
7344
+ ])
7116
7345
  ]),
7117
7346
  _: 1
7118
7347
  })
7119
- ], true)
7120
- ])) : createCommentVNode("", true),
7121
- withDirectives(createElementVNode("select", {
7122
- onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.touch && _ctx.touch(...args)),
7123
- multiple: _ctx.multiValue,
7124
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
7125
- }, [
7126
- _ctx.singleValue && !_ctx.minimum ? (openBlock(), createElementBlock("option", _hoisted_6$i, "None")) : createCommentVNode("", true),
7127
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.selectableOptions, (option2) => {
7128
- return openBlock(), createElementBlock("option", {
7129
- value: option2.value
7130
- }, toDisplayString(option2.title), 9, _hoisted_7$f);
7131
- }), 256))
7132
- ], 40, _hoisted_5$n), [
7133
- [vModelSelect, _ctx.model]
7134
- ])
7135
- ], 2);
7348
+ ]),
7349
+ _: 1
7350
+ })
7351
+ ]);
7136
7352
  }
7137
- var NativeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$M], ["__scopeId", "data-v-a06c20f2"]]);
7353
+ var Daterange = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$M], ["__scopeId", "data-v-61cbf45e"]]);
7138
7354
  var phoneNumberInput_vue_vue_type_style_index_0_scoped_true_lang = "";
7139
7355
  const _sfc_main$L = {
7140
7356
  props: {
@@ -12288,6 +12504,10 @@ const _sfc_main$z = {
12288
12504
  case "range":
12289
12505
  case "daterange":
12290
12506
  case "daterelative":
12507
+ case "integer":
12508
+ case "decimal":
12509
+ case "float":
12510
+ case "number":
12291
12511
  break;
12292
12512
  case "array":
12293
12513
  switch (this.fieldType) {
@@ -12389,12 +12609,22 @@ const _sfc_main$z = {
12389
12609
  ]
12390
12610
  };
12391
12611
  },
12612
+ inputPlaceholder() {
12613
+ switch (this.model.comparator) {
12614
+ case "valuesgreater":
12615
+ case "valuesgreaterequal":
12616
+ case "valueslesser":
12617
+ case "valueslesserequal":
12618
+ return "0";
12619
+ }
12620
+ return this.field.title;
12621
+ },
12392
12622
  dateField() {
12393
12623
  return {
12394
12624
  type: this.fieldType,
12395
12625
  maximum: 1,
12396
12626
  minimum: 1,
12397
- placeholder: this.field.title
12627
+ placeholder: this.inputPlaceholder
12398
12628
  };
12399
12629
  },
12400
12630
  multiOptionsField() {
@@ -12404,7 +12634,7 @@ const _sfc_main$z = {
12404
12634
  type: this.fieldType,
12405
12635
  maximum: 0,
12406
12636
  minimum: 1,
12407
- placeholder: this.field.title
12637
+ placeholder: this.inputPlaceholder
12408
12638
  };
12409
12639
  },
12410
12640
  singleOptionsField() {
@@ -12415,7 +12645,7 @@ const _sfc_main$z = {
12415
12645
  type: this.fieldType,
12416
12646
  maximum: 1,
12417
12647
  minimum: 0,
12418
- placeholder: this.field.title
12648
+ placeholder: this.inputPlaceholder
12419
12649
  };
12420
12650
  },
12421
12651
  normalField() {
@@ -12423,7 +12653,7 @@ const _sfc_main$z = {
12423
12653
  type: this.fieldType,
12424
12654
  maximum: 1,
12425
12655
  minimum: 1,
12426
- placeholder: this.field.title
12656
+ placeholder: this.inputPlaceholder
12427
12657
  };
12428
12658
  },
12429
12659
  arrayField() {
@@ -13260,7 +13490,9 @@ const _sfc_main$w = {
13260
13490
  },
13261
13491
  computed: {
13262
13492
  definitionTitle() {
13263
- return this.definition ? this.definition.title : "";
13493
+ const singular = this.definition ? this.definition.title : "";
13494
+ const plural = this.definition ? this.definition.plural : "";
13495
+ return plural || singular;
13264
13496
  }
13265
13497
  },
13266
13498
  methods: {
@@ -13355,7 +13587,7 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
13355
13587
  }, null, 8, ["definition", "modelValue"]))
13356
13588
  ], 64);
13357
13589
  }
13358
- var FilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$w], ["__scopeId", "data-v-4aae9a4a"]]);
13590
+ var FilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$w], ["__scopeId", "data-v-a43e06e8"]]);
13359
13591
  var switch_vue_vue_type_style_index_0_scoped_true_lang = "";
13360
13592
  const _sfc_main$v = {
13361
13593
  mixins: [InputMixin],
@@ -17790,7 +18022,7 @@ const _sfc_main$g = {
17790
18022
  },
17791
18023
  methods: {
17792
18024
  getFieldKey(field) {
17793
- const key = kebabCase_1(`${field.title}-${field.key}`);
18025
+ let key = kebabCase_1(`${field.title}-${field.key}`);
17794
18026
  if (field.incrementor) {
17795
18027
  key = `${key}-${field.incrementor}`;
17796
18028
  }
@@ -17991,7 +18223,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
17991
18223
  ], true)
17992
18224
  ], 2);
17993
18225
  }
17994
- var UXForm = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-d200c51c"]]);
18226
+ var UXForm = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-6f9751aa"]]);
17995
18227
  var submissionform_vue_vue_type_style_index_0_scoped_true_lang = "";
17996
18228
  const STATE_READY = "form.ready";
17997
18229
  const STATE_PROCESSING = "form.processing";
@@ -18284,7 +18516,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
18284
18516
  ])
18285
18517
  ]);
18286
18518
  }
18287
- var Search = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-303d6348"]]);
18519
+ var Search = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-17abf7d1"]]);
18288
18520
  var RenderMixin = {
18289
18521
  props: {
18290
18522
  field: {
@@ -18984,6 +19216,15 @@ const _sfc_main$a = {
18984
19216
  default() {
18985
19217
  return 0;
18986
19218
  }
19219
+ },
19220
+ page: {
19221
+ type: Object,
19222
+ default() {
19223
+ return {
19224
+ size: 50,
19225
+ index: 1
19226
+ };
19227
+ }
18987
19228
  }
18988
19229
  },
18989
19230
  components: {
@@ -18997,11 +19238,11 @@ const _sfc_main$a = {
18997
19238
  computed: {
18998
19239
  perPage: {
18999
19240
  get() {
19000
- return this.page.size;
19241
+ return this.pageModel.size;
19001
19242
  },
19002
19243
  set(i2) {
19003
19244
  i2 = Math.max(i2, 1);
19004
- this.page.size = i2;
19245
+ this.pageModel.size = i2;
19005
19246
  this.dispatch();
19006
19247
  }
19007
19248
  },
@@ -19017,31 +19258,31 @@ const _sfc_main$a = {
19017
19258
  return Math.ceil(this.total / this.perPage);
19018
19259
  },
19019
19260
  startIndex() {
19020
- return (this.currentPage - 1) * this.page.size;
19261
+ return (this.currentPage - 1) * this.pageModel.size;
19021
19262
  },
19022
19263
  displayStartIndex() {
19023
19264
  return this.total ? this.startIndex + 1 : 0;
19024
19265
  },
19025
19266
  endIndex() {
19026
- return Math.min(this.startIndex + this.page.size, this.total);
19267
+ return Math.min(this.startIndex + this.pageModel.size, this.total);
19027
19268
  },
19028
19269
  currentPage: {
19029
19270
  get() {
19030
- return this.page.index;
19271
+ return this.pageModel.index;
19031
19272
  },
19032
19273
  set(index2) {
19033
19274
  if (this.totalPages) {
19034
19275
  index2 = Math.min(this.totalPages, index2);
19035
19276
  }
19036
19277
  index2 = Math.max(index2, 1);
19037
- this.page.index = index2;
19278
+ this.pageModel.index = index2;
19038
19279
  this.dispatch();
19039
19280
  }
19040
19281
  }
19041
19282
  },
19042
19283
  methods: {
19043
19284
  dispatch() {
19044
- return this.$emit("update:page", this.page);
19285
+ return this.$emit("update:page", this.pageModel);
19045
19286
  },
19046
19287
  previousPage() {
19047
19288
  this.currentPage--;
@@ -19052,10 +19293,7 @@ const _sfc_main$a = {
19052
19293
  },
19053
19294
  data() {
19054
19295
  return {
19055
- page: {
19056
- size: 50,
19057
- index: 1
19058
- },
19296
+ pageModel: this.page,
19059
19297
  perPageField: {
19060
19298
  minimum: 1,
19061
19299
  maximum: 1,
@@ -19185,7 +19423,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
19185
19423
  _: 1
19186
19424
  });
19187
19425
  }
19188
- var Pager = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a], ["__scopeId", "data-v-25ef1240"]]);
19426
+ var Pager = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a], ["__scopeId", "data-v-492058b4"]]);
19189
19427
  var browser_vue_vue_type_style_index_0_scoped_true_lang = "";
19190
19428
  function defaultColumns(self2, type) {
19191
19429
  var columns = [];
@@ -19700,7 +19938,6 @@ const _sfc_main$9 = {
19700
19938
  },
19701
19939
  loadCriteria() {
19702
19940
  var self2 = this;
19703
- console.log("Load Criteria now", self2.sort);
19704
19941
  var sort2 = self2.sort || self2.defaultSort;
19705
19942
  var search = self2.keywords;
19706
19943
  var select = self2.selectFields;
@@ -19872,7 +20109,7 @@ const _sfc_main$9 = {
19872
20109
  };
19873
20110
  }
19874
20111
  };
19875
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-50180812"), n2 = n2(), popScopeId(), n2);
20112
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-2dc4a071"), n2 = n2(), popScopeId(), n2);
19876
20113
  const _hoisted_1$7 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("p", null, null, -1));
19877
20114
  const _hoisted_2$6 = { key: 0 };
19878
20115
  const _hoisted_3$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("p", null, null, -1));
@@ -20063,7 +20300,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
20063
20300
  _: 3
20064
20301
  })) : createCommentVNode("", true);
20065
20302
  }
20066
- var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-50180812"]]);
20303
+ var ContentBrowser = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-2dc4a071"]]);
20067
20304
  var ScopeItem_vue_vue_type_style_index_0_scoped_true_lang = "";
20068
20305
  const _sfc_main$8 = {
20069
20306
  props: {
@@ -21233,5 +21470,5 @@ const QikUI = {
21233
21470
  }
21234
21471
  }
21235
21472
  };
21236
- export { Avatar, CodeEditor, ContentBrowser, Daterange as DateRange, device as Device, FileDrop, FlexBody, FlexCell, FlexColumn, FlexFooter, FlexHeader, FlexRow, FlexSpacer, ModalMixin, NativeSelect, Panel, PanelBody, PanelFooter, PanelHeader, ProgressBar, QikUI, RememberScrollMixin, ScopeSelect, ScopeSelectButton, Search, Selection, Spinner, UXButton, UXCheckbox, UXForm, UXFormField, UXIcon, UXImage, UXLink, UXList, UXListItem, UXMenu, UXMenuList, UXRender, UXRenderField, UXSubmissionForm, UXSwitch, UXTab, NativeTable as UXTable, UXTabset, UxConfirmModal, UxContentModal, UxModal, UxOptionsModal, UxPromptModal, UxScopeModal };
21473
+ export { Avatar, CodeEditor, ContentBrowser, Daterange as DateRange, device as Device, FileDrop, FlexBody, FlexCell, FlexColumn, FlexFooter, FlexHeader, FlexRow, FlexSpacer, ModalMixin, NativeSelect, Pager$1 as Pager, Panel, PanelBody, PanelFooter, PanelHeader, ProgressBar, QikUI, RememberScrollMixin, ScopeSelect, ScopeSelectButton, Search, Selection, Spinner, UXButton, UXCheckbox, UXForm, UXFormField, UXIcon, UXImage, UXLink, UXList, UXListItem, UXMenu, UXMenuList, UXRender, UXRenderField, UXSubmissionForm, UXSwitch, UXTab, NativeTable as UXTable, UXTabset, UxConfirmModal, UxContentModal, UxModal, UxOptionsModal, UxPromptModal, UxScopeModal };
21237
21474
  //# sourceMappingURL=lib.es.js.map