@hi-ui/check-tree-select 4.0.0-alpha.20 → 4.0.0-alpha.21
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.
@@ -43,6 +43,8 @@ var tagInput = require('@hi-ui/tag-input');
|
|
43
43
|
|
44
44
|
var icons = require('@hi-ui/icons');
|
45
45
|
|
46
|
+
var localeContext = require('@hi-ui/locale-context');
|
47
|
+
|
46
48
|
var useSearchMode = require('@hi-ui/use-search-mode');
|
47
49
|
|
48
50
|
function _interopDefaultLegacy(e) {
|
@@ -91,11 +93,13 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
91
93
|
clearable = _a.clearable,
|
92
94
|
invalid = _a.invalid,
|
93
95
|
displayRender = _a.displayRender,
|
94
|
-
|
95
|
-
placeholder = _a$placeholder === void 0 ? '请选择' : _a$placeholder,
|
96
|
+
placeholderProp = _a.placeholder,
|
96
97
|
appearance = _a.appearance,
|
97
98
|
rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "fieldNames", "showCheckedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "titleRender", "filterOption", "clearable", "invalid", "displayRender", "placeholder", "appearance"]);
|
98
99
|
|
100
|
+
var i18n = localeContext.useLocaleContext();
|
101
|
+
var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
|
102
|
+
|
99
103
|
var _useToggle = useToggle.useToggle(),
|
100
104
|
menuVisible = _useToggle[0],
|
101
105
|
menuVisibleAction = _useToggle[1]; // const [viewSelected, setViewSelected] = useState(false)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CheckTreeSelect.js","sources":["../../src/CheckTreeSelect.tsx"],"sourcesContent":[null],"names":["TREE_SELECT_PREFIX","getPrefixCls","DEFAULT_DATA","DEFAULT_VALUE","DEFAULT_FIELD_NAMES","DEFAULT_EXPANDED_IDS","CheckTreeSelect","forwardRef","_a","ref","prefixCls","className","data","dataSource","disabled","fieldNames","defaultExpandAll","expandedIdsProp","expandedIds","defaultExpandedIds","onExpand","defaultValue","valueProp","value","onChange","searchableProp","searchable","searchModeProp","searchMode","onLoadChildren","titleRender","filterOption","clearable","invalid","displayRender","placeholder","appearance","rest","useToggle","menuVisible","menuVisibleAction","getKeyFields","useCallback","node","key","flattedData","useMemo","flattenTree","id","raw","title","useUncontrolledState","getDefaultExpandedIds","map","tryChangeExpandedIds","tryChangeValue","useState","selectedItems","setSelectedItems","onSelect","checked","checkedIds","prev","next","push","filter","item","_b","useAsyncSearch","loading","hasError","dataSourceStrategy","customSearchStrategy","useTreeCustomSearch","filterSearchStrategy","useFilterSearch","highlightSearchStrategy","useHighlightSearch","useSearchMode","strategies","stateInSearch","state","setStateInSearch","onSearch","searchValue","keyword","proxyTitleRender","ret","highlight","React","Highlighter","shouldUseSearch","treeProps","ids","mergedData","nextData","concat","uniqBy","cls","cx","Picker","visible","onOpen","on","onClose","off","trigger","TagInputMock","suffix","UpOutlined","DownOutlined","focused","isArrayNonEmpty","Tree","selectable","checkable","onCheck","__DEV__","displayName","ALWAYS_ALLOW","getSemiCheckedIdsWithSet","isChecked","allowCheck","semiCheckedNodes","semiCheckedIdsSet","Set","parentId","parent","forEach","undefined","has","add","semiCheckedIds","Array","from"],"mappings":"
|
1
|
+
{"version":3,"file":"CheckTreeSelect.js","sources":["../../src/CheckTreeSelect.tsx"],"sourcesContent":[null],"names":["TREE_SELECT_PREFIX","getPrefixCls","DEFAULT_DATA","DEFAULT_VALUE","DEFAULT_FIELD_NAMES","DEFAULT_EXPANDED_IDS","CheckTreeSelect","forwardRef","_a","ref","prefixCls","className","data","dataSource","disabled","fieldNames","defaultExpandAll","expandedIdsProp","expandedIds","defaultExpandedIds","onExpand","defaultValue","valueProp","value","onChange","searchableProp","searchable","searchModeProp","searchMode","onLoadChildren","titleRender","filterOption","clearable","invalid","displayRender","placeholderProp","placeholder","appearance","rest","i18n","useLocaleContext","isUndef","get","useToggle","menuVisible","menuVisibleAction","getKeyFields","useCallback","node","key","flattedData","useMemo","flattenTree","id","raw","title","useUncontrolledState","getDefaultExpandedIds","map","tryChangeExpandedIds","tryChangeValue","useState","selectedItems","setSelectedItems","onSelect","checked","checkedIds","prev","next","push","filter","item","_b","useAsyncSearch","loading","hasError","dataSourceStrategy","customSearchStrategy","useTreeCustomSearch","filterSearchStrategy","useFilterSearch","highlightSearchStrategy","useHighlightSearch","useSearchMode","strategies","stateInSearch","state","setStateInSearch","onSearch","searchValue","keyword","proxyTitleRender","ret","highlight","React","Highlighter","shouldUseSearch","treeProps","ids","mergedData","nextData","concat","uniqBy","cls","cx","Picker","visible","onOpen","on","onClose","off","trigger","TagInputMock","suffix","UpOutlined","DownOutlined","focused","isArrayNonEmpty","Tree","selectable","checkable","onCheck","__DEV__","displayName","ALWAYS_ALLOW","getSemiCheckedIdsWithSet","isChecked","allowCheck","semiCheckedNodes","semiCheckedIdsSet","Set","parentId","parent","forEach","undefined","has","add","semiCheckedIds","Array","from"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAMA,kBAAkB,GAAGC,sBAAAA,CAAa,mBAAbA,CAA3B;AACA,IAAMC,YAAY,GAAG,EAArB;AACA,IAAMC,aAAa,GAAG,EAAtB;AACA,IAAMC,mBAAmB,GAAG,EAA5B;AACA,IAAMC,oBAAoB,GAAG,EAA7B;AAEA;;;;IAGaC,eAAe,gBAAGC,gBAAAA,CAC7B,UACEC,EADF,EAwCEC,GAxCF;wBAEIC;MAAAA,sCAAYV;MAEZW,eAAAA;mBACAC;MAAAA,4BAAOV;MACPW,gBAAAA;uBACAC;MAAAA,oCAAW;yBAGXC;MAAAA,wCAAaX;+BAGbY;MAAAA,oDAAmB;MACNC,qBAAbC;iCACAC;MAAAA,wDAAqBd;MACrBe,cAAA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AAAA,gBAAgB,CAACK,OAAjBL,CAAyB,UAAChF,IAAD;AACvBoF,IAAAA,MAAM,GAAGpF,IAAI,CAACoF,MAAdA;;WACOA,MAAM,IAAIA,MAAM,CAAC/E,EAAP+E,KAAcE,WAAW;UACpC,CAACP,UAAU,CAACK,MAAD,GAAU;AAEzBD,MAAAA,QAAQ,GAAGC,MAAM,CAAC/E,EAAlB8E,CAHwC;;UAKpCF,iBAAiB,CAACM,GAAlBN,CAAsBE,QAAtBF,GAAiC;AAErCA,MAAAA,iBAAiB,CAACO,GAAlBP,CAAsBE,QAAtBF;AACAG,MAAAA,MAAM,GAAGA,MAAM,CAACA,MAAhBA;;AAVJ,GAAAJ;MAcMS,cAAc,GAAGC,KAAK,CAACC,IAAND,CAAWT,iBAAXS;SAChB,CAACD,cAAD,EAAiBR,iBAAjB;;;;"}
|
@@ -16,11 +16,12 @@ import { Tree } from '@hi-ui/tree';
|
|
16
16
|
import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
|
17
17
|
import { Picker } from '@hi-ui/picker';
|
18
18
|
import { flattenTree } from '@hi-ui/tree-utils';
|
19
|
-
import { isArrayNonEmpty } from '@hi-ui/type-assertion';
|
19
|
+
import { isUndef, isArrayNonEmpty } from '@hi-ui/type-assertion';
|
20
20
|
import { uniqBy } from 'lodash';
|
21
21
|
import { Highlighter } from '@hi-ui/highlighter';
|
22
22
|
import { TagInputMock } from '@hi-ui/tag-input';
|
23
23
|
import { UpOutlined, DownOutlined } from '@hi-ui/icons';
|
24
|
+
import { useLocaleContext } from '@hi-ui/locale-context';
|
24
25
|
import { useAsyncSearch, useTreeCustomSearch, useFilterSearch, useHighlightSearch, useSearchMode } from '@hi-ui/use-search-mode';
|
25
26
|
var TREE_SELECT_PREFIX = getPrefixCls('check-tree-select');
|
26
27
|
var DEFAULT_DATA = [];
|
@@ -60,11 +61,13 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
60
61
|
clearable = _a.clearable,
|
61
62
|
invalid = _a.invalid,
|
62
63
|
displayRender = _a.displayRender,
|
63
|
-
|
64
|
-
placeholder = _a$placeholder === void 0 ? '请选择' : _a$placeholder,
|
64
|
+
placeholderProp = _a.placeholder,
|
65
65
|
appearance = _a.appearance,
|
66
66
|
rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "fieldNames", "showCheckedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "titleRender", "filterOption", "clearable", "invalid", "displayRender", "placeholder", "appearance"]);
|
67
67
|
|
68
|
+
var i18n = useLocaleContext();
|
69
|
+
var placeholder = isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
|
70
|
+
|
68
71
|
var _useToggle = useToggle(),
|
69
72
|
menuVisible = _useToggle[0],
|
70
73
|
menuVisibleAction = _useToggle[1]; // const [viewSelected, setViewSelected] = useState(false)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CheckTreeSelect.js","sources":["../../src/CheckTreeSelect.tsx"],"sourcesContent":[null],"names":["TREE_SELECT_PREFIX","getPrefixCls","DEFAULT_DATA","DEFAULT_VALUE","DEFAULT_FIELD_NAMES","DEFAULT_EXPANDED_IDS","CheckTreeSelect","forwardRef","_a","ref","prefixCls","className","data","dataSource","disabled","fieldNames","defaultExpandAll","expandedIdsProp","expandedIds","defaultExpandedIds","onExpand","defaultValue","valueProp","value","onChange","searchableProp","searchable","searchModeProp","searchMode","onLoadChildren","titleRender","filterOption","clearable","invalid","displayRender","placeholder","appearance","rest","useToggle","menuVisible","menuVisibleAction","getKeyFields","useCallback","node","key","flattedData","useMemo","flattenTree","id","raw","title","useUncontrolledState","getDefaultExpandedIds","map","tryChangeExpandedIds","tryChangeValue","useState","selectedItems","setSelectedItems","onSelect","checked","checkedIds","prev","next","push","filter","item","_b","useAsyncSearch","loading","hasError","dataSourceStrategy","customSearchStrategy","useTreeCustomSearch","filterSearchStrategy","useFilterSearch","highlightSearchStrategy","useHighlightSearch","useSearchMode","strategies","stateInSearch","state","setStateInSearch","onSearch","searchValue","keyword","proxyTitleRender","ret","highlight","React","Highlighter","shouldUseSearch","treeProps","ids","mergedData","nextData","concat","uniqBy","cls","cx","Picker","visible","onOpen","on","onClose","off","trigger","TagInputMock","suffix","UpOutlined","DownOutlined","focused","isArrayNonEmpty","Tree","selectable","checkable","onCheck","__DEV__","displayName","ALWAYS_ALLOW","getSemiCheckedIdsWithSet","isChecked","allowCheck","semiCheckedNodes","semiCheckedIdsSet","Set","parentId","parent","forEach","undefined","has","add","semiCheckedIds","Array","from"],"mappings":"
|
1
|
+
{"version":3,"file":"CheckTreeSelect.js","sources":["../../src/CheckTreeSelect.tsx"],"sourcesContent":[null],"names":["TREE_SELECT_PREFIX","getPrefixCls","DEFAULT_DATA","DEFAULT_VALUE","DEFAULT_FIELD_NAMES","DEFAULT_EXPANDED_IDS","CheckTreeSelect","forwardRef","_a","ref","prefixCls","className","data","dataSource","disabled","fieldNames","defaultExpandAll","expandedIdsProp","expandedIds","defaultExpandedIds","onExpand","defaultValue","valueProp","value","onChange","searchableProp","searchable","searchModeProp","searchMode","onLoadChildren","titleRender","filterOption","clearable","invalid","displayRender","placeholderProp","placeholder","appearance","rest","i18n","useLocaleContext","isUndef","get","useToggle","menuVisible","menuVisibleAction","getKeyFields","useCallback","node","key","flattedData","useMemo","flattenTree","id","raw","title","useUncontrolledState","getDefaultExpandedIds","map","tryChangeExpandedIds","tryChangeValue","useState","selectedItems","setSelectedItems","onSelect","checked","checkedIds","prev","next","push","filter","item","_b","useAsyncSearch","loading","hasError","dataSourceStrategy","customSearchStrategy","useTreeCustomSearch","filterSearchStrategy","useFilterSearch","highlightSearchStrategy","useHighlightSearch","useSearchMode","strategies","stateInSearch","state","setStateInSearch","onSearch","searchValue","keyword","proxyTitleRender","ret","highlight","React","Highlighter","shouldUseSearch","treeProps","ids","mergedData","nextData","concat","uniqBy","cls","cx","Picker","visible","onOpen","on","onClose","off","trigger","TagInputMock","suffix","UpOutlined","DownOutlined","focused","isArrayNonEmpty","Tree","selectable","checkable","onCheck","__DEV__","displayName","ALWAYS_ALLOW","getSemiCheckedIdsWithSet","isChecked","allowCheck","semiCheckedNodes","semiCheckedIdsSet","Set","parentId","parent","forEach","undefined","has","add","semiCheckedIds","Array","from"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAMA,kBAAkB,GAAGC,YAAY,CAAC,mBAAD,CAAvC;AACA,IAAMC,YAAY,GAAG,EAArB;AACA,IAAMC,aAAa,GAAG,EAAtB;AACA,IAAMC,mBAAmB,GAAG,EAA5B;AACA,IAAMC,oBAAoB,GAAG,EAA7B;AAEA;;;;IAGaC,eAAe,gBAAGC,UAAU,CACvC,UACEC,EADF,EAwCEC,GAxCF;wBAEIC;MAAAA,sCAAYV;MAEZW,eAAAA;mBACAC;MAAAA,4BAAOV;MACPW,gBAAAA;uBACAC;MAAAA,oCAAW;yBAGXC;MAAAA,wCAAaX;+BAGbY;MAAAA,oDAAmB;MACNC,qBAAbC;iCACAC;MAAAA,wDAAqBd;MACrBe,cAAAA;2BACAC;MAAAA,4CAAelB;MACRmB,eAAPC;MACAC,cAAAA;MAEYC,oBAAZC;MACYC,oBAAZC;MACAC,oBAAAA;MACAC,iBAAAA;MACAC,kBAAAA;MAOAC,eAAAA;MACAC,aAAAA;MACAC,mBAAAA;MACaC,qBAAbC;MACAC,gBAAAA;MAEGC,kBArCL,YAAA,QAAA,aAAA,QAAA,cAAA,YAAA,cAAA,mBAAA,oBAAA,eAAA,sBAAA,YAAA,gBAAA,SAAA,YAAA,cAAA,cAAA,kBAAA,eAAA,gBAAA,aAAA,WAAA,iBAAA,eAAA,cAAA;;MAyCMC,IAAI,GAAGC,gBAAgB;MAEvBJ,WAAW,GAAGK,OAAO,CAACN,eAAD,CAAPM,GAChBF,IAAI,CAACG,GAALH,CAAS,6BAATA,CADgBE,GAEhBN;;mBAEqCQ,SAAS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.0.0-alpha.21",
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
5
5
|
"keywords": [],
|
6
6
|
"author": "HIUI <mi-hiui@xiaomi.com>",
|
@@ -46,16 +46,17 @@
|
|
46
46
|
"@hi-ui/classname": "^4.0.0-alpha.3",
|
47
47
|
"@hi-ui/core": "^4.0.0-alpha.19",
|
48
48
|
"@hi-ui/core-css": "^4.0.0-alpha.13",
|
49
|
-
"@hi-ui/env": "^4.0.0-alpha.
|
50
|
-
"@hi-ui/highlighter": "^4.0.0-alpha.
|
51
|
-
"@hi-ui/icons": "^4.0.0-alpha.
|
52
|
-
"@hi-ui/
|
53
|
-
"@hi-ui/
|
54
|
-
"@hi-ui/
|
55
|
-
"@hi-ui/
|
49
|
+
"@hi-ui/env": "^4.0.0-alpha.6",
|
50
|
+
"@hi-ui/highlighter": "^4.0.0-alpha.12",
|
51
|
+
"@hi-ui/icons": "^4.0.0-alpha.28",
|
52
|
+
"@hi-ui/locale-context": "^4.0.0-alpha.18",
|
53
|
+
"@hi-ui/picker": "^4.0.0-alpha.17",
|
54
|
+
"@hi-ui/popper": "^4.0.0-alpha.24",
|
55
|
+
"@hi-ui/tag-input": "^4.0.0-alpha.24",
|
56
|
+
"@hi-ui/tree": "^4.0.0-alpha.40",
|
56
57
|
"@hi-ui/tree-utils": "^4.0.0-alpha.12",
|
57
58
|
"@hi-ui/type-assertion": "^4.0.0-alpha.13",
|
58
|
-
"@hi-ui/use-search-mode": "^4.0.0-alpha.
|
59
|
+
"@hi-ui/use-search-mode": "^4.0.0-alpha.13",
|
59
60
|
"@hi-ui/use-toggle": "^4.0.0-alpha.11",
|
60
61
|
"@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.13",
|
61
62
|
"lodash": "^4.17.21"
|
@@ -69,5 +70,5 @@
|
|
69
70
|
"react": "^17.0.1",
|
70
71
|
"react-dom": "^17.0.1"
|
71
72
|
},
|
72
|
-
"gitHead": "
|
73
|
+
"gitHead": "837611fa550447716355489c7cd6c6dcb2b79a1c"
|
73
74
|
}
|