• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-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 * Indicates the information of the route page.
23 *
24 * @interface RouteInfo
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @since 10
28 */
29/**
30 * Indicates the information of the route page.
31 *
32 * @interface RouteInfo
33 * @syscap SystemCapability.ArkUI.ArkUI.Full
34 * @crossplatform
35 * @atomicservice
36 * @since 11
37 * @deprecated since 13
38 */
39declare interface RouteInfo {
40  /**
41   * The name of the route page.
42   *
43   * @type { string }
44   * @syscap SystemCapability.ArkUI.ArkUI.Full
45   * @crossplatform
46   * @since 10
47   */
48  /**
49   * The name of the route page.
50   *
51   * @type { string }
52   * @syscap SystemCapability.ArkUI.ArkUI.Full
53   * @crossplatform
54   * @atomicservice
55   * @since 11
56   * @deprecated since 13
57   */
58  name: string;
59
60  /**
61   * The detailed parameter of the route page.
62   *
63   * @type { ?unknown }
64   * @syscap SystemCapability.ArkUI.ArkUI.Full
65   * @crossplatform
66   * @since 10
67   */
68  /**
69   * The detailed parameter of the route page.
70   *
71   * @type { ?unknown }
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @crossplatform
74   * @atomicservice
75   * @since 11
76   * @deprecated since 13
77   */
78  param?: unknown;
79}
80
81/**
82 * The construct function of NavRouter.
83 *
84 * @interface NavRouterInterface
85 * @syscap SystemCapability.ArkUI.ArkUI.Full
86 * @since 9
87 */
88/**
89 * The construct function of NavRouter.
90 *
91 * @interface NavRouterInterface
92 * @syscap SystemCapability.ArkUI.ArkUI.Full
93 * @crossplatform
94 * @since 10
95 */
96/**
97 * The construct function of NavRouter.
98 *
99 * @interface NavRouterInterface
100 * @syscap SystemCapability.ArkUI.ArkUI.Full
101 * @crossplatform
102 * @atomicservice
103 * @since 11
104 * @deprecated since 13
105 */
106declare interface NavRouterInterface {
107  /**
108   * Constructor.
109   *
110   * @returns { NavRouterAttribute }
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @since 9
113   */
114  /**
115   * Constructor.
116   *
117   * @returns { NavRouterAttribute }
118   * @syscap SystemCapability.ArkUI.ArkUI.Full
119   * @crossplatform
120   * @since 10
121   */
122  /**
123   * Constructor.
124   *
125   * @returns { NavRouterAttribute }
126   * @syscap SystemCapability.ArkUI.ArkUI.Full
127   * @crossplatform
128   * @atomicservice
129   * @since 11
130   * @deprecated since 13
131   */
132  (): NavRouterAttribute;
133
134  /**
135   * NavDestination Constructor.
136   *
137   * @param { RouteInfo } value - Indicates the information of route page.
138   * @returns { NavRouterAttribute }
139   * @syscap SystemCapability.ArkUI.ArkUI.Full
140   * @crossplatform
141   * @since 10
142   */
143  /**
144   * NavDestination Constructor.
145   *
146   * @param { RouteInfo } value - Indicates the information of route page.
147   * @returns { NavRouterAttribute }
148   * @syscap SystemCapability.ArkUI.ArkUI.Full
149   * @crossplatform
150   * @atomicservice
151   * @since 11
152   * @deprecated since 13
153   */
154  (value: RouteInfo): NavRouterAttribute;
155}
156
157/**
158 * Define the route mode.
159 *
160 * @enum { number }
161 * @syscap SystemCapability.ArkUI.ArkUI.Full
162 * @crossplatform
163 * @since 10
164 */
165/**
166 * Define the route mode.
167 *
168 * @enum { number }
169 * @syscap SystemCapability.ArkUI.ArkUI.Full
170 * @crossplatform
171 * @atomicservice
172 * @since 11
173 * @deprecated since 13
174 */
175declare enum NavRouteMode {
176  /**
177   * Create a new page to replace the current. The old page is destroyed but kept in the stack for recreating.
178   *
179   * @syscap SystemCapability.ArkUI.ArkUI.Full
180   * @crossplatform
181   * @since 10
182   */
183  /**
184   * Create a new page to replace the current. The old page is destroyed but kept in the stack for recreating.
185   *
186   * @syscap SystemCapability.ArkUI.ArkUI.Full
187   * @crossplatform
188   * @atomicservice
189   * @since 11
190   * @deprecated since 13
191   */
192  PUSH_WITH_RECREATE,
193
194  /**
195   * Create a new page to cover the current. The old page is remained and kept in the stack.
196   *
197   * @syscap SystemCapability.ArkUI.ArkUI.Full
198   * @crossplatform
199   * @since 10
200   */
201  /**
202   * Create a new page to cover the current. The old page is remained and kept in the stack.
203   *
204   * @syscap SystemCapability.ArkUI.ArkUI.Full
205   * @crossplatform
206   * @atomicservice
207   * @since 11
208   * @deprecated since 13
209   */
210  PUSH,
211
212  /**
213   * Create a new page to replace the current. The old page is destroyed and removed out of the stack.
214   *
215   * @syscap SystemCapability.ArkUI.ArkUI.Full
216   * @crossplatform
217   * @since 10
218   */
219  /**
220   * Create a new page to replace the current. The old page is destroyed and removed out of the stack.
221   *
222   * @syscap SystemCapability.ArkUI.ArkUI.Full
223   * @crossplatform
224   * @atomicservice
225   * @since 11
226   * @deprecated since 13
227   */
228  REPLACE
229}
230
231/**
232 * The attribute function of NavRouter
233 *
234 * @extends CommonMethod<NavRouterAttribute>
235 * @syscap SystemCapability.ArkUI.ArkUI.Full
236 * @since 9
237 */
238/**
239 * The attribute function of NavRouter
240 *
241 * @extends CommonMethod<NavRouterAttribute>
242 * @syscap SystemCapability.ArkUI.ArkUI.Full
243 * @crossplatform
244 * @since 10
245 */
246/**
247 * The attribute function of NavRouter
248 *
249 * @extends CommonMethod<NavRouterAttribute>
250 * @syscap SystemCapability.ArkUI.ArkUI.Full
251 * @crossplatform
252 * @atomicservice
253 * @since 11
254 * @deprecated since 13
255 */
256declare class NavRouterAttribute extends CommonMethod<NavRouterAttribute> {
257  /**
258   * Trigger callback when NavigationView state change.
259   *
260   * @param { function } callback
261   * @returns { NavRouterAttribute }
262   * @syscap SystemCapability.ArkUI.ArkUI.Full
263   * @since 9
264   */
265  /**
266   * Trigger callback when NavigationView state change.
267   *
268   * @param { function } callback
269   * @returns { NavRouterAttribute }
270   * @syscap SystemCapability.ArkUI.ArkUI.Full
271   * @crossplatform
272   * @since 10
273   */
274  /**
275   * Trigger callback when NavigationView state change.
276   *
277   * @param { function } callback
278   * @returns { NavRouterAttribute }
279   * @syscap SystemCapability.ArkUI.ArkUI.Full
280   * @crossplatform
281   * @atomicservice
282   * @since 11
283   * @deprecated since 13
284   */
285  onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
286
287  /**
288   * Define the route mode.
289   *
290   * @param { NavRouteMode } mode - The route mode of the NavRouter.
291   * @returns { NavRouterAttribute } Returns the instance of the NavRouterAttribute.
292   * @syscap SystemCapability.ArkUI.ArkUI.Full
293   * @crossplatform
294   * @since 10
295   */
296  /**
297   * Define the route mode.
298   *
299   * @param { NavRouteMode } mode - The route mode of the NavRouter.
300   * @returns { NavRouterAttribute } Returns the instance of the NavRouterAttribute.
301   * @syscap SystemCapability.ArkUI.ArkUI.Full
302   * @crossplatform
303   * @atomicservice
304   * @since 11
305   * @deprecated since 13
306   */
307  mode(mode: NavRouteMode): NavRouterAttribute;
308}
309
310/**
311 * Defines NavRouter Component.
312 *
313 * @syscap SystemCapability.ArkUI.ArkUI.Full
314 * @since 9
315 */
316/**
317 * Defines NavRouter Component.
318 *
319 * @syscap SystemCapability.ArkUI.ArkUI.Full
320 * @crossplatform
321 * @since 10
322 */
323/**
324 * Defines NavRouter Component.
325 *
326 * @syscap SystemCapability.ArkUI.ArkUI.Full
327 * @crossplatform
328 * @atomicservice
329 * @since 11
330 * @deprecated since 13
331 */
332declare const NavRouter: NavRouterInterface;
333
334/**
335 * Defines NavRouter Component instance.
336 *
337 * @syscap SystemCapability.ArkUI.ArkUI.Full
338 * @since 9
339 */
340/**
341 * Defines NavRouter Component instance.
342 *
343 * @syscap SystemCapability.ArkUI.ArkUI.Full
344 * @crossplatform
345 * @since 10
346 */
347/**
348 * Defines NavRouter Component instance.
349 *
350 * @syscap SystemCapability.ArkUI.ArkUI.Full
351 * @crossplatform
352 * @atomicservice
353 * @since 11
354 * @deprecated since 13
355 */
356declare const NavRouterInstance: NavRouterAttribute;
357