@pisell/materials 1.0.3 → 1.0.4
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -0
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.css +1 -0
- package/build/lowcode/view.js +11 -11
- package/es/components/auto-complete/index.d.ts +5 -1
- package/es/components/button/index.d.ts +8 -3
- package/es/components/button/index.js +6 -6
- package/es/components/cascader/index.d.ts +1 -2
- package/es/components/cascader/index.js +2 -0
- package/es/components/checkbox/index.d.ts +1 -1
- package/es/components/div/index.d.ts +7 -0
- package/es/components/div/index.js +10 -0
- package/es/components/iconfont/index.d.ts +6 -0
- package/es/components/iconfont/index.js +13 -0
- package/es/components/iconfont/index.less +0 -0
- package/es/components/input/index.d.ts +9 -1
- package/es/components/input/index.js +1 -1
- package/es/components/radio/index.d.ts +1 -1
- package/es/components/select/index.d.ts +5 -1
- package/es/components/skeleton/index.js +0 -1
- package/es/components/table/Actions/Buttons/index.d.ts +3 -0
- package/es/components/table/Actions/Buttons/index.js +10 -0
- package/es/components/table/Actions/Buttons/index.less +30 -0
- package/es/components/table/Actions/Filter/FilterItem/index.d.ts +10 -0
- package/es/components/table/Actions/Filter/FilterItem/index.js +15 -0
- package/es/components/table/Actions/Filter/FilterItem/index.less +0 -0
- package/es/components/table/Actions/Filter/index.d.ts +12 -0
- package/es/components/table/Actions/Filter/index.js +15 -0
- package/es/components/table/Actions/Filter/index.less +0 -0
- package/es/components/table/Actions/Filter/items/index.d.ts +42 -0
- package/es/components/table/Actions/Filter/items/index.js +13 -0
- package/es/components/table/Actions/Filter/items/text/Editor/index.d.ts +3 -0
- package/es/components/table/Actions/Filter/items/text/Editor/index.js +10 -0
- package/es/components/table/Actions/Filter/items/text/Editor/index.less +0 -0
- package/es/components/table/Actions/Filter/items/text/Preview/index.d.ts +3 -0
- package/es/components/table/Actions/Filter/items/text/Preview/index.js +17 -0
- package/es/components/table/Actions/Filter/items/text/Preview/index.less +0 -0
- package/es/components/table/Actions/Filter/items/text/index.d.ts +12 -0
- package/es/components/table/Actions/Filter/items/text/index.js +13 -0
- package/es/components/table/Actions/Filter/items/text/index.less +0 -0
- package/es/components/table/Actions/index.d.ts +4 -0
- package/es/components/table/Actions/index.js +20 -0
- package/es/components/table/Actions/index.less +30 -0
- package/es/components/table/Pagination/index.d.ts +5 -0
- package/es/components/table/Pagination/index.js +35 -0
- package/es/components/table/Pagination/index.less +88 -0
- package/es/components/table/Table/AddFieldModal/index.d.ts +3 -0
- package/es/components/table/Table/AddFieldModal/index.js +140 -0
- package/es/components/table/Table/AddFieldModal/index.less +84 -0
- package/es/components/table/Table/SelectField/index.d.ts +3 -0
- package/es/components/table/Table/SelectField/index.js +89 -0
- package/es/components/table/Table/SelectField/index.less +97 -0
- package/es/components/table/Table/fields/index.d.ts +57 -0
- package/es/components/table/Table/fields/index.js +15 -0
- package/es/components/table/Table/fields/link/Editor/index.d.ts +3 -0
- package/es/components/table/Table/fields/link/Editor/index.js +10 -0
- package/es/components/table/Table/fields/link/Editor/index.less +0 -0
- package/es/components/table/Table/fields/link/Preview/index.d.ts +3 -0
- package/es/components/table/Table/fields/link/Preview/index.js +17 -0
- package/es/components/table/Table/fields/link/Preview/index.less +0 -0
- package/es/components/table/Table/fields/link/index.d.ts +12 -0
- package/es/components/table/Table/fields/link/index.js +13 -0
- package/es/components/table/Table/fields/link/index.less +0 -0
- package/es/components/table/Table/fields/text/Editor/index.d.ts +3 -0
- package/es/components/table/Table/fields/text/Editor/index.js +11 -0
- package/es/components/table/Table/fields/text/Editor/index.less +0 -0
- package/es/components/table/Table/fields/text/Preview/index.d.ts +3 -0
- package/es/components/table/Table/fields/text/Preview/index.js +18 -0
- package/es/components/table/Table/fields/text/Preview/index.less +0 -0
- package/es/components/table/Table/fields/text/index.d.ts +12 -0
- package/es/components/table/Table/fields/text/index.js +13 -0
- package/es/components/table/Table/fields/text/index.less +0 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/index.js +136 -0
- package/es/components/table/Table/index.less +104 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/SortRow/index.js +39 -0
- package/es/components/table/Table/tableConfig/SortRow/index.less +0 -0
- package/es/components/table/Table/tableConfig/body/CellContent/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +14 -0
- package/es/components/table/Table/tableConfig/body/CellContent/index.less +17 -0
- package/es/components/table/Table/tableConfig/body/CellProvider/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +136 -0
- package/es/components/table/Table/tableConfig/body/CellProvider/index.less +18 -0
- package/es/components/table/Table/tableConfig/body/index.d.ts +30 -0
- package/es/components/table/Table/tableConfig/body/index.js +48 -0
- package/es/components/table/Table/tableConfig/body/index.less +10 -0
- package/es/components/table/Table/tableConfig/header/CellProvider/index.d.ts +14 -0
- package/es/components/table/Table/tableConfig/header/CellProvider/index.js +26 -0
- package/es/components/table/Table/tableConfig/header/CellProvider/index.less +36 -0
- package/es/components/table/Table/tableConfig/header/index.d.ts +18 -0
- package/es/components/table/Table/tableConfig/header/index.js +53 -0
- package/es/components/table/Table/tableConfig/header/index.less +0 -0
- package/es/components/table/Table/tableConfig/summary/index.d.ts +3 -0
- package/es/components/table/Table/tableConfig/summary/index.js +18 -0
- package/es/components/table/Table/tableConfig/summary/index.less +0 -0
- package/es/components/table/index.d.ts +3 -2
- package/es/components/table/index.js +40 -10
- package/es/components/table/index.less +7 -0
- package/es/components/table/model.d.ts +16 -0
- package/es/components/table/model.js +96 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +2 -0
- package/es/hooks/useSharedState.d.ts +11 -0
- package/es/hooks/useSharedState.js +18 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +5 -2
- package/es/utils/hoc.d.ts +1 -1
- package/es/utils/hoc.js +1 -0
- package/es/utils/miniRedux.d.ts +17 -0
- package/es/utils/miniRedux.js +69 -0
- package/lib/components/auto-complete/index.d.ts +5 -1
- package/lib/components/button/index.d.ts +8 -3
- package/lib/components/button/index.js +10 -8
- package/lib/components/cascader/index.d.ts +1 -2
- package/lib/components/checkbox/index.d.ts +1 -1
- package/lib/components/div/index.d.ts +7 -0
- package/lib/components/div/index.js +40 -0
- package/lib/components/iconfont/index.d.ts +6 -0
- package/lib/components/iconfont/index.js +44 -0
- package/lib/components/iconfont/index.less +0 -0
- package/lib/components/input/index.d.ts +9 -1
- package/lib/components/radio/index.d.ts +1 -1
- package/lib/components/select/index.d.ts +5 -1
- package/lib/components/skeleton/index.js +0 -1
- package/lib/components/table/Actions/Buttons/index.d.ts +3 -0
- package/lib/components/table/Actions/Buttons/index.js +43 -0
- package/lib/components/table/Actions/Buttons/index.less +30 -0
- package/lib/components/table/Actions/Filter/FilterItem/index.d.ts +10 -0
- package/lib/components/table/Actions/Filter/FilterItem/index.js +41 -0
- package/lib/components/table/Actions/Filter/FilterItem/index.less +0 -0
- package/lib/components/table/Actions/Filter/index.d.ts +12 -0
- package/lib/components/table/Actions/Filter/index.js +43 -0
- package/lib/components/table/Actions/Filter/index.less +0 -0
- package/lib/components/table/Actions/Filter/items/index.d.ts +42 -0
- package/lib/components/table/Actions/Filter/items/index.js +56 -0
- package/lib/components/table/Actions/Filter/items/text/Editor/index.d.ts +3 -0
- package/lib/components/table/Actions/Filter/items/text/Editor/index.js +29 -0
- package/lib/components/table/Actions/Filter/items/text/Editor/index.less +0 -0
- package/lib/components/table/Actions/Filter/items/text/Preview/index.d.ts +3 -0
- package/lib/components/table/Actions/Filter/items/text/Preview/index.js +38 -0
- package/lib/components/table/Actions/Filter/items/text/Preview/index.less +0 -0
- package/lib/components/table/Actions/Filter/items/text/index.d.ts +12 -0
- package/lib/components/table/Actions/Filter/items/text/index.js +47 -0
- package/lib/components/table/Actions/Filter/items/text/index.less +0 -0
- package/lib/components/table/Actions/index.d.ts +4 -0
- package/lib/components/table/Actions/index.js +42 -0
- package/lib/components/table/Actions/index.less +30 -0
- package/lib/components/table/Pagination/index.d.ts +5 -0
- package/lib/components/table/Pagination/index.js +62 -0
- package/lib/components/table/Pagination/index.less +88 -0
- package/lib/components/table/Table/AddFieldModal/index.d.ts +3 -0
- package/lib/components/table/Table/AddFieldModal/index.js +159 -0
- package/lib/components/table/Table/AddFieldModal/index.less +84 -0
- package/lib/components/table/Table/SelectField/index.d.ts +3 -0
- package/lib/components/table/Table/SelectField/index.js +124 -0
- package/lib/components/table/Table/SelectField/index.less +97 -0
- package/lib/components/table/Table/fields/index.d.ts +57 -0
- package/lib/components/table/Table/fields/index.js +58 -0
- package/lib/components/table/Table/fields/link/Editor/index.d.ts +3 -0
- package/lib/components/table/Table/fields/link/Editor/index.js +29 -0
- package/lib/components/table/Table/fields/link/Editor/index.less +0 -0
- package/lib/components/table/Table/fields/link/Preview/index.d.ts +3 -0
- package/lib/components/table/Table/fields/link/Preview/index.js +38 -0
- package/lib/components/table/Table/fields/link/Preview/index.less +0 -0
- package/lib/components/table/Table/fields/link/index.d.ts +12 -0
- package/lib/components/table/Table/fields/link/index.js +47 -0
- package/lib/components/table/Table/fields/link/index.less +0 -0
- package/lib/components/table/Table/fields/text/Editor/index.d.ts +3 -0
- package/lib/components/table/Table/fields/text/Editor/index.js +40 -0
- package/lib/components/table/Table/fields/text/Editor/index.less +0 -0
- package/lib/components/table/Table/fields/text/Preview/index.d.ts +3 -0
- package/lib/components/table/Table/fields/text/Preview/index.js +49 -0
- package/lib/components/table/Table/fields/text/Preview/index.less +0 -0
- package/lib/components/table/Table/fields/text/index.d.ts +12 -0
- package/lib/components/table/Table/fields/text/index.js +47 -0
- package/lib/components/table/Table/fields/text/index.less +0 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/index.js +139 -0
- package/lib/components/table/Table/index.less +104 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.js +58 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.less +0 -0
- package/lib/components/table/Table/tableConfig/body/CellContent/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/body/CellContent/index.js +49 -0
- package/lib/components/table/Table/tableConfig/body/CellContent/index.less +17 -0
- package/lib/components/table/Table/tableConfig/body/CellProvider/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/body/CellProvider/index.js +141 -0
- package/lib/components/table/Table/tableConfig/body/CellProvider/index.less +18 -0
- package/lib/components/table/Table/tableConfig/body/index.d.ts +30 -0
- package/lib/components/table/Table/tableConfig/body/index.js +76 -0
- package/lib/components/table/Table/tableConfig/body/index.less +10 -0
- package/lib/components/table/Table/tableConfig/header/CellProvider/index.d.ts +14 -0
- package/lib/components/table/Table/tableConfig/header/CellProvider/index.js +49 -0
- package/lib/components/table/Table/tableConfig/header/CellProvider/index.less +36 -0
- package/lib/components/table/Table/tableConfig/header/index.d.ts +18 -0
- package/lib/components/table/Table/tableConfig/header/index.js +106 -0
- package/lib/components/table/Table/tableConfig/header/index.less +0 -0
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +3 -0
- package/lib/components/table/Table/tableConfig/summary/index.js +47 -0
- package/lib/components/table/Table/tableConfig/summary/index.less +0 -0
- package/lib/components/table/index.d.ts +3 -2
- package/lib/components/table/index.js +23 -5
- package/lib/components/table/index.less +7 -0
- package/lib/components/table/model.d.ts +16 -0
- package/lib/components/table/model.js +134 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +39 -0
- package/lib/hooks/useSharedState.d.ts +11 -0
- package/lib/hooks/useSharedState.js +33 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +21 -21
- package/lib/utils/hoc.d.ts +1 -1
- package/lib/utils/miniRedux.d.ts +17 -0
- package/lib/utils/miniRedux.js +86 -0
- package/lowcode/alert/meta.ts +62 -62
- package/lowcode/card/meta.ts +33 -32
- package/lowcode/card/snippets.ts +46 -0
- package/lowcode/div/meta.ts +70 -0
- package/lowcode/table/meta.ts +131 -0
- package/lowcode/test/meta.ts +48 -0
- package/package.json +15 -4
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const AutoComplete: import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const AutoComplete: import("react").ForwardRefExoticComponent<Omit<import("antd").AutoCompleteProps<unknown, import("antd/es/select").DefaultOptionType | import("antd/es/select").BaseOptionType> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & {
|
|
5
|
+
ref?: import("react").Ref<import("antd").RefSelectProps> | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<any>>;
|
|
3
7
|
export default AutoComplete;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonProps as OriginalButtonProps } from "antd";
|
|
3
|
+
export interface ButtonProps extends OriginalButtonProps {
|
|
4
|
+
__designMode?: "design" | undefined;
|
|
5
|
+
href?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<any>>;
|
|
8
|
+
export default Button;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import React, { forwardRef } from
|
|
3
|
-
import { Button as OriginalButton } from
|
|
4
|
-
var Button = function
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { Button as OriginalButton } from "antd";
|
|
4
|
+
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
5
5
|
var _props$href;
|
|
6
6
|
var innerProps = {};
|
|
7
7
|
if (!((_props$href = props.href) !== null && _props$href !== void 0 && _props$href.trim()) || props.__designMode === 'design') {
|
|
8
|
-
// 解决低代码编辑器中按钮设置href属性造成按钮点击重定向问题
|
|
8
|
+
// 解决低代码编辑器中按钮设置 href 属性造成按钮点击重定向问题
|
|
9
9
|
innerProps.href = undefined;
|
|
10
10
|
}
|
|
11
11
|
return /*#__PURE__*/React.createElement(OriginalButton, _extends({}, props, innerProps, {
|
|
12
12
|
ref: ref
|
|
13
13
|
}));
|
|
14
|
-
};
|
|
15
|
-
export default
|
|
14
|
+
});
|
|
15
|
+
export default Button;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<import("antd").CheckboxProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<any>>;
|
|
3
3
|
export default Checkbox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
var Div = function Div(props) {
|
|
3
|
+
var children = props.children,
|
|
4
|
+
_props$style = props.style,
|
|
5
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
style: style
|
|
8
|
+
}, children);
|
|
9
|
+
};
|
|
10
|
+
export default Div;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
var MyIcon = createFromIconfontCN({
|
|
5
|
+
scriptUrl: 'https://at.alicdn.com/t/c/font_4075221_116anw8uttw.js' // 在 iconfont.cn 上生成
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
var IconFont = function IconFont(props) {
|
|
9
|
+
return /*#__PURE__*/React.createElement(MyIcon, _extends({}, props, {
|
|
10
|
+
className: props.className
|
|
11
|
+
}));
|
|
12
|
+
};
|
|
13
|
+
export default IconFont;
|
|
File without changes
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { InputProps, InputRef } from "antd";
|
|
3
|
+
declare const OriginalGroup: import("react").FC<import("antd/es/input").GroupProps>, OriginalTextArea: import("react").ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>, OriginalPassword: import("react").ForwardRefExoticComponent<import("antd/es/input").PasswordProps & import("react").RefAttributes<InputRef>>, OriginalSearch: import("react").ForwardRefExoticComponent<import("antd/es/input").SearchProps & import("react").RefAttributes<InputRef>>;
|
|
4
|
+
declare type CompoundedComponent = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> & {
|
|
5
|
+
Group: typeof OriginalGroup;
|
|
6
|
+
Search: typeof OriginalSearch;
|
|
7
|
+
TextArea: typeof OriginalTextArea;
|
|
8
|
+
Password: typeof OriginalPassword;
|
|
9
|
+
};
|
|
10
|
+
declare const Input: CompoundedComponent;
|
|
3
11
|
export default Input;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Radio: import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const Radio: import("react").ForwardRefExoticComponent<Omit<import("antd").RadioProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<any>>;
|
|
3
3
|
export default Radio;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Select: import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const Select: import("react").ForwardRefExoticComponent<Omit<import("antd").SelectProps<unknown, import("antd/es/select").DefaultOptionType | import("antd/es/select").BaseOptionType> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & {
|
|
5
|
+
ref?: import("react").Ref<import("antd").RefSelectProps> | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<any>>;
|
|
3
7
|
export default Select;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "antd";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
var Buttons = function Buttons(_ref) {
|
|
5
|
+
var list = _ref.list;
|
|
6
|
+
return (list || []).map(function (d) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Button, null, d.title);
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export default Buttons;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.materials-grid-actions {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
|
|
6
|
+
.left-wrap {}
|
|
7
|
+
|
|
8
|
+
.right-wrap {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 20px;
|
|
12
|
+
|
|
13
|
+
.icon {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: .2s;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: var(--theme-color);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.button {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
height: 28px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FilterItemProps as ItemProps } from "../index";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
declare type FilterItemProps = {
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: (val: any) => void;
|
|
7
|
+
item: ItemProps;
|
|
8
|
+
};
|
|
9
|
+
declare const FilterItem: React.FC<FilterItemProps>;
|
|
10
|
+
export default FilterItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button, Dropdown } from "antd";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
var FilterItem = function FilterItem(_ref) {
|
|
5
|
+
var value = _ref.value,
|
|
6
|
+
onChange = _ref.onChange,
|
|
7
|
+
item = _ref.item;
|
|
8
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
9
|
+
trigger: ["click"],
|
|
10
|
+
menu: {
|
|
11
|
+
items: []
|
|
12
|
+
}
|
|
13
|
+
}, /*#__PURE__*/React.createElement(Button, null, item.title));
|
|
14
|
+
};
|
|
15
|
+
export default FilterItem;
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare type FilterItemProps = {
|
|
3
|
+
type: "single" | "input";
|
|
4
|
+
name: string;
|
|
5
|
+
props: object;
|
|
6
|
+
title: string;
|
|
7
|
+
};
|
|
8
|
+
declare type FilterListProps = {
|
|
9
|
+
list: FilterItemProps[];
|
|
10
|
+
};
|
|
11
|
+
declare const Filter: React.FC<FilterListProps>;
|
|
12
|
+
export default Filter;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button, Form } from "antd";
|
|
3
|
+
import FilterItem from "./FilterItem";
|
|
4
|
+
var Filter = function Filter(_ref) {
|
|
5
|
+
var list = _ref.list;
|
|
6
|
+
return /*#__PURE__*/React.createElement(Button.Group, null, (list || []).map(function (d) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
8
|
+
noStyle: true,
|
|
9
|
+
name: d.name
|
|
10
|
+
}, /*#__PURE__*/React.createElement(FilterItem, {
|
|
11
|
+
item: d
|
|
12
|
+
}));
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
export default Filter;
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const fieldMaps: {
|
|
3
|
+
text: {
|
|
4
|
+
field: {
|
|
5
|
+
field_icon: string;
|
|
6
|
+
field_name: string;
|
|
7
|
+
field_type: string;
|
|
8
|
+
default_value: string;
|
|
9
|
+
};
|
|
10
|
+
Preview: (props: any) => JSX.Element;
|
|
11
|
+
Editor: () => JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const fieldList: {
|
|
15
|
+
field_icon: string;
|
|
16
|
+
field_name: string;
|
|
17
|
+
field_type: string;
|
|
18
|
+
default_value: string;
|
|
19
|
+
}[];
|
|
20
|
+
export declare const getFieldByType: (type: string) => {
|
|
21
|
+
field: {
|
|
22
|
+
field_icon: string;
|
|
23
|
+
field_name: string;
|
|
24
|
+
field_type: string;
|
|
25
|
+
default_value: string;
|
|
26
|
+
};
|
|
27
|
+
Preview: (props: any) => JSX.Element;
|
|
28
|
+
Editor: () => JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
declare const _default: {
|
|
31
|
+
text: {
|
|
32
|
+
field: {
|
|
33
|
+
field_icon: string;
|
|
34
|
+
field_name: string;
|
|
35
|
+
field_type: string;
|
|
36
|
+
default_value: string;
|
|
37
|
+
};
|
|
38
|
+
Preview: (props: any) => JSX.Element;
|
|
39
|
+
Editor: () => JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import text from "./text";
|
|
2
|
+
export var fieldMaps = {
|
|
3
|
+
text: text
|
|
4
|
+
};
|
|
5
|
+
export var fieldList = Object.values(fieldMaps).map(function (d) {
|
|
6
|
+
return d.field;
|
|
7
|
+
});
|
|
8
|
+
export var getFieldByType = function getFieldByType(type) {
|
|
9
|
+
return fieldMaps[type];
|
|
10
|
+
};
|
|
11
|
+
export default {
|
|
12
|
+
text: text
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Form, Input } from "antd";
|
|
2
|
+
var Text = function Text() {
|
|
3
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4
|
+
className: ""
|
|
5
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
6
|
+
label: "Default value",
|
|
7
|
+
name: "default_value"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(Input, null)));
|
|
9
|
+
};
|
|
10
|
+
export default Text;
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var _excluded = ["title", "editable", "children", "dataIndex", "field_type", "record", "handleSave"];
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
var Text = function Text(props) {
|
|
5
|
+
var title = props.title,
|
|
6
|
+
editable = props.editable,
|
|
7
|
+
children = props.children,
|
|
8
|
+
dataIndex = props.dataIndex,
|
|
9
|
+
field_type = props.field_type,
|
|
10
|
+
record = props.record,
|
|
11
|
+
handleSave = props.handleSave,
|
|
12
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: ""
|
|
15
|
+
}, record[dataIndex]);
|
|
16
|
+
};
|
|
17
|
+
export default Text;
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
field: {
|
|
4
|
+
field_icon: string;
|
|
5
|
+
field_name: string;
|
|
6
|
+
field_type: string;
|
|
7
|
+
default_value: string;
|
|
8
|
+
};
|
|
9
|
+
Preview: (props: any) => JSX.Element;
|
|
10
|
+
Editor: () => JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Editor from "./Editor";
|
|
2
|
+
import Preview from "./Preview";
|
|
3
|
+
var field = {
|
|
4
|
+
field_icon: "pi-a-Property3Singlelinetext",
|
|
5
|
+
field_name: "Single line text",
|
|
6
|
+
field_type: "text",
|
|
7
|
+
default_value: "Text"
|
|
8
|
+
};
|
|
9
|
+
export default {
|
|
10
|
+
field: field,
|
|
11
|
+
Preview: Preview,
|
|
12
|
+
Editor: Editor
|
|
13
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Filter from "./Filter";
|
|
3
|
+
import Buttons from "./Buttons";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var Actions = function Actions(_ref) {
|
|
6
|
+
var filter = _ref.filter,
|
|
7
|
+
buttons = _ref.buttons;
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
className: "materials-grid-actions"
|
|
10
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: "left-wrap"
|
|
12
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "right-wrap"
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Filter, {
|
|
15
|
+
list: filter
|
|
16
|
+
}), /*#__PURE__*/React.createElement(Buttons, {
|
|
17
|
+
list: buttons
|
|
18
|
+
})));
|
|
19
|
+
};
|
|
20
|
+
export default Actions;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.materials-grid-actions {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
|
|
6
|
+
.left-wrap {}
|
|
7
|
+
|
|
8
|
+
.right-wrap {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
|
|
13
|
+
.icon {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: .2s;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: var(--theme-color);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.button {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
height: 28px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Iconfont from "../../iconfont";
|
|
4
|
+
import { Pagination as OriginPagination } from "antd";
|
|
5
|
+
import classNames from "classnames";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
var Pagination = function Pagination(props) {
|
|
8
|
+
var itemRender = function itemRender(_, type, originalElement) {
|
|
9
|
+
if (type === "prev") {
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: classNames("paginator-page-btn", "left")
|
|
12
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
13
|
+
type: "icona-iconArrowsLine",
|
|
14
|
+
className: "icon"
|
|
15
|
+
}), "Pre");
|
|
16
|
+
}
|
|
17
|
+
if (type === "next") {
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: classNames("paginator-page-btn", "right")
|
|
20
|
+
}, "Next", /*#__PURE__*/React.createElement(Iconfont, {
|
|
21
|
+
type: "icona-iconArrowsLine",
|
|
22
|
+
className: "icon"
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
return originalElement;
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(OriginPagination, _extends({
|
|
28
|
+
className: "materials-grid-paginator",
|
|
29
|
+
defaultCurrent: 1,
|
|
30
|
+
showSizeChanger: false,
|
|
31
|
+
total: 500,
|
|
32
|
+
itemRender: itemRender
|
|
33
|
+
}, props)));
|
|
34
|
+
};
|
|
35
|
+
export default Pagination;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.materials-grid-paginator {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
height: 50px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
border-radius: 0 0 8px 8px;
|
|
10
|
+
border: 1px solid #f0f0f0;
|
|
11
|
+
border-top: none;
|
|
12
|
+
padding: 0 20px;
|
|
13
|
+
|
|
14
|
+
.ant-pagination-item {
|
|
15
|
+
position: relative;
|
|
16
|
+
border: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ant-pagination-disabled {
|
|
20
|
+
opacity: 0.4;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ant-pagination-item-active {
|
|
24
|
+
a {
|
|
25
|
+
font-weight: 450 !important;
|
|
26
|
+
color: rgba(0, 0, 0, 0.88) !important;
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
background-color: rgba(0, 0, 0, 0.06);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ant-pagination-prev {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
margin-right: auto;
|
|
38
|
+
min-width: auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ant-pagination-item-active {}
|
|
42
|
+
|
|
43
|
+
.ant-pagination-next {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
margin-left: auto;
|
|
48
|
+
min-width: auto;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.paginator-page-btn {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
border-radius: 4px 4px 4px 4px;
|
|
57
|
+
padding: 0 4px;
|
|
58
|
+
transition: 0.2s;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
color: #6f6f6f;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
user-select: none;
|
|
64
|
+
height: 20px;
|
|
65
|
+
|
|
66
|
+
&:hover {
|
|
67
|
+
// background: #f2f2f2;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.left {
|
|
71
|
+
margin-right: auto;
|
|
72
|
+
|
|
73
|
+
.icon {
|
|
74
|
+
font-size: 18px;
|
|
75
|
+
margin-right: 8px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.right {
|
|
80
|
+
margin-left: auto;
|
|
81
|
+
|
|
82
|
+
.icon {
|
|
83
|
+
font-size: 18px;
|
|
84
|
+
margin-left: 8px;
|
|
85
|
+
transform: rotate(180deg);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|