diff --git a/.gitignore b/.gitignore index d2e142997f7bf1418da3d3677d2688398be1b216..fd58715a10be52e996476d92986e2588d7e1bfe6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /.idea **/build /signature +/.hvigor +/package.json \ No newline at end of file diff --git a/README_zh.md b/README_zh.md index fb11933925690f798af38758bdc7472c26af5edc..b4acd1ab7046378130edf9f1da8c6b2218e66adc 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,12 +1,10 @@ # 备忘录部件 -## 简介 -备忘录应用是OpenHarmony中预置的应用,为用户提供文本编辑以及保存功能。 -**架构图** +## 1. 项目介绍 -![](./figures/note.png) +备忘录应用是OpenHarmony中预置的应用,为用户提供文本编辑以及保存功能。 -## 目录 +## 2. 目录结构 ``` /applications/standard/note ├─common @@ -47,10 +45,20 @@ └─resources # 资源文件 ``` +### 整体架构 + +![](./figures/note.png) + +## 3. 签名打包 -## 编译构建/使用方法 ### 签名 + +#### 签名文件的获取 + +1.生成签名文件可参考https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/hapsigntool-overview.md + #### 签名文件的配置 + 打开项目工程,选择 File → Project Structure ![](./figures/signature_1.png) @@ -74,6 +82,7 @@ ![](./figures/ds_ohosbuild_output_dir_release.png) +## 4. 安装、调试 ### 应用安装 @@ -81,9 +90,6 @@ ![](./figures/install.png) - - - ### 应用调试 #### log打印 diff --git a/build-profile.json5 b/build-profile.json5 index df83ecda61a470cbdd7c375c4b53851fff9549f4..bd770d8f5d3c3bf743dacd32cc71bd4e5f31af76 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -13,32 +13,24 @@ * limitations under the License. */ + { "app": { "compileSdkVersion": 9, - "compatibleSdkVersion": 9, + "compatibleSdkVersion": 8, "products": [ { "name": "default", + "signingConfig": "default" } + ], + "signingConfigs": [ ] }, "modules": [ { - "name": "phone", - "srcPath": "./product/phone", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default" - ] - } - ] - }, - { - "name": "tablet", - "srcPath": "./product/tablet", + "name": "default", + "srcPath": "./product/default", "targets": [ { "name": "default", @@ -52,13 +44,13 @@ "name": "utils", "srcPath": "./common/utils" }, - { - "name": "component", - "srcPath": "./common/component" - }, { "name": "resources", "srcPath": "./common/resources" + }, + { + "name": "component", + "srcPath": "./features", } ] } \ No newline at end of file diff --git a/common/component/build-profile.json5 b/common/component/build-profile.json5 deleted file mode 100644 index c6e5a1e1e89828b7270b37199c2d96374a5352a0..0000000000000000000000000000000000000000 --- a/common/component/build-profile.json5 +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -{ - "apiType": "stageMode", - "buildOption": { - } -} diff --git a/common/component/index.ets b/common/component/index.ets deleted file mode 100644 index 1c1e0b7a4da061017439219aed4855fdf139a27b..0000000000000000000000000000000000000000 --- a/common/component/index.ets +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * from './src/main/ets/components/CusDialogComp'; -export * from './src/main/ets/components/FolderListComp'; -export * from './src/main/ets/components/NoteContent'; -export { ToolBarComp, NoteContentComp, NoteContentOverViewComp } from './src/main/ets/components/NoteContentComp'; -export { NoteContentCompPortrait } from './src/main/ets/components/NoteContentCompPortrait'; -export * from './src/main/ets/components/NoteListComp'; \ No newline at end of file diff --git a/common/component/package.json b/common/component/package.json deleted file mode 100644 index a378052748d020f6537c00c3fa55b4c609386955..0000000000000000000000000000000000000000 --- a/common/component/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "license":"ISC", - "types":"", - "devDependencies":{}, - "name":"@ohos/component", - "description":"a npm package which contains arkUI2.0 page", - "ohos":{ - "org":"" - }, - "main":"index.ets", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/utils":"file:../utils", - "@ohos/source":"file:../resources" - } -} \ No newline at end of file diff --git a/common/resources/.gitignore b/common/resources/.gitignore index 4f9a973815d0b5e49bc8547681a6b4bc7a178d12..a5c564ae6da6b5e2336628d9f9e2155bddfc399d 100644 --- a/common/resources/.gitignore +++ b/common/resources/.gitignore @@ -1,3 +1,4 @@ /node_modules /.preview -/build \ No newline at end of file +/build +/package.json \ No newline at end of file diff --git a/common/resources/src/main/module.json5 b/common/resources/src/main/module.json5 index 6bbb0114cccbba7acefcb50999fb72c8339ce6a7..ba85f707655b7f7f7886d7251f949010af78031e 100644 --- a/common/resources/src/main/module.json5 +++ b/common/resources/src/main/module.json5 @@ -18,6 +18,7 @@ "name": "resources", "type": "har", "deviceTypes": [ + "default", "tablet" ], "uiSyntax": "ets" diff --git a/common/resources/src/main/resources/rawfile/editor.html b/common/resources/src/main/resources/rawfile/editor.html index 2f8ff4d81a548e612b5e9b8a6cee7f5956a94e63..4288cfb51ecac3c5c8eba557170f4a9debbe1ae5 100644 --- a/common/resources/src/main/resources/rawfile/editor.html +++ b/common/resources/src/main/resources/rawfile/editor.html @@ -4,21 +4,37 @@ "editorJs" - - + + + + + + + -
+
+ + +
+
+
+ + 清单 +
+
+ + 样式 +
+
+ + 相册 +
+
- + + + + - + \ No newline at end of file diff --git a/common/resources/src/main/resources/rawfile/editor_style.css b/common/resources/src/main/resources/rawfile/editor_style.css index a28d7abd2b6d51343a0145c67644dc67cdea5e61..fa00ab4c2e8444531d646818d43f6d7980b59c85 100644 --- a/common/resources/src/main/resources/rawfile/editor_style.css +++ b/common/resources/src/main/resources/rawfile/editor_style.css @@ -16,15 +16,12 @@ html { height: 100%; font-family: sans-serif; - -webkit-text-size-adjust: 100%; +-webkit-text-size-adjust: 100%; } body { - overflow: scroll; - display: table; - table-layout: fixed; width: 100%; - min-height: 100%; + height: 100%; color: #333333; margin: 0; } @@ -33,19 +30,20 @@ body { padding-left: 1px; padding-right: 24px; width: 100%; - display: table-cell; + height: 100%; outline: 0px solid transparent; background-repeat: no-repeat; background-position: center; background-size: cover; color: #182431; opacity: 0.9; - font-size: 16px; + overflow: scroll; + user-select: none; } #editorjs[placeholder]:empty:not(:focus):before { content: attr(placeholder); - font-size: 16px; + font-size: 24px; color: #9b9b9b; } @@ -65,9 +63,9 @@ body { background-color: #ffffff; border: 2px solid #182431; opacity: 0.6; - -webkit-border-radius: 50%; - -webkit-appearance: none; - -webkit-user-select: none; +-webkit-border-radius: 50%; +-webkit-appearance: none; +-webkit-user-select: none; border-radius: 50%; font-size: 0.8rem; margin-left: 0px; @@ -78,7 +76,7 @@ body { padding: 0; position: relative; display: inline-block; - -webkit-transition: background-color ease 0.1s; +-webkit-transition: background-color ease 0.1s; transition: background-color ease 0.1s; vertical-align: top; cursor: default; @@ -91,3 +89,33 @@ body { color: #F88805; opacity: 0.4; } + +.edit-box { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.button-box { + width: 100%; + height: auto; + background-color: white; + display: none; + justify-content: space-around; + padding-bottom: 6px; +} + +.button-box div { + display: flex; + flex-direction: column; + align-items: center; +} + +.button-box img { + margin-bottom: 6px; +} + +.button-box span { + font-size: 20px; +} \ No newline at end of file diff --git a/common/resources/src/main/resources/rawfile/icon/picture_white.svg b/common/resources/src/main/resources/rawfile/icon/picture_white.svg new file mode 100644 index 0000000000000000000000000000000000000000..1def639bcda5ff67fcfbf296417597dc88a2455f --- /dev/null +++ b/common/resources/src/main/resources/rawfile/icon/picture_white.svg @@ -0,0 +1 @@ +图片 \ No newline at end of file diff --git a/common/resources/src/main/resources/rawfile/icon/styles.svg b/common/resources/src/main/resources/rawfile/icon/styles.svg new file mode 100644 index 0000000000000000000000000000000000000000..4fb5bb6b99656b56ce68627725d165454ba477bc --- /dev/null +++ b/common/resources/src/main/resources/rawfile/icon/styles.svg @@ -0,0 +1,11 @@ + + + +样式 + + diff --git a/common/resources/src/main/resources/rawfile/icon/todo1.svg b/common/resources/src/main/resources/rawfile/icon/todo1.svg new file mode 100644 index 0000000000000000000000000000000000000000..777829853da50cbf0c1b1bb377dc2ad74164ee3a --- /dev/null +++ b/common/resources/src/main/resources/rawfile/icon/todo1.svg @@ -0,0 +1 @@ +todo \ No newline at end of file diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 08ce432cf4c6815a5e0964767d0caa252aef1b2a..5d62c95576e4fe6ca8a46737bb581b87375e9138 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -73,7 +73,7 @@ RICH_EDITOR.getListStyle = function () { } var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); try { - var child = range.commonAncestorContainer.parentNode; + var child = range.commonAncestorContainer; for (var i = 0; i < 10; i++) { if (child.nodeName === 'OL') { console.info('insertOrderedList'); @@ -111,7 +111,7 @@ RICH_EDITOR.setNumbers = function () { } var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); try { - var child = range.commonAncestorContainer.parentNode; + var child = range.commonAncestorContainer; for (var i = 0; i < 10; i++) { if (child.nodeName === 'OL') { child.style['list-style'] = 'decimal'; @@ -142,7 +142,7 @@ RICH_EDITOR.setABC = function () { } var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); try { - var child = range.commonAncestorContainer.parentNode; + var child = range.commonAncestorContainer; for (var i = 0; i < 10; i++) { if (child.nodeName === 'OL') { child.style['list-style'] = 'lower-alpha'; @@ -173,7 +173,7 @@ RICH_EDITOR.setBullets = function () { } var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); try { - var child = range.commonAncestorContainer.parentNode; + var child = range.commonAncestorContainer; for (var i = 0; i < 10; i++) { if (child.nodeName === 'UL') { child.style['list-style'] = 'disc'; @@ -204,7 +204,7 @@ RICH_EDITOR.setSquare = function () { } var range = selection.getRangeAt ? selection.getRangeAt(0) : selection.createRange(); try { - var child = range.commonAncestorContainer.parentNode; + var child = range.commonAncestorContainer; for (var i = 0; i < 10; i++) { if (child.nodeName === 'UL') { child.style['list-style'] = 'square'; @@ -414,7 +414,7 @@ document.body.addEventListener('paste', (event) => { RICH_EDITOR.getFontSizes = function () { document.execCommand('fontSize', false, null); var fontElements = window.getSelection().anchorNode.parentNode; - var getSize = fontElements.style.fontSize; + var getSize = parseInt(window.getComputedStyle(fontElements, null).fontSize) var str = callBackToApp.callbackGetSize(getSize); }; @@ -426,4 +426,74 @@ RICH_EDITOR.insertImageHtml = function (contents) { let img = document.createElement('img'); img.src = contents; selection.getRangeAt(0).insertNode(img); -}; \ No newline at end of file +}; + +document.addEventListener('click', (e) => { + console.info(`lsq: e is ${JSON.stringify(e)}`) + var parent = document.getElementById('editorjs'); + if (parent.id !== 'editorjs') { + e.preventDefault() + } +}) + +document.getElementById('addToDo').addEventListener('click', () => { + callBackToApp.addToDo() +}) + +document.getElementById('chooseStyle').addEventListener('click', () => { + callBackToApp.chooseStyle() +}) + +document.getElementById('openAlbum').addEventListener('click', () => { + callBackToApp.openAlbum() +}) + +function changeSizeToRk() { + document.getElementById('img1').style.width = '40px'; + document.getElementById('img1').style.height = '40px'; + document.getElementById('img2').style.width = '40px'; + document.getElementById('img2').style.height = '40px'; + document.getElementById('img3').style.width = '40px'; + document.getElementById('img3').style.height = '40px'; + document.getElementById('lable1').style.fontSize = '20px'; + document.getElementById('lable2').style.fontSize = '20px'; + document.getElementById('lable3').style.fontSize = '20px'; +} + +function changeSizeToPhone() { + document.getElementById('img1').style.width = '24px'; + document.getElementById('img1').style.height = '24px'; + document.getElementById('img2').style.width = '24px'; + document.getElementById('img2').style.height = '24px'; + document.getElementById('img3').style.width = '24px'; + document.getElementById('img3').style.height = '24px'; + document.getElementById('lable1').style.fontSize = '12px'; + document.getElementById('lable2').style.fontSize = '12px'; + document.getElementById('lable3').style.fontSize = '12px'; +} + +function changeSizeToTablet() { + document.getElementById('img1').style.width = '28px'; + document.getElementById('img1').style.height = '28px'; + document.getElementById('img2').style.width = '28px'; + document.getElementById('img2').style.height = '28px'; + document.getElementById('img3').style.width = '28px'; + document.getElementById('img3').style.height = '28px'; + document.getElementById('lable1').style.fontSize = '12px'; + document.getElementById('lable2').style.fontSize = '12px'; + document.getElementById('lable3').style.fontSize = '12px'; +} + +function hiddenButton() { + document.getElementById('buttonBox').style.display = 'none'; +} + +RICH_EDITOR.getFocus = function() { + return document.getElementById('editorjs').focus(); +} + +document.getElementById('editorjs').addEventListener('click', () => { + if (callBackToApp.getBreakPoint() === 'sm') { + document.getElementById('buttonBox').style.display = 'flex'; + } +}) \ No newline at end of file diff --git a/common/utils/.gitignore b/common/utils/.gitignore index 4f9a973815d0b5e49bc8547681a6b4bc7a178d12..a5c564ae6da6b5e2336628d9f9e2155bddfc399d 100644 --- a/common/utils/.gitignore +++ b/common/utils/.gitignore @@ -1,3 +1,4 @@ /node_modules /.preview -/build \ No newline at end of file +/build +/package.json \ No newline at end of file diff --git a/common/utils/package.json b/common/utils/package.json index acf594b0f2683fa41165747056e03112dbdd7c0f..65817459843bcfbc2528934b77f9cecc517d48c4 100644 --- a/common/utils/package.json +++ b/common/utils/package.json @@ -1,16 +1,16 @@ { - "license":"ISC", - "types":"", - "devDependencies":{}, - "name":"@ohos/utils", - "description":"a npm package which contains arkUI2.0 page", - "ohos":{ - "org":"" + "license": "ISC", + "types": "", + "devDependencies": {}, + "name": "@ohos/utils", + "description": "a npm package which contains arkUI2.0 page", + "ohos": { + "org": "" }, - "main":"index.ets", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/source":"file:../resources" + "main": "index.ets", + "repository": {}, + "version": "1.0.0", + "dependencies": { + "@ohos/source": "file:../resources" } -} \ No newline at end of file +} diff --git a/common/utils/src/main/ets/default/baseUtil/NoteUtil.ets b/common/utils/src/main/ets/default/baseUtil/NoteUtil.ets index 1e8a24ad01151d345f6653692c39226656cdb362..26dbb627176eac08f8c6b9538b23d7fb95b14a47 100644 --- a/common/utils/src/main/ets/default/baseUtil/NoteUtil.ets +++ b/common/utils/src/main/ets/default/baseUtil/NoteUtil.ets @@ -38,6 +38,7 @@ export class NoteUtil { setNoteChecked(checkedNoteArray: NoteData[], noteItem: NoteData) { LogUtil.info(TAG, "setNoteChecked") checkedNoteArray.push(noteItem) + AppStorage.Set('CheckedNoteArray',checkedNoteArray) } /** @@ -52,6 +53,7 @@ export class NoteUtil { }) LogUtil.info(TAG, "index " + index.toString() + noteItem.uuid) index == -1 ? null : checkedNoteArray.splice(index, 1) + AppStorage.Set('CheckedNoteArray',checkedNoteArray) } /** @@ -82,6 +84,7 @@ export class NoteUtil { LogUtil.info(TAG, "setAllNotesChecked") this.unsetAllNotesChecked(checkedNoteArray) checkedNoteArray.push(...noteArray) + AppStorage.Set('CheckedNoteArray', checkedNoteArray) } /** @@ -92,6 +95,7 @@ export class NoteUtil { unsetAllNotesChecked(checkedNoteArray: NoteData[]) { LogUtil.info(TAG, "unsetAllNotesChecked") checkedNoteArray.splice(0, checkedNoteArray.length) + AppStorage.Set('CheckedNoteArray', checkedNoteArray) } /** @@ -180,6 +184,10 @@ export class NoteUtil { for (let index = 0; index < allNoteDataArray.length; ) { if (allNoteDataArray[index].is_deleted == Delete.Yes && new Date().getTime() - allNoteDataArray[index].deleted_time > StyleConstants.DELETE_DEADLINE) { LogUtil.info(TAG, "Delete Note, uuid " + allNoteDataArray[index].uuid + " delete time " + allNoteDataArray[index].deleted_time) + // delete note from db + let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) + predicates_note.equalTo(NoteTableColumn.Uuid, allNoteDataArray[index].uuid) + RdbStoreUtil.delete(predicates_note, null) allNoteDataArray.splice(index, 1); } index++ @@ -272,6 +280,11 @@ export class NoteUtil { } return false } + + refreshAll() { + let isRefresh = AppStorage.Get('isUpdate') + AppStorage.Set('isUpdate',!isRefresh) + } } let noteUtil = new NoteUtil() diff --git a/common/utils/src/main/ets/default/baseUtil/OperationUtils.ets b/common/utils/src/main/ets/default/baseUtil/OperationUtils.ets index b55b4a33136056f1d7c1fbffdd362f66eab2fb3b..cf462b675226902b43565af3581dda59d24818e1 100644 --- a/common/utils/src/main/ets/default/baseUtil/OperationUtils.ets +++ b/common/utils/src/main/ets/default/baseUtil/OperationUtils.ets @@ -57,6 +57,25 @@ export class OperationUtils { return imagePath.toString() } + saveImageData(dataArray: Uint8Array, imageType: string): string { + try { + var context = globalThis.noteContext + // 1、获取本地路径 + var dir = context.filesDir + var time = new Date().getTime() + var imagePath = dir + "/" + time.toString() + "_note" + "." + imageType + let fd = fileio.openSync(imagePath, 0o100 | 0o2, 0o666) + // 3、把image数据写入本地图片文件中 + fileio.writeSync(fd, dataArray.buffer) + } catch (error) { + LogUtil.info(TAG, "create error: " + error); + return; + } + LogUtil.info(TAG, 'save image end'); + + return imagePath.toString() + } + saveImage(imageData: string, imageType: string): string { try { var context = globalThis.noteContext diff --git a/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets b/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets index 5fd73c256ab56c66d57c793dc90ef9aae56f9990..5f7ca5c72db2968c1a1611771f9ed69902e70bba 100644 --- a/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets +++ b/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets @@ -200,8 +200,15 @@ export default { let title = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.Title)) let uuid = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.Uuid)) let folder_uuid = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.FolderUuid)) - let content_text = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.ContentText)) - let content_img = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.ContentImg)) + // 暂时规避备忘录二次打开白屏问题,后续数据库解决 + let content_text = ''; + let content_img = ''; + try { + content_text = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.ContentText)) + content_img = resultSet_note.getString(resultSet_note.getColumnIndex(NoteTableColumn.ContentImg)) + } catch (err) { + LogUtil.error(TAG, "initAppStorage, content_img = error : " + err) + } let noteType = resultSet_note.getLong(resultSet_note.getColumnIndex(NoteTableColumn.NoteType)) let is_top = resultSet_note.getLong(resultSet_note.getColumnIndex(NoteTableColumn.IsTop)) let is_favorite = resultSet_note.getLong(resultSet_note.getColumnIndex(NoteTableColumn.IsFavorite)) diff --git a/common/utils/src/main/ets/default/model/searchModel/SearchModel.ets b/common/utils/src/main/ets/default/model/searchModel/SearchModel.ets index 26094324696d871d9c2f1ef0c317d1ecd5b90c8b..dfc5b629181435aeb2399ed6ec88dedd14d12006 100644 --- a/common/utils/src/main/ets/default/model/searchModel/SearchModel.ets +++ b/common/utils/src/main/ets/default/model/searchModel/SearchModel.ets @@ -20,6 +20,7 @@ import {TableName, NoteTableColumn} from '../../model/databaseModel/EnumData' import NoteUtil from '../../baseUtil/NoteUtil' import RdbStoreUtil from '../../baseUtil/RdbStoreUtil' import SysDefData from '../../model/databaseModel/SysDefData' +import util from '@ohos.util' const TAG = "SearchModel" @@ -42,7 +43,17 @@ export class SearchModel { } let searchData: NoteData[] = []; noteDataArray.forEach((noteData) => { - if (noteData.content_text.replace(/<[^>]+>/g,"").toLowerCase().indexOf(query.toLowerCase()) != -1 + let base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/ + let contentTextValue: string + if (base64regex.test(noteData.content_text)) { + let Base64 = new util.Base64() + let textDecoder = new util.TextDecoder("utf-8", { ignoreBOM: true }) // utf-8:编码格式为utf-8,ignoreBOM:是否忽略BOM标记 + let decodeStr = Base64.decodeSync(noteData.content_text) + contentTextValue = textDecoder.decode(decodeStr, { stream: false }) // stream:在随后的decode()调用中是否跟随附加数据块 + } else { + contentTextValue = noteData.content_text + } + if (contentTextValue.replace(/<[^>]+>/g, "").toLowerCase().indexOf(query.toLowerCase()) != -1 || noteData.title.toLowerCase().indexOf(query.toLowerCase()) != -1) { LogUtil.info(TAG, "uuid " + noteData.uuid) searchData.push(noteData); diff --git a/common/utils/src/main/module.json5 b/common/utils/src/main/module.json5 index 57b6ad94c01c2b88e9317da1a4f4288411b4508d..1f9bfeb22f62f1692248b543fa0719a29b9e94c9 100644 --- a/common/utils/src/main/module.json5 +++ b/common/utils/src/main/module.json5 @@ -18,6 +18,7 @@ "name": "utils", "type": "har", "deviceTypes": [ + "default", "tablet" ], "uiSyntax": "ets" diff --git a/product/phone/.gitignore b/features/.gitignore similarity index 48% rename from product/phone/.gitignore rename to features/.gitignore index 4f9a973815d0b5e49bc8547681a6b4bc7a178d12..9924c4f298e2f709c65fd11e6020873bd6f6ae54 100644 --- a/product/phone/.gitignore +++ b/features/.gitignore @@ -1,3 +1,5 @@ /node_modules /.preview -/build \ No newline at end of file +/build +/.cxx +/package.json \ No newline at end of file diff --git a/product/tablet/build-profile.json5 b/features/build-profile.json5 similarity index 85% rename from product/tablet/build-profile.json5 rename to features/build-profile.json5 index a011ff8569db323dc4d25469bc83b9318ad81ac6..d862153d9f0820c491075352ade6333daaad2553 100644 --- a/product/tablet/build-profile.json5 +++ b/features/build-profile.json5 @@ -13,13 +13,21 @@ * limitations under the License. */ + { "apiType": 'stageMode', "buildOption": { }, + "entryModules": [ + "phone", + "tablet" + ], "targets": [ { - "name": "default", + "name": "default" + }, + { + "name": "ohosTest", } ] } \ No newline at end of file diff --git a/common/component/hvigorfile.js b/features/hvigorfile.js similarity index 100% rename from common/component/hvigorfile.js rename to features/hvigorfile.js diff --git a/common/component/package-lock.json b/features/package-lock.json similarity index 60% rename from common/component/package-lock.json rename to features/package-lock.json index db5fde32883dcefaf33673ffb7db566fa844cd19..bf24415c8fb2afc0484e3b814e3bfe247737a003 100644 --- a/common/component/package-lock.json +++ b/features/package-lock.json @@ -5,16 +5,16 @@ "requires": true, "dependencies": { "@ohos/source": { - "version": "file:../resources" + "version": "file:../common/resources" }, "@ohos/utils": { - "version": "file:../utils", + "version": "file:../common/utils", "requires": { - "@ohos/source": "file:../resources" + "@ohos/source": "file:../common/resources" }, "dependencies": { "@ohos/source": { - "version": "file:../resources" + "version": "file:../common/resources" } } } diff --git a/features/package.json b/features/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1f2eea62816b45f0850f40a3858e59a9d0845202 --- /dev/null +++ b/features/package.json @@ -0,0 +1,17 @@ +{ + "license": "ISC", + "types": "", + "devDependencies": {}, + "name": "@ohos/component", + "description": "a npm package which contains arkUI2.0 page", + "ohos": { + "org": "" + }, + "main": "index.ets", + "repository": {}, + "version": "1.0.0", + "dependencies": { + "@ohos/utils": "file:../common/utils", + "@ohos/source": "file:../common/resources" + } +} diff --git a/common/component/src/main/ets/components/CusDialogComp.ets b/features/src/main/ets/components/CusDialogComp.ets similarity index 92% rename from common/component/src/main/ets/components/CusDialogComp.ets rename to features/src/main/ets/components/CusDialogComp.ets index b43a83f56176bf214de72468296aab09fb25f02d..a7d62269b7952767671e67ae4206ebaf46110a36 100644 --- a/common/component/src/main/ets/components/CusDialogComp.ets +++ b/features/src/main/ets/components/CusDialogComp.ets @@ -19,6 +19,7 @@ import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil' import { circleColorArray, fontColorArray, SysDefFolderUuid, DeleteFileType, FolderType, LogUtil } from '@ohos/utils' +import inputMethod from '@ohos.inputMethod' const TAG = "CusDialogComp" @@ -32,7 +33,7 @@ export struct NewOrEditFolderDialog { private editFolderUuid: string = "" private dialogType: number = 0 // 0表示新建文件夹 1表示修改文件夹 @State isExisted: boolean = false - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @Consume('SelectedColor') selectedColor: string build() { @@ -69,6 +70,7 @@ export struct NewOrEditFolderDialog { this.isExisted = result }) }) + .restoreId(1) }.margin({ bottom: 4, left: 24, right: 24 }) Divider() @@ -97,6 +99,7 @@ export struct NewOrEditFolderDialog { .width('48%') .onClick(() => { this.newOrEditFolderDialogCtl.close() + inputMethod.getController().stopInputSession(); }) Divider() .vertical(true) @@ -118,7 +121,12 @@ export struct NewOrEditFolderDialog { .width('48%') .onClick(() => { this.newOrEditFolderDialogCtl.close() - this.confirm(this.selectedColor, this.inputName) + if (this.inputName.replace(/\s+/g, '') == '') { + return + } else { + this.confirm(this.selectedColor, this.inputName) + } + inputMethod.getController().stopInputSession(); }) }.width('100%') .margin({ top: 21, bottom: 25 }) @@ -130,7 +138,7 @@ export struct NewOrEditFolderDialog { .margin({ bottom: 16, left: 12, right: 12 }) } - aboutToAppear(): void{ + aboutToAppear(): void { var currentFolder: FolderData = FolderUtil.getFolderData(this.AllFolderArray, this.editFolderUuid) // 获取当前选中的文件夹 if (currentFolder == null) { return @@ -173,9 +181,9 @@ struct ColorCircleComp { @CustomDialog export struct DeleteDialog { - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('SelectedFolderData') selectedFolderData: FolderData private multiSelect: boolean = false @@ -265,7 +273,7 @@ export struct DeleteDialog { @Component struct NoteDataMoveItemComp { @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] private folderItem: FolderData dividerShow: boolean = true @@ -320,7 +328,7 @@ export struct NoteDataMoveDialog { noteDataMoveDialogCtl: CustomDialogController onConfirm: (folderUuid: string) => void NoteDataMoveArray: FolderData[] - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] aboutToAppear() { this.NoteDataMoveArray = this.AllFolderArray.slice(2, this.AllFolderArray.length); @@ -390,7 +398,6 @@ export struct EditContentDialog { @Consume('SelectedNoteData') selectedNoteData: NoteData private circleColor: string private fontSize: number - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') aboutToAppear() { this.confirm("javascript:RICH_EDITOR.getFontSizes()") @@ -400,7 +407,7 @@ export struct EditContentDialog { Row() { Column() { Row({ space: 70 }) { - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.action_bold')) .height(24) .width(24) @@ -412,7 +419,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.format_italic')) .height(24) .width(24) @@ -424,7 +431,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.underline')) .height(24) .width(24) @@ -436,19 +443,19 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { - Image($r('app.media.right_justify')) + Button({ type: ButtonType.Normal }) { + Image($r('app.media.left_justify')) .height(24) .width(24) .onClick(() => { - this.confirm("javascript:RICH_EDITOR.setJustifyRight()") + this.confirm("javascript:RICH_EDITOR.setJustifyLeft()") }) }.width(42) .height(42) .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.mid_justify')) .height(24) .width(24) @@ -460,12 +467,12 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { - Image($r('app.media.left_justify')) + Button({ type: ButtonType.Normal }) { + Image($r('app.media.right_justify')) .height(24) .width(24) .onClick(() => { - this.confirm("javascript:RICH_EDITOR.setJustifyLeft()") + this.confirm("javascript:RICH_EDITOR.setJustifyRight()") }) }.width(42) .height(42) @@ -481,7 +488,7 @@ export struct EditContentDialog { .color($r("app.color.divider_color_e4e4e4")) Row({ space: 70 }) { - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.suojin')) .height(24) .width(24) @@ -493,7 +500,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.suojin_back')) .height(24) .width(24) @@ -506,7 +513,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r("app.media.format_menulist_number")) .height(24) .width(24) @@ -518,7 +525,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r("app.media.format_menulist_alphabet")) .height(24) .width(24) @@ -530,7 +537,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.format_menubullte2')) .height(24) .width(24) @@ -542,7 +549,7 @@ export struct EditContentDialog { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.format_menubullte1')) .height(24) .width(24) @@ -578,7 +585,6 @@ export struct EditContentDialog { .fillColor('#99182431') .onClick(() => { this.editContentDialogCtl.close() - this.closeEditContentDialog = true }) } .height(36) @@ -655,8 +661,7 @@ export struct EditTitleDialog { editTitleDialog: CustomDialogController confirm: (newTitle: string) => void @State inputName: string = "" - private isEquivalentVal: boolean= true - + @State isEquivalentVal: boolean = true build() { Column() { @@ -676,12 +681,12 @@ export struct EditTitleDialog { .onChange((value: string) => { if (this.inputName == value) { this.isEquivalentVal = true - } - else { + } else { this.isEquivalentVal = false } this.inputName = value }) + .restoreId(2) }.margin({ bottom: 4, left: 24, right: 24 }) @@ -694,6 +699,7 @@ export struct EditTitleDialog { .width('48%') .onClick(() => { this.editTitleDialog.close() + inputMethod.getController().stopInputSession(); }) Divider() .vertical(true) @@ -709,7 +715,12 @@ export struct EditTitleDialog { .width('48%') .onClick(() => { this.editTitleDialog.close() - this.confirm(this.inputName) + inputMethod.getController().stopInputSession(); + if (this.inputName.replace(/\s+/g, '') == '') { + return + } else { + this.confirm(this.inputName) + } }) }.width('100%') .margin({ top: 21, bottom: 25 }) @@ -728,10 +739,13 @@ export struct EditContentDialogPortrait { confirm: (excuteJs: string) => void @State selectFontColor: string = fontColorArray[0] @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') private circleColor: string private fontSize: number + aboutToAppear() { + this.confirm("javascript:RICH_EDITOR.getFontSizes()") + } + build() { Column() { Flex({ direction: FlexDirection.Row, wrap: FlexWrap.NoWrap, @@ -746,7 +760,6 @@ export struct EditContentDialogPortrait { .fillColor($r("app.color.font_stylecolor_AD182431")) .onClick(() => { this.editContentDialogCtl.close() - this.closeEditContentDialog = true }) } .height(48) @@ -754,7 +767,7 @@ export struct EditContentDialogPortrait { Row({ space: 16 }) { - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.action_bold')) .height(24) .width(24) @@ -766,7 +779,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.format_italic')) .height(24) .width(24) @@ -778,7 +791,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.underline')) .height(24) .width(24) @@ -790,7 +803,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.right_justify')) .height(24) .width(24) @@ -802,7 +815,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.mid_justify')) .height(24) .width(24) @@ -814,7 +827,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.left_justify')) .height(24) .width(24) @@ -832,7 +845,7 @@ export struct EditContentDialogPortrait { Row({ space: 16 }) { - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.suojin')) .height(24) .width(24) @@ -844,7 +857,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.suojin_back')) .height(24) .width(24) @@ -857,7 +870,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r("app.media.format_menulist_number")) .height(24) .width(24) @@ -869,7 +882,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r("app.media.format_menulist_alphabet")) .height(24) .width(24) @@ -881,7 +894,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.format_menubullte2')) .height(24) .width(24) @@ -893,7 +906,7 @@ export struct EditContentDialogPortrait { .borderRadius(8) .backgroundColor($r('app.color.color_ffffff')) - Button({ type: ButtonType.Normal, stateEffect: true }) { + Button({ type: ButtonType.Normal }) { Image($r('app.media.format_menubullte1')) .height(24) .width(24) diff --git a/common/component/src/main/ets/components/FolderListComp.ets b/features/src/main/ets/components/FolderListComp.ets similarity index 91% rename from common/component/src/main/ets/components/FolderListComp.ets rename to features/src/main/ets/components/FolderListComp.ets index 5643e21335cb436d79a1b1b41699d11c44ada5a5..40433ef881f66969b9577f0128976ca6fec905af 100644 --- a/common/component/src/main/ets/components/FolderListComp.ets +++ b/features/src/main/ets/components/FolderListComp.ets @@ -15,7 +15,14 @@ import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import { SysDefFolderUuid, TableName, FolderType, FolderTableColumn, NoteTableColumn, Delete, DeleteFileType +import { + SysDefFolderUuid, + TableName, + FolderType, + FolderTableColumn, + NoteTableColumn, + Delete, + DeleteFileType } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData' import { NewOrEditFolderDialog, DeleteDialog } from './CusDialogComp' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants' @@ -27,11 +34,13 @@ import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' // Folder list component @Component export struct FolderListComp { - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @Consume('SectionStatus') sectionStatus: number @Consume('ExpandStatus') expandStatus: boolean // 笔记本折叠展开状态 + @StorageLink('breakPoint') breakPoints: string = 'lg' controllerShow: WebController TAG = "FolderListComp" + @Consume('AsideWidth') asideWidth: number build() { Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.SpaceBetween }) { @@ -42,9 +51,12 @@ export struct FolderListComp { .width(24) .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) .onClick(() => { - if (this.sectionStatus == 1) { - this.expandStatus = !this.expandStatus + if (this.breakPoints == 'sm' || this.breakPoints == 'md') { + animateTo({ duration: 200 }, () => { + this.expandStatus = !this.expandStatus + }) } else { + this.asideWidth = 0 this.sectionStatus = (this.sectionStatus == 3 ? 2 : 3) // save continue data AppStorage.SetOrCreate('ContinueSection', this.sectionStatus) @@ -68,7 +80,10 @@ export struct FolderListComp { } } }, folderItem => folderItem.name.toString()) - }.width('100%').height(450) + } + .width('100%') + .height(500) + .margin({ bottom: 120 }) .padding({ left: 12, right: 12 }) .flexGrow(1) } @@ -90,20 +105,22 @@ export struct FolderListComp { .padding({ left: 12, right: 12, bottom: 24 }) } .height("100%") + .backgroundColor($r('app.color.folder_color_d6d6d6')) + .backgroundBlurStyle(BlurStyle.Thick) } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(this.TAG, "aboutToAppear") } - aboutToDisappear(): void{ + aboutToDisappear(): void { LogUtil.info(this.TAG, "aboutToDisappear") } } @Component export struct NoteAndCreateComp { - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @Consume('SelectedColor') selectedColor: string @Consume('PortraitModel') portraitModel: boolean folderCreateDialogCtl: CustomDialogController = new CustomDialogController({ @@ -124,6 +141,7 @@ export struct NoteAndCreateComp { this.AllFolderArray.push(folderData) // insert folder to db RdbStoreUtil.insert(TableName.FolderTable, folderData.toFolderObject(), null) + AppStorage.SetOrCreate('isUpdate', true) } build() { @@ -157,9 +175,9 @@ export struct NoteAndCreateComp { @Component struct FolderItemComp { @State folderItem: FolderData = undefined - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = [] - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('RefreshFlag') refreshFlag: number @@ -167,8 +185,9 @@ struct FolderItemComp { @Consume('SelectedColor') selectedColor: string @Consume('PortraitModel') portraitModel: boolean controllerShow: WebController - private isLongPress: boolean = false + @State isLongPress: boolean = false TAG = "FolderListComp" + @StorageLink('isUpdate') isUpdate: boolean = false // Folder Edit Dialog folderEditDialogCtl: CustomDialogController = new CustomDialogController({ builder: NewOrEditFolderDialog({ @@ -200,6 +219,7 @@ struct FolderItemComp { let predicates_folder = RdbStoreUtil.getRdbPredicates(TableName.FolderTable) predicates_folder.equalTo(FolderTableColumn.Uuid, this.folderItem.uuid) RdbStoreUtil.update(this.folderItem.toFolderObject(), predicates_folder, null) + this.isUpdate = true } // Folder Delete Dialog folderDeleteDialogCtl: CustomDialogController = new CustomDialogController({ @@ -267,6 +287,7 @@ struct FolderItemComp { AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(this.TAG, "onDeleteConfirm, set continue note success") } + this.isUpdate = true } // Folder Create Dialog folderCreateDialogCtl: CustomDialogController = new CustomDialogController({ @@ -288,6 +309,7 @@ struct FolderItemComp { this.AllFolderArray.push(folderData) // insert folder to db RdbStoreUtil.insert(TableName.FolderTable, folderData.toFolderObject(), null) + this.isUpdate = true } @Builder menuBuilder() { @@ -356,12 +378,14 @@ struct FolderItemComp { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) { Row() { Image(FolderUtil.getFolderIcon(this.folderItem.uuid)) + .id(this.isUpdate + '') .objectFit(ImageFit.Fill) .width(24) .height(24) .fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, this.selectedFolderData.uuid == this.folderItem.uuid)) .margin({ right: 16 }) Text(FolderUtil.getFolderText(this.folderItem)) + .id(this.isUpdate + '') .fontWeight(FontWeight.Medium) .fontSize(16) .textAlign(TextAlign.Center) @@ -374,6 +398,7 @@ struct FolderItemComp { }.width(118) Text(FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.folderItem.uuid).toString()) + .id(this.isUpdate + '') .fontWeight(FontWeight.Regular) .fontSize(14) .textAlign(TextAlign.Center) @@ -383,7 +408,7 @@ struct FolderItemComp { .height(56) .padding({ left: 12, right: 12 }) .backgroundColor(this.isLongPress ? $r("app.color.folder_color_19182431") : this.selectedFolderData.uuid == this.folderItem.uuid - ? $r("app.color.folder_color_ffffff") : "") + ? $r("app.color.folder_color_ffffff") : "#00FFFFFF") .bindContextMenu(this.menuBuilder, ResponseType.LongPress) .bindContextMenu(this.menuBuilder, ResponseType.RightClick) .onClick(() => { @@ -408,17 +433,20 @@ struct FolderItemComp { AppStorage.SetOrCreate('ContinueSection', 3) LogUtil.info(this.TAG, "FolderItemComp, set continue note success") } + NoteUtil.refreshAll() }) } else { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) { Row() { Image(FolderUtil.getFolderIcon(this.folderItem.uuid)) + .id(this.isUpdate + '') .objectFit(ImageFit.Fill) .width(24) .height(24) - .fillColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, this.selectedFolderData.uuid == this.folderItem.uuid)) + .fillColor(this.isUpdate ? FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, this.selectedFolderData.uuid == this.folderItem.uuid) : FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid, this.selectedFolderData.uuid == this.folderItem.uuid)) .margin({ right: 16 }) Text(FolderUtil.getFolderText(this.folderItem)) + .id(this.isUpdate + '') .fontWeight(FontWeight.Medium) .fontSize(16) .textAlign(TextAlign.Center) @@ -431,6 +459,7 @@ struct FolderItemComp { }.width(118) Text(FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.folderItem.uuid).toString()) + .id(this.isUpdate + '') .fontWeight(FontWeight.Regular) .fontSize(14) .textAlign(TextAlign.Center) @@ -440,7 +469,7 @@ struct FolderItemComp { .height(56) .padding({ left: 12, right: 12 }) .backgroundColor(this.isLongPress ? $r("app.color.folder_color_19182431") : this.selectedFolderData.uuid == this.folderItem.uuid - ? $r("app.color.folder_color_ffffff") : "") + ? $r("app.color.folder_color_ffffff") : "#00FFFFFF") .onClick(() => { if (this.longpress) { this.longpress = false @@ -463,6 +492,7 @@ struct FolderItemComp { AppStorage.SetOrCreate('ContinueSection', 3) LogUtil.info(this.TAG, "FolderItemComp, set continue note success") } + NoteUtil.refreshAll() }) } } @@ -482,21 +512,4 @@ struct FolderItemComp { ) ) } -} - - -@Component -export struct FolderListBackGround { - build() { - Column() { - } - .shadow({ - radius: 54, - offsetY: 24 - }) - .width("100%") - .height("100%") - .backgroundColor($r('app.color.folder_color_d6d6d6')) - .backgroundBlurStyle(BlurStyle.Thick) - } } \ No newline at end of file diff --git a/common/component/src/main/ets/components/NoteContent.ets b/features/src/main/ets/components/NoteContent.ets similarity index 77% rename from common/component/src/main/ets/components/NoteContent.ets rename to features/src/main/ets/components/NoteContent.ets index 97111666212a01d698dbaab62790e8f8350b7cad..34b3174e3b0cc3904a5173914ad0879d209a389c 100644 --- a/common/component/src/main/ets/components/NoteContent.ets +++ b/features/src/main/ets/components/NoteContent.ets @@ -17,8 +17,13 @@ import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import { atob, btoa } from 'js-base64' -import { TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete +import util from '@ohos.util' +import { + TableName, + NoteTableColumn, + SysDefFolderUuid, + Favorite, + Delete } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants' import { EditContentDialog, DeleteDialog, EditTitleDialog } from './CusDialogComp' @@ -30,7 +35,7 @@ import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils' import mediaquery from '@ohos.mediaquery' import router from '@system.router'; -import inputMethod from '@ohos.inputmethod'; +import inputMethod from '@ohos.inputMethod'; import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData' const TAG = "NoteContent" @@ -39,13 +44,47 @@ var timeID: number @Component export struct NoteContent { - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') @Provide('SelectedNoteData') selectedNoteData: NoteData = AppStorage.Get('NewNote') - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Provide('Issave') issave: number = 0 @Provide('EditModel') editModel: boolean = false + @StorageLink('dpi') dpi: number = 240 controllerShow: WebController private editContentFlag = false + @StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0 + + storeScrollTop(scrollTop: number) { + if (scrollTop < 0) { + return + } + AppStorage.SetOrCreate('ScrollTopPercent', scrollTop / this.controllerShow.getPageHeight()) + } + + restoreScrollTop() { + if (!AppStorage.Has('remoteScrollTopPercent')) { + return + } + var scrollTopPercent = AppStorage.Get('remoteScrollTopPercent') + if (scrollTopPercent < 0) { + return + } + this.controllerShow.runJavaScript({ + script: 'document.documentElement.scrollTop = ' + this.controllerShow.getPageHeight() * scrollTopPercent + }) + AppStorage.Delete('remoteScrollTopPercent') + } + + restoreFocus() { + if (!AppStorage.Has('isRemoteFocusOnSearch')) { + return + } + let isRemoteFocusOnSearch = AppStorage.Get('isRemoteFocusOnSearch') + if (isRemoteFocusOnSearch) { + focusControl.requestFocus('searchInput') + } + AppStorage.Delete('isRemoteFocusOnSearch') + } + noteContent = { callbackhtml: (html) => { LogUtil.info(TAG, 'note uuid is:' + this.selectedNoteData.uuid) @@ -95,15 +134,19 @@ export struct NoteContent { LogUtil.info(TAG, " getSrcFromHtml, src[1] : " + html) let imgData = html.split(',')[1]; let imgType = 'png' - if (html.indexOf("jpeg") > 0){ + if (html.indexOf("jpeg") > 0) { imgType = 'jpg' } else if (html.indexOf("gif") > 0) { imgType = 'gif' } + let filePath = "" if (base64regex.test(imgData)) { - imgData = atob(imgData) + let base64 = new util.Base64() + let decodeArr = base64.decodeSync(imgData) + filePath = OperationUtils.saveImageData(decodeArr, imgType) + } else { + filePath = OperationUtils.saveImage(imgData, imgType) } - let filePath = OperationUtils.saveImage(imgData, imgType) realHtml = "file://" + filePath } LogUtil.info(TAG, 'paste info11' + realHtml) @@ -111,6 +154,19 @@ export struct NoteContent { } else { LogUtil.info(TAG, 'paste info22223') } + }, + callbackGetSize: (fontSize) => { + if (fontSize === 16) { + this.selectedNoteData.slider_value = 0 + } else if (fontSize === 18) { + this.selectedNoteData.slider_value = 4 + } else if (fontSize === 24) { + this.selectedNoteData.slider_value = 8 + } else if (fontSize === 32) { + this.selectedNoteData.slider_value = 12 + } else if (fontSize === 48) { + this.selectedNoteData.slider_value = 16 + } } } @@ -130,14 +186,32 @@ export struct NoteContent { .javaScriptProxy({ object: this.noteContent, name: "callBackToApp", // html--> name.method - methodList: ["callbackhtml", "callbackScheduledSave", "callbackPasteImage", "callbackImagePath"], - controller:this.controllerShow + methodList: ["callbackhtml", "callbackScheduledSave", "callbackPasteImage", "callbackImagePath", "callbackGetSize"], + controller: this.controllerShow }) .onPageEnd((e) => { + if (this.dpi <= 240) { + this.controllerShow.runJavaScript({ script: "changeSizeToRk()" }) + } else if (this.dpi <= 320 && this.dpi > 240) { + this.controllerShow.runJavaScript({ script: "changeSizeToPhone()" }) + } else { + this.controllerShow.runJavaScript({ script: "changeSizeToTablet()" }) + } + if (AppStorage.Get('breakPoint') !== 'sm') { + this.controllerShow.runJavaScript({ script: "hiddenButton()" }) + } LogUtil.info(TAG, "finish loadurl") if (this.selectedNoteData) { + let self = this this.controllerShow.runJavaScript({ - script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" + script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')", + callback: () => { + // wait for the image in the note to load + setTimeout(function () { + self.restoreScrollTop() + self.restoreFocus() + }, 100) + } }) } }) @@ -148,23 +222,24 @@ export struct NoteContent { .domStorageAccess(true) .height('70%') .width('100%') + .onScroll((event) => { + this.storeScrollTop(event.yOffset) + }) + .onClick(() => { + // 添加定时器:3s自动保存 + if (timeID) { + clearInterval(timeID) + } + timeID = setInterval(() => { + this.controllerShow.runJavaScript({ script: "scheduledSaveContent()" }) + }, 3000) + LogUtil.info(TAG, "setInterval timeID : " + timeID) + this.issave = 0 + this.editModel = true + }) } .margin({ left: 12, right: 24, top: 16 }) .width(StyleConstants.PERCENTAGE_100) - .onClick(() => { - // 添加定时器:3s自动保存 - if (timeID) { - clearInterval(timeID) - } - timeID = setInterval(() => { - if(this.closeEditContentDialog){ - this.controllerShow.runJavaScript({ script: "scheduledSaveContent()" }) - } - }, 3000) - LogUtil.info(TAG, "setInterval timeID : " + timeID) - this.issave = 0 - this.editModel = true - }) } .height(StyleConstants.PERCENTAGE_100) } @@ -172,11 +247,13 @@ export struct NoteContent { .width(StyleConstants.PERCENTAGE_100) } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(TAG, "aboutToAppear") } - aboutToDisappear(): void{ + aboutToDisappear(): void { + AppStorage.Set("refreshCurrentNote", true) + NoteUtil.refreshAll() clearInterval(timeID) LogUtil.info(TAG, "aboutToDisappear") } @@ -184,9 +261,8 @@ export struct NoteContent { @Component export struct ToolBarComp { - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('Issave') issave: number @Consume('EditModel') editModel: boolean controllerShow: WebController @@ -195,13 +271,8 @@ export struct ToolBarComp { alignment: DialogAlignment.Bottom, autoCancel: true, customStyle: true, - cancel: this.existApp }) - existApp() { - this.closeEditContentDialog = true - } - confirm(excuteJs: string) { this.controllerShow.runJavaScript({ script: excuteJs }) } @@ -220,7 +291,9 @@ export struct ToolBarComp { LogUtil.info(TAG, "zoom, clearInterval timeID : " + timeID) clearInterval(timeID) } + AppStorage.Set("refreshCurrentNote", true) router.back() + NoteUtil.refreshAll() }) .visibility(this.selectedNoteData.is_deleted == Delete.Yes ? Visibility.None : Visibility.Visible) @@ -238,6 +311,7 @@ export struct ToolBarComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, 'ToolBarComp, set continue note success') + NoteUtil.refreshAll() }) }.width(36) .visibility(this.selectedNoteData.is_deleted == Delete.Yes ? Visibility.None : Visibility.Visible) @@ -249,14 +323,15 @@ export struct ToolBarComp { .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); // 清单 this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.setTodo()" }) }) }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.font_style')) @@ -264,21 +339,22 @@ export struct ToolBarComp { .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); LogUtil.info(TAG, 'editContentDialogCtl start') - this.closeEditContentDialog = false this.editContentDialogCtl.open() }) }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.picture_white')).height(24).width(24) .onClick(async () => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); LogUtil.info(TAG, 'startAbility start') await globalThis.noteContext.startAbilityForResult({ parameters: { uri: "singleselect" }, @@ -302,6 +378,9 @@ export struct ToolBarComp { this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.insertImage('" + path + "')" }) + this.issave = 1 + // 保存笔记信息到数据库 + this.controllerShow.runJavaScript({ script: "getHtmlContent()" }) }) } } @@ -310,8 +389,7 @@ export struct ToolBarComp { }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) - + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.undo')) @@ -319,13 +397,14 @@ export struct ToolBarComp { .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); this.controllerShow.runJavaScript({ script: "RICH_EDITOR.undo()" }) }) }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.todo')) @@ -333,13 +412,14 @@ export struct ToolBarComp { .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); this.controllerShow.runJavaScript({ script: "RICH_EDITOR.redo()" }) }) }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { @@ -355,7 +435,7 @@ export struct ToolBarComp { }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) }.width(274) } } @@ -367,8 +447,9 @@ export struct ToolBarComp { @Component export struct NoteContentOverViewComp { @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('isUpdate') isUpdate: boolean = false editTitleDialogCtl: CustomDialogController = new CustomDialogController({ builder: EditTitleDialog({ confirm: this.confirm.bind(this) }), alignment: DialogAlignment.Center, @@ -386,6 +467,7 @@ export struct NoteContentOverViewComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "NoteContentOverViewComp confirm, set continue note success") + NoteUtil.refreshAll() } @Builder MenuBuilder() { @@ -404,8 +486,9 @@ export struct NoteContentOverViewComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "NoteContentOverViewComp MenuBuilder, set continue note success") + NoteUtil.refreshAll() }) - }, noteItem => noteItem.uuid) + }, noteItem => JSON.stringify(noteItem)) }.listDirection(Axis.Vertical) .edgeEffect(EdgeEffect.Spring) .height(this.AllFolderArray.length > 12 ? 504 : (this.AllFolderArray.length - 3) * 56) @@ -421,6 +504,7 @@ export struct NoteContentOverViewComp { justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Row() { Text(this.selectedNoteData.title) + .id(this.isUpdate + '') .fontSize(30) .margin({ left: 12, right: 24 }) .onClick(() => { @@ -432,6 +516,7 @@ export struct NoteContentOverViewComp { Row() { Text(DateUtil.formateDateForNoteContent(new Date(this.selectedNoteData.modified_time))) + .id(this.isUpdate + '') .fontSize(12) .padding({ top: 4, bottom: 4 }) .fontColor($r("app.color.modified_time_font_color")) @@ -440,6 +525,7 @@ export struct NoteContentOverViewComp { Text(FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid)) == folderTextMap["sys_def_myFavorites_uuid"] ? folderTextMap["sys_def_unClassified_uuid"] : FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid))) + .id(this.isUpdate + '') .fontSize(12) .fontColor($r("app.color.list_modified_time_font_color")) Image($r('app.media.triangle')) @@ -464,7 +550,7 @@ export struct NoteContentOverViewComp { @Component struct NoteDataMoveItemComp { @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] private folderItem: FolderData build() { diff --git a/common/component/src/main/ets/components/NoteContentComp.ets b/features/src/main/ets/components/NoteContentComp.ets similarity index 81% rename from common/component/src/main/ets/components/NoteContentComp.ets rename to features/src/main/ets/components/NoteContentComp.ets index 1f130ce92b7870207e6cc50e064fd3732509ffd9..af94a0676e947de6cce3afc5e3e91c94f1813f43 100644 --- a/common/component/src/main/ets/components/NoteContentComp.ets +++ b/features/src/main/ets/components/NoteContentComp.ets @@ -17,18 +17,23 @@ import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import { TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete +import { + TableName, + NoteTableColumn, + SysDefFolderUuid, + Favorite, + Delete } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants' import { EditContentDialog, DeleteDialog, EditTitleDialog } from './CusDialogComp' import FolderUtil from '@ohos/utils/src/main/ets/default/baseUtil/FolderUtil' import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil' import prompt from '@system.prompt' -import { atob, btoa } from 'js-base64' +import util from '@ohos.util' import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils' import mediaquery from '@ohos.mediaquery' -import inputMethod from '@ohos.inputmethod'; +import inputMethod from '@ohos.inputMethod'; import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData' const TAG = "NoteContentComp" @@ -41,7 +46,7 @@ let inSetValue = AppStorage.Link('inSetValue') @Component export struct NoteContentComp { @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('RefreshFlag') refreshFlag: number @Consume('EditModel') editModel: boolean @@ -49,11 +54,55 @@ export struct NoteContentComp { @Consume('LastSectionStatus') lastSectionStatus: number @Consume('Issave') issave: number @Consume('Search') search: boolean - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') + @StorageLink('dpi') dpi: number = 240 controllerShow: WebController private editContentFlag = false @State uri1: string = "" private context = getContext(this) + @StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0 + @StorageLink('isUpdate') isUpdate: boolean = false + @StorageLink('refreshCurrentNote') @Watch('isDataChange') refreshCurrentNote: boolean = false + @Consume('AsideWidth') asideWidth: number + + isDataChange() { + if (!this.refreshCurrentNote) { + return + } + this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" }) + this.refreshCurrentNote = false + } + + storeScrollTop(scrollTop: number) { + if (scrollTop < 0) { + return + } + AppStorage.SetOrCreate('ScrollTopPercent', scrollTop / this.controllerShow.getPageHeight()) + } + + restoreScrollTop() { + if (!AppStorage.Has('remoteScrollTopPercent')) { + return + } + var scrollTopPercent = AppStorage.Get('remoteScrollTopPercent') + if (scrollTopPercent < 0) { + return + } + this.controllerShow.runJavaScript({ + script: 'document.documentElement.scrollTop = ' + this.controllerShow.getPageHeight() * scrollTopPercent + }) + } + + restoreFocus() { + if (!AppStorage.Has('isRemoteFocusOnSearch')) { + return + } + let isRemoteFocusOnSearch = AppStorage.Get('isRemoteFocusOnSearch') + if (isRemoteFocusOnSearch) { + focusControl.requestFocus('searchInput') + } + AppStorage.Delete('isRemoteFocusOnSearch') + } + noteContent = { callbackhtml: (html) => { LogUtil.info(TAG, 'note uuid is:' + this.selectedNoteData.uuid) @@ -117,19 +166,23 @@ export struct NoteContentComp { let realHtml = "" let base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/ if (html && html.indexOf("base64") > 0) { - LogUtil.info(TAG, " getSrcFromHtml, src[1] : " + html) - let imgData = html.split(',')[1]; - let imgType = 'png' - if (html.indexOf("jpeg") > 0){ - imgType = 'jpg' - } else if (html.indexOf("gif") > 0) { - imgType = 'gif' - } - if (base64regex.test(imgData)) { - imgData = atob(imgData) - } - let filePath = OperationUtils.saveImage(imgData, imgType) - realHtml = "file://" + filePath + LogUtil.info(TAG, " getSrcFromHtml, src[1] : " + html) + let imgData = html.split(',')[1]; + let imgType = 'png' + if (html.indexOf("jpeg") > 0) { + imgType = 'jpg' + } else if (html.indexOf("gif") > 0) { + imgType = 'gif' + } + let filePath = "" + if (base64regex.test(imgData)) { + let base64 = new util.Base64() + let decodeArr = base64.decodeSync(imgData) + filePath = OperationUtils.saveImageData(decodeArr, imgType) + } else { + filePath = OperationUtils.saveImage(imgData, imgType) + } + realHtml = "file://" + filePath } LogUtil.info(TAG, 'paste info11-' + realHtml) this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.insertImageHtml('" + realHtml + "')" }) @@ -138,10 +191,17 @@ export struct NoteContentComp { LogUtil.info(TAG, 'paste info22225') } }, - - callbackGetSize: (size) => { - if (size) { - AppStorage.Set('inSetValue', parseInt(size.slice(0, -2)) - 12) + callbackGetSize: (fontSize) => { + if (fontSize === 16) { + this.selectedNoteData.slider_value = 0 + } else if (fontSize === 18) { + this.selectedNoteData.slider_value = 4 + } else if (fontSize === 24) { + this.selectedNoteData.slider_value = 8 + } else if (fontSize === 32) { + this.selectedNoteData.slider_value = 12 + } else if (fontSize === 48) { + this.selectedNoteData.slider_value = 16 } } } @@ -166,13 +226,31 @@ export struct NoteContentComp { object: this.noteContent, name: "callBackToApp", // html--> name.method methodList: ["callbackhtml", "callbackhtmlSave", "callbackScheduledSave", "callbackGetSize", "callbackPasteImage", "callbackImagePath"], - controller:this.controllerShow + controller: this.controllerShow }) .onPageEnd((e) => { + if (this.dpi <= 240) { + this.controllerShow.runJavaScript({ script: "changeSizeToRk()" }) + } else if (this.dpi <= 320 && this.dpi > 240) { + this.controllerShow.runJavaScript({ script: "changeSizeToPhone()" }) + } else { + this.controllerShow.runJavaScript({ script: "changeSizeToTablet()" }) + } + if (AppStorage.Get('breakPoint') !== 'sm') { + this.controllerShow.runJavaScript({ script: "hiddenButton()" }) + } LogUtil.info(TAG, "finish loadurl") - if(this.selectedNoteData){ + if (this.selectedNoteData) { + let self = this this.controllerShow.runJavaScript({ - script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" + script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')", + callback: () => { + // wait for the image in the note to load + setTimeout(function () { + self.restoreScrollTop() + self.restoreFocus() + }, 100) + } }) } // 初次加载为为小屏预览模式 @@ -187,9 +265,12 @@ export struct NoteContentComp { .zoomAccess(false) .height('88%') .width('100%') + .onScroll((event) => { + this.storeScrollTop(event.yOffset) + }) } .margin({ left: 24, right: 24 }) -// .width(StyleConstants.PERCENTAGE_100) + // .width(StyleConstants.PERCENTAGE_100) .enabled(this.selectedNoteData && this.selectedNoteData.is_deleted == Delete.Yes ? false : true) .onClick(() => { this.issave = 0 @@ -198,6 +279,7 @@ export struct NoteContentComp { LogUtil.info(TAG, "isContinue : " + isContinue) // 点击第三屏进入全屏编辑模式 if (this.sectionStatus != 1 || isContinue) { + this.asideWidth = 0 this.lastSectionStatus = this.sectionStatus this.sectionStatus = 1 this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(true)" }) @@ -206,9 +288,7 @@ export struct NoteContentComp { clearInterval(timeId) } timeId = setInterval(() => { - if(this.closeEditContentDialog){ - this.controllerShow.runJavaScript({ script: "scheduledSaveContent()" }) - } + this.controllerShow.runJavaScript({ script: "scheduledSaveContent()" }) }, 3000) LogUtil.info(TAG, "setInterval timeId : " + timeId) // save continue data @@ -219,6 +299,7 @@ export struct NoteContentComp { } }) } + .id(this.isUpdate + '') .height(StyleConstants.PERCENTAGE_100) .visibility(FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0 ? Visibility.Hidden : Visibility.Visible) @@ -234,11 +315,11 @@ export struct NoteContentComp { .width(StyleConstants.PERCENTAGE_100) } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(TAG, "aboutToAppear") } - aboutToDisappear(): void{ + aboutToDisappear(): void { clearInterval(timeId) LogUtil.info(TAG, "aboutToDisappear") } @@ -247,13 +328,14 @@ export struct NoteContentComp { @Component export struct NoteContentOverViewComp { @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllFolderArray') @Watch('getArray') AllFolderArray: FolderData[] = [] - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllFolderArray') @Watch('getArray') AllFolderArray: FolderData[] = [] + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('EditModel') editModel: boolean @Consume('SectionStatus') sectionStatus: number @Consume('RefreshFlag') refreshFlag: number + @StorageLink('isUpdate') isUpdate: boolean = false NoteDataMoveArray: FolderData[] controllerShow: WebController editTitleDialogCtl: CustomDialogController = new CustomDialogController({ @@ -279,6 +361,7 @@ export struct NoteContentOverViewComp { let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid) RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null) + NoteUtil.refreshAll() } @Builder MenuBuilder() { @@ -306,6 +389,7 @@ export struct NoteContentOverViewComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "NoteContentOverViewComp, MenuBuilder, set continue note success") + NoteUtil.refreshAll() }) }, noteItem => noteItem.uuid) }.listDirection(Axis.Vertical) @@ -323,6 +407,7 @@ export struct NoteContentOverViewComp { justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Row() { Text(this.selectedNoteData.title) + .id(this.isUpdate + '') .fontSize(30) .margin({ left: 0, right: 24 }) .onClick(() => { @@ -339,6 +424,7 @@ export struct NoteContentOverViewComp { Row() { Text(DateUtil.formateDateForNoteContent(new Date(this.selectedNoteData.modified_time))) + .id(this.isUpdate + '') .fontSize(12) .padding({ top: 4, bottom: 4 }) .fontColor($r("app.color.modified_time_font_color")) @@ -347,6 +433,7 @@ export struct NoteContentOverViewComp { Text(FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid)) == folderTextMap["sys_def_myFavorites_uuid"] ? folderTextMap["sys_def_unClassified_uuid"] : FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid))) + .id(this.isUpdate + '') .fontSize(12) .fontColor($r("app.color.list_modified_time_font_color")) .padding({ top: 1 }) @@ -355,6 +442,7 @@ export struct NoteContentOverViewComp { .height(12) .margin({ left: 4 }) } + .id(this.isUpdate + '') .padding({ left: 8, right: 8, top: 4, bottom: 4 }) .margin({ left: 8 }) .borderRadius(16) @@ -378,18 +466,18 @@ export struct ToolBarComp { @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('ChooseNote') chooseNote: boolean @Consume('PortraitModel') portraitModel: boolean - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('EditModel') editModel: boolean @Consume('Issave') issave: number controllerShow: WebController private context = getContext(this) - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') noteDataDeleteDialogCtl: CustomDialogController = new CustomDialogController({ builder: DeleteDialog({ onConfirm: this.onDeleteConfirm.bind(this) }), alignment: DialogAlignment.Center, autoCancel: false, customStyle: true, }) + @Consume('AsideWidth') asideWidth: number onDeleteConfirm() { if (this.selectedFolderData.uuid != SysDefFolderUuid.RecentDeletes) { @@ -414,6 +502,7 @@ export struct ToolBarComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "NoteContentOverViewComp, set continue note success") + AppStorage.SetOrCreate('isUpdate', true) } editContentDialogCtl: CustomDialogController = new CustomDialogController({ @@ -421,13 +510,8 @@ export struct ToolBarComp { alignment: DialogAlignment.Bottom, autoCancel: true, customStyle: true, - cancel: this.exisApp }) - exisApp() { - this.closeEditContentDialog = true - } - confirm(excuteJs: string) { this.controllerShow.runJavaScript({ script: excuteJs }) } @@ -442,9 +526,11 @@ export struct ToolBarComp { if (this.sectionStatus != 1) { this.lastSectionStatus = this.sectionStatus this.sectionStatus = 1 + this.asideWidth = 0 this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(true)" }) } else { if (this.lastSectionStatus != undefined) { + this.asideWidth = 200 // 切换为小屏预览模式 this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(false)" }) this.sectionStatus = this.lastSectionStatus @@ -452,7 +538,8 @@ export struct ToolBarComp { LogUtil.info(TAG, "close note" + this.selectedNoteData.uuid) this.controllerShow.runJavaScript({ script: "saveHtmlContent()" }) //退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); // 清除定时器 if (timeId != undefined) { LogUtil.info(TAG, "zoom, clearInterval timeId : " + timeId) @@ -466,6 +553,7 @@ export struct ToolBarComp { // save continue data AppStorage.SetOrCreate('ContinueSection', this.sectionStatus) LogUtil.info(TAG, "ToolBarComp, set continue section success") + NoteUtil.refreshAll() }) .visibility(!this.selectedNoteData ? Visibility.None : this.selectedNoteData.is_deleted == Delete.Yes ? Visibility.None : Visibility.Visible) @@ -487,7 +575,7 @@ export struct ToolBarComp { let context: any = getContext(this) let resource = { bundleName: "com.ohos.note", - moduleName: "tablet", + moduleName: "default", id: $r('app.string.restore').id }; context.resourceManager.getString(resource, (error, value) => { @@ -512,6 +600,7 @@ export struct ToolBarComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "recover, set continue note success") + NoteUtil.refreshAll() }) }.width(72) } else if (this.editModel == true) { @@ -524,7 +613,8 @@ export struct ToolBarComp { // 清单 this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.setTodo()" }) // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); }) }.width(42) .height(42) @@ -537,8 +627,8 @@ export struct ToolBarComp { .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); - this.closeEditContentDialog = false + // @ts-ignore + inputMethod.getController().stopInputSession(); this.editContentDialogCtl.open() }) }.width(42) @@ -551,8 +641,25 @@ export struct ToolBarComp { .height(24) .width(24) .onClick(async () => { + let permissionList: Array = [ + "ohos.permission.READ_MEDIA", + "ohos.permission.WRITE_MEDIA", + ] + let context: any = getContext(this); + await context.requestPermissionsFromUser(permissionList).then((data) => { + LogUtil.info(TAG, 'data permissions : ' + data.permissions) + LogUtil.info(TAG, 'data result: ' + data.authResults) + let sum = 0 + for (let i = 0; i < data.authResults.length; i++) { + sum += data.authResults[i] + } + LogUtil.info(TAG, 'request permissions sum: ' + sum) + }).catch((err) => { + LogUtil.warn(TAG, 'failed to requestPermissionsFromUser : ' + err.code); + }) // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); LogUtil.info(TAG, 'startAbility start') await globalThis.noteContext.startAbilityForResult({ parameters: { uri: "singleselect" }, @@ -576,9 +683,13 @@ export struct ToolBarComp { this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.insertImage('" + path + "')" }) + this.issave = 1 + // 保存笔记信息到数据库 + this.controllerShow.runJavaScript({ script: "getHtmlContent()" }) }) } } + NoteUtil.refreshAll() }); }) }.width(42) @@ -586,14 +697,14 @@ export struct ToolBarComp { .borderRadius(8) .backgroundColor($r('app.color.color_fffffB')) - Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.undo')) .height(24) .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); this.controllerShow.runJavaScript({ script: "RICH_EDITOR.undo()" }) }) }.width(42) @@ -607,7 +718,8 @@ export struct ToolBarComp { .width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); this.controllerShow.runJavaScript({ script: "RICH_EDITOR.redo()" }) }) }.width(42) @@ -656,6 +768,7 @@ export struct ToolBarComp { AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "ToolBarComp, set continue note success") } + NoteUtil.refreshAll() }) Image($r('app.media.delete')) .height(24) @@ -675,7 +788,8 @@ export struct ToolBarComp { @Component struct NoteDataMoveItemCompTablet { @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('isUpdate') isUpdate: boolean = false folderItem: FolderData uuid: String @@ -683,6 +797,7 @@ struct NoteDataMoveItemCompTablet { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.Center }) { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap }) { Image(FolderUtil.getFolderIcon(this.folderItem.uuid)) + .id(this.isUpdate + '') .objectFit(ImageFit.Fill) .width(24) .height(24) @@ -694,6 +809,7 @@ struct NoteDataMoveItemCompTablet { Column() { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) { Text(FolderUtil.getFolderText(this.folderItem)) + .id(this.isUpdate + '') .padding({ top: 3 }) .fontSize(16) .fontColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid == this.uuid ? this.folderItem.uuid : '', this.folderItem.uuid == this.uuid)) @@ -713,6 +829,7 @@ struct NoteDataMoveItemCompTablet { } .padding({ left: 16 }) } + .id(this.isUpdate + '') .width('100%') .height(56) .visibility(FolderUtil.isFolderMoveIn(this.folderItem) ? Visibility.Visible : Visibility.None) diff --git a/common/component/src/main/ets/components/NoteContentCompPortrait.ets b/features/src/main/ets/components/NoteContentCompPortrait.ets similarity index 74% rename from common/component/src/main/ets/components/NoteContentCompPortrait.ets rename to features/src/main/ets/components/NoteContentCompPortrait.ets index 515b150e203b6dd39a3126eaaf52ac09a0eb5bfa..88cfec4347256a38cf28bc6acc8c8509c5c677a5 100644 --- a/common/component/src/main/ets/components/NoteContentCompPortrait.ets +++ b/features/src/main/ets/components/NoteContentCompPortrait.ets @@ -17,8 +17,13 @@ import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import { atob } from 'js-base64' -import { TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete +import util from '@ohos.util' +import { + TableName, + NoteTableColumn, + SysDefFolderUuid, + Favorite, + Delete } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants' import { EditContentDialogPortrait, DeleteDialog, EditTitleDialog } from './CusDialogComp' @@ -28,7 +33,7 @@ import prompt from '@system.prompt' import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import OperationUtils from '@ohos/utils/src/main/ets/default/baseUtil/OperationUtils' import router from '@system.router' -import inputMethod from '@ohos.inputmethod'; +import inputMethod from '@ohos.inputMethod'; import { folderTextMap } from '@ohos/utils/src/main/ets/default/model/NoteBaseData' import rs from '@ohos.resourceManager' @@ -49,11 +54,54 @@ async function routePage() { export struct NoteContentCompPortrait { @Provide('SelectedNoteData') selectedNoteData: NoteData = AppStorage.Get('NewNote') @Provide('SelectedFolderData') selectedFolderData: FolderData = AppStorage.Get("NewFolder") - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Provide('EditModel') editModel: boolean = false - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') + @StorageLink('dpi') dpi: number = 240 controllerShow: WebController private editContentFlag = false + @StorageLink('ScrollTopPercent') scrollTopPercent: number = 0.0 + editContentDialogCtl: CustomDialogController = new CustomDialogController({ + builder: EditContentDialogPortrait({ confirm: this.confirm.bind(this) }), + alignment: DialogAlignment.Bottom, + autoCancel: true, + customStyle: true, + }) + + confirm(excuteJs: string) { + this.controllerShow.runJavaScript({ script: excuteJs }) + } + + storeScrollTop(scrollTop: number) { + if (scrollTop < 0) { + return + } + AppStorage.SetOrCreate('ScrollTopPercent', scrollTop / this.controllerShow.getPageHeight()) + } + + restoreScrollTop() { + if (!AppStorage.Has('remoteScrollTopPercent')) { + return + } + var scrollTopPercent = AppStorage.Get('remoteScrollTopPercent') + if (scrollTopPercent < 0) { + return + } + this.controllerShow.runJavaScript({ + script: 'document.documentElement.scrollTop = ' + this.controllerShow.getPageHeight() * scrollTopPercent + }) + } + + restoreFocus() { + if (!AppStorage.Has('isRemoteFocusOnSearch')) { + return + } + let isRemoteFocusOnSearch = AppStorage.Get('isRemoteFocusOnSearch') + if (isRemoteFocusOnSearch) { + focusControl.requestFocus('searchInput') + } + AppStorage.Delete('isRemoteFocusOnSearch') + } + noteContent = { callbackhtml: (html) => { LogUtil.info(TAG, 'note uuid is:' + this.selectedNoteData.uuid) @@ -100,15 +148,19 @@ export struct NoteContentCompPortrait { LogUtil.info(TAG, " getSrcFromHtml, src[1] : " + html) let imgData = html.split(',')[1]; let imgType = 'png' - if (html.indexOf("jpeg") > 0){ + if (html.indexOf("jpeg") > 0) { imgType = 'jpg' } else if (html.indexOf("gif") > 0) { imgType = 'gif' } + let filePath = "" if (base64regex.test(imgData)) { - imgData = atob(imgData) + let base64 = new util.Base64() + let decodeArr = base64.decodeSync(imgData) + filePath = OperationUtils.saveImageData(decodeArr, imgType) + } else { + filePath = OperationUtils.saveImage(imgData, imgType) } - let filePath = OperationUtils.saveImage(imgData, imgType) realHtml = "file://" + filePath } LogUtil.info(TAG, 'paste info11' + realHtml) @@ -116,6 +168,73 @@ export struct NoteContentCompPortrait { } else { LogUtil.info(TAG, 'paste info22224') } + }, + callbackGetSize: (fontSize) => { + if (fontSize === 16) { + this.selectedNoteData.slider_value = 0 + } else if (fontSize === 18) { + this.selectedNoteData.slider_value = 4 + } else if (fontSize === 24) { + this.selectedNoteData.slider_value = 8 + } else if (fontSize === 32) { + this.selectedNoteData.slider_value = 12 + } else if (fontSize === 48) { + this.selectedNoteData.slider_value = 16 + } + }, + addToDo: () => { + // 清单 + this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.setTodo()" }) + }, + chooseStyle: () => { + this.editContentDialogCtl.open() + }, + openAlbum: async () => { + let permissionList: Array = [ + "ohos.permission.READ_MEDIA", + "ohos.permission.WRITE_MEDIA", + ] + let context: any = getContext(this); + await context.requestPermissionsFromUser(permissionList).then((data) => { + LogUtil.info(TAG, 'data permissions : ' + data.permissions) + LogUtil.info(TAG, 'data result: ' + data.authResults) + let sum = 0 + for (let i = 0; i < data.authResults.length; i++) { + sum += data.authResults[i] + } + LogUtil.info(TAG, 'request permissions sum: ' + sum) + }).catch((err) => { + LogUtil.warn(TAG, 'failed to requestPermissionsFromUser : ' + err.code); + }) + LogUtil.info(TAG, 'startAbility start') + await globalThis.noteContext.startAbilityForResult({ + parameters: { uri: "singleselect" }, + bundleName: "com.ohos.photos", + abilityName: "com.ohos.photos.MainAbility", + }).then(v => { + let want = v['want']; + if (want != null && want != undefined) { + let param = want['parameters']; + let imageUri = "" + if (param != null && param != undefined) { + let uri = param['select-item-list']; + imageUri = uri; + } + LogUtil.info(TAG, "image url" + imageUri) + // 拷贝 + if (imageUri != null && imageUri != "") { + OperationUtils.copy(imageUri).then((uriPath) => { + var path = "file://" + uriPath + LogUtil.info(TAG, 'image uri is:' + path) + this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.getFocus()" }) + this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.insertImage('" + path + "')" }) + }) + } + } + }); + }, + getBreakPoint: () => { + return AppStorage.Get('breakPoint'); } } @@ -134,13 +253,28 @@ export struct NoteContentCompPortrait { .javaScriptProxy({ object: this.noteContent, name: "callBackToApp", // html--> name.method - methodList: ["callbackhtml", "callbackScheduledSave", "callbackPasteImage", "callbackImagePath"], - controller:this.controllerShow + methodList: ["callbackhtml", "callbackScheduledSave", "callbackPasteImage", "callbackImagePath", "addToDo", "chooseStyle", "openAlbum", "callbackGetSize", "getBreakPoint"], + controller: this.controllerShow }) .onPageEnd((e) => { + if (this.dpi <= 240) { + this.controllerShow.runJavaScript({ script: "changeSizeToRk()" }) + } else if (this.dpi <= 320 && this.dpi > 240) { + this.controllerShow.runJavaScript({ script: "changeSizeToPhone()" }) + } else { + this.controllerShow.runJavaScript({ script: "changeSizeToTablet()" }) + } LogUtil.info(TAG, "finish loadurl") + let self = this this.controllerShow.runJavaScript({ - script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" + script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')", + callback: () => { + // wait for the image in the note to load + setTimeout(function () { + self.restoreScrollTop() + self.restoreFocus() + }, 100) + } }) }) .imageAccess(true) @@ -150,6 +284,9 @@ export struct NoteContentCompPortrait { .zoomAccess(false) .height('100%') .width('100%') + .onScroll((event) => { + this.storeScrollTop(event.yOffset) + }) } .flexShrink(1) .onClick(() => { @@ -158,9 +295,7 @@ export struct NoteContentCompPortrait { } // 添加定时器:3s自动保存 time_id = setInterval(() => { - if(this.closeEditContentDialog){ - this.controllerShow.runJavaScript({ script: "scheduledSaveContent()" }) - } + this.controllerShow.runJavaScript({ script: "scheduledSaveContent()" }) }, 3000) LogUtil.info(TAG, "setInterval time_id : " + time_id) this.editModel = true @@ -169,21 +304,21 @@ export struct NoteContentCompPortrait { .width(StyleConstants.PERCENTAGE_100) } .flexShrink(1) - .margin({ left: 24, right: 24 }) + .padding({ left: 24, right: 24 }) - EditNoteCompForPortrait({ controllerShow: this.controllerShow }) DeleteNoteComp() } .height(StyleConstants.PERCENTAGE_100) .width(StyleConstants.PERCENTAGE_100) } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(TAG, "aboutToAppear") } - aboutToDisappear(): void{ + aboutToDisappear(): void { clearInterval(time_id) + NoteUtil.refreshAll() LogUtil.info(TAG, "aboutToDisappear") } } @@ -191,8 +326,9 @@ export struct NoteContentCompPortrait { @Component export struct NoteContentOverViewComp { @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('isUpdate') isUpdate: boolean = false NoteDataMoveArray: FolderData[] editTitleDialogCtl: CustomDialogController = new CustomDialogController({ builder: EditTitleDialog({ confirm: this.confirm.bind(this) }), @@ -216,6 +352,7 @@ export struct NoteContentOverViewComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, 'NoteContentOverViewComp, MenuBuilder, set continue note success') + NoteUtil.refreshAll() } @Builder MenuBuilder() { @@ -235,6 +372,7 @@ export struct NoteContentOverViewComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, 'MenuBuilder, set continue note success') + NoteUtil.refreshAll() }) }, noteItem => noteItem.uuid) } @@ -254,7 +392,9 @@ export struct NoteContentOverViewComp { Flex({ direction: FlexDirection.Column, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Row() { - Text(this.selectedNoteData.title).fontSize(30).fontWeight(FontWeight.Medium) + Text(this.selectedNoteData.title) + .id(this.isUpdate + '') + .fontSize(30).fontWeight(FontWeight.Medium) .onClick(() => { clearInterval(time_id) this.editTitleDialogCtl.open() @@ -264,6 +404,7 @@ export struct NoteContentOverViewComp { Row() { Text(DateUtil.formateDateForNoteContent(new Date(this.selectedNoteData.modified_time))) + .id(this.isUpdate + '') .fontSize(12) .padding({ top: 4, bottom: 4 }) .fontColor($r("app.color.modified_time_font_color")) @@ -271,6 +412,7 @@ export struct NoteContentOverViewComp { Text(FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid)) == folderTextMap["sys_def_myFavorites_uuid"] ? folderTextMap["sys_def_unClassified_uuid"] : FolderUtil.getFolderText(FolderUtil.getFolderData(AppStorage.Get('AllFolderArray'), this.selectedNoteData.folder_uuid))) + .id(this.isUpdate + '') .fontColor($r('app.color.folder_color_99182431')) .fontSize(12) Image($r('app.media.triangle')) @@ -278,6 +420,7 @@ export struct NoteContentOverViewComp { .height(12) .margin({ left: 4 }) } + .id(this.isUpdate + '') .padding({ left: 8, right: 8, top: 4, bottom: 4 }) .margin({ left: 8 }) .borderRadius(16) @@ -297,7 +440,7 @@ export struct ToolBarComp { @Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('EditModel') editModel: boolean - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') controllerShow: WebController onDeleteConfirm() { @@ -317,6 +460,7 @@ export struct ToolBarComp { RdbStoreUtil.delete(predicates_note, null) routePage() } + AppStorage.SetOrCreate('isUpdate', true) } noteDataDeleteDialogCtl: CustomDialogController = new CustomDialogController({ @@ -333,7 +477,7 @@ export struct ToolBarComp { Image($r('app.media.back')) .height(24) .width(24) - .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) + .responseRegion({ width: 54, height: 54 }) .onClick(() => { this.controllerShow.runJavaScript({ script: "getHtmlContent()" }) // 清除定时器 @@ -342,6 +486,7 @@ export struct ToolBarComp { clearInterval(time_id) } router.back() + NoteUtil.refreshAll() }) if (this.editModel == false) { @@ -356,11 +501,15 @@ export struct ToolBarComp { RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null) if (this.selectedFolderData.uuid === SysDefFolderUuid.MyFavorites) { this.selectedNoteData = NoteUtil.getFirstNoteData(AppStorage.Get('AllNoteArray'), SysDefFolderUuid.MyFavorites) + this.controllerShow.runJavaScript({ + script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" + }) + // save continue data + let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) + AppStorage.SetOrCreate('ContinueNote', continueNote) + LogUtil.info(TAG, "ToolBarComp, set continue note success") } - // save continue data - let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) - AppStorage.SetOrCreate('ContinueNote', continueNote) - LogUtil.info(TAG, 'ToolBarComp, set continue note success') + NoteUtil.refreshAll() }) Image($r('app.media.delete')).height(24).width(24) .onClick(() => { @@ -374,25 +523,27 @@ export struct ToolBarComp { Image($r('app.media.undo')).height(24).width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.undo()" }) }) }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.todo')).height(24).width(24) .onClick(() => { // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.redo()" }) }) }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) Button({ type: ButtonType.Normal, stateEffect: true }) { Image($r('app.media.tick_thin')).height(24).width(24) @@ -404,7 +555,7 @@ export struct ToolBarComp { }.width(42) .height(42) .borderRadius(8) - .backgroundColor($r('app.color.color_ffffff')) + .backgroundColor($r('app.color.color_fffffB')) } .width(130) .visibility(this.selectedNoteData.is_deleted == Delete.Yes ? Visibility.None : Visibility.Visible) @@ -417,8 +568,8 @@ export struct ToolBarComp { @Component export struct DeleteNoteComp { - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('RefreshFlag') refreshFlag: number @Consume('SelectedNoteData') selectedNoteData: NoteData; @@ -444,8 +595,10 @@ export struct DeleteNoteComp { let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid) RdbStoreUtil.delete(predicates_note, null) + NoteUtil.refreshAll() routePage() } + AppStorage.SetOrCreate('isUpdate', false) } build() { @@ -479,7 +632,7 @@ export struct DeleteNoteComp { let context: any = getContext(this) let resource = { bundleName: "com.ohos.note", - moduleName: "tablet", + moduleName: "default", id: $r('app.string.restore').id }; context.resourceManager.getString(resource, (error, value) => { @@ -494,6 +647,7 @@ export struct DeleteNoteComp { let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable) predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid) RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null) + NoteUtil.refreshAll() }) Text($r("app.string.recover")) .fontSize(10) @@ -508,129 +662,15 @@ export struct DeleteNoteComp { .width(360) .height(56) .visibility(this.selectedNoteData.is_deleted == Delete.Yes ? - Visibility.Visible : Visibility.None) - } -} - -@Component -export struct EditNoteCompForPortrait { - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') - @Consume('SelectedFolderData') selectedFolderData: FolderData - @Consume('SelectedNoteData') selectedNoteData: NoteData; - @Consume('EditModel') editModel: boolean - @StorageLink('closeEditContentDialog') closeEditContentDialog: boolean = AppStorage.Link('closeEditContentDialog') - controllerShow: WebController - editContentDialogCtl: CustomDialogController = new CustomDialogController({ - builder: EditContentDialogPortrait({ confirm: this.confirm.bind(this) }), - alignment: DialogAlignment.Bottom, - autoCancel: true, - customStyle: true, - cancel: this.exissApp - }) - - exissApp() { - this.closeEditContentDialog = true - } - - confirm(excuteJs: string) { - this.controllerShow.runJavaScript({ script: excuteJs }) - } - - build() { - Row() { - Column() { - Image($r('app.media.circle_tick1')) - .width(24) - .height(24) - .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) - .onClick(() => { - // 清单 - this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.setTodo()" }) - }) - Text($r("app.string.list")) - .fontSize(10) - .fontColor($r('app.color.list_font_color')) - .padding({ top: 5 }) - } - .height("100%") - .width(120) - .justifyContent(FlexAlign.Center) - .alignItems(HorizontalAlign.Center) - - Column() { - Image($r('app.media.font_style')) - .width(24) - .height(24) - .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) - .onClick(() => { - this.closeEditContentDialog = false - this.editContentDialogCtl.open() - }) - Text($r("app.string.style")) - .fontSize(10) - .fontColor($r('app.color.style_font_color')) - .padding({ top: 5 }) - } - .height("100%") - .width(120) - .justifyContent(FlexAlign.Center) - .alignItems(HorizontalAlign.Center) - - Column() { - Image($r('app.media.picture_white')) - .width(24) - .height(24) - .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) - .onClick(async () => { - LogUtil.info(TAG, 'startAbility start') - await globalThis.noteContext.startAbilityForResult({ - parameters: { uri: "singleselect" }, - bundleName: "com.ohos.photos", - abilityName: "com.ohos.photos.MainAbility", - }).then(v => { - let want = v['want']; - if (want != null && want != undefined) { - let param = want['parameters']; - let imageUri = "" - if (param != null && param != undefined) { - let uri = param['select-item-list']; - imageUri = uri; - } - LogUtil.info(TAG, "image url" + imageUri) - // 拷贝 - if (imageUri != null && imageUri != "") { - OperationUtils.copy(imageUri).then((uriPath) => { - var path = "file://" + uriPath - LogUtil.info(TAG, 'image uri is:' + path) - this.controllerShow.runJavaScript({ script: "javascript:RICH_EDITOR.insertImage('" + path + "')" }) - }) - } - } - }); - }) - - Text($r("app.string.photo")) - .fontSize(10) - .fontColor($r('app.color.photo_font_color')) - .padding({ top: 5 }) - } - .height("100%") - .width(120) - .justifyContent(FlexAlign.Center) - .alignItems(HorizontalAlign.Center) - } - .width(360) - .height(56) - .visibility(this.selectedNoteData.is_deleted == Delete.No && this.editModel == true ? - Visibility.Visible : Visibility.None) + Visibility.Visible : Visibility.None) } } @Component struct NoteDataMoveItemCompMenu { @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = [] + @StorageLink('isUpdate') isUpdate: boolean = false folderItem: FolderData uuid: String @@ -638,6 +678,7 @@ struct NoteDataMoveItemCompMenu { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.Center }) { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap }) { Image(FolderUtil.getFolderIcon(this.folderItem.uuid)) + .id(this.isUpdate + '') .objectFit(ImageFit.Fill) .width(24) .height(24) @@ -649,6 +690,7 @@ struct NoteDataMoveItemCompMenu { Column() { Flex({ alignItems: ItemAlign.Center, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween }) { Text(FolderUtil.getFolderText(this.folderItem)) + .id(this.isUpdate + '') .fontSize(16) .fontColor(FolderUtil.getFolderIconColor(this.AllFolderArray, this.folderItem.uuid == this.uuid ? this.folderItem.uuid : '', this.folderItem.uuid == this.uuid)) .textAlign(TextAlign.Center) @@ -668,6 +710,7 @@ struct NoteDataMoveItemCompMenu { } .padding({ left: 16 }) } + .id(this.isUpdate + '') .width('100%') .height(56) .visibility(FolderUtil.isFolderMoveIn(this.folderItem) ? Visibility.Visible : Visibility.None) diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/features/src/main/ets/components/NoteListComp.ets similarity index 82% rename from common/component/src/main/ets/components/NoteListComp.ets rename to features/src/main/ets/components/NoteListComp.ets index 833eaa5adbe89c9479411abe31e41f472e91dfdd..1c4e620ab64a30b2156c6530f5ea9008324dbef7 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/features/src/main/ets/components/NoteListComp.ets @@ -16,7 +16,14 @@ import DateUtil from '@ohos/utils/src/main/ets/default/baseUtil/DateUtil' import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import { TableName, NoteTableColumn, SysDefFolderUuid, Favorite, Delete, Top, NoteType +import { + TableName, + NoteTableColumn, + SysDefFolderUuid, + Favorite, + Delete, + Top, + NoteType } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData' import { NoteDataMoveDialog, DeleteDialog } from './CusDialogComp' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' @@ -28,6 +35,7 @@ import SearchModel from '@ohos/utils/src/main/ets/default/model/searchModel/Sear import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import router from '@system.router'; import rs from '@ohos.resourceManager' +import inputMethod from '@ohos.inputMethod'; const TAG = "NoteListComp" @@ -45,14 +53,14 @@ async function routePage() { // Note list component @Component export struct NoteListComp { - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('Search') search: boolean controllerShow: WebController + @Consume('AsideWidth') asideWidth: number build() { Flex({ direction: FlexDirection.Column }) { - Flex({ direction: FlexDirection.Column }) { NoteOverViewComp({ controllerShow: this.controllerShow }) Column() { @@ -73,19 +81,21 @@ export struct NoteListComp { .width('100%') } - aboutToAppear(): void{ + aboutToAppear(): void { + AppStorage.SetOrCreate('isUpdate', false) LogUtil.info(TAG, "aboutToAppear") } - aboutToDisappear(): void{ + aboutToDisappear(): void { LogUtil.info(TAG, "aboutToDisappear") } } @Component struct NoteOverViewComp { - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('breakPoint') breakPoints: string = AppStorage.Get('breakPoint') + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('RefreshFlag') refreshFlag: number @Consume('SectionStatus') sectionStatus: number @@ -94,21 +104,32 @@ struct NoteOverViewComp { @Consume('Search') search: boolean @Consume('PortraitModel') portraitModel: boolean controllerShow: WebController + @State noteNumber: any = undefined + @StorageLink('isUpdate') isUpdate: boolean = false + @Consume('AsideWidth') asideWidth: number build() { Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Column() { Image($r("app.media.suojin_back")) - .height(this.portraitModel ? 24 : '12lpx') - .width(this.portraitModel ? 24 : '12lpx') - .responseRegion({ x: -15.0, y: -15.0, width: this.portraitModel ? 54 : '27lpx', height: this.portraitModel ? 54 : '27lpx'}) - .margin({ right: this.sectionStatus != 3 ? this.portraitModel ? 24 : '12lpx' : 0 }) // 两分栏时缩进图片与右边有个24的间距 - .visibility(this.sectionStatus != 3 ? Visibility.Visible : Visibility.None) + .height(24) + .width(24) + .responseRegion({ + x: -15.0, + y: -15.0, + width: 54, + height: 54 + }) + .margin({ right: 24 }) // 两分栏时缩进图片与右边有个24的间距 + .visibility(this.breakPoints == 'lg' && this.sectionStatus == 3 ? Visibility.None : Visibility.Visible) .onClick(() => { - if (this.sectionStatus == 1) { - this.expandStatus = !this.expandStatus + if (this.breakPoints == 'sm' || this.breakPoints == 'md') { + animateTo({ duration: 200 }, () => { + this.expandStatus = !this.expandStatus + }) } else { + this.asideWidth = 200 this.sectionStatus = (this.sectionStatus == 3 ? 2 : 3) // save continue data AppStorage.SetOrCreate('ContinueSection', this.sectionStatus) @@ -124,42 +145,51 @@ struct NoteOverViewComp { alignItems: ItemAlign.Start }) { Text(FolderUtil.getFolderText(this.selectedFolderData)) - .fontSize(this.portraitModel ? 30 : '15lpx') + .id(this.isUpdate + '') + .maxLines(1) + .fontSize(30) .fontColor($r("app.color.all_notes_font_color")) .fontWeight(FontWeight.Medium) .textOverflow({ overflow: TextOverflow.Ellipsis }) Row() { Text(FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid).toString()) - .fontSize(this.portraitModel ? 14 : '7lpx') + .id(this.isUpdate + '') + .maxLines(1) + .fontSize(14) .fontColor($r("app.color.num_of_notes_font_color")) Text($r("app.string.noteslist")) - .fontSize(this.portraitModel ? 14 : '7lpx') + .fontSize(14) .fontColor($r("app.color.num_of_notes_font_color")) .textOverflow({ overflow: TextOverflow.Ellipsis }) } - .margin({ top: this.portraitModel ? 5 : '2.5lpx' }) + .margin({ top: 5 }) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) }.visibility(this.longpress ? Visibility.None : Visibility.Visible) Row() { Image($r("app.media.cross")) - .height(this.portraitModel ? 24 : '12lpx') - .width(this.portraitModel ? 24 : '12lpx') - .responseRegion({ x: -15.0, y: -15.0, width: this.portraitModel ? 54 : '27lpx', height: this.portraitModel ? 54 : '27lpx' }) + .height(24) + .width(24) + .responseRegion({ + x: -15.0, + y: -15.0, + width: 54, + height: 54 + }) .onClick(() => { this.longpress = false this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) }) Text(this.CheckedNoteArray.length == 0 ? $r("app.string.none_selected") : $r("app.string.selected", this.CheckedNoteArray.length)) - .fontSize(this.portraitModel ? 20 : '10lpx') + .fontSize(20) .fontColor($r("app.color.note_selected_font_color")) - .margin({ left: this.portraitModel ? 16 : '8lpx' }) + .margin({ left: 16 }) .textOverflow({ overflow: TextOverflow.Ellipsis }) .fontWeight(FontWeight.Medium) }.alignItems(VerticalAlign.Center) .visibility(this.longpress ? Visibility.Visible : Visibility.None) - }.padding({ top: this.portraitModel ? 8 : '4lpx', bottom: this.portraitModel ? 8 : '4lpx' }) + }.padding({ top: 8, bottom: 8 }) .height('100%') AddNoteComp({ controllerShow: this.controllerShow }) @@ -167,8 +197,11 @@ struct NoteOverViewComp { Text(this.refreshFlag.toString()).visibility(Visibility.None) } .width('100%') - .height(this.portraitModel ? 82 : '41lpx') - .padding({ left: this.sectionStatus == 2 ? this.portraitModel ? 24 : '12lpx' : this.portraitModel ? 36 : '18lpx', right: this.portraitModel ? 24 : '12lpx' }) // 两分栏时缩进图标与左侧不需要间距 + .height(82) + .padding({ + left: this.sectionStatus == 2 ? 24 : 36, + right: 24 + }) // 两分栏时缩进图标与左侧不需要间距 .visibility(this.search ? Visibility.None : Visibility.Visible) } } @@ -180,14 +213,27 @@ export struct NoteItemComp { controllerShow: WebController @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('SelectedNoteData') selectedNoteData: NoteData - @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @Consume('Longpress') longpress: boolean + @StorageLink('AllFolderArray') AllFolderArray: FolderData[] = AppStorage.Link('AllFolderArray') + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] @Consume('ChooseNote') chooseNote: boolean @Consume('RefreshFlag') refreshFlag: number @Consume('Search') search: boolean @Consume('selectedAll') selectedAll: boolean @Consume('PortraitModel') portraitModel: boolean + @State isChecked: boolean = undefined + @Consume('Longpress') @Watch('isLongPress') longpress: boolean + @StorageLink('isUpdate') isUpdate: boolean = false + + isLongPress() { + if (this.longpress) { + this.isChecked = false + } + } + + updateAndGetChecked() { + this.isChecked = NoteUtil.isNoteChecked(this.CheckedNoteArray, this.noteItem) + return this.isChecked + } build() { Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { @@ -196,79 +242,74 @@ export struct NoteItemComp { Column({ space: 2 }) { Row({ space: 8 }) { Image($r("app.media.verticalBar")) - .height(this.portraitModel ? 16 : '8lpx') - .width(this.portraitModel ? 4 : '2lpx') + .id(this.isUpdate + '') + .height(16) + .width(4) .fillColor(NoteUtil.getVerticalBarBgColor(AppStorage.Get('AllFolderArray'), this.noteItem.folder_uuid)) - Text() { - ForEach(this.spans.map((item1, index1) => { - return { index: index1, data: item1 } - }), item => { - - if (item.data.type == 0) { - Span(item.data.text) - .fontColor($r("app.color.note_title_font_color")) - .fontSize(this.portraitModel ? 16 : '8lpx') - .fontWeight(FontWeight.Medium) - } else if (item.data.type == 1) { - Span(item.data.text) - .fontColor($r("app.color.note_title_font_color_blue")) - .fontSize(this.portraitModel ? 16 : '8lpx') - .fontWeight(FontWeight.Medium) - } - }, - item => item.index) - }.textOverflow({ overflow: TextOverflow.Ellipsis }) + Text(this.noteItem.title) + .fontSize(16) + .maxLines(1) + .textOverflow({ overflow: TextOverflow.Ellipsis }) } Row({ space: 4 }) { Text(DateUtil.formateDateForNoteTitle(new Date(this.noteItem.modified_time))) - .fontSize(this.portraitModel ? 14 : '7lpx') + .id(this.isUpdate + '') + .maxLines(1) + .fontSize(14) .fontColor($r("app.color.list_modified_time_font_color")) .fontWeight(FontWeight.Regular) .textOverflow({ overflow: TextOverflow.Ellipsis }) Image($r("app.media.favorite")) - .height(this.portraitModel ? 16 : '8lpx') - .width(this.portraitModel ? 16 : '8lpx') + .height(16) + .width(16) .visibility(this.noteItem.is_favorite == Favorite.Yes ? Visibility.Visible : Visibility.None) Image($r("app.media.topped")) - .height(this.portraitModel ? 16 : '8lpx') - .width(this.portraitModel ? 16 : '8lpx') + .height(16) + .width(16) .visibility(this.noteItem.is_top == Top.Yes ? Visibility.Visible : Visibility.None) } - .padding({ left: this.portraitModel ? 12 : '6lpx' }) + .padding({ left: 12 }) }.alignItems(HorizontalAlign.Start) }.flexShrink(1) Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Stack({ alignContent: Alignment.Center }) { Image(this.noteItem.content_img) - .height(this.portraitModel ? 47 : '23.5lpx') - .width(this.portraitModel ? 47 : '23.5lpx') - .borderRadius(this.portraitModel ? 12 : '6lpx') - .border({ width: this.portraitModel ? 0.5 : '0.25lpx', color: '#19182431' }) + .id(this.isUpdate + '') + .height(47) + .width(47) + .borderRadius(12) + .border({ width: 0.5, color: '#19182431' }) .visibility(this.noteItem.content_img ? Visibility.Visible : Visibility.None) } Stack({ alignContent: Alignment.Center }) { Image($r("app.media.unChecked")) - .height(this.portraitModel ? 24 : '12lpx') - .width(this.portraitModel ? 24 : '12lpx') + .height(24) + .width(24) Image($r("app.media.checked")) - .width(this.portraitModel ? 24 : '12lpx') - .height(this.portraitModel ? 24 : '12lpx') - .visibility(NoteUtil.isNoteChecked(this.CheckedNoteArray, this.noteItem) ? Visibility.Visible : Visibility.None) - }.width(this.portraitModel ? 24 : '12lpx') - .height(this.portraitModel ? 24 : '12lpx') + .width(24) + .height(24) + .visibility(this.updateAndGetChecked() ? Visibility.Visible : Visibility.None) + .id(this.isUpdate + '') + }.width(24) + .height(24) .visibility(this.longpress ? Visibility.Visible : Visibility.None) } .flexShrink(0) - .height(this.portraitModel ? 48 : '24lpx') - .width(this.longpress ? this.portraitModel ? 80 : '40lpx' : this.portraitModel ? 48 : '24lpx') + .height(48) + .width(this.longpress ? 80 : 48) } .width('100%') - .height(this.portraitModel ? 72 : '36lpx') - .padding({ left: this.portraitModel ? 16 : '8lpx', right: this.portraitModel ? 12 : '6lpx', top: this.portraitModel ? 4 : '2lpx', bottom: this.portraitModel ? 4 : '2lpx' }) - .borderRadius(this.portraitModel ? 24 : '12lpx') + .height(72) + .padding({ + left: 16, + right: 12, + top: 4, + bottom: 4 + }) + .borderRadius(24) .linearGradient({ direction: GradientDirection.Right, colors: this.selectedNoteData.uuid == this.noteItem.uuid ? [[0xffcdae, 0.0], [0xFfece2, 1.0]] : [[0xffffff, 0.0], [0xffffff, 1.0]] @@ -276,15 +317,18 @@ export struct NoteItemComp { .onClick(() => { if (this.search) { this.search = false + AppStorage.SetOrCreate('Search', this.search) return } if (this.longpress) { if (NoteUtil.isNoteChecked(this.CheckedNoteArray, this.noteItem)) { NoteUtil.unsetNoteChecked(this.CheckedNoteArray, this.noteItem) this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) + this.isChecked = NoteUtil.isNoteChecked(this.CheckedNoteArray, this.noteItem) } else { NoteUtil.setNoteChecked(this.CheckedNoteArray, this.noteItem) this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) + this.isChecked = NoteUtil.isNoteChecked(this.CheckedNoteArray, this.noteItem) } return; } else { @@ -317,6 +361,7 @@ export struct NoteItemComp { if (this.longpress == false) { this.longpress = true NoteUtil.setNoteChecked(this.CheckedNoteArray, this.noteItem) + this.isChecked = NoteUtil.isNoteChecked(this.CheckedNoteArray, this.noteItem) } }) ) @@ -327,7 +372,7 @@ export struct NoteItemComp { @Component export struct NoteItemListComp { - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('RefreshFlag') refreshFlag: number @Consume('Longpress') longpress: boolean @@ -336,9 +381,26 @@ export struct NoteItemListComp { @Consume('SearchResultList') searchResultList: NoteData[] @Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('PortraitModel') portraitModel: boolean + @State dateList: NoteData[] = [] controllerShow: WebController + @StorageLink('isUpdate') @Watch('updateList') isUpdate: boolean = false + + updateList() { + if (this.isUpdate) { + this.dateList = NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) + } + this.isUpdate = false + this.doSearch() + } + + aboutToAppear() { + this.dateList = NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) + } doSearch() { + if (this.inputKeyword.length == 0) { + return + } SearchModel.search(NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid), this.inputKeyword) .then((result: NoteData[]) => { LogUtil.info(TAG, "result size " + result.length.toString()) @@ -367,12 +429,13 @@ export struct NoteItemListComp { Flex() { SearchComp() } + .id(this.isUpdate + '') .width("100%") .padding({ left: 24, right: 24, bottom: 12 }) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) Stack() { - Flex({direction: FlexDirection.Column}) { + Flex({ direction: FlexDirection.Column }) { Flex({ justifyContent: FlexAlign.Center }) { Text($r("app.string.permanently_delete_tips")) .fontSize(12) @@ -395,13 +458,14 @@ export struct NoteItemListComp { .fontColor($r("app.color.Empty_page_font_color")) } } + .id(this.isUpdate + '') .width('100%') .height('100%') .padding({ bottom: 120 }) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.Visible : Visibility.None) ForEach(this.inputKeyword.length == 0 ? - NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) : this.searchResultList, (noteItem) => { + this.dateList : this.searchResultList, (noteItem) => { ListItem() { Column() { NoteItemComp({ @@ -412,9 +476,14 @@ export struct NoteItemListComp { } .padding({ left: 24, right: 24, bottom: 12 }) } - }, noteItem => noteItem.uuid.toString()) + }, noteItem => JSON.stringify(noteItem)) } - .margin((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? { bottom: 0 } : { bottom: 130 }) + .id(this.isUpdate + '') + .margin((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? { + bottom: 0 + } : { + bottom: 56 + }) .layoutWeight(1) .listDirection(Axis.Vertical) .edgeEffect(EdgeEffect.Spring) @@ -438,6 +507,8 @@ export struct NoteItemListComp { } .onClick(() => { this.search = false + inputMethod.getController().stopInputSession() + AppStorage.SetOrCreate('Search', this.search) }) } } @@ -445,13 +516,14 @@ export struct NoteItemListComp { @Component export struct OperateNoteComp { @Consume('Longpress') longpress: boolean - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('RefreshFlag') refreshFlag: number @Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('PortraitModel') portraitModel: boolean @Consume('selectedAll') selectedAll: boolean + @StorageLink('isUpdate') isUpdate: boolean = false controllerShow: WebController noteDataMoveDialogCtl: CustomDialogController = new CustomDialogController({ builder: NoteDataMoveDialog({ onConfirm: this.onMoveConfirm.bind(this) }), @@ -479,6 +551,7 @@ export struct OperateNoteComp { this.longpress = false this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) + NoteUtil.refreshAll() } noteDataDeleteDialogCtl: CustomDialogController = new CustomDialogController({ @@ -518,6 +591,7 @@ export struct OperateNoteComp { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "OperateNoteComp, set continue note success") + NoteUtil.refreshAll() } build() { @@ -527,7 +601,7 @@ export struct OperateNoteComp { .height(24) .opacity(this.CheckedNoteArray.length == 0 ? 0.4 : 1) .enabled(this.CheckedNoteArray.length == 0 ? false : true) - .margin({ right: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 0 : 24 }) + .margin({ right: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 0 : 18 }) .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.None : Visibility.Visible) .onClick(() => { this.CheckedNoteArray.forEach((noteItem) => { @@ -539,13 +613,14 @@ export struct OperateNoteComp { }) this.longpress = false NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) + NoteUtil.refreshAll() }) Image($r('app.media.move')) .width(24) .height(24) .opacity(this.CheckedNoteArray.length == 0 ? 0.4 : 1) .enabled(this.CheckedNoteArray.length == 0 ? false : true) - .margin({ right: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 0 : 24 }) + .margin({ right: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 0 : 18 }) .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.None : Visibility.Visible) .onClick(() => { this.noteDataMoveDialogCtl.open() @@ -553,7 +628,7 @@ export struct OperateNoteComp { Image($r('app.media.delete')) .width(24) .height(24) - .margin({ right: 24 }) + .margin({ right: 18 }) .opacity(this.CheckedNoteArray.length == 0 ? 0.4 : 1) .enabled(this.CheckedNoteArray.length == 0 ? false : true) .onClick(() => { @@ -564,7 +639,7 @@ export struct OperateNoteComp { .height(24) .opacity(this.CheckedNoteArray.length == 0 ? 0.4 : 1) .enabled(this.CheckedNoteArray.length == 0 ? false : true) - .margin({ right: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 24 : 0 }) + .margin({ right: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 18 : 0 }) .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.Visible : Visibility.None) .onClick(() => { this.CheckedNoteArray.forEach((noteItem) => { @@ -573,7 +648,7 @@ export struct OperateNoteComp { let context: any = getContext(this) let resource = { bundleName: "com.ohos.note", - moduleName: "tablet", + moduleName: "default", id: $r('app.string.restore').id }; context.resourceManager.getString(resource, (error, value) => { @@ -590,30 +665,33 @@ export struct OperateNoteComp { }) this.longpress = false NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) + NoteUtil.refreshAll() }) Image(this.CheckedNoteArray.length == NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid).length ? $r('app.media.check_all1') : $r('app.media.check_all')) .width(24) .height(24) + .id(this.isUpdate + '') .onClick(() => { + LogUtil.info(TAG, "select all click") if (this.CheckedNoteArray.length < - NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) - .length) { + NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid).length) { NoteUtil.setAllNotesChecked(this.CheckedNoteArray, NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid)) } else { NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) } this.selectedAll = !this.selectedAll this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) + NoteUtil.refreshAll() }) } - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 120 : 168) + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 168 : 248) .visibility(this.longpress && this.portraitModel == false ? Visibility.Visible : Visibility.None) } } @Component export struct AddNoteComp { - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('Longpress') longpress: boolean @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('SelectedNoteData') selectedNoteData: NoteData @@ -633,9 +711,9 @@ export struct AddNoteComp { .onClick(() => { let noteData if (this.selectedFolderData.uuid == SysDefFolderUuid.AllNotes || this.selectedFolderData.uuid == SysDefFolderUuid.MyFavorites) { - noteData = new NoteData(0, "标题", new Date().getTime() + "", SysDefFolderUuid.UnClassified, "", "", NoteType.SysDef, Top.No, Favorite.No, Delete.No, new Date().getTime(), new Date().getTime(), 0,0) + noteData = new NoteData(0, "标题", new Date().getTime() + "", SysDefFolderUuid.UnClassified, "", "", NoteType.SysDef, Top.No, Favorite.No, Delete.No, new Date().getTime(), new Date().getTime(), 0, 0) } else { - noteData = new NoteData(0, "标题", new Date().getTime() + "", this.selectedFolderData.uuid, "", "", NoteType.SysDef, Top.No, Favorite.No, Delete.No, new Date().getTime(), new Date().getTime(), 0,0) + noteData = new NoteData(0, "标题", new Date().getTime() + "", this.selectedFolderData.uuid, "", "", NoteType.SysDef, Top.No, Favorite.No, Delete.No, new Date().getTime(), new Date().getTime(), 0, 0) } this.AllNoteArray.push(noteData) @@ -659,6 +737,7 @@ export struct AddNoteComp { AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "addNote, set continue note success") routePage() + AppStorage.SetOrCreate('isUpdate', true) }) .visibility(this.longpress || this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.None : Visibility.Visible) } @@ -670,6 +749,7 @@ export struct SearchComp { @Consume('InputKeyword') inputKeyword: string @Consume('Longpress') longpress: boolean @State text: string = '' + @StorageLink('isFocusOnSearch') isFocusOnSearch: boolean = true build() { Row() { @@ -680,19 +760,27 @@ export struct SearchComp { .margin({ right: this.search ? 16 : 0 }) .visibility(this.search ? Visibility.Visible : Visibility.None) .onClick(() => { + focusControl.requestFocus('searchFocus') this.search = false + // 退出键盘 + // @ts-ignore + inputMethod.getController().stopInputSession(); + AppStorage.SetOrCreate('Search', this.search) }) Flex({ justifyContent: FlexAlign.Start }) { Image($r('app.media.search')).width(20).height(20) + .focusable(true) + .key('searchFocus') + .defaultFocus(true) TextInput({ placeholder: $r('app.string.searchNote'), text: this.text }) .backgroundColor(this.longpress ? $r("app.color.search_longpress_bgcolor_f7f8f9") : $r("app.color.color_ffffff")) .caretColor($r("app.color.search_note_caret_color")) .enabled(this.longpress ? false : true) - .padding({ left:6, top:1 }) - .padding({left:6}) + .padding({ left: 6, top: 1 }) + .padding({ left: 6 }) .onEditChange((isEditing: boolean) => { -// this.search = isEditing + // this.search = isEditing }) .onChange((value: string) => { if (!this.longpress) { @@ -704,10 +792,22 @@ export struct SearchComp { .onClick(() => { if (this.longpress) { this.search = false + AppStorage.SetOrCreate('Search', this.search) } else { this.search = true + AppStorage.SetOrCreate('Search', this.search) } }) + // whether the focus is on the search input before coutinue + .onFocus(() => { + this.isFocusOnSearch = true + }) + .onBlur(() => { + this.isFocusOnSearch = false + }) + // key for request focus after coutinue + .key('searchInput') + .restoreId(3) } .backgroundColor(this.longpress ? $r("app.color.search_longpress_bgcolor_f7f8f9") : $r("app.color.color_ffffff")) .height(40) @@ -723,13 +823,14 @@ export struct SearchComp { @Component export struct OperateNoteCompForPortrait { @Consume('Longpress') longpress: boolean - @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] - @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') + @StorageLink('CheckedNoteArray') CheckedNoteArray: NoteData[] = [] + @StorageLink('AllNoteArray') AllNoteArray: NoteData[] = AppStorage.Link('AllNoteArray') @Consume('SelectedFolderData') selectedFolderData: FolderData @Consume('RefreshFlag') @Watch('opacityChange') refreshFlag: number @Consume('SelectedNoteData') selectedNoteData: NoteData @Consume('PortraitModel') portraitModel: boolean @State greyOpacity: boolean = false + @StorageLink('isUpdate') isUpdate: boolean = false noteDataMoveDialogCtlBottom: CustomDialogController = new CustomDialogController({ builder: NoteDataMoveDialog({ onConfirm: this.onMoveConfirm.bind(this) }), alignment: DialogAlignment.Bottom, @@ -763,6 +864,7 @@ export struct OperateNoteCompForPortrait { this.longpress = false this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) + NoteUtil.refreshAll() } noteDataDeleteDialogCtlBottom: CustomDialogController = new CustomDialogController({ @@ -799,6 +901,7 @@ export struct OperateNoteCompForPortrait { let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject()) AppStorage.SetOrCreate('ContinueNote', continueNote) LogUtil.info(TAG, "OperateNoteCompForPortrait, set continue note success") + NoteUtil.refreshAll() } build() { @@ -821,6 +924,7 @@ export struct OperateNoteCompForPortrait { this.longpress = false this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) + NoteUtil.refreshAll() }) Text($r("app.string.set_top")) .opacity(this.greyOpacity ? 0.4 : 1) @@ -844,6 +948,7 @@ export struct OperateNoteCompForPortrait { .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) .onClick(() => { this.noteDataDeleteDialogCtlBottom.open() + AppStorage.SetOrCreate('isUpdate', true) }) Text($r("app.string.delete")) .opacity(this.greyOpacity ? 0.4 : 1) @@ -851,7 +956,7 @@ export struct OperateNoteCompForPortrait { .fontColor($r("app.color.delete_font_color")) .padding({ top: 5 }) } - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 120 : "25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) .enabled(this.greyOpacity ? false : true) @@ -867,6 +972,7 @@ export struct OperateNoteCompForPortrait { .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) .onClick(() => { this.noteDataMoveDialogCtlBottom.open() + AppStorage.SetOrCreate('isUpdate', true) }) Text($r("app.string.move")) .opacity(this.greyOpacity ? 0.4 : 1) @@ -896,7 +1002,7 @@ export struct OperateNoteCompForPortrait { let context: any = getContext(this) let resource = { bundleName: "com.ohos.note", - moduleName: "tablet", + moduleName: "default", id: $r('app.string.restore').id }; context.resourceManager.getString(resource, (error, value) => { @@ -914,13 +1020,15 @@ export struct OperateNoteCompForPortrait { this.longpress = false NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) + AppStorage.SetOrCreate('isUpdate', true) + NoteUtil.refreshAll() }) Text($r("app.string.recover")) .fontSize(10) .fontColor($r("app.color.recover_font_color")) .padding({ top: 5 }) } - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 120 : "25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) .enabled(this.greyOpacity ? false : true) @@ -933,22 +1041,24 @@ export struct OperateNoteCompForPortrait { .width(24) .height(24) .responseRegion({ x: -15.0, y: -15.0, width: 54, height: 54 }) + .id(this.isUpdate + '') .onClick(() => { if (this.CheckedNoteArray.length < NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) - .length) { + .length) { NoteUtil.setAllNotesChecked(this.CheckedNoteArray, NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid)) } else { NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) } this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) + NoteUtil.refreshAll() }) Text($r("app.string.check_all")) .fontSize(10) .fontColor($r("app.color.check_all_font_color")) .padding({ top: 5 }) } - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 120 : "25%") .height("100%") .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) diff --git a/common/component/src/main/module.json5 b/features/src/main/module.json5 similarity index 97% rename from common/component/src/main/module.json5 rename to features/src/main/module.json5 index 110b5961c884b7b13e01528a02980570b49d7a7e..f1007195d96943790aa00089abd0e8412131d8df 100644 --- a/common/component/src/main/module.json5 +++ b/features/src/main/module.json5 @@ -18,6 +18,7 @@ "name": "component", "type": "har", "deviceTypes": [ + "default", "tablet" ], "uiSyntax": "ets" diff --git a/package-lock.json b/package-lock.json index 5248f38f62077d87d64f3dc0207e50a5b51af7cb..d897a2a5aec786c17e89e9d8e8e68f5e3e607fcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1657 +1,1236 @@ { - "name": "ohos_note", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ohos/hvigor": { - "version": "1.0.6", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.0.6.tgz", - "integrity": "sha512-jjp7vpvUOMW1Nf7TdyhOtonwWHoSyBJLUiZTQqIx/GJV4UJyIqsiURUOqFwncQ4L7PDdeHuWly4uEelknYeWhg==", - "requires": { - "@ohos/hvigor-base": "1.0.6", - "interpret": "1.4.0", - "liftoff": "4.0.0", - "mute-stdout": "1.0.0", - "pretty-hrtime": "1.0.0", - "v8flags": "3.2.0", - "yargs": "7.1.0" - } - }, - "@ohos/hvigor-base": { - "version": "1.0.6", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.0.6.tgz", - "integrity": "sha512-cRDnWICTxmpNiFb9clIioqP5Oik1seLCICztXVhZqultrHuxwTheCRUZrHwlpyWdkSB2Al+FFBqmSwzIgZX4IQ==", - "requires": { - "json5": "2.2.0", - "log4js": "6.4.1", - "undertaker": "1.2.1" - } - }, - "@ohos/hvigor-ohos-plugin": { - "version": "1.0.6", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.0.6.tgz", - "integrity": "sha512-MAAi8uJxMzODUoSSNfBr+fU4HQ20dfQtkje9I+X4asc7qY2kAplW/q9f5XS8IOvv8zhC8OcSgsAXOAJuLMstOQ==", - "requires": { - "@ohos/hvigor-base": "1.0.6", - "@ohos/sdkmanager-common": "1.1.3", - "ajv": "8.10.0", - "archiver": "5.3.0", - "execa": "5.1.1", - "fs-extra": "10.0.0", - "glob": "7.2.0", - "iconv-lite": "0.6.3", - "json5": "2.2.0", - "lodash": "4.17.21", - "pretty-hrtime": "1.0.3", - "resolve-package-path": "4.0.3" - }, - "dependencies": { - "fs-extra": { - "version": "10.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" - } - } - }, - "@ohos/sdkmanager-common": { - "version": "1.1.3", - "resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-1.1.3.tgz", - "integrity": "sha512-d2uhVauDDJZIUvyyaWWoavG4N/jLyfF5IH5kEXKV6R8HNf3606H1zDQzA+UZtOfwwJFXhD9djRjnVFNB8xc7aw==" - }, - "ajv": { - "version": "8.10.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/ajv/-/ajv-8.10.0.tgz", - "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "archiver": { - "version": "5.3.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/archiver/-/archiver-5.3.0.tgz", - "integrity": "sha512-iUw+oDwK0fgNpvveEsdQ0Ase6IIKztBJU2U0E9MzszMfmVVUyv1QJhS2ITW9ZCqx8dktAxVAjWWkKehuZE8OPg==", - "requires": { - "archiver-utils": "^2.1.0", - "async": "^3.2.0", - "buffer-crc32": "^0.2.1", - "readable-stream": "^3.6.0", - "readdir-glob": "^1.0.0", - "tar-stream": "^2.2.0", - "zip-stream": "^4.1.0" - } - }, - "archiver-utils": { - "version": "2.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/archiver-utils/-/archiver-utils-2.1.0.tgz", - "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", - "requires": { - "glob": "^7.1.4", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "arr-filter": { - "version": "1.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-map": { - "version": "2.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", - "requires": { - "make-iterator": "^1.0.0" - } - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" - }, - "array-initial": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", - "requires": { - "array-slice": "^1.0.0", - "is-number": "^4.0.0" - } - }, - "array-last": { - "version": "1.3.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/array-last/-/array-last-1.3.0.tgz", - "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", - "requires": { - "is-number": "^4.0.0" - } - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" - }, - "async": { - "version": "3.2.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" - }, - "async-done": { - "version": "1.3.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/async-done/-/async-done-1.3.2.tgz", - "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.2", - "process-nextick-args": "^2.0.0", - "stream-exhaust": "^1.0.1" - } - }, - "async-settle": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", - "requires": { - "async-done": "^1.2.2" - } - }, - "bach": { - "version": "1.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", - "requires": { - "arr-filter": "^1.1.1", - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "array-each": "^1.0.0", - "array-initial": "^1.0.0", - "array-last": "^1.1.1", - "async-done": "^1.2.2", - "async-settle": "^1.0.0", - "now-and-later": "^2.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bl": { - "version": "4.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://repo.huaweicloud.com/repository/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://repo.huaweicloud.com/repository/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "collection-map": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", - "requires": { - "arr-map": "^2.0.2", - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "compress-commons": { - "version": "4.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/compress-commons/-/compress-commons-4.1.1.tgz", - "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", - "requires": { - "buffer-crc32": "^0.2.13", - "crc32-stream": "^4.0.2", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "crc-32": { - "version": "1.2.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" - }, - "crc32-stream": { - "version": "4.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/crc32-stream/-/crc32-stream-4.0.2.tgz", - "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", - "requires": { - "crc-32": "^1.2.0", - "readable-stream": "^3.4.0" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "d": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "date-format": { - "version": "4.0.7", - "resolved": "https://repo.huaweicloud.com/repository/npm/date-format/-/date-format-4.0.7.tgz", - "integrity": "sha512-k5xqlzDGIfv2N/DHR/BR8Kc4N9CRy9ReuDkmdxeX/jNfit94QXd36emWMm40ZOEDKNm/c91yV9EO3uGPkR7wWQ==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "default-resolution": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=" - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es5-ext": { - "version": "0.10.60", - "resolved": "https://repo.huaweicloud.com/repository/npm/es5-ext/-/es5-ext-0.10.60.tgz", - "integrity": "sha512-jpKNXIt60htYG59/9FGf2PYT3pwMpnEbNKysU+k/4FGwyGtMotOvcZOuW+EmXXYASRqYSXQfGL5cVIthOTgbkg==", - "requires": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "es6-weak-map": { - "version": "2.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "requires": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "execa": { - "version": "5.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "ext": { - "version": "1.6.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/ext/-/ext-1.6.0.tgz", - "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", - "requires": { - "type": "^2.5.0" - }, - "dependencies": { - "type": { - "version": "2.6.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/type/-/type-2.6.0.tgz", - "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==" - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "findup-sync": { - "version": "5.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/findup-sync/-/findup-sync-5.0.0.tgz", - "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.3", - "micromatch": "^4.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/fined/-/fined-2.0.0.tgz", - "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^5.0.0", - "object.defaults": "^1.1.0", - "object.pick": "^1.3.0", - "parse-filepath": "^1.0.2" - } - }, - "flagged-respawn": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/flagged-respawn/-/flagged-respawn-2.0.0.tgz", - "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" - }, - "flatted": { - "version": "3.2.5", - "resolved": "https://repo.huaweicloud.com/repository/npm/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "requires": { - "for-in": "^1.0.1" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs-extra": { - "version": "10.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" - }, - "glob": { - "version": "7.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://repo.huaweicloud.com/repository/npm/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "has": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://repo.huaweicloud.com/repository/npm/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" - }, - "hypium": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/hypium/-/hypium-1.0.0.tgz", - "integrity": "sha512-nl+RQVv2AU/5FvFRhsXyWO5wh+2huhdqRZ3bszBWZzW+kpNI3AT4ydvVRYIfaQbYwV4UlX/rSc7BtFjLAezhow==" - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://repo.huaweicloud.com/repository/npm/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-core-module": { - "version": "2.9.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "4.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" - }, - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "js-base64": { - "version": "3.7.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/js-base64/-/js-base64-3.7.2.tgz", - "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==" - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, - "last-run": { - "version": "1.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", - "requires": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" - } - }, - "lazystream": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", - "requires": { - "readable-stream": "^2.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - } - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "liftoff": { - "version": "4.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/liftoff/-/liftoff-4.0.0.tgz", - "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", - "requires": { - "extend": "^3.0.2", - "findup-sync": "^5.0.0", - "fined": "^2.0.0", - "flagged-respawn": "^2.0.0", - "is-plain-object": "^5.0.0", - "object.map": "^1.0.1", - "rechoir": "^0.8.0", - "resolve": "^1.20.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://repo.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "lodash.union": { - "version": "4.6.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" - }, - "log4js": { - "version": "6.4.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/log4js/-/log4js-6.4.1.tgz", - "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", - "requires": { - "date-format": "^4.0.3", - "debug": "^4.3.3", - "flatted": "^3.2.4", - "rfdc": "^1.3.0", - "streamroller": "^3.0.2" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://repo.huaweicloud.com/repository/npm/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "mute-stdout": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/mute-stdout/-/mute-stdout-1.0.0.tgz", - "integrity": "sha1-WzLqB+tDyd7WEwQ0z5JvRrKn/U0=" - }, - "next-tick": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "now-and-later": { - "version": "2.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "requires": { - "once": "^1.3.2" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "requires": { - "path-key": "^3.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "object.reduce": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "requires": { - "lcid": "^1.0.0" - } - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pretty-hrtime": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", - "integrity": "sha1-9ualItPmBwRSK/Db5oVu0g515Nw=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdir-glob": { - "version": "1.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/readdir-glob/-/readdir-glob-1.1.1.tgz", - "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", - "requires": { - "minimatch": "^3.0.4" - } - }, - "rechoir": { - "version": "0.8.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "requires": { - "resolve": "^1.20.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "resolve": { - "version": "1.22.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-package-path": { - "version": "4.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-package-path/-/resolve-package-path-4.0.3.tgz", - "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", - "requires": { - "path-root": "^0.1.1" - } - }, - "rfdc": { - "version": "1.3.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://repo.huaweicloud.com/repository/npm/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" - }, - "stream-exhaust": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/stream-exhaust/-/stream-exhaust-1.0.2.tgz", - "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" - }, - "streamroller": { - "version": "3.0.7", - "resolved": "https://repo.huaweicloud.com/repository/npm/streamroller/-/streamroller-3.0.7.tgz", - "integrity": "sha512-kh68kwiDGuIPiPDWwRbEC5us+kfARP1e9AsQiaLaSqGrctOvMn0mtL8iNY3r4/o5nIoYi3gPI1jexguZsXDlxw==", - "requires": { - "date-format": "^4.0.7", - "debug": "^4.3.4", - "fs-extra": "^10.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - }, - "dependencies": { - "is-number": { - "version": "7.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - } - } - }, - "type": { - "version": "1.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" - }, - "undertaker": { - "version": "1.2.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/undertaker/-/undertaker-1.2.1.tgz", - "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", - "requires": { - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "bach": "^1.0.0", - "collection-map": "^1.0.0", - "es6-weak-map": "^2.0.1", - "last-run": "^1.1.0", - "object.defaults": "^1.0.0", - "object.reduce": "^1.0.0", - "undertaker-registry": "^1.0.0" - } - }, - "undertaker-registry": { - "version": "1.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=" - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "v8flags": { - "version": "3.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - } - }, - "yargs-parser": { - "version": "5.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/yargs-parser/-/yargs-parser-5.0.1.tgz", - "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", - "requires": { - "camelcase": "^3.0.0", - "object.assign": "^4.1.0" - } - }, - "zip-stream": { - "version": "4.1.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/zip-stream/-/zip-stream-4.1.0.tgz", - "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", - "requires": { - "archiver-utils": "^2.1.0", - "compress-commons": "^4.1.0", - "readable-stream": "^3.6.0" - } - } - } + "name": "ohos_note", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ohos/hos-sdkmanager-common": { + "version": "1.0.4", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hos-sdkmanager-common/-/@ohos/hos-sdkmanager-common-1.0.4.tgz", + "integrity": "sha512-LWrfF8Js+u54BcEAdyjzsA81iGBA4LPvQdQ1ig/pX6mvTieUPSvtjtAzdI8nnGVmJRLrHwAMHEO/syd9d8UAFw==", + "requires": { + "@ohos/sdkmanager-common": "^1.1.8" + } + }, + "@ohos/hvigor": { + "version": "1.2.2", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.2.2.tgz", + "integrity": "sha512-GfXCf7pDnyEcxWkG7Edd23XPxgym1vY37zdNt/Gj0pZmw0f+FrP+blfCzVWfYQYlI76krzd96+kvD4lgWkIPBQ==", + "requires": { + "@ohos/hvigor-base": "1.2.2", + "fs-extra": "10.0.1", + "interpret": "1.4.0", + "liftoff": "4.0.0", + "mute-stdout": "1.0.0", + "pretty-hrtime": "1.0.0", + "v8flags": "3.2.0", + "yargs": "7.1.2" + } + }, + "@ohos/hvigor-base": { + "version": "1.2.2", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.2.2.tgz", + "integrity": "sha512-omwL/qjTE7DTCQdHZnMKuAxKlH1JOgOxaVAae1ca8j/oPuNgY6Spn+mpYRDHIktvav6axMmHT9zV1hJykY4GEg==", + "requires": { + "fs-extra": "10.0.1", + "json5": "2.2.0", + "log4js": "6.4.1", + "once": "1.4.0", + "pretty-hrtime": "1.0.0" + } + }, + "@ohos/hvigor-ohos-plugin": { + "version": "1.2.2", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.2.2.tgz", + "integrity": "sha512-gir91UxlhMbf2E/NjTYWJGrsNGBKD/1YYbaEdmswD/qW18UDY7jyuqSVyV/gj0h9+iji+gd53rXWzpLLztG5lg==", + "requires": { + "@ohos/hos-sdkmanager-common": "1.0.4", + "@ohos/hvigor-base": "1.2.2", + "@ohos/sdkmanager-common": "1.1.8", + "adm-zip": "0.5.9", + "ajv": "8.10.0", + "execa": "5.1.1", + "fast-xml-parser": "4.0.3", + "fs-extra": "10.0.1", + "glob": "7.2.0", + "iconv-lite": "0.6.3", + "json5": "2.2.0", + "lodash": "4.17.21", + "pretty-hrtime": "1.0.3", + "resolve-package-path": "4.0.3" + }, + "dependencies": { + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==" + } + } + }, + "@ohos/hypium": { + "version": "1.0.2", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hypium/-/@ohos/hypium-1.0.2.tgz", + "integrity": "sha512-HWW62q6hbd0PhvPTH96lo4j//owFwyCLj6Q2jmVLDW6mOt1dwJJwUQ7qUH+Cni/6MmcnyXKvt9I0moGAPK1aCw==" + }, + "@ohos/sdkmanager-common": { + "version": "1.1.8", + "resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-1.1.8.tgz", + "integrity": "sha512-mxq69+6Zg/ybeQGnOtkBzOTbNBkEdiYehRKWsAD/je53v1W+ahauLqe90pNZEiBuVYugzb6z2EaJtAXYZtE8gQ==" + }, + "adm-zip": { + "version": "0.5.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/adm-zip/-/adm-zip-0.5.9.tgz", + "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==" + }, + "ajv": { + "version": "8.10.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==" + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==" + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://repo.huaweicloud.com/repository/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "date-format": { + "version": "4.0.14", + "resolved": "https://repo.huaweicloud.com/repository/npm/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-xml-parser": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/fast-xml-parser/-/fast-xml-parser-4.0.3.tgz", + "integrity": "sha512-xhQbg3a/EYNHwK0cxIG1nZmVkHX/0tWihamn5pU4Mhd9KEVE2ga8ZJiqEUgB2sApElvAATOdMTLjgqIpvYDUkQ==", + "requires": { + "strnum": "^1.0.5" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + } + }, + "flagged-respawn": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "requires": { + "for-in": "^1.0.1" + } + }, + "fs-extra": { + "version": "10.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://repo.huaweicloud.com/repository/npm/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "hypium": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/hypium/-/hypium-1.0.0.tgz", + "integrity": "sha512-nl+RQVv2AU/5FvFRhsXyWO5wh+2huhdqRZ3bszBWZzW+kpNI3AT4ydvVRYIfaQbYwV4UlX/rSc7BtFjLAezhow==" + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" + }, + "js-base64": { + "version": "3.7.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/js-base64/-/js-base64-3.7.4.tgz", + "integrity": "sha512-wpM/wi20Tl+3ifTyi0RdDckS4YTD4Lf953mBRrpG8547T7hInHNPEj8+ck4gB8VDcGyeAWFK++Wb/fU1BeavKQ==" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "liftoff": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "requires": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "log4js": { + "version": "6.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", + "requires": { + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stdout": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mute-stdout/-/mute-stdout-1.0.0.tgz", + "integrity": "sha512-MaSQenn0f9oxIjtCufclpV00MuYTiHaXPbdcfPIM+quMqoa8cXywjHHx4LhhIAZlXqPWMdcUpYviajfmHtHRJw==" + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==" + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pretty-hrtime": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", + "integrity": "sha512-CU2l5CYUAptUYq/671ajexQfXuxJFwwg0n243Kdkx8bTjeenedsWgu8TGHPm03vLfNtk3aTXgySKPp3Usykudw==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "requires": { + "resolve": "^1.20.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==" + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-package-path": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-package-path/-/resolve-package-path-4.0.3.tgz", + "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", + "requires": { + "path-root": "^0.1.1" + } + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==" + }, + "streamroller": { + "version": "3.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/streamroller/-/streamroller-3.1.4.tgz", + "integrity": "sha512-Ha1Ccw2/N5C/IF8Do6zgNe8F3jQo8MPBnMBGvX0QjNv/I97BcNRzK6/mzOpZHHK7DjMLTI3c7Xw7Y1KvdChkvw==", + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strnum": { + "version": "1.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==" + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "yargs": { + "version": "7.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.1" + } + }, + "yargs-parser": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "requires": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + } + } } diff --git a/package.json b/package.json index 6c265697a69e361cb362c719609ff36b90757ac3..2c2ccfe70b4e73ee03e1d1dcc901b1a13a281c1e 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,10 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hvigor": "1.0.6", - "@ohos/hvigor-ohos-plugin": "1.0.6", + "@ohos/hypium": "1.0.2", + "@ohos/hvigor-ohos-plugin": "1.2.2", "hypium": "^1.0.0", + "@ohos/hvigor": "1.2.2", "js-base64": "^3.7.2" } } diff --git a/common/component/.gitignore b/product/default/.gitignore similarity index 54% rename from common/component/.gitignore rename to product/default/.gitignore index 4f9a973815d0b5e49bc8547681a6b4bc7a178d12..a5c564ae6da6b5e2336628d9f9e2155bddfc399d 100644 --- a/common/component/.gitignore +++ b/product/default/.gitignore @@ -1,3 +1,4 @@ /node_modules /.preview -/build \ No newline at end of file +/build +/package.json \ No newline at end of file diff --git a/product/phone/build-profile.json5 b/product/default/build-profile.json5 similarity index 100% rename from product/phone/build-profile.json5 rename to product/default/build-profile.json5 diff --git a/product/phone/hvigorfile.js b/product/default/hvigorfile.js similarity index 100% rename from product/phone/hvigorfile.js rename to product/default/hvigorfile.js diff --git a/product/phone/package-lock.json b/product/default/package-lock.json similarity index 93% rename from product/phone/package-lock.json rename to product/default/package-lock.json index e0a40e9f0c018de85f10869f6b657ab4cdb8911a..3d7999af7f3c0f88d2e956df8a93c001734b6362 100644 --- a/product/phone/package-lock.json +++ b/product/default/package-lock.json @@ -1,11 +1,11 @@ { - "name": "phone", + "name": "default", "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@ohos/component": { - "version": "file:../../common/component", + "version": "file:../../features", "requires": { "@ohos/source": "file:../../common/resources", "@ohos/utils": "file:../../common/utils" diff --git a/product/default/package.json b/product/default/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9afcbf432788a5a95f77bd548412897ac7cfa28e --- /dev/null +++ b/product/default/package.json @@ -0,0 +1,18 @@ +{ + "license": "ISC", + "devDependencies": {}, + "name": "default", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": { + "@ohos/utils": "file:../../common/utils", + "@ohos/component": "file:../../features", + "@ohos/source": "file:../../common/resources" + } +} diff --git a/product/tablet/src/main/ets/Application/AbilityStage.ts b/product/default/src/main/ets/Application/AbilityStage.ts similarity index 70% rename from product/tablet/src/main/ets/Application/AbilityStage.ts rename to product/default/src/main/ets/Application/AbilityStage.ts index 32dfe93ccff0375201857794de902cec4d239442..11200f672cfa3a981668dbdee5a700935bf7be99 100644 --- a/product/tablet/src/main/ets/Application/AbilityStage.ts +++ b/product/default/src/main/ets/Application/AbilityStage.ts @@ -1,4 +1,4 @@ -import AbilityStage from "@ohos.application.AbilityStage" +import AbilityStage from "@ohos.app.ability.AbilityStage" export default class MyAbilityStage extends AbilityStage { onCreate() { diff --git a/product/tablet/src/main/ets/MainAbility/MainAbility.ts b/product/default/src/main/ets/MainAbility/MainAbility.ts similarity index 65% rename from product/tablet/src/main/ets/MainAbility/MainAbility.ts rename to product/default/src/main/ets/MainAbility/MainAbility.ts index ab7ebf1e96b070ab9f644f8b22694794ecdf961d..78995a63d00afcb47436e06bada44487ee8a1a5b 100644 --- a/product/tablet/src/main/ets/MainAbility/MainAbility.ts +++ b/product/default/src/main/ets/MainAbility/MainAbility.ts @@ -13,21 +13,33 @@ * limitations under the License. */ -import Ability from '@ohos.application.Ability' +import Ability from '@ohos.app.ability.UIAbility' import deviceInfo from '@ohos.deviceInfo'; -import AbilityConstant from '@ohos.application.AbilityConstant' +import AbilityConstant from '@ohos.app.ability.AbilityConstant' import fileio from '@ohos.fileio' -import inputMethod from '@ohos.inputmethod'; +import inputMethod from '@ohos.inputMethod'; import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import { atob } from 'js-base64' +import display from '@ohos.display'; +import window from '@ohos.window'; + globalThis.rdbStore = undefined + export default class MainAbility extends Ability { private Tag = "MainAbility_Tablet" onCreate(want, launchParam) { - AppStorage.SetOrCreate('closeEditContentDialog', true) - LogUtil.info(this.Tag, " onCreate, launchReason is " + launchParam.launchReason) - LogUtil.info(this.Tag, " onCreate, deviceType" + deviceInfo.deviceType) + // @ts-ignore + window.getLastWindow(this.context, (err, data) => { + if (data && data.getWindowProperties()) { + let windowWidth = data.getWindowProperties().windowRect.width + LogUtil.info(this.Tag, " getLastWindow:" + windowWidth) + this.screenBreakPoints(windowWidth) + } else { + LogUtil.info(this.Tag, "getWindowProperties error:" + JSON.stringify(err)) + } + }) + LogUtil.info(this.Tag, " onCreate, launchReason is " + launchParam.launchReason + ", deviceType" + deviceInfo.deviceType) if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') { AppStorage.SetOrCreate('Expand', false) AppStorage.SetOrCreate('Choose', true) @@ -36,11 +48,18 @@ export default class MainAbility extends Ability { // 设置迁移标记 AppStorage.SetOrCreate('IsContinue', true) // 获取对端的迁移数据 + let Search: boolean = want.parameters["Search"] let continueNote: string = want.parameters["ContinueNote"] let continueSection: number = want.parameters["ContinueSection"] + let scrollTopPercent: number = want.parameters["ScrollTopPercent"] + let isFocusOnSearch: boolean = want.parameters["isFocusOnSearch"] LogUtil.info(this.Tag, " continueSection : " + continueSection) + AppStorage.SetOrCreate('Search', Search) AppStorage.SetOrCreate('ContinueNote', continueNote) AppStorage.SetOrCreate('ContinueSection', continueSection) + // 使用新的key保存数据,防止迁移过来的数据在使用前被本地操作覆盖 + AppStorage.SetOrCreate('remoteScrollTopPercent', scrollTopPercent) + AppStorage.SetOrCreate('isRemoteFocusOnSearch', isFocusOnSearch) // 来自手机的迁移 let continueChoose: boolean = want.parameters["ContinueChoose"] if (continueChoose) { @@ -60,6 +79,17 @@ export default class MainAbility extends Ability { } onWindowStageCreate(windowStage) { + windowStage.getMainWindow((err, data) => { + let windowClass = data + try { + windowClass.on('windowSizeChange', (data) => { + this.screenBreakPoints(data.width) + }) + } catch (exception) { + LogUtil.info(this.Tag, 'windowSizeChange fail') + } + }) + LogUtil.info(this.Tag, " onWindowStageCreate") windowStage.setUIContent(this.context, "pages/MyNoteHome", null) } @@ -75,12 +105,14 @@ export default class MainAbility extends Ability { onBackground() { LogUtil.info(this.Tag, " onBackground") // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); } onContinue(wantParam: { [key: string]: any }) { LogUtil.info(this.Tag, " onContinue") // 获取本端的迁移数据 + let Search = AppStorage.Get('Search') let continueNote = AppStorage.Get('ContinueNote') if (continueNote == undefined || continueNote == null) { LogUtil.info(this.Tag, " onContinue, continueNote is error, default [0]") @@ -94,9 +126,24 @@ export default class MainAbility extends Ability { } LogUtil.info(this.Tag, " onContinue, continueSection : " + continueSection) + let scrollTopPercent = AppStorage.Get('ScrollTopPercent') + if (scrollTopPercent == undefined || scrollTopPercent == null) { + LogUtil.info(this.Tag, " onContinue, scrollTopPercent is error, default 0") + scrollTopPercent = 0 + } + + let isFocusOnSearch = AppStorage.Get('isFocusOnSearch') + if (isFocusOnSearch == undefined || isFocusOnSearch == null) { + LogUtil.info(this.Tag, " onContinue, isFocusOnSearch is error, default true") + isFocusOnSearch = true + } + // 保存本端的迁移数据 + wantParam["Search"] = Search wantParam["ContinueNote"] = continueNote wantParam["ContinueSection"] = continueSection + wantParam["ScrollTopPercent"] = scrollTopPercent + wantParam["isFocusOnSearch"] = isFocusOnSearch if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') { wantParam["ContinueChoose"] = true } @@ -116,7 +163,7 @@ export default class MainAbility extends Ability { return AbilityConstant.OnContinueResult.AGREE } - getSrcFromHtml(html: string): any{ + getSrcFromHtml(html: string): any { let srcArray = [] if (html == undefined || html == null || html == "") { return srcArray @@ -156,4 +203,21 @@ export default class MainAbility extends Ability { LogUtil.warn(this.Tag, " onContinue, writeToDisFileDir, copyFile failed : " + err) } } + + screenBreakPoints(data) { + let displayClass = null + let screenDpi = null + displayClass = display.getDefaultDisplaySync() + screenDpi = displayClass.densityDPI + AppStorage.SetOrCreate('dpi', screenDpi) + let windowWidth = data / (screenDpi / 160) + LogUtil.debug(this.Tag, " screenBreakPoints windowWidth: " + windowWidth) + if (windowWidth >= 320 && windowWidth < 520 || windowWidth < 320) { + AppStorage.SetOrCreate('breakPoint', 'sm') + } else if (windowWidth >= 520 && windowWidth < 840) { + AppStorage.SetOrCreate('breakPoint', 'md') + } else if (windowWidth >= 840) { + AppStorage.SetOrCreate('breakPoint', 'lg') + } + } } \ No newline at end of file diff --git a/product/phone/src/main/ets/pages/MyNoteHome.ets b/product/default/src/main/ets/pages/MyNoteHome.ets similarity index 63% rename from product/phone/src/main/ets/pages/MyNoteHome.ets rename to product/default/src/main/ets/pages/MyNoteHome.ets index 5989b0afcbc85681db023422324892fc14900f2e..3bb0587bbcdefb46ad42e78a7c5a73269226cfa5 100644 --- a/product/phone/src/main/ets/pages/MyNoteHome.ets +++ b/product/default/src/main/ets/pages/MyNoteHome.ets @@ -14,13 +14,15 @@ */ import fileio from '@ohos.fileio' -import bundle from '@ohos.bundle' -import abilityAccessCtrl from '@ohos.abilityAccessCtrl' -import {NoteHomePortraitComp} from './NoteHomePortrait' -import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' +import deviceInfo from '@ohos.deviceInfo'; +import { NoteHomeComp } from './NoteHome' +import { NoteHomePortraitComp } from './NoteHomePortrait' +import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' -import inputMethod from '@ohos.inputmethod' -import router from '@system.router' +import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' +import inputMethod from '@ohos.inputMethod'; +import router from '@system.router'; +import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; @Entry @Component @@ -28,45 +30,48 @@ export struct MyNoteHomeComp { @StorageLink('DBQueryFinished') dBQueryFinished: number = 0 @Provide('PortraitModel') portraitModel: boolean = true @Provide('RefreshFlag') refreshFlag: number = 0 + private controllerShow: WebController = new WebController() private context = getContext(this) - TAG = "MyNoteHomeComp_Phone" + TAG = "MyNoteHomeComp_Tablet" + @StorageLink('breakPoint') @Watch('onBreakPointChange') breakPoints: string = 'lg' + + onBreakPointChange() { + if (this.breakPoints == 'sm' || this.breakPoints == 'md') { + this.portraitModel = true + } else { + this.portraitModel = false + } + } build() { - Flex() { + Row() { if (this.dBQueryFinished == 1) { - NoteHomePortraitComp() + if (this.breakPoints == 'sm') { + NoteHomePortraitComp() + } else { + NoteHomeComp({ controllerShow: this.controllerShow }) + } + } } - .width('100%').height('100%') + .width('100%') + .height('100%') } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(this.TAG, "aboutToAppear") - + this.breakPoints = AppStorage.Get('breakPoint') + if (this.breakPoints == 'sm' || this.breakPoints == 'md') { + this.portraitModel = true + } else { + this.portraitModel = false + } if (this.context == undefined || this.context == null) { LogUtil.warn(this.TAG, "context is error") return } - let permissionList: Array = [ - "ohos.permission.READ_MEDIA", - "ohos.permission.MEDIA_LOCATION", - "ohos.permission.DISTRIBUTED_DATASYNC" - ] - LogUtil.info(this.TAG, 'permissions need to require from user') let context: any = getContext(this); - context.requestPermissionsFromUser(permissionList).then((data) => { - LogUtil.info(this.TAG, 'data permissions : ' + data.permissions) - LogUtil.info(this.TAG, 'data result: ' + data.authResults) - let sum = 0 - for (let i = 0; i < data.authResults.length; i++) { - sum += data.authResults[i] - } - LogUtil.info(this.TAG, 'request permissions sum: ' + sum) - }, (err) => { - LogUtil.warn(this.TAG, 'failed to requestPermissionsFromUser : ' + err.code); - }) - let dbExist = false; let dbPath = context.databaseDir + "/db/note.db" try { @@ -79,24 +84,23 @@ export struct MyNoteHomeComp { } if (!dbExist) { dbPath = context.databaseDir + "/rdb/note.db" - try{ + try { fileio.accessSync(dbPath) - LogUtil.info(this.TAG,"db has created") + LogUtil.info(this.TAG, "db has created") RdbStoreUtil.initAppStorage(this.context) } catch (err) { - LogUtil.info(this.TAG,"db has not created, start to create db") + LogUtil.info(this.TAG, "db has not created, start to create db") RdbStoreUtil.createRdbStore(this.context) } } } - aboutToDisappear(): void{ + aboutToDisappear(): void { LogUtil.info(this.TAG, "aboutToDisappear") } - onPageShow(): void{ + onPageShow(): void { LogUtil.info(this.TAG, "onPageShow") - this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) // continue from tablet let continueFromTablet = AppStorage.Get('ContinueFromTablet') LogUtil.info(this.TAG, "onPageShow, continueFromTablet : " + continueFromTablet) @@ -106,11 +110,13 @@ export struct MyNoteHomeComp { router.push({ uri: 'pages/NoteContentHome' }) AppStorage.SetOrCreate('ContinueFromTablet', false) } + this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) } - onBackPress():void{ + onBackPress() { LogUtil.info(this.TAG, "onBackPress") // 退出键盘 - inputMethod.getInputMethodController().stopInput(); + // @ts-ignore + inputMethod.getController().stopInputSession(); } } \ No newline at end of file diff --git a/product/tablet/src/main/ets/pages/NoteContentHome.ets b/product/default/src/main/ets/pages/NoteContentHome.ets similarity index 68% rename from product/tablet/src/main/ets/pages/NoteContentHome.ets rename to product/default/src/main/ets/pages/NoteContentHome.ets index 0e74967caf43cf7881386b0c529a159e3a146721..77b194ec8fa073559cb44e369709fa309bf67706 100644 --- a/product/tablet/src/main/ets/pages/NoteContentHome.ets +++ b/product/default/src/main/ets/pages/NoteContentHome.ets @@ -14,11 +14,11 @@ */ import deviceInfo from '@ohos.deviceInfo'; -import {NoteContentCompPortrait} from '@ohos/component/src/main/ets/components/NoteContentCompPortrait' -import {NoteContent} from '@ohos/component/src/main/ets/components/NoteContent' -import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' +import { NoteContentCompPortrait } from '@ohos/component/src/main/ets/components/NoteContentCompPortrait' +import { NoteContent } from '@ohos/component/src/main/ets/components/NoteContent' +import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' -import inputMethod from '@ohos.inputmethod' +import inputMethod from '@ohos.inputMethod' @Entry @Component @@ -26,13 +26,14 @@ struct NoteContentHome { @Provide('RefreshFlag') refreshFlag: number = 0 private controllerShow: WebController = new WebController() @StorageLink('DBQueryFinished') dBQueryFinished: number = 0 + @StorageLink('breakPoint') breakPoints: string = 'lg' TAG = "NoteContentHome_Tablet" build() { // Note content display area Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { if (this.dBQueryFinished == 1) { - if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') { + if (this.breakPoints == 'sm') { NoteContentCompPortrait({ controllerShow: this.controllerShow }) } else { NoteContent({ controllerShow: this.controllerShow }) @@ -45,16 +46,18 @@ struct NoteContentHome { .height('100%') } - onBackPress():void{ - LogUtil.info(this.TAG, "onBackPress") - this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(false)" }) - this.controllerShow.runJavaScript({ script: "getHtmlContent()" }) - if (deviceInfo.deviceType !== 'phone' && deviceInfo.deviceType !== 'default') { - inputMethod.getInputMethodController().stopInput() - } + onBackPress(): void { + LogUtil.info(this.TAG, "onBackPress") + this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(false)" }) + this.controllerShow.runJavaScript({ script: "getHtmlContent()" }) + if (deviceInfo.deviceType !== 'phone' && deviceInfo.deviceType !== 'default') { + // @ts-ignore + inputMethod.getController().stopInputSession(); + } } - aboutToAppear(): void{ + aboutToAppear(): void { + this.breakPoints = AppStorage.Get('breakPoint') LogUtil.info(this.TAG, "aboutToAppear") let isContinue = AppStorage.Get('IsContinue') LogUtil.info(this.TAG, "aboutToAppear, isContinue : " + isContinue) @@ -65,5 +68,4 @@ struct NoteContentHome { AppStorage.SetOrCreate('NoteContentHomeExist', true) } } - } \ No newline at end of file diff --git a/product/tablet/src/main/ets/pages/NoteHome.ets b/product/default/src/main/ets/pages/NoteHome.ets similarity index 44% rename from product/tablet/src/main/ets/pages/NoteHome.ets rename to product/default/src/main/ets/pages/NoteHome.ets index 1493527be4405cf7a18548b5078cd166d08006e2..749915350de205cce4dc3ee7600064b7fab41a14 100644 --- a/product/tablet/src/main/ets/pages/NoteHome.ets +++ b/product/default/src/main/ets/pages/NoteHome.ets @@ -38,81 +38,127 @@ export struct NoteHomeComp { @Provide('Longpress') longpress: boolean = false // 第二栏长按状态 @Provide('ExpandStatus') expandStatus: boolean = false // 笔记本折叠展开状态 @Provide('ChooseNote') chooseNote: boolean = true // 是否选择笔记进行打开 - @Provide('Search') search: boolean = false // 是否处于搜索状态 + @Provide('Search') search: boolean = AppStorage.Get('Search') // 是否处于搜索状态 @Provide('SearchResultList') searchResultList: NoteData[] = [] // 搜索得到的笔记列表 @Provide('InputKeyword') inputKeyword: string = '' // 搜索的字串 @Provide('SelectedAll') selectedAll: boolean = false @Provide('EditModel') editModel: boolean = false //编辑模式:临时方案 @Provide('Issave') issave: number = 0 + @StorageLink('breakPoint') breakPoints: string = 'lg' controllerShow: WebController TAG = "NoteHomeComp_Tablet" - narrowWinListener = mediaquery.matchMediaSync('(width < 2000)') - - onWinSizeChange(mediaQueryResult) { - if (this.sectionStatus != 1) { - this.sectionStatus = (mediaQueryResult.matches) ? 2 : 3 - // save continue data - AppStorage.SetOrCreate('ContinueSection', this.sectionStatus) - LogUtil.info(this.TAG, "onWinSizeChange, set continue section success") - } - } + @Provide('AsideWidth') asideWidth: number = 200 build() { Flex({ justifyContent: FlexAlign.Start }) { - // Folder list display area - Flex({ direction: FlexDirection.Column, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.Center }) { - FolderListComp({ controllerShow: this.controllerShow }) - } - .flexShrink(0) - .backgroundColor($r("app.color.folderlist_bgcolor_f1f3f5")) - .width(200) - .height(StyleConstants.PERCENTAGE_100) - .visibility( - LayoutUtil.getWidthWeightMessage(this.sectionStatus) - .folderListVisibility == 0 ? Visibility.None : Visibility.Visible) - .enabled(this.search ? false : true) + if (this.breakPoints === 'lg') { + // Folder list display area + Flex({ direction: FlexDirection.Column, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.Center }) { + FolderListComp({ controllerShow: this.controllerShow }) + } + .flexShrink(0) + .backgroundColor($r("app.color.folderlist_bgcolor_f1f3f5")) + .width(this.asideWidth) + .height(StyleConstants.PERCENTAGE_100) + .animation({ duration: 200 }) + .enabled(this.search ? false : true) - // Note list display area - Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { - Divider() - .vertical(true) - .strokeWidth(1) - .color($r("app.color.divider_color_182431")) - .height("100%") - .opacity(StyleConstants.OPACITY_10) - NoteListComp({ controllerShow: this.controllerShow }) - } - .flexShrink(1) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) - .layoutWeight(2) - .height(StyleConstants.PERCENTAGE_100) - .visibility( - LayoutUtil.getWidthWeightMessage(this.sectionStatus) - .noteListVisibility == 0 ? Visibility.None : Visibility.Visible) - // Note content display area - Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { - Divider() - .vertical(true) - .strokeWidth(1) - .color($r("app.color.divider_color_182431")) - .height("100%") - .opacity(StyleConstants.OPACITY_10) - NoteContentComp({ controllerShow: this.controllerShow }) + // Note list display area + Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { + Divider() + .vertical(true) + .strokeWidth(1) + .color($r("app.color.divider_color_182431")) + .height("100%") + .opacity(StyleConstants.OPACITY_10) + NoteListComp({ controllerShow: this.controllerShow }) + } + .flexShrink(1) + .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) + .layoutWeight(2) + .height(StyleConstants.PERCENTAGE_100) + .visibility( + LayoutUtil.getWidthWeightMessage(this.sectionStatus) + .noteListVisibility == 0 ? Visibility.None : Visibility.Visible) + // Note content display area + Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { + Divider() + .vertical(true) + .strokeWidth(1) + .color($r("app.color.divider_color_182431")) + .height("100%") + .opacity(StyleConstants.OPACITY_10) + NoteContentComp({ controllerShow: this.controllerShow }) + } + .flexShrink(0) + .backgroundColor($r("app.color.notecontent_color_ffffff")) + .layoutWeight(this.sectionStatus != 1 ? 3 : null) + .height(StyleConstants.PERCENTAGE_100) + .enabled(this.longpress || this.search && this.inputKeyword.length == 0 ? false : true) + } else if (this.breakPoints === 'md') { + Stack({ alignContent: Alignment.Start }) { + Row() { + // Note list display area + Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { + Divider() + .vertical(true) + .strokeWidth(1) + .color($r("app.color.divider_color_182431")) + .height("100%") + .opacity(StyleConstants.OPACITY_10) + NoteListComp({ controllerShow: this.controllerShow }) + } + .flexShrink(1) + .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) + .layoutWeight(2) + .height(StyleConstants.PERCENTAGE_100) + .visibility( + LayoutUtil.getWidthWeightMessage(this.sectionStatus) + .noteListVisibility == 0 ? Visibility.None : Visibility.Visible) + + Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { + Divider() + .vertical(true) + .strokeWidth(1) + .color($r("app.color.divider_color_182431")) + .height("100%") + .opacity(StyleConstants.OPACITY_10) + NoteContentComp({ controllerShow: this.controllerShow }) + } + .flexShrink(0) + .backgroundColor($r("app.color.notecontent_color_ffffff")) + .layoutWeight(this.sectionStatus != 1 ? 3 : null) + .height(StyleConstants.PERCENTAGE_100) + .enabled(this.longpress || this.search && this.inputKeyword.length == 0 ? false : true) + } + + // 蒙层 + if (this.expandStatus) { + Column() + .width('100%') + .height('100%') + .position({ x: 0, y: 0 }) + .backgroundColor(Color.Black) + .opacity(0.2) + .transition({ opacity: 0 }) + } + //Folder list display area + Column() { + FolderListComp() + } + .width(200) + .height(StyleConstants.PERCENTAGE_100) + .translate({ x: this.expandStatus ? 0 : '-200', y: 0 }) + } + .width(StyleConstants.PERCENTAGE_100).height(StyleConstants.PERCENTAGE_100) } - .flexShrink(0) - .backgroundColor($r("app.color.notecontent_color_ffffff")) - .layoutWeight(this.sectionStatus != 1 ? 3 : null) - .height(StyleConstants.PERCENTAGE_100) - .enabled(this.longpress || this.search && this.inputKeyword.length == 0 ? false : true) } .width(StyleConstants.PERCENTAGE_100) .height(StyleConstants.PERCENTAGE_100) } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(this.TAG, "aboutToAppear") - this.narrowWinListener.on('change', this.onWinSizeChange.bind(this)) - this.sectionStatus = this.narrowWinListener.matches ? 2 : 3 let isContinue = AppStorage.Get('IsContinue') LogUtil.info(this.TAG, "aboutToAppear, isContinue : " + isContinue) if (isContinue) { @@ -122,14 +168,14 @@ export struct NoteHomeComp { let continueFromPhone = AppStorage.Get('ContinueFromPhone') LogUtil.info(this.TAG, "aboutToAppear, continueFromPhone : " + continueFromPhone) if (continueFromPhone) { - this.sectionStatus = 3 + this.sectionStatus = 1 } // save continue data AppStorage.SetOrCreate('ContinueSection', this.sectionStatus) LogUtil.info(this.TAG, "aboutToAppear, set continue section success") } - aboutToDisappear(): void{ + aboutToDisappear(): void { LogUtil.info(this.TAG, "aboutToDisappear") } } \ No newline at end of file diff --git a/product/tablet/src/main/ets/pages/NoteHomePortrait.ets b/product/default/src/main/ets/pages/NoteHomePortrait.ets similarity index 83% rename from product/tablet/src/main/ets/pages/NoteHomePortrait.ets rename to product/default/src/main/ets/pages/NoteHomePortrait.ets index ec185df422f194a33865386b3a9923dff439197c..66e9356fe86810d6ed4b97d144cf7912787ed09b 100644 --- a/product/tablet/src/main/ets/pages/NoteHomePortrait.ets +++ b/product/default/src/main/ets/pages/NoteHomePortrait.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { FolderListComp, FolderListBackGround } from '@ohos/component/src/main/ets/components/FolderListComp' +import { FolderListComp } from '@ohos/component/src/main/ets/components/FolderListComp' import { NoteListComp } from '@ohos/component/src/main/ets/components/NoteListComp' import { NoteContentCompPortrait } from '@ohos/component/src/main/ets/components/NoteContentCompPortrait' import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants' @@ -37,7 +37,7 @@ export struct NoteHomePortraitComp { @Provide('Longpress') longpress: boolean = false // 第二栏长按状态 // 分栏状态 - @Provide('ExpandStatus') expandStatus: boolean = AppStorage.Get('Expand') // 笔记本折叠展开状态 + @Provide('ExpandStatus') expandStatus: boolean = false // 笔记本折叠展开状态 @Provide('ChooseNote') chooseNote: boolean = AppStorage.Get('Choose') // 是否选择笔记进行打开 @Provide('Search') search: boolean = false // 是否处于搜索状态 @@ -46,10 +46,10 @@ export struct NoteHomePortraitComp { @Provide('SelectedAll') selectedAll: boolean = false; @Provide('EditModel') editModel: boolean = false TAG = "NoteHomePortraitComp_Phone" + @Provide('AsideWidth') asideWidth: number = 200 build() { Stack({ alignContent: Alignment.Start }) { - // Note list display area Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { NoteListComp() @@ -59,23 +59,33 @@ export struct NoteHomePortraitComp { .enabled(this.expandStatus ? false : true) .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) + // 蒙层 + if (this.expandStatus) { + Column() + .width('100%') + .height('100%') + .position({ x: 0, y: 0 }) + .backgroundColor(Color.Black) + .opacity(0.2) + .transition({ opacity: 0 }) + } //Folder list display area - Stack() { - FolderListBackGround() + Column() { FolderListComp() } .width(200) .height(StyleConstants.PERCENTAGE_100) - .visibility(this.expandStatus == false ? Visibility.None : Visibility.Visible) + .position({ x: 0, y: 0 }) + .translate({ x: this.expandStatus ? 0 : '-200', y: 0 }) } .width(StyleConstants.PERCENTAGE_100).height(StyleConstants.PERCENTAGE_100) } - aboutToAppear(): void{ + aboutToAppear(): void { LogUtil.info(this.TAG, "aboutToAppear") } - aboutToDisappear(): void{ + aboutToDisappear(): void { LogUtil.info(this.TAG, "aboutToDisappear") } } \ No newline at end of file diff --git a/product/tablet/src/main/module.json5 b/product/default/src/main/module.json5 similarity index 89% rename from product/tablet/src/main/module.json5 rename to product/default/src/main/module.json5 index b31a6659468a59cace3e4dc4e6404933293614d7..90ee051fa5f305ac02cc3040c581ef090bac8fd9 100644 --- a/product/tablet/src/main/module.json5 +++ b/product/default/src/main/module.json5 @@ -13,9 +13,10 @@ * limitations under the License. */ + { "module": { - "name": "tablet", + "name": "default", "type": "entry", "srcEntrance": "./ets/Application/AbilityStage.ts", "description": "$string:entry_MainAbility", @@ -44,11 +45,20 @@ "name": "ohos.permission.DISTRIBUTED_DATASYNC", "reason": "$string:distributed_dataSync_permission" }, + { + "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" + } ], "deliveryWithInstall": true, "installationFree": false, "pages": "$profile:main_pages", "uiSyntax": "ets", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "true" + } + ], "abilities": [ { "name": "MainAbility", @@ -57,6 +67,7 @@ "icon": "$media:note", "label": "$string:entry_MainAbility", "visible": true, + "continuable": true, "skills": [ { "entities": [ diff --git a/product/phone/src/main/resources/base/element/color.json b/product/default/src/main/resources/base/element/color.json similarity index 100% rename from product/phone/src/main/resources/base/element/color.json rename to product/default/src/main/resources/base/element/color.json diff --git a/product/tablet/src/main/resources/base/element/string.json b/product/default/src/main/resources/base/element/string.json similarity index 100% rename from product/tablet/src/main/resources/base/element/string.json rename to product/default/src/main/resources/base/element/string.json diff --git a/product/tablet/src/main/resources/base/profile/main_pages.json b/product/default/src/main/resources/base/profile/main_pages.json similarity index 100% rename from product/tablet/src/main/resources/base/profile/main_pages.json rename to product/default/src/main/resources/base/profile/main_pages.json diff --git a/product/tablet/src/main/resources/zh_CN/element/string.json b/product/default/src/main/resources/zh_CN/element/string.json similarity index 100% rename from product/tablet/src/main/resources/zh_CN/element/string.json rename to product/default/src/main/resources/zh_CN/element/string.json diff --git a/product/phone/package.json b/product/phone/package.json deleted file mode 100644 index e1618148cbf1f1ce224479ba13a6140d5af6f0c1..0000000000000000000000000000000000000000 --- a/product/phone/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "license":"ISC", - "devDependencies":{}, - "name":"phone", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/utils":"file:../../common/utils", - "@ohos/component":"file:../../common/component", - "@ohos/source":"file:../../common/resources" - } -} \ No newline at end of file diff --git a/product/phone/src/main/ets/Application/AbilityStage.ts b/product/phone/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index 32dfe93ccff0375201857794de902cec4d239442..0000000000000000000000000000000000000000 --- a/product/phone/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,7 +0,0 @@ -import AbilityStage from "@ohos.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/product/phone/src/main/ets/MainAbility/MainAbility.ts b/product/phone/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index ada4b828387c4d4fe44b4d23c9cb4aa871880efb..0000000000000000000000000000000000000000 --- a/product/phone/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ability from '@ohos.application.Ability' -import AbilityConstant from '@ohos.application.AbilityConstant' -import fileio from '@ohos.fileio' -import inputMethod from '@ohos.inputmethod' -globalThis.rdbStore = undefined -export default class MainAbility extends Ability { - private Tag = "MainAbility_Phone" - - onCreate(want, launchParam) { - console.info(this.Tag + " onCreate, launchReason is " + launchParam.launchReason) - AppStorage.SetOrCreate('Expand', false) - AppStorage.SetOrCreate('Choose', true) - if (launchParam.launchReason == 3) { - // 设置迁移标记 - AppStorage.SetOrCreate('IsContinue', true) - // 获取对端的迁移数据 - let continueNote: string = want.parameters["ContinueNote"] - AppStorage.SetOrCreate('ContinueNote', continueNote) - // 来自手机的迁移 - let continueChoose: boolean = want.parameters["ContinueChoose"] - if (continueChoose) { - console.info(this.Tag + " continue from phone") - }else{ - AppStorage.SetOrCreate('ContinueFromTablet', true) - console.info(this.Tag + " continue from tablet") - } - this.context.restoreWindowStage(null) - } - globalThis.noteContext = this.context - } - - onDestroy() { - console.info(this.Tag + " onDestroy") - } - - onWindowStageCreate(windowStage) { - console.info(this.Tag + " onWindowStageCreate") - windowStage.setUIContent(this.context, "pages/MyNoteHome", null) - } - - onWindowStageDestroy() { - console.info(this.Tag + " onWindowStageDestroy") - } - - onForeground() { - console.info(this.Tag + " onForeground") - } - - onBackground() { - console.info(this.Tag + " onBackground") - // 退出键盘 - inputMethod.getInputMethodController().stopInput(); - } - - onContinue(wantParam: { [key: string]: any }) { - console.info(this.Tag + " onContinue") - // 获取本端的迁移数据 - let continueNote = AppStorage.Get('ContinueNote') - if (continueNote == undefined || continueNote == null) { - console.info(this.Tag + " onContinue, continueNote is error, default [0]") - continueNote = JSON.stringify(AppStorage.Get('AllNoteArray')[0].toNoteObject()) - } - - // 保存本端的迁移数据 - wantParam["ContinueNote"] = continueNote - wantParam["ContinueChoose"] = true - - // save img to DisFileDir - console.info(this.Tag + " onContinue, save img to DisFileDir") - let continueNoteObj = JSON.parse(continueNote) - let srcArray = this.getSrcFromHtml(continueNoteObj.content_text) - srcArray.forEach((src: string) => { - let lastIndex = src.lastIndexOf('/') - if (lastIndex != -1) { - let imgName = src.substring(lastIndex + 1) - this.writeToDisFileDir(imgName) - } - }) - console.info(this.Tag + " onContinue end") - return AbilityConstant.OnContinueResult.AGREE; - } - - getSrcFromHtml(html: string): any{ - let srcArray = [] - if (html == undefined || html == null || html == "") { - return srcArray - } - let imgReg = /]+>/g - let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i - let imgArray = html.match(imgReg) - if (imgArray != null) { - for (let i = 0; i < imgArray.length; i++) { - let src = imgArray[i].match(srcReg) - if (src != null && src.length > 1) { - srcArray.push(src[1]) - } - } - } - return srcArray - } - - writeToDisFileDir(fileName: string) { - console.info(this.Tag + " writeToDisFileDir, fileName : " + fileName) - let filesDir = this.context.filesDir - let srcPath = filesDir + "/" + fileName - let distributedFilesDir = this.context.distributedFilesDir - let desPath = distributedFilesDir + "/" + fileName - try { - fileio.copyFileSync(srcPath, desPath) - console.info(this.Tag + " onContinue, writeToDisFileDir, copyFile successfully") - } catch (err) { - console.warn(this.Tag + " onContinue, writeToDisFileDir, copyFile failed : " + err) - } - } -} \ No newline at end of file diff --git a/product/phone/src/main/ets/pages/NoteContentHome.ets b/product/phone/src/main/ets/pages/NoteContentHome.ets deleted file mode 100644 index d12a18e7e3b30b5279bf2ca495530af7b4afb458..0000000000000000000000000000000000000000 --- a/product/phone/src/main/ets/pages/NoteContentHome.ets +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {NoteContentCompPortrait} from '@ohos/component/src/main/ets/components/NoteContentCompPortrait' -import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' -import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' - -@Entry -@Component -struct NoteContentHome { - @Provide('RefreshFlag') refreshFlag: number = 0 - private controllerShow: WebController = new WebController() - @StorageLink('DBQueryFinished') dBQueryFinished: number = 0 - TAG = "NoteContentHome_Phone" - - build() { - // Note content display area - Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { - if (this.dBQueryFinished == 1) { - NoteContentCompPortrait({ controllerShow: this.controllerShow }) - } - } - .backgroundColor($r("app.color.notecontent_color_ffffff")) - .width('100%') - .height('100%') - } - - onBackPress():void{ - LogUtil.info(this.TAG, "onBackPress") - this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(false)" }) - this.controllerShow.runJavaScript({ script: "getHtmlContent()" }) - } - - aboutToAppear(): void{ - LogUtil.info(this.TAG, "aboutToAppear") - let isContinue = AppStorage.Get('IsContinue') - LogUtil.info(this.TAG, "aboutToAppear, isContinue : " + isContinue) - if (isContinue) { - RdbStoreUtil.initAppStorage(globalThis.noteContext) - } - AppStorage.SetOrCreate('NoteContentHomeExist', true) - } - -} \ No newline at end of file diff --git a/product/phone/src/main/ets/pages/NoteHomePortrait.ets b/product/phone/src/main/ets/pages/NoteHomePortrait.ets deleted file mode 100644 index ec185df422f194a33865386b3a9923dff439197c..0000000000000000000000000000000000000000 --- a/product/phone/src/main/ets/pages/NoteHomePortrait.ets +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { FolderListComp, FolderListBackGround } from '@ohos/component/src/main/ets/components/FolderListComp' -import { NoteListComp } from '@ohos/component/src/main/ets/components/NoteListComp' -import { NoteContentCompPortrait } from '@ohos/component/src/main/ets/components/NoteContentCompPortrait' -import StyleConstants from '@ohos/utils/src/main/ets/default/constants/StyleConstants' -import { LogUtil } from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' -import { circleColorArray } from '@ohos/utils/src/main/ets/default/model/NoteBaseData' -import FolderData from '@ohos/utils/src/main/ets/default/model/databaseModel/FolderData' -import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import { SysDefFolderUuid } from '@ohos/utils/src/main/ets/default/model/databaseModel/EnumData' -import LayoutUtil from '@ohos/utils/src/main/ets/default/baseUtil/LayoutUtil' -import NoteUtil from '@ohos/utils/src/main/ets/default/baseUtil/NoteUtil' - -@Entry -@Component -export struct NoteHomePortraitComp { - // 当前文件夹、笔记、分栏 - @Provide('SelectedFolderData') selectedFolderData: FolderData = AppStorage.Get('Folder') - @Provide('SelectedNoteData') selectedNoteData: NoteData = AppStorage.Get('Note') - @Provide('SectionStatus') sectionStatus: number = 1; // 表示分栏状态, 3表示三分栏, 2表示二分栏,1表示一分栏 - @Provide('LastSectionStatus') lastSectionStatus: number = 1; // 记录分栏上一次的状态 - @Provide('SelectedColor') selectedColor: string = circleColorArray[0]; - @Provide('Longpress') longpress: boolean = false // 第二栏长按状态 - - // 分栏状态 - @Provide('ExpandStatus') expandStatus: boolean = AppStorage.Get('Expand') // 笔记本折叠展开状态 - @Provide('ChooseNote') chooseNote: boolean = AppStorage.Get('Choose') // 是否选择笔记进行打开 - - @Provide('Search') search: boolean = false // 是否处于搜索状态 - @Provide('SearchResultList') searchResultList: NoteData[] = [] // 搜索得到的笔记列表 - @Provide('InputKeyword') inputKeyword: string = '' // 搜索的字串 - @Provide('SelectedAll') selectedAll: boolean = false; - @Provide('EditModel') editModel: boolean = false - TAG = "NoteHomePortraitComp_Phone" - - build() { - Stack({ alignContent: Alignment.Start }) { - - // Note list display area - Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) { - NoteListComp() - } - .width(StyleConstants.PERCENTAGE_100) - .height(StyleConstants.PERCENTAGE_100) - .enabled(this.expandStatus ? false : true) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) - - //Folder list display area - Stack() { - FolderListBackGround() - FolderListComp() - } - .width(200) - .height(StyleConstants.PERCENTAGE_100) - .visibility(this.expandStatus == false ? Visibility.None : Visibility.Visible) - } - .width(StyleConstants.PERCENTAGE_100).height(StyleConstants.PERCENTAGE_100) - } - - aboutToAppear(): void{ - LogUtil.info(this.TAG, "aboutToAppear") - } - - aboutToDisappear(): void{ - LogUtil.info(this.TAG, "aboutToDisappear") - } -} \ No newline at end of file diff --git a/product/phone/src/main/module.json5 b/product/phone/src/main/module.json5 deleted file mode 100644 index 133254e040222683c5123d663748016bd57b0856..0000000000000000000000000000000000000000 --- a/product/phone/src/main/module.json5 +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -{ - "module": { - "name": "phone", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_MainAbility", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - ], - "requestPermissions": [ - { - "name": "ohos.permission.INTERNET" - }, - { - "name": "ohos.permission.READ_MEDIA", - "reason": "$string:read_media_permission" - }, - { - "name": "ohos.permission.MEDIA_LOCATION", - "reason": "$string:media_location_permission" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC", - "reason": "$string:distributed_dataSync_permission" - }, - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "abilities": [ - { - "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:entry_MainAbility", - "icon": "$media:note", - "label": "$string:entry_MainAbility", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "startWindowBackground": "$color:color_1", - "startWindowIcon": "$media:note" - } - ] - } -} \ No newline at end of file diff --git a/product/phone/src/main/resources/base/element/string.json b/product/phone/src/main/resources/base/element/string.json deleted file mode 100644 index 3650d72362e01f7dab414c92f1f4473c37b36137..0000000000000000000000000000000000000000 --- a/product/phone/src/main/resources/base/element/string.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "备忘录" - }, - { - "name": "read_media_permission", - "value": "Used to read media file information in external storage of users" - }, - { - "name": "media_location_permission", - "value": "Used for memo access to geographic location information in user media files" - }, - { - "name": "distributed_dataSync_permission", - "value": "Used for memo data exchange between different equipment" - } - ] -} \ No newline at end of file diff --git a/product/phone/src/main/resources/base/profile/main_pages.json b/product/phone/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 3ed436510399e1013175d93801af9ec1a932b895..0000000000000000000000000000000000000000 --- a/product/phone/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "src": [ - "pages/MyNoteHome", - "pages/NoteContentHome", - "pages/NoteHomePortrait" - ] -} \ No newline at end of file diff --git a/product/phone/src/main/resources/zh_CN/element/string.json b/product/phone/src/main/resources/zh_CN/element/string.json deleted file mode 100644 index 215a916166e69bbd3fc5b69e6e68ceeebde0be98..0000000000000000000000000000000000000000 --- a/product/phone/src/main/resources/zh_CN/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "read_media_permission", - "value": "用于备忘录读取用户外部存储中的媒体文件信息" - }, - { - "name": "media_location_permission", - "value": "用于备忘录访问用户媒体文件中的地理位置信息" - }, - { - "name": "distributed_dataSync_permission", - "value": "用于备忘录进行不同设备间的数据交换" - } - ] -} \ No newline at end of file diff --git a/product/tablet/.gitignore b/product/tablet/.gitignore deleted file mode 100644 index 4f9a973815d0b5e49bc8547681a6b4bc7a178d12..0000000000000000000000000000000000000000 --- a/product/tablet/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules -/.preview -/build \ No newline at end of file diff --git a/product/tablet/hvigorfile.js b/product/tablet/hvigorfile.js deleted file mode 100644 index d7720ee6a7aad5c617d1fd2f6fc8c87067bfa32c..0000000000000000000000000000000000000000 --- a/product/tablet/hvigorfile.js +++ /dev/null @@ -1,2 +0,0 @@ -// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. -module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks diff --git a/product/tablet/package-lock.json b/product/tablet/package-lock.json deleted file mode 100644 index ea624c257202fd179942ef8fe6b484a84bd6d7de..0000000000000000000000000000000000000000 --- a/product/tablet/package-lock.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "tablet", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ohos/component": { - "version": "file:../../common/component", - "requires": { - "@ohos/source": "file:../../common/resources", - "@ohos/utils": "file:../../common/utils" - }, - "dependencies": { - "@ohos/source": { - "version": "file:../../common/resources" - }, - "@ohos/utils": { - "version": "file:../../common/utils", - "requires": { - "@ohos/source": "file:../../common/resources" - }, - "dependencies": { - "@ohos/source": { - "version": "file:../../common/resources" - } - } - } - } - }, - "@ohos/source": { - "version": "file:../../common/resources" - }, - "@ohos/utils": { - "version": "file:../../common/utils", - "requires": { - "@ohos/source": "file:../../common/resources" - }, - "dependencies": { - "@ohos/source": { - "version": "file:../../common/resources" - } - } - } - } -} diff --git a/product/tablet/package.json b/product/tablet/package.json deleted file mode 100644 index 4cfedc4cfe9ac452b6e77922447b55f0e15dfecd..0000000000000000000000000000000000000000 --- a/product/tablet/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "license":"ISC", - "devDependencies":{}, - "name":"tablet", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/utils":"file:../../common/utils", - "@ohos/component":"file:../../common/component", - "@ohos/source":"file:../../common/resources" - } -} \ No newline at end of file diff --git a/product/tablet/src/main/ets/pages/MyNoteHome.ets b/product/tablet/src/main/ets/pages/MyNoteHome.ets deleted file mode 100644 index 33be5c2e6bca240cb2b860b265acce7345fa77fe..0000000000000000000000000000000000000000 --- a/product/tablet/src/main/ets/pages/MyNoteHome.ets +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import fileio from '@ohos.fileio' -import deviceInfo from '@ohos.deviceInfo'; -import {NoteHomeComp} from './NoteHome' -import {NoteHomePortraitComp} from './NoteHomePortrait' -import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' -import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' -import NoteData from '@ohos/utils/src/main/ets/default/model/databaseModel/NoteData' -import inputMethod from '@ohos.inputmethod'; -import router from '@system.router'; - -@Entry -@Component -export struct MyNoteHomeComp { - @StorageLink('DBQueryFinished') dBQueryFinished: number = 0 - @Provide('PortraitModel') portraitModel: boolean = (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') - @Provide('RefreshFlag') refreshFlag: number = 0 - private controllerShow: WebController = new WebController() - private context = getContext(this) - TAG = "MyNoteHomeComp_Tablet" - - build() { - Row() { - if (this.dBQueryFinished == 1) { - if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') { - NoteHomePortraitComp() - } else { - NoteHomeComp({ controllerShow: this.controllerShow }) - } - - } - } - .width('100%') - .height('100%') - } - - aboutToAppear(): void{ - LogUtil.info(this.TAG, "aboutToAppear") - - if (this.context == undefined || this.context == null) { - LogUtil.warn(this.TAG, "context is error") - return - } - - let permissionList: Array = [ - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA", - "ohos.permission.DISTRIBUTED_DATASYNC" - ] - if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') { - permissionList = [ - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA", - "ohos.permission.MEDIA_LOCATION", - "ohos.permission.DISTRIBUTED_DATASYNC" - ] - } - LogUtil.info(this.TAG, 'permissions need to require from user') - let context: any = getContext(this); - context.requestPermissionsFromUser(permissionList).then((data) => { - LogUtil.info(this.TAG, 'data permissions : ' + data.permissions) - LogUtil.info(this.TAG, 'data result: ' + data.authResults) - let sum = 0 - for (let i = 0; i < data.authResults.length; i++) { - sum += data.authResults[i] - } - LogUtil.info(this.TAG, 'request permissions sum: ' + sum) - }, (err) => { - LogUtil.warn(this.TAG, 'failed to requestPermissionsFromUser : ' + err.code); - }) - - let dbExist = false; - let dbPath = context.databaseDir + "/db/note.db" - try { - fileio.accessSync(dbPath) - LogUtil.info(this.TAG, "db has created") - RdbStoreUtil.initAppStorage(this.context) - dbExist = true - } catch (err) { - LogUtil.info(this.TAG, "db has not created, find to rdb folder") - } - if (!dbExist) { - dbPath = context.databaseDir + "/rdb/note.db" - try{ - fileio.accessSync(dbPath) - LogUtil.info(this.TAG,"db has created") - RdbStoreUtil.initAppStorage(this.context) - } catch (err) { - LogUtil.info(this.TAG,"db has not created, start to create db") - RdbStoreUtil.createRdbStore(this.context) - } - } - } - - aboutToDisappear(): void{ - LogUtil.info(this.TAG, "aboutToDisappear") - } - - onPageShow(): void{ - LogUtil.info(this.TAG, "onPageShow") - if (deviceInfo.deviceType === 'phone' || deviceInfo.deviceType === 'default') { - // continue from tablet - let continueFromTablet = AppStorage.Get('ContinueFromTablet') - LogUtil.info(this.TAG, "onPageShow, continueFromTablet : " + continueFromTablet) - let noteContentHomeExist = AppStorage.Get('NoteContentHomeExist') - LogUtil.info(this.TAG, "onPageShow, noteContentHomeExist : " + noteContentHomeExist) - if (continueFromTablet && !noteContentHomeExist) { - router.push({ uri: 'pages/NoteContentHome' }) - AppStorage.SetOrCreate('ContinueFromTablet', false) - } - } else { - let currentNote = AppStorage.Get('NewNote') - let needRefresh = AppStorage.Get('needRefresh') - if (currentNote != null && needRefresh == true) { - this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setHtml('" + currentNote.content_text + "')" }) - AppStorage.SetOrCreate('needRefresh',false) - } - } - - this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) - } - - onBackPress() { - LogUtil.info(this.TAG, "onBackPress") - // 退出键盘 - inputMethod.getInputMethodController().stopInput(); - } -} \ No newline at end of file diff --git a/product/tablet/src/main/resources/base/element/color.json b/product/tablet/src/main/resources/base/element/color.json deleted file mode 100644 index 0c413afad79dba84fe7c819b4fdee0cc6972cade..0000000000000000000000000000000000000000 --- a/product/tablet/src/main/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "color_1", - "value": "#fff" - } - ] -} \ No newline at end of file diff --git a/signature/UnsgnedReleasedProfileTemplate.json b/signature/UnsgnedReleasedProfileTemplate.json new file mode 100644 index 0000000000000000000000000000000000000000..198eac0a8d38c60f132056241ad08ea03e37623f --- /dev/null +++ b/signature/UnsgnedReleasedProfileTemplate.json @@ -0,0 +1,27 @@ +{ + "version-name": "2.0.0", + "version-code": 2, + "app-distribution-type": "os_integration", + "uuid": "5027b99e-5f9e-465d-9508-a9e0134ffe18", + "validity": { + "not-before": 1594865258, + "not-after": 1689473258 + }, + "type": "release", + "bundle-info": { + "developer-id": "OpenHarmony", + "distribution-certificate": "-----BEGIN CERTIFICATE-----\nMIICFDCCAZmgAwIBAgIEfc9FYzAMBggqhkjOPQQDAwUAMGMxCzAJBgNVBAYTAkNO\nMRQwEgYDVQQKEwtPcGVuSGFybW9ueTEZMBcGA1UECxMQT3Blbkhhcm1vbnkgVGVh\nbTEjMCEGA1UEAxMaT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gQ0EwHhcNMjIxMjIx\nMDM0MjA3WhcNMzIxMjE4MDM0MjA3WjBKMRUwEwYDVQQDDAxpZGVfZGVtb19hcHAx\nDTALBgNVBAsTBFVuaXQxFTATBgNVBAoTDE9yZ2FuaXphdGlvbjELMAkGA1UEBhMC\nQ04wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATB+nRPXBTqJciFQWBaHGoEZFUs\nB2g+vVAkO2mqzvC4EvHSZXABHQ9TfmNn5G2ew2pzIvzhVhpD+4Vgt6xLhlQPo1Iw\nUDAdBgNVHQ4EFgQUc1K0TS4hsnNYulx1ZK65mBYoTSMwDgYDVR0PAQH/BAQDAgeA\nMB8GA1UdIwQYMBaAFNuGtyIW1QuhS7fdJXu58QV9oi1HMAwGCCqGSM49BAMDBQAD\nZwAwZAIwH7iB1wE7x0wAQcyqOcycLi7BTyL9hWkTkp4CSRew6xdOfPDmYuPKv/85\nQw8tj4n2AjAPbFMRSrs4cJEIix5PDGxfe89u/JtAmlvKQCmIze1ivrbiXVu3nVsA\nZ0RDZPYTSqc\u003d\n-----END CERTIFICATE-----\n", + "bundle-name": "com.ohos.note", + "apl": "normal", + "app-feature": "hos_normal_app" + }, + "acls": { + "allowed-acls": [ + "ohos.permission.START_ABILITIES_FROM_BACKGROUND" + ] + }, + "permissions": { + "restricted-permissions": [] + }, + "issuer": "pki_internal" +} \ No newline at end of file