bkui-vue 1.0.3-beta.61.dialog.1 → 1.0.3-beta.62.dialog.1

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.
@@ -0,0 +1,191 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
2
+ /******/ // The require scope
3
+ /******/ var __webpack_require__ = {};
4
+ /******/
5
+ /************************************************************************/
6
+ /******/ /* webpack/runtime/define property getters */
7
+ /******/ (() => {
8
+ /******/ // define getter functions for harmony exports
9
+ /******/ __webpack_require__.d = (exports, definition) => {
10
+ /******/ for(var key in definition) {
11
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
12
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13
+ /******/ }
14
+ /******/ }
15
+ /******/ };
16
+ /******/ })();
17
+ /******/
18
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
19
+ /******/ (() => {
20
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
21
+ /******/ })();
22
+ /******/
23
+ /************************************************************************/
24
+ var __webpack_exports__ = {};
25
+
26
+ // EXPORTS
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ "default": () => (/* binding */ image_fill)
29
+ });
30
+
31
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
32
+ function _typeof(o) {
33
+ "@babel/helpers - typeof";
34
+
35
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
36
+ return typeof o;
37
+ } : function (o) {
38
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
39
+ }, _typeof(o);
40
+ }
41
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
42
+
43
+ function toPrimitive(t, r) {
44
+ if ("object" != _typeof(t) || !t) return t;
45
+ var e = t[Symbol.toPrimitive];
46
+ if (void 0 !== e) {
47
+ var i = e.call(t, r || "default");
48
+ if ("object" != _typeof(i)) return i;
49
+ throw new TypeError("@@toPrimitive must return a primitive value.");
50
+ }
51
+ return ("string" === r ? String : Number)(t);
52
+ }
53
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
54
+
55
+
56
+ function toPropertyKey(t) {
57
+ var i = toPrimitive(t, "string");
58
+ return "symbol" == _typeof(i) ? i : i + "";
59
+ }
60
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
61
+
62
+ function _defineProperty(obj, key, value) {
63
+ key = toPropertyKey(key);
64
+ if (key in obj) {
65
+ Object.defineProperty(obj, key, {
66
+ value: value,
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true
70
+ });
71
+ } else {
72
+ obj[key] = value;
73
+ }
74
+ return obj;
75
+ }
76
+ ;// CONCATENATED MODULE: external "vue"
77
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
78
+ var y = x => () => x
79
+ const external_vue_namespaceObject = x({ ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps });
80
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
81
+ function _objectWithoutPropertiesLoose(source, excluded) {
82
+ if (source == null) return {};
83
+ var target = {};
84
+ var sourceKeys = Object.keys(source);
85
+ var key, i;
86
+ for (i = 0; i < sourceKeys.length; i++) {
87
+ key = sourceKeys[i];
88
+ if (excluded.indexOf(key) >= 0) continue;
89
+ target[key] = source[key];
90
+ }
91
+ return target;
92
+ }
93
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
94
+
95
+ function _objectWithoutProperties(source, excluded) {
96
+ if (source == null) return {};
97
+ var target = _objectWithoutPropertiesLoose(source, excluded);
98
+ var key, i;
99
+ if (Object.getOwnPropertySymbols) {
100
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
101
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
102
+ key = sourceSymbolKeys[i];
103
+ if (excluded.indexOf(key) >= 0) continue;
104
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
105
+ target[key] = source[key];
106
+ }
107
+ }
108
+ return target;
109
+ }
110
+ ;// CONCATENATED MODULE: ../../packages/icon/icons/icon.tsx
111
+
112
+
113
+ var _excluded = ["data", "name", "width", "height", "fill"];
114
+
115
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
116
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
117
+ /*
118
+ * Tencent is pleased to support the open source community by making
119
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
120
+ *
121
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
122
+ *
123
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
124
+ *
125
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
126
+ *
127
+ * ---------------------------------------------------
128
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
129
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
130
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
131
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
132
+ *
133
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
134
+ * the Software.
135
+ *
136
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
137
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
138
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
139
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
140
+ * IN THE SOFTWARE.
141
+ */
142
+
143
+ function generate(node, key, rootAttrs) {
144
+ return (0,external_vue_namespaceObject.h)(node.name, _objectSpread(_objectSpread({
145
+ key: key
146
+ }, node.attributes), {}, {
147
+ style: "".concat(node.attributes.style, " ").concat(rootAttrs || '')
148
+ }), (node.elements || []).map(function (element, index) {
149
+ return generate(element, "".concat(key, "-").concat(node.name, "-").concat(index));
150
+ }));
151
+ }
152
+ var bkIcon = function bkIcon(props, context) {
153
+ var _context$attrs$props = _objectSpread(_objectSpread({}, context.attrs), props),
154
+ data = _context$attrs$props.data,
155
+ name = _context$attrs$props.name,
156
+ width = _context$attrs$props.width,
157
+ height = _context$attrs$props.height,
158
+ fill = _context$attrs$props.fill,
159
+ restProps = _objectWithoutProperties(_context$attrs$props, _excluded);
160
+ var rootAttrs = "width: ".concat(width, "; height: ").concat(height, "; fill: ").concat(fill);
161
+ var iconBoxStyle = {
162
+ display: 'inline-flex',
163
+ 'align-items': 'center',
164
+ 'justify-content': 'center'
165
+ };
166
+ return (0,external_vue_namespaceObject.createVNode)("span", (0,external_vue_namespaceObject.mergeProps)({
167
+ "style": iconBoxStyle
168
+ }, restProps), [generate(data, name, rootAttrs)]);
169
+ };
170
+ bkIcon.inheritAttrs = false;
171
+ bkIcon.displayName = 'bkIcon';
172
+ /* harmony default export */ const icon = (bkIcon);
173
+ ;// CONCATENATED MODULE: ../../packages/icon/icons/image-fill.tsx
174
+
175
+
176
+ function image_fill_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
177
+ function image_fill_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? image_fill_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : image_fill_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
178
+
179
+ var data = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1303.273","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M664.4363636363637 0C676.8000000000001 0 688.5818181818182 4.945454545454545 697.3090909090909 13.672727272727274L697.3090909090909 13.672727272727274 1010.3272727272728 326.6909090909091C1019.0545454545455 335.41818181818184 1024 347.3454545454546 1024 359.70909090909095L1024 359.70909090909095 1024 1256.7272727272727C1024 1282.4727272727273 1003.2 1303.2727272727273 977.4545454545455 1303.2727272727273L977.4545454545455 1303.2727272727273 46.54545454545455 1303.2727272727273C20.8 1303.2727272727273 0 1282.4727272727273 0 1256.7272727272727L0 1256.7272727272727 0 46.54545454545455C0 20.8 20.8 0 46.54545454545455 0L46.54545454545455 0ZM637.6727272727272 744.7272727272727L474.76363636363635 954.1818181818182 358.40000000000003 814.5454545454546 195.4909090909091 1024 847.1272727272727 1024 637.6727272727272 744.7272727272727ZM465.4545454545455 558.5454545454545C414.041856 558.5454545454545 372.3636363636364 600.2236741818182 372.3636363636364 651.6363636363636 372.3636363636364 703.0490530909091 414.041856 744.7272727272727 465.4545454545455 744.7272727272727 516.8672349090909 744.7272727272727 558.5454545454545 703.0490530909091 558.5454545454545 651.6363636363636 558.5454545454545 600.2236741818182 516.8672349090909 558.5454545454545 465.4545454545455 558.5454545454545ZM642.9090909090909 107.34545454545454L642.9090909090909 381.0909090909091 916.6545454545455 381.0909090909091 642.9090909090909 107.34545454545454Z"}}]}');
180
+ var imageFill = function imageFill(props, context) {
181
+ var p = image_fill_objectSpread(image_fill_objectSpread({}, props), context.attrs);
182
+ return (0,external_vue_namespaceObject.createVNode)(icon, (0,external_vue_namespaceObject.mergeProps)(p, {
183
+ "data": data,
184
+ "name": "imageFill"
185
+ }), null);
186
+ };
187
+ imageFill.displayName = 'imageFill';
188
+ imageFill.inheritAttrs = false;
189
+ /* harmony default export */ const image_fill = (imageFill);
190
+ var __webpack_exports__default = __webpack_exports__["default"];
191
+ export { __webpack_exports__default as default };
@@ -162,6 +162,11 @@ declare const BkTable: {
162
162
  rowDraggable: import("vue-types").VueTypeDef<any> & {
163
163
  default: any;
164
164
  };
165
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
166
+ default: boolean;
167
+ } & {
168
+ default: boolean;
169
+ };
165
170
  }>> & {
166
171
  onDragend?: (_args: {
167
172
  sourceEvent: DragEvent;
@@ -486,6 +491,11 @@ declare const BkTable: {
486
491
  rowDraggable: import("vue-types").VueTypeDef<any> & {
487
492
  default: any;
488
493
  };
494
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
495
+ default: boolean;
496
+ } & {
497
+ default: boolean;
498
+ };
489
499
  }>> & {
490
500
  onDragend?: (_args: {
491
501
  sourceEvent: DragEvent;
@@ -612,6 +622,7 @@ declare const BkTable: {
612
622
  prependStyle: import("vue").CSSProperties;
613
623
  isFlex: boolean;
614
624
  rowDraggable: any;
625
+ shiftMultiChecked: boolean;
615
626
  }, true, {}, {}, {
616
627
  P: {};
617
628
  B: {};
@@ -777,6 +788,11 @@ declare const BkTable: {
777
788
  rowDraggable: import("vue-types").VueTypeDef<any> & {
778
789
  default: any;
779
790
  };
791
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
792
+ default: boolean;
793
+ } & {
794
+ default: boolean;
795
+ };
780
796
  }>> & {
781
797
  onDragend?: (_args: {
782
798
  sourceEvent: DragEvent;
@@ -903,6 +919,7 @@ declare const BkTable: {
903
919
  prependStyle: import("vue").CSSProperties;
904
920
  isFlex: boolean;
905
921
  rowDraggable: any;
922
+ shiftMultiChecked: boolean;
906
923
  }>;
907
924
  __isFragment?: never;
908
925
  __isTeleport?: never;
@@ -1065,6 +1082,11 @@ declare const BkTable: {
1065
1082
  rowDraggable: import("vue-types").VueTypeDef<any> & {
1066
1083
  default: any;
1067
1084
  };
1085
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
1086
+ default: boolean;
1087
+ } & {
1088
+ default: boolean;
1089
+ };
1068
1090
  }>> & {
1069
1091
  onDragend?: (_args: {
1070
1092
  sourceEvent: DragEvent;
@@ -1274,6 +1296,7 @@ declare const BkTable: {
1274
1296
  prependStyle: import("vue").CSSProperties;
1275
1297
  isFlex: boolean;
1276
1298
  rowDraggable: any;
1299
+ shiftMultiChecked: boolean;
1277
1300
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]> & Readonly<{
1278
1301
  Column: import("vue").DefineComponent<{
1279
1302
  label: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
@@ -122,7 +122,7 @@ function defineProperty_defineProperty(obj, key, value) {
122
122
  ;// CONCATENATED MODULE: external "vue"
123
123
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
124
124
  var external_vue_y = x => () => x
125
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["watchEffect"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect });
125
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["watchEffect"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect });
126
126
  ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
127
127
  const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
128
128
  /* harmony default export */ const esm_browser_native = ({
@@ -723,7 +723,11 @@ var tableProps = {
723
723
  /**
724
724
  * 是否支持行拖拽排序
725
725
  */
726
- rowDraggable: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.func, shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.object]).def(false)
726
+ rowDraggable: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.func, shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.object]).def(false),
727
+ /**
728
+ * 是否支持shift键多行选择
729
+ */
730
+ shiftMultiChecked: shared_namespaceObject.PropTypes.bool.def(false)
727
731
  };
728
732
  ;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
729
733
 
@@ -6124,6 +6128,88 @@ function use_head_cell_isSlot(s) {
6124
6128
  getTH: getTH
6125
6129
  };
6126
6130
  });
6131
+ ;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-shift-key.tsx
6132
+ /*
6133
+ * Tencent is pleased to support the open source community by making
6134
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
6135
+ *
6136
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
6137
+ *
6138
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
6139
+ *
6140
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
6141
+ *
6142
+ * ---------------------------------------------------
6143
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6144
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
6145
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
6146
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6147
+ *
6148
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
6149
+ * the Software.
6150
+ *
6151
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
6152
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6153
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
6154
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
6155
+ * IN THE SOFTWARE.
6156
+ */
6157
+
6158
+ /* harmony default export */ const use_shift_key = (function (props) {
6159
+ var isShiftKeyDown = (0,external_vue_namespaceObject.ref)(false);
6160
+ var store = {
6161
+ start: null,
6162
+ end: null
6163
+ };
6164
+ var handleKeyDown = function handleKeyDown(e) {
6165
+ if (e.key === 'Shift') {
6166
+ isShiftKeyDown.value = true;
6167
+ }
6168
+ };
6169
+ var handleKeyUp = function handleKeyUp(e) {
6170
+ if (e.key === 'Shift') {
6171
+ isShiftKeyDown.value = false;
6172
+ clearStore();
6173
+ }
6174
+ };
6175
+ var setStore = function setStore(row, index) {
6176
+ if (store.start === null && store.end === null) {
6177
+ store.start = {
6178
+ index: index,
6179
+ row: row
6180
+ };
6181
+ return false;
6182
+ }
6183
+ store.end = {
6184
+ index: index,
6185
+ row: row
6186
+ };
6187
+ return true;
6188
+ };
6189
+ var clearStore = function clearStore() {
6190
+ store.start = null;
6191
+ store.end = null;
6192
+ };
6193
+ if (props.shiftMultiChecked) {
6194
+ window.addEventListener('keydown', handleKeyDown);
6195
+ window.addEventListener('keyup', handleKeyUp);
6196
+ }
6197
+ var getStore = function getStore() {
6198
+ return store;
6199
+ };
6200
+ (0,external_vue_namespaceObject.onUnmounted)(function () {
6201
+ if (props.shiftMultiChecked) {
6202
+ window.removeEventListener('keydown', handleKeyDown);
6203
+ window.removeEventListener('keyup', handleKeyUp);
6204
+ }
6205
+ });
6206
+ return {
6207
+ isShiftKeyDown: isShiftKeyDown,
6208
+ setStore: setStore,
6209
+ getStore: getStore,
6210
+ clearStore: clearStore
6211
+ };
6212
+ });
6127
6213
  ;// CONCATENATED MODULE: ../../packages/table/src/use-render.tsx
6128
6214
 
6129
6215
 
@@ -6175,6 +6261,7 @@ function use_render_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
6175
6261
 
6176
6262
 
6177
6263
 
6264
+
6178
6265
  function use_render_isSlot(s) {
6179
6266
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
6180
6267
  }
@@ -6190,6 +6277,10 @@ function use_render_isSlot(s) {
6190
6277
  var settings = (0,external_vue_namespaceObject.computed)(function () {
6191
6278
  return formatData.value.settings;
6192
6279
  });
6280
+ var _useShiftKey = use_shift_key(props),
6281
+ isShiftKeyDown = _useShiftKey.isShiftKeyDown,
6282
+ getStore = _useShiftKey.getStore,
6283
+ setStore = _useShiftKey.setStore;
6193
6284
  // const activeSortIndex = ref(null);
6194
6285
  /**
6195
6286
  * 过滤当前可渲染的列
@@ -6613,6 +6704,38 @@ function use_render_isSlot(s) {
6613
6704
  data: props.data
6614
6705
  });
6615
6706
  };
6707
+ var beforeRowChange = function beforeRowChange() {
6708
+ if (isShiftKeyDown.value && !isAll) {
6709
+ var result = setStore(row, index);
6710
+ if (result) {
6711
+ var _tableResp$pageData$s;
6712
+ var _getStore = getStore(),
6713
+ start = _getStore.start,
6714
+ end = _getStore.end;
6715
+ var startIndex = start.index < end.index ? start.index : end.index;
6716
+ var endIndex = start.index < end.index ? end.index : start.index;
6717
+ ((_tableResp$pageData$s = tableResp.pageData.slice(startIndex, endIndex + 1)) !== null && _tableResp$pageData$s !== void 0 ? _tableResp$pageData$s : []).forEach(function (item) {
6718
+ tableResp.setRowSelection(item, true);
6719
+ });
6720
+ }
6721
+ context.emit(EMIT_EVENTS.ROW_SELECT, {
6722
+ row: row,
6723
+ index: index,
6724
+ checked: true,
6725
+ data: props.data,
6726
+ isShiftKeyDown: true
6727
+ });
6728
+ context.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
6729
+ row: row,
6730
+ index: index,
6731
+ checked: true,
6732
+ data: props.data,
6733
+ isShiftKeyDown: true
6734
+ });
6735
+ return Promise.resolve(!result);
6736
+ }
6737
+ return Promise.resolve(true);
6738
+ };
6616
6739
  var indeterminate = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE);
6617
6740
  var isChecked = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION);
6618
6741
  var isEnable = isRowSelectEnable(props, {
@@ -6624,7 +6747,8 @@ function use_render_isSlot(s) {
6624
6747
  "onChange": handleChecked,
6625
6748
  "disabled": !isEnable,
6626
6749
  "modelValue": isChecked,
6627
- "indeterminate": indeterminate
6750
+ "indeterminate": indeterminate,
6751
+ "beforeChange": beforeRowChange
6628
6752
  }, null);
6629
6753
  };
6630
6754
  var renderExpandColumn = function renderExpandColumn(row, column, index, rows) {
@@ -0,0 +1,11 @@
1
+ import { TablePropTypes } from '../props';
2
+ declare const _default: (props: TablePropTypes) => {
3
+ isShiftKeyDown: import("vue").Ref<boolean>;
4
+ setStore: (row: any, index: number) => boolean;
5
+ getStore: () => {
6
+ start: any;
7
+ end: any;
8
+ };
9
+ clearStore: () => void;
10
+ };
11
+ export default _default;
@@ -560,5 +560,13 @@ export declare const tableProps: {
560
560
  rowDraggable: import("vue-types").VueTypeDef<any> & {
561
561
  default: any;
562
562
  };
563
+ /**
564
+ * 是否支持shift键多行选择
565
+ */
566
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
567
+ default: boolean;
568
+ } & {
569
+ default: boolean;
570
+ };
563
571
  };
564
572
  export {};
@@ -157,6 +157,11 @@ declare const _default: import("vue").DefineComponent<{
157
157
  rowDraggable: import("vue-types").VueTypeDef<any> & {
158
158
  default: any;
159
159
  };
160
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
161
+ default: boolean;
162
+ } & {
163
+ default: boolean;
164
+ };
160
165
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
161
166
  columnPick: (_cols: import("./props").IColumnActive[]) => boolean;
162
167
  columnFilter: (_args: {
@@ -398,6 +403,11 @@ declare const _default: import("vue").DefineComponent<{
398
403
  rowDraggable: import("vue-types").VueTypeDef<any> & {
399
404
  default: any;
400
405
  };
406
+ shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
407
+ default: boolean;
408
+ } & {
409
+ default: boolean;
410
+ };
401
411
  }>> & {
402
412
  onDragend?: (_args: {
403
413
  sourceEvent: DragEvent;
@@ -524,5 +534,6 @@ declare const _default: import("vue").DefineComponent<{
524
534
  prependStyle: import("vue").CSSProperties;
525
535
  isFlex: boolean;
526
536
  rowDraggable: any;
537
+ shiftMultiChecked: boolean;
527
538
  }, {}>;
528
539
  export default _default;
@@ -684,7 +684,11 @@ var tableProps = {
684
684
  /**
685
685
  * 是否支持行拖拽排序
686
686
  */
687
- rowDraggable: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.func, shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.object]).def(false)
687
+ rowDraggable: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.func, shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.object]).def(false),
688
+ /**
689
+ * 是否支持shift键多行选择
690
+ */
691
+ shiftMultiChecked: shared_namespaceObject.PropTypes.bool.def(false)
688
692
  };
689
693
  ;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
690
694
 
@@ -115,6 +115,11 @@ declare const BkTree: {
115
115
  } & {
116
116
  default: boolean;
117
117
  };
118
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
119
+ default: boolean;
120
+ } & {
121
+ default: boolean;
122
+ };
118
123
  }>> & {
119
124
  onNodeClick?: (...args: any[]) => any;
120
125
  onNodeCollapse?: (...args: any[]) => any;
@@ -249,6 +254,11 @@ declare const BkTree: {
249
254
  } & {
250
255
  default: boolean;
251
256
  };
257
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
258
+ default: boolean;
259
+ } & {
260
+ default: boolean;
261
+ };
252
262
  }>> & {
253
263
  onNodeClick?: (...args: any[]) => any;
254
264
  onNodeCollapse?: (...args: any[]) => any;
@@ -285,6 +295,7 @@ declare const BkTree: {
285
295
  expandAll: boolean;
286
296
  nodeContentAction: any;
287
297
  keepSlotData: boolean;
298
+ checkStrictly: boolean;
288
299
  }, true, {}, {}, {
289
300
  P: {};
290
301
  B: {};
@@ -408,6 +419,11 @@ declare const BkTree: {
408
419
  } & {
409
420
  default: boolean;
410
421
  };
422
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
423
+ default: boolean;
424
+ } & {
425
+ default: boolean;
426
+ };
411
427
  }>> & {
412
428
  onNodeClick?: (...args: any[]) => any;
413
429
  onNodeCollapse?: (...args: any[]) => any;
@@ -444,6 +460,7 @@ declare const BkTree: {
444
460
  expandAll: boolean;
445
461
  nodeContentAction: any;
446
462
  keepSlotData: boolean;
463
+ checkStrictly: boolean;
447
464
  }>;
448
465
  __isFragment?: never;
449
466
  __isTeleport?: never;
@@ -564,6 +581,11 @@ declare const BkTree: {
564
581
  } & {
565
582
  default: boolean;
566
583
  };
584
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
585
+ default: boolean;
586
+ } & {
587
+ default: boolean;
588
+ };
567
589
  }>> & {
568
590
  onNodeClick?: (...args: any[]) => any;
569
591
  onNodeCollapse?: (...args: any[]) => any;
@@ -609,5 +631,6 @@ declare const BkTree: {
609
631
  expandAll: boolean;
610
632
  nodeContentAction: any;
611
633
  keepSlotData: boolean;
634
+ checkStrictly: boolean;
612
635
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]>;
613
636
  export default BkTree;
package/lib/tree/index.js CHANGED
@@ -364,7 +364,11 @@ var treeProps = {
364
364
  * 如果设置为false,则作用域插槽参数格式为: { ...node, ...attributes }
365
365
  * attributes 为节点内置属性,包含节点是否展开,是否选中,是否有子节点等等
366
366
  */
367
- keepSlotData: shared_namespaceObject.PropTypes.bool.def(false)
367
+ keepSlotData: shared_namespaceObject.PropTypes.bool.def(false),
368
+ /**
369
+ * 在显示复选框的情况下,是否严格的遵循父子互相关联的做法
370
+ */
371
+ checkStrictly: shared_namespaceObject.PropTypes.bool.def(true)
368
372
  };
369
373
  ;// CONCATENATED MODULE: external "../exception"
370
374
  var exception_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
@@ -1230,7 +1234,9 @@ var use_node_action_this = undefined;
1230
1234
  if (value) {
1231
1235
  setNodeAttr(item, NODE_ATTRIBUTES.IS_INDETERMINATE, false);
1232
1236
  }
1233
- deepUpdateChildNode(item, [NODE_ATTRIBUTES.IS_CHECKED, NODE_ATTRIBUTES.IS_INDETERMINATE], [!!value, false]);
1237
+ if (props.checkStrictly) {
1238
+ deepUpdateChildNode(item, [NODE_ATTRIBUTES.IS_CHECKED, NODE_ATTRIBUTES.IS_INDETERMINATE], [!!value, false]);
1239
+ }
1234
1240
  updateParentChecked(item, value);
1235
1241
  ctx.emit(EVENTS.NODE_CHECKED, flatData.data.filter(function (t) {
1236
1242
  return isNodeChecked(t);
@@ -2186,7 +2192,7 @@ var use_tree_init_this = undefined;
2186
2192
  }
2187
2193
  }
2188
2194
  flatten(treeData !== null && treeData !== void 0 ? treeData : data);
2189
- if (props.showCheckbox !== false) {
2195
+ if (props.showCheckbox !== false && props.checkStrictly) {
2190
2196
  checkedList === null || checkedList === void 0 || checkedList.forEach(function (value) {
2191
2197
  loopUpdateNodeAttr(value, NODE_ATTRIBUTES.IS_CHECKED, true, loopUpdateCheckedEvent);
2192
2198
  });
@@ -214,6 +214,14 @@ export declare const treeProps: {
214
214
  } & {
215
215
  default: boolean;
216
216
  };
217
+ /**
218
+ * 在显示复选框的情况下,是否严格的遵循父子互相关联的做法
219
+ */
220
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
221
+ default: boolean;
222
+ } & {
223
+ default: boolean;
224
+ };
217
225
  };
218
226
  type AsyncOption = {
219
227
  callback: (item: any, cb: any) => Promise<any>;
@@ -120,6 +120,11 @@ declare const _default: import("vue").DefineComponent<{
120
120
  } & {
121
121
  default: boolean;
122
122
  };
123
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
124
+ default: boolean;
125
+ } & {
126
+ default: boolean;
127
+ };
123
128
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
124
129
  nodeClick: (..._args: any[]) => boolean;
125
130
  nodeCollapse: (..._args: any[]) => boolean;
@@ -245,6 +250,11 @@ declare const _default: import("vue").DefineComponent<{
245
250
  } & {
246
251
  default: boolean;
247
252
  };
253
+ checkStrictly: import("vue-types").VueTypeValidableDef<boolean> & {
254
+ default: boolean;
255
+ } & {
256
+ default: boolean;
257
+ };
248
258
  }>> & {
249
259
  onNodeClick?: (...args: any[]) => any;
250
260
  onNodeCollapse?: (...args: any[]) => any;
@@ -281,5 +291,6 @@ declare const _default: import("vue").DefineComponent<{
281
291
  expandAll: boolean;
282
292
  nodeContentAction: any;
283
293
  keepSlotData: boolean;
294
+ checkStrictly: boolean;
284
295
  }, {}>;
285
296
  export default _default;