@pisell/materials 1.0.472 → 1.0.473
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 +7 -7
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -15
- package/es/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +4 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +41 -17
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +15 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.js +82 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +33 -139
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +162 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +135 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +35 -39
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +65 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +105 -6
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +245 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +41 -12
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +23 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +17 -2
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +7 -1
- package/es/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/es/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +7 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/es/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.js +17 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +41 -1
- package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +12 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.js +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/es/components/dataSourceComponents/fields/index.js +7 -2
- package/es/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/type.js +1 -0
- package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/utils.js +111 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +22 -7
- package/es/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/es/components/dataSourceComponents/hooks/useComponentId.js +9 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +37 -27
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +19 -13
- package/es/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/es/components/dataSourceComponents/provider/variables/utils.js +9 -0
- package/es/components/filter/components/Dropdown/index.d.ts +1 -0
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +5 -3
- package/es/components/filter/components/FilterButton/types.d.ts +2 -0
- package/es/components/table/Actions/index.js +16 -7
- package/es/components/table/Gallery/index.d.ts +3 -3
- package/es/components/table/Gallery/index.js +25 -7
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Header/index.d.ts +10 -3
- package/es/components/table/Header/index.js +37 -11
- package/es/components/table/Header/index.less +10 -2
- package/es/components/table/Table/utils.js +4 -0
- package/es/components/table/Tabs/index.d.ts +14 -0
- package/es/components/table/Tabs/index.js +37 -0
- package/es/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/es/components/table/index.js +16 -3
- package/es/components/table/types.d.ts +14 -2
- package/es/components/typography/index.d.ts +2 -2
- package/es/components/typography/index.js +4 -3
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/en-US.js +16 -1
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +16 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +16 -1
- package/lib/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +58 -11
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +44 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.js +95 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +29 -90
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +24 -37
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +53 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +73 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +236 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +38 -11
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +51 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +14 -2
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +3 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +41 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +42 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.js +39 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/lib/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.js +57 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +30 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +43 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/lib/components/dataSourceComponents/fields/index.js +6 -1
- package/lib/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/utils.js +134 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +14 -5
- package/lib/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/lib/components/dataSourceComponents/hooks/useComponentId.js +32 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +29 -16
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +17 -8
- package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/lib/components/dataSourceComponents/provider/variables/utils.js +15 -2
- package/lib/components/filter/components/Dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/Dropdown/index.js +6 -2
- package/lib/components/filter/components/FilterButton/index.js +5 -3
- package/lib/components/filter/components/FilterButton/types.d.ts +2 -0
- package/lib/components/table/Actions/index.js +18 -9
- package/lib/components/table/Gallery/index.d.ts +3 -3
- package/lib/components/table/Gallery/index.js +17 -0
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Header/index.d.ts +10 -3
- package/lib/components/table/Header/index.js +29 -4
- package/lib/components/table/Header/index.less +10 -2
- package/lib/components/table/Table/utils.js +4 -0
- package/lib/components/table/Tabs/index.d.ts +14 -0
- package/lib/components/table/Tabs/index.js +70 -0
- package/lib/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/lib/components/table/index.js +17 -2
- package/lib/components/table/types.d.ts +14 -2
- package/lib/components/typography/index.d.ts +2 -2
- package/lib/components/typography/index.js +4 -3
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/locales/en-US.d.ts +7 -0
- package/lib/locales/en-US.js +8 -1
- package/lib/locales/zh-CN.d.ts +7 -0
- package/lib/locales/zh-CN.js +8 -1
- package/lib/locales/zh-TW.d.ts +7 -0
- package/lib/locales/zh-TW.js +8 -1
- package/lowcode/_utils/defaultSchema.ts +452 -83
- package/lowcode/_utils/type.ts +5 -0
- package/lowcode/_utils/utils.ts +1 -0
- package/lowcode/button/meta.ts +1 -2
- package/lowcode/data-source-form/constants.ts +5 -0
- package/lowcode/data-source-form/meta.ts +259 -273
- package/lowcode/data-source-form/snippets.ts +9 -0
- package/lowcode/data-source-form/utils.ts +80 -15
- package/lowcode/data-source-image/meta.ts +74 -0
- package/lowcode/data-source-image/snippets.ts +14 -0
- package/lowcode/data-source-qrcode/meta.ts +158 -0
- package/lowcode/data-source-qrcode/snippets.ts +20 -0
- package/lowcode/data-source-table/meta.ts +4577 -2285
- package/lowcode/data-source-table/snippets.ts +10 -4
- package/lowcode/data-source-table/utils.tsx +254 -0
- package/lowcode/data-source-typography/meta.ts +54 -0
- package/lowcode/data-source-typography.text/meta.ts +212 -0
- package/lowcode/data-source-typography.text/snippets.ts +12 -0
- package/lowcode/data-source-wrapper/meta.ts +243 -0
- package/lowcode/data-source-wrapper/snippets.ts +11 -0
- package/lowcode/data-source-wrapper/utils.ts +45 -0
- package/lowcode/form-item-color-picker/snippets.ts +1 -0
- package/lowcode/form-item-input/meta.ts +2 -1
- package/lowcode/form-item-input/snippets.ts +2 -1
- package/lowcode/form-item-input.email/meta.ts +284 -0
- package/lowcode/form-item-input.email/snippets.ts +35 -0
- package/lowcode/form-item-input.phone/meta.ts +295 -0
- package/lowcode/form-item-input.phone/snippets.ts +16 -0
- package/lowcode/form-item-input.text-area/meta.ts +243 -32
- package/lowcode/form-item-input.text-area/snippets.ts +2 -1
- package/lowcode/form-item-input.url/meta.ts +44 -20
- package/lowcode/form-item-input.url/snippets.ts +5 -5
- package/lowcode/table/snippets.ts +6 -0
- package/lowcode/test/meta.ts +1 -2
- package/package.json +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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, { memo, useCallback, useEffect, useMemo } from 'react';
|
|
3
|
+
import { Form, Spin } from 'antd';
|
|
4
|
+
import { isFunction } from '@pisell/utils';
|
|
5
|
+
import { FormPagination } from "../../Pagination";
|
|
4
6
|
import useTransDataSource from "../hooks/useTransDataSource";
|
|
5
7
|
import { useSharedState } from "../../../hooks";
|
|
6
8
|
import { Context } from "../model";
|
|
@@ -8,7 +10,7 @@ import VirtualGrid from "./components/VirtualGrid";
|
|
|
8
10
|
import GalleryItem from "./components/GalleryItem";
|
|
9
11
|
import { FIELD_LABEL_HEIGHT, FIELD_VALUE_HEIGHT, TITLE_LENE_HEIGHT, TITLE_VERTICAL_SPACING } from "./constant";
|
|
10
12
|
import "./index.less";
|
|
11
|
-
var prefix =
|
|
13
|
+
var prefix = 'pisell-lowcode-';
|
|
12
14
|
var Gallery = function Gallery(props) {
|
|
13
15
|
var gallery = props.gallery,
|
|
14
16
|
filter = props.filter,
|
|
@@ -31,11 +33,11 @@ var Gallery = function Gallery(props) {
|
|
|
31
33
|
var _useSharedState = useSharedState(Context),
|
|
32
34
|
state = _useSharedState.state;
|
|
33
35
|
var form = Form.useFormInstance();
|
|
34
|
-
var column_setting = Form.useWatch(
|
|
36
|
+
var column_setting = Form.useWatch('column_setting', {
|
|
35
37
|
form: form,
|
|
36
38
|
preserve: true
|
|
37
39
|
}) || [];
|
|
38
|
-
var gallery_setting = Form.useWatch([
|
|
40
|
+
var gallery_setting = Form.useWatch(['gallery_setting'], {
|
|
39
41
|
form: form,
|
|
40
42
|
preserve: true
|
|
41
43
|
}) || {};
|
|
@@ -70,6 +72,11 @@ var Gallery = function Gallery(props) {
|
|
|
70
72
|
index: index
|
|
71
73
|
});
|
|
72
74
|
}, [gallery_setting, gallery, columnsMap, column_setting]);
|
|
75
|
+
|
|
76
|
+
// 总数
|
|
77
|
+
var total = useMemo(function () {
|
|
78
|
+
return pagination === null || pagination === void 0 ? void 0 : pagination.total;
|
|
79
|
+
}, [pagination]);
|
|
73
80
|
var gap = useMemo(function () {
|
|
74
81
|
return [horizontalGutter, verticalGutter];
|
|
75
82
|
}, [horizontalGutter, verticalGutter]);
|
|
@@ -129,6 +136,17 @@ var Gallery = function Gallery(props) {
|
|
|
129
136
|
renderItem: renderItem,
|
|
130
137
|
gap: gap,
|
|
131
138
|
rowHeight: rowHeight
|
|
132
|
-
})
|
|
139
|
+
}), !pagination.localPagination && /*#__PURE__*/React.createElement(Form.Item, {
|
|
140
|
+
name: "pagination",
|
|
141
|
+
style: {
|
|
142
|
+
margin: 0,
|
|
143
|
+
position: 'absolute',
|
|
144
|
+
bottom: 0,
|
|
145
|
+
left: 0,
|
|
146
|
+
right: 0
|
|
147
|
+
}
|
|
148
|
+
}, /*#__PURE__*/React.createElement(FormPagination, _extends({}, pagination, {
|
|
149
|
+
total: total
|
|
150
|
+
})))));
|
|
133
151
|
};
|
|
134
152
|
export default /*#__PURE__*/memo(Gallery);
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface HeaderProps {
|
|
4
|
+
buttons: React.ReactNode | any[];
|
|
5
|
+
title: React.ReactNode | (() => React.ReactNode);
|
|
6
|
+
subTitle: React.ReactNode | (() => React.ReactNode);
|
|
7
|
+
showTitle?: boolean;
|
|
8
|
+
showSubTitle?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Header: ({ buttons, title, subTitle, showTitle, showSubTitle, }: HeaderProps) => React.JSX.Element | null;
|
|
4
11
|
export default Header;
|
|
@@ -1,20 +1,46 @@
|
|
|
1
|
-
import React, { useMemo } from
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { isFunction } from '@pisell/utils';
|
|
2
3
|
import Buttons from "./Buttons";
|
|
3
4
|
import "./index.less";
|
|
4
5
|
var Header = function Header(_ref) {
|
|
5
6
|
var buttons = _ref.buttons,
|
|
6
|
-
title = _ref.title
|
|
7
|
+
title = _ref.title,
|
|
8
|
+
subTitle = _ref.subTitle,
|
|
9
|
+
showTitle = _ref.showTitle,
|
|
10
|
+
showSubTitle = _ref.showSubTitle;
|
|
7
11
|
var showHeader = useMemo(function () {
|
|
8
|
-
return title || (buttons
|
|
9
|
-
}, [buttons, title]);
|
|
12
|
+
return title && showTitle || (Array.isArray(buttons) ? buttons.length > 0 : buttons) || subTitle && showSubTitle;
|
|
13
|
+
}, [buttons, title, subTitle, showTitle, showSubTitle]);
|
|
14
|
+
var titleNode = useMemo(function () {
|
|
15
|
+
if (isFunction(title)) {
|
|
16
|
+
return title();
|
|
17
|
+
}
|
|
18
|
+
return title;
|
|
19
|
+
}, [title]);
|
|
20
|
+
var buttonsNode = useMemo(function () {
|
|
21
|
+
if (Array.isArray(buttons)) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Buttons, {
|
|
23
|
+
list: buttons
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return buttons;
|
|
27
|
+
}, [buttons]);
|
|
28
|
+
var subTitleNode = useMemo(function () {
|
|
29
|
+
if (isFunction(subTitle)) {
|
|
30
|
+
return subTitle();
|
|
31
|
+
}
|
|
32
|
+
return subTitle;
|
|
33
|
+
}, [subTitle]);
|
|
10
34
|
return showHeader ? /*#__PURE__*/React.createElement("div", {
|
|
11
|
-
className: "materials-grid-header"
|
|
35
|
+
className: "materials-grid-header-wrap"
|
|
12
36
|
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className:
|
|
14
|
-
},
|
|
15
|
-
className:
|
|
16
|
-
}, /*#__PURE__*/React.createElement(
|
|
17
|
-
|
|
18
|
-
}))
|
|
37
|
+
className: 'materials-grid-header'
|
|
38
|
+
}, showTitle && /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: 'left-wrap'
|
|
40
|
+
}, titleNode), /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: 'right-wrap'
|
|
42
|
+
}, buttonsNode)), showSubTitle && subTitleNode && /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: 'materials-grid-sub-title'
|
|
44
|
+
}, subTitleNode)) : null;
|
|
19
45
|
};
|
|
20
46
|
export default Header;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
.materials-grid-header-wrap {
|
|
2
|
+
margin-bottom: 16px;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
.materials-grid-header {
|
|
2
6
|
display: flex;
|
|
3
7
|
align-items: center;
|
|
4
8
|
justify-content: space-between;
|
|
5
|
-
margin-bottom:
|
|
9
|
+
margin-bottom: 0;
|
|
6
10
|
|
|
7
11
|
.left-wrap {}
|
|
8
12
|
|
|
@@ -10,7 +14,11 @@
|
|
|
10
14
|
display: flex;
|
|
11
15
|
align-items: center;
|
|
12
16
|
gap: 8px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
13
19
|
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
.materials-grid-sub-title {
|
|
22
|
+
margin-top: 8px;
|
|
23
|
+
color: #425569;
|
|
16
24
|
}
|
|
@@ -13,6 +13,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
13
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
+
import React from "react";
|
|
16
17
|
import dayjs from "dayjs";
|
|
17
18
|
import { isBoolean, isFunction, isJson, isNumber, isString } from "@pisell/utils";
|
|
18
19
|
// @ts-ignore
|
|
@@ -517,6 +518,9 @@ export var stringify = function stringify(obj) {
|
|
|
517
518
|
if (isFunction(value)) {
|
|
518
519
|
return value.toString();
|
|
519
520
|
}
|
|
521
|
+
if ( /*#__PURE__*/React.isValidElement(value)) {
|
|
522
|
+
return value.toString();
|
|
523
|
+
}
|
|
520
524
|
return value;
|
|
521
525
|
});
|
|
522
526
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
name: string;
|
|
4
|
+
filterBy?: Record<string, any>;
|
|
5
|
+
sortBy?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CustomTabsProps {
|
|
8
|
+
items?: TabItem[];
|
|
9
|
+
show?: boolean;
|
|
10
|
+
type?: 'default' | 'button' | 'buttonGroup' | 'dropdown';
|
|
11
|
+
onChange?: (filterBy?: Record<string, any>, sortBy?: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const Tabs: React.FC<CustomTabsProps>;
|
|
14
|
+
export default Tabs;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import OriginTabs from "../../tabs";
|
|
3
|
+
var Tabs = function Tabs(_ref) {
|
|
4
|
+
var _ref$items = _ref.items,
|
|
5
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
6
|
+
_ref$type = _ref.type,
|
|
7
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
8
|
+
onChange = _ref.onChange,
|
|
9
|
+
_ref$show = _ref.show,
|
|
10
|
+
show = _ref$show === void 0 ? false : _ref$show;
|
|
11
|
+
// 转换成antd tabs需要的格式
|
|
12
|
+
var tabItems = useMemo(function () {
|
|
13
|
+
return items.map(function (item, index) {
|
|
14
|
+
return {
|
|
15
|
+
key: String(index),
|
|
16
|
+
label: item.name
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
}, [items]);
|
|
20
|
+
|
|
21
|
+
// tab切换回调
|
|
22
|
+
var handleChange = useCallback(function (activeKey) {
|
|
23
|
+
var currentTab = items[Number(activeKey)];
|
|
24
|
+
if (currentTab && onChange) {
|
|
25
|
+
onChange(currentTab);
|
|
26
|
+
}
|
|
27
|
+
}, [items, onChange]);
|
|
28
|
+
if (!(items !== null && items !== void 0 && items.length) || !show) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return /*#__PURE__*/React.createElement(OriginTabs, {
|
|
32
|
+
items: tabItems,
|
|
33
|
+
onChange: handleChange,
|
|
34
|
+
type: type
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export default Tabs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["dataSource", "columns", "dispatch", "style", "filter", "sort", "buttons", "actionButtons", "title", "summary", "onValuesChange", "columnSetting", "dataSourceGroup", "view", "gallery", "currentSettingKey", "exportImport", "currentComponentId"];
|
|
2
|
+
var _excluded = ["dataSource", "columns", "dispatch", "style", "filter", "sort", "buttons", "actionButtons", "title", "showTitle", "subTitle", "showSubTitle", "summary", "onValuesChange", "columnSetting", "dataSourceGroup", "view", "gallery", "currentSettingKey", "exportImport", "currentComponentId", "tabs"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -18,6 +18,7 @@ import { useDebounce, useSize } from 'ahooks';
|
|
|
18
18
|
import { Form } from 'antd';
|
|
19
19
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
20
20
|
import classNames from 'classNames';
|
|
21
|
+
import Tabs from "./Tabs";
|
|
21
22
|
import { useSharedState } from "../../hooks";
|
|
22
23
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
23
24
|
import Actions from "./Actions";
|
|
@@ -48,6 +49,11 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48
49
|
buttons = props.buttons,
|
|
49
50
|
actionButtons = props.actionButtons,
|
|
50
51
|
title = props.title,
|
|
52
|
+
_props$showTitle = props.showTitle,
|
|
53
|
+
showTitle = _props$showTitle === void 0 ? true : _props$showTitle,
|
|
54
|
+
subTitle = props.subTitle,
|
|
55
|
+
_props$showSubTitle = props.showSubTitle,
|
|
56
|
+
showSubTitle = _props$showSubTitle === void 0 ? true : _props$showSubTitle,
|
|
51
57
|
summary = props.summary,
|
|
52
58
|
_onValuesChange = props.onValuesChange,
|
|
53
59
|
columnSetting = props.columnSetting,
|
|
@@ -58,6 +64,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
58
64
|
currentSettingKey = props.currentSettingKey,
|
|
59
65
|
exportImport = props.exportImport,
|
|
60
66
|
currentComponentId = props.currentComponentId,
|
|
67
|
+
tabs = props.tabs,
|
|
61
68
|
other = _objectWithoutProperties(props, _excluded);
|
|
62
69
|
var modal = useSharedState(Context);
|
|
63
70
|
var _Form$useForm = Form.useForm(),
|
|
@@ -254,7 +261,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
254
261
|
useEffect(function () {
|
|
255
262
|
form.setFieldsValue(initialValuesRef.current);
|
|
256
263
|
// ArraySetter在面板state变更时指针改变
|
|
257
|
-
}, [
|
|
264
|
+
}, [stringify(propsFilter)]);
|
|
258
265
|
return /*#__PURE__*/React.createElement(Form, {
|
|
259
266
|
form: form,
|
|
260
267
|
layout: "vertical",
|
|
@@ -297,8 +304,14 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
297
304
|
ref: wrapRef
|
|
298
305
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
299
306
|
title: title,
|
|
307
|
+
showTitle: showTitle,
|
|
308
|
+
subTitle: subTitle,
|
|
309
|
+
showSubTitle: showSubTitle,
|
|
300
310
|
buttons: buttons
|
|
301
|
-
}), /*#__PURE__*/React.createElement(
|
|
311
|
+
}), (tabs === null || tabs === void 0 ? void 0 : tabs.show) && /*#__PURE__*/React.createElement(Form.Item, {
|
|
312
|
+
name: "tabs",
|
|
313
|
+
noStyle: true
|
|
314
|
+
}, /*#__PURE__*/React.createElement(Tabs, tabs)), /*#__PURE__*/React.createElement(Actions, {
|
|
302
315
|
view: view,
|
|
303
316
|
buttons: actionButtons,
|
|
304
317
|
columnSetting: columnSetting,
|
|
@@ -208,10 +208,13 @@ export declare type GridViewProps = {
|
|
|
208
208
|
style: React.CSSProperties;
|
|
209
209
|
pagination: any;
|
|
210
210
|
filter: FilterType;
|
|
211
|
-
buttons: any;
|
|
211
|
+
buttons: React.ReactNode | any[];
|
|
212
212
|
actionButtons: any;
|
|
213
213
|
sort: SortType;
|
|
214
|
-
title
|
|
214
|
+
title?: React.ReactNode | (() => React.ReactNode);
|
|
215
|
+
showTitle?: boolean;
|
|
216
|
+
subTitle?: React.ReactNode | (() => React.ReactNode);
|
|
217
|
+
showSubTitle?: boolean;
|
|
215
218
|
exportImport: ExportImportType;
|
|
216
219
|
onValuesChange: (changedValues: any, values: any) => void;
|
|
217
220
|
summary: any;
|
|
@@ -237,5 +240,14 @@ export declare type GridViewProps = {
|
|
|
237
240
|
* @param currentDataSource
|
|
238
241
|
*/
|
|
239
242
|
onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
|
|
243
|
+
tabs: {
|
|
244
|
+
show: boolean;
|
|
245
|
+
type: 'default' | 'button' | 'buttonGroup' | 'dropdown';
|
|
246
|
+
items: {
|
|
247
|
+
name: string;
|
|
248
|
+
filterBy?: Record<string, any>;
|
|
249
|
+
sortBy?: string;
|
|
250
|
+
}[];
|
|
251
|
+
};
|
|
240
252
|
};
|
|
241
253
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
declare const Typography: import("antd").TypographyProps;
|
|
2
|
+
export default Typography;
|
|
@@ -62,6 +62,7 @@ var Title = function Title(props) {
|
|
|
62
62
|
}, [pcIsEllipsis, padIsEllipsis, mobileIsEllipsis, ellipsis, responsive]);
|
|
63
63
|
return /*#__PURE__*/React.createElement(AntTitle, _extends({}, others, ellipsisObj));
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
var Typography = AntTypography;
|
|
66
|
+
Typography.Paragraph = Paragraph;
|
|
67
|
+
Typography.Title = Title;
|
|
68
|
+
export default Typography;
|
package/es/index.d.ts
CHANGED
|
@@ -136,3 +136,7 @@ export { default as FormItemRadio } from './components/dataSourceComponents/fiel
|
|
|
136
136
|
export { default as FormItemSelect } from './components/dataSourceComponents/fields/Select';
|
|
137
137
|
export { default as FormItemTimePicker } from './components/dataSourceComponents/fields/TimePicker';
|
|
138
138
|
export { default as DataSourceTable } from './components/dataSourceComponents/dataSourceTable';
|
|
139
|
+
export { default as DataSourceWrapper } from './components/dataSourceComponents/dataSourceWrapper';
|
|
140
|
+
export { default as DataSourceTypography } from './components/dataSourceComponents/dataSourceShow/dataSourceTypography';
|
|
141
|
+
export { default as DataSourceImage } from './components/dataSourceComponents/dataSourceShow/dataSourceImage';
|
|
142
|
+
export { default as DataSourceQRCode } from './components/dataSourceComponents/dataSourceShow/dataSourceQRCode';
|
package/es/index.js
CHANGED
|
@@ -162,4 +162,8 @@ export { default as FormItemInputNumber } from "./components/dataSourceComponent
|
|
|
162
162
|
export { default as FormItemRadio } from "./components/dataSourceComponents/fields/Radio";
|
|
163
163
|
export { default as FormItemSelect } from "./components/dataSourceComponents/fields/Select";
|
|
164
164
|
export { default as FormItemTimePicker } from "./components/dataSourceComponents/fields/TimePicker";
|
|
165
|
-
export { default as DataSourceTable } from "./components/dataSourceComponents/dataSourceTable";
|
|
165
|
+
export { default as DataSourceTable } from "./components/dataSourceComponents/dataSourceTable";
|
|
166
|
+
export { default as DataSourceWrapper } from "./components/dataSourceComponents/dataSourceWrapper";
|
|
167
|
+
export { default as DataSourceTypography } from "./components/dataSourceComponents/dataSourceShow/dataSourceTypography";
|
|
168
|
+
export { default as DataSourceImage } from "./components/dataSourceComponents/dataSourceShow/dataSourceImage";
|
|
169
|
+
export { default as DataSourceQRCode } from "./components/dataSourceComponents/dataSourceShow/dataSourceQRCode";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -133,5 +133,12 @@ declare const _default: {
|
|
|
133
133
|
'pisell-data-source-table-delete': string;
|
|
134
134
|
'pisell-record-view-available': string;
|
|
135
135
|
'pisell-record-view-unavailable': string;
|
|
136
|
+
'pisell-data-source-form-required-message': string;
|
|
137
|
+
'pisell-data-source-form-email-message': string;
|
|
138
|
+
'pisell-data-source-form-phone-message': string;
|
|
139
|
+
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
|
140
|
+
'pisell-data-source-form-max-length-message': (maxLength: number) => string;
|
|
141
|
+
'pisell-data-source-form-min-value-message': (minValue: number) => string;
|
|
142
|
+
'pisell-data-source-form-max-value-message': (maxValue: number) => string;
|
|
136
143
|
};
|
|
137
144
|
export default _default;
|
package/es/locales/en-US.js
CHANGED
|
@@ -161,5 +161,20 @@ export default {
|
|
|
161
161
|
'pisell-data-source-table-delete': 'Delete',
|
|
162
162
|
// recordView组件
|
|
163
163
|
'pisell-record-view-available': 'Available',
|
|
164
|
-
'pisell-record-view-unavailable': 'No available'
|
|
164
|
+
'pisell-record-view-unavailable': 'No available',
|
|
165
|
+
'pisell-data-source-form-required-message': 'This field is required',
|
|
166
|
+
'pisell-data-source-form-email-message': 'Please enter a valid email address',
|
|
167
|
+
'pisell-data-source-form-phone-message': 'Please enter a valid phone number',
|
|
168
|
+
'pisell-data-source-form-min-length-message': function pisellDataSourceFormMinLengthMessage(minLength) {
|
|
169
|
+
return "Length must be at least ".concat(minLength, " character");
|
|
170
|
+
},
|
|
171
|
+
'pisell-data-source-form-max-length-message': function pisellDataSourceFormMaxLengthMessage(maxLength) {
|
|
172
|
+
return "Length must be at most ".concat(maxLength, " character");
|
|
173
|
+
},
|
|
174
|
+
'pisell-data-source-form-min-value-message': function pisellDataSourceFormMinValueMessage(minValue) {
|
|
175
|
+
return "Value must be greater than or equal to ".concat(minValue);
|
|
176
|
+
},
|
|
177
|
+
'pisell-data-source-form-max-value-message': function pisellDataSourceFormMaxValueMessage(maxValue) {
|
|
178
|
+
return "Value must be less than or equal to ".concat(maxValue);
|
|
179
|
+
}
|
|
165
180
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -133,5 +133,12 @@ declare const _default: {
|
|
|
133
133
|
'pisell-data-source-table-delete': string;
|
|
134
134
|
'pisell-record-view-available': string;
|
|
135
135
|
'pisell-record-view-unavailable': string;
|
|
136
|
+
'pisell-data-source-form-required-message': string;
|
|
137
|
+
'pisell-data-source-form-email-message': string;
|
|
138
|
+
'pisell-data-source-form-phone-message': string;
|
|
139
|
+
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
|
140
|
+
'pisell-data-source-form-max-length-message': (maxLength: number) => string;
|
|
141
|
+
'pisell-data-source-form-min-value-message': (minValue: number) => string;
|
|
142
|
+
'pisell-data-source-form-max-value-message': (maxValue: number) => string;
|
|
136
143
|
};
|
|
137
144
|
export default _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -160,5 +160,20 @@ export default {
|
|
|
160
160
|
'pisell-data-source-table-delete': '删除',
|
|
161
161
|
// recordView组件
|
|
162
162
|
'pisell-record-view-available': '可用',
|
|
163
|
-
'pisell-record-view-unavailable': '不可用'
|
|
163
|
+
'pisell-record-view-unavailable': '不可用',
|
|
164
|
+
'pisell-data-source-form-required-message': '该字段为必填项',
|
|
165
|
+
'pisell-data-source-form-email-message': '请输入有效的电子邮件地址',
|
|
166
|
+
'pisell-data-source-form-phone-message': '请输入有效的电话号码',
|
|
167
|
+
'pisell-data-source-form-min-length-message': function pisellDataSourceFormMinLengthMessage(minLength) {
|
|
168
|
+
return "\u957F\u5EA6\u5FC5\u987B\u81F3\u5C11\u4E3A".concat(minLength, "\u4E2A\u5B57\u7B26");
|
|
169
|
+
},
|
|
170
|
+
'pisell-data-source-form-max-length-message': function pisellDataSourceFormMaxLengthMessage(maxLength) {
|
|
171
|
+
return "\u957F\u5EA6\u5FC5\u987B\u6700\u591A\u4E3A".concat(maxLength, "\u4E2A\u5B57\u7B26");
|
|
172
|
+
},
|
|
173
|
+
'pisell-data-source-form-min-value-message': function pisellDataSourceFormMinValueMessage(minValue) {
|
|
174
|
+
return "\u503C\u5FC5\u987B\u5927\u4E8E\u6216\u7B49\u4E8E".concat(minValue);
|
|
175
|
+
},
|
|
176
|
+
'pisell-data-source-form-max-value-message': function pisellDataSourceFormMaxValueMessage(maxValue) {
|
|
177
|
+
return "\u503C\u5FC5\u987B\u5C0F\u4E8E\u6216\u7B49\u4E8E".concat(maxValue);
|
|
178
|
+
}
|
|
164
179
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -133,5 +133,12 @@ declare const _default: {
|
|
|
133
133
|
'pisell-data-source-table-delete': string;
|
|
134
134
|
'pisell-record-view-available': string;
|
|
135
135
|
'pisell-record-view-unavailable': string;
|
|
136
|
+
'pisell-data-source-form-required-message': string;
|
|
137
|
+
'pisell-data-source-form-email-message': string;
|
|
138
|
+
'pisell-data-source-form-phone-message': string;
|
|
139
|
+
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
|
140
|
+
'pisell-data-source-form-max-length-message': (maxLength: number) => string;
|
|
141
|
+
'pisell-data-source-form-min-value-message': (minValue: number) => string;
|
|
142
|
+
'pisell-data-source-form-max-value-message': (maxValue: number) => string;
|
|
136
143
|
};
|
|
137
144
|
export default _default;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -161,5 +161,20 @@ export default {
|
|
|
161
161
|
'pisell-data-source-table-delete': '刪除',
|
|
162
162
|
// recordView组件
|
|
163
163
|
'pisell-record-view-available': '可用',
|
|
164
|
-
'pisell-record-view-unavailable': '不可用'
|
|
164
|
+
'pisell-record-view-unavailable': '不可用',
|
|
165
|
+
'pisell-data-source-form-required-message': '該字段為必填項',
|
|
166
|
+
'pisell-data-source-form-email-message': '請輸入有效的電子郵件地址',
|
|
167
|
+
'pisell-data-source-form-phone-message': '請輸入有效的電話號碼',
|
|
168
|
+
'pisell-data-source-form-min-length-message': function pisellDataSourceFormMinLengthMessage(minLength) {
|
|
169
|
+
return "\u9577\u5EA6\u5FC5\u9808\u81F3\u5C11\u70BA".concat(minLength, "\u4E2A\u5B57\u7B26");
|
|
170
|
+
},
|
|
171
|
+
'pisell-data-source-form-max-length-message': function pisellDataSourceFormMaxLengthMessage(maxLength) {
|
|
172
|
+
return "\u9577\u5EA6\u5FC5\u9808\u6700\u591A\u70BA".concat(maxLength, "\u4E2A\u5B57\u7B26");
|
|
173
|
+
},
|
|
174
|
+
'pisell-data-source-form-min-value-message': function pisellDataSourceFormMinValueMessage(minValue) {
|
|
175
|
+
return "\u503C\u5FC5\u9808\u5927\u65BC\u6216\u7B49\u65BC".concat(minValue);
|
|
176
|
+
},
|
|
177
|
+
'pisell-data-source-form-max-value-message': function pisellDataSourceFormMaxValueMessage(maxValue) {
|
|
178
|
+
return "\u503C\u5FC5\u9808\u5C0F\u65BC\u6216\u7B49\u65BC".concat(maxValue);
|
|
179
|
+
}
|
|
165
180
|
};
|
|
@@ -104,9 +104,10 @@ var customApi = async (url, data, options) => {
|
|
|
104
104
|
return import_utils.request.getRequest()[requestMethod](requestUrl, requestData, { headers: requestHeaders, isCustomApi: true });
|
|
105
105
|
};
|
|
106
106
|
var updateNocobaseData = async (params) => {
|
|
107
|
-
const { key, id, data } = params;
|
|
107
|
+
const { key, id, data, headers } = params;
|
|
108
108
|
return import_utils.request.getRequest().post(`/${key}:update?filterByTk=${id}`, data, {
|
|
109
|
-
isNocobase: true
|
|
109
|
+
isNocobase: true,
|
|
110
|
+
headers
|
|
110
111
|
});
|
|
111
112
|
};
|
|
112
113
|
var getNocobaseDataList = async (allParams) => {
|
|
@@ -31,13 +31,13 @@ export declare const formItemNameReverse: (name: string) => string;
|
|
|
31
31
|
* @Author: shengjie.zuo
|
|
32
32
|
* @Date: 2024-11-23 17:14:25
|
|
33
33
|
*/
|
|
34
|
-
export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>) => React.FC<P & WithFormItemProps>;
|
|
34
|
+
export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, otherFormItemProps?: Record<string, any>) => React.FC<P & WithFormItemProps>;
|
|
35
35
|
export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
36
36
|
dataSource?: any;
|
|
37
37
|
}) => React.JSX.Element;
|
|
38
38
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
39
39
|
options?: any;
|
|
40
|
-
optionSourceType?:
|
|
40
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
41
41
|
labelField: string;
|
|
42
42
|
valueField: string;
|
|
43
43
|
}) => React.JSX.Element;
|