dialogshift-webchat-sdk 2.9.9 → 2.10.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/bundles/dialogshift-webchat-sdk.umd.js +41 -0
- package/bundles/dialogshift-webchat-sdk.umd.js.map +1 -1
- package/dist/widgets/action-button.widget.js +15 -0
- package/dist/widgets/action-button.widget.js.map +1 -1
- package/dist/widgets/chat-button.widget.js +6 -0
- package/dist/widgets/chat-button.widget.js.map +1 -1
- package/dist/widgets/header/header-close-button.widget.js +7 -0
- package/dist/widgets/header/header-close-button.widget.js.map +1 -1
- package/dist/widgets/teaser.widget.js +13 -0
- package/dist/widgets/teaser.widget.js.map +1 -1
- package/package.json +11 -17
|
@@ -2780,16 +2780,31 @@ var ActionButtonWidget = /** @class */ (function (_super) {
|
|
|
2780
2780
|
teaserButton: true,
|
|
2781
2781
|
});
|
|
2782
2782
|
});
|
|
2783
|
+
this.getBoxElem().addEventListener('keydown', function (event) {
|
|
2784
|
+
if (event.key === 'Enter') {
|
|
2785
|
+
_this.app.triggerElement({
|
|
2786
|
+
successor: _this.actionButton.getSuccessor(),
|
|
2787
|
+
teaserButton: true,
|
|
2788
|
+
});
|
|
2789
|
+
}
|
|
2790
|
+
});
|
|
2783
2791
|
}
|
|
2784
2792
|
if (this.actionButton.getType() === _models__WEBPACK_IMPORTED_MODULE_2__.ActionButtonType.callback) {
|
|
2785
2793
|
this.getBoxElem().addEventListener('click', function () {
|
|
2786
2794
|
var callback = _this.actionButton.getCallback();
|
|
2787
2795
|
callback();
|
|
2788
2796
|
});
|
|
2797
|
+
this.getBoxElem().addEventListener('keydown', function (event) {
|
|
2798
|
+
if (event.key === 'Enter') {
|
|
2799
|
+
var callback = _this.actionButton.getCallback();
|
|
2800
|
+
callback();
|
|
2801
|
+
}
|
|
2802
|
+
});
|
|
2789
2803
|
}
|
|
2790
2804
|
};
|
|
2791
2805
|
ActionButtonWidget.prototype.render = function () {
|
|
2792
2806
|
_super.prototype.render.call(this);
|
|
2807
|
+
this.getBoxElem().tabIndex = 0;
|
|
2793
2808
|
this.bindEvents();
|
|
2794
2809
|
};
|
|
2795
2810
|
ActionButtonWidget.prototype.getBaseCls = function () {
|
|
@@ -2853,6 +2868,11 @@ var ChatButtonWidget = /** @class */ (function (_super) {
|
|
|
2853
2868
|
this.getBoxElem().addEventListener('click', function () {
|
|
2854
2869
|
_this.toggle();
|
|
2855
2870
|
});
|
|
2871
|
+
this.getBoxElem().addEventListener('keydown', function (event) {
|
|
2872
|
+
if (event.key === 'Enter') {
|
|
2873
|
+
_this.toggle();
|
|
2874
|
+
}
|
|
2875
|
+
});
|
|
2856
2876
|
};
|
|
2857
2877
|
ChatButtonWidget.prototype.getBaseCls = function () {
|
|
2858
2878
|
return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonCls;
|
|
@@ -2861,6 +2881,7 @@ var ChatButtonWidget = /** @class */ (function (_super) {
|
|
|
2861
2881
|
var boxElem = this.getBoxElem();
|
|
2862
2882
|
var iconContainer = document.createElement('div');
|
|
2863
2883
|
iconContainer.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonIconContainerCls);
|
|
2884
|
+
iconContainer.tabIndex = 0;
|
|
2864
2885
|
iconContainer.innerHTML = _consts__WEBPACK_IMPORTED_MODULE_2__.iconSvg;
|
|
2865
2886
|
boxElem.appendChild(iconContainer);
|
|
2866
2887
|
boxElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonLogoCls);
|
|
@@ -3135,9 +3156,16 @@ var HeaderCloseButtonWidget = /** @class */ (function (_super) {
|
|
|
3135
3156
|
this.getBoxElem().addEventListener('click', function () {
|
|
3136
3157
|
_this.fire('click');
|
|
3137
3158
|
});
|
|
3159
|
+
this.getBoxElem().addEventListener('keydown', function (event) {
|
|
3160
|
+
if (event.key === 'Enter') {
|
|
3161
|
+
_this.fire('click');
|
|
3162
|
+
}
|
|
3163
|
+
});
|
|
3138
3164
|
};
|
|
3139
3165
|
HeaderCloseButtonWidget.prototype.render = function () {
|
|
3140
3166
|
_super.prototype.render.call(this);
|
|
3167
|
+
this.getBoxElem().tabIndex = 0;
|
|
3168
|
+
this.getBoxElem().ariaLabel = 'Close Chat';
|
|
3141
3169
|
this.bindEvents();
|
|
3142
3170
|
};
|
|
3143
3171
|
HeaderCloseButtonWidget.prototype.getBaseCls = function () {
|
|
@@ -3508,6 +3536,8 @@ var TeaserWidget = /** @class */ (function (_super) {
|
|
|
3508
3536
|
TeaserWidget.prototype.render = function () {
|
|
3509
3537
|
this.crossElem = this.createNode();
|
|
3510
3538
|
this.crossElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.teaserCrossCls);
|
|
3539
|
+
this.crossElem.tabIndex = 0;
|
|
3540
|
+
this.crossElem.ariaLabel = 'Close Chat Teaser';
|
|
3511
3541
|
this.bindEvents();
|
|
3512
3542
|
this.getBoxElem().appendChild(this.crossElem);
|
|
3513
3543
|
_super.prototype.render.call(this);
|
|
@@ -3581,7 +3611,18 @@ var TeaserWidget = /** @class */ (function (_super) {
|
|
|
3581
3611
|
event.stopPropagation();
|
|
3582
3612
|
_this.hide();
|
|
3583
3613
|
});
|
|
3614
|
+
this.crossElem.addEventListener('keydown', function (event) {
|
|
3615
|
+
if (event.key === 'Enter') {
|
|
3616
|
+
event.stopPropagation();
|
|
3617
|
+
_this.hide();
|
|
3618
|
+
}
|
|
3619
|
+
});
|
|
3584
3620
|
this.getBoxElem().addEventListener('click', function () { return _this.fire('click'); });
|
|
3621
|
+
this.getBoxElem().addEventListener('keydown', function (event) {
|
|
3622
|
+
if (event.key === 'Enter') {
|
|
3623
|
+
_this.fire('click');
|
|
3624
|
+
}
|
|
3625
|
+
});
|
|
3585
3626
|
};
|
|
3586
3627
|
return TeaserWidget;
|
|
3587
3628
|
}(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
|