@teamix/pro 1.5.0 → 1.5.1

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.
Files changed (69) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +1103 -123
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/index.d.ts +4 -0
  6. package/es/actions/index.js +34 -9
  7. package/es/actions/index.scss +5 -0
  8. package/es/card/index.scss +7 -0
  9. package/es/index.d.ts +1 -1
  10. package/es/index.js +1 -1
  11. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  12. package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  13. package/es/sidebar/index.d.ts +2 -0
  14. package/es/sidebar/index.js +3 -1
  15. package/es/table/components/CardView/index.d.ts +5 -0
  16. package/es/table/components/CardView/index.js +446 -0
  17. package/es/table/components/CardView/index.scss +46 -0
  18. package/es/table/components/Filter/index.d.ts +1 -0
  19. package/es/table/components/Filter/index.js +21 -14
  20. package/es/table/components/Layout/index.js +4 -2
  21. package/es/table/components/LoadMore/index.d.ts +20 -0
  22. package/es/table/components/LoadMore/index.js +107 -0
  23. package/es/table/components/LoadMore/index.scss +19 -0
  24. package/es/table/components/QuickAction/index.d.ts +1 -0
  25. package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
  26. package/es/table/components/ToolBar/CardSwitch.js +63 -0
  27. package/es/table/components/ToolBar/FilterColumnIcon.js +13 -2
  28. package/es/table/components/ToolBar/Fullscreen.js +15 -2
  29. package/es/table/components/ToolBar/index.js +64 -33
  30. package/es/table/components/ToolBar/index.scss +10 -1
  31. package/es/table/index.js +132 -34
  32. package/es/table/typing.d.ts +69 -0
  33. package/es/table/utils/columnRender.d.ts +1 -1
  34. package/es/table/utils/columnRender.js +4 -2
  35. package/es/table/utils/genProColumnToColumn.d.ts +1 -1
  36. package/es/table/utils/genProColumnToColumn.js +3 -1
  37. package/lib/actions/index.d.ts +4 -0
  38. package/lib/actions/index.js +33 -9
  39. package/lib/actions/index.scss +5 -0
  40. package/lib/card/index.scss +7 -0
  41. package/lib/index.d.ts +1 -1
  42. package/lib/index.js +1 -1
  43. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  44. package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  45. package/lib/sidebar/index.d.ts +2 -0
  46. package/lib/sidebar/index.js +12 -1
  47. package/lib/table/components/CardView/index.d.ts +5 -0
  48. package/lib/table/components/CardView/index.js +468 -0
  49. package/lib/table/components/CardView/index.scss +46 -0
  50. package/lib/table/components/Filter/index.d.ts +1 -0
  51. package/lib/table/components/Filter/index.js +21 -14
  52. package/lib/table/components/Layout/index.js +4 -2
  53. package/lib/table/components/LoadMore/index.d.ts +20 -0
  54. package/lib/table/components/LoadMore/index.js +128 -0
  55. package/lib/table/components/LoadMore/index.scss +19 -0
  56. package/lib/table/components/QuickAction/index.d.ts +1 -0
  57. package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
  58. package/lib/table/components/ToolBar/CardSwitch.js +82 -0
  59. package/lib/table/components/ToolBar/FilterColumnIcon.js +13 -2
  60. package/lib/table/components/ToolBar/Fullscreen.js +15 -2
  61. package/lib/table/components/ToolBar/index.js +65 -32
  62. package/lib/table/components/ToolBar/index.scss +10 -1
  63. package/lib/table/index.js +134 -34
  64. package/lib/table/typing.d.ts +69 -0
  65. package/lib/table/utils/columnRender.d.ts +1 -1
  66. package/lib/table/utils/columnRender.js +4 -2
  67. package/lib/table/utils/genProColumnToColumn.d.ts +1 -1
  68. package/lib/table/utils/genProColumnToColumn.js +3 -1
  69. package/package.json +1 -1
@@ -54,13 +54,13 @@ var _dangerPopConfirm = require("./danger-pop-confirm");
54
54
  require("./index.scss");
55
55
 
56
56
  var _excluded = ["type"],
57
- _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps"],
57
+ _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps", "data-teamix-spm"],
58
58
  _excluded3 = ["loading"],
59
59
  _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
60
60
  _excluded5 = ["context", "text"],
61
61
  _excluded6 = ["key", "actions"],
62
62
  _excluded7 = ["key", "config"],
63
- _excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className"];
63
+ _excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className", "data-teamix-spm"];
64
64
 
65
65
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66
66
 
@@ -207,6 +207,7 @@ var ProActionButton = function ProActionButton(props) {
207
207
  tooltip = props.tooltip,
208
208
  disabledTooltip = props.disabledTooltip,
209
209
  tooltipProps = props.tooltipProps,
210
+ dataTeamixSpm = props['data-teamix-spm'],
210
211
  others = _objectWithoutProperties(props, _excluded2);
211
212
 
212
213
  var actionProps = useAction(config, context);
@@ -220,6 +221,10 @@ var ProActionButton = function ProActionButton(props) {
220
221
  disabled: disabled
221
222
  }, actionProps), others);
222
223
 
224
+ if (dataTeamixSpm) {
225
+ buttonProps['data-teamix-spm'] = dataTeamixSpm;
226
+ }
227
+
223
228
  var content = /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({
224
229
  type: type
225
230
  }, buttonProps), buttonContent(children, icon, iconSize, context));
@@ -252,7 +257,8 @@ exports.ProActionButton = ProActionButton;
252
257
 
253
258
  var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
254
259
  var action = props.action,
255
- context = props.context;
260
+ context = props.context,
261
+ dataTeamixSpm = props['data-teamix-spm'];
256
262
  var config = action.config,
257
263
  btnContext = action.context,
258
264
  _onClick2 = action.onClick,
@@ -279,6 +285,11 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
279
285
  return _onClick2(e, context);
280
286
  }
281
287
  }) : _objectSpread({}, menuItemProps);
288
+
289
+ if (dataTeamixSpm) {
290
+ buttonProps['data-teamix-spm'] = dataTeamixSpm;
291
+ }
292
+
282
293
  var content = buttonContent(children, icon, undefined, context);
283
294
 
284
295
  var baseToolTipProps = _objectSpread({
@@ -307,7 +318,7 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
307
318
  }, buttonProps), content);
308
319
  };
309
320
 
310
- function renderCommonActionButtonMenuItem(action, key, context) {
321
+ function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
311
322
  if (action.type === 'divider') {
312
323
  return /*#__PURE__*/_react.default.createElement(_components.Menu.Divider, {
313
324
  key: key
@@ -321,14 +332,15 @@ function renderCommonActionButtonMenuItem(action, key, context) {
321
332
  key: key,
322
333
  label: menuBtn.label || menuBtn.children
323
334
  }, menuBtn.actions.map(function (a) {
324
- return renderCommonActionButtonMenuItem(a, a.key, context);
335
+ return renderCommonActionButtonMenuItem(a, a.key, context, a['data-teamix-spm']);
325
336
  }));
326
337
  }
327
338
 
328
339
  return /*#__PURE__*/_react.default.createElement(ProActionMenuButtonItem, {
329
340
  key: key,
330
341
  action: action,
331
- context: context
342
+ context: context,
343
+ "data-teamix-spm": "".concat(dataTeamixSpm, "-").concat(key)
332
344
  });
333
345
  }
334
346
 
@@ -361,7 +373,7 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
361
373
  'teamix-pro-actions-text-menu-btn-no-arrow': noArrow
362
374
  })
363
375
  }, others), actions.map(function (action, i) {
364
- return renderCommonActionButtonMenuItem(action, action.key || i, context);
376
+ return renderCommonActionButtonMenuItem(action, action.key || i, context, others === null || others === void 0 ? void 0 : others['data-teamix-spm']);
365
377
  }));
366
378
  }; // 超出 max,则折叠起来
367
379
 
@@ -397,7 +409,7 @@ function formatGroupActions(actions, max, moreConfig) {
397
409
  } // 渲染一个 button 或者 menu button
398
410
 
399
411
 
400
- function renderCommonActionButton(button, context, isTypeText) {
412
+ function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
401
413
  if (button.type === 'divider') {
402
414
  return /*#__PURE__*/_react.default.createElement(_components.Divider, {
403
415
  key: button.key,
@@ -414,6 +426,10 @@ function renderCommonActionButton(button, context, isTypeText) {
414
426
  text: text || isTypeText
415
427
  }, others);
416
428
 
429
+ if (dataTeamixSpm) {
430
+ buttonProps['data-teamix-spm'] = dataTeamixSpm;
431
+ }
432
+
417
433
  if (!button.actions) {
418
434
  return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
419
435
  }
@@ -494,6 +510,7 @@ function ProActionGroup(props) {
494
510
  _props$actions = props.actions,
495
511
  actions = _props$actions === void 0 ? [] : _props$actions,
496
512
  className = props.className,
513
+ dataTeamixSpm = props['data-teamix-spm'],
497
514
  containerProps = _objectWithoutProperties(props, _excluded8);
498
515
 
499
516
  var isTypeText = type === 'text';
@@ -509,7 +526,14 @@ function ProActionGroup(props) {
509
526
  })
510
527
  }, containerProps), formatedActions.map(function (actionBtn, i) {
511
528
  var isLastOne = i === formatedActions.length - 1;
512
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
529
+
530
+ if (dataTeamixSpm) {
531
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
532
+ key: actionBtn.key
533
+ }, renderCommonActionButton(actionBtn, context, isTypeText, "".concat(dataTeamixSpm, "-").concat(actionBtn.key || i)), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
534
+ direction: "ver"
535
+ }));
536
+ } else return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
513
537
  key: actionBtn.key
514
538
  }, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
515
539
  direction: "ver"
@@ -110,15 +110,20 @@
110
110
 
111
111
  .next-dialog-body {
112
112
  .teamix-pro-info {
113
+ padding-right: 16px;
113
114
  .next-card-content-container {
114
115
  margin-top: 10px;
115
116
  padding-bottom: 10px;
117
+ padding-right: 0;
116
118
  .next-col.next-col-24:last-child {
117
119
  .teamix-pro-info-item:last-child {
118
120
  padding-bottom: 0px;
119
121
  }
120
122
  }
121
123
  }
124
+ .teamix-pro-info-item-value {
125
+ padding-right: 0px;
126
+ }
122
127
  }
123
128
  }
124
129
 
@@ -51,6 +51,12 @@
51
51
  display: flex;
52
52
  align-items: center;
53
53
 
54
+ .next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn {
55
+ i {
56
+ margin-right: 0;
57
+ }
58
+ }
59
+
54
60
  & > div {
55
61
  display: flex;
56
62
  align-items: center;
@@ -295,4 +301,5 @@
295
301
  &.transparent {
296
302
  background: transparent;
297
303
  }
304
+
298
305
  }
package/lib/index.d.ts CHANGED
@@ -28,5 +28,5 @@ export * from './table';
28
28
  export * from './sidebar';
29
29
  export * from './utils';
30
30
  export * from './timeline';
31
- declare const version = "1.5.0";
31
+ declare const version = "1.5.1";
32
32
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -318,5 +318,5 @@ if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMI
318
318
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
319
319
  }
320
320
 
321
- var version = '1.5.0';
321
+ var version = '1.5.1';
322
322
  exports.version = version;
@@ -1,7 +1,7 @@
1
1
  import { TooltipProps } from '@alicloudfe/components/types/balloon';
2
2
  import React from 'react';
3
3
  import './index.scss';
4
- export declare type ProIconSwitch = {
4
+ export declare type ProIconSwitchProps = {
5
5
  /** 默认状态 */
6
6
  visible?: boolean;
7
7
  /** tooltip 显示隐藏 */
@@ -19,5 +19,5 @@ export declare type ProIconSwitch = {
19
19
  /** 状态改变的回调 */
20
20
  onChange?: (state: boolean) => void;
21
21
  };
22
- declare const ProIconSwitch: React.FC<ProIconSwitch>;
22
+ declare const ProIconSwitch: React.FC<ProIconSwitchProps>;
23
23
  export default ProIconSwitch;
@@ -3,5 +3,5 @@
3
3
  cursor: pointer;
4
4
  }
5
5
  .teamix-pro-icon-switch-active {
6
- color: var(--color-warning-7, #ffb96e);
6
+ color: var(--color-warning-5, #ffb96e);
7
7
  }
@@ -3,5 +3,7 @@ import './index.scss';
3
3
  import { ProSidebarProps } from './typing';
4
4
  export * from './typing';
5
5
  export * from './utils';
6
+ import ProIconSwitch from './components/tree-node/components/IconSwitch';
6
7
  declare const ProSidebar: React.FC<ProSidebarProps>;
7
8
  export default ProSidebar;
9
+ export { ProIconSwitch };
@@ -5,7 +5,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- var _exportNames = {};
8
+ var _exportNames = {
9
+ ProIconSwitch: true
10
+ };
11
+ Object.defineProperty(exports, "ProIconSwitch", {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return _IconSwitch.default;
15
+ }
16
+ });
9
17
  exports.default = void 0;
10
18
 
11
19
  var _react = _interopRequireWildcard(require("react"));
@@ -51,6 +59,9 @@ Object.keys(_utils2).forEach(function (key) {
51
59
  }
52
60
  });
53
61
  });
62
+
63
+ var _IconSwitch = _interopRequireDefault(require("./components/tree-node/components/IconSwitch"));
64
+
54
65
  var _excluded = ["selectedKeys", "checkedKeys", "dataSource", "className", "style", "searchOnChange", "showSearch", "onSelect", "onCheck", "treeProps", "cardProps", "actionRef", "onBeforeRenderNodeEvent", "beforeRenderNode", "url", "method", "params", "data", "extendParams", "beforeRequest", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError", "link", "scrollArea", "onExpandAllChange", "onExpandLevelChange"];
55
66
 
56
67
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ProTableCardViewProps } from '../../typing';
3
+ import './index.scss';
4
+ declare const CardView: React.FC<ProTableCardViewProps>;
5
+ export default CardView;