@front10/container-elements
Advanced tools
Comparing version 0.25.0 to 0.76.1-alpha.0
@@ -12,2 +12,35 @@ 'use strict'; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var defaultStyles = {}; | ||
@@ -22,21 +55,16 @@ function withContainer(WrappedComponent, baseStyles) { | ||
var ComponentWithTheme = function ComponentWithTheme(props) { | ||
var context = React.useContext(utils.Context); | ||
var _props$translate = props.translate, | ||
translate = _props$translate === void 0 ? context.translate : _props$translate, | ||
_props$direction = props.direction, | ||
direction = _props$direction === void 0 ? context.direction : _props$direction, | ||
_props$localizationDa = props.localizationData, | ||
localizationData = _props$localizationDa === void 0 ? context.localizationData : _props$localizationDa, | ||
_props$isIFrame = props.isIFrame, | ||
isIFrame = _props$isIFrame === void 0 ? context.isIFrame : _props$isIFrame; | ||
var ComponentWithTheme = function ComponentWithTheme(_ref) { | ||
var _ref$styles = _ref.styles, | ||
styles = _ref$styles === void 0 ? defaultStyles : _ref$styles, | ||
props = _objectWithoutPropertiesLoose(_ref, ["styles"]); | ||
return React.createElement(baseElements.ThemeProvider, { | ||
theme: baseStyles | ||
}, React.createElement(baseElements.ThemeProvider, { | ||
theme: props.styles | ||
theme: styles | ||
}, React.createElement(utils.ContextProvider, { | ||
translate: translate, | ||
direction: direction, | ||
localizationData: localizationData, | ||
isIFrame: isIFrame | ||
translate: props.translate, | ||
direction: props.direction, | ||
localizationData: props.localizationData, | ||
isIFrame: props.isIFrame | ||
}, React.createElement(WrappedComponent, Object.assign({}, props))))); | ||
@@ -49,20 +77,2 @@ }; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function FollowUsIcon(_ref) { | ||
@@ -75,3 +85,8 @@ var followUsIconUrl = _ref.followUsIconUrl; | ||
src: followUsIconUrl, | ||
alt: "Follow Us Icon" | ||
alt: "Follow Us Icon", | ||
style: { | ||
marginRight: "5px", | ||
width: "14px", | ||
height: "14px" | ||
} | ||
}); | ||
@@ -131,3 +146,3 @@ } | ||
variant: "layout.footer" | ||
}, React.createElement(baseElements.Inline, { | ||
}, (showDisclaimer || showSeeMore) && React.createElement(baseElements.Inline, { | ||
gap: (_theme$layout$disclai = (_theme$layout2 = theme.layout) === null || _theme$layout2 === void 0 ? void 0 : (_theme$layout2$discla = _theme$layout2.disclaimerSection) === null || _theme$layout2$discla === void 0 ? void 0 : _theme$layout2$discla.gap) !== null && _theme$layout$disclai !== void 0 ? _theme$layout$disclai : 1, | ||
@@ -134,0 +149,0 @@ align: "space-between", |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),o=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@front10/base-elements"),n=require("@front10/utils"),r={};function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e}).apply(this,arguments)}function l(e){var t=e.followUsIconUrl;return t?o.createElement(a.Image,{variant:"layout.followUsIcon",src:t,alt:"Follow Us Icon"}):o.createElement("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"#707070",style:{marginRight:"5px"}},o.createElement("path",{d:"M17.1,1H6.9C3.7,1,1,3.7,1,6.9v10.1C1,20.3,3.7,23,6.9,23h10.1c3.3,0,5.9-2.7,5.9-5.9V6.9C23,3.7,20.3,1,17.1,1z\n M21.5,17.1c0,2.4-2,4.4-4.4,4.4H6.9c-2.4,0-4.4-2-4.4-4.4V6.9c0-2.4,2-4.4,4.4-4.4h10.3c2.4,0,4.4,2,4.4,4.4V17.1z"}),o.createElement("path",{d:"M16.9,11.2c-0.2-1.1-0.6-2-1.4-2.8c-0.8-0.8-1.7-1.2-2.8-1.4c-0.5-0.1-1-0.1-1.4,0C10,7.3,8.9,8,8.1,9S7,11.4,7.2,12.7\n C7.4,14,8,15.1,9.1,15.9c0.9,0.6,1.9,1,2.9,1c0.2,0,0.5,0,0.7-0.1c1.3-0.2,2.5-0.9,3.2-1.9C16.8,13.8,17.1,12.5,16.9,11.2z\n M12.6,15.4c-0.9,0.1-1.8-0.1-2.6-0.6c-0.7-0.6-1.2-1.4-1.4-2.3c-0.1-0.9,0.1-1.8,0.6-2.6c0.6-0.7,1.4-1.2,2.3-1.4\n c0.2,0,0.3,0,0.5,0s0.3,0,0.5,0c1.5,0.2,2.7,1.4,2.9,2.9C15.8,13.3,14.5,15.1,12.6,15.4z"}),o.createElement("path",{d:"M18.4,5.6c-0.2-0.2-0.4-0.3-0.6-0.3s-0.5,0.1-0.6,0.3c-0.2,0.2-0.3,0.4-0.3,0.6s0.1,0.5,0.3,0.6c0.2,0.2,0.4,0.3,0.6,0.3\n s0.5-0.1,0.6-0.3c0.2-0.2,0.3-0.4,0.3-0.6C18.7,5.9,18.6,5.7,18.4,5.6z"}))}exports.ContainerFooter=function(e){var o,n,r,c,s,m,d,v=e.showVendorLink,u=e.showSeeMore,f=e.showDisclaimer,w=e.disclaimer,h=e.seeMoreLink,p=e.seeMoreText,x=e.vendorLink,y=e.showFollowUsButton,k=e.followUsButtonLink,g=void 0===k?"#":k,E=e.followUsButtonText,C=void 0===E?"":E,I=e.showWaterMark,M=void 0===I||I,U=e.watermarkText,L=void 0===U?"":U,b=e.watermarkLink,z=void 0===b?"#":b,F=e.followUsIconUrl,S=void 0===F?void 0:F,T=e.showFollowUsIcon,N=void 0===T||T,j=a.useTheme().theme;return t.createElement(a.Stack,{gap:null!==(o=null===(n=j.layout)||void 0===n||null===(r=n.footer)||void 0===r?void 0:r.gap)&&void 0!==o?o:2,align:"center",className:"wx-footer",variant:"layout.footer"},t.createElement(a.Inline,{gap:null!==(c=null===(s=j.layout)||void 0===s||null===(m=s.disclaimerSection)||void 0===m?void 0:m.gap)&&void 0!==c?c:1,align:"space-between",variant:"layout.disclaimerSection",sx:{pl:2,pr:2,width:u?"100%":void 0,alignItems:"baseline"}},f&&t.createElement(a.Text,{dangerouslySetInnerHTML:{__html:w||""},variant:"fontSize7",className:"wx-disclaimer",sx:i({color:"softColor"},null===(d=j.layout)||void 0===d?void 0:d.disclaimer)}),u&&t.createElement(a.Link,{href:h,variant:"layout.seeMoreLink",className:"wx-see-more"},p)),v&&t.createElement(a.VendorLink,Object.assign({variant:"vendorLink"},x)),y&&t.createElement(a.Link,{variant:"layout.followUs",href:g,target:"_blank",className:"wx-follow-us-link"},N&&t.createElement(l,{followUsIconUrl:S}),C),M&&t.createElement(a.Link,{variant:"layout.waterMark",href:z,className:"wx-watermark",sx:function(e){return{fontFamily:e.text.fontSize3["font-family"]}}},L))},exports.withContainer=function(e,o){void 0===o&&(o=r);var i=function(r){var i=t.useContext(n.Context),l=r.translate,c=r.direction,s=r.localizationData,m=r.isIFrame;return t.createElement(a.ThemeProvider,{theme:o},t.createElement(a.ThemeProvider,{theme:r.styles},t.createElement(n.ContextProvider,{translate:void 0===l?i.translate:l,direction:void 0===c?i.direction:c,localizationData:void 0===s?i.localizationData:s,isIFrame:void 0===m?i.isIFrame:m},t.createElement(e,Object.assign({},r)))))};return i.displayName="withContainer("+(e.displayName||e.name||"Component")+")",i}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,o=require("@front10/base-elements"),r=require("@front10/utils");function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var l={};function i(e){var t=e.followUsIconUrl;return t?n.createElement(o.Image,{variant:"layout.followUsIcon",src:t,alt:"Follow Us Icon",style:{marginRight:"5px",width:"14px",height:"14px"}}):n.createElement("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"#707070",style:{marginRight:"5px"}},n.createElement("path",{d:"M17.1,1H6.9C3.7,1,1,3.7,1,6.9v10.1C1,20.3,3.7,23,6.9,23h10.1c3.3,0,5.9-2.7,5.9-5.9V6.9C23,3.7,20.3,1,17.1,1z\n M21.5,17.1c0,2.4-2,4.4-4.4,4.4H6.9c-2.4,0-4.4-2-4.4-4.4V6.9c0-2.4,2-4.4,4.4-4.4h10.3c2.4,0,4.4,2,4.4,4.4V17.1z"}),n.createElement("path",{d:"M16.9,11.2c-0.2-1.1-0.6-2-1.4-2.8c-0.8-0.8-1.7-1.2-2.8-1.4c-0.5-0.1-1-0.1-1.4,0C10,7.3,8.9,8,8.1,9S7,11.4,7.2,12.7\n C7.4,14,8,15.1,9.1,15.9c0.9,0.6,1.9,1,2.9,1c0.2,0,0.5,0,0.7-0.1c1.3-0.2,2.5-0.9,3.2-1.9C16.8,13.8,17.1,12.5,16.9,11.2z\n M12.6,15.4c-0.9,0.1-1.8-0.1-2.6-0.6c-0.7-0.6-1.2-1.4-1.4-2.3c-0.1-0.9,0.1-1.8,0.6-2.6c0.6-0.7,1.4-1.2,2.3-1.4\n c0.2,0,0.3,0,0.5,0s0.3,0,0.5,0c1.5,0.2,2.7,1.4,2.9,2.9C15.8,13.3,14.5,15.1,12.6,15.4z"}),n.createElement("path",{d:"M18.4,5.6c-0.2-0.2-0.4-0.3-0.6-0.3s-0.5,0.1-0.6,0.3c-0.2,0.2-0.3,0.4-0.3,0.6s0.1,0.5,0.3,0.6c0.2,0.2,0.4,0.3,0.6,0.3\n s0.5-0.1,0.6-0.3c0.2-0.2,0.3-0.4,0.3-0.6C18.7,5.9,18.6,5.7,18.4,5.6z"}))}exports.ContainerFooter=function(e){var n,r,l,c,s,m,d,u=e.showVendorLink,v=e.showSeeMore,f=e.showDisclaimer,h=e.disclaimer,w=e.seeMoreLink,p=e.seeMoreText,y=e.vendorLink,x=e.showFollowUsButton,g=e.followUsButtonLink,k=void 0===g?"#":g,E=e.followUsButtonText,C=void 0===E?"":E,M=e.showWaterMark,U=void 0===M||M,I=e.watermarkText,L=void 0===I?"":I,b=e.watermarkLink,z=void 0===b?"#":b,O=e.followUsIconUrl,S=void 0===O?void 0:O,T=e.showFollowUsIcon,j=void 0===T||T,F=o.useTheme().theme;return t.createElement(o.Stack,{gap:null!==(n=null===(r=F.layout)||void 0===r||null===(l=r.footer)||void 0===l?void 0:l.gap)&&void 0!==n?n:2,align:"center",className:"wx-footer",variant:"layout.footer"},(f||v)&&t.createElement(o.Inline,{gap:null!==(c=null===(s=F.layout)||void 0===s||null===(m=s.disclaimerSection)||void 0===m?void 0:m.gap)&&void 0!==c?c:1,align:"space-between",variant:"layout.disclaimerSection",sx:{pl:2,pr:2,width:v?"100%":void 0,alignItems:"baseline"}},f&&t.createElement(o.Text,{dangerouslySetInnerHTML:{__html:h||""},variant:"fontSize7",className:"wx-disclaimer",sx:a({color:"softColor"},null===(d=F.layout)||void 0===d?void 0:d.disclaimer)}),v&&t.createElement(o.Link,{href:w,variant:"layout.seeMoreLink",className:"wx-see-more"},p)),u&&t.createElement(o.VendorLink,Object.assign({variant:"vendorLink"},y)),x&&t.createElement(o.Link,{variant:"layout.followUs",href:k,target:"_blank",className:"wx-follow-us-link"},j&&t.createElement(i,{followUsIconUrl:S}),C),U&&t.createElement(o.Link,{variant:"layout.waterMark",href:z,className:"wx-watermark",sx:function(e){return{fontFamily:e.text.fontSize3["font-family"]}}},L))},exports.withContainer=function(e,n){void 0===n&&(n=l);var a=function(a){var i=a.styles,c=void 0===i?l:i,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(n=a[o])>=0||(r[n]=e[n]);return r}(a,["styles"]);return t.createElement(o.ThemeProvider,{theme:n},t.createElement(o.ThemeProvider,{theme:c},t.createElement(r.ContextProvider,{translate:s.translate,direction:s.direction,localizationData:s.localizationData,isIFrame:s.isIFrame},t.createElement(e,Object.assign({},s)))))};return a.displayName="withContainer("+(e.displayName||e.name||"Component")+")",a}; | ||
//# sourceMappingURL=container-elements.cjs.production.min.js.map |
@@ -1,5 +0,38 @@ | ||
import React__default, { useContext, createElement } from 'react'; | ||
import React__default, { createElement } from 'react'; | ||
import { ThemeProvider, Image, useTheme, Stack, Inline, Text, Link, VendorLink } from '@front10/base-elements'; | ||
import { Context, ContextProvider } from '@front10/utils'; | ||
import { ContextProvider } from '@front10/utils'; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var defaultStyles = {}; | ||
@@ -14,21 +47,16 @@ function withContainer(WrappedComponent, baseStyles) { | ||
var ComponentWithTheme = function ComponentWithTheme(props) { | ||
var context = useContext(Context); | ||
var _props$translate = props.translate, | ||
translate = _props$translate === void 0 ? context.translate : _props$translate, | ||
_props$direction = props.direction, | ||
direction = _props$direction === void 0 ? context.direction : _props$direction, | ||
_props$localizationDa = props.localizationData, | ||
localizationData = _props$localizationDa === void 0 ? context.localizationData : _props$localizationDa, | ||
_props$isIFrame = props.isIFrame, | ||
isIFrame = _props$isIFrame === void 0 ? context.isIFrame : _props$isIFrame; | ||
var ComponentWithTheme = function ComponentWithTheme(_ref) { | ||
var _ref$styles = _ref.styles, | ||
styles = _ref$styles === void 0 ? defaultStyles : _ref$styles, | ||
props = _objectWithoutPropertiesLoose(_ref, ["styles"]); | ||
return createElement(ThemeProvider, { | ||
theme: baseStyles | ||
}, createElement(ThemeProvider, { | ||
theme: props.styles | ||
theme: styles | ||
}, createElement(ContextProvider, { | ||
translate: translate, | ||
direction: direction, | ||
localizationData: localizationData, | ||
isIFrame: isIFrame | ||
translate: props.translate, | ||
direction: props.direction, | ||
localizationData: props.localizationData, | ||
isIFrame: props.isIFrame | ||
}, createElement(WrappedComponent, Object.assign({}, props))))); | ||
@@ -41,20 +69,2 @@ }; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function FollowUsIcon(_ref) { | ||
@@ -67,3 +77,8 @@ var followUsIconUrl = _ref.followUsIconUrl; | ||
src: followUsIconUrl, | ||
alt: "Follow Us Icon" | ||
alt: "Follow Us Icon", | ||
style: { | ||
marginRight: "5px", | ||
width: "14px", | ||
height: "14px" | ||
} | ||
}); | ||
@@ -123,3 +138,3 @@ } | ||
variant: "layout.footer" | ||
}, createElement(Inline, { | ||
}, (showDisclaimer || showSeeMore) && createElement(Inline, { | ||
gap: (_theme$layout$disclai = (_theme$layout2 = theme.layout) === null || _theme$layout2 === void 0 ? void 0 : (_theme$layout2$discla = _theme$layout2.disclaimerSection) === null || _theme$layout2$discla === void 0 ? void 0 : _theme$layout2$discla.gap) !== null && _theme$layout$disclai !== void 0 ? _theme$layout$disclai : 1, | ||
@@ -126,0 +141,0 @@ align: "space-between", |
{ | ||
"version": "0.25.0", | ||
"version": "0.76.1-alpha.0", | ||
"license": "", | ||
@@ -38,6 +38,6 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@front10/base-elements": "^0.25.0", | ||
"@front10/utils": "^0.25.0" | ||
"@front10/base-elements": "^0.76.1-alpha.0", | ||
"@front10/utils": "^0.76.1-alpha.0" | ||
}, | ||
"gitHead": "384486063a8b9c445fef2af119c58f2e37483c82" | ||
"gitHead": "bd89ef185f5345525bf95ecb9d2bc3858aa976ad" | ||
} |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
584
57562
+ Added@front10/base-elements@0.76.2(transitive)
+ Added@front10/utils@0.76.2(transitive)
+ Addedreact-query@2.26.4(transitive)
- Removed@front10/base-elements@0.25.0(transitive)
- Removed@front10/utils@0.25.0(transitive)