@chamn/engine 0.3.15 → 0.3.17
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/dist/component/CustomSchemaForm/components/SetterSwitcher/core.d.ts +1 -0
- package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +3 -0
- package/dist/component/CustomSchemaForm/context.d.ts +2 -0
- package/dist/component/CustomSchemaForm/index.d.ts +1 -0
- package/dist/index.cjs +38 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1604 -1601
- package/dist/index.js.map +1 -1
- package/dist/plugins/Designer/type.d.ts +1 -1
- package/package.json +7 -7
|
@@ -12,6 +12,7 @@ export type SetterSwitcherProps = {
|
|
|
12
12
|
/** 是否实用 CFile 包裹 */
|
|
13
13
|
useField?: boolean;
|
|
14
14
|
} & Omit<CFieldProps, 'children'>;
|
|
15
|
+
/** 用于切换设置器 */
|
|
15
16
|
export declare const SetterSwitcherCore: ({ setters, keyPaths, currentSetter, setCurrentSetter, customSetterMap: customSetterMapProp, ...props }: Pick<SetterSwitcherProps, "setters" | "keyPaths"> & {
|
|
16
17
|
value?: any;
|
|
17
18
|
setterContext?: Partial<CSetterProps["setterContext"]>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CNode } from '@chamn/model';
|
|
1
2
|
import { CPluginCtx } from '../../../../core/pluginManager';
|
|
2
3
|
export type CSetter<T = any> = {
|
|
3
4
|
(props: CSetterProps<T>): JSX.Element;
|
|
@@ -15,5 +16,7 @@ export type CSetterProps<T = {
|
|
|
15
16
|
onSetterChange: (keyPaths: string[], setterName: string) => void;
|
|
16
17
|
keyPaths: string[];
|
|
17
18
|
label: string;
|
|
19
|
+
/** 当前被编辑的节点信息 */
|
|
20
|
+
nodeModel: CNode;
|
|
18
21
|
};
|
|
19
22
|
} & T;
|
|
@@ -15,5 +15,7 @@ export type CCustomSchemaFormContextData = {
|
|
|
15
15
|
customSetterMap: CFormContextData['customSetterMap'];
|
|
16
16
|
formRef?: Ref<CustomSchemaFormInstance | CForm>;
|
|
17
17
|
pluginCtx?: CPluginCtx;
|
|
18
|
+
/** 当前编辑节点的 id */
|
|
19
|
+
nodeId?: string;
|
|
18
20
|
};
|
|
19
21
|
export declare const CCustomSchemaFormContext: React.Context<CCustomSchemaFormContextData>;
|
|
@@ -5,6 +5,7 @@ import { CPluginCtx } from '../../core/pluginManager';
|
|
|
5
5
|
import { CFormContextData } from './components/Form/context';
|
|
6
6
|
export type CustomSchemaFormInstance = CForm;
|
|
7
7
|
export type CustomSchemaFormProps = {
|
|
8
|
+
nodeId?: string;
|
|
8
9
|
pluginCtx?: CPluginCtx;
|
|
9
10
|
initialValue: Record<string, any>;
|
|
10
11
|
properties: CMaterialPropsType<any>;
|