@alan-ai/alan-sdk-web 1.8.33 → 1.8.34
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/dist/alan_lib.js +21 -21
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/alan_lib.js
CHANGED
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
|
|
781
781
|
/// <reference types="../global" />
|
|
782
782
|
(function (ns) {
|
|
783
|
-
var alanButtonVersion = '1.8.
|
|
783
|
+
var alanButtonVersion = '1.8.34';
|
|
784
784
|
if (window.alanBtn) {
|
|
785
785
|
console.warn('Alan: the Alan Button source code has already added (v.' + alanButtonVersion + ')');
|
|
786
786
|
}
|
|
@@ -1321,7 +1321,7 @@
|
|
|
1321
1321
|
}
|
|
1322
1322
|
if (absolutePosition) {
|
|
1323
1323
|
el.style.position = 'absolute';
|
|
1324
|
-
el.classList.add('
|
|
1324
|
+
el.classList.add('alan-btn-lib__absolute-positioned');
|
|
1325
1325
|
}
|
|
1326
1326
|
if (topPos) {
|
|
1327
1327
|
el.style.bottom = '';
|
|
@@ -1334,14 +1334,14 @@
|
|
|
1334
1334
|
if (isLeftAligned) {
|
|
1335
1335
|
btn.style.left = '0';
|
|
1336
1336
|
btn.style.right = '';
|
|
1337
|
-
recognisedTextHolder.classList.remove('
|
|
1338
|
-
recognisedTextHolder.classList.add('
|
|
1337
|
+
recognisedTextHolder.classList.remove('alan-btn-lib__left-side');
|
|
1338
|
+
recognisedTextHolder.classList.add('alan-btn-lib__right-side');
|
|
1339
1339
|
}
|
|
1340
1340
|
else {
|
|
1341
1341
|
btn.style.right = '0';
|
|
1342
1342
|
btn.style.left = '';
|
|
1343
|
-
recognisedTextHolder.classList.remove('
|
|
1344
|
-
recognisedTextHolder.classList.add('
|
|
1343
|
+
recognisedTextHolder.classList.remove('alan-btn-lib__right-side');
|
|
1344
|
+
recognisedTextHolder.classList.add('alan-btn-lib__left-side');
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
function applyBtnSizeOptions(size) {
|
|
@@ -1703,8 +1703,8 @@
|
|
|
1703
1703
|
keyFrames += getStyleSheetMarker() + '.alanBtn{transform: scale(1);' + transitionCss + ';} .alanBtn' + hoverSelector + '{transform: scale(1.11111);transition:' + transitionCss + ';}.alanBtn:focus {transform: scale(1);' + transitionCss + '; border: solid 3px #50e3c2; outline: none; }';
|
|
1704
1704
|
}
|
|
1705
1705
|
keyFrames += getStyleSheetMarker() + '.alanBtn-recognised-text-holder { position:fixed; transform: translateY(' + (isTopAligned ? '-' : '') + '50%); max-width:236px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 18px; min-height: 40px; color: #000; font-weight: normal; background-color: #fff; border-radius:10px; box-shadow: 0px 1px 14px rgba(0, 0, 0, 0.35); display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack: activate;-ms-flex-pack: start;justify-content: start;}';
|
|
1706
|
-
keyFrames += getStyleSheetMarker() + ' .alanBtn-recognised-text-holder.
|
|
1707
|
-
keyFrames += getStyleSheetMarker() + ' .alanBtn-recognised-text-holder.
|
|
1706
|
+
keyFrames += getStyleSheetMarker() + ' .alanBtn-recognised-text-holder.alan-btn-lib__with-text.alan-btn-lib__left-side { text-align: left;}';
|
|
1707
|
+
keyFrames += getStyleSheetMarker() + ' .alanBtn-recognised-text-holder.alan-btn-lib__with-text.alan-btn-lib__right-side { text-align: right;}';
|
|
1708
1708
|
keyFrames += getStyleSheetMarker() + ' .alanBtn-recognised-text-holder .alanBtn-recognised-text-content:not(:empty) {padding: 10px;}';
|
|
1709
1709
|
keyFrames += getStyleSheetMarker(true) + '.alanBtn-recognised-text-holder-long { font-size: 12px!important;line-height: 1.4!important;} ';
|
|
1710
1710
|
keyFrames += getStyleSheetMarker(true) + '.alanBtn-recognised-text-holder-super-long { font-size: 11px!important;line-height: 1.4!important;} ';
|
|
@@ -1728,11 +1728,11 @@
|
|
|
1728
1728
|
keyFrames += getStyleSheetMarker() + '.alan-alert-popup {border-radius:10px; box-shadow: 0px 5px 14px rgba(3, 3, 3, 0.25);padding:12px;padding-right:24px;text-align: center;width: 220px;background: rgb(255 255 255);position: fixed;left: 50%;transform: translateX(-50%);top: 10%; color: #000;font-size: 14px;line-height: 18px;}';
|
|
1729
1729
|
keyFrames += getStyleSheetMarker() + '.alan-alert-popup__close-btn {background:url("' + popupCloseIconImgBase64 + '") no-repeat center;cursor:pointer; background-size:100% 100%;position: absolute;top: 12px;right: 12px;width: 14px;height: 14px;}';
|
|
1730
1730
|
keyFrames += getStyleSheetMarker() + '.alan-overlay {position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 99;background: rgba(0, 0, 0, 0.57);opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}';
|
|
1731
|
-
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.
|
|
1732
|
-
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.
|
|
1733
|
-
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.
|
|
1734
|
-
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.
|
|
1735
|
-
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.
|
|
1731
|
+
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.alan-btn-lib__default-popup {border-radius:10px; box-shadow: 0px 5px 14px rgba(3, 3, 3, 0.25);padding:6px 30px 6px 12px;text-align: left;width: 220px;background: rgb(255 255 255);}';
|
|
1732
|
+
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.alan-btn-lib__top.alan-btn-lib__right {border-top-right-radius: 0!important;}';
|
|
1733
|
+
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.alan-btn-lib__top.alan-btn-lib__left {border-top-left-radius: 0!important;}';
|
|
1734
|
+
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.alan-btn-lib__bottom.alan-btn-lib__left {border-bottom-left-radius: 0!important;}';
|
|
1735
|
+
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup.alan-btn-lib__bottom.alan-btn-lib__right {border-bottom-right-radius: 0!important;}';
|
|
1736
1736
|
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup {position: fixed;opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}';
|
|
1737
1737
|
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup__body {position:relative;color: #0D1940;font-size: 16px;line-height: 20px;}';
|
|
1738
1738
|
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup__ok {background:url("' + popupCloseIconImgBase64 + '") no-repeat center; background-size:100% 100%;min-height:14px;height:14px;max-height:14px;min-width:14px;width:14px;max-width:14px;opacity:0;transition:opacity 300ms ease-in-out;position:absolute;top:8px;right:8px;cursor: pointer;pointer-events: auto!important;}';
|
|
@@ -2114,7 +2114,7 @@
|
|
|
2114
2114
|
document.getElementsByTagName('head')[0].appendChild(popupStyle);
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
|
-
popup.classList.add(isLeftAligned ? '
|
|
2117
|
+
popup.classList.add(isLeftAligned ? 'alan-btn-lib__left' : 'alan-btn-lib__right');
|
|
2118
2118
|
if (!absolutePosition) {
|
|
2119
2119
|
if (!isLeftAligned) {
|
|
2120
2120
|
popup.style.right = initRightPos + (-buttonMarginInPopup || 0) + 'px';
|
|
@@ -2123,12 +2123,12 @@
|
|
|
2123
2123
|
popup.style.left = rootElClientRect.x + (-buttonMarginInPopup || 0) + 'px';
|
|
2124
2124
|
}
|
|
2125
2125
|
if (rootElClientRect.top > 80) {
|
|
2126
|
-
popup.classList.add('
|
|
2126
|
+
popup.classList.add('alan-btn-lib__bottom');
|
|
2127
2127
|
popup.style.top = rootElClientRect.top + (buttonMarginInPopup ? (_btnSize + buttonMarginInPopup) : (-popup2BtnMargin)) + 'px';
|
|
2128
2128
|
popup.style.setProperty('transform', 'translateY(-100%)', 'important');
|
|
2129
2129
|
}
|
|
2130
2130
|
else {
|
|
2131
|
-
popup.classList.add('
|
|
2131
|
+
popup.classList.add('alan-btn-lib__top');
|
|
2132
2132
|
popup.style.top = rootElClientRect.top + (buttonMarginInPopup ? (-buttonMarginInPopup) : (_btnSize + popup2BtnMargin)) + 'px';
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
@@ -2136,11 +2136,11 @@
|
|
|
2136
2136
|
popup.style.position = 'absolute';
|
|
2137
2137
|
popup.style[isLeftAligned ? 'left' : 'right'] = (-buttonMarginInPopup || 0) + 'px';
|
|
2138
2138
|
popup.style[isTopAligned ? 'top' : 'bottom'] = (buttonMarginInPopup ? -buttonMarginInPopup : (_btnSize + popup2BtnMargin)) + 'px';
|
|
2139
|
-
popup.classList.add(isTopAligned ? '
|
|
2139
|
+
popup.classList.add(isTopAligned ? 'alan-btn-lib__top' : 'alan-btn-lib__bottom');
|
|
2140
2140
|
}
|
|
2141
2141
|
if (!popupOptions.html) {
|
|
2142
2142
|
if (message) {
|
|
2143
|
-
popup.classList.add('
|
|
2143
|
+
popup.classList.add('alan-btn-lib__default-popup');
|
|
2144
2144
|
popup.innerHTML = '<div class="alan-overlay-popup__body">' + message + '</div>';
|
|
2145
2145
|
}
|
|
2146
2146
|
}
|
|
@@ -2264,7 +2264,7 @@
|
|
|
2264
2264
|
if (!options.hideRecognizedText) {
|
|
2265
2265
|
if (recognisedTextHolder.classList.value.indexOf('alanBtn-text-appearing') === -1) {
|
|
2266
2266
|
recognisedTextHolder.style.opacity = '1';
|
|
2267
|
-
recognisedTextHolder.classList.add('
|
|
2267
|
+
recognisedTextHolder.classList.add('alan-btn-lib__with-text');
|
|
2268
2268
|
recognisedTextHolder.classList.add('alanBtn-text-appearing');
|
|
2269
2269
|
recognisedTextHolder.classList.remove('alanBtn-text-disappearing');
|
|
2270
2270
|
}
|
|
@@ -2275,7 +2275,7 @@
|
|
|
2275
2275
|
}
|
|
2276
2276
|
recognisedTextContent.innerHTML = recognisedText;
|
|
2277
2277
|
}
|
|
2278
|
-
if (recognisedTextHolder.classList.contains('
|
|
2278
|
+
if (recognisedTextHolder.classList.contains('alan-btn-lib__absolute-positioned')) {
|
|
2279
2279
|
if (recognisedText.length < 33) {
|
|
2280
2280
|
recognisedTextHolder.style.whiteSpace = 'nowrap';
|
|
2281
2281
|
recognisedTextHolder.style.minWidth = 'auto';
|
|
@@ -2323,7 +2323,7 @@
|
|
|
2323
2323
|
recognisedTextContent.innerHTML = '';
|
|
2324
2324
|
recognisedTextHolder.classList.remove('alanBtn-recognised-text-holder-long');
|
|
2325
2325
|
recognisedTextHolder.classList.remove('alanBtn-recognised-text-holder-super-long');
|
|
2326
|
-
recognisedTextHolder.classList.remove('
|
|
2326
|
+
recognisedTextHolder.classList.remove('alan-btn-lib__with-text');
|
|
2327
2327
|
}, delay || 810);
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|