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.
Files changed (123) hide show
  1. package/attributes.json +1 -1
  2. package/components/common/abstracts/variable.scss +59 -1
  3. package/components/common/path.ts +9 -0
  4. package/components/common/util.ts +42 -0
  5. package/components/composables/index.ts +1 -0
  6. package/components/composables/useGlobalLoading.ts +42 -0
  7. package/components/composables/useGlobalMessage.ts +48 -0
  8. package/components/composables/useGlobalToast.ts +84 -0
  9. package/components/composables/useVirtualScroll.ts +173 -0
  10. package/components/oxy-cell/oxy-cell.vue +15 -2
  11. package/components/oxy-cell/types.ts +4 -0
  12. package/components/oxy-checkbox/index.scss +1 -1
  13. package/components/oxy-checkbox/oxy-checkbox.vue +2 -2
  14. package/components/oxy-col-picker/oxy-col-picker.vue +3 -0
  15. package/components/oxy-col-picker/types.ts +5 -1
  16. package/components/oxy-corner/index.scss +121 -1
  17. package/components/oxy-corner/oxy-corner.vue +18 -5
  18. package/components/oxy-corner/types.ts +24 -3
  19. package/components/oxy-date-strip/index.scss +10 -0
  20. package/components/oxy-date-strip/oxy-date-strip.vue +198 -0
  21. package/components/oxy-date-strip/types.ts +98 -0
  22. package/components/oxy-date-strip/utils.ts +67 -0
  23. package/components/oxy-date-strip-item/index.scss +94 -0
  24. package/components/oxy-date-strip-item/oxy-date-strip-item.vue +102 -0
  25. package/components/oxy-date-strip-item/types.ts +53 -0
  26. package/components/oxy-datetime-picker/oxy-datetime-picker.vue +3 -1
  27. package/components/oxy-datetime-picker/types.ts +5 -1
  28. package/components/oxy-echarts/index.scss +17 -0
  29. package/components/oxy-echarts/index.ts +1 -0
  30. package/components/oxy-echarts/oxy-echarts.vue +32 -0
  31. package/components/oxy-echarts/types.ts +12 -0
  32. package/components/oxy-file-list/index.scss +26 -0
  33. package/components/oxy-file-list/oxy-file-list.vue +208 -34
  34. package/components/oxy-file-list/types.ts +58 -2
  35. package/components/oxy-global-loading/oxy-global-loading.vue +53 -0
  36. package/components/oxy-global-message/oxy-global-message.vue +64 -0
  37. package/components/oxy-global-toast/oxy-global-toast.vue +53 -0
  38. package/components/oxy-img-lazy/index.scss +17 -0
  39. package/components/oxy-img-lazy/oxy-img-lazy.vue +332 -0
  40. package/components/oxy-img-lazy/types.ts +69 -0
  41. package/components/oxy-link/index.scss +57 -0
  42. package/components/oxy-link/oxy-link.vue +130 -0
  43. package/components/oxy-link/types.ts +81 -0
  44. package/components/oxy-list/index.scss +8 -1
  45. package/components/oxy-list/oxy-list.vue +121 -40
  46. package/components/oxy-list/types.ts +3 -15
  47. package/components/oxy-picker/oxy-picker.vue +3 -0
  48. package/components/oxy-picker/types.ts +5 -1
  49. package/components/oxy-radio/index.scss +3 -3
  50. package/components/oxy-radio/oxy-radio.vue +1 -1
  51. package/components/oxy-rich-text/icon/emjio.svg +1 -0
  52. package/components/oxy-rich-text/icon/quote.svg +1 -0
  53. package/components/oxy-rich-text/icon/text.svg +1 -0
  54. package/components/oxy-rich-text/icon/title.svg +1 -0
  55. package/components/oxy-rich-text/index.scss +159 -0
  56. package/components/oxy-rich-text/mp-html/card/card.vue +122 -0
  57. package/components/oxy-rich-text/mp-html/card/index.js +7 -0
  58. package/components/oxy-rich-text/mp-html/editable/config.js +15 -0
  59. package/components/oxy-rich-text/mp-html/editable/index.js +553 -0
  60. package/components/oxy-rich-text/mp-html/emoji/index.js +203 -0
  61. package/components/oxy-rich-text/mp-html/highlight/config.js +5 -0
  62. package/components/oxy-rich-text/mp-html/highlight/index.js +96 -0
  63. package/components/oxy-rich-text/mp-html/highlight/prism.css +1 -0
  64. package/components/oxy-rich-text/mp-html/highlight/prism.min.js +7 -0
  65. package/components/oxy-rich-text/mp-html/img-cache/index.js +138 -0
  66. package/components/oxy-rich-text/mp-html/latex/index.js +80 -0
  67. package/components/oxy-rich-text/mp-html/latex/katex.css +1 -0
  68. package/components/oxy-rich-text/mp-html/latex/katex.min.js +1 -0
  69. package/components/oxy-rich-text/mp-html/markdown/index.js +50 -0
  70. package/components/oxy-rich-text/mp-html/markdown/marked.min.js +71 -0
  71. package/components/oxy-rich-text/mp-html/mp-html.d.ts +184 -0
  72. package/components/oxy-rich-text/mp-html/mp-html.vue +675 -0
  73. package/components/oxy-rich-text/mp-html/node/node.vue +1161 -0
  74. package/components/oxy-rich-text/mp-html/parser.js +1428 -0
  75. package/components/oxy-rich-text/mp-html/search/index.js +132 -0
  76. package/components/oxy-rich-text/mp-html/style/index.js +129 -0
  77. package/components/oxy-rich-text/mp-html/style/parser.js +175 -0
  78. package/components/oxy-rich-text/mp-html/template/index.js +67 -0
  79. package/components/oxy-rich-text/mp-html/txv-video/index.js +46 -0
  80. package/components/oxy-rich-text/oxy-rich-text.vue +642 -0
  81. package/components/oxy-rich-text/types.ts +71 -0
  82. package/components/oxy-select/index.scss +255 -0
  83. package/components/oxy-select/oxy-select.vue +421 -0
  84. package/components/oxy-select/types.ts +71 -0
  85. package/components/oxy-select-picker/oxy-select-picker.vue +3 -0
  86. package/components/oxy-select-picker/types.ts +5 -1
  87. package/components/oxy-stream-render/index.scss +6 -0
  88. package/components/oxy-stream-render/oxy-stream-render.vue +204 -0
  89. package/components/oxy-stream-render/types.ts +5 -0
  90. package/components/oxy-tree/index.scss +43 -5
  91. package/components/oxy-tree/oxy-tree.vue +233 -35
  92. package/components/oxy-tree/types.ts +54 -7
  93. package/components/oxy-tree/utils.ts +51 -0
  94. package/components/oxy-virtual-scroll/index.scss +1 -1
  95. package/components/oxy-virtual-scroll/oxy-virtual-scroll.vue +69 -110
  96. package/components/oxy-virtual-scroll/types.ts +95 -5
  97. package/components/oxy-waterfall/index.scss +18 -0
  98. package/components/oxy-waterfall/oxy-waterfall.vue +218 -0
  99. package/components/oxy-waterfall/types.ts +90 -0
  100. package/components/oxy-waterfall-item/index.scss +8 -0
  101. package/components/oxy-waterfall-item/oxy-waterfall-item.vue +89 -0
  102. package/components/oxy-waterfall-item/types.ts +16 -0
  103. package/global.d.ts +7 -0
  104. package/index.ts +3 -0
  105. package/locale/lang/en-US.ts +35 -9
  106. package/locale/lang/zh-CN.ts +31 -5
  107. package/oxy-uni-ui.zip +0 -0
  108. package/package.json +1 -1
  109. package/tags.json +1 -1
  110. package/uni-echarts/changelog.md +2 -0
  111. package/uni-echarts/components/index.js +1 -0
  112. package/uni-echarts/components/uni-echarts/events.js +95 -0
  113. package/uni-echarts/components/uni-echarts/types.d.ts +183 -0
  114. package/uni-echarts/components/uni-echarts/types.js +1 -0
  115. package/uni-echarts/components/uni-echarts/uni-echarts.vue +530 -0
  116. package/uni-echarts/components/uni-echarts/uni-echarts.vue.d.ts +19 -0
  117. package/uni-echarts/global.d.ts +7 -0
  118. package/uni-echarts/index.d.ts +440 -0
  119. package/uni-echarts/index.js +2 -0
  120. package/uni-echarts/package.json +105 -0
  121. package/uni-echarts/shared-core.d.ts +269 -0
  122. package/uni-echarts/shared-core.js +900 -0
  123. 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 {};