@dcloudio/uni-app-x 0.5.5 → 0.5.7

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 (67) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +17 -8
  3. package/types/native/AsyncApiResult.d.ts +1 -1
  4. package/types/native/CSSStyleDeclaration.d.ts +2 -2
  5. package/types/native/DrawableContext.d.ts +2 -2
  6. package/types/native/Element.d.ts +58 -27
  7. package/types/native/IDocument.d.ts +2 -3
  8. package/types/native/IPage.d.ts +1 -1
  9. package/types/native/IUniError.d.ts +1 -1
  10. package/types/native/NodeData.d.ts +1 -1
  11. package/types/native/SnapshotOptions.d.ts +63 -0
  12. package/types/native/UTSAndroidHookProxy.d.ts +14 -0
  13. package/types/native/UniAppManager.d.ts +1 -1
  14. package/types/native/UniElement.d.ts +140 -0
  15. package/types/native/UniTabsElement.d.ts +89 -0
  16. package/types/native/UniTextElement.d.ts +22 -0
  17. package/types/native/UniVideoElement.d.ts +70 -0
  18. package/types/native/{IWebViewNode.d.ts → UniWebViewElement.d.ts} +5 -2
  19. package/types/native/WebViewDownloadEvent.d.ts +37 -0
  20. package/types/native/WebViewErrorEvent.d.ts +26 -7
  21. package/types/native/WebViewLoadedEvent.d.ts +15 -2
  22. package/types/native/WebViewLoadingEvent.d.ts +15 -2
  23. package/types/native/WebViewMessageEvent.d.ts +15 -7
  24. package/types/native/WebViewStyles.d.ts +20 -0
  25. package/types/native/index.d.ts +9 -3
  26. package/types/shims-vue.d.ts +4 -2
  27. package/types/uni/core/index.d.ts +1 -0
  28. package/types/uni/core/lib/base/event/interface.d.ts +3 -6
  29. package/types/uni/core/lib/base/interceptor/index.d.ts +11 -0
  30. package/types/uni/core/lib/base/interceptor/interface.d.ts +15 -0
  31. package/types/uni/core/lib/interface.d.ts +8 -0
  32. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +3 -2
  33. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +4 -0
  34. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +10 -1
  35. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +4 -8
  36. package/types/uni/uts-plugin-api/index.d.ts +1 -2
  37. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +2 -2
  38. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +86 -86
  39. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +103 -103
  40. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +52 -52
  41. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +4 -4
  42. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +82 -82
  43. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
  44. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +10 -10
  45. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +59 -56
  46. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +116 -97
  47. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +4 -4
  48. package/types/uni/uts-plugin-api/lib/uni-push/utssdk/index.d.ts +55 -0
  49. package/types/uni/uts-plugin-api/lib/uni-push/utssdk/interface.d.ts +338 -0
  50. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +39 -39
  51. package/types/uni-cloud/interface.d.ts +10 -10
  52. package/types/vue/CheckboxGroupChangeEvent.d.ts +13 -0
  53. package/types/vue/PickerViewChangeEvent.d.ts +13 -0
  54. package/types/vue/ProgressActiveendEvent.d.ts +7 -0
  55. package/types/vue/RadioGroupChangeEvent.d.ts +13 -0
  56. package/types/vue/SliderChangeEvent.d.ts +2 -2
  57. package/types/vue/SwitchChangeEvent.d.ts +7 -0
  58. package/types/vue/UniButtonElement.d.ts +7 -0
  59. package/types/vue/UniCloudDBElement.d.ts +213 -0
  60. package/types/vue/UniNavigatorElement.d.ts +7 -0
  61. package/types/vue/index.d.ts +3 -0
  62. package/types/native/DomNode.d.ts +0 -48
  63. package/types/native/ITabsNode.d.ts +0 -36
  64. package/types/uni/uts-plugin-api/lib/uni-audio/utssdk/index.d.ts +0 -17
  65. package/types/uni/uts-plugin-api/lib/uni-audio/utssdk/interface.d.ts +0 -804
  66. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -15
  67. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../native/CustomEvent.d.ts" />
2
- /// <reference path="../native/DomNode.d.ts" />
2
+ /// <reference path="../native/UniElement.d.ts" />
3
3
 
4
4
  /**
5
5
  * @package io.dcloud.uniapp.framework
@@ -19,7 +19,7 @@ declare class SliderChangeEvent extends CustomEvent<SliderChangeEventDetail> {
19
19
  /**
20
20
  * @package io.dcloud.uniapp.framework
21
21
  */
22
- declare class SliderElement extends DomNode {
22
+ interface UniSliderElement extends UniElement {
23
23
  get value(): number
24
24
  set value(value: number)
25
25
  }
@@ -1,4 +1,5 @@
1
1
  /// <reference path="../native/CustomEvent.d.ts" />
2
+ /// <reference path="../native/UniElement.d.ts" />
2
3
 
3
4
  /**
4
5
  * @package io.dcloud.uniapp.framework
@@ -14,3 +15,9 @@ declare class SwitchChangeEventDetail {
14
15
  declare class SwitchChangeEvent extends CustomEvent<SwitchChangeEventDetail> {
15
16
  constructor (value: boolean)
16
17
  }
18
+
19
+ /**
20
+ * @package io.dcloud.uniapp.framework
21
+ */
22
+ interface UniSwitchElement extends UniElement {
23
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference path="../native/UniElement.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ interface UniButtonElement extends UniElement {
7
+ }
@@ -0,0 +1,213 @@
1
+ /// <reference path="../native/UniElement.d.ts" />
2
+
3
+ type SuccessCallback<T> = (res : T | null) => void | null
4
+ type FailCallback = (err : any | null) => void | null
5
+ type CompleteCallback = () => void | null
6
+
7
+ type GetSuccessCallback = SuccessCallback<UniCloudDBGetResult>
8
+ type AddSuccessCallback = SuccessCallback<UniCloudDBAddResult>
9
+ type RemoveSuccessCallback = SuccessCallback<UniCloudDBRemoveResult>
10
+ type UpdateSuccessCallback = SuccessCallback<UniCloudDBUpdateResult>
11
+
12
+ export type UniCloudDBComponentPaginationType = {
13
+ /**
14
+ * 当前页
15
+ */
16
+ current : number,
17
+ /**
18
+ * 每页数据量大小
19
+ */
20
+ size : number,
21
+ /**
22
+ * 数据库的总数据量,设置 :getcount="true" 时有效
23
+ */
24
+ count : number
25
+ }
26
+
27
+ export type UniCloudDBComponentLoadDataOptions = {
28
+ /**
29
+ * 是否清空数据
30
+ * @defaultValue false
31
+ */
32
+ clear ?: boolean | null,
33
+ /**
34
+ * 当前第几页
35
+ */
36
+ current ?: number | null,
37
+ /**
38
+ * 成功回调
39
+ */
40
+ success ?: GetSuccessCallback,
41
+ /**
42
+ * 失败回调
43
+ */
44
+ fail ?: FailCallback,
45
+ /**
46
+ * 完成回调
47
+ */
48
+ complete ?: CompleteCallback,
49
+ }
50
+
51
+ export type UniCloudDBComponentAddOptions = {
52
+ /**
53
+ * 是否显示 Toast
54
+ * @defaultValue true
55
+ */
56
+ showToast ?: boolean | null,
57
+ /**
58
+ * Toast 标题
59
+ */
60
+ toastTitle ?: string | null,
61
+ /**
62
+ * 是否需要 Loading
63
+ * @defaultValue true
64
+ */
65
+ needLoading ?: boolean | null,
66
+ /**
67
+ * Loading 标题
68
+ */
69
+ loadingTitle ?: string | null,
70
+ /**
71
+ * 成功回调
72
+ */
73
+ success ?: AddSuccessCallback,
74
+ /**
75
+ * 失败回调
76
+ */
77
+ fail ?: FailCallback,
78
+ /**
79
+ * 完成回调
80
+ */
81
+ complete ?: CompleteCallback,
82
+ }
83
+
84
+ export type UniCloudDBComponentRemoveOptions = {
85
+ /**
86
+ * 确认框标题
87
+ */
88
+ confirmTitle ?: string | null,
89
+ /**
90
+ * 确认框内容
91
+ */
92
+ confirmContent ?: string | null,
93
+ /**
94
+ * 是否显示删除确认框
95
+ * @defaultValue true
96
+ */
97
+ needConfirm ?: boolean | null,
98
+ /**
99
+ * 是否需要 Loading
100
+ * @defaultValue true
101
+ */
102
+ needLoading ?: boolean | null,
103
+ /**
104
+ * Loading 标题
105
+ */
106
+ loadingTitle ?: string | null,
107
+ /**
108
+ * 成功回调
109
+ */
110
+ success ?: RemoveSuccessCallback,
111
+ /**
112
+ * 失败回调
113
+ */
114
+ fail ?: FailCallback,
115
+ /**
116
+ * 完成回调
117
+ */
118
+ complete ?: CompleteCallback,
119
+ }
120
+
121
+ export type UniCloudDBComponentUpdateOptions = {
122
+ /**
123
+ * 是否显示更新后 Toast
124
+ * @defaultValue true
125
+ */
126
+ showToast ?: boolean | null,
127
+ /**
128
+ * 更新成功后 Toast 标题
129
+ * @defaultValue ""
130
+ */
131
+ toastTitle ?: string | null,
132
+ /**
133
+ * 确认框标题
134
+ */
135
+ confirmTitle ?: string | null,
136
+ /**
137
+ * 确认框内容
138
+ */
139
+ confirmContent ?: string | null,
140
+ /**
141
+ * 是否显示更新确认框
142
+ * @defaultValue true
143
+ */
144
+ needConfirm ?: boolean | null,
145
+ /**
146
+ * 是否需要 Loading
147
+ * @defaultValue true
148
+ */
149
+ needLoading ?: boolean | null,
150
+ /**
151
+ * Loading 标题
152
+ */
153
+ loadingTitle ?: string | null,
154
+ /**
155
+ * 成功回调
156
+ */
157
+ success ?: UpdateSuccessCallback,
158
+ /**
159
+ * 失败回调
160
+ */
161
+ fail ?: FailCallback,
162
+ /**
163
+ * 完成回调
164
+ */
165
+ complete ?: CompleteCallback,
166
+ }
167
+
168
+ /**
169
+ * @package io.dcloud.uniapp.framework
170
+ */
171
+ declare interface UniCloudDBElement extends UniElement {
172
+
173
+ /**
174
+ * 已加载的数据
175
+ */
176
+ dataList : Array<UTSJSONObject>
177
+
178
+ /**
179
+ * 加载数据
180
+ * 当 <unicloud-db> 组件的 manual 属性设为 true 或者 loadtime 属性设置为 manual 时,不会在页面初始化时联网查询数据,此时需要通过本方法在需要的时候手动加载数据。
181
+ * @param {UniCloudDBComponentLoadDataOptions} options 可选参数
182
+ */
183
+ loadData(options : UTSJSONObject = {}) : void
184
+
185
+ /**
186
+ * 加载更多数据
187
+ * 在列表的加载下一页场景下,使用ref方式访问组件方法,加载更多数据,每加载成功一次,当前页 +1
188
+ */
189
+ loadMore() : void
190
+
191
+ /**
192
+ * 新增数据
193
+ * @param value 新增数据.
194
+ * @param {UniCloudDBComponentAddOptions} options 可选参数
195
+ */
196
+ add(value : UTSJSONObject, options ?: UTSJSONObject | null) : void
197
+
198
+ /**
199
+ * 移除数据
200
+ * @param id 传入数据库的 _id 或 _id 数组.
201
+ * @param {UniCloudDBComponentRemoveOptions} options 可选参数
202
+ */
203
+ remove(id : any, options ?: UTSJSONObject | null) : void
204
+
205
+ /**
206
+ * 更新数据
207
+ * @param id 数据库字段的唯一标识.
208
+ * @param value 需要修改的新数据.
209
+ * @param {UniCloudDBComponentUpdateOptions} options 可选参数
210
+ */
211
+ update(id : string, value : UTSJSONObject, options ?: UTSJSONObject | null) : void
212
+
213
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference path="../native/UniElement.d.ts" />
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.framework
5
+ */
6
+ interface UniNavigatorElement extends UniElement {
7
+ }
@@ -4,3 +4,6 @@
4
4
  /// <reference path='./RadioGroupChangeEvent.d.ts' />
5
5
  /// <reference path='./SliderChangeEvent.d.ts' />
6
6
  /// <reference path='./SwitchChangeEvent.d.ts' />
7
+ /// <reference path='./UniButtonElement.d.ts' />
8
+ /// <reference path='./UniNavigatorElement.d.ts' />
9
+ /// <reference path='./UniCloudDBElement.d.ts' />
@@ -1,48 +0,0 @@
1
- /// <reference path="./Element.d.ts" />
2
-
3
- /**
4
- * @package io.dcloud.uniapp.runtime
5
- */
6
- declare class DomNode implements Element {
7
- firstChild: Element | null
8
- lastChild: Element | null
9
- parentNode: Element | null
10
- parentElement: Element | null
11
- previousSibling: Element | null
12
- nextSibling: Element | null
13
- nextElementSibling: Element | null
14
- children: Element[]
15
- tagName: string
16
- nodeName: string
17
- ext: Map<string, any>
18
- dataset: Map<string, any | null>
19
- attributes: Map<string, any | null>
20
- style: CSSStyleDeclaration
21
- scrollWidth: number
22
- scrollHeight: number
23
- scrollLeft: number
24
- scrollTop: number
25
- offsetLeft: number
26
- offsetTop: number
27
- offsetWidth: number
28
- offsetHeight: number
29
- getNodeId(): string
30
- appendChild(aChild: Element): void
31
- insertBefore(newChild: Element, refChild: Element): void
32
- setAttribute(key: string, value: any | null): void
33
- getAttribute(key: string): any | null
34
- hasAttribute(key: string): boolean
35
- removeAttribute(key: string): void
36
- updateStyle(map: Map<string, any>): void
37
- getBoundingClientRect(): DOMRect
38
- getDrawableContext(): DrawableContext | null
39
- addEventListener<T extends Event, R>(type: string, callback: (event: T) => R): void
40
- removeEventListener(type: string): void
41
- removeChild(aChild: Element): Element
42
- remove(): void
43
- dispatchEvent(type: string, value: Event): void
44
- scrollTo(x: number, y: number): void
45
- scrollBy(x: number, y: number): void
46
- focus(): void
47
- blur(): void
48
- }
@@ -1,36 +0,0 @@
1
- /// <reference path='./Element.d.ts' />
2
-
3
- /**
4
- * @package io.dcloud.uniapp.runtime
5
- * @autodoc false
6
- */
7
- interface ITabsNode extends Element {
8
- appendItem(pageId: string): void
9
-
10
- appendItem(itemNode: Element): void
11
-
12
- initTabBar(style: Map<string, any | null>): void
13
-
14
- appendCustomTabBar(tabBar: Element, direction: string): void
15
-
16
- switchSelect(pageId: string, index: Int): void
17
-
18
- hideTabBar(op: Map<string, any | null>): void
19
-
20
- showTabBar(op: Map<string, any | null>): void
21
-
22
- setTabBarBadge(op: Map<string, any | null>): void
23
-
24
- removeTabBarBadge(op: Map<string, any | null>): void
25
-
26
- showTabBarRedDot(op: Map<string, any | null>): void
27
-
28
- hideTabBarRedDot(op: Map<string, any | null>): void
29
-
30
- setTabBarStyle(op: Map<string, any | null>): void
31
-
32
- setTabBarItem(op: Map<string, any | null>): void
33
-
34
- isTabBarVisible: boolean
35
- currentItemId: string | null
36
- }
@@ -1,17 +0,0 @@
1
- import {
2
- EventCallback as EventCallbackOrigin,
3
- InnerAudioContext as InnerAudioContextOrigin,
4
- BackgroundAudioManager as BackgroundAudioManagerOrigin,
5
- CreateInnerAudioContext as CreateInnerAudioContextOrigin,
6
- GetBackgroundAudioManager as GetBackgroundAudioManagerOrigin,
7
- Uni as UniOrigin
8
- } from './interface'
9
-
10
- declare global {
11
- type EventCallback = EventCallbackOrigin
12
- type InnerAudioContext = InnerAudioContextOrigin
13
- type BackgroundAudioManager = BackgroundAudioManagerOrigin
14
- type CreateInnerAudioContext = CreateInnerAudioContextOrigin
15
- type GetBackgroundAudioManager = GetBackgroundAudioManagerOrigin
16
- interface Uni extends UniOrigin { }
17
- }