@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
@@ -41,11 +41,13 @@ export interface ProActionCommonProps {
41
41
  key?: string | number;
42
42
  visible?: any;
43
43
  context?: any;
44
+ 'data-teamix-spm'?: string;
44
45
  }
45
46
  export interface ProActionMenuButtonProps extends ProActionCommonProps, Omit<MenuButtonProps, 'visible'> {
46
47
  actions: ProActionProps[];
47
48
  icon?: string;
48
49
  noArrow?: boolean;
50
+ 'data-teamix-spm'?: string;
49
51
  }
50
52
  export declare const ProActionMenuButton: (props: ProActionMenuButtonProps) => JSX.Element;
51
53
  export interface ProActionDividerProps extends ProActionCommonProps {
@@ -69,6 +71,8 @@ export declare type ProActionGroupProps = {
69
71
  more?: string | Omit<ProActionMenuButtonProps, 'actions'>;
70
72
  /** 是否有分割线,只有type="text"时生效,默认有分割线 */
71
73
  divider?: boolean;
74
+ /** 用于埋点 */
75
+ ['data-teamix-spm']?: string;
72
76
  } & React.HTMLAttributes<HTMLElement>;
73
77
  export declare function ProActionGroup(props: ProActionGroupProps): JSX.Element;
74
78
  declare const ProAction: (props: ProActionProps) => JSX.Element;
@@ -1,11 +1,11 @@
1
1
  var _excluded = ["type"],
2
- _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps"],
2
+ _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps", "data-teamix-spm"],
3
3
  _excluded3 = ["loading"],
4
4
  _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
5
5
  _excluded5 = ["context", "text"],
6
6
  _excluded6 = ["key", "actions"],
7
7
  _excluded7 = ["key", "config"],
8
- _excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className"];
8
+ _excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className", "data-teamix-spm"];
9
9
 
10
10
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
11
 
@@ -170,6 +170,7 @@ export var ProActionButton = function ProActionButton(props) {
170
170
  tooltip = props.tooltip,
171
171
  disabledTooltip = props.disabledTooltip,
172
172
  tooltipProps = props.tooltipProps,
173
+ dataTeamixSpm = props['data-teamix-spm'],
173
174
  others = _objectWithoutProperties(props, _excluded2);
174
175
 
175
176
  var actionProps = useAction(config, context);
@@ -182,6 +183,11 @@ export var ProActionButton = function ProActionButton(props) {
182
183
  }) : _objectSpread(_objectSpread({
183
184
  disabled: disabled
184
185
  }, actionProps), others);
186
+
187
+ if (dataTeamixSpm) {
188
+ buttonProps['data-teamix-spm'] = dataTeamixSpm;
189
+ }
190
+
185
191
  var content = /*#__PURE__*/React.createElement(Button, _objectSpread({
186
192
  type: type
187
193
  }, buttonProps), buttonContent(children, icon, iconSize, context));
@@ -212,7 +218,8 @@ export var ProActionButton = function ProActionButton(props) {
212
218
 
213
219
  var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
214
220
  var action = props.action,
215
- context = props.context;
221
+ context = props.context,
222
+ dataTeamixSpm = props['data-teamix-spm'];
216
223
  var config = action.config,
217
224
  btnContext = action.context,
218
225
  _onClick2 = action.onClick,
@@ -239,6 +246,11 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
239
246
  return _onClick2(e, context);
240
247
  }
241
248
  }) : _objectSpread({}, menuItemProps);
249
+
250
+ if (dataTeamixSpm) {
251
+ buttonProps['data-teamix-spm'] = dataTeamixSpm;
252
+ }
253
+
242
254
  var content = buttonContent(children, icon, undefined, context);
243
255
 
244
256
  var baseToolTipProps = _objectSpread({
@@ -267,7 +279,7 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
267
279
  }, buttonProps), content);
268
280
  };
269
281
 
270
- function renderCommonActionButtonMenuItem(action, key, context) {
282
+ function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
271
283
  if (action.type === 'divider') {
272
284
  return /*#__PURE__*/React.createElement(Menu.Divider, {
273
285
  key: key
@@ -281,14 +293,15 @@ function renderCommonActionButtonMenuItem(action, key, context) {
281
293
  key: key,
282
294
  label: menuBtn.label || menuBtn.children
283
295
  }, menuBtn.actions.map(function (a) {
284
- return renderCommonActionButtonMenuItem(a, a.key, context);
296
+ return renderCommonActionButtonMenuItem(a, a.key, context, a['data-teamix-spm']);
285
297
  }));
286
298
  }
287
299
 
288
300
  return /*#__PURE__*/React.createElement(ProActionMenuButtonItem, {
289
301
  key: key,
290
302
  action: action,
291
- context: context
303
+ context: context,
304
+ "data-teamix-spm": "".concat(dataTeamixSpm, "-").concat(key)
292
305
  });
293
306
  }
294
307
 
@@ -321,7 +334,7 @@ export var ProActionMenuButton = function ProActionMenuButton(props) {
321
334
  'teamix-pro-actions-text-menu-btn-no-arrow': noArrow
322
335
  })
323
336
  }, others), actions.map(function (action, i) {
324
- return renderCommonActionButtonMenuItem(action, action.key || i, context);
337
+ return renderCommonActionButtonMenuItem(action, action.key || i, context, others === null || others === void 0 ? void 0 : others['data-teamix-spm']);
325
338
  }));
326
339
  }; // 超出 max,则折叠起来
327
340
 
@@ -354,7 +367,7 @@ function formatGroupActions(actions, max, moreConfig) {
354
367
  } // 渲染一个 button 或者 menu button
355
368
 
356
369
 
357
- function renderCommonActionButton(button, context, isTypeText) {
370
+ function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
358
371
  if (button.type === 'divider') {
359
372
  return /*#__PURE__*/React.createElement(Divider, {
360
373
  key: button.key,
@@ -371,6 +384,10 @@ function renderCommonActionButton(button, context, isTypeText) {
371
384
  text: text || isTypeText
372
385
  }, others);
373
386
 
387
+ if (dataTeamixSpm) {
388
+ buttonProps['data-teamix-spm'] = dataTeamixSpm;
389
+ }
390
+
374
391
  if (!button.actions) {
375
392
  return /*#__PURE__*/React.createElement(ProActionButton, _objectSpread({}, buttonProps));
376
393
  }
@@ -451,6 +468,7 @@ export function ProActionGroup(props) {
451
468
  _props$actions = props.actions,
452
469
  actions = _props$actions === void 0 ? [] : _props$actions,
453
470
  className = props.className,
471
+ dataTeamixSpm = props['data-teamix-spm'],
454
472
  containerProps = _objectWithoutProperties(props, _excluded8);
455
473
 
456
474
  var isTypeText = type === 'text';
@@ -466,7 +484,14 @@ export function ProActionGroup(props) {
466
484
  })
467
485
  }, containerProps), formatedActions.map(function (actionBtn, i) {
468
486
  var isLastOne = i === formatedActions.length - 1;
469
- return /*#__PURE__*/React.createElement(React.Fragment, {
487
+
488
+ if (dataTeamixSpm) {
489
+ return /*#__PURE__*/React.createElement(React.Fragment, {
490
+ key: actionBtn.key
491
+ }, renderCommonActionButton(actionBtn, context, isTypeText, "".concat(dataTeamixSpm, "-").concat(actionBtn.key || i)), isTypeText && divider && !isLastOne && /*#__PURE__*/React.createElement(Divider, {
492
+ direction: "ver"
493
+ }));
494
+ } else return /*#__PURE__*/React.createElement(React.Fragment, {
470
495
  key: actionBtn.key
471
496
  }, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/React.createElement(Divider, {
472
497
  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/es/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/es/index.js CHANGED
@@ -37,6 +37,6 @@ export * from './table';
37
37
  export * from './sidebar';
38
38
  export * from './utils';
39
39
  export * from './timeline';
40
- var version = '1.5.0';
40
+ var version = '1.5.1';
41
41
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
42
42
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
@@ -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 };
@@ -32,6 +32,7 @@ import { useActionType } from './utils/action-ref';
32
32
  import debounce from 'lodash.debounce';
33
33
  export * from './typing';
34
34
  export * from './utils';
35
+ import ProIconSwitch from './components/tree-node/components/IconSwitch';
35
36
  var cls = usePrefixCls('teamix-pro-sidebar');
36
37
 
37
38
  var ProSidebar = function ProSidebar(props) {
@@ -203,4 +204,5 @@ var ProSidebar = function ProSidebar(props) {
203
204
  }, treeProps))));
204
205
  };
205
206
 
206
- export default ProSidebar;
207
+ export default ProSidebar;
208
+ export { ProIconSwitch };
@@ -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;