amis 1.2.4-beta.16 → 1.3.0
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/dump.rdb +0 -0
- package/lib/factory.js +1 -1
- package/lib/factory.js.map +2 -2
- package/lib/helper.css +2 -8
- package/lib/helper.css.map +1 -1
- package/lib/index.js +1 -1
- package/lib/renderers/CRUD.js +1 -1
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Form/InputFile.js +1 -0
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/index.js +15 -2
- package/lib/renderers/Form/index.js.map +2 -2
- package/package.json +1 -1
- package/scss/helper/typography/_font-family.scss +2 -8
- package/sdk/charts.js +13 -13
- package/sdk/color-picker.js +65 -69
- package/sdk/cropperjs.js +2 -2
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css +2 -8
- package/sdk/helper.css.map +1 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +23 -19
- package/sdk/rich-text.js +68 -68
- package/sdk/sdk.js +1180 -1174
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/factory.tsx +1 -1
- package/src/renderers/CRUD.tsx +1 -1
- package/src/renderers/Form/InputFile.tsx +11 -12
- package/src/renderers/Form/index.tsx +19 -2
package/src/factory.tsx
CHANGED
package/src/renderers/CRUD.tsx
CHANGED
@@ -1110,7 +1110,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1110
1110
|
if (autoJumpToTopOnPagerChange && this.control) {
|
1111
1111
|
(findDOMNode(this.control) as HTMLElement).scrollIntoView();
|
1112
1112
|
const scrolledY = window.scrollY;
|
1113
|
-
const offsetTop = affixOffsetTop ?? env?.affixOffsetTop ??
|
1113
|
+
const offsetTop = affixOffsetTop ?? env?.affixOffsetTop ?? 0;
|
1114
1114
|
scrolledY && window.scroll(0, scrolledY - offsetTop);
|
1115
1115
|
}
|
1116
1116
|
}
|
@@ -356,12 +356,11 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
|
356
356
|
if (value && value instanceof Blob) {
|
357
357
|
files = [value as any];
|
358
358
|
} else if (value) {
|
359
|
-
files = (
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
: [value as any]
|
359
|
+
files = (Array.isArray(value)
|
360
|
+
? value
|
361
|
+
: joinValues
|
362
|
+
? `${(value as any)[valueField] || value}`.split(delimiter)
|
363
|
+
: [value as any]
|
365
364
|
)
|
366
365
|
.map(item => FileControl.valueToFile(item, props) as FileValue)
|
367
366
|
.filter(item => item);
|
@@ -403,12 +402,11 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
|
403
402
|
let files: Array<FileValue> = [];
|
404
403
|
|
405
404
|
if (value) {
|
406
|
-
files = (
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
: [value as any]
|
405
|
+
files = (Array.isArray(value)
|
406
|
+
? value
|
407
|
+
: joinValues && typeof value === 'string'
|
408
|
+
? value.split(delimiter)
|
409
|
+
: [value as any]
|
412
410
|
)
|
413
411
|
.map(item => {
|
414
412
|
let obj = FileControl.valueToFile(
|
@@ -884,6 +882,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
|
884
882
|
|
885
883
|
qsstringify({...api.data, ...params})
|
886
884
|
.split('&')
|
885
|
+
.filter(i => !!i)
|
887
886
|
.forEach(item => {
|
888
887
|
const parts = item.split('=');
|
889
888
|
fd.append(parts[0], decodeURIComponent(parts[1]));
|
@@ -54,6 +54,7 @@ import {
|
|
54
54
|
import {ActionSchema} from '../Action';
|
55
55
|
import {ButtonGroupControlSchema} from './ButtonGroupSelect';
|
56
56
|
import {DialogSchemaBase} from '../Dialog';
|
57
|
+
import Alert from '../../components/Alert2';
|
57
58
|
|
58
59
|
export interface FormSchemaHorizontal {
|
59
60
|
left?: number;
|
@@ -1493,6 +1494,8 @@ export default class Form extends React.Component<FormProps, object> {
|
|
1493
1494
|
|
1494
1495
|
render() {
|
1495
1496
|
const {
|
1497
|
+
$path,
|
1498
|
+
$schema,
|
1496
1499
|
wrapWithPanel,
|
1497
1500
|
render,
|
1498
1501
|
title,
|
@@ -1507,7 +1510,8 @@ export default class Form extends React.Component<FormProps, object> {
|
|
1507
1510
|
affixFooter,
|
1508
1511
|
lazyLoad,
|
1509
1512
|
translate: __,
|
1510
|
-
footer
|
1513
|
+
footer,
|
1514
|
+
formStore
|
1511
1515
|
} = this.props;
|
1512
1516
|
|
1513
1517
|
// trace(true);
|
@@ -1515,7 +1519,20 @@ export default class Form extends React.Component<FormProps, object> {
|
|
1515
1519
|
|
1516
1520
|
let body: JSX.Element = this.renderBody();
|
1517
1521
|
|
1518
|
-
|
1522
|
+
// 表单组件限制
|
1523
|
+
const isFormInFormActions: boolean = /panel\/action\/form$/.test($path);
|
1524
|
+
// props有formStore 说明是嵌套表单 || 不允许在表单的按钮组中再直接套表单
|
1525
|
+
if (formStore || isFormInFormActions) {
|
1526
|
+
body = (
|
1527
|
+
<Alert level="danger">
|
1528
|
+
<p>Error: 不允许在表单及表单按钮组中直接嵌套表单</p>
|
1529
|
+
<p>Path: {$path}</p>
|
1530
|
+
<pre>
|
1531
|
+
<code>{JSON.stringify($schema, null, 2)}</code>
|
1532
|
+
</pre>
|
1533
|
+
</Alert>
|
1534
|
+
);
|
1535
|
+
} else if (wrapWithPanel) {
|
1519
1536
|
body = render(
|
1520
1537
|
'body',
|
1521
1538
|
{
|