@teamix/pro 1.5.13 → 1.5.15

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 (57) hide show
  1. package/dist/pro.all.min.css +1 -1
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +187 -135
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.xconsole.min.css +1 -1
  7. package/es/actions/dialog.js +1 -1
  8. package/es/actions/index.scss +1 -1
  9. package/es/card/index.scss +2 -0
  10. package/es/card/xconsole.scss +3 -0
  11. package/es/global.scss +1 -0
  12. package/es/index.d.ts +1 -1
  13. package/es/index.js +1 -1
  14. package/es/next-xconsole.scss +34 -0
  15. package/es/nocode/configurators/ProTable.js +1 -22
  16. package/es/nocode/pages/index.js +1 -26
  17. package/es/page-header/index.scss +2 -1
  18. package/es/page-header/xconsole.scss +5 -0
  19. package/es/table/components/Filter/index.d.ts +5 -3
  20. package/es/table/components/Filter/index.js +84 -63
  21. package/es/table/components/Layout/index.js +5 -2
  22. package/es/table/components/Layout/index.scss +1 -0
  23. package/es/table/index.js +39 -6
  24. package/es/table/typing.d.ts +14 -0
  25. package/es/table/utils/columnRender.d.ts +2 -2
  26. package/es/table/utils/columnRender.js +4 -2
  27. package/es/table/utils/genProColumnToColumn.d.ts +2 -2
  28. package/es/table/utils/genProColumnToColumn.js +3 -1
  29. package/es/table/utils/util.d.ts +5 -0
  30. package/es/table/utils/util.js +19 -0
  31. package/es/xconsole.scss +6 -1
  32. package/lib/actions/dialog.js +1 -1
  33. package/lib/actions/index.scss +1 -1
  34. package/lib/card/index.scss +2 -0
  35. package/lib/card/xconsole.scss +3 -0
  36. package/lib/global.scss +1 -0
  37. package/lib/index.d.ts +1 -1
  38. package/lib/index.js +1 -1
  39. package/lib/next-xconsole.scss +34 -0
  40. package/lib/nocode/configurators/ProTable.js +1 -22
  41. package/lib/nocode/pages/index.js +1 -26
  42. package/lib/page-header/index.scss +2 -1
  43. package/lib/page-header/xconsole.scss +5 -0
  44. package/lib/table/components/Filter/index.d.ts +5 -3
  45. package/lib/table/components/Filter/index.js +83 -62
  46. package/lib/table/components/Layout/index.js +5 -2
  47. package/lib/table/components/Layout/index.scss +1 -0
  48. package/lib/table/index.js +39 -6
  49. package/lib/table/typing.d.ts +14 -0
  50. package/lib/table/utils/columnRender.d.ts +2 -2
  51. package/lib/table/utils/columnRender.js +4 -2
  52. package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
  53. package/lib/table/utils/genProColumnToColumn.js +3 -1
  54. package/lib/table/utils/util.d.ts +5 -0
  55. package/lib/table/utils/util.js +25 -0
  56. package/lib/xconsole.scss +6 -1
  57. package/package.json +1 -1
@@ -2,11 +2,11 @@
2
2
  * 渲染列的逻辑函数
3
3
  */
4
4
  import React from 'react';
5
- import { ProTableColumnProps, ProTableActionType } from '../typing';
5
+ import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
6
6
  /**
7
7
  * 增加了 icon 的功能 render title
8
8
  */
9
- export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>) => JSX.Element;
9
+ export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']) => JSX.Element;
10
10
  /**
11
11
  * 负责单元格的具体渲染
12
12
  */
@@ -29,7 +29,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
29
29
  /**
30
30
  * 增加了 icon 的功能 render title
31
31
  */
32
- var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
32
+ var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, bindUrlProps) {
33
33
  var filterMode = item.filterMode,
34
34
  filters = item.filters,
35
35
  dataSource = item.dataSource,
@@ -86,7 +86,9 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
86
86
  icon: item.tooltipIcon
87
87
  }), item.filters && /*#__PURE__*/_react.default.createElement(_Filter.default, {
88
88
  column: item,
89
- actionRef: actionRef
89
+ actionRef: actionRef,
90
+ bindUrl: bindUrl,
91
+ bindUrlProps: bindUrlProps
90
92
  }));
91
93
  };
92
94
  /**
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ProTableColumnProps, ProTableActionType } from '../typing';
2
+ import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
3
3
  import { ColumnProps } from '@alicloudfe/components/types/table';
4
4
  declare type FixedColumnProps = ColumnProps & {
5
5
  wordBreak?: string;
@@ -9,5 +9,5 @@ declare type FixedColumnProps = ColumnProps & {
9
9
  */
10
10
  export default function genProColumnToColumn(columns: ProTableColumnProps[],
11
11
  /** 是否渲染骨架屏 */
12
- showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string): FixedColumnProps[];
12
+ showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']): FixedColumnProps[];
13
13
  export {};
@@ -24,6 +24,8 @@ showSkeleton, actionRef) {
24
24
  var
25
25
  // 用于埋点
26
26
  dataTeamixSpm = arguments.length > 4 ? arguments[4] : undefined;
27
+ var bindUrl = arguments.length > 5 ? arguments[5] : undefined;
28
+ var bindUrlProps = arguments.length > 6 ? arguments[6] : undefined;
27
29
  return columns.map(function (columnProps) {
28
30
  var filters = columnProps.filters,
29
31
  dataIndex = columnProps.dataIndex,
@@ -47,7 +49,7 @@ showSkeleton, actionRef) {
47
49
  }, others), {}, {
48
50
  children: children ? genProColumnToColumn(children, showSkeleton, actionRef, context) : undefined,
49
51
  dataIndex: dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.toString(),
50
- title: (0, _columnRender.renderColumnsTitle)(columnProps, actionRef),
52
+ title: (0, _columnRender.renderColumnsTitle)(columnProps, actionRef, bindUrl, bindUrlProps),
51
53
  cell: function cell(value, index, record) {
52
54
  return (0, _columnRender.renderCell)(value, columnProps, index, record, actionRef, context, dataTeamixSpm);
53
55
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ProTableActionType } from '../typing';
3
+ export declare function getUrlStateFilter(urlState: {
4
+ [key: string]: any;
5
+ }, actionRef: React.MutableRefObject<ProTableActionType | undefined>): void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getUrlStateFilter = getUrlStateFilter;
7
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
+ function getUrlStateFilter(urlState, actionRef) {
11
+ var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current2, _actionRef$current2$s;
12
+ var filters = Object.keys(urlState).filter(function (item) {
13
+ return /^filter.+$/.test(item);
14
+ });
15
+ var urlStateParams = Object.fromEntries(filters.map(function (item) {
16
+ var _item$split, _urlState$item, _urlState$item$join, _urlState$item$split, _urlState$item2, _urlState$item2$split;
17
+ return [(_item$split = item.split('filter')) === null || _item$split === void 0 ? void 0 : _item$split[1], {
18
+ params: Array.isArray(urlState === null || urlState === void 0 ? void 0 : urlState[item]) ? urlState === null || urlState === void 0 ? void 0 : (_urlState$item = urlState[item]) === null || _urlState$item === void 0 ? void 0 : (_urlState$item$join = _urlState$item.join) === null || _urlState$item$join === void 0 ? void 0 : _urlState$item$join.call(_urlState$item, ',') : urlState === null || urlState === void 0 ? void 0 : urlState[item],
19
+ rules: Array.isArray(urlState === null || urlState === void 0 ? void 0 : urlState[item]) ? urlState === null || urlState === void 0 ? void 0 : urlState[item] : (_urlState$item$split = urlState === null || urlState === void 0 ? void 0 : (_urlState$item2 = urlState[item]) === null || _urlState$item2 === void 0 ? void 0 : (_urlState$item2$split = _urlState$item2.split) === null || _urlState$item2$split === void 0 ? void 0 : _urlState$item2$split.call(_urlState$item2, ',')) !== null && _urlState$item$split !== void 0 ? _urlState$item$split : []
20
+ }];
21
+ }));
22
+ var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : _actionRef$current$ge3.filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
23
+ // 再设置所有的列筛选状态
24
+ (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setFilterRules) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, _objectSpread(_objectSpread({}, rules), urlStateParams));
25
+ }
package/lib/xconsole.scss CHANGED
@@ -74,8 +74,9 @@
74
74
  --color-event-p5: rgba(209, 187, 79, 1);
75
75
  --color-event-p6: rgba(0, 179, 199, 1);
76
76
  --color-event-p7: rgba(0, 146, 199, 1);
77
- --color-text1-4: #1A1A1A;
77
+ --color-text1-4: var(--color-text-1, #1A1A1A);
78
78
  --color-text1-3: rgba(51, 51, 51, 1);
79
+ --color-text1-2: rgba(105,105,105,1);
79
80
  --color-notice-7: rgba(88, 154, 219, 1);
80
81
  --color-notice-5: rgba(0, 100, 200, 1);
81
82
  --color-notice-6: rgba(0, 87, 173, 1);
@@ -487,6 +488,10 @@
487
488
 
488
489
  --teamix-status-tag-loading-background: var(--G40, #AAAAAA);
489
490
 
491
+ --color-text1-3: #555555;
492
+ --color-text1-2: #888888;
493
+
494
+
490
495
  .teamix-pro-lable-icon-tip-icon i {
491
496
  color: var(--G40, #AAAAAA);
492
497
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.5.13",
3
+ "version": "1.5.15",
4
4
  "description": "TeamixPro大包",
5
5
  "keywords": [
6
6
  "aliyun",