Update d.ts dependency
authorCyperghost <olaf_schmitz_1@t-online.de>
Fri, 8 Mar 2024 11:19:07 +0000 (12:19 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Fri, 8 Mar 2024 11:19:07 +0000 (12:19 +0100)
Add an event to update the counter

files/js/WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation.js
package-lock.json
package.json
ts/WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation.ts

index 08a604b16862f1428ce5242bd06fc0c1c2b6bbcb..45ce9d2bf78e46d6ddefc45d706aeb9c37bc7d91 100644 (file)
@@ -27,6 +27,10 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ajax", "WoltLabSuite/C
                     this.counter = counter;
                 }
             }
+            this.button.addEventListener("updateCounter", (event) => {
+                this.updateCounter(event.detail.counter);
+                this.stale = true;
+            });
         }
         getPanelButton() {
             return this.button;
index a83f35fd1a16da47afe4b4a869b577863478d4a1..33791dc82697e0152d3127dd1931dee83c1fa216 100644 (file)
@@ -5,7 +5,7 @@
   "packages": {
     "": {
       "dependencies": {
-        "@woltlab/d.ts": "https://github.com/WoltLab/d.ts.git#c08648e9f82c381bd18b91ac1072c430e58e71f1"
+        "@woltlab/d.ts": "https://github.com/WoltLab/d.ts.git#4e9d0e4825110d3fd140cbdcecac6f1bcd7a1840"
       },
       "devDependencies": {
         "@typescript-eslint/eslint-plugin": "^6.5.0",
       }
     },
     "node_modules/@types/facebook-js-sdk": {
-      "version": "3.3.6",
-      "resolved": "https://registry.npmjs.org/@types/facebook-js-sdk/-/facebook-js-sdk-3.3.6.tgz",
-      "integrity": "sha512-CxTLMVtZsgrj9Ven5Pn1vcFumCFs+CG8Jfc63xWq/8b9e6uWjGyZlMnvQk7lIVn97Zd1vpu0ZK/OFWAoap0RCw=="
+      "version": "3.3.10",
+      "resolved": "https://registry.npmjs.org/@types/facebook-js-sdk/-/facebook-js-sdk-3.3.10.tgz",
+      "integrity": "sha512-85YWoOkYD1N8yCKRjxcjaroK73UnE3pIEG6zPRIPrb8D4HFceqNp60EQ7SZlu7vHpWGD+yCRumBH606vRUuMLw=="
     },
     "node_modules/@types/google.maps": {
       "version": "3.54.0",
       "integrity": "sha512-b1MBy2eGrZoEFLnzq1RrlHbfzuWHz+Nitgqbb5N+MFA0kAUv0kYPmAXtczpb4dHlFZyu58EYzcKXtWNqSInyXg=="
     },
     "node_modules/@types/jquery": {
-      "version": "3.5.16",
-      "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz",
-      "integrity": "sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==",
+      "version": "3.5.29",
+      "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.29.tgz",
+      "integrity": "sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg==",
       "dependencies": {
         "@types/sizzle": "*"
       }
       "dev": true
     },
     "node_modules/@types/sizzle": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz",
-      "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ=="
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz",
+      "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg=="
     },
     "node_modules/@types/twitter-for-web": {
-      "version": "0.0.2",
-      "resolved": "https://registry.npmjs.org/@types/twitter-for-web/-/twitter-for-web-0.0.2.tgz",
-      "integrity": "sha512-fDg882G9KHOkVxyJFkZ1hIOHxgj1vHLZnMJshF9W+8C2f9lzkIc/DeD1Ed2q1SWaHD/hdooaFIWTDhgL8zzpYg=="
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/@types/twitter-for-web/-/twitter-for-web-0.0.3.tgz",
+      "integrity": "sha512-ty80ZBqE5B5+Jyre2tAdfBDrurLwWYlg1oqyKV91GpxU6e3rjHo2bxZb7ivgfZAOPDYsgzHfg/cbHgsx6ruhmg=="
     },
     "node_modules/@types/zxcvbn": {
       "version": "4.4.2",
       }
     },
     "node_modules/@woltlab/d.ts": {
-      "resolved": "git+ssh://git@github.com/WoltLab/d.ts.git#c08648e9f82c381bd18b91ac1072c430e58e71f1",
-      "integrity": "sha512-cqNfrQOmIb3rX7qc/NtLQ/abvV5nxY8IS5ybE2h15q0X/jskjwdnSdGfX44bAbNKmjC9bQvi8LdZSzY0PNGHMw==",
+      "resolved": "git+ssh://git@github.com/WoltLab/d.ts.git#4e9d0e4825110d3fd140cbdcecac6f1bcd7a1840",
+      "integrity": "sha512-dsat3LZeU0bKYe89UA0e0jTjqU8gn5LaN7PK8OvXblx1TG24Ge/Nwj1CWbaqXTuTdRCXJ6TcLQ0yDJ0BTnk4qw==",
       "dependencies": {
         "@ckeditor/ckeditor5-inspector": "^4.1.0",
         "@googlemaps/markerclusterer": "^2.0.15",
-        "@types/facebook-js-sdk": "^3.3.6",
+        "@types/facebook-js-sdk": "^3.3.7",
         "@types/google.maps": "^3.54.0",
-        "@types/jquery": "^3.5.16",
+        "@types/jquery": "^3.5.18",
         "@types/pica": "^5.1.3",
         "@types/prismjs": "^1.26.0",
-        "@types/twitter-for-web": "0.0.2",
+        "@types/twitter-for-web": "0.0.3",
         "@woltlab/editor": "git+https://github.com/WoltLab/editor.git#c407a8efe4f3ad08d7777cd71dce30b4dd2a523a",
         "@woltlab/zxcvbn": "git+https://github.com/WoltLab/zxcvbn.git#5b582b24e437f1883ccad3c37dae7c3c5f1e7da3",
         "focus-trap": "^7.5.2",
       }
     },
     "@types/facebook-js-sdk": {
-      "version": "3.3.6",
-      "resolved": "https://registry.npmjs.org/@types/facebook-js-sdk/-/facebook-js-sdk-3.3.6.tgz",
-      "integrity": "sha512-CxTLMVtZsgrj9Ven5Pn1vcFumCFs+CG8Jfc63xWq/8b9e6uWjGyZlMnvQk7lIVn97Zd1vpu0ZK/OFWAoap0RCw=="
+      "version": "3.3.10",
+      "resolved": "https://registry.npmjs.org/@types/facebook-js-sdk/-/facebook-js-sdk-3.3.10.tgz",
+      "integrity": "sha512-85YWoOkYD1N8yCKRjxcjaroK73UnE3pIEG6zPRIPrb8D4HFceqNp60EQ7SZlu7vHpWGD+yCRumBH606vRUuMLw=="
     },
     "@types/google.maps": {
       "version": "3.54.0",
       "integrity": "sha512-b1MBy2eGrZoEFLnzq1RrlHbfzuWHz+Nitgqbb5N+MFA0kAUv0kYPmAXtczpb4dHlFZyu58EYzcKXtWNqSInyXg=="
     },
     "@types/jquery": {
-      "version": "3.5.16",
-      "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz",
-      "integrity": "sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==",
+      "version": "3.5.29",
+      "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.29.tgz",
+      "integrity": "sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg==",
       "requires": {
         "@types/sizzle": "*"
       }
       "dev": true
     },
     "@types/sizzle": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz",
-      "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ=="
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz",
+      "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg=="
     },
     "@types/twitter-for-web": {
-      "version": "0.0.2",
-      "resolved": "https://registry.npmjs.org/@types/twitter-for-web/-/twitter-for-web-0.0.2.tgz",
-      "integrity": "sha512-fDg882G9KHOkVxyJFkZ1hIOHxgj1vHLZnMJshF9W+8C2f9lzkIc/DeD1Ed2q1SWaHD/hdooaFIWTDhgL8zzpYg=="
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/@types/twitter-for-web/-/twitter-for-web-0.0.3.tgz",
+      "integrity": "sha512-ty80ZBqE5B5+Jyre2tAdfBDrurLwWYlg1oqyKV91GpxU6e3rjHo2bxZb7ivgfZAOPDYsgzHfg/cbHgsx6ruhmg=="
     },
     "@types/zxcvbn": {
       "version": "4.4.2",
       }
     },
     "@woltlab/d.ts": {
-      "version": "git+ssh://git@github.com/WoltLab/d.ts.git#c08648e9f82c381bd18b91ac1072c430e58e71f1",
-      "integrity": "sha512-cqNfrQOmIb3rX7qc/NtLQ/abvV5nxY8IS5ybE2h15q0X/jskjwdnSdGfX44bAbNKmjC9bQvi8LdZSzY0PNGHMw==",
-      "from": "@woltlab/d.ts@https://github.com/WoltLab/d.ts.git#c08648e9f82c381bd18b91ac1072c430e58e71f1",
+      "version": "git+ssh://git@github.com/WoltLab/d.ts.git#4e9d0e4825110d3fd140cbdcecac6f1bcd7a1840",
+      "integrity": "sha512-dsat3LZeU0bKYe89UA0e0jTjqU8gn5LaN7PK8OvXblx1TG24Ge/Nwj1CWbaqXTuTdRCXJ6TcLQ0yDJ0BTnk4qw==",
+      "from": "@woltlab/d.ts@https://github.com/WoltLab/d.ts.git#4e9d0e4825110d3fd140cbdcecac6f1bcd7a1840",
       "requires": {
         "@ckeditor/ckeditor5-inspector": "^4.1.0",
         "@googlemaps/markerclusterer": "^2.0.15",
-        "@types/facebook-js-sdk": "^3.3.6",
+        "@types/facebook-js-sdk": "^3.3.7",
         "@types/google.maps": "^3.54.0",
-        "@types/jquery": "^3.5.16",
+        "@types/jquery": "^3.5.18",
         "@types/pica": "^5.1.3",
         "@types/prismjs": "^1.26.0",
-        "@types/twitter-for-web": "0.0.2",
+        "@types/twitter-for-web": "0.0.3",
         "@woltlab/editor": "git+https://github.com/WoltLab/editor.git#c407a8efe4f3ad08d7777cd71dce30b4dd2a523a",
         "@woltlab/zxcvbn": "git+https://github.com/WoltLab/zxcvbn.git#5b582b24e437f1883ccad3c37dae7c3c5f1e7da3",
         "focus-trap": "^7.5.2",
index 8e4bccb861ae3cf7a7e7b71198fd45b351425f2f..737f8fdc6b6b486bae8f1cb2b2fce10ee02360c1 100644 (file)
@@ -8,6 +8,6 @@
     "typescript": "^5.2.2"
   },
   "dependencies": {
-    "@woltlab/d.ts": "https://github.com/WoltLab/d.ts.git#c08648e9f82c381bd18b91ac1072c430e58e71f1"
+    "@woltlab/d.ts": "https://github.com/WoltLab/d.ts.git#4e9d0e4825110d3fd140cbdcecac6f1bcd7a1840"
   }
 }
index 6c2b7de4adbfb202e9dc9a542791275906c4a4b3..e05065f35b552f7a5c6a56d5fe02d556ffb77115 100644 (file)
@@ -10,6 +10,7 @@
 import { dboAction } from "WoltLabSuite/Core/Ajax";
 import UserMenuView from "WoltLabSuite/Core/Ui/User/Menu/View";
 import {
+  EventUpdateCounter,
   UserMenuButton,
   UserMenuData,
   UserMenuFooter,
@@ -55,6 +56,11 @@ class UserMenuDataConversation implements UserMenuProvider {
         this.counter = counter;
       }
     }
+    this.button.addEventListener("updateCounter", (event: CustomEvent<EventUpdateCounter>) => {
+      this.updateCounter(event.detail.counter);
+
+      this.stale = true;
+    });
   }
 
   getPanelButton(): HTMLElement {