@aws-amplify/interactions 4.0.50 → 4.0.51
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/CHANGELOG.md +11 -0
- package/dist/aws-amplify-interactions.js +16 -18
- package/dist/aws-amplify-interactions.js.map +1 -1
- package/dist/aws-amplify-interactions.min.js +1 -1
- package/dist/aws-amplify-interactions.min.js.map +1 -1
- package/lib/Interactions.js +19 -20
- package/lib/Interactions.js.map +1 -1
- package/lib-esm/Interactions.js +19 -20
- package/lib-esm/Interactions.js.map +1 -1
- package/package.json +3 -3
- package/src/Interactions.ts +21 -23
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.51](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/interactions@4.0.50...@aws-amplify/interactions@4.0.51) (2022-08-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **interactions:** fix addPluggable API ([#10250](https://github.com/aws-amplify/amplify-js/issues/10250)) ([01aad60](https://github.com/aws-amplify/amplify-js/commit/01aad60ff14c3db47761db819dd47def75bfcb9d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [4.0.50](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/interactions@4.0.49...@aws-amplify/interactions@4.0.50) (2022-08-18)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -11272,24 +11272,22 @@ function () {
|
|
|
11272
11272
|
InteractionsClass.prototype.addPluggable = function (pluggable) {
|
|
11273
11273
|
var _this = this;
|
|
11274
11274
|
|
|
11275
|
-
if (
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
}
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
} else {
|
|
11292
|
-
throw new Error('Pluggable ' + pluggable.getProviderName() + ' already plugged');
|
|
11275
|
+
if (pluggable && pluggable.getCategory() === 'Interactions') {
|
|
11276
|
+
if (!this._pluggables[pluggable.getProviderName()]) {
|
|
11277
|
+
// configure bots for the new plugin
|
|
11278
|
+
Object.keys(this._options.bots).filter(function (botKey) {
|
|
11279
|
+
return _this._options.bots[botKey].providerName === pluggable.getProviderName();
|
|
11280
|
+
}).forEach(function (botKey) {
|
|
11281
|
+
var _a;
|
|
11282
|
+
|
|
11283
|
+
var bot = _this._options.bots[botKey];
|
|
11284
|
+
pluggable.configure((_a = {}, _a[bot.name] = bot, _a));
|
|
11285
|
+
});
|
|
11286
|
+
this._pluggables[pluggable.getProviderName()] = pluggable;
|
|
11287
|
+
return;
|
|
11288
|
+
} else {
|
|
11289
|
+
throw new Error('Pluggable ' + pluggable.getProviderName() + ' already plugged');
|
|
11290
|
+
}
|
|
11293
11291
|
}
|
|
11294
11292
|
};
|
|
11295
11293
|
|