mcdis-vue-ui-library 1.1.249 → 1.1.254
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.
@@ -388,6 +388,22 @@ module.exports = function (matched, str, position, captures, namedCaptures, repl
|
|
388
388
|
};
|
389
389
|
|
390
390
|
|
391
|
+
/***/ }),
|
392
|
+
|
393
|
+
/***/ "0cde":
|
394
|
+
/***/ (function(module, exports, __webpack_require__) {
|
395
|
+
|
396
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
397
|
+
|
398
|
+
// load the styles
|
399
|
+
var content = __webpack_require__("8352");
|
400
|
+
if(content.__esModule) content = content.default;
|
401
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
402
|
+
if(content.locals) module.exports = content.locals;
|
403
|
+
// add the styles to the DOM
|
404
|
+
var add = __webpack_require__("499e").default
|
405
|
+
var update = add("515442fe", content, true, {"sourceMap":false,"shadowMode":false});
|
406
|
+
|
391
407
|
/***/ }),
|
392
408
|
|
393
409
|
/***/ "0cfb":
|
@@ -974,6 +990,17 @@ exports.push([module.i, ".pulse[data-v-1fd5f120]{background-color:var(--primary1
|
|
974
990
|
module.exports = exports;
|
975
991
|
|
976
992
|
|
993
|
+
/***/ }),
|
994
|
+
|
995
|
+
/***/ "2207":
|
996
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
997
|
+
|
998
|
+
"use strict";
|
999
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_DataGrid_vue_vue_type_style_index_0_id_140938ae_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0cde");
|
1000
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_DataGrid_vue_vue_type_style_index_0_id_140938ae_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_0_1_DataGrid_vue_vue_type_style_index_0_id_140938ae_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
1001
|
+
/* unused harmony reexport * */
|
1002
|
+
|
1003
|
+
|
977
1004
|
/***/ }),
|
978
1005
|
|
979
1006
|
/***/ "2266":
|
@@ -3934,6 +3961,20 @@ exports.push([module.i, "@-webkit-keyframes vibrate-549f6873{0%{transform:transl
|
|
3934
3961
|
module.exports = exports;
|
3935
3962
|
|
3936
3963
|
|
3964
|
+
/***/ }),
|
3965
|
+
|
3966
|
+
/***/ "8352":
|
3967
|
+
/***/ (function(module, exports, __webpack_require__) {
|
3968
|
+
|
3969
|
+
// Imports
|
3970
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
3971
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
3972
|
+
// Module
|
3973
|
+
exports.push([module.i, "*[data-v-140938ae]{box-sizing:border-box}.data-grid[data-v-140938ae]{width:100%}.data-grid__head[data-v-140938ae]{display:grid;padding-bottom:1rem}.data-grid__head-title[data-v-140938ae]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:5px;display:flex;align-items:center}.data-grid__head-options[data-v-140938ae]{display:flex;align-items:center;justify-content:center}.data-grid__wrapper[data-v-140938ae]{background-color:var(--back90);padding:20px 10px;border-radius:5px}.data-grid__body[data-v-140938ae]{display:grid}.data-grid__row[data-v-140938ae]{display:grid;background-color:var(--back60);border-radius:5px;margin-bottom:5px;cursor:pointer}.data-grid__row[data-v-140938ae]:hover{background-color:var(--hoverTable)}.data-grid__cell[data-v-140938ae]{padding:5px}.data-grid__cell[data-v-140938ae],.data-grid__cell>span[data-v-140938ae]{display:flex;align-items:center;width:100%}.data-grid__cell>span[data-v-140938ae]{height:100%}.data-grid__cell--context-menu[data-v-140938ae]{justify-content:center}.sort-arrow[data-v-140938ae]{width:15px;margin-left:10px}.sort-arrow--active[data-v-140938ae]{transform:rotate(180deg)}", ""]);
|
3974
|
+
// Exports
|
3975
|
+
module.exports = exports;
|
3976
|
+
|
3977
|
+
|
3937
3978
|
/***/ }),
|
3938
3979
|
|
3939
3980
|
/***/ "83ab":
|
@@ -7240,6 +7281,7 @@ __webpack_require__.d(components_namespaceObject, "McLazyObserver", function() {
|
|
7240
7281
|
__webpack_require__.d(components_namespaceObject, "PopupTooltip", function() { return components_PopupTooltip; });
|
7241
7282
|
__webpack_require__.d(components_namespaceObject, "Select", function() { return components_Select; });
|
7242
7283
|
__webpack_require__.d(components_namespaceObject, "EmojiPicker", function() { return components_EmojiPicker; });
|
7284
|
+
__webpack_require__.d(components_namespaceObject, "NewDataGrid", function() { return DataGridNew; });
|
7243
7285
|
|
7244
7286
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
7245
7287
|
// This file is imported into lib/wc client bundles.
|
@@ -14069,6 +14111,513 @@ const EmojiPicker_exports_ = /*#__PURE__*/exportHelper_default()(EmojiPickervue_
|
|
14069
14111
|
// CONCATENATED MODULE: ./src/components/EmojiPicker/index.js
|
14070
14112
|
|
14071
14113
|
/* harmony default export */ var components_EmojiPicker = (EmojiPicker);
|
14114
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./src/components/DataGridNew/parts/LazyObserver.vue?vue&type=template&id=5c53b3a6
|
14115
|
+
|
14116
|
+
function LazyObservervue_type_template_id_5c53b3a6_render(_ctx, _cache, $props, $setup, $data, $options) {
|
14117
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
|
14118
|
+
style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({
|
14119
|
+
minHeight: "".concat($props.minHeightRow * $props.countRows, "px")
|
14120
|
+
}),
|
14121
|
+
class: "lazy-observer",
|
14122
|
+
ref: "lazyElement"
|
14123
|
+
}, [_ctx.isVisible ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "html", {
|
14124
|
+
key: 0
|
14125
|
+
}) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 4);
|
14126
|
+
}
|
14127
|
+
// CONCATENATED MODULE: ./src/components/DataGridNew/parts/LazyObserver.vue?vue&type=template&id=5c53b3a6
|
14128
|
+
|
14129
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./src/components/DataGridNew/parts/LazyObserver.vue?vue&type=script&lang=js
|
14130
|
+
|
14131
|
+
|
14132
|
+
/* harmony default export */ var parts_LazyObservervue_type_script_lang_js = ({
|
14133
|
+
name: "LazyObserver",
|
14134
|
+
props: {
|
14135
|
+
minHeightRow: {
|
14136
|
+
type: [String, Number],
|
14137
|
+
default: 50,
|
14138
|
+
required: false
|
14139
|
+
},
|
14140
|
+
countRows: {
|
14141
|
+
type: [String, Number],
|
14142
|
+
default: 25,
|
14143
|
+
required: false
|
14144
|
+
},
|
14145
|
+
delayResolve: {
|
14146
|
+
type: [Number, Boolean],
|
14147
|
+
default: false
|
14148
|
+
}
|
14149
|
+
},
|
14150
|
+
data: function data() {
|
14151
|
+
return {
|
14152
|
+
isVisible: false,
|
14153
|
+
state: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["markRaw"])({
|
14154
|
+
lazyElement: null,
|
14155
|
+
skipScroll: null
|
14156
|
+
}),
|
14157
|
+
idTimeout: undefined
|
14158
|
+
};
|
14159
|
+
},
|
14160
|
+
mounted: function mounted() {
|
14161
|
+
var _this$state$lazyEleme,
|
14162
|
+
_this = this;
|
14163
|
+
|
14164
|
+
this.state.lazyElement = this.$refs.lazyElement;
|
14165
|
+
|
14166
|
+
if (!((_this$state$lazyEleme = this.state.lazyElement.previousElementSibling) !== null && _this$state$lazyEleme !== void 0 && _this$state$lazyEleme.classList.contains("lazy-observer"))) {
|
14167
|
+
this.isVisible = true;
|
14168
|
+
return;
|
14169
|
+
}
|
14170
|
+
|
14171
|
+
if (this.delayResolve !== false) {
|
14172
|
+
var delay = this.delayResolve === true ? 0 : this.delayResolve;
|
14173
|
+
this.idTimeout = setTimeout(function () {
|
14174
|
+
_this.isVisible = true;
|
14175
|
+
|
14176
|
+
_this.clearHandlers();
|
14177
|
+
}, delay);
|
14178
|
+
}
|
14179
|
+
|
14180
|
+
this.state.skipScroll = this.throttle(this.isSeen, 200);
|
14181
|
+
document.addEventListener("scroll", this.state.skipScroll);
|
14182
|
+
},
|
14183
|
+
beforeUnmount: function beforeUnmount() {
|
14184
|
+
this.clearHandlers();
|
14185
|
+
},
|
14186
|
+
methods: {
|
14187
|
+
isSeen: function isSeen() {
|
14188
|
+
var offsetElementTop = this.state.lazyElement.offsetTop;
|
14189
|
+
var heightScreen = document.documentElement.clientHeight;
|
14190
|
+
var scrollWithTop = Math.ceil(document.documentElement.scrollTop);
|
14191
|
+
|
14192
|
+
if (scrollWithTop + heightScreen >= offsetElementTop) {
|
14193
|
+
this.isVisible = true;
|
14194
|
+
this.clearHandlers();
|
14195
|
+
}
|
14196
|
+
},
|
14197
|
+
throttle: function throttle(fn, ms) {
|
14198
|
+
var isOpen = true;
|
14199
|
+
var self = null;
|
14200
|
+
var args = null;
|
14201
|
+
return function () {
|
14202
|
+
if (isOpen) {
|
14203
|
+
isOpen = false;
|
14204
|
+
fn.apply(this, arguments);
|
14205
|
+
setTimeout(function () {
|
14206
|
+
if (self && args) {
|
14207
|
+
fn.apply(self, args);
|
14208
|
+
self = args = null;
|
14209
|
+
}
|
14210
|
+
|
14211
|
+
isOpen = true;
|
14212
|
+
}, ms);
|
14213
|
+
} else {
|
14214
|
+
self = this;
|
14215
|
+
args = arguments;
|
14216
|
+
}
|
14217
|
+
};
|
14218
|
+
},
|
14219
|
+
clearHandlers: function clearHandlers() {
|
14220
|
+
clearTimeout(this.idTimeout);
|
14221
|
+
document.removeEventListener("scroll", this.state.skipScroll);
|
14222
|
+
}
|
14223
|
+
}
|
14224
|
+
});
|
14225
|
+
// CONCATENATED MODULE: ./src/components/DataGridNew/parts/LazyObserver.vue?vue&type=script&lang=js
|
14226
|
+
|
14227
|
+
// CONCATENATED MODULE: ./src/components/DataGridNew/parts/LazyObserver.vue
|
14228
|
+
|
14229
|
+
|
14230
|
+
|
14231
|
+
|
14232
|
+
|
14233
|
+
const parts_LazyObserver_exports_ = /*#__PURE__*/exportHelper_default()(parts_LazyObservervue_type_script_lang_js, [['render',LazyObservervue_type_template_id_5c53b3a6_render]])
|
14234
|
+
|
14235
|
+
/* harmony default export */ var parts_LazyObserver = (parts_LazyObserver_exports_);
|
14236
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./src/components/DataGridNew/DataGrid.vue?vue&type=script&setup=true&lang=js
|
14237
|
+
|
14238
|
+
|
14239
|
+
|
14240
|
+
|
14241
|
+
|
14242
|
+
|
14243
|
+
|
14244
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_withScopeId = function _withScopeId(n) {
|
14245
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-140938ae"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n;
|
14246
|
+
};
|
14247
|
+
|
14248
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_1 = {
|
14249
|
+
class: "data-grid__wrapper"
|
14250
|
+
};
|
14251
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_2 = {
|
14252
|
+
class: "data-grid"
|
14253
|
+
};
|
14254
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_3 = ["onClick"];
|
14255
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_4 = {
|
14256
|
+
key: 0,
|
14257
|
+
class: "data-grid__head-title data-grid__head-options"
|
14258
|
+
};
|
14259
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_5 = ["onClick"];
|
14260
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_6 = ["onClick"];
|
14261
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_7 = {
|
14262
|
+
key: 1
|
14263
|
+
};
|
14264
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_8 = {
|
14265
|
+
key: 0,
|
14266
|
+
class: "data-grid__cell data-grid__cell--context-menu"
|
14267
|
+
};
|
14268
|
+
|
14269
|
+
|
14270
|
+
|
14271
|
+
var DataGridNew_DataGridvue_type_script_setup_true_lang_js_default_ = {
|
14272
|
+
name: "NewDataGrid"
|
14273
|
+
};
|
14274
|
+
var DataGridvue_type_script_setup_true_lang_js_ASC = "ASC";
|
14275
|
+
var DataGridvue_type_script_setup_true_lang_js_DESC = "DESC";
|
14276
|
+
|
14277
|
+
function DataGridNew_DataGridvue_type_script_setup_true_lang_js_setup(__props, _ref) {
|
14278
|
+
var emits = _ref.emit;
|
14279
|
+
var props = __props;
|
14280
|
+
var sortedRows = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.rows);
|
14281
|
+
var rulesList = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
14282
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
14283
|
+
return props.rows;
|
14284
|
+
}, function () {
|
14285
|
+
sortedRows.value = props.rows;
|
14286
|
+
});
|
14287
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
14288
|
+
if (props.sortHandlers) {
|
14289
|
+
var _iterator = _createForOfIteratorHelper(props.sortHandlers),
|
14290
|
+
_step;
|
14291
|
+
|
14292
|
+
try {
|
14293
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
14294
|
+
var el = _step.value;
|
14295
|
+
rulesList.value.push({
|
14296
|
+
idx: el.idx,
|
14297
|
+
rule: DataGridvue_type_script_setup_true_lang_js_ASC
|
14298
|
+
});
|
14299
|
+
}
|
14300
|
+
} catch (err) {
|
14301
|
+
_iterator.e(err);
|
14302
|
+
} finally {
|
14303
|
+
_iterator.f();
|
14304
|
+
}
|
14305
|
+
}
|
14306
|
+
});
|
14307
|
+
|
14308
|
+
var getSortRule = function getSortRule(idx) {
|
14309
|
+
var _iterator2 = _createForOfIteratorHelper(rulesList.value),
|
14310
|
+
_step2;
|
14311
|
+
|
14312
|
+
try {
|
14313
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
14314
|
+
var rule = _step2.value;
|
14315
|
+
if (rule.idx === idx) return rule.rule;
|
14316
|
+
}
|
14317
|
+
} catch (err) {
|
14318
|
+
_iterator2.e(err);
|
14319
|
+
} finally {
|
14320
|
+
_iterator2.f();
|
14321
|
+
}
|
14322
|
+
};
|
14323
|
+
|
14324
|
+
var setSortRule = function setSortRule(_idx, _rule) {
|
14325
|
+
var _iterator3 = _createForOfIteratorHelper(rulesList.value),
|
14326
|
+
_step3;
|
14327
|
+
|
14328
|
+
try {
|
14329
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
14330
|
+
var rule = _step3.value;
|
14331
|
+
|
14332
|
+
if (rule.idx == _idx) {
|
14333
|
+
rule.rule = _rule;
|
14334
|
+
}
|
14335
|
+
}
|
14336
|
+
} catch (err) {
|
14337
|
+
_iterator3.e(err);
|
14338
|
+
} finally {
|
14339
|
+
_iterator3.f();
|
14340
|
+
}
|
14341
|
+
};
|
14342
|
+
|
14343
|
+
var sortRows = function sortRows(idx) {
|
14344
|
+
var rule = getSortRule(idx);
|
14345
|
+
if (!props.sortHandlers) return false;
|
14346
|
+
var func = null;
|
14347
|
+
|
14348
|
+
for (var i = 0; i < props.sortHandlers.length; i++) {
|
14349
|
+
if (props.sortHandlers[i].idx === idx) {
|
14350
|
+
func = props.sortHandlers[i].fn;
|
14351
|
+
}
|
14352
|
+
}
|
14353
|
+
|
14354
|
+
if (!func) return;
|
14355
|
+
|
14356
|
+
if (rule === DataGridvue_type_script_setup_true_lang_js_ASC) {
|
14357
|
+
setSortRule(idx, DataGridvue_type_script_setup_true_lang_js_DESC);
|
14358
|
+
sortedRows.value.sort(function (_x, _y) {
|
14359
|
+
return func(_x[idx], _y[idx]);
|
14360
|
+
});
|
14361
|
+
return;
|
14362
|
+
}
|
14363
|
+
|
14364
|
+
if (rule === DataGridvue_type_script_setup_true_lang_js_DESC) {
|
14365
|
+
setSortRule(idx, DataGridvue_type_script_setup_true_lang_js_ASC);
|
14366
|
+
sortedRows.value.sort(function (_x, _y) {
|
14367
|
+
return func(_y[idx], _x[idx]);
|
14368
|
+
});
|
14369
|
+
}
|
14370
|
+
};
|
14371
|
+
|
14372
|
+
var emitCellClick = function emitCellClick(_cell, _idx) {
|
14373
|
+
if (props.cellClickHandler) {
|
14374
|
+
emits(props.cellClickHandler, _cell, _idx, props.columns[_idx]);
|
14375
|
+
}
|
14376
|
+
};
|
14377
|
+
|
14378
|
+
var emitRowClick = function emitRowClick(_row, _idx) {
|
14379
|
+
console.log("click");
|
14380
|
+
|
14381
|
+
if (props.rowClickHandler) {
|
14382
|
+
emits(props.rowClickHandler, _row, _idx);
|
14383
|
+
}
|
14384
|
+
};
|
14385
|
+
|
14386
|
+
var isCustomSlot = function isCustomSlot(_idx) {
|
14387
|
+
var result = false;
|
14388
|
+
|
14389
|
+
var _iterator4 = _createForOfIteratorHelper(props.customSlotCols),
|
14390
|
+
_step4;
|
14391
|
+
|
14392
|
+
try {
|
14393
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
14394
|
+
var key = _step4.value;
|
14395
|
+
|
14396
|
+
if (key.idx == _idx) {
|
14397
|
+
return true;
|
14398
|
+
}
|
14399
|
+
}
|
14400
|
+
} catch (err) {
|
14401
|
+
_iterator4.e(err);
|
14402
|
+
} finally {
|
14403
|
+
_iterator4.f();
|
14404
|
+
}
|
14405
|
+
|
14406
|
+
return result;
|
14407
|
+
};
|
14408
|
+
|
14409
|
+
var getSlotName = function getSlotName(_idx) {
|
14410
|
+
var _iterator5 = _createForOfIteratorHelper(props.customSlotCols),
|
14411
|
+
_step5;
|
14412
|
+
|
14413
|
+
try {
|
14414
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
14415
|
+
var key = _step5.value;
|
14416
|
+
|
14417
|
+
if (key.idx == _idx) {
|
14418
|
+
return key.name;
|
14419
|
+
}
|
14420
|
+
}
|
14421
|
+
} catch (err) {
|
14422
|
+
_iterator5.e(err);
|
14423
|
+
} finally {
|
14424
|
+
_iterator5.f();
|
14425
|
+
}
|
14426
|
+
};
|
14427
|
+
|
14428
|
+
var chunkRowsList = function chunkRowsList() {
|
14429
|
+
var chunks = [];
|
14430
|
+
|
14431
|
+
for (var i = 0; i < Math.ceil(sortedRows.value.length / 25); i++) {
|
14432
|
+
var chunk = sortedRows.value.slice(i * 25, (i + 1) * 25);
|
14433
|
+
chunks.push(chunk);
|
14434
|
+
}
|
14435
|
+
|
14436
|
+
return chunks;
|
14437
|
+
};
|
14438
|
+
|
14439
|
+
var isSortable = function isSortable(idx) {
|
14440
|
+
if (!props.sortHandlers) return false;
|
14441
|
+
|
14442
|
+
var _iterator6 = _createForOfIteratorHelper(props.sortHandlers),
|
14443
|
+
_step6;
|
14444
|
+
|
14445
|
+
try {
|
14446
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
14447
|
+
var el = _step6.value;
|
14448
|
+
if (el.idx === idx) return true;
|
14449
|
+
}
|
14450
|
+
} catch (err) {
|
14451
|
+
_iterator6.e(err);
|
14452
|
+
} finally {
|
14453
|
+
_iterator6.f();
|
14454
|
+
}
|
14455
|
+
|
14456
|
+
return false;
|
14457
|
+
};
|
14458
|
+
|
14459
|
+
var isAscending = function isAscending(_idx) {
|
14460
|
+
var _iterator7 = _createForOfIteratorHelper(rulesList.value),
|
14461
|
+
_step7;
|
14462
|
+
|
14463
|
+
try {
|
14464
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
14465
|
+
var rule = _step7.value;
|
14466
|
+
|
14467
|
+
if (rule.idx === _idx) {
|
14468
|
+
return rule.rule === DataGridvue_type_script_setup_true_lang_js_ASC;
|
14469
|
+
}
|
14470
|
+
}
|
14471
|
+
} catch (err) {
|
14472
|
+
_iterator7.e(err);
|
14473
|
+
} finally {
|
14474
|
+
_iterator7.f();
|
14475
|
+
}
|
14476
|
+
|
14477
|
+
return false;
|
14478
|
+
};
|
14479
|
+
|
14480
|
+
var computedColumnsWidth = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
14481
|
+
if (props.columnsWidth) {
|
14482
|
+
return {
|
14483
|
+
gridTemplateColumns: props.columnsWidth
|
14484
|
+
};
|
14485
|
+
}
|
14486
|
+
|
14487
|
+
var columnsCount = props.columnsCount;
|
14488
|
+
|
14489
|
+
if (props.contextMenu) {
|
14490
|
+
columnsCount += 1;
|
14491
|
+
}
|
14492
|
+
|
14493
|
+
return {
|
14494
|
+
gridTemplateColumns: "repeat(".concat(columnsCount, ", 1fr)")
|
14495
|
+
};
|
14496
|
+
});
|
14497
|
+
return function (_ctx, _cache) {
|
14498
|
+
var _component_context_menu = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("context-menu");
|
14499
|
+
|
14500
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
|
14501
|
+
class: "data-grid__head",
|
14502
|
+
style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["unref"])(computedColumnsWidth))
|
14503
|
+
}, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(props.columns, function (col, colIdx) {
|
14504
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
|
14505
|
+
onClick: function onClick($event) {
|
14506
|
+
return sortRows(colIdx);
|
14507
|
+
},
|
14508
|
+
class: "data-grid__head-title",
|
14509
|
+
style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({
|
14510
|
+
cursor: isSortable(colIdx) ? 'pointer' : ''
|
14511
|
+
}),
|
14512
|
+
key: col
|
14513
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(col), 1), isSortable(colIdx) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["unref"])(arrow_down), {
|
14514
|
+
key: 0,
|
14515
|
+
class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{
|
14516
|
+
'sort-arrow--active': !isAscending(colIdx)
|
14517
|
+
}, "sort-arrow"])
|
14518
|
+
}, null, 8, ["class"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 12, DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_3);
|
14519
|
+
}), 128)), props.contextMenu ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_4, " Options ")) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 4)]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(chunkRowsList(), function (chunk, chunkIndex) {
|
14520
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["unref"])(parts_LazyObserver), {
|
14521
|
+
key: chunkIndex,
|
14522
|
+
class: "data-grid__body"
|
14523
|
+
}, {
|
14524
|
+
html: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
|
14525
|
+
return [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(chunk, function (row, rowIdx) {
|
14526
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
|
14527
|
+
onClick: function onClick($event) {
|
14528
|
+
return emitRowClick(row, rowIdx);
|
14529
|
+
},
|
14530
|
+
class: "data-grid__row",
|
14531
|
+
key: rowIdx,
|
14532
|
+
style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["unref"])(computedColumnsWidth))
|
14533
|
+
}, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(row, function (cell, cellIdx) {
|
14534
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
|
14535
|
+
onClick: function onClick($event) {
|
14536
|
+
return emitCellClick(cell, cellIdx);
|
14537
|
+
},
|
14538
|
+
key: cellIdx,
|
14539
|
+
class: "data-grid__cell"
|
14540
|
+
}, [isCustomSlot(cellIdx) ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, getSlotName(cellIdx), {
|
14541
|
+
key: 0,
|
14542
|
+
item: cell
|
14543
|
+
}) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(cell), 1))], 8, DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_6);
|
14544
|
+
}), 128)), props.contextMenu ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_8, [props.contextMenu ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_context_menu, {
|
14545
|
+
key: 0,
|
14546
|
+
direction: "vertical"
|
14547
|
+
}, {
|
14548
|
+
default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
|
14549
|
+
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "menu", {
|
14550
|
+
row: row
|
14551
|
+
})];
|
14552
|
+
}),
|
14553
|
+
_: 2
|
14554
|
+
}, 1024)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 12, DataGridNew_DataGridvue_type_script_setup_true_lang_js_hoisted_5);
|
14555
|
+
}), 128))];
|
14556
|
+
}),
|
14557
|
+
_: 2
|
14558
|
+
}, 1024);
|
14559
|
+
}), 128))])]);
|
14560
|
+
};
|
14561
|
+
}
|
14562
|
+
|
14563
|
+
/* harmony default export */ var DataGridNew_DataGridvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(DataGridNew_DataGridvue_type_script_setup_true_lang_js_default_, {
|
14564
|
+
props: {
|
14565
|
+
columns: {
|
14566
|
+
required: false,
|
14567
|
+
type: Array
|
14568
|
+
},
|
14569
|
+
rows: {
|
14570
|
+
required: true,
|
14571
|
+
type: Array
|
14572
|
+
},
|
14573
|
+
contextMenu: {
|
14574
|
+
required: false,
|
14575
|
+
type: Boolean,
|
14576
|
+
default: false
|
14577
|
+
},
|
14578
|
+
rowClickHandler: {
|
14579
|
+
required: false,
|
14580
|
+
type: String
|
14581
|
+
},
|
14582
|
+
cellClickHandler: {
|
14583
|
+
required: false,
|
14584
|
+
type: String
|
14585
|
+
},
|
14586
|
+
sortHandlers: {
|
14587
|
+
required: false,
|
14588
|
+
type: Array
|
14589
|
+
},
|
14590
|
+
columnsCount: {
|
14591
|
+
required: true
|
14592
|
+
},
|
14593
|
+
columnsWidth: {
|
14594
|
+
required: false
|
14595
|
+
},
|
14596
|
+
customSlotCols: {
|
14597
|
+
type: Array,
|
14598
|
+
required: false
|
14599
|
+
}
|
14600
|
+
},
|
14601
|
+
setup: DataGridNew_DataGridvue_type_script_setup_true_lang_js_setup
|
14602
|
+
}));
|
14603
|
+
// CONCATENATED MODULE: ./src/components/DataGridNew/DataGrid.vue?vue&type=script&setup=true&lang=js
|
14604
|
+
|
14605
|
+
// EXTERNAL MODULE: ./src/components/DataGridNew/DataGrid.vue?vue&type=style&index=0&id=140938ae&lang=scss&scoped=true
|
14606
|
+
var DataGridvue_type_style_index_0_id_140938ae_lang_scss_scoped_true = __webpack_require__("2207");
|
14607
|
+
|
14608
|
+
// CONCATENATED MODULE: ./src/components/DataGridNew/DataGrid.vue
|
14609
|
+
|
14610
|
+
|
14611
|
+
|
14612
|
+
|
14613
|
+
|
14614
|
+
|
14615
|
+
const DataGridNew_DataGrid_exports_ = /*#__PURE__*/exportHelper_default()(DataGridNew_DataGridvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-140938ae"]])
|
14616
|
+
|
14617
|
+
/* harmony default export */ var DataGridNew_DataGrid = (DataGridNew_DataGrid_exports_);
|
14618
|
+
// CONCATENATED MODULE: ./src/components/DataGridNew/index.js
|
14619
|
+
|
14620
|
+
/* harmony default export */ var DataGridNew = (DataGridNew_DataGrid);
|
14072
14621
|
// CONCATENATED MODULE: ./src/components/index.js
|
14073
14622
|
|
14074
14623
|
|
@@ -14098,6 +14647,7 @@ const EmojiPicker_exports_ = /*#__PURE__*/exportHelper_default()(EmojiPickervue_
|
|
14098
14647
|
|
14099
14648
|
|
14100
14649
|
|
14650
|
+
|
14101
14651
|
|
14102
14652
|
|
14103
14653
|
// CONCATENATED MODULE: ./lib/main.js
|