@pisell/materials 3.0.25 → 3.0.27

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 (60) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +19 -19
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +21 -21
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/drag-sort-tree/TreeItem/index.d.ts +19 -0
  13. package/es/components/drag-sort-tree/TreeItem/index.js +192 -0
  14. package/es/components/drag-sort-tree/TreeItem/index.less +66 -0
  15. package/es/components/drag-sort-tree/index.d.ts +5 -0
  16. package/es/components/drag-sort-tree/index.js +115 -0
  17. package/es/components/drag-sort-tree/index.less +4 -0
  18. package/es/components/drag-sort-tree/types.d.ts +24 -0
  19. package/es/components/drag-sort-tree/types.js +1 -0
  20. package/es/components/drawer/index.d.ts +1 -1
  21. package/es/components/drawer/index.js +24 -17
  22. package/es/components/drawer/index.less +31 -0
  23. package/es/components/tabs/index.d.ts +4 -4
  24. package/es/components/tabs/index.js +10 -9
  25. package/es/index.d.ts +1 -0
  26. package/es/index.js +2 -1
  27. package/es/locales/en-US.d.ts +1 -0
  28. package/es/locales/en-US.js +2 -1
  29. package/es/locales/zh-CN.d.ts +1 -0
  30. package/es/locales/zh-CN.js +2 -1
  31. package/es/locales/zh-TW.d.ts +1 -0
  32. package/es/locales/zh-TW.js +2 -1
  33. package/lib/components/Pagination/index.d.ts +1 -1
  34. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +19 -0
  35. package/lib/components/drag-sort-tree/TreeItem/index.js +214 -0
  36. package/lib/components/drag-sort-tree/TreeItem/index.less +66 -0
  37. package/lib/components/drag-sort-tree/index.d.ts +5 -0
  38. package/lib/components/drag-sort-tree/index.js +130 -0
  39. package/lib/components/drag-sort-tree/index.less +4 -0
  40. package/lib/components/drag-sort-tree/types.d.ts +24 -0
  41. package/lib/components/drag-sort-tree/types.js +17 -0
  42. package/lib/components/drawer/index.d.ts +1 -1
  43. package/lib/components/drawer/index.js +5 -1
  44. package/lib/components/drawer/index.less +31 -0
  45. package/lib/components/tabs/index.d.ts +4 -4
  46. package/lib/components/tabs/index.js +3 -1
  47. package/lib/index.d.ts +1 -0
  48. package/lib/index.js +3 -0
  49. package/lib/locales/en-US.d.ts +1 -0
  50. package/lib/locales/en-US.js +2 -1
  51. package/lib/locales/zh-CN.d.ts +1 -0
  52. package/lib/locales/zh-CN.js +2 -1
  53. package/lib/locales/zh-TW.d.ts +1 -0
  54. package/lib/locales/zh-TW.js +2 -1
  55. package/lowcode/date-picker.range-picker/meta.ts +20 -0
  56. package/lowcode/drag-sort-tree/__screenshots__/drag-sort-tree.png +0 -0
  57. package/lowcode/drag-sort-tree/meta.ts +117 -0
  58. package/lowcode/drag-sort-tree/snippets.ts +57 -0
  59. package/lowcode/tabs/meta.ts +9 -0
  60. package/package.json +4 -4
@@ -1,6 +1,24 @@
1
1
  @pisell-prefix: pisell-lowcode;
2
2
 
3
3
  .@{pisell-prefix} {
4
+ &-drawer-header {
5
+ position: unset !important;
6
+ }
7
+
8
+ &-drawer-header-close-icon {
9
+ position: absolute;
10
+ top: 0;
11
+ bottom: 0;
12
+ left: 0;
13
+ width: 50px;
14
+ cursor: pointer;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ font-size: 20px;
19
+ z-index: 1;
20
+ }
21
+
4
22
  &-drawer-outside-wrap {
5
23
  position: absolute;
6
24
  padding: 10px;
@@ -8,9 +26,11 @@
8
26
  display: flex;
9
27
  flex-direction: column;
10
28
  }
29
+
11
30
  &-drawer-outside-wrap-right {
12
31
  left: -82px;
13
32
  }
33
+
14
34
  &-drawer-outside-action-wrap {
15
35
  width: 56px;
16
36
  height: 56px;
@@ -24,17 +44,28 @@
24
44
  justify-content: center;
25
45
  margin-bottom: 20px;
26
46
  cursor: pointer;
47
+
27
48
  &:hover {
28
49
  background: #e8e8ee;
29
50
  }
51
+
30
52
  .anticon {
31
53
  font-size: 20px;
32
54
  }
33
55
  }
56
+
34
57
  &-drawer-outside-action-wrap:last-child {
35
58
  margin-bottom: 0;
36
59
  }
60
+
37
61
  &-drawer-outside-action-active {
38
62
  background: var(--Primary-200, #E9D7FE) !important;
39
63
  }
40
64
  }
65
+
66
+
67
+ .@{pisell-prefix}-basic-drawer-root {
68
+ .@{pisell-prefix}-drawer-header {
69
+ position: relative !important;
70
+ }
71
+ }
@@ -1,6 +1,6 @@
1
- import React, { Component } from "react";
2
- import { TabsProps } from "antd";
3
- import "./index.less";
1
+ import React, { Component } from 'react';
2
+ import { TabsProps } from 'antd';
3
+ import './index.less';
4
4
  declare class Tabs extends Component<any> {
5
5
  state: {
6
6
  activeKey: any;
@@ -8,7 +8,7 @@ declare class Tabs extends Component<any> {
8
8
  private _handleChange;
9
9
  setActiveKey: (key: string) => void;
10
10
  getActiveKey: () => any;
11
- renderIconLabelTabBar: TabsProps["renderTabBar"];
11
+ renderIconLabelTabBar: TabsProps['renderTabBar'];
12
12
  filterHiddenTabs: (tabs: any[]) => any[];
13
13
  render(): React.JSX.Element;
14
14
  }
@@ -59,6 +59,7 @@ var Tabs = class extends import_react.Component {
59
59
  return this.state.activeKey;
60
60
  };
61
61
  this.renderIconLabelTabBar = (props, DefaultTabBar) => {
62
+ var _a;
62
63
  const { items, sidebarWidth } = this.props;
63
64
  let wrapStyle = {
64
65
  gap: props.tabBarGutter
@@ -75,7 +76,8 @@ var Tabs = class extends import_react.Component {
75
76
  className: (0, import_classnames.default)(
76
77
  "pisell-lowcode-tabs-nav",
77
78
  `${prefix}tab-bar-wrap`,
78
- `${prefix}tab-bar-wrap-${props.tabPosition}`
79
+ `${prefix}tab-bar-wrap-${props.tabPosition}`,
80
+ (_a = this.props) == null ? void 0 : _a.className
79
81
  ),
80
82
  style: wrapStyle
81
83
  },
package/lib/index.d.ts CHANGED
@@ -78,3 +78,4 @@ export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Ti
78
78
  export { default as SelectTime } from './components/select-time';
79
79
  export { default as AutoCompleteNumber } from './components/auto-complete-number';
80
80
  export { default as BatchEditor } from './components/batch-editor';
81
+ export { default as DragSortTree } from './components/drag-sort-tree';
package/lib/index.js CHANGED
@@ -53,6 +53,7 @@ __export(src_exports, {
53
53
  Descriptions: () => import_antd11.Descriptions,
54
54
  Div: () => import_div.default,
55
55
  Divider: () => import_antd12.Divider,
56
+ DragSortTree: () => import_drag_sort_tree.default,
56
57
  Drawer: () => import_drawer.default,
57
58
  Dropdown: () => import_dropdown.default,
58
59
  Empty: () => import_antd13.Empty,
@@ -191,6 +192,7 @@ var import_Time = __toESM(require("./components/virtual-keyboard/Time"));
191
192
  var import_select_time = __toESM(require("./components/select-time"));
192
193
  var import_auto_complete_number = __toESM(require("./components/auto-complete-number"));
193
194
  var import_batch_editor = __toESM(require("./components/batch-editor"));
195
+ var import_drag_sort_tree = __toESM(require("./components/drag-sort-tree"));
194
196
  // Annotate the CommonJS export names for ESM import in node:
195
197
  0 && (module.exports = {
196
198
  Affix,
@@ -217,6 +219,7 @@ var import_batch_editor = __toESM(require("./components/batch-editor"));
217
219
  Descriptions,
218
220
  Div,
219
221
  Divider,
222
+ DragSortTree,
220
223
  Drawer,
221
224
  Dropdown,
222
225
  Empty,
@@ -96,5 +96,6 @@ declare const _default: {
96
96
  'table-action-export-import-log-err-log': string;
97
97
  'table-action-export-import-log-copy': string;
98
98
  'table-action-export-import-table-success-copy': string;
99
+ 'drag-sort-tree-unavailable-today-tip': string;
99
100
  };
100
101
  export default _default;
@@ -123,5 +123,6 @@ var en_US_default = {
123
123
  "table-action-export-import-log-detail-title": "Import Details",
124
124
  "table-action-export-import-log-err-log": "Failure Log",
125
125
  "table-action-export-import-log-copy": "Copy",
126
- "table-action-export-import-table-success-copy": "Copy Success"
126
+ "table-action-export-import-table-success-copy": "Copy Success",
127
+ "drag-sort-tree-unavailable-today-tip": "Unavailable today"
127
128
  };
@@ -96,5 +96,6 @@ declare const _default: {
96
96
  'table-action-export-import-log-err-log': string;
97
97
  'table-action-export-import-log-copy': string;
98
98
  'table-action-export-import-table-success-copy': string;
99
+ 'drag-sort-tree-unavailable-today-tip': string;
99
100
  };
100
101
  export default _default;
@@ -123,5 +123,6 @@ var zh_CN_default = {
123
123
  "table-action-export-import-log-detail-title": "导入详情",
124
124
  "table-action-export-import-log-err-log": "失败日志",
125
125
  "table-action-export-import-log-copy": "复制",
126
- "table-action-export-import-table-success-copy": "复制成功"
126
+ "table-action-export-import-table-success-copy": "复制成功",
127
+ "drag-sort-tree-unavailable-today-tip": "今日不可用"
127
128
  };
@@ -96,5 +96,6 @@ declare const _default: {
96
96
  'table-action-export-import-log-err-log': string;
97
97
  'table-action-export-import-log-copy': string;
98
98
  'table-action-export-import-table-success-copy': string;
99
+ 'drag-sort-tree-unavailable-today-tip': string;
99
100
  };
100
101
  export default _default;
@@ -123,5 +123,6 @@ var zh_TW_default = {
123
123
  "table-action-export-import-log-detail-title": "導入詳情",
124
124
  "table-action-export-import-log-err-log": "失敗日誌",
125
125
  "table-action-export-import-log-copy": "復製",
126
- "table-action-export-import-table-success-copy": "復製成功"
126
+ "table-action-export-import-table-success-copy": "復製成功",
127
+ "drag-sort-tree-unavailable-today-tip": "今日不可用"
127
128
  };
@@ -205,6 +205,26 @@ export default {
205
205
  "VariableSetter",
206
206
  ],
207
207
  },
208
+ {
209
+ name: "disablePortal",
210
+ title: {
211
+ label: "渲染位置",
212
+ tip: "disablePortal | true dom结构在当前结构下 false 追加到body",
213
+ },
214
+ propType: "bool",
215
+ defaultValue: false,
216
+ setter: "BoolSetter",
217
+ },
218
+ {
219
+ name: "returnShortcutString",
220
+ title: {
221
+ label: "使用快捷筛选时value返回快捷字符串",
222
+ tip: "returnShortcutString | 使用快捷筛选时返回快捷字符串",
223
+ },
224
+ propType: "bool",
225
+ defaultValue: false,
226
+ setter: "BoolSetter",
227
+ },
208
228
  ],
209
229
  },
210
230
  // {
@@ -0,0 +1,117 @@
1
+ import snippets from './snippets';
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "DragSortTree",
6
+ title: "拖拽排序",
7
+ category: "数据展示",
8
+ docUrl: "",
9
+ screenshot: "",
10
+ devMode: "proCode",
11
+ npm: {
12
+ package: "@pisell/materials",
13
+ version: "1.0.1",
14
+ exportName: "DragSortTree",
15
+ main: "src/index.tsx",
16
+ destructuring: true,
17
+ subName: "",
18
+ },
19
+ props: [
20
+ {
21
+ title: '数据源',
22
+ display: 'block',
23
+ type: 'group',
24
+ items: [
25
+ {
26
+ name: 'value',
27
+ title: '列表数据源',
28
+ propType: { type: 'arrayOf', value: 'any' },
29
+ setter: ['JsonSetter', 'VariableSetter'],
30
+ },
31
+ {
32
+ name: 'rowKey',
33
+ title: {
34
+ label: '行Key',
35
+ tip: 'rowKey | 当 renderItem 自定义渲染列表项有效时,自定义每一行的 key 的获取方式',
36
+ },
37
+ propType: {
38
+ type: 'oneOfType',
39
+ value: ['string', 'function'],
40
+ },
41
+ defaultValue: 'id',
42
+ setter: [
43
+ 'StringSetter',
44
+ {
45
+ componentName: 'FunctionSetter',
46
+ props: {
47
+ template:
48
+ 'rowKey(item,${extParams}){\n// 自定义每一行的 key\nreturn `${item.id}`;\n}',
49
+ },
50
+ },
51
+ 'VariableSetter',
52
+ ],
53
+ },
54
+ {
55
+ name: 'className',
56
+ title: {
57
+ label: '样式类名',
58
+ tip: 'className | 样式类名',
59
+ },
60
+ propType: 'string',
61
+ setter: 'StringSetter',
62
+ },
63
+ ]
64
+ },
65
+ {
66
+ name: "tabKey",
67
+ title: { label: 'tabKey', tip: 'tabKey | 标识当前选中的tab' },
68
+ propType: 'string',
69
+ },
70
+ {
71
+ name: "hiddenKeys",
72
+ title: { label: '折叠当前项', tip: 'hiddenKeys | 折叠当前项的keys' },
73
+ propType: 'array',
74
+ },
75
+ {
76
+ name: "titleRender",
77
+ title: { label: '标题', tip: '是否自定义标题内容 | node/func' },
78
+ propType: { type: 'oneOfType', value: ['node', 'func'] },
79
+ },
80
+ {
81
+ name: "hiddenDraggableIcon",
82
+ title: { label: "隐藏拖拽图标", tip: "是否隐藏拖拽图标" },
83
+ propType: "bool",
84
+ defaultValue: false,
85
+ },
86
+ {
87
+ name: "hiddenRightIcon",
88
+ title: { label: "右侧图标", tip: "是否隐藏右侧图标" },
89
+ propType: "bool",
90
+ defaultValue: false,
91
+ },
92
+ {
93
+ name: "hiddenWarningIcon",
94
+ title: { label: "警告图标", tip: "子元素是否隐藏警告图标" },
95
+ propType: "bool",
96
+ defaultValue: false,
97
+ },
98
+ ],
99
+ configure: {
100
+ component: {
101
+ isContainer: true,
102
+ },
103
+ supports: {
104
+ style: true,
105
+ events: [
106
+ {
107
+ name: 'onChange',
108
+ template: 'onChange(value,${extParams}){\n// 排序 改变的回调\n}',
109
+ },
110
+ {
111
+ name: 'onHiddenChange',
112
+ template: 'onHiddenChange(value,${extParams}){\n// 折叠当前项的回调\n}',
113
+ },
114
+ ]
115
+ },
116
+ },
117
+ };
@@ -0,0 +1,57 @@
1
+ export default [
2
+ {
3
+ title: '拖拽排序',
4
+ // screenshot: require('./__screenshots__/drag-sort-tree.png'),
5
+ schema: {
6
+ componentName: 'DragSortTree',
7
+ props: {
8
+ value: [{
9
+ "id": 1,
10
+ "title": "资源1",
11
+ "show": true,
12
+ "children": [{
13
+ "id": 11,
14
+ "title": "资源1-1",
15
+ "is_available": 1,
16
+ "type_id": 1
17
+ }, {
18
+ "id": 12,
19
+ "title": "资源1-2",
20
+ "is_available": 1,
21
+ "type_id": 1
22
+ }]
23
+ }, {
24
+ "id": 2,
25
+ "title": "资源2",
26
+ "show": false,
27
+ "children": [{
28
+ "id": 21,
29
+ "title": "资源2-1",
30
+ "is_available": 0,
31
+ "type_id": 2
32
+ }, {
33
+ "id": 22,
34
+ "title": "资源2-2",
35
+ "is_available": 1,
36
+ "type_id": 2
37
+ }]
38
+ }, {
39
+ "id": 3,
40
+ "title": "资源3",
41
+ "show": true,
42
+ "children": [{
43
+ "id": 31,
44
+ "title": "资源3-1",
45
+ "is_available": 1,
46
+ "type_id": 3
47
+ }, {
48
+ "id": 32,
49
+ "title": "资源3-2",
50
+ "is_available": 0,
51
+ "type_id": 3
52
+ }]
53
+ }]
54
+ },
55
+ },
56
+ }
57
+ ];
@@ -380,6 +380,15 @@ export default {
380
380
  setter: "NumberSetter",
381
381
  supportVariable: true,
382
382
  },
383
+ {
384
+ name: 'className',
385
+ title: {
386
+ label: '样式类名',
387
+ tip: 'className | 样式类名',
388
+ },
389
+ propType: 'string',
390
+ setter: 'StringSetter',
391
+ },
383
392
  {
384
393
  name: "tabBarStyle",
385
394
  title: { label: "tab bar的样式对象", tip: "tab bar的样式对象" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "3.0.25",
3
+ "version": "3.0.27",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -61,9 +61,9 @@
61
61
  "react-window": "^1.8.10",
62
62
  "react-virtualized-auto-sizer": "^1.0.20",
63
63
  "crypto-js": "^4.2.0",
64
- "@pisell/utils": "1.0.25",
65
- "@pisell/date-picker": "1.0.74",
66
- "@pisell/icon": "0.0.11"
64
+ "@pisell/date-picker": "1.0.75",
65
+ "@pisell/icon": "0.0.11",
66
+ "@pisell/utils": "1.0.25"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "react": "^18.0.0",