Copy upstream release-45
Bug: 320769332
Test: n/a
Change-Id: I2bd7e29c821118aab8dcf291b88b7b8e8c4c2c4d
diff --git a/docs/charts/keyboard/.gitignore b/docs/charts/keyboard/.gitignore
index fd7d0e5..ffb5012 100644
--- a/docs/charts/keyboard/.gitignore
+++ b/docs/charts/keyboard/.gitignore
@@ -1,2 +1,5 @@
/node_modules
/static/data
+/node_modules
+/node
+/target
diff --git a/docs/charts/keyboard/README.md b/docs/charts/keyboard/README.md
new file mode 100644
index 0000000..bd33fd9
--- /dev/null
+++ b/docs/charts/keyboard/README.md
@@ -0,0 +1,30 @@
+# Keyboard Charts
+
+## What are these
+
+The Keyboard Charts are now built as client-side JavaScript tables.
+
+## To Build from the command line
+
+- install <https://nodejs.org> current LTS version, then in this directory:
+- `npm i`
+- `npm run build`
+
+## To build from Maven
+
+Run this from the command line in the top level directory:
+
+- `mvn --file=tools/pom.xml -pl :cldr-keyboard-charts integration-test`
+
+## To build from Eclipse
+
+- Right-click on the `pom.xml` in `docs/charts/keyboards` (it will show as "cldr-keyboard-charts")
+- Choose **Run As... - Maven Build**
+- Change the **goal** to `integration-test`
+- Choose Run
+
+## Trying them out
+
+- `npm run serve` will serve the charts locally on <http://localhost:3000>
+- Or view the [`index.html`](./index.html) file located in the same directory as this README
+
diff --git a/docs/charts/keyboard/package-lock.json b/docs/charts/keyboard/package-lock.json
index b889a24..2cafa94 100644
--- a/docs/charts/keyboard/package-lock.json
+++ b/docs/charts/keyboard/package-lock.json
@@ -7,7 +7,8 @@
"": {
"name": "@unicode-org/keyboard-charts",
"version": "1.0.0",
- "license": "Unicode-DFS-2016",
+ "hasInstallScript": true,
+ "license": "Unicode-3.0",
"dependencies": {
"fast-xml-parser": "^4.2.5"
}
diff --git a/docs/charts/keyboard/package.json b/docs/charts/keyboard/package.json
index 5dccb3b..69c1ecc 100644
--- a/docs/charts/keyboard/package.json
+++ b/docs/charts/keyboard/package.json
@@ -6,11 +6,13 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"serve": "npx serve static",
- "build": "node build.mjs"
+ "build": "node build.mjs",
+ "lint": "echo no linter yet",
+ "postinstall": "node build.mjs"
},
"keywords": [],
"author": "Steven R. Loomis <[email protected]>",
- "license": "Unicode-DFS-2016",
+ "license": "Unicode-3.0",
"bugs": {
"url": "https://github.com/unicode-org/cldr/issues"
},
diff --git a/docs/charts/keyboard/pom.xml b/docs/charts/keyboard/pom.xml
new file mode 100644
index 0000000..dd80349
--- /dev/null
+++ b/docs/charts/keyboard/pom.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cldr-keyboard-charts</artifactId>
+ <packaging>pom</packaging>
+ <name>CLDR Keyboard Charts</name>
+
+ <url>https://unicode.org/cldr</url>
+
+ <scm>
+ <connection>scm:git:https://github.com/unicode-org/cldr.git</connection>
+ </scm>
+
+
+ <parent>
+ <groupId>org.unicode.cldr</groupId>
+ <artifactId>cldr-all</artifactId>
+ <version>45.0</version>
+ <relativePath>../../../tools/pom.xml</relativePath>
+ </parent>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- to get the node version-->
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <configuration>
+ <target>
+ <concat append="no" destfile="${project.basedir}/target/node-version.properties">node.version=</concat>
+ <concat append="yes" destfile="${project.basedir}/target/node-version.properties">
+ <fileset dir="${project.basedir}/../../..">
+ <include name=".node-version" />
+ </fileset>
+ </concat>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <configuration>
+ <files>
+ <file>${project.basedir}/target/node-version.properties</file>
+ </files>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install node and npm</id>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <phase>integration-test</phase>
+ </execution>
+ <execution>
+ <id>npm install</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <phase>integration-test</phase>
+ </execution>
+ <execution>
+ <id>npm run build</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <configuration>
+ <arguments>run build</arguments>
+ </configuration>
+ <phase>integration-test</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <nodeVersion>${node.version}</nodeVersion>
+ <!-- run in project sourcedir -->
+ <workingDirectory>${project.basedir}</workingDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>build-keyboard-charts</id>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/docs/charts/keyboard/static/keyboard-chart.js b/docs/charts/keyboard/static/keyboard-chart.js
index 1f8be16..353ed9d 100644
--- a/docs/charts/keyboard/static/keyboard-chart.js
+++ b/docs/charts/keyboard/static/keyboard-chart.js
@@ -94,7 +94,7 @@
{
// add implied import
"@_base": "cldr",
- "@_path": "techpreview/keys-Latn-implied.xml",
+ "@_path": "45/keys-Latn-implied.xml",
},
...(_KeyboardData.keyboards[id].keyboard3.keys.import || []),
];