@yklyklpackages/message-card 0.0.1
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/README.md +73 -0
- package/dist/components/MessageCard.d.ts +3 -0
- package/dist/components/MessageCard.d.ts.map +1 -0
- package/dist/components/action/ActionContext.d.ts +25 -0
- package/dist/components/action/ActionContext.d.ts.map +1 -0
- package/dist/components/action/RenderActionWrapper.d.ts +11 -0
- package/dist/components/action/RenderActionWrapper.d.ts.map +1 -0
- package/dist/components/cache/CacheStorage.d.ts +36 -0
- package/dist/components/cache/CacheStorage.d.ts.map +1 -0
- package/dist/components/cache/TemplateCache.d.ts +48 -0
- package/dist/components/cache/TemplateCache.d.ts.map +1 -0
- package/dist/components/cache/TemplateRequestPool.d.ts +13 -0
- package/dist/components/cache/TemplateRequestPool.d.ts.map +1 -0
- package/dist/components/cache/dataAdapter.d.ts +9 -0
- package/dist/components/cache/dataAdapter.d.ts.map +1 -0
- package/dist/components/cache/index.d.ts +6 -0
- package/dist/components/cache/index.d.ts.map +1 -0
- package/dist/components/cache/types.d.ts +78 -0
- package/dist/components/cache/types.d.ts.map +1 -0
- package/dist/components/core/ComponentRenderer.d.ts +18 -0
- package/dist/components/core/ComponentRenderer.d.ts.map +1 -0
- package/dist/components/core/LayoutWrapper.d.ts +10 -0
- package/dist/components/core/LayoutWrapper.d.ts.map +1 -0
- package/dist/components/core/LeafWrapper.d.ts +15 -0
- package/dist/components/core/LeafWrapper.d.ts.map +1 -0
- package/dist/components/core/templateAdapter.d.ts +5 -0
- package/dist/components/core/templateAdapter.d.ts.map +1 -0
- package/dist/components/hooks.d.ts +16 -0
- package/dist/components/hooks.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layout/AbsoluteViewLayout.d.ts +14 -0
- package/dist/components/layout/AbsoluteViewLayout.d.ts.map +1 -0
- package/dist/components/layout/AnimationLayout/index.d.ts +13 -0
- package/dist/components/layout/AnimationLayout/index.d.ts.map +1 -0
- package/dist/components/layout/AnimationLayout.d.ts +13 -0
- package/dist/components/layout/AnimationLayout.d.ts.map +1 -0
- package/dist/components/layout/FourColumnLayout.d.ts +16 -0
- package/dist/components/layout/FourColumnLayout.d.ts.map +1 -0
- package/dist/components/layout/FullRowLayout.d.ts +19 -0
- package/dist/components/layout/FullRowLayout.d.ts.map +1 -0
- package/dist/components/layout/MultipleColumnLayout.d.ts +20 -0
- package/dist/components/layout/MultipleColumnLayout.d.ts.map +1 -0
- package/dist/components/layout/ThreeColumnCenterFullLayout.d.ts +16 -0
- package/dist/components/layout/ThreeColumnCenterFullLayout.d.ts.map +1 -0
- package/dist/components/layout/ThreeColumnLayout.d.ts +16 -0
- package/dist/components/layout/ThreeColumnLayout.d.ts.map +1 -0
- package/dist/components/layout/TwoColumnLayout.d.ts +16 -0
- package/dist/components/layout/TwoColumnLayout.d.ts.map +1 -0
- package/dist/components/layout/TwoColumnLeftFullLayout.d.ts +16 -0
- package/dist/components/layout/TwoColumnLeftFullLayout.d.ts.map +1 -0
- package/dist/components/layout/TwoColumnRightFullLayout.d.ts +16 -0
- package/dist/components/layout/TwoColumnRightFullLayout.d.ts.map +1 -0
- package/dist/components/message/MessageContainer.d.ts +41 -0
- package/dist/components/message/MessageContainer.d.ts.map +1 -0
- package/dist/components/render/Checkbox.d.ts +14 -0
- package/dist/components/render/Checkbox.d.ts.map +1 -0
- package/dist/components/render/CustomRenderer/index.d.ts +2 -0
- package/dist/components/render/CustomRenderer/index.d.ts.map +1 -0
- package/dist/components/render/DashLine.d.ts +17 -0
- package/dist/components/render/DashLine.d.ts.map +1 -0
- package/dist/components/render/DividerRender.d.ts +15 -0
- package/dist/components/render/DividerRender.d.ts.map +1 -0
- package/dist/components/render/Image.d.ts +11 -0
- package/dist/components/render/Image.d.ts.map +1 -0
- package/dist/components/render/Input.d.ts +14 -0
- package/dist/components/render/Input.d.ts.map +1 -0
- package/dist/components/render/Markdown.d.ts +6 -0
- package/dist/components/render/Markdown.d.ts.map +1 -0
- package/dist/components/render/Radio.d.ts +14 -0
- package/dist/components/render/Radio.d.ts.map +1 -0
- package/dist/components/render/Select.d.ts +14 -0
- package/dist/components/render/Select.d.ts.map +1 -0
- package/dist/components/render/Text.d.ts +11 -0
- package/dist/components/render/Text.d.ts.map +1 -0
- package/dist/components/render/TextList.d.ts +15 -0
- package/dist/components/render/TextList.d.ts.map +1 -0
- package/dist/components/render/UnknownRenderer/index.d.ts +8 -0
- package/dist/components/render/UnknownRenderer/index.d.ts.map +1 -0
- package/dist/components/theme/ThemeContext.d.ts +9 -0
- package/dist/components/theme/ThemeContext.d.ts.map +1 -0
- package/dist/components/theme/defaultTheme.d.ts +4 -0
- package/dist/components/theme/defaultTheme.d.ts.map +1 -0
- package/dist/components/theme.d.ts +4 -0
- package/dist/components/theme.d.ts.map +1 -0
- package/dist/components/types/component.d.ts +97 -0
- package/dist/components/types/component.d.ts.map +1 -0
- package/dist/components/useTemplate.d.ts +16 -0
- package/dist/components/useTemplate.d.ts.map +1 -0
- package/dist/components/utils/ResponsiveContext.d.ts +7 -0
- package/dist/components/utils/ResponsiveContext.d.ts.map +1 -0
- package/dist/components/utils/commonHelpers.d.ts +5 -0
- package/dist/components/utils/commonHelpers.d.ts.map +1 -0
- package/dist/components/utils/constants.d.ts +21 -0
- package/dist/components/utils/constants.d.ts.map +1 -0
- package/dist/components/utils/containerHoc.d.ts +16 -0
- package/dist/components/utils/containerHoc.d.ts.map +1 -0
- package/dist/components/utils/eventHelpers.d.ts +16 -0
- package/dist/components/utils/eventHelpers.d.ts.map +1 -0
- package/dist/components/utils/hoc.d.ts +6 -0
- package/dist/components/utils/hoc.d.ts.map +1 -0
- package/dist/components/utils/styleHelpers.d.ts +78 -0
- package/dist/components/utils/styleHelpers.d.ts.map +1 -0
- package/dist/components/utils/useForEditor.d.ts +9 -0
- package/dist/components/utils/useForEditor.d.ts.map +1 -0
- package/dist/components/validator/ComponentValidator.d.ts +17 -0
- package/dist/components/validator/ComponentValidator.d.ts.map +1 -0
- package/dist/index.cjs +33869 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +33853 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +33870 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActionConfig } from '@jdh-cross/aui-types/action';
|
|
3
|
+
import { LayoutProps } from '../types/component';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 两列等分布局(50% / 50%)
|
|
7
|
+
*/
|
|
8
|
+
export interface TwoColumnLayoutProps {
|
|
9
|
+
props?: LayoutProps & {
|
|
10
|
+
actions?: ActionConfig[];
|
|
11
|
+
};
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const TwoColumnLayout: React.FC<TwoColumnLayoutProps>;
|
|
15
|
+
export default TwoColumnLayout;
|
|
16
|
+
//# sourceMappingURL=TwoColumnLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoColumnLayout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/TwoColumnLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,WAAW,GAAG;QAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6C1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActionConfig } from '@jdh-cross/aui-types/action';
|
|
3
|
+
import { LayoutProps } from '../types/component';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 两列等分布局(50% / 50%)
|
|
7
|
+
*/
|
|
8
|
+
export interface TwoColumnLayoutProps {
|
|
9
|
+
props?: LayoutProps & {
|
|
10
|
+
actions?: ActionConfig[];
|
|
11
|
+
};
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const TwoColumnLayout: React.FC<TwoColumnLayoutProps>;
|
|
15
|
+
export default TwoColumnLayout;
|
|
16
|
+
//# sourceMappingURL=TwoColumnLeftFullLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoColumnLeftFullLayout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/TwoColumnLeftFullLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,WAAW,GAAG;QAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiD1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActionConfig } from '@jdh-cross/aui-types/action';
|
|
3
|
+
import { LayoutProps } from '../types/component';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 两列等分布局(50% / 50%)
|
|
7
|
+
*/
|
|
8
|
+
export interface TwoColumnLayoutProps {
|
|
9
|
+
props?: LayoutProps & {
|
|
10
|
+
actions?: ActionConfig[];
|
|
11
|
+
};
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const TwoColumnLayout: React.FC<TwoColumnLayoutProps>;
|
|
15
|
+
export default TwoColumnLayout;
|
|
16
|
+
//# sourceMappingURL=TwoColumnRightFullLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoColumnRightFullLayout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/TwoColumnRightFullLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,WAAW,GAAG;QAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8C1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MessageTemplate } from '@jdh-cross/message-template-engine';
|
|
3
|
+
import { Theme } from '../types/component';
|
|
4
|
+
|
|
5
|
+
export interface MessageContainerProps {
|
|
6
|
+
/**
|
|
7
|
+
* 模板:JSON 对象或 JSON 字符串
|
|
8
|
+
*/
|
|
9
|
+
component: MessageTemplate;
|
|
10
|
+
/**
|
|
11
|
+
* 异步数据源,key -> 异步函数,函数返回值会与 data 合并
|
|
12
|
+
*/
|
|
13
|
+
dataSources?: Record<string, () => Promise<any>>;
|
|
14
|
+
/**
|
|
15
|
+
* 统一交互回调(可用于上抛 change/submit/click 等)
|
|
16
|
+
*/
|
|
17
|
+
onAction?: (action: {
|
|
18
|
+
type: string;
|
|
19
|
+
payload?: any;
|
|
20
|
+
}) => void;
|
|
21
|
+
/**
|
|
22
|
+
* 主题(可选),传入则以 Provider 包裹实现运行时主题覆盖
|
|
23
|
+
*/
|
|
24
|
+
theme?: Partial<Theme>;
|
|
25
|
+
/**
|
|
26
|
+
* 容器样式
|
|
27
|
+
*/
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 消息容器
|
|
33
|
+
* - 合并 data 与 dataSources 结果
|
|
34
|
+
* - 调用模板引擎适配层编译得到组件树
|
|
35
|
+
* - 维护受控表单状态(values)
|
|
36
|
+
* - 交互:onChange -> 更新 values -> 重新编译渲染树(必要时)
|
|
37
|
+
* - 错误边界:模板/表达式错误与嵌套错误在容器处降级显示
|
|
38
|
+
*/
|
|
39
|
+
export declare const MessageContainer: React.FC<MessageContainerProps>;
|
|
40
|
+
export default MessageContainer;
|
|
41
|
+
//# sourceMappingURL=MessageContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageContainer.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAQhD,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7D;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqH5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckboxProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 受控多选组件
|
|
6
|
+
* - 使用 CheckboxGroup 统一跨端事件模型(e.detail.value 为选中值字符串数组)
|
|
7
|
+
* - 受控 values,onChange 由容器注入(renderer 已封装 makeOnChange)
|
|
8
|
+
*/
|
|
9
|
+
export interface CheckboxRenderProps extends CheckboxProps {
|
|
10
|
+
onChange?: (e: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const CheckboxRender: React.FC<CheckboxRenderProps>;
|
|
13
|
+
export default CheckboxRender;
|
|
14
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/render/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQxD;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyCxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/render/CustomRenderer/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,GAAI,UAAK,4CAoEjC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 虚线组件
|
|
3
|
+
* @param {String} color 线条颜色
|
|
4
|
+
* @param {String} backgroundColor 背景颜色
|
|
5
|
+
* @param {Number} lineWidth 线条粗细
|
|
6
|
+
* @param {Object} style 组件样式
|
|
7
|
+
* @returns {Component}
|
|
8
|
+
*/
|
|
9
|
+
export interface DashLineProps {
|
|
10
|
+
color?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
lineWidth?: number;
|
|
13
|
+
style?: any;
|
|
14
|
+
}
|
|
15
|
+
declare const DashLine: (props: DashLineProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default DashLine;
|
|
17
|
+
//# sourceMappingURL=DashLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashLine.d.ts","sourceRoot":"","sources":["../../../src/components/render/DashLine.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AACD,QAAA,MAAM,QAAQ,GAAI,OAAO,aAAa,4CAGrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IRenderCommonProps, IThemeColor } from '@jdh-cross/aui-types';
|
|
3
|
+
import { CommonProps } from '../types/component';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 分隔线渲染组件 (DividerRender)
|
|
7
|
+
* - 简单的横向分隔线
|
|
8
|
+
*/
|
|
9
|
+
export interface DividerRenderProps extends CommonProps, IRenderCommonProps {
|
|
10
|
+
color?: IThemeColor;
|
|
11
|
+
height?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const DividerRender: React.FC<DividerRenderProps>;
|
|
14
|
+
export default DividerRender;
|
|
15
|
+
//# sourceMappingURL=DividerRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DividerRender.d.ts","sourceRoot":"","sources":["../../../src/components/render/DividerRender.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMtD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW,EAAE,kBAAkB;IACzE,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsBtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ImageProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 图片渲染组件
|
|
6
|
+
* - 支持宽高与 objectFit(fit)
|
|
7
|
+
* - 默认宽度 100%,高度随内容(若未指定)
|
|
8
|
+
*/
|
|
9
|
+
export declare const ImageRender: React.FC<ImageProps>;
|
|
10
|
+
export default ImageRender;
|
|
11
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/render/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA8B5C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 受控输入组件
|
|
6
|
+
* - 使用 value 受控,onChange 由容器注入(renderer 已封装 makeOnChange)
|
|
7
|
+
* - 统一宽度 100%,高度随内容
|
|
8
|
+
*/
|
|
9
|
+
export interface InputRenderProps extends InputProps {
|
|
10
|
+
onChange?: (e: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const InputRender: React.FC<InputRenderProps>;
|
|
13
|
+
export default InputRender;
|
|
14
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/render/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA4BlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/render/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAkBxD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6BlD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RadioProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 受控单选组件
|
|
6
|
+
* - 使用 RadioGroup 统一跨端事件模型(e.detail.value)
|
|
7
|
+
* - 受控 value,onChange 由容器注入(renderer 已封装 makeOnChange)
|
|
8
|
+
*/
|
|
9
|
+
export interface RadioRenderProps extends RadioProps {
|
|
10
|
+
onChange?: (e: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const RadioRender: React.FC<RadioRenderProps>;
|
|
13
|
+
export default RadioRender;
|
|
14
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/render/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgClD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SelectProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 受控下拉选择组件
|
|
6
|
+
* - 使用 Picker(selector) 跨端封装
|
|
7
|
+
* - 受控 value,onChange 由容器注入(renderer 已封装 makeOnChange)
|
|
8
|
+
*/
|
|
9
|
+
export interface SelectRenderProps extends SelectProps {
|
|
10
|
+
onChange?: (e: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const SelectRender: React.FC<SelectRenderProps>;
|
|
13
|
+
export default SelectRender;
|
|
14
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/render/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMtD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyCpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 文本渲染组件
|
|
6
|
+
* - 支持字号/颜色/字重/对齐
|
|
7
|
+
* - 默认宽度 100%,高度随内容
|
|
8
|
+
*/
|
|
9
|
+
export declare const TextRender: React.FC<TextProps>;
|
|
10
|
+
export default TextRender;
|
|
11
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/render/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOpD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAuB1C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextListProps } from '../types/component';
|
|
3
|
+
|
|
4
|
+
export interface TextListRenderProps extends TextListProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 文本列表渲染组件
|
|
9
|
+
* - 支持有序/无序、自定义标记
|
|
10
|
+
* - 默认宽度 100%,高度随内容
|
|
11
|
+
* - 如有 children(由渲染器递归生成),将追加渲染在列表尾部
|
|
12
|
+
*/
|
|
13
|
+
export declare const TextListRender: React.FC<TextListRenderProps>;
|
|
14
|
+
export default TextListRender;
|
|
15
|
+
//# sourceMappingURL=TextList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextList.d.ts","sourceRoot":"","sources":["../../../src/components/render/TextList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOxD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmFxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/render/UnknownRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAc1D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
+
import { Theme } from '../types/component';
|
|
3
|
+
|
|
4
|
+
export interface ThemeProviderProps {
|
|
5
|
+
theme?: Partial<Theme>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ThemeProvider: React.FC<PropsWithChildren<ThemeProviderProps>>;
|
|
8
|
+
export declare const useTheme: () => Theme;
|
|
9
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../src/components/theme/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAKhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAwBzE,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,KAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../../src/components/theme/defaultTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,KAqD1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,KAAK,EAAE,KAqDnB,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { IComponentNode, ILayoutComponent, IRenderComponent, ILayoutCommonProps, IRenderCommonProps, IThemeSystemConfig } from '@jdh-cross/aui-types';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
export type LayoutType = 'full-row' | 'two-column' | 'three-column' | 'four-column';
|
|
5
|
+
export type RenderType = 'text' | 'markdown' | 'image' | 'input' | 'select' | 'radio' | 'checkbox' | 'text-list';
|
|
6
|
+
export interface Theme extends IThemeSystemConfig {
|
|
7
|
+
}
|
|
8
|
+
export interface CommonProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
width?: string | number;
|
|
13
|
+
height?: string | number;
|
|
14
|
+
itemStyle?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export interface LayoutProps extends CommonProps, Omit<ILayoutCommonProps, 'padding' | 'margin'> {
|
|
17
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
18
|
+
justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
|
|
19
|
+
gap?: number;
|
|
20
|
+
padding?: number | ILayoutCommonProps['padding'];
|
|
21
|
+
margin?: number | ILayoutCommonProps['margin'];
|
|
22
|
+
marginBottom?: number;
|
|
23
|
+
marginLeft?: number;
|
|
24
|
+
marginRight?: number;
|
|
25
|
+
marginTop?: number;
|
|
26
|
+
display?: 'flex' | 'none' | 'block' | 'inline-block';
|
|
27
|
+
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
export interface LayoutComponent {
|
|
31
|
+
type: 'layout';
|
|
32
|
+
layoutType: LayoutType;
|
|
33
|
+
props?: LayoutProps;
|
|
34
|
+
children?: ComponentNode[];
|
|
35
|
+
}
|
|
36
|
+
export interface TextProps extends CommonProps, IRenderCommonProps {
|
|
37
|
+
text: string;
|
|
38
|
+
weight?: 'normal' | 'medium' | 'bold';
|
|
39
|
+
size?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface MarkdownProps extends CommonProps, IRenderCommonProps {
|
|
42
|
+
content: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ImageProps extends CommonProps, IRenderCommonProps {
|
|
45
|
+
src: string;
|
|
46
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
47
|
+
}
|
|
48
|
+
export interface TextListItem {
|
|
49
|
+
marker?: string;
|
|
50
|
+
text?: string;
|
|
51
|
+
children?: ComponentNode[];
|
|
52
|
+
}
|
|
53
|
+
export interface TextListProps extends CommonProps, IRenderCommonProps {
|
|
54
|
+
ordered?: boolean;
|
|
55
|
+
marker?: string;
|
|
56
|
+
items: TextListItem[];
|
|
57
|
+
}
|
|
58
|
+
export interface InputProps extends CommonProps, IRenderCommonProps {
|
|
59
|
+
name: string;
|
|
60
|
+
value?: string;
|
|
61
|
+
placeholder?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface SelectOption {
|
|
64
|
+
label: string;
|
|
65
|
+
value: string | number;
|
|
66
|
+
}
|
|
67
|
+
export interface SelectProps extends CommonProps, IRenderCommonProps {
|
|
68
|
+
name: string;
|
|
69
|
+
value?: string | number;
|
|
70
|
+
options: SelectOption[];
|
|
71
|
+
placeholder?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface RadioProps extends CommonProps, IRenderCommonProps {
|
|
74
|
+
name: string;
|
|
75
|
+
value?: string | number;
|
|
76
|
+
options: SelectOption[];
|
|
77
|
+
itemStyle?: CSSProperties;
|
|
78
|
+
}
|
|
79
|
+
export interface CheckboxProps extends CommonProps, IRenderCommonProps {
|
|
80
|
+
name: string;
|
|
81
|
+
values?: Array<string | number>;
|
|
82
|
+
options: SelectOption[];
|
|
83
|
+
}
|
|
84
|
+
export interface RenderComponent {
|
|
85
|
+
type: 'render';
|
|
86
|
+
renderType: RenderType;
|
|
87
|
+
props: TextProps | MarkdownProps | ImageProps | TextListProps | InputProps | SelectProps | RadioProps | CheckboxProps;
|
|
88
|
+
children?: ComponentNode[];
|
|
89
|
+
}
|
|
90
|
+
export type ComponentNode = LayoutComponent | RenderComponent;
|
|
91
|
+
export interface TemplateCompileResult {
|
|
92
|
+
tree: IComponentNode[];
|
|
93
|
+
errors?: string[];
|
|
94
|
+
}
|
|
95
|
+
export declare const isLayoutNode: (node: IComponentNode) => node is ILayoutComponent;
|
|
96
|
+
export declare const isRenderNode: (node: IComponentNode) => node is IRenderComponent;
|
|
97
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/types/component.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TemplateData, CacheContext, ApiConfig } from './cache';
|
|
2
|
+
|
|
3
|
+
interface UseTemplateOptions {
|
|
4
|
+
cardId?: string;
|
|
5
|
+
propsTemplate?: TemplateData;
|
|
6
|
+
apiConfig?: Partial<ApiConfig>;
|
|
7
|
+
context?: CacheContext;
|
|
8
|
+
enableCache?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface UseTemplateResult {
|
|
11
|
+
template: TemplateData | null;
|
|
12
|
+
refresh: () => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare const useTemplate: (options: UseTemplateOptions) => UseTemplateResult;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTemplate.d.ts","sourceRoot":"","sources":["../../src/components/useTemplate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAErE,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,kBAAkB,KAAG,iBAiIzD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ResponsiveContextType {
|
|
2
|
+
scale: number;
|
|
3
|
+
width: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const ResponsiveContext: import('react').Context<ResponsiveContextType>;
|
|
6
|
+
export declare const useResponsive: () => ResponsiveContextType;
|
|
7
|
+
//# sourceMappingURL=ResponsiveContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveContext.d.ts","sourceRoot":"","sources":["../../../src/components/utils/ResponsiveContext.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,gDAG5B,CAAC;AAEH,eAAO,MAAM,aAAa,6BAAsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/utils/commonHelpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,GAAG,GAAG,CAW9D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LayoutType, RenderType } from '../types/component';
|
|
2
|
+
|
|
3
|
+
export declare const LAYOUT_TYPES: LayoutType[];
|
|
4
|
+
export declare const RENDER_TYPES: RenderType[];
|
|
5
|
+
export declare const DEFAULT_ITEM_WIDTH: Record<LayoutType, string>;
|
|
6
|
+
export type ActionType = 'change' | 'submit' | 'click';
|
|
7
|
+
export interface ChangePayload {
|
|
8
|
+
name: string;
|
|
9
|
+
value: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare const THEME_KEYS: {
|
|
12
|
+
colorPrimary: string;
|
|
13
|
+
colorText: string;
|
|
14
|
+
colorMutedText: string;
|
|
15
|
+
colorBg: string;
|
|
16
|
+
colorBorder: string;
|
|
17
|
+
fontSizeMd: string;
|
|
18
|
+
spaceMd: string;
|
|
19
|
+
radiusMd: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,UAAU,EAKpC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,EASpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKzD,CAAC;AAGF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAGvD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAGD,eAAO,MAAM,UAAU;;;;;;;;;CAStB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MessageTemplate } from '@jdh-cross/message-template-engine';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const _default: (renderFunction: (props: {
|
|
5
|
+
component: MessageTemplate;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}) => ReactNode) => ((props: {
|
|
8
|
+
component: MessageTemplate;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}) => ReactNode) | ((props: {
|
|
11
|
+
component: MessageTemplate & {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element);
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=containerHoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerHoc.d.ts","sourceRoot":"","sources":["../../../src/components/utils/containerHoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;yBAuEb,gBAAgB,CAAC,KAAK,EAAE;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,KAAK,SAAS,cAHS;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,KAAK,SAAS,aAgBH;IAAE,SAAS,EAAE,eAAe,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE;AApBzE,wBA6BE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 简单对象判断
|
|
3
|
+
*/
|
|
4
|
+
export declare const isPlainObject: (obj: unknown) => obj is Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* 受控表单值归一化:兼容 Taro/H5 多种事件结构
|
|
7
|
+
*/
|
|
8
|
+
export declare const normalizeEventValue: (eOrValue: any) => any;
|
|
9
|
+
/**
|
|
10
|
+
* 统一生成 onChange 处理器
|
|
11
|
+
*/
|
|
12
|
+
export declare const makeOnChange: (name: string, onChange?: (payload: {
|
|
13
|
+
name: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}) => void) => (eOrValue: any) => void;
|
|
16
|
+
//# sourceMappingURL=eventHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/utils/eventHelpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACf,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,GAAG,KAAG,GAenD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAErB,MAAM,MAAM,EACZ,WAAW,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,MAE/D,UAAU,GAAG,SAIb,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IComponentNode } from '@jdh-cross/aui-types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const _default: (renderFunction: (componentNode: IComponentNode, ...args: unknown[]) => ReactNode) => ((componentNode: IComponentNode, ...args: unknown[]) => ReactNode) | ((componentNode: IComponentNode, ...args: unknown[]) => import("react/jsx-runtime").JSX.Element);
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=hoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hoc.d.ts","sourceRoot":"","sources":["../../../src/components/utils/hoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAc,EAGZ,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;yBA0Db,gBAAgB,CACd,aAAa,EAAE,cAAc,EAC7B,GAAG,IAAI,EAAE,OAAO,EAAE,KACf,SAAS,sBAFG,cAAc,WACpB,OAAO,EAAE,KACf,SAAS,qBAWM,cAAc,WAAW,OAAO,EAAE;AAfxD,wBAwBE"}
|