• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Route jump.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * Route jump.
30 *
31 * @enum { number }
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @crossplatform
34 * @since 10
35 */
36/**
37 * Route jump.
38 *
39 * @enum { number }
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @atomicservice
43 * @since 11
44 * @deprecated since 13
45 */
46declare enum NavigationType {
47  /**
48   * Jump to the next page.
49   *
50   * @syscap SystemCapability.ArkUI.ArkUI.Full
51   * @since 7
52   */
53  /**
54   * Jump to the next page.
55   *
56   * @syscap SystemCapability.ArkUI.ArkUI.Full
57   * @crossplatform
58   * @since 10
59   */
60  /**
61   * Jump to the next page.
62   *
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @crossplatform
65   * @atomicservice
66   * @since 11
67   * @deprecated since 13
68   */
69  Push,
70
71  /**
72   * Return to the previous page.
73   *
74   * @syscap SystemCapability.ArkUI.ArkUI.Full
75   * @since 7
76   */
77  /**
78   * Return to the previous page.
79   *
80   * @syscap SystemCapability.ArkUI.ArkUI.Full
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * Return to the previous page.
86   *
87   * @syscap SystemCapability.ArkUI.ArkUI.Full
88   * @crossplatform
89   * @atomicservice
90   * @since 11
91   * @deprecated since 13
92   */
93  Back,
94
95  /**
96   * Replace page.
97   *
98   * @syscap SystemCapability.ArkUI.ArkUI.Full
99   * @since 7
100   */
101  /**
102   * Replace page.
103   *
104   * @syscap SystemCapability.ArkUI.ArkUI.Full
105   * @crossplatform
106   * @since 10
107   */
108  /**
109   * Replace page.
110   *
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @crossplatform
113   * @atomicservice
114   * @since 11
115   * @deprecated since 13
116   */
117  Replace,
118}
119
120/**
121 * Create route
122 *
123 * @interface NavigatorInterface
124 * @syscap SystemCapability.ArkUI.ArkUI.Full
125 * @since 7
126 */
127/**
128 * Create route
129 *
130 * @interface NavigatorInterface
131 * @syscap SystemCapability.ArkUI.ArkUI.Full
132 * @crossplatform
133 * @since 10
134 */
135/**
136 * Create route
137 *
138 * @interface NavigatorInterface
139 * @syscap SystemCapability.ArkUI.ArkUI.Full
140 * @crossplatform
141 * @atomicservice
142 * @since 11
143 * @deprecated since 13
144 */
145interface NavigatorInterface {
146  /**
147   * Called when the route jumps.
148   *
149   * @param { object } value
150   * @returns { NavigatorAttribute }
151   * @syscap SystemCapability.ArkUI.ArkUI.Full
152   * @since 7
153   */
154  /**
155   * Called when the route jumps.
156   *
157   * @param { object } value
158   * @returns { NavigatorAttribute }
159   * @syscap SystemCapability.ArkUI.ArkUI.Full
160   * @crossplatform
161   * @since 10
162   */
163  /**
164   * Called when the route jumps.
165   *
166   * @param { object } value
167   * @returns { NavigatorAttribute }
168   * @syscap SystemCapability.ArkUI.ArkUI.Full
169   * @crossplatform
170   * @atomicservice
171   * @since 11
172   * @deprecated since 13
173   */
174  (value?: { target: string; type?: NavigationType }): NavigatorAttribute;
175
176  /**
177   * Called when using the navigator.
178   *
179   * @returns { NavigatorAttribute }
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @since 7
182   */
183  /**
184   * Called when using the navigator.
185   *
186   * @returns { NavigatorAttribute }
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @crossplatform
189   * @since 10
190   */
191  /**
192   * Called when using the navigator.
193   *
194   * @returns { NavigatorAttribute }
195   * @syscap SystemCapability.ArkUI.ArkUI.Full
196   * @crossplatform
197   * @atomicservice
198   * @since 11
199   * @deprecated since 13
200   */
201  (): NavigatorAttribute;
202}
203
204/**
205 * Declare navigator properties.
206 *
207 * @extends CommonMethod<NavigatorAttribute>
208 * @syscap SystemCapability.ArkUI.ArkUI.Full
209 * @since 7
210 */
211/**
212 * Declare navigator properties.
213 *
214 * @extends CommonMethod<NavigatorAttribute>
215 * @syscap SystemCapability.ArkUI.ArkUI.Full
216 * @crossplatform
217 * @since 10
218 */
219/**
220 * Declare navigator properties.
221 *
222 * @extends CommonMethod<NavigatorAttribute>
223 * @syscap SystemCapability.ArkUI.ArkUI.Full
224 * @crossplatform
225 * @atomicservice
226 * @since 11
227 * @deprecated since 13
228 */
229declare class NavigatorAttribute extends CommonMethod<NavigatorAttribute> {
230  /**
231   * Called when determining whether the routing component is active.
232   *
233   * @param { boolean } value
234   * @returns { NavigatorAttribute }
235   * @syscap SystemCapability.ArkUI.ArkUI.Full
236   * @since 7
237   */
238  /**
239   * Called when determining whether the routing component is active.
240   *
241   * @param { boolean } value
242   * @returns { NavigatorAttribute }
243   * @syscap SystemCapability.ArkUI.ArkUI.Full
244   * @crossplatform
245   * @since 10
246   */
247  /**
248   * Called when determining whether the routing component is active.
249   *
250   * @param { boolean } value
251   * @returns { NavigatorAttribute }
252   * @syscap SystemCapability.ArkUI.ArkUI.Full
253   * @crossplatform
254   * @atomicservice
255   * @since 11
256   * @deprecated since 13
257   */
258  active(value: boolean): NavigatorAttribute;
259
260  /**
261   * Called when determining whether the routing component is active.
262   *
263   * @param { NavigationType } value
264   * @returns { NavigatorAttribute }
265   * @syscap SystemCapability.ArkUI.ArkUI.Full
266   * @since 7
267   */
268  /**
269   * Called when determining whether the routing component is active.
270   *
271   * @param { NavigationType } value
272   * @returns { NavigatorAttribute }
273   * @syscap SystemCapability.ArkUI.ArkUI.Full
274   * @crossplatform
275   * @since 10
276   */
277  /**
278   * Called when determining whether the routing component is active.
279   *
280   * @param { NavigationType } value
281   * @returns { NavigatorAttribute }
282   * @syscap SystemCapability.ArkUI.ArkUI.Full
283   * @crossplatform
284   * @atomicservice
285   * @since 11
286   * @deprecated since 13
287   */
288  type(value: NavigationType): NavigatorAttribute;
289
290  /**
291   * Called when the path to the specified jump target page is set.
292   *
293   * @param { string } value
294   * @returns { NavigatorAttribute }
295   * @syscap SystemCapability.ArkUI.ArkUI.Full
296   * @since 7
297   */
298  /**
299   * Called when the path to the specified jump target page is set.
300   *
301   * @param { string } value
302   * @returns { NavigatorAttribute }
303   * @syscap SystemCapability.ArkUI.ArkUI.Full
304   * @crossplatform
305   * @since 10
306   */
307  /**
308   * Called when the path to the specified jump target page is set.
309   *
310   * @param { string } value
311   * @returns { NavigatorAttribute }
312   * @syscap SystemCapability.ArkUI.ArkUI.Full
313   * @crossplatform
314   * @atomicservice
315   * @since 11
316   * @deprecated since 13
317   */
318  target(value: string): NavigatorAttribute;
319
320  /**
321   * Called when data is passed to the target page at the same time during jump.
322   *
323   * @param { object } value
324   * @returns { NavigatorAttribute }
325   * @syscap SystemCapability.ArkUI.ArkUI.Full
326   * @since 7
327   */
328  /**
329   * Called when data is passed to the target page at the same time during jump.
330   *
331   * @param { object } value
332   * @returns { NavigatorAttribute }
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @crossplatform
335   * @since 10
336   */
337  /**
338   * Called when data is passed to the target page at the same time during jump.
339   *
340   * @param { object } value
341   * @returns { NavigatorAttribute }
342   * @syscap SystemCapability.ArkUI.ArkUI.Full
343   * @crossplatform
344   * @atomicservice
345   * @since 11
346   * @deprecated since 13
347   */
348  params(value: object): NavigatorAttribute;
349}
350
351/**
352 * Defines Navigator Component.
353 *
354 * @syscap SystemCapability.ArkUI.ArkUI.Full
355 * @since 7
356 */
357/**
358 * Defines Navigator Component.
359 *
360 * @syscap SystemCapability.ArkUI.ArkUI.Full
361 * @crossplatform
362 * @since 10
363 */
364/**
365 * Defines Navigator Component.
366 *
367 * @syscap SystemCapability.ArkUI.ArkUI.Full
368 * @crossplatform
369 * @atomicservice
370 * @since 11
371 * @deprecated since 13
372 */
373declare const Navigator: NavigatorInterface;
374
375/**
376 * Defines Navigator Component instance.
377 *
378 * @syscap SystemCapability.ArkUI.ArkUI.Full
379 * @since 7
380 */
381/**
382 * Defines Navigator Component instance.
383 *
384 * @syscap SystemCapability.ArkUI.ArkUI.Full
385 * @crossplatform
386 * @since 10
387 */
388/**
389 * Defines Navigator Component instance.
390 *
391 * @syscap SystemCapability.ArkUI.ArkUI.Full
392 * @crossplatform
393 * @atomicservice
394 * @since 11
395 * @deprecated since 13
396 */
397declare const NavigatorInstance: NavigatorAttribute;
398