Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sajari/react-sdk-utils

Package Overview
Dependencies
Maintainers
7
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sajari/react-sdk-utils - npm Package Compare versions

Comparing version 1.3.14 to 1.3.15

8

CHANGELOG.md
# Change Log
## 1.3.15
### Patch Changes
- [`6f34914a`](https://github.com/sajari/sdk-react/commit/6f34914ae92f850f7009bbbbb2c661217deaf632) [#580](https://github.com/sajari/sdk-react/pull/580) Thanks [@zlatanpham](https://github.com/zlatanpham)! - Fix the issue when the footer of the modal gets hidden on iPad. It was because we used `vh` to limit the max height of the modal content but on mobile browsers, the bottom bar is not part the the `100vh` height so the bottom UI will be cut off when the address bar is visible. For more details, see https://chanind.github.io/javascript/2019/09/28/avoid-100vh-on-mobile-web.html.
* [`995c5117`](https://github.com/sajari/sdk-react/commit/995c5117e9a053a79dc6638b02243b60b155a6ae) [#576](https://github.com/sajari/sdk-react/pull/576) Thanks [@wwalser](https://github.com/wwalser)! - Updated dependencies in order to create a more reliable build. This should have no runtime side effects but because it alters dependencies it felt best to do a patch version bump.
## 1.3.14

@@ -4,0 +12,0 @@

3

dist/react-sdk-utils.cjs.development.js

@@ -540,3 +540,4 @@ 'use strict';

'(screen-16)': 'calc(100vh - 4rem)',
'(screen-20)': 'calc(100vh - 5rem)'
'(screen-20)': 'calc(100vh - 5rem)',
'(full-12)': 'calc(100% - 3rem)'
}

@@ -543,0 +544,0 @@ }

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("react"),t=e(r),n=require("@emotion/core"),i=e(require("@emotion/is-prop-valid")),o=e(require("@emotion/styled")),u=require("emotion-theming"),a=e(require("@emotion/cache"));function c(){return(c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function s(e){return null==e}function l(e){return"string"==typeof e}function f(e){return"number"==typeof e&&!Number.isNaN(e)}function p(e){return Array.isArray(e)}var d=function(e){var r=typeof e;return null!==e&&("object"===r||"function"===r)&&!p(e)},m=function(e){if(!d(e)||"[object Object]"!==function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},v=function(e){return p(e)&&0===e.length},x=function(e){return d(e)&&0===Object.keys(e).length};function h(e){return!!s(e)||(p(e)?v(e):d(e)?x(e):!!l(e)&&""===e.trim())}function y(){return"undefined"==typeof window}function b(e){var r=/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(e.toString());return r?Math.max(0,(r[1]?r[1].length:0)-(r[2]?+r[2]:0)):0}function g(e,r){return parseFloat(e.toFixed(r))}function O(e,r){var t=null!=r?r:{},n=t.neutral,i=void 0===n||n,o=t.language,u=void 0===o?y()?"en-US":navigator.language:o,a=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r.indexOf(t=o[n])>=0||(i[t]=e[t]);return i}(t,["neutral","language"]);return f(e)?new Intl.NumberFormat(i?u.split("-")[0]:u,a).format(e):e}var j=function(e){var r;this.arrayHandling=null!=(r=null==e?void 0:e.arrayHandling)?r:"concat"};function w(e,r){for(var t=arguments.length,n=new Array(t>2?t-2:0),i=2;i<t;i++)n[i-2]=arguments[i];if(m(e)&&(n=[r].concat(n),r=e,e=new j),!m(r)||!n.length)return r;var o=e,u=o.arrayHandling,a=n.shift();return a&&m(a)?(Object.keys(a).forEach((function(t){var n=r[t],i=a[t];if(Array.isArray(n)&&Array.isArray(i))switch(u){case"concat":r[t]=n.concat(i);break;case"replace":r[t]=i;break;case"union":r[t]=Array.from(new Set([].concat(n,i)))}else r[t]=m(n)&&m(i)?w(e,c({},n),i):i})),r):r}function A(e,r){void 0===e&&(e=null),e&&("function"==typeof e?e(r):e.current=r)}function S(e,r){if(null!=e)try{A(e,r)}catch(e){throw new Error("Cannot assign value to ref")}}function P(e,r,t){return l(r)?e.split(r).join(t):Object.entries(r).reduce((function(e,r){return P(e,r[0],r[1])}),e)}var E={theme:{backdropFilter:{none:"none","blur-1":"blur(0.25rem)","blur-2":"blur(0.5rem)","blur-3":"blur(0.75rem)","blur-4":"blur(1rem)","blur-5":"blur(1.25rem)","blur-6":"blur(1.5rem)"},truncate:{lines:{2:"2",3:"3",4:"4",5:"5"}},extend:{backgroundOpacity:{95:.95},borderRadius:{inherit:"inherit"},boxShadow:{menu:"inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.1)"},fontSize:{"code-inline":"0.9375em"},fontFamily:{inherit:"inherit"},zIndex:{max:2147483647},lineHeight:{inherit:"inherit"},maxWidth:{"fit-content":"fit-content","7xl":"80rem","screen-2xl":"1536px"},minWidth:{"max-content":"max-content"},spacing:{"(screen-8)":"calc(100vh - 2rem)","(screen-12)":"calc(100vh - 3rem)","(screen-16)":"calc(100vh - 4rem)","(screen-20)":"calc(100vh - 5rem)"}}},plugins:[require("@tailwindcss/ui"),require("tailwindcss-filters"),require("tailwindcss-truncate-multiline")()]},M=["letter-spacing"],N=a({stylisPlugins:function(e,r,t){var n=t[0];switch(e){case 1:return r+" !important";case 3:return"@font-face"===n||n.startsWith("@")&&n.includes("keyframes")?P(r," !important",""):r;default:return r}},prefix:function(e){return!M.includes(e)}}),q={color:{primary:{base:"#667eea".toString(),text:"#fff".toString(),active:"#5a67d8".toString()}}};exports.MergeOptions=j,exports.ThemeProvider=function(e){var t=e.theme,i=void 0===t?q:t,o=e.importantStyles,a=void 0!==o&&o,s=e.children;return r.createElement(u.ThemeProvider,{theme:w(c({},q),i)},a?r.createElement(n.CacheProvider,{value:N},s):s)},exports.__DEV__=!1,exports.arraysEqual=function(e,r,t){if(void 0===t&&(t=!0),e===r)return!0;if(null==e||null==r)return!1;if(e.length!==r.length)return!1;for(var n=t?e:e.sort(),i=t?r:r.sort(),o=0;o<n.length;o+=1)if(n[o]!==i[o])return!1;return!0},exports.assignRef=S,exports.callAllHandlers=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){r.some((function(r){return r&&r(e),e&&e.defaultPrevented}))}},exports.clamp=function(e,r,t){return void 0===e&&(e=0),void 0===r&&(r=0),void 0===t&&(t=255),Math.min(Math.max(e,r),t)},exports.cleanChildren=function(e){return r.Children.toArray(e).filter((function(e){return r.isValidElement(e)}))},exports.closest=function(e,r){var t=r.reduce((function(r,t){return Math.abs(t-e)<Math.abs(r-e)?t:r}));return[r.indexOf(t),t]},exports.createContext=function(e){void 0===e&&(e={});var t=e.strict,n=void 0===t||t,i=e.errorMessage,o=void 0===i?"useContext must be inside a Provider with a value":i,u=e.name,a=r.createContext(void 0);return a.displayName=u,[a.Provider,function(){var e=r.useContext(a);if(!e&&n)throw new Error(o);return e},a]},exports.decodeHTML=function(e){if(void 0===e&&(e=""),y())return e;var r=document.createElement("textarea");return r.innerHTML=e,r.value},exports.filterObject=function(e,r,t){return void 0===t&&(t=!1),Object.keys(e).filter((function(e){return t?!r.includes(e):r.includes(e)})).reduce((function(r,t){var n;return Object.assign(r,((n={})[t]=e[t],n))}),{})},exports.filterProps=function(e){return s(e)?{}:Object.entries(e).reduce((function(e,r){var t,n=r[0],o=r[1];return i(n)?c({},e,((t={})[n]=o,t)):e}),{})},exports.formatNumber=O,exports.formatPrice=function(e,r){var t=e,n=function(t){var n=Number(t);return f(n)?O(n,c({style:"currency"},r)):e.toString()};if(!Array.isArray(t))return n(t);var i=t.map(Number),o=Math.min.apply(Math,i),u=Math.max.apply(Math,i);return o===u?n(o):n(o)+"–"+n(u)},exports.forwardRefWithAs=function(e){return t.forwardRef(e)},exports.getDecimalPlaces=b,exports.getStylesObject=function(e,r){return r?{}:e},exports.groupBy=function(e,r){return e.reduce((function(e,t){var n;return c({},e,((n={})[t[r]]=(e[t[r]]||[]).concat(t),n))}),{})},exports.inferStylesObjectKeys=function(e){return e},exports.isArray=p,exports.isBoolean=function(e){return"boolean"==typeof e},exports.isEmpty=h,exports.isEmptyArray=v,exports.isEmptyObject=x,exports.isFunction=function(e){return"function"==typeof e},exports.isNullOrUndefined=s,exports.isNumber=f,exports.isObject=d,exports.isPlainObject=m,exports.isSSR=y,exports.isString=l,exports.isValidURL=function(e,r){return void 0===r&&(r=!1),!(!e||h(e)||(!r||!e.startsWith("/"))&&null===function(e){void 0===e&&(e="");try{return new URL(e)}catch(e){return null}}(e))},exports.mapStyles=function(e){return Object.entries(e).reduce((function(e,r){var t;return Object.assign(e,((t={})[r[0]]=n.css(r[1]),t))}),{})},exports.merge=w,exports.mergeRefs=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){r.forEach((function(r){return r&&S(r,e)}))}},exports.noop=function(){},exports.pluralize=function(e,r,t){return 1===e?r:t},exports.replaceAll=P,exports.round=g,exports.roundToStep=function(e,r){var t=b(r);return g(Math.round(e/r)*r,t)},exports.setRef=A,exports.styled=o,exports.tailwindConfig=E,exports.useDebounce=function(e,t,n){void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1});var i=r.useRef();return function(){for(var r=this,o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];i.current&&clearTimeout(i.current);var c=function(){i.current=void 0,n.isImmediate||e.apply(r,u)},s=n.isImmediate&&void 0===i.current;i.current=setTimeout(c,t),s&&e.apply(this,u)}},exports.useTheme=function(){var e=u.useTheme();return w(c({},q),e)};
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("react"),t=e(r),n=require("@emotion/core"),i=e(require("@emotion/is-prop-valid")),o=e(require("@emotion/styled")),u=require("emotion-theming"),a=e(require("@emotion/cache"));function c(){return(c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function s(e){return null==e}function l(e){return"string"==typeof e}function f(e){return"number"==typeof e&&!Number.isNaN(e)}function p(e){return Array.isArray(e)}var d=function(e){var r=typeof e;return null!==e&&("object"===r||"function"===r)&&!p(e)},m=function(e){if(!d(e)||"[object Object]"!==function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},v=function(e){return p(e)&&0===e.length},x=function(e){return d(e)&&0===Object.keys(e).length};function h(e){return!!s(e)||(p(e)?v(e):d(e)?x(e):!!l(e)&&""===e.trim())}function y(){return"undefined"==typeof window}function b(e){var r=/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(e.toString());return r?Math.max(0,(r[1]?r[1].length:0)-(r[2]?+r[2]:0)):0}function g(e,r){return parseFloat(e.toFixed(r))}function O(e,r){var t=null!=r?r:{},n=t.neutral,i=void 0===n||n,o=t.language,u=void 0===o?y()?"en-US":navigator.language:o,a=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r.indexOf(t=o[n])>=0||(i[t]=e[t]);return i}(t,["neutral","language"]);return f(e)?new Intl.NumberFormat(i?u.split("-")[0]:u,a).format(e):e}var j=function(e){var r;this.arrayHandling=null!=(r=null==e?void 0:e.arrayHandling)?r:"concat"};function w(e,r){for(var t=arguments.length,n=new Array(t>2?t-2:0),i=2;i<t;i++)n[i-2]=arguments[i];if(m(e)&&(n=[r].concat(n),r=e,e=new j),!m(r)||!n.length)return r;var o=e,u=o.arrayHandling,a=n.shift();return a&&m(a)?(Object.keys(a).forEach((function(t){var n=r[t],i=a[t];if(Array.isArray(n)&&Array.isArray(i))switch(u){case"concat":r[t]=n.concat(i);break;case"replace":r[t]=i;break;case"union":r[t]=Array.from(new Set([].concat(n,i)))}else r[t]=m(n)&&m(i)?w(e,c({},n),i):i})),r):r}function A(e,r){void 0===e&&(e=null),e&&("function"==typeof e?e(r):e.current=r)}function S(e,r){if(null!=e)try{A(e,r)}catch(e){throw new Error("Cannot assign value to ref")}}function P(e,r,t){return l(r)?e.split(r).join(t):Object.entries(r).reduce((function(e,r){return P(e,r[0],r[1])}),e)}var E={theme:{backdropFilter:{none:"none","blur-1":"blur(0.25rem)","blur-2":"blur(0.5rem)","blur-3":"blur(0.75rem)","blur-4":"blur(1rem)","blur-5":"blur(1.25rem)","blur-6":"blur(1.5rem)"},truncate:{lines:{2:"2",3:"3",4:"4",5:"5"}},extend:{backgroundOpacity:{95:.95},borderRadius:{inherit:"inherit"},boxShadow:{menu:"inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.1)"},fontSize:{"code-inline":"0.9375em"},fontFamily:{inherit:"inherit"},zIndex:{max:2147483647},lineHeight:{inherit:"inherit"},maxWidth:{"fit-content":"fit-content","7xl":"80rem","screen-2xl":"1536px"},minWidth:{"max-content":"max-content"},spacing:{"(screen-8)":"calc(100vh - 2rem)","(screen-12)":"calc(100vh - 3rem)","(screen-16)":"calc(100vh - 4rem)","(screen-20)":"calc(100vh - 5rem)","(full-12)":"calc(100% - 3rem)"}}},plugins:[require("@tailwindcss/ui"),require("tailwindcss-filters"),require("tailwindcss-truncate-multiline")()]},M=["letter-spacing"],N=a({stylisPlugins:function(e,r,t){var n=t[0];switch(e){case 1:return r+" !important";case 3:return"@font-face"===n||n.startsWith("@")&&n.includes("keyframes")?P(r," !important",""):r;default:return r}},prefix:function(e){return!M.includes(e)}}),q={color:{primary:{base:"#667eea".toString(),text:"#fff".toString(),active:"#5a67d8".toString()}}};exports.MergeOptions=j,exports.ThemeProvider=function(e){var t=e.theme,i=void 0===t?q:t,o=e.importantStyles,a=void 0!==o&&o,s=e.children;return r.createElement(u.ThemeProvider,{theme:w(c({},q),i)},a?r.createElement(n.CacheProvider,{value:N},s):s)},exports.__DEV__=!1,exports.arraysEqual=function(e,r,t){if(void 0===t&&(t=!0),e===r)return!0;if(null==e||null==r)return!1;if(e.length!==r.length)return!1;for(var n=t?e:e.sort(),i=t?r:r.sort(),o=0;o<n.length;o+=1)if(n[o]!==i[o])return!1;return!0},exports.assignRef=S,exports.callAllHandlers=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){r.some((function(r){return r&&r(e),e&&e.defaultPrevented}))}},exports.clamp=function(e,r,t){return void 0===e&&(e=0),void 0===r&&(r=0),void 0===t&&(t=255),Math.min(Math.max(e,r),t)},exports.cleanChildren=function(e){return r.Children.toArray(e).filter((function(e){return r.isValidElement(e)}))},exports.closest=function(e,r){var t=r.reduce((function(r,t){return Math.abs(t-e)<Math.abs(r-e)?t:r}));return[r.indexOf(t),t]},exports.createContext=function(e){void 0===e&&(e={});var t=e.strict,n=void 0===t||t,i=e.errorMessage,o=void 0===i?"useContext must be inside a Provider with a value":i,u=e.name,a=r.createContext(void 0);return a.displayName=u,[a.Provider,function(){var e=r.useContext(a);if(!e&&n)throw new Error(o);return e},a]},exports.decodeHTML=function(e){if(void 0===e&&(e=""),y())return e;var r=document.createElement("textarea");return r.innerHTML=e,r.value},exports.filterObject=function(e,r,t){return void 0===t&&(t=!1),Object.keys(e).filter((function(e){return t?!r.includes(e):r.includes(e)})).reduce((function(r,t){var n;return Object.assign(r,((n={})[t]=e[t],n))}),{})},exports.filterProps=function(e){return s(e)?{}:Object.entries(e).reduce((function(e,r){var t,n=r[0],o=r[1];return i(n)?c({},e,((t={})[n]=o,t)):e}),{})},exports.formatNumber=O,exports.formatPrice=function(e,r){var t=e,n=function(t){var n=Number(t);return f(n)?O(n,c({style:"currency"},r)):e.toString()};if(!Array.isArray(t))return n(t);var i=t.map(Number),o=Math.min.apply(Math,i),u=Math.max.apply(Math,i);return o===u?n(o):n(o)+"–"+n(u)},exports.forwardRefWithAs=function(e){return t.forwardRef(e)},exports.getDecimalPlaces=b,exports.getStylesObject=function(e,r){return r?{}:e},exports.groupBy=function(e,r){return e.reduce((function(e,t){var n;return c({},e,((n={})[t[r]]=(e[t[r]]||[]).concat(t),n))}),{})},exports.inferStylesObjectKeys=function(e){return e},exports.isArray=p,exports.isBoolean=function(e){return"boolean"==typeof e},exports.isEmpty=h,exports.isEmptyArray=v,exports.isEmptyObject=x,exports.isFunction=function(e){return"function"==typeof e},exports.isNullOrUndefined=s,exports.isNumber=f,exports.isObject=d,exports.isPlainObject=m,exports.isSSR=y,exports.isString=l,exports.isValidURL=function(e,r){return void 0===r&&(r=!1),!(!e||h(e)||(!r||!e.startsWith("/"))&&null===function(e){void 0===e&&(e="");try{return new URL(e)}catch(e){return null}}(e))},exports.mapStyles=function(e){return Object.entries(e).reduce((function(e,r){var t;return Object.assign(e,((t={})[r[0]]=n.css(r[1]),t))}),{})},exports.merge=w,exports.mergeRefs=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){r.forEach((function(r){return r&&S(r,e)}))}},exports.noop=function(){},exports.pluralize=function(e,r,t){return 1===e?r:t},exports.replaceAll=P,exports.round=g,exports.roundToStep=function(e,r){var t=b(r);return g(Math.round(e/r)*r,t)},exports.setRef=A,exports.styled=o,exports.tailwindConfig=E,exports.useDebounce=function(e,t,n){void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1});var i=r.useRef();return function(){for(var r=this,o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];i.current&&clearTimeout(i.current);var c=function(){i.current=void 0,n.isImmediate||e.apply(r,u)},s=n.isImmediate&&void 0===i.current;i.current=setTimeout(c,t),s&&e.apply(this,u)}},exports.useTheme=function(){var e=u.useTheme();return w(c({},q),e)};
//# sourceMappingURL=react-sdk-utils.cjs.production.min.js.map

@@ -54,3 +54,4 @@ var tailwind_config = {

'(screen-16)': 'calc(100vh - 4rem)',
'(screen-20)': 'calc(100vh - 5rem)'
'(screen-20)': 'calc(100vh - 5rem)',
'(full-12)': 'calc(100% - 3rem)'
}

@@ -57,0 +58,0 @@ }

{
"name": "@sajari/react-sdk-utils",
"version": "1.3.14",
"version": "1.3.15",
"description": "Shared utils for the Sajari React packages.",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc