Import `emoji-picker-element-data`
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 23 Sep 2024 09:51:50 +0000 (11:51 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 14 Oct 2024 07:19:23 +0000 (09:19 +0200)
package-lock.json
package.json
ts/WoltLabSuite/Core/Component/EmojiPicker/Setup.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/EmojiPicker/Setup.js

index d154609fba5e3608c1871fc6a1ec8dc0ec5f184d..bf239f93d7d8fa376ee81d92711d5b540218de48 100644 (file)
@@ -17,7 +17,8 @@
         "@woltlab/editor": "git+https://github.com/WoltLab/editor.git#efa5ffdc4a094c55ef015b29c9d5024649a8ea32",
         "@woltlab/visual-dom-diff": "git+https://github.com/WoltLab/visual-dom-diff.git#e5b51fce3157d1eda310566fc1f86101341d1fea",
         "@woltlab/zxcvbn": "git+https://github.com/WoltLab/zxcvbn.git#5b582b24e437f1883ccad3c37dae7c3c5f1e7da3",
-        "emoji-picker-element": "^1.22.7",
+        "emoji-picker-element": "^1.22.8",
+        "emoji-picker-element-data": "^1.6.1",
         "focus-trap": "^7.6.0",
         "html-parsed-element": "^0.4.1",
         "perfect-scrollbar": "^1.5.5",
       }
     },
     "node_modules/emoji-picker-element": {
-      "version": "1.22.7",
-      "resolved": "https://registry.npmjs.org/emoji-picker-element/-/emoji-picker-element-1.22.7.tgz",
-      "integrity": "sha512-lX0a8f8yeDw2YuMDRqC1YXjMFRhTxezSGcSYnvgkEvtbtUnzYuNadxFrl4VBOeiwZMtwSe81nMk1Of6muNhCtQ=="
+      "version": "1.22.8",
+      "resolved": "https://registry.npmjs.org/emoji-picker-element/-/emoji-picker-element-1.22.8.tgz",
+      "integrity": "sha512-EFgRjrlIcdA1ilyMH/f9KjB0Pi/vynrojNgMDZfU1Jv2YLrhdLJWx6xCehizPyxm4/NUuB8DfFvIT4v+1njjPQ=="
+    },
+    "node_modules/emoji-picker-element-data": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/emoji-picker-element-data/-/emoji-picker-element-data-1.6.1.tgz",
+      "integrity": "sha512-VYXjjqWYy12/uUA3q5X6Di0zROXp8TGwPiikXkhs97n3d3q3OaRV2sxGtUUColoSMPp5lfASZB9E4W+yN40qUg=="
     },
     "node_modules/esbuild": {
       "version": "0.24.0",
index 138f6af59b6982d8ad96d4162ad1ea37935b0e09..6b4124327991767d3c7aebf3ed8ec482eed92bb0 100644 (file)
@@ -24,7 +24,8 @@
     "@woltlab/editor": "git+https://github.com/WoltLab/editor.git#efa5ffdc4a094c55ef015b29c9d5024649a8ea32",
     "@woltlab/visual-dom-diff": "git+https://github.com/WoltLab/visual-dom-diff.git#e5b51fce3157d1eda310566fc1f86101341d1fea",
     "@woltlab/zxcvbn": "git+https://github.com/WoltLab/zxcvbn.git#5b582b24e437f1883ccad3c37dae7c3c5f1e7da3",
-    "emoji-picker-element": "^1.22.7",
+    "emoji-picker-element": "^1.22.8",
+    "emoji-picker-element-data": "^1.6.1",
     "focus-trap": "^7.6.0",
     "html-parsed-element": "^0.4.1",
     "perfect-scrollbar": "^1.5.5",
index fb7770460bd75376912fca75c366665900f800df..6a45e387cbb17fa244243a300c98b23c7f517798 100644 (file)
@@ -3,6 +3,8 @@ import { Picker } from "emoji-picker-element";
 
 wheneverFirstSeen("emoji-picker", (emojiPicker: Picker) => {
   emojiPicker.locale = window.LANGUAGE_CODE;
+  // TODO host local emoji data
+  emojiPicker.dataSource = `https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/${window.LANGUAGE_CODE}/cldr-native/data.json`;
 
   if (window.EmojiPickerLocales[window.LANGUAGE_CODE] !== undefined) {
     emojiPicker.i18n = window.EmojiPickerLocales[window.LANGUAGE_CODE];
index 9da9c17d2018fdc763d4fd64ea09de0e318e80c1..4f8f2ba0bc1d47b5b7e0825c2a0cda6cadb78b67 100644 (file)
@@ -3,6 +3,8 @@ define(["require", "exports", "WoltLabSuite/Core/Helper/Selector"], function (re
     Object.defineProperty(exports, "__esModule", { value: true });
     (0, Selector_1.wheneverFirstSeen)("emoji-picker", (emojiPicker) => {
         emojiPicker.locale = window.LANGUAGE_CODE;
+        // TODO host local emoji data
+        emojiPicker.dataSource = `https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/${window.LANGUAGE_CODE}/cldr-native/data.json`;
         if (window.EmojiPickerLocales[window.LANGUAGE_CODE] !== undefined) {
             emojiPicker.i18n = window.EmojiPickerLocales[window.LANGUAGE_CODE];
         }