bkui-vue 1.0.3-beta.68.dialog.2 → 1.0.3-beta.68.dialog.3
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/index.cjs.js +30 -30
- package/dist/index.esm.js +4777 -4887
- package/dist/index.umd.js +28 -28
- package/lib/radio/index.d.ts +14 -0
- package/lib/radio/index.js +15 -7
- package/lib/radio/radio-button.d.ts +10 -0
- package/lib/radio/radio-group.d.ts +10 -0
- package/lib/shared/index.js +3 -0
- package/lib/table/components/table-column.d.ts +3 -119
- package/lib/table/const.d.ts +3 -3
- package/lib/table/index.d.ts +1 -105
- package/lib/table/index.js +17624 -561
- package/lib/table/plugins/use-active-columns.d.ts +2 -2
- package/lib/table/plugins/use-column-template.d.ts +7 -0
- package/lib/table/use-column.d.ts +9 -10
- package/lib/table/use-common.d.ts +1 -1
- package/lib/table-column/index.d.ts +3 -293
- package/lib/table-column/index.js +18 -280
- package/package.json +1 -1
@@ -35,6 +35,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
35
35
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
36
36
|
var y = x => () => x
|
37
37
|
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
38
|
+
;// CONCATENATED MODULE: external "vue"
|
39
|
+
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
40
|
+
var external_vue_y = x => () => x
|
41
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["onUpdated"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUpdated, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive });
|
38
42
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
39
43
|
function _typeof(o) {
|
40
44
|
"@babel/helpers - typeof";
|
@@ -80,98 +84,6 @@ function _defineProperty(obj, key, value) {
|
|
80
84
|
}
|
81
85
|
return obj;
|
82
86
|
}
|
83
|
-
;// CONCATENATED MODULE: external "vue"
|
84
|
-
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
85
|
-
var external_vue_y = x => () => x
|
86
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref });
|
87
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
88
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
89
|
-
/* harmony default export */ const esm_browser_native = ({
|
90
|
-
randomUUID
|
91
|
-
});
|
92
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
|
93
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
94
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
95
|
-
// generators (like Math.random()).
|
96
|
-
let getRandomValues;
|
97
|
-
const rnds8 = new Uint8Array(16);
|
98
|
-
function rng() {
|
99
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
100
|
-
if (!getRandomValues) {
|
101
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
102
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
103
|
-
|
104
|
-
if (!getRandomValues) {
|
105
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
return getRandomValues(rnds8);
|
110
|
-
}
|
111
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
|
112
|
-
|
113
|
-
/**
|
114
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
115
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
116
|
-
*/
|
117
|
-
|
118
|
-
const byteToHex = [];
|
119
|
-
|
120
|
-
for (let i = 0; i < 256; ++i) {
|
121
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
122
|
-
}
|
123
|
-
|
124
|
-
function unsafeStringify(arr, offset = 0) {
|
125
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
126
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
127
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
128
|
-
}
|
129
|
-
|
130
|
-
function stringify(arr, offset = 0) {
|
131
|
-
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
132
|
-
// of the following:
|
133
|
-
// - One or more input array values don't map to a hex octet (leading to
|
134
|
-
// "undefined" in the uuid)
|
135
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
136
|
-
|
137
|
-
if (!validate(uuid)) {
|
138
|
-
throw TypeError('Stringified UUID is invalid');
|
139
|
-
}
|
140
|
-
|
141
|
-
return uuid;
|
142
|
-
}
|
143
|
-
|
144
|
-
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
145
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
function v4(options, buf, offset) {
|
151
|
-
if (esm_browser_native.randomUUID && !buf && !options) {
|
152
|
-
return esm_browser_native.randomUUID();
|
153
|
-
}
|
154
|
-
|
155
|
-
options = options || {};
|
156
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
157
|
-
|
158
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
159
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
160
|
-
|
161
|
-
if (buf) {
|
162
|
-
offset = offset || 0;
|
163
|
-
|
164
|
-
for (let i = 0; i < 16; ++i) {
|
165
|
-
buf[offset + i] = rnds[i];
|
166
|
-
}
|
167
|
-
|
168
|
-
return buf;
|
169
|
-
}
|
170
|
-
|
171
|
-
return unsafeStringify(rnds);
|
172
|
-
}
|
173
|
-
|
174
|
-
/* harmony default export */ const esm_browser_v4 = (v4);
|
175
87
|
;// CONCATENATED MODULE: ../../packages/table/src/const.ts
|
176
88
|
|
177
89
|
/*
|
@@ -293,9 +205,9 @@ var createDefaultSizeList = function createDefaultSizeList(t) {
|
|
293
205
|
/**
|
294
206
|
* Provide key: init column when use <column { ...props }> template
|
295
207
|
*/
|
296
|
-
var PROVIDE_KEY_INIT_COL = '
|
297
|
-
var PROVIDE_KEY_TB_CACHE = '
|
298
|
-
var BK_COLUMN_UPDATE_DEFINE = '
|
208
|
+
var PROVIDE_KEY_INIT_COL = Symbol('bkInitColumns');
|
209
|
+
var PROVIDE_KEY_TB_CACHE = Symbol('bkTableCahce');
|
210
|
+
var BK_COLUMN_UPDATE_DEFINE = Symbol('bkColumnUpdateDefine');
|
299
211
|
/**
|
300
212
|
* 表格底部高度
|
301
213
|
* 分页组件
|
@@ -692,8 +604,6 @@ var tableProps = {
|
|
692
604
|
};
|
693
605
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
694
606
|
|
695
|
-
|
696
|
-
|
697
607
|
/*
|
698
608
|
* Tencent is pleased to support the open source community by making
|
699
609
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -723,7 +633,6 @@ var tableProps = {
|
|
723
633
|
|
724
634
|
|
725
635
|
|
726
|
-
|
727
636
|
var TableColumnProp = {
|
728
637
|
label: LabelFunctionStringType,
|
729
638
|
field: LabelFunctionStringType,
|
@@ -742,200 +651,29 @@ var TableColumnProp = {
|
|
742
651
|
align: TableAlign,
|
743
652
|
className: RowClassFunctionStringType,
|
744
653
|
prop: LabelFunctionStringType,
|
745
|
-
index: shared_namespaceObject.PropTypes.number.def(undefined)
|
746
|
-
uniqueId: shared_namespaceObject.PropTypes.object.def({
|
747
|
-
val: ''
|
748
|
-
})
|
654
|
+
index: shared_namespaceObject.PropTypes.number.def(undefined)
|
749
655
|
};
|
750
656
|
/* harmony default export */ const table_column = ((0,external_vue_namespaceObject.defineComponent)({
|
751
657
|
name: 'TableColumn',
|
752
658
|
props: TableColumnProp,
|
753
659
|
setup: function setup(props) {
|
754
|
-
var
|
755
|
-
var _rm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
756
|
-
}, false);
|
757
|
-
var bkTableCache = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_TB_CACHE, {
|
758
|
-
queueStack: function queueStack(_, fn) {
|
759
|
-
return fn === null || fn === void 0 ? void 0 : fn();
|
760
|
-
}
|
761
|
-
});
|
660
|
+
var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
|
762
661
|
var column = (0,external_vue_namespaceObject.reactive)(Object.assign({}, props, {
|
763
662
|
field: props.prop || props.field
|
764
663
|
}));
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
664
|
+
(0,external_vue_namespaceObject.onMounted)(function () {
|
665
|
+
initTableColumns();
|
666
|
+
});
|
667
|
+
(0,external_vue_namespaceObject.onUpdated)(function () {
|
668
|
+
initTableColumns();
|
669
|
+
});
|
670
|
+
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
671
|
+
initTableColumns();
|
672
|
+
});
|
769
673
|
return {
|
770
|
-
isIndexPropChanged: isIndexPropChanged,
|
771
|
-
setIsIndexChanged: setIsIndexChanged,
|
772
|
-
initColumns: initColumns,
|
773
|
-
bkTableCache: bkTableCache,
|
774
674
|
column: column
|
775
675
|
};
|
776
676
|
},
|
777
|
-
watch: {
|
778
|
-
index: {
|
779
|
-
handler: function handler() {
|
780
|
-
this.setIsIndexChanged(!this.isIndexPropChanged);
|
781
|
-
},
|
782
|
-
deep: true
|
783
|
-
}
|
784
|
-
},
|
785
|
-
unmounted: function unmounted() {
|
786
|
-
this.updateColumnDefine(true);
|
787
|
-
},
|
788
|
-
mounted: function mounted() {
|
789
|
-
this.setNodeUid();
|
790
|
-
this.updateColumnDefine();
|
791
|
-
},
|
792
|
-
updated: function updated() {
|
793
|
-
if (this.isIndexPropChanged) {
|
794
|
-
this.updateColumnDefineByParent();
|
795
|
-
this.setIsIndexChanged(!this.isIndexPropChanged);
|
796
|
-
}
|
797
|
-
},
|
798
|
-
methods: {
|
799
|
-
updateColumnDefine: function updateColumnDefine() {
|
800
|
-
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
801
|
-
if (unmounted) {
|
802
|
-
this.unmountColumn();
|
803
|
-
return;
|
804
|
-
}
|
805
|
-
this.updateColumnDefineByParent();
|
806
|
-
},
|
807
|
-
copyProps: function copyProps(props) {
|
808
|
-
return Object.keys(props !== null && props !== void 0 ? props : {}).reduce(function (result, key) {
|
809
|
-
var target = key.replace(/-(\w)/g, function (_, letter) {
|
810
|
-
return letter.toUpperCase();
|
811
|
-
});
|
812
|
-
return Object.assign(result, _defineProperty({}, target, props[key]));
|
813
|
-
}, {});
|
814
|
-
},
|
815
|
-
rsolveIndexedColumn: function rsolveIndexedColumn() {
|
816
|
-
// 如果是设置了Index,则先添加Index列,不做自动递归读取Column
|
817
|
-
if (/\d+\.?\d*/.test("".concat(this.$props.index))) {
|
818
|
-
var _props$render;
|
819
|
-
var props = this.$.vnode.props;
|
820
|
-
var resolveProp = Object.assign({}, this.copyProps(props), {
|
821
|
-
field: props.prop || props.field,
|
822
|
-
render: (_props$render = props.render) !== null && _props$render !== void 0 ? _props$render : this.$slots["default"],
|
823
|
-
uniqueId: this.getNodeCtxUid(this.$.ctx)
|
824
|
-
});
|
825
|
-
this.initColumns(resolveProp);
|
826
|
-
return false;
|
827
|
-
}
|
828
|
-
return true;
|
829
|
-
},
|
830
|
-
setNodeUid: function setNodeUid() {
|
831
|
-
var ctx = this.$.ctx;
|
832
|
-
if (!ctx) {
|
833
|
-
return;
|
834
|
-
}
|
835
|
-
if (ctx.uniqueId && !ctx.uniqueId.val) {
|
836
|
-
ctx.uniqueId.val = esm_browser_v4();
|
837
|
-
}
|
838
|
-
if (!ctx.uniqueId) {
|
839
|
-
Object.assign(ctx, {
|
840
|
-
uniqueId: {
|
841
|
-
val: esm_browser_v4()
|
842
|
-
}
|
843
|
-
});
|
844
|
-
}
|
845
|
-
},
|
846
|
-
getNodeCtxUid: function getNodeCtxUid(ctx) {
|
847
|
-
var _ctx$uniqueId;
|
848
|
-
return ctx === null || ctx === void 0 || (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
|
849
|
-
},
|
850
|
-
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
851
|
-
var _this = this;
|
852
|
-
if (!this.rsolveIndexedColumn()) {
|
853
|
-
return;
|
854
|
-
}
|
855
|
-
var fn = function fn() {
|
856
|
-
// @ts-ignore
|
857
|
-
var selfVnode = _this.$;
|
858
|
-
var getTableNode = function getTableNode(root) {
|
859
|
-
var _parentVnode$type;
|
860
|
-
if (root === document.body || !root) {
|
861
|
-
return null;
|
862
|
-
}
|
863
|
-
var parentVnode = root.parent;
|
864
|
-
if (((_parentVnode$type = parentVnode.type) === null || _parentVnode$type === void 0 ? void 0 : _parentVnode$type.name) === 'Table') {
|
865
|
-
return parentVnode.vnode;
|
866
|
-
}
|
867
|
-
return getTableNode(parentVnode);
|
868
|
-
};
|
869
|
-
var getNodeUid = function getNodeUid(node) {
|
870
|
-
return _this.getNodeCtxUid(node.ctx);
|
871
|
-
};
|
872
|
-
var tableNode = getTableNode(selfVnode);
|
873
|
-
if (!tableNode) {
|
874
|
-
return;
|
875
|
-
}
|
876
|
-
var sortColumns = [];
|
877
|
-
var index = 0;
|
878
|
-
var resolveChildNode = function resolveChildNode(node) {
|
879
|
-
var _node$type;
|
880
|
-
if (!node) {
|
881
|
-
return null;
|
882
|
-
}
|
883
|
-
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
884
|
-
var _node$props$render, _node$children;
|
885
|
-
var resolveProp = Object.assign({
|
886
|
-
index: index
|
887
|
-
}, _this.copyProps(node.props), {
|
888
|
-
field: node.props.prop || node.props.field,
|
889
|
-
render: (_node$props$render = node.props.render) !== null && _node$props$render !== void 0 ? _node$props$render : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"],
|
890
|
-
uniqueId: getNodeUid(node)
|
891
|
-
});
|
892
|
-
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
893
|
-
index = index + 1;
|
894
|
-
return null;
|
895
|
-
}
|
896
|
-
if (Array.isArray(node === null || node === void 0 ? void 0 : node.children)) {
|
897
|
-
return node.children;
|
898
|
-
}
|
899
|
-
if ((0,external_vue_namespaceObject.isVNode)(node) && node !== null && node !== void 0 && node.children && _typeof(node === null || node === void 0 ? void 0 : node.children) === 'object') {
|
900
|
-
return Object.keys(node.children).map(function (key) {
|
901
|
-
return node.children[key];
|
902
|
-
});
|
903
|
-
}
|
904
|
-
if (typeof node === 'function') {
|
905
|
-
return node();
|
906
|
-
}
|
907
|
-
return null;
|
908
|
-
};
|
909
|
-
var reduceColumns = function reduceColumns(nodes) {
|
910
|
-
if (!Array.isArray(nodes)) {
|
911
|
-
var children = resolveChildNode(nodes);
|
912
|
-
if (children) {
|
913
|
-
reduceColumns(children);
|
914
|
-
}
|
915
|
-
return;
|
916
|
-
}
|
917
|
-
nodes === null || nodes === void 0 || nodes.forEach(function (node) {
|
918
|
-
return reduceColumns(node);
|
919
|
-
});
|
920
|
-
};
|
921
|
-
reduceColumns(tableNode);
|
922
|
-
_this.initColumns(sortColumns);
|
923
|
-
};
|
924
|
-
if (typeof this.bkTableCache.queueStack === 'function') {
|
925
|
-
this.bkTableCache.queueStack(BK_COLUMN_UPDATE_DEFINE, fn);
|
926
|
-
}
|
927
|
-
},
|
928
|
-
unmountColumn: function unmountColumn() {
|
929
|
-
var _props$render2;
|
930
|
-
var props = this.$.vnode.props;
|
931
|
-
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
932
|
-
field: props.prop || props.field,
|
933
|
-
render: (_props$render2 = props.render) !== null && _props$render2 !== void 0 ? _props$render2 : this.$slots["default"],
|
934
|
-
uniqueId: this.getNodeCtxUid(this.$.ctx)
|
935
|
-
});
|
936
|
-
this.initColumns(resolveProp, true);
|
937
|
-
}
|
938
|
-
},
|
939
677
|
render: function render() {
|
940
678
|
var _this$$slots$default, _this$$slots;
|
941
679
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots, {
|