@kdcloudjs/kdesign 1.6.5 → 1.6.6

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.4
3
+ * @kdcloudjs/kdesign v1.6.5
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -1589,15 +1589,7 @@ function useResizeObserver(element, handler) {
1589
1589
 
1590
1590
  ['width', 'height', 'x', 'y', 'bottom', 'top', 'left', 'right'].forEach(function (prop) {
1591
1591
  rect[prop] = contentRect[prop];
1592
- }); // rect.width = contentRect.width
1593
- // rect.height = contentRect.height
1594
- // rect.x = contentRect.x
1595
- // rect.y = contentRect.y
1596
- // rect.bottom = contentRect.bottom
1597
- // rect.top = contentRect.top
1598
- // rect.left = contentRect.left
1599
- // rect.right = contentRect.right
1600
-
1592
+ });
1601
1593
  handler && handler(rect);
1602
1594
  };
1603
1595
 
@@ -8815,6 +8807,7 @@ var compDefaultProps = {
8815
8807
  borderType: 'underline',
8816
8808
  disabled: false,
8817
8809
  count: true,
8810
+ countPosition: 'outter',
8818
8811
  maxLength: 255
8819
8812
  },
8820
8813
  Timeline: {
@@ -20634,10 +20627,10 @@ var ClearableInput = function ClearableInput(props) {
20634
20627
 
20635
20628
  "use strict";
20636
20629
  __webpack_require__.r(__webpack_exports__);
20637
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
20638
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
20639
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
20640
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__);
20630
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
20631
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
20632
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
20633
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
20641
20634
  /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
20642
20635
  /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__);
20643
20636
  /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
@@ -20663,7 +20656,7 @@ __webpack_require__.r(__webpack_exports__);
20663
20656
 
20664
20657
 
20665
20658
 
20666
- var _excluded = ["value", "allowClear", "borderType", "defaultValue", "count", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"],
20659
+ var _excluded = ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"],
20667
20660
  _excluded2 = ["width", "margin", "marginLeft", "marginRight", "marginTop", "marginBottom"];
20668
20661
 
20669
20662
 
@@ -20699,6 +20692,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
20699
20692
  borderType = textAreaProps.borderType,
20700
20693
  defaultValue = textAreaProps.defaultValue,
20701
20694
  count = textAreaProps.count,
20695
+ countPosition = textAreaProps.countPosition,
20702
20696
  autoSize = textAreaProps.autoSize,
20703
20697
  className = textAreaProps.className,
20704
20698
  customPrefixcls = textAreaProps.prefixCls,
@@ -20767,7 +20761,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
20767
20761
  };
20768
20762
 
20769
20763
  var handleBlur = function handleBlur(e) {
20770
- showNumberMark && setShowNumberMark(false);
20764
+ // showNumberMark && setShowNumberMark(false)
20771
20765
  onBlur && onBlur(e);
20772
20766
  };
20773
20767
 
@@ -20796,8 +20790,9 @@ var InternalTextarea = function InternalTextarea(props, ref) {
20796
20790
  }
20797
20791
 
20798
20792
  if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
20793
+ var countClass = classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(textAreaPrefixCls, "-textarea-mark"), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
20799
20794
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", {
20800
- className: "".concat(textAreaPrefixCls, "-textarea-mark")
20795
+ className: countClass
20801
20796
  }, enteredLength, "/", maxLength);
20802
20797
  }
20803
20798
 
@@ -20814,7 +20809,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
20814
20809
  }, [propsValue, setValue]);
20815
20810
 
20816
20811
  var renderTextArea = function renderTextArea(prefixCls) {
20817
- var _classNames;
20812
+ var _classNames2;
20818
20813
 
20819
20814
  var hadCount = count && !disabled && !allowClear;
20820
20815
 
@@ -20842,11 +20837,11 @@ var InternalTextarea = function InternalTextarea(props, ref) {
20842
20837
  }
20843
20838
  }
20844
20839
 
20845
- var textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("textarea", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({
20840
+ var textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("textarea", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
20846
20841
  ref: textareaRef,
20847
20842
  disabled: disabled,
20848
- style: _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
20849
- className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-textarea"), (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, className, className && !allowClear && !hadCount)),
20843
+ style: _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
20844
+ className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames2), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, className, className && !allowClear && !hadCount)),
20850
20845
  onChange: handleChange,
20851
20846
  onFocus: !disabled ? handleFocus : undefined,
20852
20847
  onBlur: !disabled ? handleBlur : undefined,
@@ -20860,7 +20855,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
20860
20855
  }, textarea, renderNumberMark()) : textarea;
20861
20856
  };
20862
20857
 
20863
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_11__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, textAreaProps, {
20858
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_11__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, textAreaProps, {
20864
20859
  handleReset: handleReset,
20865
20860
  value: value,
20866
20861
  inputType: "text",
@@ -32206,8 +32201,7 @@ __webpack_require__.r(__webpack_exports__);
32206
32201
 
32207
32202
 
32208
32203
 
32209
-
32210
- function Table(props) {
32204
+ var Table = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"])(function (props, ref) {
32211
32205
  var columns = props.columns,
32212
32206
  dataSource = props.dataSource,
32213
32207
  columnDrag = props.columnDrag,
@@ -32255,19 +32249,32 @@ function Table(props) {
32255
32249
  columns: columns,
32256
32250
  dataSource: dataSource
32257
32251
  });
32252
+ var pipelineRef = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(pipeline);
32253
+ pipelineRef.current = pipeline;
32258
32254
 
32259
32255
  if (footerDataSource) {
32260
32256
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
32261
32257
  // @ts-ignore
32262
32258
  pipeline.footerDataSource(footerDataSource);
32263
32259
  }
32260
+
32261
+ Object(react__WEBPACK_IMPORTED_MODULE_4__["useImperativeHandle"])(ref, function () {
32262
+ var _pipelineRef$current$, _pipelineRef$current$2, _pipelineRef$current$3;
32263
+
32264
+ return {
32265
+ api: {
32266
+ getColumns: (_pipelineRef$current$ = pipelineRef.current.getColumns) === null || _pipelineRef$current$ === void 0 ? void 0 : _pipelineRef$current$.bind(pipelineRef.current),
32267
+ getDataSource: (_pipelineRef$current$2 = pipelineRef.current.getDataSource) === null || _pipelineRef$current$2 === void 0 ? void 0 : _pipelineRef$current$2.bind(pipelineRef.current),
32268
+ getFooterDataSource: (_pipelineRef$current$3 = pipelineRef.current.getFooterDataSource) === null || _pipelineRef$current$3 === void 0 ? void 0 : _pipelineRef$current$3.bind(pipelineRef.current)
32269
+ }
32270
+ };
32271
+ });
32264
32272
  /* -------------------------------------------------------------------------- */
32265
32273
 
32266
32274
  /* features */
32267
32275
 
32268
32276
  /* -------------------------------------------------------------------------- */
32269
32277
 
32270
-
32271
32278
  Object(_feature_rowSelection__WEBPACK_IMPORTED_MODULE_10__["default"])(pipeline, rowSelection);
32272
32279
  Object(_feature_rowDetail__WEBPACK_IMPORTED_MODULE_11__["default"])(pipeline, rowDetail);
32273
32280
  Object(_feature_filter__WEBPACK_IMPORTED_MODULE_12__["default"])(pipeline, filter);
@@ -32322,8 +32329,8 @@ function Table(props) {
32322
32329
  scrollbarWidth: scrollbarWidth,
32323
32330
  scrollLoad: scrollLoad
32324
32331
  }));
32325
- }
32326
-
32332
+ });
32333
+ Table.displayName = 'Table';
32327
32334
  /* harmony default export */ __webpack_exports__["default"] = (Table);
32328
32335
 
32329
32336
  /***/ }),