@qikdev/vue-ui 0.1.90 → 0.1.94
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 +98 -35
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +3 -3
- package/dist/lib.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/lib.es.js
CHANGED
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
};
|
|
33
33
|
import { openBlock, createElementBlock, renderSlot, resolveComponent, createBlock, withCtx, createVNode, Fragment, renderList, normalizeClass, toDisplayString, withDirectives, resolveDynamicComponent, vShow, withModifiers, createTextVNode, createCommentVNode, createElementVNode, mergeProps, toHandlers, pushScopeId, popScopeId, normalizeStyle, Teleport, vModelText, vModelSelect, withKeys, TransitionGroup, defineComponent, h, nextTick, vModelDynamic, vModelCheckbox, reactive, watch } from "vue";
|
|
34
34
|
import { EventDispatcher } from "@qikdev/sdk";
|
|
35
|
-
const version$1 = "0.1.
|
|
35
|
+
const version$1 = "0.1.93";
|
|
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;
|
|
@@ -4949,6 +4949,9 @@ const _sfc_main$$ = {
|
|
|
4949
4949
|
selected: {
|
|
4950
4950
|
type: Boolean
|
|
4951
4951
|
},
|
|
4952
|
+
index: {
|
|
4953
|
+
type: Number
|
|
4954
|
+
},
|
|
4952
4955
|
row: {
|
|
4953
4956
|
type: Object,
|
|
4954
4957
|
required: true
|
|
@@ -4979,7 +4982,8 @@ const _sfc_main$$ = {
|
|
|
4979
4982
|
this.$emit("click:actions", row);
|
|
4980
4983
|
},
|
|
4981
4984
|
clickSelect(row) {
|
|
4982
|
-
this
|
|
4985
|
+
const index2 = this.index;
|
|
4986
|
+
this.$emit("click:select", row, index2);
|
|
4983
4987
|
}
|
|
4984
4988
|
},
|
|
4985
4989
|
computed: {
|
|
@@ -5144,9 +5148,24 @@ const _sfc_main$_ = {
|
|
|
5144
5148
|
},
|
|
5145
5149
|
data() {
|
|
5146
5150
|
return {
|
|
5147
|
-
sorting: this.sort
|
|
5151
|
+
sorting: this.sort,
|
|
5152
|
+
lastSelectedIndex: null,
|
|
5153
|
+
shift: false,
|
|
5154
|
+
keyListenersAdded: false
|
|
5148
5155
|
};
|
|
5149
5156
|
},
|
|
5157
|
+
mounted() {
|
|
5158
|
+
this.addKeyListeners();
|
|
5159
|
+
},
|
|
5160
|
+
activated() {
|
|
5161
|
+
this.addKeyListeners();
|
|
5162
|
+
},
|
|
5163
|
+
beforeUnmount() {
|
|
5164
|
+
this.removeKeyListeners();
|
|
5165
|
+
},
|
|
5166
|
+
deactivated() {
|
|
5167
|
+
this.removeKeyListeners();
|
|
5168
|
+
},
|
|
5150
5169
|
computed: {
|
|
5151
5170
|
currentSortDirection() {
|
|
5152
5171
|
var _a;
|
|
@@ -5187,6 +5206,32 @@ const _sfc_main$_ = {
|
|
|
5187
5206
|
}
|
|
5188
5207
|
},
|
|
5189
5208
|
methods: {
|
|
5209
|
+
keyDown(event) {
|
|
5210
|
+
if (event.keyCode == 16) {
|
|
5211
|
+
this.shift = true;
|
|
5212
|
+
}
|
|
5213
|
+
},
|
|
5214
|
+
keyUp(event) {
|
|
5215
|
+
if (event.keyCode == 16) {
|
|
5216
|
+
this.shift = false;
|
|
5217
|
+
}
|
|
5218
|
+
},
|
|
5219
|
+
addKeyListeners() {
|
|
5220
|
+
if (this.keyListenersAdded) {
|
|
5221
|
+
return;
|
|
5222
|
+
}
|
|
5223
|
+
window.addEventListener("keydown", this.keyDown, true);
|
|
5224
|
+
window.addEventListener("keyup", this.keyUp, true);
|
|
5225
|
+
this.keyListenersAdded = true;
|
|
5226
|
+
},
|
|
5227
|
+
removeKeyListeners() {
|
|
5228
|
+
if (!this.keyListenersAdded) {
|
|
5229
|
+
return;
|
|
5230
|
+
}
|
|
5231
|
+
window.removeEventListener("keydown", this.keyDown, true);
|
|
5232
|
+
window.removeEventListener("keyup", this.keyUp, true);
|
|
5233
|
+
this.keyListenersAdded = false;
|
|
5234
|
+
},
|
|
5190
5235
|
togglePage() {
|
|
5191
5236
|
var self2 = this;
|
|
5192
5237
|
if (self2.pageSelected) {
|
|
@@ -5218,6 +5263,13 @@ const _sfc_main$_ = {
|
|
|
5218
5263
|
}
|
|
5219
5264
|
return array;
|
|
5220
5265
|
},
|
|
5266
|
+
selectRange(start, end) {
|
|
5267
|
+
const self2 = this;
|
|
5268
|
+
const startIndex = Math.min(start, end);
|
|
5269
|
+
const endIndex = Math.max(start, end) + 1;
|
|
5270
|
+
var targetRows = self2.renderRows.slice(startIndex, endIndex);
|
|
5271
|
+
self2.$emit("select:multiple", targetRows);
|
|
5272
|
+
},
|
|
5221
5273
|
toggleSort(column) {
|
|
5222
5274
|
var _a, _b;
|
|
5223
5275
|
const currentKey = (_a = this.sorting) == null ? void 0 : _a.key;
|
|
@@ -5241,7 +5293,15 @@ const _sfc_main$_ = {
|
|
|
5241
5293
|
clickActions(row) {
|
|
5242
5294
|
this.$emit("click:actions", row);
|
|
5243
5295
|
},
|
|
5244
|
-
clickSelect(row) {
|
|
5296
|
+
clickSelect(row, index2) {
|
|
5297
|
+
const currentSelectedIndex = this.lastSelectedIndex;
|
|
5298
|
+
if (this.shift) {
|
|
5299
|
+
if (currentSelectedIndex != index2) {
|
|
5300
|
+
console.log("FROM", currentSelectedIndex, "-", index2);
|
|
5301
|
+
return this.selectRange(currentSelectedIndex, index2);
|
|
5302
|
+
}
|
|
5303
|
+
}
|
|
5304
|
+
this.lastSelectedIndex = index2;
|
|
5245
5305
|
this.$emit("select:row:toggle", row);
|
|
5246
5306
|
}
|
|
5247
5307
|
}
|
|
@@ -5367,7 +5427,7 @@ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5367
5427
|
])
|
|
5368
5428
|
]),
|
|
5369
5429
|
createElementVNode("tbody", null, [
|
|
5370
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($options.renderRows, (row) => {
|
|
5430
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.renderRows, (row, index2) => {
|
|
5371
5431
|
return openBlock(), createBlock(_component_table_row, {
|
|
5372
5432
|
enableSelection: $props.enableSelection,
|
|
5373
5433
|
enableActions: $props.enableActions,
|
|
@@ -5378,15 +5438,16 @@ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5378
5438
|
"onClick:actions": $options.clickActions,
|
|
5379
5439
|
selected: $options.isSelected(row),
|
|
5380
5440
|
row,
|
|
5441
|
+
index: index2,
|
|
5381
5442
|
columns: $props.columns
|
|
5382
|
-
}, null, 8, ["enableSelection", "enableActions", "onClick:cell", "onClick:row", "onClick:select", "onClick:actions", "selected", "row", "columns"]);
|
|
5443
|
+
}, null, 8, ["enableSelection", "enableActions", "onClick:cell", "onClick:row", "onClick:select", "onClick:actions", "selected", "row", "index", "columns"]);
|
|
5383
5444
|
}), 128))
|
|
5384
5445
|
])
|
|
5385
5446
|
])
|
|
5386
5447
|
], 512)
|
|
5387
5448
|
]);
|
|
5388
5449
|
}
|
|
5389
|
-
var NativeTable = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_], ["__scopeId", "data-v-
|
|
5450
|
+
var NativeTable = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_], ["__scopeId", "data-v-2b235040"]]);
|
|
5390
5451
|
var spinner_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
5391
5452
|
const _sfc_main$Z = {
|
|
5392
5453
|
props: {
|
|
@@ -5672,9 +5733,8 @@ const _sfc_main$V = {
|
|
|
5672
5733
|
}
|
|
5673
5734
|
if (this.to) {
|
|
5674
5735
|
return `router-link`;
|
|
5675
|
-
} else {
|
|
5676
|
-
return "a";
|
|
5677
5736
|
}
|
|
5737
|
+
return "a";
|
|
5678
5738
|
}
|
|
5679
5739
|
}
|
|
5680
5740
|
};
|
|
@@ -5692,7 +5752,7 @@ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5692
5752
|
_: 3
|
|
5693
5753
|
}, 8, ["onClick", "to", "href", "target", "class"]);
|
|
5694
5754
|
}
|
|
5695
|
-
var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$V], ["__scopeId", "data-v-
|
|
5755
|
+
var UXLink = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$V], ["__scopeId", "data-v-8b82829a"]]);
|
|
5696
5756
|
var icon_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
5697
5757
|
const _sfc_main$U = {
|
|
5698
5758
|
props: {
|
|
@@ -14367,8 +14427,8 @@ const _hoisted_3$c = {
|
|
|
14367
14427
|
const _hoisted_4$c = { key: 2 };
|
|
14368
14428
|
const _hoisted_5$7 = { class: "ux-text-wrap prefixed" };
|
|
14369
14429
|
const _hoisted_6$7 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Label", -1));
|
|
14370
|
-
const _hoisted_7$5 = ["onBlur", "onUpdate:modelValue"];
|
|
14371
|
-
const _hoisted_8$2 = ["onBlur", "onUpdate:modelValue"];
|
|
14430
|
+
const _hoisted_7$5 = ["onBlur", "on:update:modelValue", "onUpdate:modelValue"];
|
|
14431
|
+
const _hoisted_8$2 = ["onBlur", "on:update:modelValue", "onUpdate:modelValue"];
|
|
14372
14432
|
const _hoisted_9$2 = { class: "ux-text-wrap prefixed" };
|
|
14373
14433
|
const _hoisted_10$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Value", -1));
|
|
14374
14434
|
const _hoisted_11$1 = ["onFocus", "onUpdate:modelValue"];
|
|
@@ -14408,7 +14468,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14408
14468
|
ref: "input",
|
|
14409
14469
|
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14410
14470
|
onBlur: ($event) => $options.titleBlurred(index2),
|
|
14411
|
-
"
|
|
14471
|
+
"on:update:modelValue": ($event) => $options.entryTitleChanged(index2),
|
|
14472
|
+
"onUpdate:modelValue": ($event) => _ctx.model[index2].title = $event
|
|
14412
14473
|
}, null, 40, _hoisted_7$5)), [
|
|
14413
14474
|
[
|
|
14414
14475
|
vModelText,
|
|
@@ -14426,7 +14487,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14426
14487
|
ref: "input",
|
|
14427
14488
|
onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14428
14489
|
onBlur: ($event) => $options.titleBlurred(index2),
|
|
14429
|
-
"
|
|
14490
|
+
"on:update:modelValue": ($event) => $options.entryTitleChanged(index2),
|
|
14491
|
+
"onUpdate:modelValue": ($event) => _ctx.model[index2].title = $event
|
|
14430
14492
|
}, null, 40, _hoisted_8$2)), [
|
|
14431
14493
|
[vModelText, _ctx.model[index2].title]
|
|
14432
14494
|
]) : createCommentVNode("", true)
|
|
@@ -14524,10 +14586,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14524
14586
|
ref: "input",
|
|
14525
14587
|
onKeydown: _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14526
14588
|
onBlur: _cache[9] || (_cache[9] = ($event) => $options.titleBlurred(_ctx.index)),
|
|
14527
|
-
"
|
|
14528
|
-
|
|
14529
|
-
_cache[11] || (_cache[11] = ($event) => _ctx.model.title = $event)
|
|
14530
|
-
]
|
|
14589
|
+
"on:update:modelValue": _cache[10] || (_cache[10] = (...args) => $options.entryTitleChanged && $options.entryTitleChanged(...args)),
|
|
14590
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => _ctx.model.title = $event)
|
|
14531
14591
|
}, null, 544)), [
|
|
14532
14592
|
[
|
|
14533
14593
|
vModelText,
|
|
@@ -14544,10 +14604,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14544
14604
|
ref: "input",
|
|
14545
14605
|
onKeydown: _cache[13] || (_cache[13] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14546
14606
|
onBlur: _cache[14] || (_cache[14] = ($event) => $options.titleBlurred(_ctx.index)),
|
|
14547
|
-
"
|
|
14548
|
-
|
|
14549
|
-
_cache[16] || (_cache[16] = ($event) => _ctx.model.title = $event)
|
|
14550
|
-
]
|
|
14607
|
+
"on:update:modelValue": _cache[15] || (_cache[15] = (...args) => $options.entryTitleChanged && $options.entryTitleChanged(...args)),
|
|
14608
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => _ctx.model.title = $event)
|
|
14551
14609
|
}, null, 544)), [
|
|
14552
14610
|
[vModelText, _ctx.model.title]
|
|
14553
14611
|
]) : createCommentVNode("", true)
|
|
@@ -14644,6 +14702,9 @@ const _sfc_main$n = {
|
|
|
14644
14702
|
},
|
|
14645
14703
|
lang: {
|
|
14646
14704
|
type: String
|
|
14705
|
+
},
|
|
14706
|
+
readonly: {
|
|
14707
|
+
type: Boolean
|
|
14647
14708
|
}
|
|
14648
14709
|
},
|
|
14649
14710
|
watch: {
|
|
@@ -14676,6 +14737,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14676
14737
|
default: withCtx(() => [
|
|
14677
14738
|
createVNode(_component_v_ace_editor, {
|
|
14678
14739
|
onBlur: $options.format,
|
|
14740
|
+
readonly: $props.readonly,
|
|
14679
14741
|
class: "editor-wrap",
|
|
14680
14742
|
value: $data.model,
|
|
14681
14743
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => $data.model = $event),
|
|
@@ -14684,12 +14746,12 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14684
14746
|
lang: $props.lang,
|
|
14685
14747
|
theme: "tomorrow_night_eighties",
|
|
14686
14748
|
style: { "height": "300px" }
|
|
14687
|
-
}, null, 8, ["onBlur", "value", "onInit", "lang"])
|
|
14749
|
+
}, null, 8, ["onBlur", "readonly", "value", "onInit", "lang"])
|
|
14688
14750
|
]),
|
|
14689
14751
|
_: 1
|
|
14690
14752
|
})) : createCommentVNode("", true);
|
|
14691
14753
|
}
|
|
14692
|
-
var CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-
|
|
14754
|
+
var CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-edf89936"]]);
|
|
14693
14755
|
var codeEditorField_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
14694
14756
|
const _sfc_main$m = {
|
|
14695
14757
|
components: {
|
|
@@ -14906,9 +14968,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14906
14968
|
const _component_ux_icon = resolveComponent("ux-icon");
|
|
14907
14969
|
const _component_ux_button = resolveComponent("ux-button");
|
|
14908
14970
|
const _component_flex_row = resolveComponent("flex-row");
|
|
14909
|
-
return openBlock(), createElementBlock("div",
|
|
14910
|
-
onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.enterPress($event), ["stop"]), ["enter"]))
|
|
14911
|
-
}, [
|
|
14971
|
+
return openBlock(), createElementBlock("div", null, [
|
|
14912
14972
|
_ctx.showLabel ? (openBlock(), createElementBlock("label", _hoisted_1$f, [
|
|
14913
14973
|
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
14914
14974
|
_ctx.required ? (openBlock(), createElementBlock("span", _hoisted_2$c, "*")) : createCommentVNode("", true)
|
|
@@ -14976,9 +15036,9 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14976
15036
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event)
|
|
14977
15037
|
}, null, 8, ["onFocus", "modelValue"])
|
|
14978
15038
|
]))
|
|
14979
|
-
]
|
|
15039
|
+
]);
|
|
14980
15040
|
}
|
|
14981
|
-
var RichTextField = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-
|
|
15041
|
+
var RichTextField = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-46ce3b2b"]]);
|
|
14982
15042
|
var InternalRouteSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
14983
15043
|
function isUndefined$1(entry) {
|
|
14984
15044
|
return entry === void 0 || typeof entry === "undefined" || entry === null || String(entry) === "null" || String(entry) === "undefined";
|
|
@@ -16153,7 +16213,8 @@ function computedExpression(key) {
|
|
|
16153
16213
|
return;
|
|
16154
16214
|
}
|
|
16155
16215
|
let context = self2.expressionsContext;
|
|
16156
|
-
|
|
16216
|
+
let result = service.evaluateExpression(expression, context);
|
|
16217
|
+
return result;
|
|
16157
16218
|
};
|
|
16158
16219
|
}
|
|
16159
16220
|
const _sfc_main$h = {
|
|
@@ -16219,7 +16280,7 @@ const _sfc_main$h = {
|
|
|
16219
16280
|
isDirtyBeforeInput: false
|
|
16220
16281
|
};
|
|
16221
16282
|
},
|
|
16222
|
-
inject: ["parentFormElement"],
|
|
16283
|
+
inject: ["parentFormElement", "additionalContext"],
|
|
16223
16284
|
provide() {
|
|
16224
16285
|
return {
|
|
16225
16286
|
fieldPath: this.fieldPath
|
|
@@ -16469,11 +16530,13 @@ const _sfc_main$h = {
|
|
|
16469
16530
|
return this.field.expressions;
|
|
16470
16531
|
},
|
|
16471
16532
|
expressionsContext() {
|
|
16472
|
-
|
|
16533
|
+
const context = {
|
|
16473
16534
|
this: this.model,
|
|
16474
16535
|
model: this.model,
|
|
16475
|
-
data: this.parentModel
|
|
16536
|
+
data: this.parentModel,
|
|
16537
|
+
additional: __spreadValues({}, this.additionalContext.value)
|
|
16476
16538
|
};
|
|
16539
|
+
return context;
|
|
16477
16540
|
},
|
|
16478
16541
|
hidden() {
|
|
16479
16542
|
if (this.actualField.readOnly) {
|
|
@@ -16846,7 +16909,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16846
16909
|
$options.error && $data.validateResults.message ? (openBlock(), createElementBlock("div", _hoisted_1$c, toDisplayString($data.validateResults.message), 1)) : createCommentVNode("", true)
|
|
16847
16910
|
], 34)) : createCommentVNode("", true);
|
|
16848
16911
|
}
|
|
16849
|
-
var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-
|
|
16912
|
+
var UXFormField = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-64d30f70"]]);
|
|
16850
16913
|
var form_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
16851
16914
|
const _sfc_main$g = {
|
|
16852
16915
|
props: {
|
|
@@ -18993,7 +19056,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18993
19056
|
"onClick:actions": $options.actionsClicked,
|
|
18994
19057
|
"onSelect:item:toggle": $options.rowToggled,
|
|
18995
19058
|
"onClick:item": $options.rowClicked
|
|
18996
|
-
}, null,
|
|
19059
|
+
}, null, 40, ["cacheKey", "selection", "items", "onClick:actions", "onSelect:item:toggle", "onClick:item"])) : (openBlock(), createBlock(_component_native_table, {
|
|
18997
19060
|
key: 1,
|
|
18998
19061
|
sort: $data.sort,
|
|
18999
19062
|
"onUpdate:sort": _cache[0] || (_cache[0] = ($event) => $data.sort = $event),
|