@pisell/materials 1.0.629 → 1.0.630
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +4 -3
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +4 -2
- package/lowcode/_utils/defaultSchema.ts +15 -0
- package/package.json +3 -3
|
@@ -45,6 +45,7 @@ export declare const withOptions: <P extends unknown>(WrappedComponent: React.Co
|
|
|
45
45
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
46
46
|
labelField: string;
|
|
47
47
|
valueField: string;
|
|
48
|
+
extraParams?: Record<string, any> | undefined;
|
|
48
49
|
}) => React.JSX.Element;
|
|
49
50
|
export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
|
|
50
51
|
export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => React.JSX.Element | null;
|
|
@@ -368,15 +368,16 @@ export var withOptions = function withOptions(WrappedComponent) {
|
|
|
368
368
|
var propsOptions = props.options,
|
|
369
369
|
optionSourceType = props.optionSourceType,
|
|
370
370
|
labelField = props.labelField,
|
|
371
|
-
valueField = props.valueField
|
|
371
|
+
valueField = props.valueField,
|
|
372
|
+
extraParams = props.extraParams;
|
|
372
373
|
var _useDataSource2 = useDataSource(),
|
|
373
374
|
list = _useDataSource2.list;
|
|
374
375
|
useEffect(function () {
|
|
375
376
|
if (optionSourceType === 'api') {
|
|
376
|
-
list.run({
|
|
377
|
+
list.run(_objectSpread({
|
|
377
378
|
page: 1,
|
|
378
379
|
pageSize: 200
|
|
379
|
-
});
|
|
380
|
+
}, extraParams));
|
|
380
381
|
}
|
|
381
382
|
}, []);
|
|
382
383
|
var options = useMemo(function () {
|
|
@@ -45,6 +45,7 @@ export declare const withOptions: <P extends unknown>(WrappedComponent: React.Co
|
|
|
45
45
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
46
46
|
labelField: string;
|
|
47
47
|
valueField: string;
|
|
48
|
+
extraParams?: Record<string, any> | undefined;
|
|
48
49
|
}) => React.JSX.Element;
|
|
49
50
|
export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
|
|
50
51
|
export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => React.JSX.Element | null;
|
|
@@ -414,14 +414,16 @@ var withOptions = (WrappedComponent) => {
|
|
|
414
414
|
options: propsOptions,
|
|
415
415
|
optionSourceType,
|
|
416
416
|
labelField,
|
|
417
|
-
valueField
|
|
417
|
+
valueField,
|
|
418
|
+
extraParams
|
|
418
419
|
} = props;
|
|
419
420
|
const { list } = (0, import_useDataSource.default)();
|
|
420
421
|
(0, import_react.useEffect)(() => {
|
|
421
422
|
if (optionSourceType === "api") {
|
|
422
423
|
list.run({
|
|
423
424
|
page: 1,
|
|
424
|
-
pageSize: 200
|
|
425
|
+
pageSize: 200,
|
|
426
|
+
...extraParams
|
|
425
427
|
});
|
|
426
428
|
}
|
|
427
429
|
}, []);
|
|
@@ -733,6 +733,21 @@ export const formItemGeneralOptionTypeGroup = {
|
|
|
733
733
|
},
|
|
734
734
|
},
|
|
735
735
|
},
|
|
736
|
+
{
|
|
737
|
+
name: 'extraParams',
|
|
738
|
+
condition: (target: any) => {
|
|
739
|
+
const optionSourceType = target
|
|
740
|
+
.getProps()
|
|
741
|
+
.getPropValue('optionSourceType');
|
|
742
|
+
return optionSourceType === 'api';
|
|
743
|
+
},
|
|
744
|
+
title: {
|
|
745
|
+
type: 'i18n',
|
|
746
|
+
'en-US': 'Extra Params',
|
|
747
|
+
'zh-CN': '额外参数',
|
|
748
|
+
},
|
|
749
|
+
setter: 'JsonSetter'
|
|
750
|
+
},
|
|
736
751
|
{
|
|
737
752
|
name: 'labelField',
|
|
738
753
|
condition: (target: any) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.630",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"swiper": "^8.4.7",
|
|
71
71
|
"react-barcode": "^1.5.3",
|
|
72
72
|
"vod-js-sdk-v6": "^1.4.11",
|
|
73
|
+
"@pisell/date-picker": "1.0.115",
|
|
73
74
|
"@pisell/icon": "0.0.10",
|
|
74
|
-
"@pisell/utils": "1.0.43"
|
|
75
|
-
"@pisell/date-picker": "1.0.115"
|
|
75
|
+
"@pisell/utils": "1.0.43"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": "^18.0.0",
|