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