yswk-editor 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/dist/components/MobileRender/ComponentWrapper.vue.d.ts +48 -0
- package/dist/components/MobileRender/GridOverlay.vue.d.ts +12 -0
- package/dist/components/MobileRender/index.vue.d.ts +58 -0
- package/dist/components/PropertyPanel/PreviewConfig.vue.d.ts +10 -0
- package/dist/components/PropertyPanel/RenderBlock.vue.d.ts +45 -0
- package/dist/components/PropertyPanel/StyleBorderRadius/FormBorderRs.vue.d.ts +22 -0
- package/dist/components/PropertyPanel/StylePosition/FormPosition.vue.d.ts +31 -0
- package/dist/components/PropertyPanel/index.vue.d.ts +37 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/constants.d.ts +51 -0
- package/dist/env.d.ts +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +1476 -0
- package/dist/style.css +1 -0
- package/dist/types/component.d.ts +127 -0
- package/dist/types/componentLoad.d.ts +61 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/loaderHelper.d.ts +4 -0
- package/dist/utils/propertyHelper.d.ts +83 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +42 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface Position {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
canMoveUp: boolean;
|
|
10
|
+
canMoveDown: boolean;
|
|
11
|
+
position?: Position;
|
|
12
|
+
designHeight?: number;
|
|
13
|
+
ignoreDrag?: boolean;
|
|
14
|
+
designWidth?: number;
|
|
15
|
+
}
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: {
|
|
19
|
+
default?(_: {}): any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
click: (iscancel?: boolean | undefined) => any;
|
|
27
|
+
"move-up": () => any;
|
|
28
|
+
"move-down": () => any;
|
|
29
|
+
delete: () => any;
|
|
30
|
+
"cancel-select": () => any;
|
|
31
|
+
"update-position": (x: number, y: number) => any;
|
|
32
|
+
"update-size": (width: number, height: number, left: number, top: number) => any;
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
34
|
+
onClick?: ((iscancel?: boolean | undefined) => any) | undefined;
|
|
35
|
+
"onMove-up"?: (() => any) | undefined;
|
|
36
|
+
"onMove-down"?: (() => any) | undefined;
|
|
37
|
+
onDelete?: (() => any) | undefined;
|
|
38
|
+
"onCancel-select"?: (() => any) | undefined;
|
|
39
|
+
"onUpdate-position"?: ((x: number, y: number) => any) | undefined;
|
|
40
|
+
"onUpdate-size"?: ((width: number, height: number, left: number, top: number) => any) | undefined;
|
|
41
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
gridSize?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
gridSize: number;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
interface MobileSize {
|
|
2
|
+
name: string;
|
|
3
|
+
label: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
device: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
pageComponents: any[];
|
|
10
|
+
selectedIndex: number | null;
|
|
11
|
+
designWidth?: number;
|
|
12
|
+
designHeight?: number;
|
|
13
|
+
showControls?: boolean;
|
|
14
|
+
showHeader?: boolean;
|
|
15
|
+
showGrid?: boolean;
|
|
16
|
+
gridSize?: number;
|
|
17
|
+
emptyText?: string;
|
|
18
|
+
popupPortId?: string;
|
|
19
|
+
mobileSizes?: MobileSize[];
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"move-up": (index: number) => any;
|
|
23
|
+
"move-down": (index: number) => any;
|
|
24
|
+
"update-position": (index: number, x: number, y: number) => any;
|
|
25
|
+
"update-size": (index: number, obj: {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
left: number;
|
|
29
|
+
top: number;
|
|
30
|
+
}) => any;
|
|
31
|
+
"update:selectedIndex": (value: number | null) => any;
|
|
32
|
+
"update:showGrid": (value: boolean) => any;
|
|
33
|
+
"delete-component": (index: number) => any;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
35
|
+
"onMove-up"?: ((index: number) => any) | undefined;
|
|
36
|
+
"onMove-down"?: ((index: number) => any) | undefined;
|
|
37
|
+
"onUpdate-position"?: ((index: number, x: number, y: number) => any) | undefined;
|
|
38
|
+
"onUpdate-size"?: ((index: number, obj: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
left: number;
|
|
42
|
+
top: number;
|
|
43
|
+
}) => any) | undefined;
|
|
44
|
+
"onUpdate:selectedIndex"?: ((value: number | null) => any) | undefined;
|
|
45
|
+
"onUpdate:showGrid"?: ((value: boolean) => any) | undefined;
|
|
46
|
+
"onDelete-component"?: ((index: number) => any) | undefined;
|
|
47
|
+
}>, {
|
|
48
|
+
designHeight: number;
|
|
49
|
+
designWidth: number;
|
|
50
|
+
gridSize: number;
|
|
51
|
+
showControls: boolean;
|
|
52
|
+
showHeader: boolean;
|
|
53
|
+
showGrid: boolean;
|
|
54
|
+
emptyText: string;
|
|
55
|
+
popupPortId: string;
|
|
56
|
+
mobileSizes: MobileSize[];
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IApiConfig } from '../../types/component';
|
|
2
|
+
interface Props {
|
|
3
|
+
previewConfig: IApiConfig[];
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
"update-config": (key: string, data: IApiConfig) => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
+
"onUpdate-config"?: ((key: string, data: IApiConfig) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PropertyConfig } from '../../types/component';
|
|
2
|
+
interface Props {
|
|
3
|
+
configList: PropertyConfig[];
|
|
4
|
+
}
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
'select-material'?: (props: {
|
|
9
|
+
field: PropertyConfig;
|
|
10
|
+
value: unknown;
|
|
11
|
+
update: (val: unknown) => void;
|
|
12
|
+
}) => any;
|
|
13
|
+
'select-goods'?: (props: {
|
|
14
|
+
field: PropertyConfig;
|
|
15
|
+
value: unknown;
|
|
16
|
+
update: (val: unknown) => void;
|
|
17
|
+
}) => any;
|
|
18
|
+
}> & {
|
|
19
|
+
'select-material'?: (props: {
|
|
20
|
+
field: PropertyConfig;
|
|
21
|
+
value: unknown;
|
|
22
|
+
update: (val: unknown) => void;
|
|
23
|
+
}) => any;
|
|
24
|
+
'select-goods'?: (props: {
|
|
25
|
+
field: PropertyConfig;
|
|
26
|
+
value: unknown;
|
|
27
|
+
update: (val: unknown) => void;
|
|
28
|
+
}) => any;
|
|
29
|
+
};
|
|
30
|
+
refs: {};
|
|
31
|
+
rootEl: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
|
+
"update-value": (key: string, value: unknown) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
37
|
+
"onUpdate-value"?: ((key: string, value: unknown) => any) | undefined;
|
|
38
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
39
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface BorderRadiusData {
|
|
2
|
+
borderRadius?: string;
|
|
3
|
+
}
|
|
4
|
+
interface Props {
|
|
5
|
+
modelValue?: BorderRadiusData;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: BorderRadiusData) => any;
|
|
9
|
+
"update-value": (data: {
|
|
10
|
+
key: string;
|
|
11
|
+
value: number | null | undefined | string;
|
|
12
|
+
}) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: BorderRadiusData) => any) | undefined;
|
|
15
|
+
"onUpdate-value"?: ((data: {
|
|
16
|
+
key: string;
|
|
17
|
+
value: number | null | undefined | string;
|
|
18
|
+
}) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
modelValue: BorderRadiusData;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface PositionData {
|
|
2
|
+
top?: number | null;
|
|
3
|
+
width?: number | null;
|
|
4
|
+
height?: number | null;
|
|
5
|
+
left?: number | null;
|
|
6
|
+
centerHorizontal?: boolean;
|
|
7
|
+
paddingTop?: number | null;
|
|
8
|
+
paddingRight?: number | null;
|
|
9
|
+
paddingBottom?: number | null;
|
|
10
|
+
paddingLeft?: number | null;
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
}
|
|
13
|
+
interface Props {
|
|
14
|
+
modelValue?: PositionData;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: PositionData) => any;
|
|
18
|
+
"update-value": (data: {
|
|
19
|
+
key: string;
|
|
20
|
+
value: number | null | undefined | boolean;
|
|
21
|
+
}) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: PositionData) => any) | undefined;
|
|
24
|
+
"onUpdate-value"?: ((data: {
|
|
25
|
+
key: string;
|
|
26
|
+
value: number | null | undefined | boolean;
|
|
27
|
+
}) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
modelValue: PositionData;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IComponentConfig, PropertyConfig } from '../../types/component';
|
|
2
|
+
interface Props {
|
|
3
|
+
componentName: string;
|
|
4
|
+
componentConfig: IComponentConfig | null;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
'select-material'?(_: {
|
|
10
|
+
field: PropertyConfig;
|
|
11
|
+
value: unknown;
|
|
12
|
+
update: (val: unknown) => void;
|
|
13
|
+
}): any;
|
|
14
|
+
'select-goods'?(_: {
|
|
15
|
+
field: PropertyConfig;
|
|
16
|
+
value: unknown;
|
|
17
|
+
update: (val: unknown) => void;
|
|
18
|
+
}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {};
|
|
21
|
+
rootEl: HTMLElement;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
"update-prop": (parentKey: string, value: unknown) => any;
|
|
26
|
+
"update-preview": (index: number, data: any) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
28
|
+
"onUpdate-prop"?: ((parentKey: string, value: unknown) => any) | undefined;
|
|
29
|
+
"onUpdate-preview"?: ((index: number, data: any) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* renderEdit 编辑器组件导出入口
|
|
3
|
+
*
|
|
4
|
+
* 用于第三方平台快速搭建低代码编辑器
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const { loadComponent } = useComponentLoader()
|
|
9
|
+
* const result = await loadComponent('/src/library/base/btn/BtnLink/config.json')
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export { default as MobileRender } from './MobileRender/index.vue';
|
|
13
|
+
export { default as PropertyPanel } from './PropertyPanel/index.vue';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件JSON数据格式定义
|
|
3
|
+
* 低代码平台组件配置数据结构
|
|
4
|
+
*/
|
|
5
|
+
/** 组件分组 */
|
|
6
|
+
export declare enum ComponentGroup {
|
|
7
|
+
BASE = "base",// 基础组件
|
|
8
|
+
SCAN = "scan",// 扫码组件
|
|
9
|
+
LUCKY = "lucky",// 抽奖组件
|
|
10
|
+
POP = "pop",// 弹窗组件
|
|
11
|
+
TEST = "test",// 测试组件:用于开发测试使用
|
|
12
|
+
OTHER = "other"
|
|
13
|
+
}
|
|
14
|
+
/** 动画类型 */
|
|
15
|
+
export declare enum AnimationType {
|
|
16
|
+
FADE_IN = "fadeIn",
|
|
17
|
+
SLIDE_IN = "slideIn",
|
|
18
|
+
ZOOM_IN = "zoomIn",
|
|
19
|
+
BOUNCE_IN = "bounceIn"
|
|
20
|
+
}
|
|
21
|
+
/** 活动状态 */
|
|
22
|
+
export declare enum ActivityStatus {
|
|
23
|
+
NOT_STARTED = "notStarted",// 未开始
|
|
24
|
+
IN_PROGRESS = "inProgress",// 进行中
|
|
25
|
+
ENDED = "ended"
|
|
26
|
+
}
|
|
27
|
+
export declare const PROP_MAP: {
|
|
28
|
+
value: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}[];
|
|
31
|
+
export declare enum FormItemEditType {
|
|
32
|
+
INPUT = "input",// 输入框
|
|
33
|
+
SELECT = "select",// 下拉框
|
|
34
|
+
RADIO = "radio",// 单选框
|
|
35
|
+
CHECKBOX = "checkbox",// 多选框
|
|
36
|
+
SWITCH = "switch",// 开关
|
|
37
|
+
COLOR = "color",// 颜色选择器
|
|
38
|
+
NUMBER = "number",// 数字输入框
|
|
39
|
+
SLIDER = "slider",
|
|
40
|
+
TEXTAREA = "textarea",// 多行输入框
|
|
41
|
+
MATERIAL = "material",// 素材选择
|
|
42
|
+
GOODS = "goods",// 物资选择
|
|
43
|
+
READONLY = "readonly"
|
|
44
|
+
}
|
|
45
|
+
export declare enum ConfigArrType {
|
|
46
|
+
PREVIEW = "preview",//
|
|
47
|
+
STYLE = "style",// 样式配置
|
|
48
|
+
BUSINESS = "business",// 业务属性配置
|
|
49
|
+
SUB_COMPONENT = "subComponent"
|
|
50
|
+
}
|
|
51
|
+
export declare const ComponentGroupLabels: Record<string, string>;
|
package/dist/env.d.ts
ADDED
package/dist/index.d.ts
ADDED