@matrix-widget-toolkit/api 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.cjs +10 -0
- package/build/esm/index.js +11 -1
- package/package.json +1 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -1227,6 +1227,16 @@ var WidgetApiImpl = /** @class */ (function () {
|
|
|
1227
1227
|
this.matrixWidgetApi = matrixWidgetApi$1;
|
|
1228
1228
|
this.widgetId = widgetId;
|
|
1229
1229
|
this.widgetParameters = widgetParameters;
|
|
1230
|
+
// Disable the update_state API that is not implemented.
|
|
1231
|
+
this.matrixWidgetApi.on("action:".concat(matrixWidgetApi.WidgetApiToWidgetAction.SupportedApiVersions), function (event) {
|
|
1232
|
+
event.preventDefault();
|
|
1233
|
+
var supportedVersions = matrixWidgetApi.CurrentApiVersions.filter(function (apiVersion) {
|
|
1234
|
+
return apiVersion !== matrixWidgetApi.UnstableApiVersion.MSC2762_UPDATE_STATE;
|
|
1235
|
+
});
|
|
1236
|
+
matrixWidgetApi$1.transport.reply(event.detail, {
|
|
1237
|
+
supported_versions: supportedVersions,
|
|
1238
|
+
});
|
|
1239
|
+
});
|
|
1230
1240
|
this.events$ = rxjs.fromEvent(this.matrixWidgetApi, "action:".concat(matrixWidgetApi.WidgetApiToWidgetAction.SendEvent), function (event) {
|
|
1231
1241
|
event.preventDefault();
|
|
1232
1242
|
try {
|
package/build/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Symbols, WidgetEventCapability, EventDirection, WidgetApi, WidgetApiToWidgetAction, MatrixCapabilities } from 'matrix-widget-api';
|
|
1
|
+
import { Symbols, WidgetEventCapability, EventDirection, WidgetApi, WidgetApiToWidgetAction, CurrentApiVersions, UnstableApiVersion, MatrixCapabilities } from 'matrix-widget-api';
|
|
2
2
|
import Joi from 'joi';
|
|
3
3
|
import { stringify, parse } from 'qs';
|
|
4
4
|
import { filter, fromEvent, firstValueFrom, map, first, throwError, from, mergeAll, concat, ReplaySubject, share } from 'rxjs';
|
|
@@ -1221,6 +1221,16 @@ var WidgetApiImpl = /** @class */ (function () {
|
|
|
1221
1221
|
this.matrixWidgetApi = matrixWidgetApi;
|
|
1222
1222
|
this.widgetId = widgetId;
|
|
1223
1223
|
this.widgetParameters = widgetParameters;
|
|
1224
|
+
// Disable the update_state API that is not implemented.
|
|
1225
|
+
this.matrixWidgetApi.on("action:".concat(WidgetApiToWidgetAction.SupportedApiVersions), function (event) {
|
|
1226
|
+
event.preventDefault();
|
|
1227
|
+
var supportedVersions = CurrentApiVersions.filter(function (apiVersion) {
|
|
1228
|
+
return apiVersion !== UnstableApiVersion.MSC2762_UPDATE_STATE;
|
|
1229
|
+
});
|
|
1230
|
+
matrixWidgetApi.transport.reply(event.detail, {
|
|
1231
|
+
supported_versions: supportedVersions,
|
|
1232
|
+
});
|
|
1233
|
+
});
|
|
1224
1234
|
this.events$ = fromEvent(this.matrixWidgetApi, "action:".concat(WidgetApiToWidgetAction.SendEvent), function (event) {
|
|
1225
1235
|
event.preventDefault();
|
|
1226
1236
|
try {
|
package/package.json
CHANGED