@qikdev/vue-ui 0.1.92 → 0.1.96
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 +90 -28
- 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.96";
|
|
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: {
|
|
@@ -6104,13 +6165,13 @@ const _sfc_main$R = {
|
|
|
6104
6165
|
return params;
|
|
6105
6166
|
},
|
|
6106
6167
|
src() {
|
|
6107
|
-
return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, this.params);
|
|
6168
|
+
return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, this.params, { file: true });
|
|
6108
6169
|
},
|
|
6109
6170
|
previewSrc() {
|
|
6110
6171
|
var params = Object.assign({}, this.params);
|
|
6111
6172
|
params.w = 50;
|
|
6112
6173
|
delete params.h;
|
|
6113
|
-
return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, params);
|
|
6174
|
+
return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`, params, { file: true });
|
|
6114
6175
|
},
|
|
6115
6176
|
imageStyle() {
|
|
6116
6177
|
var style = {};
|
|
@@ -6180,7 +6241,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6180
6241
|
}, null, 12, _hoisted_2$C))
|
|
6181
6242
|
], 6);
|
|
6182
6243
|
}
|
|
6183
|
-
var UXImage = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-
|
|
6244
|
+
var UXImage = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R], ["__scopeId", "data-v-a5d2a840"]]);
|
|
6184
6245
|
var progressbar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
6185
6246
|
const _sfc_main$Q = {
|
|
6186
6247
|
props: {
|
|
@@ -14366,8 +14427,8 @@ const _hoisted_3$c = {
|
|
|
14366
14427
|
const _hoisted_4$c = { key: 2 };
|
|
14367
14428
|
const _hoisted_5$7 = { class: "ux-text-wrap prefixed" };
|
|
14368
14429
|
const _hoisted_6$7 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Label", -1));
|
|
14369
|
-
const _hoisted_7$5 = ["onBlur", "onUpdate:modelValue"];
|
|
14370
|
-
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"];
|
|
14371
14432
|
const _hoisted_9$2 = { class: "ux-text-wrap prefixed" };
|
|
14372
14433
|
const _hoisted_10$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "ux-text-prefix" }, "Value", -1));
|
|
14373
14434
|
const _hoisted_11$1 = ["onFocus", "onUpdate:modelValue"];
|
|
@@ -14407,7 +14468,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14407
14468
|
ref: "input",
|
|
14408
14469
|
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14409
14470
|
onBlur: ($event) => $options.titleBlurred(index2),
|
|
14410
|
-
"
|
|
14471
|
+
"on:update:modelValue": ($event) => $options.entryTitleChanged(index2),
|
|
14472
|
+
"onUpdate:modelValue": ($event) => _ctx.model[index2].title = $event
|
|
14411
14473
|
}, null, 40, _hoisted_7$5)), [
|
|
14412
14474
|
[
|
|
14413
14475
|
vModelText,
|
|
@@ -14425,7 +14487,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14425
14487
|
ref: "input",
|
|
14426
14488
|
onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14427
14489
|
onBlur: ($event) => $options.titleBlurred(index2),
|
|
14428
|
-
"
|
|
14490
|
+
"on:update:modelValue": ($event) => $options.entryTitleChanged(index2),
|
|
14491
|
+
"onUpdate:modelValue": ($event) => _ctx.model[index2].title = $event
|
|
14429
14492
|
}, null, 40, _hoisted_8$2)), [
|
|
14430
14493
|
[vModelText, _ctx.model[index2].title]
|
|
14431
14494
|
]) : createCommentVNode("", true)
|
|
@@ -14523,10 +14586,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14523
14586
|
ref: "input",
|
|
14524
14587
|
onKeydown: _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14525
14588
|
onBlur: _cache[9] || (_cache[9] = ($event) => $options.titleBlurred(_ctx.index)),
|
|
14526
|
-
"
|
|
14527
|
-
|
|
14528
|
-
_cache[11] || (_cache[11] = ($event) => _ctx.model.title = $event)
|
|
14529
|
-
]
|
|
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)
|
|
14530
14591
|
}, null, 544)), [
|
|
14531
14592
|
[
|
|
14532
14593
|
vModelText,
|
|
@@ -14543,10 +14604,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14543
14604
|
ref: "input",
|
|
14544
14605
|
onKeydown: _cache[13] || (_cache[13] = withKeys(withModifiers(($event) => _ctx.add(), ["stop", "prevent"]), ["enter"])),
|
|
14545
14606
|
onBlur: _cache[14] || (_cache[14] = ($event) => $options.titleBlurred(_ctx.index)),
|
|
14546
|
-
"
|
|
14547
|
-
|
|
14548
|
-
_cache[16] || (_cache[16] = ($event) => _ctx.model.title = $event)
|
|
14549
|
-
]
|
|
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)
|
|
14550
14609
|
}, null, 544)), [
|
|
14551
14610
|
[vModelText, _ctx.model.title]
|
|
14552
14611
|
]) : createCommentVNode("", true)
|
|
@@ -16154,7 +16213,8 @@ function computedExpression(key) {
|
|
|
16154
16213
|
return;
|
|
16155
16214
|
}
|
|
16156
16215
|
let context = self2.expressionsContext;
|
|
16157
|
-
|
|
16216
|
+
let result = service.evaluateExpression(expression, context);
|
|
16217
|
+
return result;
|
|
16158
16218
|
};
|
|
16159
16219
|
}
|
|
16160
16220
|
const _sfc_main$h = {
|
|
@@ -16220,7 +16280,7 @@ const _sfc_main$h = {
|
|
|
16220
16280
|
isDirtyBeforeInput: false
|
|
16221
16281
|
};
|
|
16222
16282
|
},
|
|
16223
|
-
inject: ["parentFormElement"],
|
|
16283
|
+
inject: ["parentFormElement", "additionalContext"],
|
|
16224
16284
|
provide() {
|
|
16225
16285
|
return {
|
|
16226
16286
|
fieldPath: this.fieldPath
|
|
@@ -16470,11 +16530,13 @@ const _sfc_main$h = {
|
|
|
16470
16530
|
return this.field.expressions;
|
|
16471
16531
|
},
|
|
16472
16532
|
expressionsContext() {
|
|
16473
|
-
|
|
16533
|
+
const context = {
|
|
16474
16534
|
this: this.model,
|
|
16475
16535
|
model: this.model,
|
|
16476
|
-
data: this.parentModel
|
|
16536
|
+
data: this.parentModel,
|
|
16537
|
+
additional: __spreadValues({}, this.additionalContext.value)
|
|
16477
16538
|
};
|
|
16539
|
+
return context;
|
|
16478
16540
|
},
|
|
16479
16541
|
hidden() {
|
|
16480
16542
|
if (this.actualField.readOnly) {
|
|
@@ -16847,7 +16909,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16847
16909
|
$options.error && $data.validateResults.message ? (openBlock(), createElementBlock("div", _hoisted_1$c, toDisplayString($data.validateResults.message), 1)) : createCommentVNode("", true)
|
|
16848
16910
|
], 34)) : createCommentVNode("", true);
|
|
16849
16911
|
}
|
|
16850
|
-
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"]]);
|
|
16851
16913
|
var form_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
16852
16914
|
const _sfc_main$g = {
|
|
16853
16915
|
props: {
|
|
@@ -18994,7 +19056,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18994
19056
|
"onClick:actions": $options.actionsClicked,
|
|
18995
19057
|
"onSelect:item:toggle": $options.rowToggled,
|
|
18996
19058
|
"onClick:item": $options.rowClicked
|
|
18997
|
-
}, null,
|
|
19059
|
+
}, null, 40, ["cacheKey", "selection", "items", "onClick:actions", "onSelect:item:toggle", "onClick:item"])) : (openBlock(), createBlock(_component_native_table, {
|
|
18998
19060
|
key: 1,
|
|
18999
19061
|
sort: $data.sort,
|
|
19000
19062
|
"onUpdate:sort": _cache[0] || (_cache[0] = ($event) => $data.sort = $event),
|