From 6e6d50c142162513fe1a076e0097f77727f96b8e Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Tue, 23 Nov 2021 15:07:40 +0800 Subject: [PATCH] houhaoyu@huawei.com Signed-off-by: houhaoyu Change-Id: Ie6bc8a1f0c89097de10ec2befecde0e319ea336d --- LICENSE | 177 ++++++++++++++++++ compiler/.eslintrc | 15 ++ compiler/README.md | 2 +- compiler/sample/app.ets | 15 ++ compiler/sample/pages/home.ets | 15 ++ compiler/sample/pages/home_preview.ets | 15 ++ compiler/sample/pages/index.ets | 15 ++ .../sample/pages/testcases/component-01.ets | 15 ++ .../pages/testcases/componentGridTest.ets | 15 ++ .../pages/testcases/componentListTest.ets | 15 ++ .../sample/pages/testcases/constructor-01.ets | 15 ++ .../sample/pages/testcases/constructor-02.ets | 15 ++ .../sample/pages/testcases/constructor-03.ets | 15 ++ .../expected/component-01-expected.js | 17 +- .../expected/constructor-01-expected.js | 15 ++ .../expected/constructor-02-expected.js | 15 ++ .../expected/constructor-03-expected.js | 15 ++ .../testcases/expected/link-01-expected.js | 15 ++ .../testcases/expected/new-01-expected.js | 15 ++ .../testcases/expected/new-02-expected.js | 15 ++ .../testcases/expected/new-03-expected.js | 15 ++ .../testcases/expected/new-04-expected.js | 15 ++ .../testcases/expected/struct-01-expected.js | 15 ++ .../testcases/expected/struct-02-expected.js | 15 ++ .../pages/testcases/forEachComplexModel.ets | 15 ++ .../pages/testcases/forEachSimpleModel.ets | 15 ++ compiler/sample/pages/testcases/image.ets | 15 ++ .../sample/pages/testcases/import-api-01.ets | 15 ++ compiler/sample/pages/testcases/link-01.ets | 15 ++ .../sample/pages/testcases/linkArrayModel.ets | 15 ++ .../sample/pages/testcases/linkPropCombo.ets | 15 ++ .../pages/testcases/linkSimpleModel.ets | 15 ++ compiler/sample/pages/testcases/new-01.ets | 15 ++ compiler/sample/pages/testcases/new-0101.ets | 15 ++ compiler/sample/pages/testcases/new-02.ets | 15 ++ compiler/sample/pages/testcases/new-03.ets | 15 ++ compiler/sample/pages/testcases/new-04.ets | 15 ++ .../sample/pages/testcases/onclicktest.ets | 14 ++ .../pages/testcases/propSimpleModel.ets | 15 ++ .../pages/testcases/showcaseCovid19.ets | 18 +- .../sample/pages/testcases/simpleText.ets | 15 ++ .../sample/pages/testcases/stacktestsuite.ets | 14 ++ .../pages/testcases/stateArrayReverse.ets | 14 ++ .../testcases/stateArrayReverseCustomView.ets | 15 ++ .../pages/testcases/stateComplexType.ets | 15 ++ .../pages/testcases/stateStateBindingProp.ets | 15 ++ compiler/sample/pages/testcases/struct-01.ets | 15 ++ compiler/sample/pages/testcases/struct-02.ets | 15 ++ compiler/sample/pages/todo.ets | 16 +- compiler/test/pages/AMDComponent.ets | 15 ++ compiler/test/pages/DefaultComponent.ets | 15 ++ compiler/test/pages/ExportComponent.ets | 15 ++ compiler/test/pages/ExportStarComponent.ets | 15 ++ compiler/test/pages/LinkComponent.ets | 15 ++ compiler/test/pages/NamespaceComponent.ets | 15 ++ generateSysResource.py | 15 ++ 56 files changed, 986 insertions(+), 6 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..e6bb7bad3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/compiler/.eslintrc b/compiler/.eslintrc index 4d857e85c..4d0ce2fbc 100644 --- a/compiler/.eslintrc +++ b/compiler/.eslintrc @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + { "parserOptions": { "ecmaVersion": 7, diff --git a/compiler/README.md b/compiler/README.md index f3d80c2f2..ed7654a89 100644 --- a/compiler/README.md +++ b/compiler/README.md @@ -21,7 +21,7 @@ First, check whether your node version is 12.x or later; Secondly, config npm proxy and run `npm install` again. ``` npm config set strict-ssl false -npm config set registry https://cmc.centralrepo.rnd.huawei.com/npm/ +npm config set registry http://registry.npm.taobao.org ``` ### 2. Quick Start diff --git a/compiler/sample/app.ets b/compiler/sample/app.ets index 30a198381..0759beef2 100644 --- a/compiler/sample/app.ets +++ b/compiler/sample/app.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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 default { onCreate() { console.info('Application onCreate') diff --git a/compiler/sample/pages/home.ets b/compiler/sample/pages/home.ets index 0fce6542c..3079671f1 100644 --- a/compiler/sample/pages/home.ets +++ b/compiler/sample/pages/home.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct HomeComponent { diff --git a/compiler/sample/pages/home_preview.ets b/compiler/sample/pages/home_preview.ets index 9ae05aaf3..c11cf6319 100644 --- a/compiler/sample/pages/home_preview.ets +++ b/compiler/sample/pages/home_preview.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct HomePreviewComponent { diff --git a/compiler/sample/pages/index.ets b/compiler/sample/pages/index.ets index 2f37ded2f..2dd5eb53d 100644 --- a/compiler/sample/pages/index.ets +++ b/compiler/sample/pages/index.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct Banner { private value1: string = "hello world 4" diff --git a/compiler/sample/pages/testcases/component-01.ets b/compiler/sample/pages/testcases/component-01.ets index 44c4c183f..27c1a6be7 100644 --- a/compiler/sample/pages/testcases/component-01.ets +++ b/compiler/sample/pages/testcases/component-01.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct MyComponent1 { diff --git a/compiler/sample/pages/testcases/componentGridTest.ets b/compiler/sample/pages/testcases/componentGridTest.ets index ef46eff71..54d1cd8e3 100644 --- a/compiler/sample/pages/testcases/componentGridTest.ets +++ b/compiler/sample/pages/testcases/componentGridTest.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct GridRootView { diff --git a/compiler/sample/pages/testcases/componentListTest.ets b/compiler/sample/pages/testcases/componentListTest.ets index 361a80233..37d42cfcb 100644 --- a/compiler/sample/pages/testcases/componentListTest.ets +++ b/compiler/sample/pages/testcases/componentListTest.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct ListRootView { diff --git a/compiler/sample/pages/testcases/constructor-01.ets b/compiler/sample/pages/testcases/constructor-01.ets index f2befe6cb..139b5c496 100644 --- a/compiler/sample/pages/testcases/constructor-01.ets +++ b/compiler/sample/pages/testcases/constructor-01.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class DataModel{ private myData1: number = 0 } diff --git a/compiler/sample/pages/testcases/constructor-02.ets b/compiler/sample/pages/testcases/constructor-02.ets index 03b017c9f..72eb63327 100644 --- a/compiler/sample/pages/testcases/constructor-02.ets +++ b/compiler/sample/pages/testcases/constructor-02.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct MyLinkComponent { diff --git a/compiler/sample/pages/testcases/constructor-03.ets b/compiler/sample/pages/testcases/constructor-03.ets index 1d790e2ac..4a482cb70 100644 --- a/compiler/sample/pages/testcases/constructor-03.ets +++ b/compiler/sample/pages/testcases/constructor-03.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct MyPropComponent { diff --git a/compiler/sample/pages/testcases/expected/component-01-expected.js b/compiler/sample/pages/testcases/expected/component-01-expected.js index 849492f2a..eda0bbd21 100644 --- a/compiler/sample/pages/testcases/expected/component-01-expected.js +++ b/compiler/sample/pages/testcases/expected/component-01-expected.js @@ -1,6 +1,21 @@ +/* + * Copyright (c) 2021 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. + */ + class MyComponent extends View { constructor() { - super(); + super(); this.value1 = value1; this.value2 = value2; this.value3 = value3; diff --git a/compiler/sample/pages/testcases/expected/constructor-01-expected.js b/compiler/sample/pages/testcases/expected/constructor-01-expected.js index 76555d8b3..0dd998288 100644 --- a/compiler/sample/pages/testcases/expected/constructor-01-expected.js +++ b/compiler/sample/pages/testcases/expected/constructor-01-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyStateComponent extends View { constructor(inputParams) { super(); diff --git a/compiler/sample/pages/testcases/expected/constructor-02-expected.js b/compiler/sample/pages/testcases/expected/constructor-02-expected.js index c257a6b16..6c5de4e0c 100644 --- a/compiler/sample/pages/testcases/expected/constructor-02-expected.js +++ b/compiler/sample/pages/testcases/expected/constructor-02-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyLinkComponent extends View { constructor(inputParams) { super(); diff --git a/compiler/sample/pages/testcases/expected/constructor-03-expected.js b/compiler/sample/pages/testcases/expected/constructor-03-expected.js index ae75c757d..67382c3d3 100644 --- a/compiler/sample/pages/testcases/expected/constructor-03-expected.js +++ b/compiler/sample/pages/testcases/expected/constructor-03-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyPropComponent extends View { constructor(inputParams) { super(); diff --git a/compiler/sample/pages/testcases/expected/link-01-expected.js b/compiler/sample/pages/testcases/expected/link-01-expected.js index 46c737697..2d3a148a5 100644 --- a/compiler/sample/pages/testcases/expected/link-01-expected.js +++ b/compiler/sample/pages/testcases/expected/link-01-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyLinkTestComponent extends View { constructor(inputParams) { super(); diff --git a/compiler/sample/pages/testcases/expected/new-01-expected.js b/compiler/sample/pages/testcases/expected/new-01-expected.js index 68c475807..7e46d89c6 100644 --- a/compiler/sample/pages/testcases/expected/new-01-expected.js +++ b/compiler/sample/pages/testcases/expected/new-01-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyComponent extends View { constructor(value1 = "hello world 1", value2 = "hello world 2", value3 = "hello world 3") { super(); diff --git a/compiler/sample/pages/testcases/expected/new-02-expected.js b/compiler/sample/pages/testcases/expected/new-02-expected.js index 68c475807..7e46d89c6 100644 --- a/compiler/sample/pages/testcases/expected/new-02-expected.js +++ b/compiler/sample/pages/testcases/expected/new-02-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyComponent extends View { constructor(value1 = "hello world 1", value2 = "hello world 2", value3 = "hello world 3") { super(); diff --git a/compiler/sample/pages/testcases/expected/new-03-expected.js b/compiler/sample/pages/testcases/expected/new-03-expected.js index 4f153f34b..9bf4eae84 100644 --- a/compiler/sample/pages/testcases/expected/new-03-expected.js +++ b/compiler/sample/pages/testcases/expected/new-03-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class Banner extends View { constructor(value1 = "hello world 2") { super(); diff --git a/compiler/sample/pages/testcases/expected/new-04-expected.js b/compiler/sample/pages/testcases/expected/new-04-expected.js index 4f153f34b..9bf4eae84 100644 --- a/compiler/sample/pages/testcases/expected/new-04-expected.js +++ b/compiler/sample/pages/testcases/expected/new-04-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class Banner extends View { constructor(value1 = "hello world 2") { super(); diff --git a/compiler/sample/pages/testcases/expected/struct-01-expected.js b/compiler/sample/pages/testcases/expected/struct-01-expected.js index 8df48157b..3808218ea 100644 --- a/compiler/sample/pages/testcases/expected/struct-01-expected.js +++ b/compiler/sample/pages/testcases/expected/struct-01-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyComponent extends View { render() { } diff --git a/compiler/sample/pages/testcases/expected/struct-02-expected.js b/compiler/sample/pages/testcases/expected/struct-02-expected.js index a9ba8932d..c68c35b33 100644 --- a/compiler/sample/pages/testcases/expected/struct-02-expected.js +++ b/compiler/sample/pages/testcases/expected/struct-02-expected.js @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class MyComponent { build() { } diff --git a/compiler/sample/pages/testcases/forEachComplexModel.ets b/compiler/sample/pages/testcases/forEachComplexModel.ets index 64ad0c504..5b0a58a80 100644 --- a/compiler/sample/pages/testcases/forEachComplexModel.ets +++ b/compiler/sample/pages/testcases/forEachComplexModel.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + // class without @Component convert tool will not process. class Month { year: number = 2010; // why add assignment here, TS grammar required, if not it will omit by TSC. diff --git a/compiler/sample/pages/testcases/forEachSimpleModel.ets b/compiler/sample/pages/testcases/forEachSimpleModel.ets index f98c4e704..ad1a0a2de 100644 --- a/compiler/sample/pages/testcases/forEachSimpleModel.ets +++ b/compiler/sample/pages/testcases/forEachSimpleModel.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct MyComponent2 { diff --git a/compiler/sample/pages/testcases/image.ets b/compiler/sample/pages/testcases/image.ets index 1fc838065..632256b50 100644 --- a/compiler/sample/pages/testcases/image.ets +++ b/compiler/sample/pages/testcases/image.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct UserView1 { diff --git a/compiler/sample/pages/testcases/import-api-01.ets b/compiler/sample/pages/testcases/import-api-01.ets index 2256c7e58..7c1d6a6bc 100644 --- a/compiler/sample/pages/testcases/import-api-01.ets +++ b/compiler/sample/pages/testcases/import-api-01.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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 fetch from '@system.fetch' import router from '@system.router' diff --git a/compiler/sample/pages/testcases/link-01.ets b/compiler/sample/pages/testcases/link-01.ets index 55ffc8ca5..1af77002e 100644 --- a/compiler/sample/pages/testcases/link-01.ets +++ b/compiler/sample/pages/testcases/link-01.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct MyLinkTestComponent { @Link myLink1?: any diff --git a/compiler/sample/pages/testcases/linkArrayModel.ets b/compiler/sample/pages/testcases/linkArrayModel.ets index 45a1d9ccf..882e79169 100644 --- a/compiler/sample/pages/testcases/linkArrayModel.ets +++ b/compiler/sample/pages/testcases/linkArrayModel.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct Parent { diff --git a/compiler/sample/pages/testcases/linkPropCombo.ets b/compiler/sample/pages/testcases/linkPropCombo.ets index 7c689737d..8ba060e71 100644 --- a/compiler/sample/pages/testcases/linkPropCombo.ets +++ b/compiler/sample/pages/testcases/linkPropCombo.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct ParentView { diff --git a/compiler/sample/pages/testcases/linkSimpleModel.ets b/compiler/sample/pages/testcases/linkSimpleModel.ets index bf2ccc351..c68c24863 100644 --- a/compiler/sample/pages/testcases/linkSimpleModel.ets +++ b/compiler/sample/pages/testcases/linkSimpleModel.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct Player { diff --git a/compiler/sample/pages/testcases/new-01.ets b/compiler/sample/pages/testcases/new-01.ets index 235c5dd3f..cbe88d23a 100644 --- a/compiler/sample/pages/testcases/new-01.ets +++ b/compiler/sample/pages/testcases/new-01.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct MyComponent3 { diff --git a/compiler/sample/pages/testcases/new-0101.ets b/compiler/sample/pages/testcases/new-0101.ets index 235c5dd3f..cbe88d23a 100644 --- a/compiler/sample/pages/testcases/new-0101.ets +++ b/compiler/sample/pages/testcases/new-0101.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct MyComponent3 { diff --git a/compiler/sample/pages/testcases/new-02.ets b/compiler/sample/pages/testcases/new-02.ets index ea285c94f..d60117669 100644 --- a/compiler/sample/pages/testcases/new-02.ets +++ b/compiler/sample/pages/testcases/new-02.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct MyComponent4 { diff --git a/compiler/sample/pages/testcases/new-03.ets b/compiler/sample/pages/testcases/new-03.ets index fa0bc708c..de28fd142 100644 --- a/compiler/sample/pages/testcases/new-03.ets +++ b/compiler/sample/pages/testcases/new-03.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct Banner { private value1: string = "hello world 2"; diff --git a/compiler/sample/pages/testcases/new-04.ets b/compiler/sample/pages/testcases/new-04.ets index 73e6fff35..b3e93de2c 100644 --- a/compiler/sample/pages/testcases/new-04.ets +++ b/compiler/sample/pages/testcases/new-04.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct Banner { private value1: string = "hello world 2"; diff --git a/compiler/sample/pages/testcases/onclicktest.ets b/compiler/sample/pages/testcases/onclicktest.ets index 2a11f36ed..305ff1e58 100644 --- a/compiler/sample/pages/testcases/onclicktest.ets +++ b/compiler/sample/pages/testcases/onclicktest.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 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. + */ @Entry @Component diff --git a/compiler/sample/pages/testcases/propSimpleModel.ets b/compiler/sample/pages/testcases/propSimpleModel.ets index 5c1569bfc..6d7b371b0 100644 --- a/compiler/sample/pages/testcases/propSimpleModel.ets +++ b/compiler/sample/pages/testcases/propSimpleModel.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct ParentComponent { diff --git a/compiler/sample/pages/testcases/showcaseCovid19.ets b/compiler/sample/pages/testcases/showcaseCovid19.ets index b92d5a3cd..01a058645 100644 --- a/compiler/sample/pages/testcases/showcaseCovid19.ets +++ b/compiler/sample/pages/testcases/showcaseCovid19.ets @@ -1,4 +1,17 @@ - +/* + * Copyright (c) 2021 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. + */ /** * COVID Showcase App @@ -8,10 +21,9 @@ * * ACE @ Web Helsinki * + */ - - const enum FlexAlign { AUTO, diff --git a/compiler/sample/pages/testcases/simpleText.ets b/compiler/sample/pages/testcases/simpleText.ets index 2d93d0318..e05d17131 100644 --- a/compiler/sample/pages/testcases/simpleText.ets +++ b/compiler/sample/pages/testcases/simpleText.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Entry @Component struct UserView { diff --git a/compiler/sample/pages/testcases/stacktestsuite.ets b/compiler/sample/pages/testcases/stacktestsuite.ets index dfc9fcfd5..56908b36b 100644 --- a/compiler/sample/pages/testcases/stacktestsuite.ets +++ b/compiler/sample/pages/testcases/stacktestsuite.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 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. + */ class Test { align:number = 0; diff --git a/compiler/sample/pages/testcases/stateArrayReverse.ets b/compiler/sample/pages/testcases/stateArrayReverse.ets index d6a8903e4..e63d8937f 100644 --- a/compiler/sample/pages/testcases/stateArrayReverse.ets +++ b/compiler/sample/pages/testcases/stateArrayReverse.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 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. + */ /* StateArrayReverse test case diff --git a/compiler/sample/pages/testcases/stateArrayReverseCustomView.ets b/compiler/sample/pages/testcases/stateArrayReverseCustomView.ets index 5a1a8119c..b127cb00e 100644 --- a/compiler/sample/pages/testcases/stateArrayReverseCustomView.ets +++ b/compiler/sample/pages/testcases/stateArrayReverseCustomView.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class Item{ id:number = 0; label:string = ''; diff --git a/compiler/sample/pages/testcases/stateComplexType.ets b/compiler/sample/pages/testcases/stateComplexType.ets index abbe5c6b2..0d58d8b94 100644 --- a/compiler/sample/pages/testcases/stateComplexType.ets +++ b/compiler/sample/pages/testcases/stateComplexType.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + // Customize the status data class. class Model { value: string = ''; diff --git a/compiler/sample/pages/testcases/stateStateBindingProp.ets b/compiler/sample/pages/testcases/stateStateBindingProp.ets index d2ab7f710..6fdad55c4 100644 --- a/compiler/sample/pages/testcases/stateStateBindingProp.ets +++ b/compiler/sample/pages/testcases/stateStateBindingProp.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + class GreenButtonState { width:number = 0; diff --git a/compiler/sample/pages/testcases/struct-01.ets b/compiler/sample/pages/testcases/struct-01.ets index 0c8c1b789..941dd29f7 100644 --- a/compiler/sample/pages/testcases/struct-01.ets +++ b/compiler/sample/pages/testcases/struct-01.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component @Entry struct MyComponent7 { diff --git a/compiler/sample/pages/testcases/struct-02.ets b/compiler/sample/pages/testcases/struct-02.ets index ee57c9cde..e98ed82f8 100644 --- a/compiler/sample/pages/testcases/struct-02.ets +++ b/compiler/sample/pages/testcases/struct-02.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + struct MyComponent8 { build() { } diff --git a/compiler/sample/pages/todo.ets b/compiler/sample/pages/todo.ets index f1b21f224..e3cbe4b4c 100644 --- a/compiler/sample/pages/todo.ets +++ b/compiler/sample/pages/todo.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 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. + */ /** * ACE @ Web Helsinki @@ -10,7 +24,7 @@ * https://rnd-gitlab-eu-c.huawei.com/zidanehbs/ace/ace/-/blob/fin-hmf-dev-ace-diff-clean/samples/common/res/hi_topapp/assets/js/default/acediff/todoListForEach.js * This is the ouput the eDSL transpiler should generate. */ - + let tasks: Array = [ { label: "Wash the car" }, { label: "Buy some milk" }, diff --git a/compiler/test/pages/AMDComponent.ets b/compiler/test/pages/AMDComponent.ets index ab714803e..3135f0d85 100644 --- a/compiler/test/pages/AMDComponent.ets +++ b/compiler/test/pages/AMDComponent.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct AMDComponent { @Link AMDComponentLink1?: any diff --git a/compiler/test/pages/DefaultComponent.ets b/compiler/test/pages/DefaultComponent.ets index 94c842e7a..e0add5224 100644 --- a/compiler/test/pages/DefaultComponent.ets +++ b/compiler/test/pages/DefaultComponent.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct DefaultComponent { @Link DefaultComponentLink1?: any diff --git a/compiler/test/pages/ExportComponent.ets b/compiler/test/pages/ExportComponent.ets index c8332c7f6..d3d65b425 100644 --- a/compiler/test/pages/ExportComponent.ets +++ b/compiler/test/pages/ExportComponent.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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 DefaultComponent from "./test/pages/DefaultComponent.ets" @Component diff --git a/compiler/test/pages/ExportStarComponent.ets b/compiler/test/pages/ExportStarComponent.ets index ada630313..164a1cc91 100644 --- a/compiler/test/pages/ExportStarComponent.ets +++ b/compiler/test/pages/ExportStarComponent.ets @@ -1 +1,16 @@ +/* + * Copyright (c) 2021 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 * as AllStarComponent from './test/pages/ExportComponent'; diff --git a/compiler/test/pages/LinkComponent.ets b/compiler/test/pages/LinkComponent.ets index 1357500ba..ffcc61155 100644 --- a/compiler/test/pages/LinkComponent.ets +++ b/compiler/test/pages/LinkComponent.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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 DefaultComponent from "./DefaultComponent.ets" @Component diff --git a/compiler/test/pages/NamespaceComponent.ets b/compiler/test/pages/NamespaceComponent.ets index 5f3b3e87a..5b33ec85f 100644 --- a/compiler/test/pages/NamespaceComponent.ets +++ b/compiler/test/pages/NamespaceComponent.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + @Component struct NamespaceComponent1 { @Link NamespaceComponent1Link1?: any diff --git a/generateSysResource.py b/generateSysResource.py index 95f0c0bf7..2a80ebe7b 100644 --- a/generateSysResource.py +++ b/generateSysResource.py @@ -1,5 +1,20 @@ +# /* +# Copyright (c) 2021 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. + #!/usr/bin/env python # -*- coding: utf-8 -*- + import json import os import argparse -- Gitee