@king-design/intact 3.1.1 → 3.1.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/components/affix/styles.ts +4 -2
- package/components/badge/index.vdt +1 -1
- package/components/badge/styles.ts +4 -3
- package/components/breadcrumb/index.vdt +1 -1
- package/components/breadcrumb/styles.ts +4 -2
- package/components/button/styles.ts +7 -5
- package/components/card/styles.ts +4 -2
- package/components/carousel/styles.ts +7 -4
- package/components/cascader/index.vdt +2 -1
- package/components/cascader/styles.ts +7 -4
- package/components/checkbox/index.vdt +1 -1
- package/components/checkbox/styles.ts +4 -2
- package/components/code/styles.ts +3 -2
- package/components/collapse/index.spec.ts +1 -1
- package/components/collapse/item.vdt +1 -1
- package/components/collapse/styles.ts +16 -12
- package/components/colorpicker/styles.ts +7 -4
- package/components/copy/styles.ts +3 -2
- package/components/datepicker/styles.ts +10 -6
- package/components/diagram/styles.ts +3 -2
- package/components/dialog/index.spec.ts +30 -0
- package/components/dialog/styles.ts +10 -6
- package/components/dialog/usePosition.ts +4 -0
- package/components/drawer/styles.ts +4 -2
- package/components/dropdown/styles.ts +7 -4
- package/components/dropdown/usePosition.ts +19 -9
- package/components/editable/styles.ts +4 -2
- package/components/form/styles.ts +7 -4
- package/components/grid/styles.ts +12 -9
- package/components/icon/index.vdt +1 -1
- package/components/icon/styles.ts +4 -2
- package/components/input/styles.ts +8 -5
- package/components/layout/styles.ts +13 -9
- package/components/menu/demos/recursive.md +340 -0
- package/components/menu/styles.ts +21 -16
- package/components/message/styles.ts +7 -5
- package/components/pagination/styles.ts +4 -2
- package/components/popover/content.vdt +1 -1
- package/components/popover/styles.ts +4 -2
- package/components/portal.ts +16 -3
- package/components/progress/styles.ts +4 -4
- package/components/radio/styles.ts +4 -2
- package/components/rate/styles.ts +4 -2
- package/components/scrollSelect/styles.ts +4 -2
- package/components/select/base.ts +3 -2
- package/components/select/base.vdt +1 -1
- package/components/select/styles.ts +10 -6
- package/components/skeleton/styles.ts +7 -4
- package/components/slider/styles.ts +4 -2
- package/components/spin/styles.ts +4 -4
- package/components/spinner/styles.ts +4 -3
- package/components/split/styles.ts +4 -2
- package/components/steps/index.vdt +2 -2
- package/components/steps/styles.ts +7 -5
- package/components/switch/styles.ts +4 -2
- package/components/table/column.ts +2 -0
- package/components/table/column.vdt +7 -3
- package/components/table/demos/basic.md +2 -2
- package/components/table/demos/fixColumn.md +3 -1
- package/components/table/demos/groupHeader.md +11 -11
- package/components/table/demos/scheme.md +1 -1
- package/components/table/index.spec.ts +8 -3
- package/components/table/styles.ts +11 -8
- package/components/table/table.vdt +3 -4
- package/components/table/useColumns.ts +1 -0
- package/components/table/useFixedColumns.ts +27 -49
- package/components/table/useGroup.ts +5 -0
- package/components/table/useResizable.ts +38 -10
- package/components/table/useWidth.ts +3 -0
- package/components/tabs/styles.ts +4 -2
- package/components/tag/styles.ts +7 -4
- package/components/timeline/styles.ts +7 -5
- package/components/timepicker/styles.ts +4 -2
- package/components/tip/styles.ts +4 -2
- package/components/tooltip/content.vdt +1 -1
- package/components/tooltip/styles.ts +4 -2
- package/components/transfer/styles.ts +4 -2
- package/components/tree/demos/checkbox.md +1 -0
- package/components/tree/demos/contextmenu.md +10 -1
- package/components/tree/index.spec.ts +7 -0
- package/components/tree/styles.ts +4 -2
- package/components/tree/useChecked.ts +3 -0
- package/components/treeSelect/styles.ts +4 -2
- package/components/upload/styles.ts +7 -4
- package/components/upload/useFiles.ts +3 -2
- package/components/utils.ts +10 -4
- package/components/wave/styles.ts +4 -2
- package/es/components/affix/styles.d.ts +4 -1
- package/es/components/affix/styles.js +4 -2
- package/es/components/badge/index.vdt.js +1 -1
- package/es/components/badge/styles.d.ts +4 -1
- package/es/components/badge/styles.js +4 -2
- package/es/components/breadcrumb/index.vdt.js +1 -1
- package/es/components/breadcrumb/styles.d.ts +4 -1
- package/es/components/breadcrumb/styles.js +4 -2
- package/es/components/button/styles.d.ts +8 -2
- package/es/components/button/styles.js +7 -4
- package/es/components/card/styles.d.ts +4 -1
- package/es/components/card/styles.js +4 -2
- package/es/components/carousel/styles.d.ts +8 -2
- package/es/components/carousel/styles.js +7 -4
- package/es/components/cascader/index.vdt.js +3 -1
- package/es/components/cascader/styles.d.ts +8 -2
- package/es/components/cascader/styles.js +7 -4
- package/es/components/checkbox/index.vdt.js +1 -1
- package/es/components/checkbox/styles.d.ts +4 -1
- package/es/components/checkbox/styles.js +4 -2
- package/es/components/code/styles.d.ts +4 -1
- package/es/components/code/styles.js +3 -2
- package/es/components/collapse/index.spec.js +1 -1
- package/es/components/collapse/item.vdt.js +3 -3
- package/es/components/collapse/styles.d.ts +8 -2
- package/es/components/collapse/styles.js +11 -8
- package/es/components/colorpicker/styles.d.ts +8 -2
- package/es/components/colorpicker/styles.js +7 -4
- package/es/components/copy/styles.d.ts +4 -1
- package/es/components/copy/styles.js +3 -2
- package/es/components/datepicker/styles.d.ts +12 -3
- package/es/components/datepicker/styles.js +10 -6
- package/es/components/diagram/styles.d.ts +4 -1
- package/es/components/diagram/styles.js +3 -2
- package/es/components/dialog/index.spec.js +61 -1
- package/es/components/dialog/styles.d.ts +12 -3
- package/es/components/dialog/styles.js +10 -6
- package/es/components/dialog/usePosition.js +7 -0
- package/es/components/drawer/styles.d.ts +4 -1
- package/es/components/drawer/styles.js +4 -2
- package/es/components/dropdown/styles.d.ts +8 -2
- package/es/components/dropdown/styles.js +7 -4
- package/es/components/dropdown/usePosition.js +14 -11
- package/es/components/editable/styles.d.ts +4 -1
- package/es/components/editable/styles.js +4 -2
- package/es/components/form/styles.d.ts +8 -2
- package/es/components/form/styles.js +7 -4
- package/es/components/grid/styles.d.ts +8 -2
- package/es/components/grid/styles.js +12 -13
- package/es/components/icon/index.vdt.js +1 -1
- package/es/components/icon/styles.d.ts +4 -1
- package/es/components/icon/styles.js +4 -2
- package/es/components/input/styles.d.ts +8 -2
- package/es/components/input/styles.js +7 -4
- package/es/components/layout/styles.d.ts +16 -4
- package/es/components/layout/styles.js +13 -8
- package/es/components/menu/styles.d.ts +16 -4
- package/es/components/menu/styles.js +14 -9
- package/es/components/message/styles.d.ts +8 -2
- package/es/components/message/styles.js +7 -4
- package/es/components/pagination/styles.d.ts +4 -1
- package/es/components/pagination/styles.js +4 -2
- package/es/components/popover/content.vdt.js +1 -1
- package/es/components/popover/styles.d.ts +4 -1
- package/es/components/popover/styles.js +4 -2
- package/es/components/portal.js +15 -3
- package/es/components/progress/styles.d.ts +4 -1
- package/es/components/progress/styles.js +4 -2
- package/es/components/radio/styles.d.ts +4 -1
- package/es/components/radio/styles.js +4 -2
- package/es/components/rate/styles.d.ts +4 -1
- package/es/components/rate/styles.js +4 -2
- package/es/components/scrollSelect/styles.d.ts +4 -1
- package/es/components/scrollSelect/styles.js +4 -2
- package/es/components/select/base.js +3 -1
- package/es/components/select/base.vdt.js +1 -1
- package/es/components/select/styles.d.ts +12 -3
- package/es/components/select/styles.js +10 -6
- package/es/components/skeleton/styles.d.ts +8 -2
- package/es/components/skeleton/styles.js +7 -4
- package/es/components/slider/styles.d.ts +4 -1
- package/es/components/slider/styles.js +4 -2
- package/es/components/spin/styles.d.ts +4 -1
- package/es/components/spin/styles.js +4 -2
- package/es/components/spinner/styles.d.ts +4 -1
- package/es/components/spinner/styles.js +4 -2
- package/es/components/split/styles.d.ts +4 -1
- package/es/components/split/styles.js +4 -2
- package/es/components/steps/index.vdt.js +2 -2
- package/es/components/steps/styles.d.ts +4 -3
- package/es/components/steps/styles.js +9 -4
- package/es/components/switch/styles.d.ts +4 -1
- package/es/components/switch/styles.js +4 -2
- package/es/components/table/column.d.ts +1 -0
- package/es/components/table/column.js +2 -1
- package/es/components/table/column.vdt.js +9 -3
- package/es/components/table/index.spec.js +18 -11
- package/es/components/table/styles.d.ts +8 -2
- package/es/components/table/styles.js +8 -5
- package/es/components/table/table.vdt.js +3 -4
- package/es/components/table/useColumns.js +1 -0
- package/es/components/table/useFixedColumns.d.ts +3 -3
- package/es/components/table/useFixedColumns.js +27 -46
- package/es/components/table/useGroup.d.ts +1 -0
- package/es/components/table/useGroup.js +11 -1
- package/es/components/table/useResizable.js +41 -5
- package/es/components/table/useWidth.js +3 -0
- package/es/components/tabs/styles.d.ts +4 -1
- package/es/components/tabs/styles.js +4 -2
- package/es/components/tag/styles.d.ts +8 -2
- package/es/components/tag/styles.js +7 -4
- package/es/components/timeline/styles.d.ts +8 -2
- package/es/components/timeline/styles.js +7 -5
- package/es/components/timepicker/styles.d.ts +4 -1
- package/es/components/timepicker/styles.js +4 -2
- package/es/components/tip/styles.d.ts +4 -1
- package/es/components/tip/styles.js +4 -2
- package/es/components/tooltip/content.vdt.js +1 -1
- package/es/components/tooltip/styles.d.ts +4 -1
- package/es/components/tooltip/styles.js +4 -2
- package/es/components/transfer/styles.d.ts +4 -1
- package/es/components/transfer/styles.js +4 -2
- package/es/components/tree/index.spec.js +13 -1
- package/es/components/tree/styles.d.ts +4 -1
- package/es/components/tree/styles.js +4 -2
- package/es/components/tree/useChecked.js +4 -0
- package/es/components/treeSelect/styles.d.ts +4 -1
- package/es/components/treeSelect/styles.js +4 -2
- package/es/components/upload/styles.d.ts +8 -2
- package/es/components/upload/styles.js +7 -4
- package/es/components/upload/useFiles.js +3 -2
- package/es/components/utils.d.ts +10 -2
- package/es/components/utils.js +9 -2
- package/es/components/wave/styles.d.ts +4 -1
- package/es/components/wave/styles.js +4 -2
- package/es/i18n/en-US.d.ts +1 -0
- package/es/i18n/en-US.js +1 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/packages/kpc-react/__tests__/components/cascader.spec.js +0 -1
- package/es/site/data/components/menu/demos/recursive/index.d.ts +29 -0
- package/es/site/data/components/menu/demos/recursive/index.js +57 -0
- package/es/site/data/components/menu/demos/recursive/react.d.ts +2 -0
- package/es/site/data/components/menu/demos/recursive/react.js +69 -0
- package/es/site/data/components/table/demos/basic/react.js +4 -2
- package/es/site/data/components/table/demos/fixColumn/react.js +2 -1
- package/es/site/data/components/table/demos/groupHeader/react.js +11 -20
- package/es/site/data/components/table/demos/scheme/react.js +2 -1
- package/es/site/data/components/tree/demos/checkbox/index.d.ts +12 -2
- package/es/site/data/components/tree/demos/checkbox/index.js +1 -0
- package/es/site/data/components/tree/demos/checkbox/react.d.ts +12 -2
- package/es/site/data/components/tree/demos/checkbox/react.js +1 -0
- package/es/site/data/components/tree/demos/contextmenu/index.d.ts +1 -0
- package/es/site/data/components/tree/demos/contextmenu/index.js +1 -0
- package/es/site/data/components/tree/demos/contextmenu/react.d.ts +1 -0
- package/es/site/data/components/tree/demos/contextmenu/react.js +1 -0
- package/es/site/src/components/article/index.js +6 -2
- package/es/styles/fonts/iconfont.d.ts +4 -1
- package/es/styles/fonts/iconfont.js +1 -1
- package/es/styles/global.js +7 -2
- package/i18n/en-US.ts +1 -0
- package/index.ts +2 -2
- package/package.json +3 -3
- package/styles/fonts/iconfont.ts +2 -2
- package/styles/global.ts +32 -0
|
@@ -70,7 +70,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
70
70
|
scrollPosition = _this$fixedColumns.scrollPosition,
|
|
71
71
|
hasFixed = _this$fixedColumns.hasFixed,
|
|
72
72
|
getHasFixedLeft = _this$fixedColumns.getHasFixedLeft,
|
|
73
|
-
|
|
73
|
+
offsetMap = _this$fixedColumns.offsetMap;
|
|
74
74
|
var scrollRef = this.scroll.scrollRef;
|
|
75
75
|
var _this$stickyHeader = this.stickyHeader,
|
|
76
76
|
stickHeader = _this$stickyHeader.stickHeader,
|
|
@@ -107,7 +107,6 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
107
107
|
getAllStatus = _this$checked.getAllStatus,
|
|
108
108
|
onChangeChecked = _this$checked.onChangeChecked;
|
|
109
109
|
var allCheckedStatus = getAllCheckedStatus();
|
|
110
|
-
var offsetMap = getOffsetMap();
|
|
111
110
|
var thead = hideHeader ? null : _$cc(TableContext.Provider, {
|
|
112
111
|
'value': checkType,
|
|
113
112
|
'children': _$cc(GroupContext.Provider, {
|
|
@@ -126,7 +125,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
126
125
|
onStart: onStart
|
|
127
126
|
},
|
|
128
127
|
'children': _$cc(FixedColumnsContext.Provider, {
|
|
129
|
-
'value': offsetMap,
|
|
128
|
+
'value': offsetMap.value,
|
|
130
129
|
'children': _$ce(2, 'thead', _$ma(columns, function ($value, $key) {
|
|
131
130
|
return _$ce(2, 'tr', function () {
|
|
132
131
|
var ths = [$key === 0 && checkType !== 'none' ? _$cv('th', _extends({}, getClassAndStyleForFixed({
|
|
@@ -214,7 +213,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
214
213
|
'indent': indentSize,
|
|
215
214
|
'onToggleSpreadRow': toggleSpreadRow,
|
|
216
215
|
'onBeforeUnmount': _this.resetRowStatus.onRowBeforeUnmount,
|
|
217
|
-
'offsetMap': offsetMap,
|
|
216
|
+
'offsetMap': offsetMap.value,
|
|
218
217
|
'animation': animation[1],
|
|
219
218
|
'draggable': draggable,
|
|
220
219
|
'draggingKey': draggingKey.value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VNodeComponentClass, Props,
|
|
1
|
+
import { VNodeComponentClass, Props, Key } from 'intact';
|
|
2
2
|
import { TableColumn, TableColumnProps } from './column';
|
|
3
3
|
import type { TableProps, TableRowKey } from './table';
|
|
4
4
|
import { State } from '../../hooks/useState';
|
|
@@ -7,14 +7,14 @@ declare type ScrollPosition = 'left' | 'middle' | 'right';
|
|
|
7
7
|
export declare const context: {
|
|
8
8
|
Provider: import("intact").ComponentConstructor<import("intact").Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
9
9
|
Consumer: import("intact").ComponentConstructor<import("intact").Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
10
|
-
useContext: () => RefObject<any>;
|
|
10
|
+
useContext: () => import("intact").RefObject<any>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useFixedColumns(getColumns: () => VNodeComponentClass<TableColumn>[][], { scrollRef, callbacks }: ReturnType<typeof useScroll>, widthMap: State<Record<TableRowKey, number>>): {
|
|
13
13
|
scrollPosition: State<ScrollPosition | null>;
|
|
14
14
|
setScrollPosition: (scrollLeft: number) => void;
|
|
15
15
|
hasFixed: State<boolean>;
|
|
16
|
+
offsetMap: State<Record<Key, number>>;
|
|
16
17
|
getHasFixedLeft: () => boolean;
|
|
17
|
-
getOffsetMap: () => Record<Key, number>;
|
|
18
18
|
};
|
|
19
19
|
export declare function getClassAndStyleForFixed({ className, fixed, align }: Props<TableColumnProps>, offset: number, k: string, checkType?: TableProps['checkType']): {
|
|
20
20
|
className: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useInstance,
|
|
1
|
+
import { useInstance, findDomFromVNode, nextTick } from 'intact';
|
|
2
2
|
import { useState } from '../../hooks/useState';
|
|
3
3
|
import { cx } from '@emotion/css';
|
|
4
|
-
import { isNullOrUndefined, isString, error } from 'intact-shared';
|
|
5
|
-
import { throttle } from '../utils';
|
|
6
4
|
import { watchState } from '../../hooks/useState';
|
|
7
5
|
import { createContext } from '../context';
|
|
6
|
+
import { useResizeObserver } from '../../hooks/useResizeObserver';
|
|
7
|
+
import { isEqualObject } from '../utils';
|
|
8
8
|
export var context = createContext();
|
|
9
9
|
export function useFixedColumns(getColumns, _ref, widthMap) {
|
|
10
10
|
var scrollRef = _ref.scrollRef,
|
|
@@ -12,38 +12,32 @@ export function useFixedColumns(getColumns, _ref, widthMap) {
|
|
|
12
12
|
var instance = useInstance();
|
|
13
13
|
var scrollPosition = useState(null);
|
|
14
14
|
var hasFixed = useState(false);
|
|
15
|
+
var offsetMap = useState({}, isEqualObject);
|
|
15
16
|
var hasFixedLeft = false;
|
|
16
17
|
var hasFixedRight = false;
|
|
17
|
-
var offsetMap = {};
|
|
18
18
|
callbacks.push(setScrollPosition);
|
|
19
|
-
instance.
|
|
19
|
+
instance.watch('children', handleFixedColumnsAndUpdate, {
|
|
20
|
+
presented: true
|
|
21
|
+
});
|
|
20
22
|
watchState(widthMap, function () {
|
|
21
|
-
|
|
22
|
-
updateScrollPositionOnResize();
|
|
23
|
+
return nextTick(handleFixedColumnsAndUpdate);
|
|
23
24
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
onMounted(function () {
|
|
25
|
+
useResizeObserver(scrollRef, handleFixedColumnsAndUpdate, true);
|
|
26
|
+
|
|
27
|
+
function handleFixedColumnsAndUpdate() {
|
|
28
|
+
handleFixedColumns();
|
|
29
29
|
updateScrollPositionOnResize();
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
onUnmounted(function () {
|
|
33
|
-
window.removeEventListener('resize', throttleUpdate);
|
|
34
|
-
});
|
|
30
|
+
}
|
|
35
31
|
|
|
36
32
|
function handleFixedColumns() {
|
|
37
33
|
var columns = getColumns();
|
|
34
|
+
var _offsetMap = {};
|
|
38
35
|
hasFixedLeft = false;
|
|
39
36
|
hasFixedRight = false;
|
|
40
|
-
offsetMap = {};
|
|
41
37
|
columns.forEach(function (columns, row) {
|
|
42
|
-
var offset = 0;
|
|
43
38
|
columns.forEach(function (vNode, col) {
|
|
44
39
|
var props = vNode.props;
|
|
45
40
|
var key = props.key;
|
|
46
|
-
offsetMap[key] = 0;
|
|
47
41
|
var fixed = props.fixed;
|
|
48
42
|
|
|
49
43
|
if (fixed === 'left') {
|
|
@@ -54,41 +48,34 @@ export function useFixedColumns(getColumns, _ref, widthMap) {
|
|
|
54
48
|
var _props = prevVNode.props;
|
|
55
49
|
|
|
56
50
|
if (_props.fixed === 'left') {
|
|
57
|
-
|
|
58
|
-
validateWidth(_props);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
value += widthMap.value[_props.key] || parseInt(_props.width, 10) || 0;
|
|
51
|
+
value += getWidth(prevVNode);
|
|
62
52
|
}
|
|
63
53
|
|
|
64
54
|
prevVNode = _props.prevVNode;
|
|
65
55
|
}
|
|
66
56
|
|
|
67
|
-
|
|
57
|
+
_offsetMap[key] = value;
|
|
68
58
|
hasFixedLeft = true;
|
|
69
59
|
} else if (fixed === 'right') {
|
|
70
60
|
var _value = 0;
|
|
71
|
-
var
|
|
61
|
+
var nextVNode = props.nextVNode;
|
|
72
62
|
|
|
73
|
-
while (
|
|
74
|
-
var _props2 =
|
|
63
|
+
while (nextVNode) {
|
|
64
|
+
var _props2 = nextVNode.props;
|
|
75
65
|
|
|
76
66
|
if (_props2.fixed === 'right') {
|
|
77
|
-
|
|
78
|
-
validateWidth(_props2);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
_value += widthMap.value[_props2.key] || parseInt(_props2.width, 10) || 0;
|
|
67
|
+
_value += getWidth(nextVNode);
|
|
82
68
|
}
|
|
83
69
|
|
|
84
|
-
|
|
70
|
+
nextVNode = _props2.nextVNode;
|
|
85
71
|
}
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
_offsetMap[key] = _value;
|
|
88
74
|
hasFixedRight = true;
|
|
89
75
|
}
|
|
90
76
|
});
|
|
91
77
|
});
|
|
78
|
+
offsetMap.set(_offsetMap);
|
|
92
79
|
hasFixed.set(hasFixedLeft || hasFixedRight);
|
|
93
80
|
}
|
|
94
81
|
|
|
@@ -113,11 +100,9 @@ export function useFixedColumns(getColumns, _ref, widthMap) {
|
|
|
113
100
|
scrollPosition: scrollPosition,
|
|
114
101
|
setScrollPosition: setScrollPosition,
|
|
115
102
|
hasFixed: hasFixed,
|
|
103
|
+
offsetMap: offsetMap,
|
|
116
104
|
getHasFixedLeft: function getHasFixedLeft() {
|
|
117
105
|
return hasFixedLeft;
|
|
118
|
-
},
|
|
119
|
-
getOffsetMap: function getOffsetMap() {
|
|
120
|
-
return offsetMap;
|
|
121
106
|
}
|
|
122
107
|
};
|
|
123
108
|
}
|
|
@@ -134,11 +119,7 @@ export function getClassAndStyleForFixed(_ref2, offset, k, checkType) {
|
|
|
134
119
|
};
|
|
135
120
|
}
|
|
136
121
|
|
|
137
|
-
function
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (isNullOrUndefined(width) || isString(width) && !/\d+(px)?/.test(width)) {
|
|
142
|
-
error("The width must be specified with 'px' when the column has fixed. <TableColumn key=\"" + key + "\" />");
|
|
143
|
-
}
|
|
122
|
+
function getWidth(vNode) {
|
|
123
|
+
var dom = findDomFromVNode(vNode, true);
|
|
124
|
+
return dom.offsetWidth;
|
|
144
125
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/includes";
|
|
2
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
2
3
|
import _trimInstanceProperty from "@babel/runtime-corejs3/core-js/instance/trim";
|
|
3
4
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js/instance/filter";
|
|
4
5
|
import { useInstance, createRef } from 'intact';
|
|
@@ -62,6 +63,14 @@ export function useGroup() {
|
|
|
62
63
|
confirm(onChange);
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
function checkAll() {
|
|
67
|
+
var _filteredGroup$value;
|
|
68
|
+
|
|
69
|
+
localGroupValue.set((_filteredGroup$value = filteredGroup.value) == null ? void 0 : _mapInstanceProperty(_filteredGroup$value).call(_filteredGroup$value, function (item) {
|
|
70
|
+
return item.value;
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
function isEmptyValue(groupValue) {
|
|
66
75
|
var _instance$get4 = instance.get(),
|
|
67
76
|
multiple = _instance$get4.multiple;
|
|
@@ -98,6 +107,7 @@ export function useGroup() {
|
|
|
98
107
|
confirm: confirm,
|
|
99
108
|
dropdownRef: dropdownRef,
|
|
100
109
|
localGroupValue: localGroupValue,
|
|
101
|
-
isEmptyValue: isEmptyValue
|
|
110
|
+
isEmptyValue: isEmptyValue,
|
|
111
|
+
checkAll: checkAll
|
|
102
112
|
};
|
|
103
113
|
}
|
|
@@ -9,15 +9,17 @@ export function useResizable(scrollRef, tableRef, tableWidth, widthMap, storeWid
|
|
|
9
9
|
var x;
|
|
10
10
|
var prevVNode;
|
|
11
11
|
var prevTh;
|
|
12
|
+
var prevMinWidth;
|
|
12
13
|
var currentVNode;
|
|
13
14
|
var currentTh;
|
|
14
|
-
var
|
|
15
|
+
var currentMinWidth;
|
|
16
|
+
var nextVNode;
|
|
15
17
|
|
|
16
18
|
function onStart(e) {
|
|
17
19
|
containerWidth = scrollRef.value.clientWidth;
|
|
18
20
|
x = e.clientX; // find the previous column but exclude the hidden columns, #467
|
|
19
21
|
|
|
20
|
-
prevVNode = currentVNode = e._vNode;
|
|
22
|
+
prevVNode = nextVNode = currentVNode = e._vNode;
|
|
21
23
|
prevTh;
|
|
22
24
|
|
|
23
25
|
do {
|
|
@@ -26,7 +28,20 @@ export function useResizable(scrollRef, tableRef, tableWidth, widthMap, storeWid
|
|
|
26
28
|
} while (window.getComputedStyle(prevTh).display === 'none');
|
|
27
29
|
|
|
28
30
|
currentTh = findDomFromVNode(currentVNode, true);
|
|
29
|
-
|
|
31
|
+
prevMinWidth = prevVNode.props.minWidth || instance.get('minColWidth');
|
|
32
|
+
currentMinWidth = currentVNode.props.minWidth || instance.get('minColWidth');
|
|
33
|
+
|
|
34
|
+
while (nextVNode = (_nextVNode = nextVNode) == null ? void 0 : _nextVNode.props.nextVNode) {
|
|
35
|
+
var _nextVNode;
|
|
36
|
+
|
|
37
|
+
var th = findDomFromVNode(nextVNode, true);
|
|
38
|
+
|
|
39
|
+
if (window.getComputedStyle(th).display === 'none') {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
30
45
|
}
|
|
31
46
|
|
|
32
47
|
function onMove(e) {
|
|
@@ -35,14 +50,35 @@ export function useResizable(scrollRef, tableRef, tableWidth, widthMap, storeWid
|
|
|
35
50
|
var delX = e.clientX - x;
|
|
36
51
|
if (delX === 0) return;
|
|
37
52
|
var newPrevWidth = prevTh.offsetWidth + delX;
|
|
38
|
-
if (newPrevWidth < minWidth && delX < 0) return;
|
|
39
53
|
var newCurrentWidth = currentTh.offsetWidth - delX;
|
|
40
54
|
var newTableWidth = tableRef.value.offsetWidth + delX;
|
|
55
|
+
var isCurrentFixedRight = currentVNode.props.fixed === 'right'; // const isPrevFixedRight = prevVNode.props!.fixed === 'right';
|
|
56
|
+
|
|
57
|
+
if ((newPrevWidth < prevMinWidth || isCurrentFixedRight) && delX < 0) {
|
|
58
|
+
// if (nextVNode) return;
|
|
59
|
+
// the last column, we should expand its width
|
|
60
|
+
if (newPrevWidth < prevMinWidth) {
|
|
61
|
+
newPrevWidth -= delX;
|
|
62
|
+
newTableWidth -= delX;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
41
66
|
var currentKey = currentVNode.props.key;
|
|
42
67
|
var prevKey = prevVNode.props.key;
|
|
43
|
-
x = e.clientX;
|
|
44
68
|
var map = (_map = {}, _map[prevKey] = newPrevWidth, _map);
|
|
45
69
|
|
|
70
|
+
if (!nextVNode || isCurrentFixedRight) {
|
|
71
|
+
newTableWidth -= delX;
|
|
72
|
+
|
|
73
|
+
if (newCurrentWidth < currentMinWidth && delX > 0) {
|
|
74
|
+
newCurrentWidth = currentMinWidth;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
map[currentKey] = newCurrentWidth;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
x = e.clientX;
|
|
81
|
+
|
|
46
82
|
if (containerWidth > newTableWidth) {
|
|
47
83
|
map[currentKey] = newCurrentWidth;
|
|
48
84
|
} else {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
1
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
2
3
|
import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
|
|
3
4
|
import { useInstance, onMounted, createRef } from 'intact';
|
|
@@ -100,6 +101,8 @@ export function useWidth(scrollRef, getColumns) {
|
|
|
100
101
|
});
|
|
101
102
|
|
|
102
103
|
if (shouldUpdate) {
|
|
104
|
+
// let useFixedColumns to update scroll position
|
|
105
|
+
widthMap.set(_extends({}, widthMap.value));
|
|
103
106
|
instance.forceUpdate(function () {
|
|
104
107
|
// check again because it may affect other columns
|
|
105
108
|
if (!isStop) {
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults, sizes } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var closeFontSizeMap = {
|
|
7
8
|
large: '24px',
|
|
8
9
|
default: '20px',
|
|
@@ -107,10 +108,11 @@ setDefault(function () {
|
|
|
107
108
|
tabs = deepDefaults(theme, {
|
|
108
109
|
tabs: defaults
|
|
109
110
|
}).tabs;
|
|
111
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
110
112
|
});
|
|
111
|
-
export function makeStyles(k) {
|
|
113
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
112
114
|
return /*#__PURE__*/css(makeCommonStyles(k), ";", makeScrollStyles(k), ";&.", k, "-type-default{", makeDefaultStyles(k), ";}&.", k, "-type-card{", makeCardStyles(k), ";}&.", k, "-type-flat-card{", makeFlatCardStyles(k), ";}");
|
|
113
|
-
}
|
|
115
|
+
});
|
|
114
116
|
|
|
115
117
|
function makeCommonStyles(k) {
|
|
116
118
|
var active = tabs.active;
|
|
@@ -65,5 +65,11 @@ declare const defaults: {
|
|
|
65
65
|
};
|
|
66
66
|
declare let tag: typeof defaults;
|
|
67
67
|
export { tag };
|
|
68
|
-
export declare
|
|
69
|
-
|
|
68
|
+
export declare const makeStyles: {
|
|
69
|
+
(k: string): string;
|
|
70
|
+
clearCache(): {};
|
|
71
|
+
};
|
|
72
|
+
export declare const makeTagsStyles: {
|
|
73
|
+
(k: string): string;
|
|
74
|
+
clearCache(): {};
|
|
75
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { deepDefaults, sizes, palette } from '../../styles/utils';
|
|
4
4
|
import { theme, setDefault } from '../../styles/theme';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var types = ['primary', 'warning', 'danger', 'success', 'disabled'];
|
|
7
8
|
var defaults = deepDefaults({
|
|
8
9
|
get border() {
|
|
@@ -112,9 +113,11 @@ setDefault(function () {
|
|
|
112
113
|
tag = deepDefaults(theme, {
|
|
113
114
|
tag: defaults
|
|
114
115
|
}).tag;
|
|
116
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
117
|
+
makeTagsStyles == null ? void 0 : makeTagsStyles.clearCache();
|
|
115
118
|
});
|
|
116
119
|
export { tag };
|
|
117
|
-
export function makeStyles(k) {
|
|
120
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
118
121
|
return /*#__PURE__*/css("display:inline-flex;align-items:center;padding:", tag.padding, ";border:", tag.border, ";border-radius:", tag.borderRadius, ";font-size:", tag.fontSize, ";height:", tag.height, ";.", k, "-tag-close{font-size:", tag.close.fontSize, ";margin-left:", tag.close.gap, ";width:", tag.close.width, ";}&.", k, "-none{border:none;background:", tag.none.bgColor, ";}", _mapInstanceProperty(types).call(types, function (t) {
|
|
119
122
|
var styles = tag[t];
|
|
120
123
|
return /*#__PURE__*/css("&.", k, "-", t, "{color:", styles.color, ";border-color:", styles.color, ";background:", styles.bgColor, ";}");
|
|
@@ -123,7 +126,7 @@ export function makeStyles(k) {
|
|
|
123
126
|
var styles = tag[s];
|
|
124
127
|
return /*#__PURE__*/css("&.", k, "-", s, "{padding:", styles.padding, ";height:", styles.height, ";font-size:", styles.fontSize, ";.", k, "-tag-close{font-size:", styles.close.fontSize, ";margin-left:", styles.close.gap, ";}}");
|
|
125
128
|
}), "&.", k, "-dashed{border-style:dashed;}&.", k, "-dragging{opacity:0;}");
|
|
126
|
-
}
|
|
127
|
-
export function makeTagsStyles(k) {
|
|
129
|
+
});
|
|
130
|
+
export var makeTagsStyles = cache(function makeTagsStyles(k) {
|
|
128
131
|
return /*#__PURE__*/css("display:flex;flex-wrap:wrap;gap:", defaults.tags.gap, ";position:relative;overflow:hidden;&.", k, "-nowrap{flex-wrap:nowrap;.", k, "-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;}}.", k, "-tags-more{cursor:default;font-family:monospace;}.", k, "-tag.", k, "-draggable{cursor:move;}");
|
|
129
|
-
}
|
|
132
|
+
});
|
|
@@ -2,6 +2,12 @@ import '../../styles/global';
|
|
|
2
2
|
declare type ValueOf<T extends readonly any[]> = T[number];
|
|
3
3
|
export declare type Types = ValueOf<typeof types>;
|
|
4
4
|
export declare const types: readonly ["primary", "warning", "danger", "success"];
|
|
5
|
-
export declare
|
|
6
|
-
|
|
5
|
+
export declare const makeStyles: {
|
|
6
|
+
(k: string): string;
|
|
7
|
+
clearCache(): {};
|
|
8
|
+
};
|
|
9
|
+
export declare const makeItemStyles: {
|
|
10
|
+
(k: string): string;
|
|
11
|
+
clearCache(): {};
|
|
12
|
+
};
|
|
7
13
|
export {};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults, sizes } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var widthMap = {
|
|
7
8
|
large: '13px',
|
|
8
9
|
default: '9px',
|
|
@@ -47,11 +48,13 @@ setDefault(function () {
|
|
|
47
48
|
timeline = deepDefaults(theme, {
|
|
48
49
|
timeline: defaults
|
|
49
50
|
}).timeline;
|
|
51
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
52
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
50
53
|
});
|
|
51
|
-
export function makeStyles(k) {
|
|
54
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
52
55
|
return /*#__PURE__*/css("font-size:", timeline.fontSize, ";padding-top:calc(", theme.lineHeight, "em / 2);");
|
|
53
|
-
}
|
|
54
|
-
export function makeItemStyles(k) {
|
|
56
|
+
});
|
|
57
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
55
58
|
return /*#__PURE__*/css("position:relative;padding:", timeline.padding, ";.", k, "-timeline-indicator{width:", timeline.indicator.width, ";position:absolute;left:0;top:0;height:100%;text-align:center;}.", k, "-timeline-dot{position:relative;z-index:1;transform:translateY(-50%);}.", k, "-timeline-circle{position:relative;background:", theme.color.primary, ";border-radius:50%;left:50%;}.", k, "-timeline-line{position:absolute;height:100%;border-left:", timeline.lineBorder, ";top:0;left:50%;}.", k, "-timeline-content{position:relative;top:calc(-0.5 * ", theme.lineHeight, "em);}&:last-of-type{.", k, "-timeline-line{display:none;}}", _mapInstanceProperty(types).call(types, function (type) {
|
|
56
59
|
var typeStyles = timeline[type];
|
|
57
60
|
return /*#__PURE__*/css("&.", k, "-", type, "{.", k, "-timeline-indicator{color:", typeStyles.color, ";}.", k, "-timeline-circle{background:", typeStyles.color, ";}}");
|
|
@@ -61,5 +64,4 @@ export function makeItemStyles(k) {
|
|
|
61
64
|
if (size === 'default') return sizeClassName;
|
|
62
65
|
return /*#__PURE__*/css("&.", k, "-", size, "{", sizeClassName, ";}");
|
|
63
66
|
}), ";");
|
|
64
|
-
}
|
|
65
|
-
;
|
|
67
|
+
});
|
|
@@ -3,6 +3,7 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
3
3
|
import { deepDefaults } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
5
|
import { datepicker, makePanelStyles as makePanelStylesBase } from '../datepicker/styles';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var defaults = {
|
|
7
8
|
get border() {
|
|
8
9
|
return datepicker.border;
|
|
@@ -23,7 +24,8 @@ setDefault(function () {
|
|
|
23
24
|
timepicker = deepDefaults(theme, {
|
|
24
25
|
timepicker: defaults
|
|
25
26
|
}).timepicker;
|
|
27
|
+
makePanelStyles == null ? void 0 : makePanelStyles.clearCache();
|
|
26
28
|
});
|
|
27
|
-
export function makePanelStyles(k) {
|
|
29
|
+
export var makePanelStyles = cache(function makePanelStyles(k) {
|
|
28
30
|
return cx(makePanelStylesBase(k), /*#__PURE__*/css("&.", k, "-time-content{.", k, "-datepicker-time{padding:", timepicker.padding, ";}.", k, "-scroll-select{height:", timepicker.scrollHeight, ";}}&.", k, "-range{.", k, "-datepicker-time{width:auto;border:", timepicker.border, ";}.", k, "-scroll-select{height:", timepicker.range.scrollHeight, ";}.", k, "-datepicker-calendar-wrapper{padding:", timepicker.range.padding, ";width:", timepicker.range.width, ";border:none;}.", k, "-timepicker-title{text-align:center;margin-bottom:", timepicker.range.titleGap, ";}}"));
|
|
29
|
-
}
|
|
31
|
+
});
|
|
@@ -2,6 +2,7 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
2
2
|
import { css } from '@emotion/css';
|
|
3
3
|
import '../../styles/global';
|
|
4
4
|
import { deepDefaults } from '../../styles/utils';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
title: {
|
|
7
8
|
fontSize: '14px',
|
|
@@ -23,7 +24,8 @@ setDefault(function () {
|
|
|
23
24
|
tip = deepDefaults(theme, {
|
|
24
25
|
tip: defaults
|
|
25
26
|
}).tip;
|
|
27
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
26
28
|
});
|
|
27
|
-
export function makeStyles(k) {
|
|
29
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
28
30
|
return /*#__PURE__*/css("&.", k, "-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.", k, "-tip-wrapper{flex:1;padding:", tip.padding, ";}.", k, "-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";font-weight:", tip.title.fontWeight, ";}&.", k, "-fade-leave-active{position:relative;}.", k, "-tip-close:hover{background:none;}");
|
|
29
|
-
}
|
|
31
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { superCall as _$su, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em, noop as _$no, createElementVNode as _$ce, createUnknownComponentVNode as _$cc } from 'intact';
|
|
2
2
|
import { Button } from '../button';
|
|
3
|
-
import makeStyles from './styles';
|
|
3
|
+
import { makeStyles } from './styles';
|
|
4
4
|
export default function ($props, $blocks, $__proto__) {
|
|
5
5
|
var _classNameObj;
|
|
6
6
|
|
|
@@ -23,5 +23,8 @@ declare const defaults: {
|
|
|
23
23
|
export declare let tooltip: typeof defaults;
|
|
24
24
|
export declare type Theme = 'dark' | 'light';
|
|
25
25
|
export declare const themes: Theme[];
|
|
26
|
-
export
|
|
26
|
+
export declare const makeStyles: {
|
|
27
|
+
(k: string): string;
|
|
28
|
+
clearCache(): {};
|
|
29
|
+
};
|
|
27
30
|
export {};
|
|
@@ -4,6 +4,7 @@ import { css } from '@emotion/css';
|
|
|
4
4
|
import { theme, setDefault } from '../../styles/theme';
|
|
5
5
|
import { deepDefaults } from '../../styles/utils';
|
|
6
6
|
import '../../styles/global';
|
|
7
|
+
import { cache } from '../utils';
|
|
7
8
|
var defaults = {
|
|
8
9
|
padding: '8px 12px',
|
|
9
10
|
|
|
@@ -48,6 +49,7 @@ setDefault(function () {
|
|
|
48
49
|
tooltip = deepDefaults(theme, {
|
|
49
50
|
tooltip: defaults
|
|
50
51
|
}).tooltip;
|
|
52
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
51
53
|
});
|
|
52
54
|
export var themes = ['dark', 'light'];
|
|
53
55
|
var directionMap = {
|
|
@@ -56,7 +58,7 @@ var directionMap = {
|
|
|
56
58
|
left: 'right',
|
|
57
59
|
right: 'left'
|
|
58
60
|
};
|
|
59
|
-
export
|
|
61
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
60
62
|
var arrowLong = tooltip.arrow.width;
|
|
61
63
|
var arrowShort = "calc(" + arrowLong + " - 1px)"; // use &.${k}-tooltip-content to override css in dropdown menu
|
|
62
64
|
|
|
@@ -82,4 +84,4 @@ export default function makeStyles(k) {
|
|
|
82
84
|
return /*#__PURE__*/css("&.", k, "-", direction, "{border-", borderDirection, "-color:", borderColor, ";&:before{border-", borderDirection, "-color:", bgColor, ";}}");
|
|
83
85
|
}), ";}}");
|
|
84
86
|
}), ".", k, "-tooltip-footer{padding-top:", tooltip.confirm.gaps, ";.", k, "-btn:not(:first-of-type){margin-left:", tooltip.confirm.gaps, ";}}&.", k, "-small{padding:", tooltip.smallPadding, ";}}");
|
|
85
|
-
}
|
|
87
|
+
});
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
fontSize: '12px',
|
|
7
8
|
searchGap: '16px',
|
|
@@ -61,7 +62,8 @@ setDefault(function () {
|
|
|
61
62
|
transfer = deepDefaults(theme, {
|
|
62
63
|
transfer: defaults
|
|
63
64
|
}).transfer;
|
|
65
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
64
66
|
});
|
|
65
|
-
export function makeStyles(k) {
|
|
67
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
66
68
|
return /*#__PURE__*/css("font-size:", transfer.fontSize, ";.", k, "-transfer-panel,.", k, "-transfer-arrows{display:inline-block;vertical-align:middle;}.", k, "-transfer-panel{width:", transfer.panel.width, ";border:", transfer.panel.border, ";border-radius:", transfer.panel.borderRadius, ";height:", transfer.panel.height, ";display:inline-flex;flex-direction:column;overflow:auto;}.", k, "-transfer-title{line-height:", transfer.title.lineHeight, ";background:", transfer.title.bgColor, ";padding:", transfer.title.padding, ";.", k, "-checkbox{color:", transfer.title.color, ";font-size:", transfer.title.fontSize, ";}}.", k, "-transfer-count{float:right;margin-left:", transfer.title.countGap, ";}.", k, "-transfer-list{overflow:auto;position:relative;flex:1;}.", k, "-transfer-item{color:", transfer.item.color, ";background:", transfer.item.bgColor, ";user-select:none;width:100%;&:not(.", k, "-disabled):hover{background:", transfer.item.hoverBgColor, ";color:", transfer.item.hoverColor, ";p{color:", transfer.item.hoverColor, ";}}.", k, "-checkbox{padding:", transfer.item.padding, ";display:flex;}p{margin:0;color:", transfer.item.descColor, ";}&.", k, "-disabled{p{color:", theme.color.disabled, ";}}}.", k, "-input{width:auto;margin:", transfer.searchGap, ";}.", k, "-transfer-arrows{.", k, "-btn{display:flex;margin:", transfer.arrow.gap, ";}}");
|
|
67
|
-
}
|
|
69
|
+
});
|
|
@@ -108,8 +108,20 @@ describe('Tree', function () {
|
|
|
108
108
|
|
|
109
109
|
case 35:
|
|
110
110
|
expect(element.outerHTML).to.matchSnapshot();
|
|
111
|
+
checkbox4.click();
|
|
112
|
+
_context2.next = 39;
|
|
113
|
+
return wait();
|
|
114
|
+
|
|
115
|
+
case 39:
|
|
116
|
+
instance.set('checkedKeys', ['floor-2']);
|
|
117
|
+
_context2.next = 42;
|
|
118
|
+
return wait();
|
|
119
|
+
|
|
120
|
+
case 42:
|
|
121
|
+
expect(checkbox2.classList.contains('k-checked')).to.be.true;
|
|
122
|
+
expect(checkbox2.classList.contains('k-indeterminate')).to.be.false;
|
|
111
123
|
|
|
112
|
-
case
|
|
124
|
+
case 44:
|
|
113
125
|
case "end":
|
|
114
126
|
return _context2.stop();
|
|
115
127
|
}
|