@pisell/materials 3.0.19 → 3.0.21

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.
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
5
5
  className: string;
6
6
  defaultCurrent: number;
7
7
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
8
+ itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
@@ -22,7 +22,7 @@
22
22
  }
23
23
  &-table-action-column-drag-item {
24
24
  display: flex;
25
- height: 36px;
25
+ min-height: 36px;
26
26
  border-radius: 4px;
27
27
  align-items: center;
28
28
  &:hover {
@@ -39,6 +39,7 @@
39
39
  padding-right: 6px;
40
40
  display: flex;
41
41
  justify-content: space-between;
42
+ align-items: center;
42
43
  flex: 1;
43
44
  }
44
45
  &-table-action-column-drag-item-right-text {
@@ -135,7 +135,7 @@ var BasicTable = function BasicTable(props) {
135
135
  expandable: {
136
136
  defaultExpandAllRows: true
137
137
  }
138
- })), total > ((pagination === null || pagination === void 0 ? void 0 : (_pagination$pageSizeO = pagination.pageSizeOptions) === null || _pagination$pageSizeO === void 0 ? void 0 : _pagination$pageSizeO[0]) || 10) ? /*#__PURE__*/React.createElement(Form.Item, {
138
+ })), total > ((pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || (pagination === null || pagination === void 0 ? void 0 : (_pagination$pageSizeO = pagination.pageSizeOptions) === null || _pagination$pageSizeO === void 0 ? void 0 : _pagination$pageSizeO[0]) || 10) ? /*#__PURE__*/React.createElement(Form.Item, {
139
139
  name: "pagination"
140
140
  }, /*#__PURE__*/React.createElement(FormPagination, _extends({}, pagination, {
141
141
  showTotal: _showTotal,
@@ -15,6 +15,16 @@
15
15
  margin-top: 12px;
16
16
  }
17
17
  }
18
+
19
+ .pisell-lowcode-checkbox{
20
+ position: static;
21
+ width: auto!important;
22
+ height: auto!important;
23
+ }
24
+
25
+ .pisell-lowcode-checkbox-inner, .pisell-lowcode-radio-inner{
26
+ position: relative
27
+ }
18
28
  }
19
29
 
20
30
  .materials-grid-table-wrap {
@@ -1,6 +1,6 @@
1
- import type { FormInstance } from "antd/es/form";
2
- import React from "react";
3
- import "./index.less";
1
+ import type { FormInstance } from 'antd/es/form';
2
+ import React from 'react';
3
+ import './index.less';
4
4
  export declare const EditableContext: React.Context<FormInstance<any> | null>;
5
5
  interface Item {
6
6
  key: string;
@@ -10,7 +10,7 @@ interface Item {
10
10
  }
11
11
  export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
12
12
  index: number;
13
- "data-row-key": string;
13
+ 'data-row-key': string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
16
  __is_drag_sort?: boolean;
@@ -15,12 +15,12 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
- import { Form, Tooltip } from "antd";
19
- import { useSortable } from "@dnd-kit/sortable";
20
- import { CSS } from "@dnd-kit/utilities";
21
- import { MenuOutlined } from "@ant-design/icons";
22
- import classNames from "classnames";
23
- import React, { useMemo } from "react";
18
+ import { Form, Tooltip } from 'antd';
19
+ import { useSortable } from '@dnd-kit/sortable';
20
+ import { CSS } from '@dnd-kit/utilities';
21
+ import { MenuOutlined } from '@ant-design/icons';
22
+ import classNames from 'classnames';
23
+ import React, { useMemo } from 'react';
24
24
  import CellProvider from "./CellProvider";
25
25
  import { getText } from "../../../../../locales";
26
26
  import "./index.less";
@@ -35,9 +35,9 @@ var EditableRow = function EditableRow(_ref) {
35
35
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
36
36
  form = _Form$useForm2[0];
37
37
  var parentForm = Form.useFormInstance();
38
- var order_by = Form.useWatch("order_by", parentForm);
38
+ var order_by = Form.useWatch('order_by', parentForm);
39
39
  var _useSortable = useSortable({
40
- id: props["data-row-key"]
40
+ id: props['data-row-key']
41
41
  }),
42
42
  attributes = _useSortable.attributes,
43
43
  listeners = _useSortable.listeners,
@@ -52,7 +52,7 @@ var EditableRow = function EditableRow(_ref) {
52
52
  })),
53
53
  transition: transition
54
54
  }, isDragging && __is_drag_sort ? {
55
- position: "relative",
55
+ position: 'relative',
56
56
  zIndex: 9999
57
57
  } : {});
58
58
  var cells = useMemo(function () {
@@ -60,20 +60,14 @@ var EditableRow = function EditableRow(_ref) {
60
60
  return children;
61
61
  }
62
62
  return React.Children.map(children, function (child) {
63
- if (child.key === "__sort") {
63
+ if (child.key === '__sort') {
64
64
  var handleIcon = order_by ? /*#__PURE__*/React.createElement(Tooltip, {
65
- title: getText("table-column-drag-sort-disabled-tip")
65
+ title: getText('table-column-drag-sort-disabled-tip')
66
66
  }, /*#__PURE__*/React.createElement(MenuOutlined, {
67
- style: {
68
- touchAction: "none",
69
- cursor: "move"
70
- }
67
+ className: "pisell-lowcode-menu-out-lined-icon"
71
68
  })) : /*#__PURE__*/React.createElement(MenuOutlined, _extends({
72
69
  ref: setActivatorNodeRef,
73
- style: {
74
- touchAction: "none",
75
- cursor: "move"
76
- }
70
+ className: "pisell-lowcode-menu-out-lined-icon"
77
71
  }, listeners));
78
72
  return /*#__PURE__*/React.cloneElement(child, {
79
73
  children: handleIcon
@@ -108,7 +102,7 @@ var EditableCell = function EditableCell(props) {
108
102
  render = props.render,
109
103
  restProps = _objectWithoutProperties(props, _excluded2);
110
104
  return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
111
- className: classNames(restProps.className, "ant-table-cell", "materials-grid-table-cell")
105
+ className: classNames(restProps.className, 'ant-table-cell', 'materials-grid-table-cell')
112
106
  }), /*#__PURE__*/React.createElement(CellProvider, props));
113
107
  };
114
108
  export default {
@@ -3,6 +3,19 @@
3
3
  height: 100%;
4
4
  }
5
5
 
6
+ .pisell-lowcode-menu-out-lined-icon{
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ cursor: move;
16
+ touch-action: none;
17
+ }
18
+
6
19
  .materials-grid-table-cell {
7
20
  padding: 12px;
8
21
  }
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
5
5
  className: string;
6
6
  defaultCurrent: number;
7
7
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
8
+ itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
@@ -22,7 +22,7 @@
22
22
  }
23
23
  &-table-action-column-drag-item {
24
24
  display: flex;
25
- height: 36px;
25
+ min-height: 36px;
26
26
  border-radius: 4px;
27
27
  align-items: center;
28
28
  &:hover {
@@ -39,6 +39,7 @@
39
39
  padding-right: 6px;
40
40
  display: flex;
41
41
  justify-content: space-between;
42
+ align-items: center;
42
43
  flex: 1;
43
44
  }
44
45
  &-table-action-column-drag-item-right-text {
@@ -144,7 +144,7 @@ var BasicTable = (props) => {
144
144
  defaultExpandAllRows: true
145
145
  }
146
146
  }
147
- ), total > (((_a = pagination == null ? void 0 : pagination.pageSizeOptions) == null ? void 0 : _a[0]) || 10) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "pagination" }, /* @__PURE__ */ import_react.default.createElement(
147
+ ), total > ((pagination == null ? void 0 : pagination.pageSize) || ((_a = pagination == null ? void 0 : pagination.pageSizeOptions) == null ? void 0 : _a[0]) || 10) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "pagination" }, /* @__PURE__ */ import_react.default.createElement(
148
148
  import_Pagination.FormPagination,
149
149
  {
150
150
  ...pagination,
@@ -15,6 +15,16 @@
15
15
  margin-top: 12px;
16
16
  }
17
17
  }
18
+
19
+ .pisell-lowcode-checkbox{
20
+ position: static;
21
+ width: auto!important;
22
+ height: auto!important;
23
+ }
24
+
25
+ .pisell-lowcode-checkbox-inner, .pisell-lowcode-radio-inner{
26
+ position: relative
27
+ }
18
28
  }
19
29
 
20
30
  .materials-grid-table-wrap {
@@ -1,6 +1,6 @@
1
- import type { FormInstance } from "antd/es/form";
2
- import React from "react";
3
- import "./index.less";
1
+ import type { FormInstance } from 'antd/es/form';
2
+ import React from 'react';
3
+ import './index.less';
4
4
  export declare const EditableContext: React.Context<FormInstance<any> | null>;
5
5
  interface Item {
6
6
  key: string;
@@ -10,7 +10,7 @@ interface Item {
10
10
  }
11
11
  export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
12
12
  index: number;
13
- "data-row-key": string;
13
+ 'data-row-key': string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
16
  __is_drag_sort?: boolean;
@@ -80,11 +80,11 @@ var EditableRow = ({
80
80
  }
81
81
  return import_react.default.Children.map(children, (child) => {
82
82
  if (child.key === "__sort") {
83
- const handleIcon = order_by ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-drag-sort-disabled-tip") }, /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, { style: { touchAction: "none", cursor: "move" } })) : /* @__PURE__ */ import_react.default.createElement(
83
+ const handleIcon = order_by ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-drag-sort-disabled-tip") }, /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, { className: "pisell-lowcode-menu-out-lined-icon" })) : /* @__PURE__ */ import_react.default.createElement(
84
84
  import_icons.MenuOutlined,
85
85
  {
86
86
  ref: setActivatorNodeRef,
87
- style: { touchAction: "none", cursor: "move" },
87
+ className: "pisell-lowcode-menu-out-lined-icon",
88
88
  ...listeners
89
89
  }
90
90
  );
@@ -3,6 +3,19 @@
3
3
  height: 100%;
4
4
  }
5
5
 
6
+ .pisell-lowcode-menu-out-lined-icon{
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ cursor: move;
16
+ touch-action: none;
17
+ }
18
+
6
19
  .materials-grid-table-cell {
7
20
  padding: 12px;
8
21
  }
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "3.0.19",
3
+ "version": "3.0.21",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",