You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by hi...@apache.org on 2025/03/31 13:13:21 UTC
(royale-asjs) 07/20: Basic/BasicJS: Including 'dialog-polyfill.min.js' and 'dialog-polyfill.min.css' in .swc library output via -js-include-script and -js-include-css build parameters. Comment block in DialogPolyfill.as
This is an automated email from the ASF dual-hosted git repository.
hiedra pushed a commit to branch examples/TDJ_localresources
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit d0cbce9461e0071ec37896c78dcd6c5ecc5070ee
Author: mjesteve <mj...@iest.com>
AuthorDate: Thu Mar 13 03:38:14 2025 +0100
Basic/BasicJS: Including 'dialog-polyfill.min.js' and 'dialog-polyfill.min.css' in .swc library output via -js-include-script and -js-include-css build parameters.
Comment <inject_script> block in DialogPolyfill.as
Basic/asconfig.json: The path to "airglobal.swc" in the "external-library-path" option has been modified. Previously, it was expected to be in royale-asjs, but now it's only found in royale-typedefs.
---
.../BasicJS/src/main/config/compile-js-config.xml | 8 +++++++
frameworks/projects/Basic/.vscode/tasks.json | 2 +-
frameworks/projects/Basic/asconfig.json | 8 +++++--
frameworks/projects/Basic/pom.xml | 15 +++++++++++-
frameworks/projects/Basic/rat-excludes.txt | 3 +++
.../assembly/css/dialog-polyfill/0.4.9/LICENSE | 27 ++++++++++++++++++++++
.../dialog-polyfill/0.4.9/dialog-polyfill.min.css | 2 ++
.../assembly/scripts/dialog-polyfill/0.4.9/LICENSE | 27 ++++++++++++++++++++++
.../dialog-polyfill/0.4.9/dialog-polyfill.min.js | 1 +
.../org/apache/royale/html/util/DialogPolyfill.as | 4 ++--
10 files changed, 91 insertions(+), 6 deletions(-)
diff --git a/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml
index 3ede8a2c4b..631a55d27c 100644
--- a/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/BasicJS/src/main/config/compile-js-config.xml
@@ -103,6 +103,14 @@
<js-complex-implicit-coercions>false</js-complex-implicit-coercions>
<js-resolve-uncertain>false</js-resolve-uncertain>
<js-vector-index-checks>false</js-vector-index-checks>
+
+ <js-include-script>
+ <path-element>../../../../../../projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js</path-element>
+ </js-include-script>
+
+ <js-include-css>
+ <path-element>../../../../../../projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css</path-element>
+ </js-include-css>
</royale-config>
diff --git a/frameworks/projects/Basic/.vscode/tasks.json b/frameworks/projects/Basic/.vscode/tasks.json
index 28b94238fe..88c28d0f18 100644
--- a/frameworks/projects/Basic/.vscode/tasks.json
+++ b/frameworks/projects/Basic/.vscode/tasks.json
@@ -44,7 +44,7 @@
"command": "asconfigc",
"windows": {
"args": [
- "--sdk=C:\\Apache\\royale-asjs"
+ "--sdk=${env:ROYALE_HOME}"
]
},
"osx": {
diff --git a/frameworks/projects/Basic/asconfig.json b/frameworks/projects/Basic/asconfig.json
index 2543aaeb70..69a69a5844 100644
--- a/frameworks/projects/Basic/asconfig.json
+++ b/frameworks/projects/Basic/asconfig.json
@@ -29,8 +29,12 @@
"src/main/royale"
],
"external-library-path": [
- "../../../frameworks/libs/air/airglobal.swc"
+ "../../../../royale-typedefs/airglobal/target/airglobal.swc"
],
"output": "target/Basic.swc"
- }
+ },
+ "additionalOptions": [
+ "-js-include-script+=src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js",
+ "-js-include-css+=src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css"
+ ]
}
\ No newline at end of file
diff --git a/frameworks/projects/Basic/pom.xml b/frameworks/projects/Basic/pom.xml
index 036e701115..8eeb38313d 100644
--- a/frameworks/projects/Basic/pom.xml
+++ b/frameworks/projects/Basic/pom.xml
@@ -67,7 +67,20 @@
<allowSubclassOverrides>true</allowSubclassOverrides>
<skipExtern>true</skipExtern>
<skipAS>${royale.skipAS}</skipAS>
- <additionalCompilerOptions>${project.compiler.options};-compiler.fxg-base-class=flash.display.Sprite</additionalCompilerOptions>
+ <additionalCompilerOptions>
+ ${project.compiler.options};
+ -compiler.fxg-base-class=flash.display.Sprite;
+ -js-include-script+=${basedir}/src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js
+ -js-include-css+=${basedir}/src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css;
+ </additionalCompilerOptions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.16.1</version>
+ <configuration>
+ <excludesFile>${project.basedir}/rat-excludes.txt</excludesFile>
</configuration>
</plugin>
</plugins>
diff --git a/frameworks/projects/Basic/rat-excludes.txt b/frameworks/projects/Basic/rat-excludes.txt
new file mode 100644
index 0000000000..ce2fa1af72
--- /dev/null
+++ b/frameworks/projects/Basic/rat-excludes.txt
@@ -0,0 +1,3 @@
+src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css
+src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js
+rat-excludes.txt
\ No newline at end of file
diff --git a/frameworks/projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/LICENSE b/frameworks/projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/LICENSE
new file mode 100644
index 0000000000..3d0f7d3edf
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/LICENSE
@@ -0,0 +1,27 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/frameworks/projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css b/frameworks/projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css
new file mode 100644
index 0000000000..04e245980a
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/assembly/css/dialog-polyfill/0.4.9/dialog-polyfill.min.css
@@ -0,0 +1,2 @@
+dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:#fff;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translate [...]
+/*# sourceMappingURL=dialog-polyfill.min.css.map */
\ No newline at end of file
diff --git a/frameworks/projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/LICENSE b/frameworks/projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/LICENSE
new file mode 100644
index 0000000000..3d0f7d3edf
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/LICENSE
@@ -0,0 +1,27 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/frameworks/projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js b/frameworks/projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js
new file mode 100644
index 0000000000..29f5253a71
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/assembly/scripts/dialog-polyfill/0.4.9/dialog-polyfill.min.js
@@ -0,0 +1 @@
+!function(){function e(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),o=function(e,o){return!(void 0===t[e]||t[e]===o)};if(t.opacity<1||o("zIndex","auto")||o("transform","none")||o("mixBlendMode","normal")||o("filter","none")||o("perspective","none")||"isolate"===t.isolation||"fixed"===t.position||"touch"===t.webkitOverflowScrolling)return!0;e=e.parentElement}return!1}function t(e){for(;e;){if("dialog"===e.localName)return e;e=e.parentElement}return null}function o(e){e& [...]
\ No newline at end of file
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/DialogPolyfill.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/DialogPolyfill.as
index 828cae9e78..93c28c6300 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/DialogPolyfill.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/DialogPolyfill.as
@@ -21,7 +21,7 @@ package org.apache.royale.html.util
COMPILE::JS
public class DialogPolyfill
{
- /**
+ /*
* <inject_script>
* var script = document.createElement("script");
* script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.js");
@@ -38,6 +38,6 @@ package org.apache.royale.html.util
public static function registerDialog(dialog:Element):void
{
window["dialogPolyfill"]["registerDialog"](dialog);
- }
+ }
}
}
\ No newline at end of file