1/*
2 * Copyright (c) 2023-2024 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 AbilityKit
19 */
20
21import type { AutoFillType } from './AutoFillType';
22import type AutoFillRect from './AutoFillRect';
23
24/**
25 * Page node info for automatic filling.
26 *
27 * @interface PageNodeInfo
28 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
29 * @systemapi
30 * @stagemodelonly
31 * @since 11
32 */
33export default interface PageNodeInfo {
34  /**
35   * The id of page node.
36   *
37   * @type { number }
38   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
39   * @systemapi
40   * @stagemodelonly
41   * @since 11
42   */
43  id: number;
44
45  /**
46   * The depth of page node.
47   *
48   * @type { number }
49   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
50   * @systemapi
51   * @stagemodelonly
52   * @since 11
53   */
54  depth: number;
55
56  /**
57   * The auto fill type of page node.
58   *
59   * @type { AutoFillType }
60   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
61   * @systemapi
62   * @stagemodelonly
63   * @since 11
64   */
65  autoFillType: AutoFillType;
66
67  /**
68   * The tag of page node.
69   *
70   * @type { string }
71   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
72   * @systemapi
73   * @stagemodelonly
74   * @since 11
75   */
76  tag: string;
77
78  /**
79   * The value of page node.
80   *
81   * @type { string }
82   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
83   * @systemapi
84   * @stagemodelonly
85   * @since 11
86   */
87  value: string;
88
89  /**
90   * The placeholder of page node.
91   *
92   * @type { ?string }
93   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
94   * @systemapi
95   * @stagemodelonly
96   * @since 11
97   */
98  placeholder?: string;
99
100  /**
101   * The password rules of page node.
102   *
103   * @type { ?string }
104   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
105   * @systemapi
106   * @stagemodelonly
107   * @since 11
108   */
109  passwordRules?: string;
110
111  /**
112   * The auto fill flag of page node.
113   *
114   * @type { boolean }
115   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
116   * @systemapi
117   * @stagemodelonly
118   * @since 11
119   */
120  enableAutoFill: boolean;
121
122  /**
123   * The rect of page node.
124   *
125   * @type { AutoFillRect }
126   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
127   * @systemapi
128   * @stagemodelonly
129   * @since 12
130   */
131  rect: AutoFillRect;
132
133  /**
134   * Is the page node in the focus.
135   *
136   * @type { boolean }
137   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
138   * @systemapi
139   * @stagemodelonly
140   * @since 12
141   */
142  isFocus: boolean;
143
144  /**
145   * The metadata of a node.
146   *
147   * @type { ?string }
148   * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
149   * @systemapi
150   * @stagemodelonly
151   * @since 12
152   */
153  metadata?: string;
154}