@braze/web-sdk 4.0.0 → 4.0.3
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/index.d.ts +1 -1
- package/package.json +3 -2
- package/shared-lib/braze-shared-lib.js +1 -1
- package/shared-lib/encoding-utils.js +1 -1
- package/shared-lib/event-types.js +1 -1
- package/shared-lib/indexed-db-adapter.js +1 -1
- package/shared-lib/logger.js +1 -1
- package/shared-lib/supported-options.js +1 -1
- package/src/Card/util/card-factory.js +1 -1
- package/src/Core/handle-braze-action.js +1 -1
- package/src/InAppMessage/in-app-message-manager.js +1 -1
- package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-html-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +1 -1
- package/src/InAppMessage/models/in-app-message-button.js +1 -1
- package/src/InAppMessage/models/in-app-message.js +1 -1
- package/src/InAppMessage/models/modal-message.js +1 -1
- package/src/InAppMessage/models/slide-up-message.js +1 -1
- package/src/InAppMessage/models/templated-in-app-message.js +1 -1
- package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +1 -1
- package/src/InAppMessage/ui/show-in-app-message.js +1 -1
- package/src/Push/push-manager-factory.js +1 -1
- package/src/Push/push-manager.js +1 -1
- package/src/User/user-manager.js +1 -1
- package/src/User/user.js +1 -1
- package/src/common/base-feed.js +1 -1
- package/src/common/event-logger.js +1 -1
- package/src/common/feed-display.js +1 -1
- package/src/l10n/l10n-manager-factory.js +1 -1
- package/src/managers/auth-manager.js +1 -1
- package/src/managers/braze-instance.js +1 -1
- package/src/managers/device-manager.js +1 -1
- package/src/managers/network-manager.js +1 -1
- package/src/managers/server-config-manager.js +1 -1
- package/src/managers/session-manager.js +1 -1
- package/src/managers/storage-manager-factory.js +1 -1
- package/src/managers/storage-manager.js +1 -1
- package/src/managers/subscription-manager.js +1 -1
- package/src/models/backend-errors.js +1 -1
- package/src/models/braze-event.js +1 -1
- package/src/models/device.js +1 -1
- package/src/models/identifier.js +1 -1
- package/src/models/push-token.js +1 -1
- package/src/models/server-config.js +1 -1
- package/src/request-controller.js +1 -1
- package/src/triggers/models/filter-set.js +1 -1
- package/src/triggers/models/filter.js +1 -1
- package/src/triggers/models/trigger-condition.js +1 -1
- package/src/triggers/models/trigger.js +1 -1
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +1 -1
- package/src/ui/js/attach-css.js +1 -1
- package/src/ui/js/feed-css.js +1 -1
- package/src/ui/js/iam-css.js +1 -1
- package/src/ui/js/load-font-awesome.js +1 -1
- package/src/util/base-device-parser.js +1 -1
- package/src/util/browser-detector.js +1 -1
- package/src/util/client-hints-parser.js +1 -1
- package/src/util/color-utils.js +1 -1
- package/src/util/component-utils.js +1 -1
- package/src/util/device-constants.js +1 -1
- package/src/util/dom-utils.js +1 -1
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +1 -1
- package/src/util/user-agent-parser.js +1 -1
- package/src/util/window-utils.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Wt from"./base-device-parser.js";import{Browsers as Zt,OperatingSystems as ot}from"./device-constants.js";export default class Yt extends Wt{constructor(){super(),this.eu=Yt.nu(navigator.userAgent||"")}tf(){return this.eu[0]||"Unknown Browser"}ef(){return this.eu[1]||"Unknown Version"}Ho(r){for(let e=0;e<r.length;e++){let n=r[e].string,i=Yt.rf(n,r[e]);if(i)return i===ot.Og&&navigator.maxTouchPoints>1&&(i=ot.ln),Promise.resolve(i)}return Promise.resolve(navigator.platform)}static nu(r){let e,n=r.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(/trident/i.test(n[1]))return e=/\brv[ :]+(\.?\d+(\.\d+)*)/g.exec(r)||[],[Zt.vg,e[1]||""];if(-1!==r.indexOf("(Web0S; Linux/SmartTV)"))return["LG Smart TV",null];if(-1!==r.indexOf("CrKey"))return["Chromecast",null];if(-1!==r.indexOf("BRAVIA")||-1!==r.indexOf("SonyCEBrowser")||-1!==r.indexOf("SonyDTV"))return["Sony Smart TV",null];if(-1!==r.indexOf("PhilipsTV"))return["Philips Smart TV",null];if(r.match(/\b(Roku)\b/))return["Roku",null];if(r.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(n[1]===Zt.rE&&(e=r.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),null!=e))return e=e.slice(1),e[0]=e[0].replace("OPR",Zt.EE),e[0]=e[0].replace("EdgA",Zt.eE),"Edg"===e[0]&&(e[0]=Zt.eE),[e[0],e[1]];if(n[1]===Zt.yg&&(e=r.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),null!=e))return e=e.slice(1),e[0]=e[0].replace("EdgiOS",Zt.eE),[e[0],e[1]];if(n=n[2]?[n[1],n[2]]:[null,null],n[0]===Zt.yg&&null!=(e=r.match(/version\/(\.?\d+(\.\d+)*)/i))&&n.splice(1,1,e[1]),null!=(e=r.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&n.splice(1,1,e[2]),n[0]===Zt.EE&&null!=(e=r.match(/mini\/(\.?\d+(\.\d+)*)/i)))return["Opera Mini",e[1]||""];if(n[0]){const r=n[0].toLowerCase();"msie"===r&&(n[0]=Zt.vg),"crios"===r&&(n[0]=Zt.rE),"tizen"===r&&(n[0]="Samsung Smart TV",n[1]=null),"samsungbrowser"===r&&(n[0]="Samsung Browser")}return n}}
|
package/src/util/window-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORIENTATION={PORTRAIT:0,LANDSCAPE:1};export function _isPhone(){return screen.width<=600}export function _getOrientation(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?ORIENTATION.LANDSCAPE:ORIENTATION.PORTRAIT;if("screen"in window){let n=window.screen.orientation||screen.mozOrientation||screen.msOrientation;return null!=n&&"object"==typeof n&&(n=n.type),"landscape-primary"===n||"landscape-secondary"===n?ORIENTATION.LANDSCAPE:ORIENTATION.PORTRAIT}return ORIENTATION.PORTRAIT}export function _openUri(n,e,r){e||null!=r&&r.metaKey?window.open(n):window.location=n}export function _getCurrentUrl(){return window.location.href}export const WindowUtils={openUri:_openUri,
|
|
1
|
+
export const ORIENTATION={PORTRAIT:0,LANDSCAPE:1};export function _isPhone(){return screen.width<=600}export function _getOrientation(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?ORIENTATION.LANDSCAPE:ORIENTATION.PORTRAIT;if("screen"in window){let n=window.screen.orientation||screen.mozOrientation||screen.msOrientation;return null!=n&&"object"==typeof n&&(n=n.type),"landscape-primary"===n||"landscape-secondary"===n?ORIENTATION.LANDSCAPE:ORIENTATION.PORTRAIT}return ORIENTATION.PORTRAIT}export function _openUri(n,e,r){e||null!=r&&r.metaKey?window.open(n):window.location=n}export function _getCurrentUrl(){return window.location.href}export const WindowUtils={openUri:_openUri,Ue:_isPhone,Je:_getOrientation,Nn:_getCurrentUrl};
|