diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..95dc1a0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# Change these settings to your own preference +indent_style = tab + +[*.{yaml,yml,md,json,xml,properties}] +indent_size = 2 +indent_style = space + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b6d9481 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: "Build and validate the content" + +on: + pull_request: + branches: [main] + +env: + HUSKY_SKIP: true + +jobs: + build: + runs-on: ubuntu-latest + if: "! contains(github.event.head_commit.message, '[skip ci]')" + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Build and validate all steps + run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b62c5e7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: "Deploy to GH pages" + +on: + push: + branches: [main] + +env: + HUSKY_SKIP: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: "20.x" + + - name: Install dependencies + run: npm install + + - name: Build and validate all steps + run: npm run build + + - name: Deploy to GH pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist + force_orphan: true + #enable_jekyll: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b607628 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.vscode +dist +node_modules +package-lock-json +.DS_Store diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ea27fb0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + 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 + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2023 SAP SE + + 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6074170 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# UI5 Web Components Bundle + +As [UI5 Web Components](https://sap.github.io/ui5-webcomponents/) [do not provide a bundle via CDN](https://sap.github.io/ui5-webcomponents/docs/getting-started/first-steps/#distribution-model) this GitHub project uses the bundle definitions from the old playground to create a custom bundle again. This bundle can be used via GitHub pages for easy testing of UI5 Web Components in your test applications. + +```html + +``` + +## Support + +Please use the GitHub bug tracking system to post questions, bug reports or to create pull requests. + +## Contributing + +We welcome any type of contribution (code contributions, pull requests, issues) to this project equally. + +## License + +This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file. diff --git a/index.html b/index.html new file mode 100644 index 0000000..a3ddd34 --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + + Bundle all UI5 Web Components for Simple Reuse + + +
+ Hello World + Hello World +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b173315 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,344 @@ +{ + "name": "ui5-webcomponents-bundle", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "ui5-webcomponents-bundle", + "version": "0.0.0", + "dependencies": { + "@ui5/webcomponents": "^1.24.0", + "@ui5/webcomponents-fiori": "^1.24.0", + "@ui5/webcomponents-icons": "^1.24.0" + }, + "devDependencies": { + "vite": "^4.3.2" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.2.0", + "license": "BSD-3-Clause" + }, + "node_modules/@sap-theming/theming-base-content": { + "version": "11.12.0", + "license": "Apache-2.0" + }, + "node_modules/@types/jquery": { + "version": "3.5.29", + "license": "MIT", + "dependencies": { + "@types/sizzle": "*" + } + }, + "node_modules/@types/openui5": { + "version": "1.122.0", + "license": "MIT", + "dependencies": { + "@types/jquery": "~3.5.13", + "@types/qunit": "^2.5.4" + } + }, + "node_modules/@types/qunit": { + "version": "2.19.10", + "license": "MIT" + }, + "node_modules/@types/sizzle": { + "version": "2.3.8", + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "license": "MIT" + }, + "node_modules/@ui5/webcomponents": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@ui5/webcomponents-base": "1.24.0", + "@ui5/webcomponents-icons": "1.24.0", + "@ui5/webcomponents-icons-business-suite": "1.24.0", + "@ui5/webcomponents-icons-tnt": "1.24.0", + "@ui5/webcomponents-localization": "1.24.0", + "@ui5/webcomponents-theming": "1.24.0" + } + }, + "node_modules/@ui5/webcomponents-base": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.2", + "lit-html": "^2.0.1" + } + }, + "node_modules/@ui5/webcomponents-fiori": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@ui5/webcomponents": "1.24.0", + "@ui5/webcomponents-base": "1.24.0", + "@ui5/webcomponents-icons": "1.24.0", + "@ui5/webcomponents-theming": "1.24.0", + "@zxing/library": "^0.17.1" + } + }, + "node_modules/@ui5/webcomponents-icons": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@ui5/webcomponents-base": "1.24.0" + } + }, + "node_modules/@ui5/webcomponents-icons-business-suite": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@ui5/webcomponents-base": "1.24.0" + } + }, + "node_modules/@ui5/webcomponents-icons-tnt": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@ui5/webcomponents-base": "1.24.0" + } + }, + "node_modules/@ui5/webcomponents-localization": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@types/openui5": "^1.113.0", + "@ui5/webcomponents-base": "1.24.0" + } + }, + "node_modules/@ui5/webcomponents-theming": { + "version": "1.24.0", + "license": "Apache-2.0", + "dependencies": { + "@sap-theming/theming-base-content": "11.12.0", + "@ui5/webcomponents-base": "1.24.0" + } + }, + "node_modules/@zxing/library": { + "version": "0.17.1", + "license": "MIT", + "dependencies": { + "ts-custom-error": "^3.0.0" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "license": "(Unlicense OR Apache-2.0)", + "optional": true + }, + "node_modules/esbuild": { + "version": "0.18.20", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/lit-html": { + "version": "2.8.0", + "license": "BSD-3-Clause", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.4.38", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "3.29.4", + "dev": true, + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vite": { + "version": "4.5.3", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..78121e1 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "ui5-webcomponents-bundle", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "vite": "^4.3.2" + }, + "dependencies": { + "@ui5/webcomponents": "^1.24.0", + "@ui5/webcomponents-fiori": "^1.24.0", + "@ui5/webcomponents-icons": "^1.24.0" + } +} diff --git a/snippix.html b/snippix.html new file mode 100644 index 0000000..013df92 --- /dev/null +++ b/snippix.html @@ -0,0 +1,64 @@ + + + + + + UI5 Web Components + + + + + + + + + +
+ Button +
+ +
+ Label +
+ +
+ +
+ +
+ +
+ +
+ + + Mueller, Peter + + + Maier, Petra + + + Smith, Thomas + + + Williams, John + + + Jones, Maria + + +
+ + + diff --git a/src/fiori/bundle.common.js b/src/fiori/bundle.common.js new file mode 100644 index 0000000..be5331b --- /dev/null +++ b/src/fiori/bundle.common.js @@ -0,0 +1,32 @@ +// FIORI features +import "@ui5/webcomponents-fiori/dist/features/CoPilotAnimation.js"; + +// FIORI illustrations +import "@ui5/webcomponents-fiori/dist/illustrations/AllIllustrations.js"; + +// FIORI components +import Bar from "@ui5/webcomponents-fiori/dist/Bar.js"; +import DynamicSideContent from "@ui5/webcomponents-fiori/dist/DynamicSideContent.js"; +import FilterItem from "@ui5/webcomponents-fiori/dist/FilterItem.js"; +import FilterItemOption from "@ui5/webcomponents-fiori/dist/FilterItemOption.js"; +import FlexibleColumnLayout from "@ui5/webcomponents-fiori/dist/FlexibleColumnLayout.js"; +import IllustratedMessage from "@ui5/webcomponents-fiori/dist/IllustratedMessage.js"; +import MediaGallery from "@ui5/webcomponents-fiori/dist/MediaGallery.js"; +import MediaGalleryItem from "@ui5/webcomponents-fiori/dist/MediaGalleryItem.js"; +import ProductSwitch from "@ui5/webcomponents-fiori/dist/ProductSwitch.js"; +import ProductSwitchItem from "@ui5/webcomponents-fiori/dist/ProductSwitchItem.js"; +import SideNavigation from "@ui5/webcomponents-fiori/dist/SideNavigation.js"; +import SideNavigationItem from "@ui5/webcomponents-fiori/dist/SideNavigationItem.js"; +import SideNavigationSubItem from "@ui5/webcomponents-fiori/dist/SideNavigationSubItem.js"; +import Page from "@ui5/webcomponents-fiori/dist/Page.js"; +import ShellBar from "@ui5/webcomponents-fiori/dist/ShellBar.js"; +import ShellBarItem from "@ui5/webcomponents-fiori/dist/ShellBarItem.js"; +import SortItem from "@ui5/webcomponents-fiori/dist/SortItem.js"; +import Timeline from "@ui5/webcomponents-fiori/dist/Timeline.js"; +import UploadCollection from "@ui5/webcomponents-fiori/dist/UploadCollection.js"; +import UploadCollectionItem from "@ui5/webcomponents-fiori/dist/UploadCollectionItem.js"; +import NotificationListItem from "@ui5/webcomponents-fiori/dist/NotificationListItem.js" +import NotificationListGroupItem from "@ui5/webcomponents-fiori/dist/NotificationListGroupItem.js"; +import NotificationAction from "@ui5/webcomponents-fiori/dist/NotificationAction.js"; +import Wizard from "@ui5/webcomponents-fiori/dist/Wizard.js"; +import ViewSettingsDialog from "@ui5/webcomponents-fiori/dist/ViewSettingsDialog.js"; \ No newline at end of file diff --git a/src/fiori/bundle.esm.js b/src/fiori/bundle.esm.js new file mode 100644 index 0000000..35c8fff --- /dev/null +++ b/src/fiori/bundle.esm.js @@ -0,0 +1,11 @@ +import testAssets from "../main/bundle.esm.js"; +import * as defaultFioriTexts from "@ui5/webcomponents-fiori/dist/generated/i18n/i18n-defaults.js"; + +// FIORI assets +import "@ui5/webcomponents-fiori/dist/Assets.js"; + +import "./bundle.common.js"; +import BarcodeScannerDialog from "@ui5/webcomponents-fiori/dist/BarcodeScannerDialog.js"; + +testAssets.defaultTexts = {...testAssets.defaultTexts, ...defaultFioriTexts }; +export default testAssets; diff --git a/src/main/bundle.common.bootstrap.js b/src/main/bundle.common.bootstrap.js new file mode 100644 index 0000000..bf41844 --- /dev/null +++ b/src/main/bundle.common.bootstrap.js @@ -0,0 +1,10 @@ +import { setRuntimeAlias } from "@ui5/webcomponents-base/dist/Runtimes.js"; +import { setPackageCSSRoot, setUseLinks } from "@ui5/webcomponents-base/dist/CSP.js"; + +setRuntimeAlias("UI5 Web Components Playground"); + +setUseLinks(false); // !document.adoptedStyleSheets +setPackageCSSRoot("@ui5/webcomponents-base", "/resources/css/base/"); +setPackageCSSRoot("@ui5/webcomponents-theming", "/resources/css/theming/"); +setPackageCSSRoot("@ui5/webcomponents", "/resources/css/main/"); +setPackageCSSRoot("@ui5/webcomponents-fiori", "/css/"); diff --git a/src/main/bundle.common.js b/src/main/bundle.common.js new file mode 100644 index 0000000..5ce8c08 --- /dev/null +++ b/src/main/bundle.common.js @@ -0,0 +1,294 @@ +import "@ui5/webcomponents-base/dist/features/F6Navigation.js"; +import { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from "@ui5/webcomponents-base/dist/Theming.js"; +// import "./customI18n.js"; + +import "./bundle.common.bootstrap.js"; // code that needs to be executed before other modules + +// Calendars +import "@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js"; +import "@ui5/webcomponents-localization/dist/features/calendar/Islamic.js"; +import "@ui5/webcomponents-localization/dist/features/calendar/Japanese.js"; +import "@ui5/webcomponents-localization/dist/features/calendar/Persian.js"; + +// CLDR +import getLocaleData from "@ui5/webcomponents-localization/dist/locale/getLocaleData.js"; + +// import { registerCustomThemePropertiesLoader } from "@ui5/webcomponents-base/dist/AssetRegistry.js"; +// import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js"; +// const customThemeLoader = theme => Promise.resolve(`:root { +// ${getScopedVarName("--_ui5_button_base_height")}: 4rem; +// ${getScopedVarName("--_ui5_button_base_padding")}: 2rem; +// }`); +// registerCustomThemePropertiesLoader("@ui5/webcomponents", "my_custom_theme", customThemeLoader); + + +// Uncomment to test the registration of custom properties and JSON bundles - use the TextArea test page +// import { registerI18nLoader } from "@ui5/webcomponents-base/dist/asset-registries/i18n.js"; +// import parse from "@ui5/webcomponents-base/dist/PropertiesFileFormat.js"; + +// const bg = "https://sdk.openui5.org/resources/sap/ui/core/messagebundle_bg.properties"; +// registerI18nLoader("@ui5/webcomponents", "bg", async (localeId) => { +// const props = await (await fetch(bg)).text(); +// return parse(props); +// }); +// registerI18nLoader("@ui5/webcomponents", "fr", async (localeId) => { +// return await (await fetch("fr")).json(); +// }); + +import Avatar from "@ui5/webcomponents/dist/Avatar.js"; +import AvatarGroup from "@ui5/webcomponents/dist/AvatarGroup.js"; +import Badge from "@ui5/webcomponents/dist/Badge.js"; +import Breadcrumbs from "@ui5/webcomponents/dist/Breadcrumbs.js"; +import BusyIndicator from "@ui5/webcomponents/dist/BusyIndicator.js"; +import Button from "@ui5/webcomponents/dist/Button.js"; +import Card from "@ui5/webcomponents/dist/Card.js"; +import CardHeader from "@ui5/webcomponents/dist/CardHeader.js"; +import Carousel from "@ui5/webcomponents/dist/Carousel.js"; +import CheckBox from "@ui5/webcomponents/dist/CheckBox.js"; +import ColorPalette from "@ui5/webcomponents/dist/ColorPalette.js"; +import ColorPaletteItem from "@ui5/webcomponents/dist/ColorPaletteItem.js"; +import ColorPalettePopover from "@ui5/webcomponents/dist/ColorPalettePopover.js"; +import ColorPicker from "@ui5/webcomponents/dist/ColorPicker.js"; +import ComboBox from "@ui5/webcomponents/dist/ComboBox.js"; +import DatePicker from "@ui5/webcomponents/dist/DatePicker.js"; +import DateRangePicker from "@ui5/webcomponents/dist/DateRangePicker.js"; +import DateTimePicker from "@ui5/webcomponents/dist/DateTimePicker.js"; +import Dialog from "@ui5/webcomponents/dist/Dialog.js"; +import FileUploader from "@ui5/webcomponents/dist/FileUploader.js"; +import Icon from "@ui5/webcomponents/dist/Icon.js"; +import Input from "@ui5/webcomponents/dist/Input.js"; +import MultiInput from "@ui5/webcomponents/dist/MultiInput.js"; +import Label from "@ui5/webcomponents/dist/Label.js"; +import Link from "@ui5/webcomponents/dist/Link.js"; +import Menu from "@ui5/webcomponents/dist/Menu.js"; +import MenuItem from "@ui5/webcomponents/dist/MenuItem.js"; +import Popover from "@ui5/webcomponents/dist/Popover.js"; +import Panel from "@ui5/webcomponents/dist/Panel.js"; +import RadioButton from "@ui5/webcomponents/dist/RadioButton.js"; +import ResponsivePopover from "@ui5/webcomponents/dist/ResponsivePopover.js"; +import SegmentedButton from "@ui5/webcomponents/dist/SegmentedButton.js"; +import SegmentedButtonItem from "@ui5/webcomponents/dist/SegmentedButtonItem.js"; +import Select from "@ui5/webcomponents/dist/Select.js"; +import SelectMenu from "@ui5/webcomponents/dist/SelectMenu.js"; +import SelectMenuOption from "@ui5/webcomponents/dist/SelectMenuOption.js"; +import Slider from "@ui5/webcomponents/dist/Slider.js"; +import SplitButton from "@ui5/webcomponents/dist/SplitButton.js"; +import StepInput from "@ui5/webcomponents/dist/StepInput.js"; +import RangeSlider from "@ui5/webcomponents/dist/RangeSlider.js"; +import Switch from "@ui5/webcomponents/dist/Switch.js"; +import MessageStrip from "@ui5/webcomponents/dist/MessageStrip.js"; +import MultiComboBox from "@ui5/webcomponents/dist/MultiComboBox.js"; +import ProgressIndicator from "@ui5/webcomponents/dist/ProgressIndicator.js"; +import RatingIndicator from "@ui5/webcomponents/dist/RatingIndicator.js"; +import TabContainer from "@ui5/webcomponents/dist/TabContainer.js"; +import Tab from "@ui5/webcomponents/dist/Tab.js"; +import TabSeparator from "@ui5/webcomponents/dist/TabSeparator.js"; +import Table from "@ui5/webcomponents/dist/Table.js"; +import TableColumn from "@ui5/webcomponents/dist/TableColumn.js"; +import TableRow from "@ui5/webcomponents/dist/TableRow.js"; +import TableGroupRow from "@ui5/webcomponents/dist/TableGroupRow.js"; +import TableCell from "@ui5/webcomponents/dist/TableCell.js"; +import TextArea from "@ui5/webcomponents/dist/TextArea.js"; +import TimeSelection from "@ui5/webcomponents/dist/TimeSelection.js"; +import TimePicker from "@ui5/webcomponents/dist/TimePicker.js"; +import TimePickerClock from "@ui5/webcomponents/dist/TimePickerClock.js"; +import TimeSelectionClocks from "@ui5/webcomponents/dist/TimeSelectionClocks.js"; +import TimeSelectionInputs from "@ui5/webcomponents/dist/TimeSelectionInputs.js"; +import Title from "@ui5/webcomponents/dist/Title.js"; +import Toast from "@ui5/webcomponents/dist/Toast.js"; +import ToggleButton from "@ui5/webcomponents/dist/ToggleButton.js"; +import Toolbar from "@ui5/webcomponents/dist/Toolbar.js"; +import ToolbarButton from "@ui5/webcomponents/dist/ToolbarButton.js"; +import ToolbarSeparator from "@ui5/webcomponents/dist/ToolbarSeparator.js"; +import ToolbarSpacer from "@ui5/webcomponents/dist/ToolbarSpacer.js"; +import ToolbarSelect from "@ui5/webcomponents/dist/ToolbarSelect.js"; +import Tree from "@ui5/webcomponents/dist/Tree.js"; +import TreeList from "@ui5/webcomponents/dist/TreeList.js"; +import TreeItem from "@ui5/webcomponents/dist/TreeItem.js"; +import TreeItemCustom from "@ui5/webcomponents/dist/TreeItemCustom.js"; +import List from "@ui5/webcomponents/dist/List.js"; +import StandardListItem from "@ui5/webcomponents/dist/StandardListItem.js"; +import CustomListItem from "@ui5/webcomponents/dist/CustomListItem.js"; +import GroupHeaderListItem from "@ui5/webcomponents/dist/GroupHeaderListItem.js"; + +// Features +import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js"; +import "@ui5/webcomponents/dist/features/ColorPaletteMoreColors.js"; +import "@ui5/webcomponents/dist/features/InputSuggestions.js"; + +// used in test pages +import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js"; + +import { sanitizeHTML, URLListValidator } from "@ui5/webcomponents-base/dist/util/HTMLSanitizer.js"; +window.sanitizeHTML = sanitizeHTML; +window.URLListValidator = URLListValidator; + +import { getAnimationMode, setAnimationMode } from "@ui5/webcomponents-base/dist/config/AnimationMode.js"; +import { getTheme, setTheme, isLegacyThemeFamily } from "@ui5/webcomponents-base/dist/config/Theme.js"; +import { getThemeRoot, setThemeRoot } from "@ui5/webcomponents-base/dist/config/ThemeRoot.js"; +import { getTimezone, setTimezone } from "@ui5/webcomponents-base/dist/config/Timezone"; +import { getLanguage, setLanguage } from "@ui5/webcomponents-base/dist/config/Language.js"; +import getEffectiveIconCollection from "@ui5/webcomponents-base/dist/asset-registries/util/getIconCollectionByTheme.js"; +import { setNoConflict } from "@ui5/webcomponents-base/dist/config/NoConflict.js"; +// TODO: CHECK +//import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js"; +import { getFirstDayOfWeek } from "@ui5/webcomponents-base/dist/config/FormatSettings.js"; +import { _getRegisteredNames as getIconNames, getIconAccessibleName } from "@ui5/webcomponents-base/dist/asset-registries/Icons.js"; +import applyDirection from "@ui5/webcomponents-base/dist/locale/applyDirection.js"; +import { attachDirectionChange } from "@ui5/webcomponents-base/dist/locale/directionChange.js"; +import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js"; +import * as defaultTexts from "@ui5/webcomponents/dist/generated/i18n/i18n-defaults.js"; +import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js"; +import { ignoreCustomElements, shouldIgnoreCustomElement } from "@ui5/webcomponents-base/dist/IgnoreCustomElements.js"; +ignoreCustomElements("app-"); +ignoreCustomElements("my-"); + +// SAP Icons +import accept from "@ui5/webcomponents-icons/dist/accept.js"; +import acceptv4 from "@ui5/webcomponents-icons/dist/v4/accept.js"; +import acceptv5 from "@ui5/webcomponents-icons/dist/v5/accept.js"; +// SAP TNT Icons +import actor from "@ui5/webcomponents-icons-tnt/dist/actor.js"; +import actorv2 from "@ui5/webcomponents-icons-tnt/dist/v2/actor.js"; +import actorv3 from "@ui5/webcomponents-icons-tnt/dist/v3/actor.js"; +// SAP BS Icons +import icon_3d from "@ui5/webcomponents-icons-business-suite/dist/3d.js"; +import icon_3dv1 from "@ui5/webcomponents-icons-business-suite/dist/v1/3d.js"; +import icon_3dv2 from "@ui5/webcomponents-icons-business-suite/dist/v2/3d.js"; +import { setUseLinks, setPackageCSSRoot } from "@ui5/webcomponents-base/dist/CSP.js"; +// setUseLinks(true); // "true" to force all browsers to use links +// setPackageCSSRoot("@ui5/webcomponents-base", "./resources/css/base/"); +// setPackageCSSRoot("@ui5/webcomponents-theming", "./resources/css/theming/"); +// setPackageCSSRoot("@ui5/webcomponents", "./resources/css/main/"); +// setPackageCSSRoot("@ui5/webcomponents-fiori", "./resources/css/fiori/"); + +const icons = [accept, acceptv4, acceptv5, actor, actorv2, actorv3, icon_3d, icon_3dv1, icon_3dv2]; + +const testAssets = { + configuration : { + getAnimationMode, + setAnimationMode, + getTheme, + setTheme, + getThemeRoot, + setThemeRoot, + isLegacyThemeFamily, + getLanguage, + setLanguage, + setNoConflict, + getRTL, + getFirstDayOfWeek, + getTimezone, + setTimezone, + }, + invisibleMessage : { + announce, + }, + getLocaleData, + applyDirection, + attachDirectionChange, + ResizeHandler, + addCustomCSS, + attachThemeLoaded, + detachThemeLoaded, + getIconNames, + getIconAccessibleName, + renderFinished, + defaultTexts, + getExportedIconsValues: () => icons, + getEffectiveIconCollection, + ignoreCustomElements, + shouldIgnoreCustomElement, +}; + +// The SAP Icons V4 icon collection is set by default in sap_fiori_3, +// but it's configurable: +// import { setDefaultIconCollection } from "@ui5/webcomponents-base/dist/config/Icons.js"; +// setDefaultIconCollection("sap_fiori_3", "SAP-icons-v5"); +// or for custom theme +// setDefaultIconCollection("my_custom_theme", "SAP-icons-v5"); +// or for custom icon collection +// setDefaultIconCollection("sap_fiori_3", "my-custom-icons"); + +import {registerIconLoader } from "@ui5/webcomponents-base/dist/asset-registries/Icons.js"; + +registerIconLoader("my-icons", () => { + return Promise.resolve([{ + "collection": "my-icons-v4", + "packageName": "test", + "data": { + "mark": { + paths: [ + `M257.6,6.4c138.3,0.2,250.5,113.1,250,251.6c-0.5,137.7-113.3,249.9-251.1,249.6C118.3,507.2,6,394.1,6.5,255.8 + C7,117.9,119.5,6.2,257.6,6.4z M256.6,358.8c0.3,4.2,0.6,7.6,0.7,10.9c0.2,27.6,0.3,55.3,0.4,82.9c0,15.1-4.2,18.9-19.1,17.6 + C127,461,41.4,366.1,42.9,253.3C44.3,141.9,133.4,49.1,244.6,43c102.4-5.6,194.8,61.7,219.9,160.4 + C490,303.1,441.8,406,348.6,450.5c-3.7,1.8-7.8,2.9-11,5.4c-1.9,1.5-3.8,5.5-3.1,7.4c0.7,1.8,5,3.7,7.2,3.2 + c4.6-0.9,9-3.2,13.3-5.2C454,414,504.5,302,474.9,195.8C445.3,90,344.1,21.3,234.1,32.3C103.7,45.4,11.8,166.1,34.1,295.2 + C51.8,397.9,133.3,472.6,238.6,483c4.9,0.5,10,3.2,14.2,6c7.2,4.9,14.2,5.7,20.5-0.2c6.4-6,5.9-12.9,1.2-20.3 + c-2.5-4-4.7-9.1-4.8-13.7c-0.7-29.3-0.6-58.7-1.3-88c-0.2-8.2,2.4-12.5,10-16.3c25.9-13,39.5-40.1,35.9-68.8 + c-3.6-28-23.8-50.9-51.4-57.2c-6.9-1.6-14.2-1.8-21.3-2.5c-29.7-3.1-50.5-27.4-49.2-57.7c1.1-27.7,24.6-50.7,52.7-51.4 + c29.4-0.8,53.7,20.6,56.4,49.7c0.3,3.6,0.7,7.3,1.1,12c13.2,0,25.4-0.2,37.7,0c41.2,0.7,77.3,31.4,83.3,71 + c6.5,42.3-17,81.8-56.6,95.6c-6.2,2.2-11.4,3.7-17.4-2.5c-6.8-7-18.6-4.6-24.4,3.1c-5.7,7.5-4.6,17.8,2.5,24 + c7.1,6.1,17.1,5.2,24.3-0.9c4.9-4.1,10.5-8.1,16.5-10c40.8-13.1,69.4-51.2,69.7-93.9c0.3-42.2-27.1-81.6-67.6-94 + c-13.7-4.2-28.8-4.7-43.4-5.2c-9-0.3-12.6-2.4-14.9-11.7c-9.4-37.2-47.8-58.3-84.7-47.5c-36,10.6-56.6,49.1-45.4,85.3 + c8.9,29,32.5,45.8,67.7,48c23.5,1.5,42.5,16.3,49.3,38.3c6.8,21.9-0.6,45.7-18.8,59.6c-3,2.3-6.6,4-11.3,6.8 + c-0.3-5.7-0.6-9.4-0.8-13c-1.7-27.1-21.1-50.3-47.4-56.2c-7-1.5-14.3-1.4-21.3-2.6c-21.4-3.4-38.3-13.7-49.2-32.9 + c-3.2-5.7-3.7-10.4,1.4-16.5c3.4-4,4.5-12.6,2.5-17.5c-1.7-4.3-9.3-9-14-8.8c-5.3,0.2-10.6,5.4-15.3,9.2c-3.7,3-6,8.1-10,10.5 + c-27.5,16.8-43.1,48.1-38.5,78c6.4,40.8,37.8,68,79.4,68.2C189.1,359,222.2,358.8,256.6,358.8z`, + ], + }, + }, + }, + { + "collection": "my-icons-v5", + "packageName": "test", + "themeFamily": "sap_horizon", + "data": { + "mark": { + paths: [ + `M514,514c-170.7,0-341.3,0-512,0C2,343.4,2,172.7,2,2c170.7,0,341.3,0,512,0C514,172.7,514,343.4,514,514z M257.6,6.4C119.5,6.2,7,117.9,6.5,255.8C6,394.1,118.3,507.2,256.5,507.5c137.8,0.3,250.6-111.9,251.1-249.6C508.1,119.4,395.9,6.6,257.6,6.4z`, + `M257.6,6.4c138.3,0.2,250.5,113.1,250,251.6c-0.5,137.7-113.3,249.9-251.1,249.6C118.3,507.2,6,394.1,6.5,255.8 + C7,117.9,119.5,6.2,257.6,6.4z M256.6,358.8c0.3,4.2,0.6,7.6,0.7,10.9c0.2,27.6,0.3,55.3,0.4,82.9c0,15.1-4.2,18.9-19.1,17.6 + C127,461,41.4,366.1,42.9,253.3C44.3,141.9,133.4,49.1,244.6,43c102.4-5.6,194.8,61.7,219.9,160.4 + C490,303.1,441.8,406,348.6,450.5c-3.7,1.8-7.8,2.9-11,5.4c-1.9,1.5-3.8,5.5-3.1,7.4c0.7,1.8,5,3.7,7.2,3.2 + c4.6-0.9,9-3.2,13.3-5.2C454,414,504.5,302,474.9,195.8C445.3,90,344.1,21.3,234.1,32.3C103.7,45.4,11.8,166.1,34.1,295.2 + C51.8,397.9,133.3,472.6,238.6,483c4.9,0.5,10,3.2,14.2,6c7.2,4.9,14.2,5.7,20.5-0.2c6.4-6,5.9-12.9,1.2-20.3 + c-2.5-4-4.7-9.1-4.8-13.7c-0.7-29.3-0.6-58.7-1.3-88c-0.2-8.2,2.4-12.5,10-16.3c25.9-13,39.5-40.1,35.9-68.8 + c-3.6-28-23.8-50.9-51.4-57.2c-6.9-1.6-14.2-1.8-21.3-2.5c-29.7-3.1-50.5-27.4-49.2-57.7c1.1-27.7,24.6-50.7,52.7-51.4 + c29.4-0.8,53.7,20.6,56.4,49.7c0.3,3.6,0.7,7.3,1.1,12c13.2,0,25.4-0.2,37.7,0c41.2,0.7,77.3,31.4,83.3,71 + c6.5,42.3-17,81.8-56.6,95.6c-6.2,2.2-11.4,3.7-17.4-2.5c-6.8-7-18.6-4.6-24.4,3.1c-5.7,7.5-4.6,17.8,2.5,24 + c7.1,6.1,17.1,5.2,24.3-0.9c4.9-4.1,10.5-8.1,16.5-10c40.8-13.1,69.4-51.2,69.7-93.9c0.3-42.2-27.1-81.6-67.6-94 + c-13.7-4.2-28.8-4.7-43.4-5.2c-9-0.3-12.6-2.4-14.9-11.7c-9.4-37.2-47.8-58.3-84.7-47.5c-36,10.6-56.6,49.1-45.4,85.3 + c8.9,29,32.5,45.8,67.7,48c23.5,1.5,42.5,16.3,49.3,38.3c6.8,21.9-0.6,45.7-18.8,59.6c-3,2.3-6.6,4-11.3,6.8 + c-0.3-5.7-0.6-9.4-0.8-13c-1.7-27.1-21.1-50.3-47.4-56.2c-7-1.5-14.3-1.4-21.3-2.6c-21.4-3.4-38.3-13.7-49.2-32.9 + c-3.2-5.7-3.7-10.4,1.4-16.5c3.4-4,4.5-12.6,2.5-17.5c-1.7-4.3-9.3-9-14-8.8c-5.3,0.2-10.6,5.4-15.3,9.2c-3.7,3-6,8.1-10,10.5 + c-27.5,16.8-43.1,48.1-38.5,78c6.4,40.8,37.8,68,79.4,68.2C189.1,359,222.2,358.8,256.6,358.8z`, + `M256.6,358.8c-34.4,0-67.5,0.1-100.6,0c-41.5-0.2-73-27.4-79.4-68.2c-4.7-29.9,11-61.3,38.5-78 + c4-2.4,6.2-7.5,10-10.5c4.7-3.8,10.1-9,15.3-9.2c4.8-0.2,12.3,4.5,14,8.8c2,4.9,0.8,13.5-2.5,17.5c-5.1,6.1-4.7,10.7-1.4,16.5 + c10.8,19.2,27.8,29.5,49.2,32.9c7.1,1.1,14.4,1,21.3,2.6c26.3,5.9,45.7,29.1,47.4,56.2c0.2,3.7,0.4,7.3,0.8,13 + c4.7-2.8,8.2-4.4,11.3-6.8c18.2-13.9,25.6-37.7,18.8-59.6c-6.8-22-25.8-36.8-49.3-38.3c-35.2-2.3-58.8-19.1-67.7-48 + c-11.1-36.2,9.4-74.7,45.4-85.3c36.9-10.8,75.3,10.3,84.7,47.5c2.3,9.2,6,11.4,14.9,11.7c14.5,0.5,29.6,1,43.4,5.2 + c40.5,12.5,67.9,51.8,67.6,94c-0.3,42.7-28.9,80.8-69.7,93.9c-6,1.9-11.7,5.9-16.5,10c-7.2,6.1-17.2,7-24.3,0.9 + c-7.1-6.2-8.2-16.5-2.5-24c5.8-7.6,17.6-10.1,24.4-3.1c6,6.2,11.2,4.6,17.4,2.5c39.6-13.8,63.1-53.3,56.6-95.6 + c-6-39.6-42.1-70.4-83.3-71c-12.2-0.2-24.5,0-37.7,0c-0.4-4.7-0.8-8.4-1.1-12c-2.7-29.1-27-50.5-56.4-49.7 + c-28,0.8-51.5,23.7-52.7,51.4c-1.2,30.3,19.5,54.6,49.2,57.7c7.1,0.7,14.4,0.9,21.3,2.5c27.5,6.4,47.8,29.2,51.4,57.2 + c3.7,28.8-9.9,55.9-35.9,68.8c-7.6,3.8-10.2,8.1-10,16.3c0.7,29.3,0.6,58.7,1.3,88c0.1,4.6,2.3,9.7,4.8,13.7 + c4.7,7.4,5.2,14.3-1.2,20.3c-6.4,5.9-13.3,5.1-20.5,0.2c-4.2-2.8-9.3-5.5-14.2-6C133.3,472.6,51.8,397.9,34.1,295.2 + c-22.3-129.1,69.6-249.8,200-262.9c110.1-11,211.2,57.7,240.8,163.5C504.5,302,454,414,355.1,461.3c-4.3,2.1-8.7,4.3-13.3,5.2 + c-2.2,0.5-6.5-1.4-7.2-3.2c-0.7-1.9,1.1-5.9,3.1-7.4c3.1-2.5,7.3-3.6,11-5.4C441.8,406,490,303.1,464.6,203.4 + C439.4,104.7,347,37.4,244.6,43C133.4,49.1,44.3,141.9,42.9,253.3C41.4,366.1,127,461,238.5,470.3c14.9,1.2,19.1-2.6,19.1-17.6 + c-0.1-27.6-0.2-55.3-0.4-82.9C257.3,366.4,256.9,363,256.6,358.8z M198.8,345.6c0-0.1,0-0.2,0-0.3c16.4,0,32.7-0.1,49.1,0 + c6.8,0,9.7-2.7,9.4-9.9c-0.5-12.9-2.9-25-11.2-35.4c-11.1-13.8-25.9-18.9-43.1-19.7c-30.9-1.4-56.7-21.1-66.7-50.3 + c-3.2-9.1-6.6-10.4-15.2-5.4c-24.2,13.9-36.8,43.9-29.9,71.4c7,28.3,32.2,48.7,61.7,49.5C168.1,346,183.5,345.6,198.8,345.6z`, + `M198.8,345.6c-15.3,0-30.7,0.3-46-0.1c-29.4-0.8-54.7-21.3-61.7-49.5c-6.8-27.5,5.8-57.5,29.9-71.4 + c8.6-4.9,12.1-3.7,15.2,5.4c10.1,29.1,35.8,48.8,66.7,50.3c17.2,0.8,32.1,5.9,43.1,19.7c8.3,10.4,10.8,22.5,11.2,35.4 + c0.3,7.1-2.6,9.9-9.4,9.9c-16.4-0.1-32.7,0-49.1,0C198.8,345.4,198.8,345.5,198.8,345.6z`, + ], + }, + }, + }]); +}); + +window["sap-ui-webcomponents-bundle"] = testAssets; + +export default testAssets; \ No newline at end of file diff --git a/src/main/bundle.esm.js b/src/main/bundle.esm.js new file mode 100644 index 0000000..b67c52d --- /dev/null +++ b/src/main/bundle.esm.js @@ -0,0 +1,21 @@ +// OpenUI5 integration +import "@ui5/webcomponents-base/dist/features/OpenUI5Support.js"; + +// Assets +import "@ui5/webcomponents/dist/Assets.js"; + +// Icons +import "@ui5/webcomponents-icons/dist/Assets.js"; +import "@ui5/webcomponents-icons/dist/AllIcons.js"; + +// TNT Icons +import "@ui5/webcomponents-icons-tnt/dist/Assets.js"; +import "@ui5/webcomponents-icons-tnt/dist/AllIcons.js"; + +// SAP Business Suite Icons +import "@ui5/webcomponents-icons-business-suite/dist/Assets.js"; +import "@ui5/webcomponents-icons-business-suite/dist/AllIcons.js"; + +import testAssets from "./bundle.common.js"; + +export default testAssets; \ No newline at end of file diff --git a/src/main/bundle.scoped.esm.js b/src/main/bundle.scoped.esm.js new file mode 100644 index 0000000..a66da82 --- /dev/null +++ b/src/main/bundle.scoped.esm.js @@ -0,0 +1,7 @@ +import { setCustomElementsScopingSuffix, setCustomElementsScopingRules } from "@ui5/webcomponents-base/dist/CustomElementsScope.js"; +setCustomElementsScopingSuffix("demo"); +// setCustomElementsScopingRules({include: [/^ui5-/], exclude: [/^ui5-button/, /ui5-icon/]}); + +import testAssets from "./bundle.esm.js"; + +export default testAssets; diff --git a/src/playground/bundle.esm.js b/src/playground/bundle.esm.js new file mode 100644 index 0000000..624d751 --- /dev/null +++ b/src/playground/bundle.esm.js @@ -0,0 +1,3 @@ +import "../fiori/bundle.esm.js"; +//ssh kmcadm@10.47.224.223 +//sudo grep --include=\*.html -Ri '/bundle.esm.js' \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..62c6a21 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,31 @@ +// vite.config.js +import { defineConfig } from "vite"; + +export default defineConfig(async () => { + return { + build: { + outDir: "dist/assets", + lib: { + entry: "src/playground/bundle.esm.js", + formats: ["es"], + fileName: () => "bundle.esm.js", + }, + }, + }; +}); + +/* +import { defineConfig } from 'vite' + +export default defineConfig({ + build: { + rollupOptions: { + output: { + assetFileNames: 'assets/[ext]/[name][extname]', + chunkFileNames: 'assets/chunks/[name].[hash].js', + entryFileNames: 'assets/bundle.esm.js' + } + } + } +}) +*/