oxy-uni-ui 1.1.0 → 1.2.3
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/attributes.json +1 -1
- package/components/common/abstracts/variable.scss +59 -1
- package/components/common/path.ts +9 -0
- package/components/common/util.ts +42 -0
- package/components/composables/index.ts +1 -0
- package/components/composables/useGlobalLoading.ts +42 -0
- package/components/composables/useGlobalMessage.ts +48 -0
- package/components/composables/useGlobalToast.ts +84 -0
- package/components/composables/useVirtualScroll.ts +173 -0
- package/components/oxy-cell/oxy-cell.vue +15 -2
- package/components/oxy-cell/types.ts +4 -0
- package/components/oxy-checkbox/index.scss +1 -1
- package/components/oxy-checkbox/oxy-checkbox.vue +2 -2
- package/components/oxy-col-picker/oxy-col-picker.vue +3 -0
- package/components/oxy-col-picker/types.ts +5 -1
- package/components/oxy-corner/index.scss +121 -1
- package/components/oxy-corner/oxy-corner.vue +18 -5
- package/components/oxy-corner/types.ts +24 -3
- package/components/oxy-date-strip/index.scss +10 -0
- package/components/oxy-date-strip/oxy-date-strip.vue +198 -0
- package/components/oxy-date-strip/types.ts +98 -0
- package/components/oxy-date-strip/utils.ts +67 -0
- package/components/oxy-date-strip-item/index.scss +94 -0
- package/components/oxy-date-strip-item/oxy-date-strip-item.vue +102 -0
- package/components/oxy-date-strip-item/types.ts +53 -0
- package/components/oxy-datetime-picker/oxy-datetime-picker.vue +3 -1
- package/components/oxy-datetime-picker/types.ts +5 -1
- package/components/oxy-echarts/index.scss +17 -0
- package/components/oxy-echarts/index.ts +1 -0
- package/components/oxy-echarts/oxy-echarts.vue +32 -0
- package/components/oxy-echarts/types.ts +12 -0
- package/components/oxy-file-list/index.scss +26 -0
- package/components/oxy-file-list/oxy-file-list.vue +208 -34
- package/components/oxy-file-list/types.ts +58 -2
- package/components/oxy-global-loading/oxy-global-loading.vue +53 -0
- package/components/oxy-global-message/oxy-global-message.vue +64 -0
- package/components/oxy-global-toast/oxy-global-toast.vue +53 -0
- package/components/oxy-img-lazy/index.scss +17 -0
- package/components/oxy-img-lazy/oxy-img-lazy.vue +332 -0
- package/components/oxy-img-lazy/types.ts +69 -0
- package/components/oxy-link/index.scss +57 -0
- package/components/oxy-link/oxy-link.vue +130 -0
- package/components/oxy-link/types.ts +81 -0
- package/components/oxy-list/index.scss +8 -1
- package/components/oxy-list/oxy-list.vue +121 -40
- package/components/oxy-list/types.ts +3 -15
- package/components/oxy-picker/oxy-picker.vue +3 -0
- package/components/oxy-picker/types.ts +5 -1
- package/components/oxy-radio/index.scss +3 -3
- package/components/oxy-radio/oxy-radio.vue +1 -1
- package/components/oxy-rich-text/icon/emjio.svg +1 -0
- package/components/oxy-rich-text/icon/quote.svg +1 -0
- package/components/oxy-rich-text/icon/text.svg +1 -0
- package/components/oxy-rich-text/icon/title.svg +1 -0
- package/components/oxy-rich-text/index.scss +159 -0
- package/components/oxy-rich-text/mp-html/card/card.vue +122 -0
- package/components/oxy-rich-text/mp-html/card/index.js +7 -0
- package/components/oxy-rich-text/mp-html/editable/config.js +15 -0
- package/components/oxy-rich-text/mp-html/editable/index.js +553 -0
- package/components/oxy-rich-text/mp-html/emoji/index.js +203 -0
- package/components/oxy-rich-text/mp-html/highlight/config.js +5 -0
- package/components/oxy-rich-text/mp-html/highlight/index.js +96 -0
- package/components/oxy-rich-text/mp-html/highlight/prism.css +1 -0
- package/components/oxy-rich-text/mp-html/highlight/prism.min.js +7 -0
- package/components/oxy-rich-text/mp-html/img-cache/index.js +138 -0
- package/components/oxy-rich-text/mp-html/latex/index.js +80 -0
- package/components/oxy-rich-text/mp-html/latex/katex.css +1 -0
- package/components/oxy-rich-text/mp-html/latex/katex.min.js +1 -0
- package/components/oxy-rich-text/mp-html/markdown/index.js +50 -0
- package/components/oxy-rich-text/mp-html/markdown/marked.min.js +71 -0
- package/components/oxy-rich-text/mp-html/mp-html.d.ts +184 -0
- package/components/oxy-rich-text/mp-html/mp-html.vue +675 -0
- package/components/oxy-rich-text/mp-html/node/node.vue +1161 -0
- package/components/oxy-rich-text/mp-html/parser.js +1428 -0
- package/components/oxy-rich-text/mp-html/search/index.js +132 -0
- package/components/oxy-rich-text/mp-html/style/index.js +129 -0
- package/components/oxy-rich-text/mp-html/style/parser.js +175 -0
- package/components/oxy-rich-text/mp-html/template/index.js +67 -0
- package/components/oxy-rich-text/mp-html/txv-video/index.js +46 -0
- package/components/oxy-rich-text/oxy-rich-text.vue +642 -0
- package/components/oxy-rich-text/types.ts +71 -0
- package/components/oxy-select/index.scss +255 -0
- package/components/oxy-select/oxy-select.vue +421 -0
- package/components/oxy-select/types.ts +71 -0
- package/components/oxy-select-picker/oxy-select-picker.vue +3 -0
- package/components/oxy-select-picker/types.ts +5 -1
- package/components/oxy-stream-render/index.scss +6 -0
- package/components/oxy-stream-render/oxy-stream-render.vue +204 -0
- package/components/oxy-stream-render/types.ts +5 -0
- package/components/oxy-tree/index.scss +43 -5
- package/components/oxy-tree/oxy-tree.vue +233 -35
- package/components/oxy-tree/types.ts +54 -7
- package/components/oxy-tree/utils.ts +51 -0
- package/components/oxy-virtual-scroll/index.scss +1 -1
- package/components/oxy-virtual-scroll/oxy-virtual-scroll.vue +69 -110
- package/components/oxy-virtual-scroll/types.ts +95 -5
- package/components/oxy-waterfall/index.scss +18 -0
- package/components/oxy-waterfall/oxy-waterfall.vue +218 -0
- package/components/oxy-waterfall/types.ts +90 -0
- package/components/oxy-waterfall-item/index.scss +8 -0
- package/components/oxy-waterfall-item/oxy-waterfall-item.vue +89 -0
- package/components/oxy-waterfall-item/types.ts +16 -0
- package/global.d.ts +7 -0
- package/index.ts +3 -0
- package/locale/lang/en-US.ts +35 -9
- package/locale/lang/zh-CN.ts +31 -5
- package/oxy-uni-ui.zip +0 -0
- package/package.json +1 -1
- package/tags.json +1 -1
- package/uni-echarts/changelog.md +2 -0
- package/uni-echarts/components/index.js +1 -0
- package/uni-echarts/components/uni-echarts/events.js +95 -0
- package/uni-echarts/components/uni-echarts/types.d.ts +183 -0
- package/uni-echarts/components/uni-echarts/types.js +1 -0
- package/uni-echarts/components/uni-echarts/uni-echarts.vue +530 -0
- package/uni-echarts/components/uni-echarts/uni-echarts.vue.d.ts +19 -0
- package/uni-echarts/global.d.ts +7 -0
- package/uni-echarts/index.d.ts +440 -0
- package/uni-echarts/index.js +2 -0
- package/uni-echarts/package.json +105 -0
- package/uni-echarts/shared-core.d.ts +269 -0
- package/uni-echarts/shared-core.js +900 -0
- package/web-types.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const MOUSE_EVENTS = [
|
|
2
|
+
"click",
|
|
3
|
+
"dblclick",
|
|
4
|
+
"mouseout",
|
|
5
|
+
"mouseover",
|
|
6
|
+
"mouseup",
|
|
7
|
+
"mousedown",
|
|
8
|
+
"mousemove",
|
|
9
|
+
"contextmenu",
|
|
10
|
+
"globalout"
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export const ELEMENT_EVENTS = [
|
|
14
|
+
...MOUSE_EVENTS,
|
|
15
|
+
"mousewheel",
|
|
16
|
+
"drag",
|
|
17
|
+
"dragstart",
|
|
18
|
+
"dragend",
|
|
19
|
+
"dragenter",
|
|
20
|
+
"dragleave",
|
|
21
|
+
"dragover",
|
|
22
|
+
"drop"
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export const ZRENDER_EVENTS = ELEMENT_EVENTS.map((it) => `zr:${it}`);
|
|
26
|
+
|
|
27
|
+
export const OTHER_EVENTS = [
|
|
28
|
+
"highlight",
|
|
29
|
+
"downplay",
|
|
30
|
+
"selectchanged",
|
|
31
|
+
"legendselectchanged",
|
|
32
|
+
"legendselected",
|
|
33
|
+
"legendunselected",
|
|
34
|
+
"legendselectall",
|
|
35
|
+
"legendinverseselect",
|
|
36
|
+
"legendscroll",
|
|
37
|
+
"datazoom",
|
|
38
|
+
"datarangeselected",
|
|
39
|
+
"graphroam",
|
|
40
|
+
"georoam",
|
|
41
|
+
"treeroam",
|
|
42
|
+
"timelinechanged",
|
|
43
|
+
"timelineplaychanged",
|
|
44
|
+
"restore",
|
|
45
|
+
"dataviewchanged",
|
|
46
|
+
"magictypechanged",
|
|
47
|
+
"geoselectchanged",
|
|
48
|
+
"geoselected",
|
|
49
|
+
"geounselected",
|
|
50
|
+
"axisareaselected",
|
|
51
|
+
"brush",
|
|
52
|
+
"brushEnd",
|
|
53
|
+
"brushselected",
|
|
54
|
+
"globalcursortaken",
|
|
55
|
+
"showtip",
|
|
56
|
+
"hidetip"
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
export const ECHARTS_EVENTS = [
|
|
60
|
+
...MOUSE_EVENTS,
|
|
61
|
+
...OTHER_EVENTS,
|
|
62
|
+
"rendered",
|
|
63
|
+
"finished",
|
|
64
|
+
...ZRENDER_EVENTS
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
export const UNI_EVENTS = [
|
|
68
|
+
"touchstart",
|
|
69
|
+
"touchmove",
|
|
70
|
+
"touchcancel",
|
|
71
|
+
"touchend",
|
|
72
|
+
"tap",
|
|
73
|
+
"longpress",
|
|
74
|
+
"longtap",
|
|
75
|
+
"transitionend",
|
|
76
|
+
"animationstart",
|
|
77
|
+
"animationiteration",
|
|
78
|
+
"animationend",
|
|
79
|
+
"touchforcechange"
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
export const NATIVE_EVENTS = [
|
|
83
|
+
...ELEMENT_EVENTS,
|
|
84
|
+
...UNI_EVENTS
|
|
85
|
+
].map((it) => `native:${it}`);
|
|
86
|
+
|
|
87
|
+
export const COMPONENT_EVENTS = [
|
|
88
|
+
"inited"
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
export const EVENTS = [
|
|
92
|
+
...ECHARTS_EVENTS,
|
|
93
|
+
...NATIVE_EVENTS,
|
|
94
|
+
...COMPONENT_EVENTS
|
|
95
|
+
];
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { ECElementEvent, ElementEvent } from "echarts/core";
|
|
2
|
+
import type { StyleValue } from "vue";
|
|
3
|
+
import type {
|
|
4
|
+
AutoResize,
|
|
5
|
+
ChartOption,
|
|
6
|
+
ChartTheme,
|
|
7
|
+
EChartsType,
|
|
8
|
+
InitOptions,
|
|
9
|
+
LoadingOptions,
|
|
10
|
+
NullableValue,
|
|
11
|
+
PublicApi,
|
|
12
|
+
UpdateOptions
|
|
13
|
+
} from "../../shared-core";
|
|
14
|
+
|
|
15
|
+
export interface UniEchartsProps {
|
|
16
|
+
/**
|
|
17
|
+
* Custom root el class.
|
|
18
|
+
*/
|
|
19
|
+
customClass?: any;
|
|
20
|
+
/**
|
|
21
|
+
* Custom root el style.
|
|
22
|
+
*/
|
|
23
|
+
customStyle?: StyleValue;
|
|
24
|
+
/**
|
|
25
|
+
* Same as the option of echarts.
|
|
26
|
+
*/
|
|
27
|
+
option?: ChartOption;
|
|
28
|
+
/**
|
|
29
|
+
* Option inject key.
|
|
30
|
+
*/
|
|
31
|
+
optionKey?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Theme to be applied.
|
|
34
|
+
*/
|
|
35
|
+
theme?: ChartTheme;
|
|
36
|
+
/**
|
|
37
|
+
* Optional chart init configurations.
|
|
38
|
+
*/
|
|
39
|
+
initOptions?: InitOptions;
|
|
40
|
+
/**
|
|
41
|
+
* Options for updating chart option.
|
|
42
|
+
*/
|
|
43
|
+
updateOptions?: UpdateOptions;
|
|
44
|
+
/**
|
|
45
|
+
* Group name to be used in chart connection.
|
|
46
|
+
*/
|
|
47
|
+
group?: string;
|
|
48
|
+
/**
|
|
49
|
+
* For performance critical scenarios (having a large dataset) we'd better bypass Vue's reactivity system for `option` prop.
|
|
50
|
+
*/
|
|
51
|
+
manualUpdate?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the chart should be resized automatically whenever its root is resized.
|
|
54
|
+
*/
|
|
55
|
+
autoresize?: AutoResize;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the chart is in loading state.
|
|
58
|
+
*/
|
|
59
|
+
loading?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Configuration item of loading animation.
|
|
62
|
+
*/
|
|
63
|
+
loadingOptions?: LoadingOptions;
|
|
64
|
+
/**
|
|
65
|
+
* Canvas type.
|
|
66
|
+
*/
|
|
67
|
+
canvasType?: "2d" | "legacy";
|
|
68
|
+
/**
|
|
69
|
+
* Prevent screen scroll when touching the canvas.
|
|
70
|
+
*/
|
|
71
|
+
disableScroll?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Support mouse hover behavior in PC.
|
|
74
|
+
*/
|
|
75
|
+
supportHover?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Init delay time(ms).
|
|
78
|
+
*/
|
|
79
|
+
initDelay?: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
type MouseEventName =
|
|
83
|
+
| "click"
|
|
84
|
+
| "dblclick"
|
|
85
|
+
| "mouseout"
|
|
86
|
+
| "mouseover"
|
|
87
|
+
| "mouseup"
|
|
88
|
+
| "mousedown"
|
|
89
|
+
| "mousemove"
|
|
90
|
+
| "contextmenu"
|
|
91
|
+
| "globalout";
|
|
92
|
+
|
|
93
|
+
type ElementEventName =
|
|
94
|
+
| MouseEventName
|
|
95
|
+
| "mousewheel"
|
|
96
|
+
| "drag"
|
|
97
|
+
| "dragstart"
|
|
98
|
+
| "dragend"
|
|
99
|
+
| "dragenter"
|
|
100
|
+
| "dragleave"
|
|
101
|
+
| "dragover"
|
|
102
|
+
| "drop";
|
|
103
|
+
|
|
104
|
+
type ZRenderEventName = `zr:${ElementEventName}`;
|
|
105
|
+
|
|
106
|
+
type OtherEventName =
|
|
107
|
+
| "highlight"
|
|
108
|
+
| "downplay"
|
|
109
|
+
| "selectchanged"
|
|
110
|
+
| "legendselectchanged"
|
|
111
|
+
| "legendselected"
|
|
112
|
+
| "legendunselected"
|
|
113
|
+
| "legendselectall"
|
|
114
|
+
| "legendinverseselect"
|
|
115
|
+
| "legendscroll"
|
|
116
|
+
| "datazoom"
|
|
117
|
+
| "datarangeselected"
|
|
118
|
+
| "graphroam"
|
|
119
|
+
| "georoam"
|
|
120
|
+
| "treeroam"
|
|
121
|
+
| "timelinechanged"
|
|
122
|
+
| "timelineplaychanged"
|
|
123
|
+
| "restore"
|
|
124
|
+
| "dataviewchanged"
|
|
125
|
+
| "magictypechanged"
|
|
126
|
+
| "geoselectchanged"
|
|
127
|
+
| "geoselected"
|
|
128
|
+
| "geounselected"
|
|
129
|
+
| "axisareaselected"
|
|
130
|
+
| "brush"
|
|
131
|
+
| "brushEnd"
|
|
132
|
+
| "brushselected"
|
|
133
|
+
| "globalcursortaken"
|
|
134
|
+
| "showtip"
|
|
135
|
+
| "hidetip";
|
|
136
|
+
|
|
137
|
+
type UniEventName =
|
|
138
|
+
| "touchstart"
|
|
139
|
+
| "touchmove"
|
|
140
|
+
| "touchcancel"
|
|
141
|
+
| "touchend"
|
|
142
|
+
| "tap"
|
|
143
|
+
| "longpress"
|
|
144
|
+
| "longtap"
|
|
145
|
+
| "transitionend"
|
|
146
|
+
| "animationstart"
|
|
147
|
+
| "animationiteration"
|
|
148
|
+
| "animationend"
|
|
149
|
+
| "touchforcechange";
|
|
150
|
+
|
|
151
|
+
type NativeEventName = `native:${ElementEventName}` | `native:${UniEventName}`;
|
|
152
|
+
|
|
153
|
+
type MouseEmits = {
|
|
154
|
+
[key in MouseEventName]: (params: ECElementEvent) => void;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type ZRenderEmits = {
|
|
158
|
+
[key in ZRenderEventName]: (params: ElementEvent) => void;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
type OtherEmits = {
|
|
162
|
+
[key in OtherEventName]: (params: any) => void;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
type NativeEmits = {
|
|
166
|
+
[key in NativeEventName]: (params: any) => void;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export type UniEchartsEmits = MouseEmits & ZRenderEmits & OtherEmits & NativeEmits & {
|
|
170
|
+
rendered: (params: { elapsedTime: number }) => void;
|
|
171
|
+
finished: () => void;
|
|
172
|
+
inited: () => void;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export interface UniEchartsInst extends PublicApi, Pick<
|
|
176
|
+
EChartsType,
|
|
177
|
+
"setOption" | "resize"
|
|
178
|
+
> {
|
|
179
|
+
root: NullableValue<HTMLElement>;
|
|
180
|
+
canvasId: string;
|
|
181
|
+
chart: NullableValue<EChartsType>;
|
|
182
|
+
toTempFilePath: (options?: Omit<UniApp.CanvasToTempFilePathOptions, "canvasId" | "canvas">) => Promise<UniApp.CanvasToTempFilePathRes>;
|
|
183
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|