@kdcloudjs/kdesign 1.6.30 → 1.6.31

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/kdesign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/kdesign v1.6.29
3
+ * @kdcloudjs/kdesign v1.6.30
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -1946,6 +1946,33 @@ function cloneElement(element, props) {
1946
1946
 
1947
1947
  /***/ }),
1948
1948
 
1949
+ /***/ "./components/_utils/testBrowserType.ts":
1950
+ /*!**********************************************!*\
1951
+ !*** ./components/_utils/testBrowserType.ts ***!
1952
+ \**********************************************/
1953
+ /*! exports provided: testBrowserType */
1954
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1955
+
1956
+ "use strict";
1957
+ __webpack_require__.r(__webpack_exports__);
1958
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "testBrowserType", function() { return testBrowserType; });
1959
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
1960
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__);
1961
+
1962
+ function testBrowserType(reg, type) {
1963
+ var external = window.external || {};
1964
+
1965
+ for (var i in external) {
1966
+ if (reg.test(type ? external[i] : i)) {
1967
+ return true;
1968
+ }
1969
+ }
1970
+
1971
+ return false;
1972
+ }
1973
+
1974
+ /***/ }),
1975
+
1949
1976
  /***/ "./components/_utils/type.ts":
1950
1977
  /*!***********************************!*\
1951
1978
  !*** ./components/_utils/type.ts ***!
@@ -18958,6 +18985,7 @@ __webpack_require__.r(__webpack_exports__);
18958
18985
  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_13__);
18959
18986
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
18960
18987
  /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx");
18988
+ /* harmony import */ var _utils_testBrowserType__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_utils/testBrowserType */ "./components/_utils/testBrowserType.ts");
18961
18989
 
18962
18990
 
18963
18991
 
@@ -18980,6 +19008,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
18980
19008
 
18981
19009
 
18982
19010
 
19011
+
18983
19012
  var Col = function Col(props) {
18984
19013
  var _React$useContext = react__WEBPACK_IMPORTED_MODULE_12__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_15__["ConfigContext"]),
18985
19014
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -19003,9 +19032,11 @@ var Col = function Col(props) {
19003
19032
  winWidth = _getCompProps.winWidth,
19004
19033
  children = _getCompProps.children,
19005
19034
  className = _getCompProps.className,
19006
- customPrefixcls = _getCompProps.prefixCls; // className前缀
19035
+ customPrefixcls = _getCompProps.prefixCls; // 浏览器名称
19007
19036
 
19008
19037
 
19038
+ var isSogou = Object(_utils_testBrowserType__WEBPACK_IMPORTED_MODULE_16__["testBrowserType"])(/^sogou/i, 0); // className前缀
19039
+
19009
19040
  var prefixCls = getPrefixCls(pkgPrefixCls, 'col', customPrefixcls);
19010
19041
  var columns = 24;
19011
19042
  var base = {
@@ -19070,7 +19101,9 @@ var Col = function Col(props) {
19070
19101
  }, style);
19071
19102
 
19072
19103
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("div", {
19073
- className: classnames__WEBPACK_IMPORTED_MODULE_13___default()(prefixCls, className),
19104
+ className: classnames__WEBPACK_IMPORTED_MODULE_13___default()(prefixCls, className, {
19105
+ 'sogou-col': isSogou
19106
+ }),
19074
19107
  style: styleString
19075
19108
  }, children);
19076
19109
  };
@@ -19140,6 +19173,7 @@ __webpack_require__.r(__webpack_exports__);
19140
19173
  /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx");
19141
19174
  /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lodash/throttle */ "./node_modules/lodash/throttle.js");
19142
19175
  /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_15__);
19176
+ /* harmony import */ var _utils_testBrowserType__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_utils/testBrowserType */ "./components/_utils/testBrowserType.ts");
19143
19177
 
19144
19178
 
19145
19179
 
@@ -19162,6 +19196,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
19162
19196
 
19163
19197
 
19164
19198
 
19199
+
19165
19200
  function getGap(gutter, width) {
19166
19201
  var xs = gutter.xs,
19167
19202
  sm = gutter.sm,
@@ -19192,8 +19227,10 @@ var Row = function Row(props) {
19192
19227
  gutter = _getCompProps.gutter,
19193
19228
  align = _getCompProps.align,
19194
19229
  justify = _getCompProps.justify,
19195
- customPrefixcls = _getCompProps.prefixCls; // className前缀
19230
+ customPrefixcls = _getCompProps.prefixCls; // 浏览器名称
19231
+
19196
19232
 
19233
+ var isSogou = Object(_utils_testBrowserType__WEBPACK_IMPORTED_MODULE_16__["testBrowserType"])(/^sogou/i, 0); // className前缀
19197
19234
 
19198
19235
  var prefixCls = getPrefixCls(pkgPrefixCls, 'row', customPrefixcls);
19199
19236
 
@@ -19252,6 +19289,8 @@ var Row = function Row(props) {
19252
19289
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__["createElement"]("div", {
19253
19290
  className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(prefixCls, className, {
19254
19291
  nowrap: !wrap
19292
+ }, {
19293
+ 'sogou-row': isSogou
19255
19294
  }),
19256
19295
  style: styleString
19257
19296
  }, react__WEBPACK_IMPORTED_MODULE_11__["Children"].map(children, function (child) {
@@ -29903,30 +29942,42 @@ var InternalSelect = function InternalSelect(props, ref) {
29903
29942
  selectedVal = _multipleRef$current3.selectedVal,
29904
29943
  selectMulOpts = _multipleRef$current3.selectMulOpts;
29905
29944
 
29906
- if (!('value' in selectProps)) {
29907
- if ((filledOptions === null || filledOptions === void 0 ? void 0 : filledOptions.length) !== selectedVal.length) {
29908
- filledOptions.map(function (child) {
29909
- var _ref = child.props || child,
29910
- value = _ref.value;
29911
-
29912
- if (!selectedVal.includes(value)) {
29913
- selectedVal.push(value);
29914
- selectMulOpts.push({
29915
- value: value,
29916
- label: getOptionLabel(child)
29917
- });
29918
- }
29919
- });
29920
- setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(selectMulOpts));
29945
+ var newSelectedVal = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(selectedVal);
29946
+
29947
+ var newSelectMulOpts = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(selectMulOpts);
29948
+
29949
+ if ((filledOptions === null || filledOptions === void 0 ? void 0 : filledOptions.length) !== newSelectedVal.length) {
29950
+ filledOptions.map(function (child) {
29951
+ var _ref = child.props || child,
29952
+ value = _ref.value;
29953
+
29954
+ if (!newSelectedVal.includes(value)) {
29955
+ newSelectedVal.push(value);
29956
+ newSelectMulOpts.push({
29957
+ value: value,
29958
+ label: getOptionLabel(child)
29959
+ });
29960
+ }
29961
+ });
29962
+
29963
+ if (typeof value === 'undefined') {
29964
+ multipleRef.current.selectedVal = newSelectedVal;
29965
+ multipleRef.current.selectMulOpts = newSelectMulOpts;
29966
+ setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(newSelectMulOpts));
29921
29967
  setSearchValue('');
29922
- } else {
29923
- multipleRef.current.selectedVal = selectedVal = [];
29924
- multipleRef.current.selectMulOpts = selectMulOpts = [];
29968
+ }
29969
+ } else {
29970
+ newSelectedVal = [];
29971
+ newSelectMulOpts = [];
29972
+
29973
+ if (typeof value === 'undefined') {
29974
+ multipleRef.current.selectedVal = [];
29975
+ multipleRef.current.selectMulOpts = [];
29925
29976
  setMulOptions([]);
29926
29977
  }
29927
29978
  }
29928
29979
 
29929
- onChange && onChange(labelInValue ? selectMulOpts : selectedVal, selectMulOpts);
29980
+ onChange && onChange(labelInValue ? newSelectMulOpts : newSelectedVal, newSelectMulOpts);
29930
29981
  }; // 输入框变化搜索内容
29931
29982
 
29932
29983
 
@@ -36842,7 +36893,7 @@ var useExpand = function useExpand(flattenAllData, expandedKeysProps, defaultExp
36842
36893
 
36843
36894
  react__WEBPACK_IMPORTED_MODULE_3___default.a.useEffect(function () {
36844
36895
  setExpandedKeys(initialExpandedKeys);
36845
- }, [expandedKeysProps, searchExpandedKeys, defaultExpandAll, defaultExpandedKeys, defaultExpandRoot, defaultExpandParent]);
36896
+ }, [flattenAllData, expandedKeysProps, searchExpandedKeys, defaultExpandAll, defaultExpandedKeys, defaultExpandRoot, defaultExpandParent]);
36846
36897
  return [expandedKeys, setExpandedKeys];
36847
36898
  };
36848
36899
  var useScrollToKey = function useScrollToKey(scrollKey, index, estimatedItemSize, scrollRef, viewportHeight, treeNodePrefixCls) {