1/** 2 * Copyright (c) 2021-2022 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 16import GridLayoutItemBuilder from './GridLayoutItemBuilder'; 17 18/** 19 * Item info of GridLayoutInfo item. 20 */ 21export default class GridLayoutItemInfo { 22 /** 23 * GridLayoutItemInfo: id 24 */ 25 readonly id: number | undefined; 26 27 /** 28 * GridLayoutItemInfo: cardId 29 */ 30 cardId: number | undefined; 31 32 /** 33 * GridLayoutItemInfo: ID of the bigfolder. 34 */ 35 folderId: string | undefined; 36 37 /** 38 * GridLayoutItemInfo: bigfolder id 39 * Not in bigfolder: - 100 40 * In a bigfolder: ID of the bigfolder. 41 */ 42 container: number | undefined; 43 44 /** 45 * GridLayoutItemInfo: bigfolder Name 46 */ 47 folderName: string | undefined; 48 49 /** 50 * GridLayoutItemInfo: badgeNumber 51 */ 52 badgeNumber: number | undefined; 53 54 /** 55 * GridLayoutItemInfo: type 0:app 1:card 3:bigfolder 56 */ 57 typeId: number | undefined; 58 59 /** 60 * GridLayoutItemInfo: area 61 */ 62 area: number[] | undefined; 63 64 /** 65 * GridLayoutItemInfo: page 66 */ 67 page: number | undefined; 68 69 /** 70 * GridLayoutItemInfo: column of positions 71 */ 72 column: number | undefined; 73 74 /** 75 * GridLayoutItemInfo: row of positions 76 */ 77 row: number | undefined; 78 79 /** 80 * Indicates bundleName. 81 */ 82 bundleName: string | undefined; 83 84 /** 85 * Indicates abilityName. 86 */ 87 abilityName: string | undefined; 88 89 moduleName: string | undefined; 90 91 /** 92 * Indicates keyName. 93 */ 94 keyName: string | undefined; 95 96 /** 97 * GridLayoutItemInfo: bigFolder apps info 98 */ 99 layoutInfo: any | undefined; 100 101 /** 102 * GridLayoutItemInfo: extend1 103 */ 104 extend1: string | undefined; 105 106 /** 107 * GridLayoutItemInfo: extend2 108 */ 109 extend2: string | undefined; 110 111 /** 112 * GridLayoutItemInfo: extend3 113 */ 114 extend3: number | undefined; 115 116 constructor(gridLayoutItemBuilder: GridLayoutItemBuilder) { 117 this.id = gridLayoutItemBuilder.id; 118 this.cardId = gridLayoutItemBuilder.cardId; 119 this.folderId = gridLayoutItemBuilder.folderId; 120 this.container = gridLayoutItemBuilder.container; 121 this.folderName = gridLayoutItemBuilder.folderName; 122 this.badgeNumber = gridLayoutItemBuilder.badgeNumber; 123 this.typeId = gridLayoutItemBuilder.typeId; 124 this.area = gridLayoutItemBuilder.area; 125 this.page = gridLayoutItemBuilder.page; 126 this.column = gridLayoutItemBuilder.column; 127 this.row = gridLayoutItemBuilder.row; 128 this.bundleName = gridLayoutItemBuilder.bundleName; 129 this.abilityName = gridLayoutItemBuilder.abilityName; 130 this.moduleName = gridLayoutItemBuilder.moduleName; 131 this.keyName = gridLayoutItemBuilder.keyName; 132 this.layoutInfo = [gridLayoutItemBuilder.layoutInfo]; 133 this.extend1 = gridLayoutItemBuilder.extend1; 134 this.extend2 = gridLayoutItemBuilder.extend2; 135 this.extend3 = gridLayoutItemBuilder.extend3; 136 } 137} 138