@thecb/components 5.6.6 → 5.6.10
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/index.cjs.js +212 -60
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +212 -61
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/dropdown/Dropdown.js +8 -4
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/atoms/layouts/Box.js +8 -2
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/periscope-dashboard-iframe/PeriscopeDashBoardIframe.stories.js +22 -0
- package/src/components/molecules/periscope-dashboard-iframe/PeriscopeDashboardIframe.js +124 -0
- package/src/components/molecules/periscope-dashboard-iframe/PeriscopeDashboardIframe.styled.js +9 -0
- package/src/components/molecules/periscope-dashboard-iframe/index.js +3 -0
- package/src/util/general.js +17 -0
package/dist/index.esm.js
CHANGED
|
@@ -6107,6 +6107,16 @@ var checkDeniedCards = function checkDeniedCards(name) {
|
|
|
6107
6107
|
return "";
|
|
6108
6108
|
}
|
|
6109
6109
|
};
|
|
6110
|
+
/*
|
|
6111
|
+
An optional style for layout atoms that positions the atom completely off screen
|
|
6112
|
+
This will *not* be visible or accessible to sighted users
|
|
6113
|
+
Use to contain text content or a11y interactive content (skip links when not visible)
|
|
6114
|
+
that is only for users of assistive technologies (screen readers)
|
|
6115
|
+
|
|
6116
|
+
Currently implemented on the Box atom via the srOnly prop
|
|
6117
|
+
*/
|
|
6118
|
+
|
|
6119
|
+
var screenReaderOnlyStyle = "\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n";
|
|
6110
6120
|
|
|
6111
6121
|
var general = /*#__PURE__*/Object.freeze({
|
|
6112
6122
|
__proto__: null,
|
|
@@ -6118,7 +6128,8 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6118
6128
|
generateClickHandler: generateClickHandler,
|
|
6119
6129
|
checkCardBrand: checkCardBrand,
|
|
6120
6130
|
displayCardBrand: displayCardBrand,
|
|
6121
|
-
checkDeniedCards: checkDeniedCards
|
|
6131
|
+
checkDeniedCards: checkDeniedCards,
|
|
6132
|
+
screenReaderOnlyStyle: screenReaderOnlyStyle
|
|
6122
6133
|
});
|
|
6123
6134
|
|
|
6124
6135
|
var _excluded$1 = ["themeValues", "weight", "color", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children"];
|
|
@@ -6261,10 +6272,13 @@ var BoxWrapper = styled(function (_ref) {
|
|
|
6261
6272
|
});
|
|
6262
6273
|
/* eslint-enable no-unused-vars */
|
|
6263
6274
|
|
|
6264
|
-
var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "dataQa", "children"];
|
|
6275
|
+
var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
|
|
6265
6276
|
/*
|
|
6266
6277
|
Box component to create generic boxes
|
|
6267
6278
|
Supply padding, border, background, and color values
|
|
6279
|
+
|
|
6280
|
+
srOnly prop enables special screen-reader style that is used to position content
|
|
6281
|
+
completely off screen (only for users of screen readers)
|
|
6268
6282
|
*/
|
|
6269
6283
|
|
|
6270
6284
|
var Box = function Box(_ref) {
|
|
@@ -6301,6 +6315,8 @@ var Box = function Box(_ref) {
|
|
|
6301
6315
|
theme = _ref.theme,
|
|
6302
6316
|
hiddenStyles = _ref.hiddenStyles,
|
|
6303
6317
|
extraStyles = _ref.extraStyles,
|
|
6318
|
+
_ref$srOnly = _ref.srOnly,
|
|
6319
|
+
srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
|
|
6304
6320
|
dataQa = _ref.dataQa,
|
|
6305
6321
|
children = _ref.children,
|
|
6306
6322
|
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
@@ -6327,7 +6343,7 @@ var Box = function Box(_ref) {
|
|
|
6327
6343
|
onClick: onClick,
|
|
6328
6344
|
hiddenStyles: hiddenStyles,
|
|
6329
6345
|
onKeyDown: onKeyDown,
|
|
6330
|
-
extraStyles: extraStyles,
|
|
6346
|
+
extraStyles: srOnly ? "".concat(screenReaderOnlyStyle).concat(extraStyles) : extraStyles,
|
|
6331
6347
|
theme: theme,
|
|
6332
6348
|
textAlign: textAlign,
|
|
6333
6349
|
"data-qa": dataQa,
|
|
@@ -19368,8 +19384,6 @@ var SearchInput = styled.input.withConfig({
|
|
|
19368
19384
|
});
|
|
19369
19385
|
|
|
19370
19386
|
var Dropdown = function Dropdown(_ref9) {
|
|
19371
|
-
var _options$find;
|
|
19372
|
-
|
|
19373
19387
|
var placeholder = _ref9.placeholder,
|
|
19374
19388
|
options = _ref9.options,
|
|
19375
19389
|
value = _ref9.value,
|
|
@@ -19384,7 +19398,9 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19384
19398
|
maxHeight = _ref9.maxHeight,
|
|
19385
19399
|
_ref9$widthFitOptions = _ref9.widthFitOptions,
|
|
19386
19400
|
widthFitOptions = _ref9$widthFitOptions === void 0 ? false : _ref9$widthFitOptions,
|
|
19387
|
-
disabled = _ref9.disabled
|
|
19401
|
+
disabled = _ref9.disabled,
|
|
19402
|
+
_ref9$hasTitles = _ref9.hasTitles,
|
|
19403
|
+
hasTitles = _ref9$hasTitles === void 0 ? false : _ref9$hasTitles;
|
|
19388
19404
|
|
|
19389
19405
|
var _useState = useState(""),
|
|
19390
19406
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19426,6 +19442,14 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19426
19442
|
}));
|
|
19427
19443
|
var dropdownRef = useRef(null);
|
|
19428
19444
|
|
|
19445
|
+
var getSelection = function getSelection() {
|
|
19446
|
+
var _options$find;
|
|
19447
|
+
|
|
19448
|
+
return value ? (_options$find = options.find(function (option) {
|
|
19449
|
+
return option.value === value;
|
|
19450
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.text : placeholder;
|
|
19451
|
+
};
|
|
19452
|
+
|
|
19429
19453
|
var onKeyDown = function onKeyDown(e) {
|
|
19430
19454
|
var key = e.key,
|
|
19431
19455
|
keyCode = e.keyCode;
|
|
@@ -19521,7 +19545,8 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19521
19545
|
width: "100%",
|
|
19522
19546
|
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
19523
19547
|
"aria-expanded": isOpen,
|
|
19524
|
-
extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;"
|
|
19548
|
+
extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
|
|
19549
|
+
title: hasTitles ? getSelection() : null
|
|
19525
19550
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
19526
19551
|
as: "button",
|
|
19527
19552
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
@@ -19545,9 +19570,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19545
19570
|
}) : /*#__PURE__*/React.createElement(Text$1, {
|
|
19546
19571
|
variant: "p",
|
|
19547
19572
|
extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;"
|
|
19548
|
-
},
|
|
19549
|
-
return option.value === value;
|
|
19550
|
-
})) === null || _options$find === void 0 ? void 0 : _options$find.text : placeholder), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
19573
|
+
}, getSelection()), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
19551
19574
|
open: isOpen
|
|
19552
19575
|
}, /*#__PURE__*/React.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React.createElement(DropdownContentWrapper, {
|
|
19553
19576
|
maxHeight: maxHeight,
|
|
@@ -19571,7 +19594,8 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19571
19594
|
selected: choice.value === value,
|
|
19572
19595
|
disabled: disabledValues.includes(choice.value),
|
|
19573
19596
|
"data-qa": choice.text,
|
|
19574
|
-
themeValues: themeValues
|
|
19597
|
+
themeValues: themeValues,
|
|
19598
|
+
title: hasTitles ? choice.text : null
|
|
19575
19599
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
19576
19600
|
variant: "p",
|
|
19577
19601
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
@@ -19676,7 +19700,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19676
19700
|
dropdownMaxHeight = _ref.dropdownMaxHeight,
|
|
19677
19701
|
disabledValues = _ref.disabledValues,
|
|
19678
19702
|
disabled = _ref.disabled,
|
|
19679
|
-
themeValues = _ref.themeValues
|
|
19703
|
+
themeValues = _ref.themeValues,
|
|
19704
|
+
_ref$hasTitles = _ref.hasTitles,
|
|
19705
|
+
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles;
|
|
19680
19706
|
|
|
19681
19707
|
var _useState = useState(false),
|
|
19682
19708
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19716,6 +19742,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19716
19742
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
19717
19743
|
"aria-labelledby": labelTextWhenNoError.replace(/\s+/g, "-"),
|
|
19718
19744
|
maxHeight: dropdownMaxHeight,
|
|
19745
|
+
hasTitles: hasTitles,
|
|
19719
19746
|
placeholder: options[0] ? options[0].text : "",
|
|
19720
19747
|
options: options,
|
|
19721
19748
|
value: field.rawValue,
|
|
@@ -33180,25 +33207,37 @@ const validatorToPredicate = (validatorFn, emptyCase) => (
|
|
|
33180
33207
|
|
|
33181
33208
|
var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
33182
33209
|
|
|
33183
|
-
|
|
33184
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
33185
|
-
}
|
|
33210
|
+
var dayjs_min = {exports: {}};
|
|
33186
33211
|
|
|
33187
|
-
|
|
33212
|
+
(function (module, exports) {
|
|
33188
33213
|
!function(t,e){module.exports=e();}(commonjsGlobal$1,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
|
|
33189
|
-
});
|
|
33214
|
+
}(dayjs_min));
|
|
33215
|
+
|
|
33216
|
+
var dayjs = dayjs_min.exports;
|
|
33217
|
+
|
|
33218
|
+
var customParseFormat$1 = {exports: {}};
|
|
33190
33219
|
|
|
33191
|
-
|
|
33220
|
+
(function (module, exports) {
|
|
33192
33221
|
!function(t,e){module.exports=e();}(commonjsGlobal$1,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
|
|
33193
|
-
});
|
|
33222
|
+
}(customParseFormat$1));
|
|
33223
|
+
|
|
33224
|
+
var customParseFormat = customParseFormat$1.exports;
|
|
33194
33225
|
|
|
33195
|
-
var isSameOrBefore
|
|
33226
|
+
var isSameOrBefore$1 = {exports: {}};
|
|
33227
|
+
|
|
33228
|
+
(function (module, exports) {
|
|
33196
33229
|
!function(e,i){module.exports=i();}(commonjsGlobal$1,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
|
|
33197
|
-
});
|
|
33230
|
+
}(isSameOrBefore$1));
|
|
33231
|
+
|
|
33232
|
+
var isSameOrBefore = isSameOrBefore$1.exports;
|
|
33198
33233
|
|
|
33199
|
-
var isSameOrAfter
|
|
33234
|
+
var isSameOrAfter$1 = {exports: {}};
|
|
33235
|
+
|
|
33236
|
+
(function (module, exports) {
|
|
33200
33237
|
!function(e,t){module.exports=t();}(commonjsGlobal$1,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
|
|
33201
|
-
});
|
|
33238
|
+
}(isSameOrAfter$1));
|
|
33239
|
+
|
|
33240
|
+
var isSameOrAfter = isSameOrAfter$1.exports;
|
|
33202
33241
|
|
|
33203
33242
|
/* eslint-disable no-unused-vars */
|
|
33204
33243
|
|
|
@@ -33208,9 +33247,9 @@ const createValidator = (type, error) => {
|
|
|
33208
33247
|
return validator;
|
|
33209
33248
|
};
|
|
33210
33249
|
|
|
33211
|
-
|
|
33212
|
-
|
|
33213
|
-
|
|
33250
|
+
dayjs.extend(customParseFormat);
|
|
33251
|
+
dayjs.extend(isSameOrBefore);
|
|
33252
|
+
dayjs.extend(isSameOrAfter);
|
|
33214
33253
|
|
|
33215
33254
|
let validatorFns = {};
|
|
33216
33255
|
|
|
@@ -33289,15 +33328,14 @@ const MATCHES_FIELD = "validator/MATCHES_FIELD";
|
|
|
33289
33328
|
const MATCHES_FIELD_ERROR$1 = "error/MATCHES_FIELD";
|
|
33290
33329
|
const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR$1);
|
|
33291
33330
|
validatorFns[MATCHES_FIELD] = (value, args, form) => {
|
|
33292
|
-
|
|
33293
|
-
|
|
33294
|
-
}
|
|
33295
|
-
if (form[args[0]] === undefined) {
|
|
33331
|
+
const dependentField = form[args[0]];
|
|
33332
|
+
if (dependentField === undefined) {
|
|
33296
33333
|
throw new Error(
|
|
33297
33334
|
`${args[0]} was passed to matchesField, but that field does not exist in the form`
|
|
33298
33335
|
);
|
|
33299
33336
|
}
|
|
33300
|
-
|
|
33337
|
+
const dependentFieldValue = dependentField.rawValue;
|
|
33338
|
+
return value === dependentFieldValue;
|
|
33301
33339
|
};
|
|
33302
33340
|
|
|
33303
33341
|
const validateWhenErrorMessage = type =>
|
|
@@ -33440,8 +33478,8 @@ validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
|
|
|
33440
33478
|
"Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
|
|
33441
33479
|
);
|
|
33442
33480
|
}
|
|
33443
|
-
const now =
|
|
33444
|
-
const dateValue =
|
|
33481
|
+
const now = dayjs();
|
|
33482
|
+
const dateValue = dayjs(value, dateFormat);
|
|
33445
33483
|
|
|
33446
33484
|
if (inclusive === true) {
|
|
33447
33485
|
return dateValue.isSameOrBefore(now, unit);
|
|
@@ -33468,8 +33506,8 @@ validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
|
|
|
33468
33506
|
"Date format and unit need to be defined for dateAfterToday, one or both are undefined"
|
|
33469
33507
|
);
|
|
33470
33508
|
}
|
|
33471
|
-
const now =
|
|
33472
|
-
const dateValue =
|
|
33509
|
+
const now = dayjs();
|
|
33510
|
+
const dateValue = dayjs(value, dateFormat);
|
|
33473
33511
|
|
|
33474
33512
|
if (inclusive === true) {
|
|
33475
33513
|
return dateValue.isSameOrAfter(now, unit);
|
|
@@ -33853,7 +33891,7 @@ function get(state, prop) {
|
|
|
33853
33891
|
return value;
|
|
33854
33892
|
}
|
|
33855
33893
|
|
|
33856
|
-
function set(state, prop, value) {
|
|
33894
|
+
function set$1(state, prop, value) {
|
|
33857
33895
|
assertUnrevoked(state);
|
|
33858
33896
|
state.assigned[prop] = true;
|
|
33859
33897
|
|
|
@@ -33904,8 +33942,8 @@ function proxyProperty(draft, prop, enumerable) {
|
|
|
33904
33942
|
return get(this[DRAFT_STATE], prop);
|
|
33905
33943
|
},
|
|
33906
33944
|
|
|
33907
|
-
set: function set$1(value) {
|
|
33908
|
-
set(this[DRAFT_STATE], prop, value);
|
|
33945
|
+
set: function set$1$1(value) {
|
|
33946
|
+
set$1(this[DRAFT_STATE], prop, value);
|
|
33909
33947
|
}
|
|
33910
33948
|
|
|
33911
33949
|
};
|
|
@@ -34086,7 +34124,7 @@ var objectTraps = {
|
|
|
34086
34124
|
return Reflect.ownKeys(source$1(target));
|
|
34087
34125
|
},
|
|
34088
34126
|
|
|
34089
|
-
set: set$1,
|
|
34127
|
+
set: set$1$1,
|
|
34090
34128
|
deleteProperty: deleteProperty,
|
|
34091
34129
|
getOwnPropertyDescriptor: getOwnPropertyDescriptor,
|
|
34092
34130
|
|
|
@@ -34164,7 +34202,7 @@ function get$1(state, prop) {
|
|
|
34164
34202
|
return drafts[prop] = createProxy$1(value, state);
|
|
34165
34203
|
}
|
|
34166
34204
|
|
|
34167
|
-
function set$1(state, prop, value) {
|
|
34205
|
+
function set$1$1(state, prop, value) {
|
|
34168
34206
|
if (!state.modified) {
|
|
34169
34207
|
var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to
|
|
34170
34208
|
// never be undefined, so we can avoid the `in` operator. Lastly, truthy
|
|
@@ -34387,7 +34425,7 @@ var Immer = function Immer(config) {
|
|
|
34387
34425
|
};
|
|
34388
34426
|
|
|
34389
34427
|
Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
34390
|
-
var this$1 = this;
|
|
34428
|
+
var this$1$1 = this;
|
|
34391
34429
|
|
|
34392
34430
|
// curried invocation
|
|
34393
34431
|
if (typeof base === "function" && typeof recipe !== "function") {
|
|
@@ -34395,12 +34433,12 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
|
34395
34433
|
recipe = base;
|
|
34396
34434
|
var self = this;
|
|
34397
34435
|
return function curriedProduce(base) {
|
|
34398
|
-
var this$1 = this;
|
|
34436
|
+
var this$1$1 = this;
|
|
34399
34437
|
if ( base === void 0 ) base = defaultBase;
|
|
34400
34438
|
var args = [], len = arguments.length - 1;
|
|
34401
34439
|
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
|
|
34402
34440
|
|
|
34403
|
-
return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1, draft ].concat( args )); }); // prettier-ignore
|
|
34441
|
+
return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
|
|
34404
34442
|
};
|
|
34405
34443
|
} // prettier-ignore
|
|
34406
34444
|
|
|
@@ -34432,7 +34470,7 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
|
34432
34470
|
if (result instanceof Promise) {
|
|
34433
34471
|
return result.then(function (result) {
|
|
34434
34472
|
scope.usePatches(patchListener);
|
|
34435
|
-
return this$1.processResult(result, scope);
|
|
34473
|
+
return this$1$1.processResult(result, scope);
|
|
34436
34474
|
}, function (error) {
|
|
34437
34475
|
scope.revoke();
|
|
34438
34476
|
throw error;
|
|
@@ -34449,14 +34487,14 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
|
34449
34487
|
};
|
|
34450
34488
|
|
|
34451
34489
|
Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
|
|
34452
|
-
var this$1 = this;
|
|
34490
|
+
var this$1$1 = this;
|
|
34453
34491
|
|
|
34454
34492
|
if (typeof arg1 === "function") {
|
|
34455
34493
|
return function (state) {
|
|
34456
34494
|
var args = [], len = arguments.length - 1;
|
|
34457
34495
|
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
|
|
34458
34496
|
|
|
34459
|
-
return this$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
|
|
34497
|
+
return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
|
|
34460
34498
|
};
|
|
34461
34499
|
} // non-curried form
|
|
34462
34500
|
|
|
@@ -34581,7 +34619,7 @@ Immer.prototype.processResult = function processResult (result, scope) {
|
|
|
34581
34619
|
|
|
34582
34620
|
|
|
34583
34621
|
Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
34584
|
-
var this$1 = this;
|
|
34622
|
+
var this$1$1 = this;
|
|
34585
34623
|
|
|
34586
34624
|
var state = draft[DRAFT_STATE];
|
|
34587
34625
|
|
|
@@ -34615,7 +34653,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
34615
34653
|
var base = state.base;
|
|
34616
34654
|
var copy = state.copy;
|
|
34617
34655
|
each(base, function (prop) {
|
|
34618
|
-
if (!has(copy, prop)) { this$1.onDelete(state, prop); }
|
|
34656
|
+
if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
34619
34657
|
});
|
|
34620
34658
|
}
|
|
34621
34659
|
}
|
|
@@ -34644,7 +34682,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
34644
34682
|
|
|
34645
34683
|
|
|
34646
34684
|
Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
34647
|
-
var this$1 = this;
|
|
34685
|
+
var this$1$1 = this;
|
|
34648
34686
|
|
|
34649
34687
|
var state = root[DRAFT_STATE];
|
|
34650
34688
|
|
|
@@ -34670,7 +34708,7 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
|
34670
34708
|
if (isDraft(value)) {
|
|
34671
34709
|
var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here.
|
|
34672
34710
|
|
|
34673
|
-
value = this$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
|
|
34711
|
+
value = this$1$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
|
|
34674
34712
|
|
|
34675
34713
|
if (isDraft(value)) {
|
|
34676
34714
|
scope.canAutoFreeze = false;
|
|
@@ -34695,8 +34733,8 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
|
34695
34733
|
each(value, finalizeProperty);
|
|
34696
34734
|
}
|
|
34697
34735
|
|
|
34698
|
-
if (isDraftProp && this$1.onAssign) {
|
|
34699
|
-
this$1.onAssign(state, prop, value);
|
|
34736
|
+
if (isDraftProp && this$1$1.onAssign) {
|
|
34737
|
+
this$1$1.onAssign(state, prop, value);
|
|
34700
34738
|
}
|
|
34701
34739
|
};
|
|
34702
34740
|
|
|
@@ -34731,14 +34769,14 @@ var produce = immer.produce;
|
|
|
34731
34769
|
* [nextState, patches, inversePatches] (instead of just the next state)
|
|
34732
34770
|
*/
|
|
34733
34771
|
|
|
34734
|
-
|
|
34772
|
+
immer.produceWithPatches.bind(immer);
|
|
34735
34773
|
/**
|
|
34736
34774
|
* Pass true to automatically freeze all copies created by Immer.
|
|
34737
34775
|
*
|
|
34738
34776
|
* By default, auto-freezing is disabled in production.
|
|
34739
34777
|
*/
|
|
34740
34778
|
|
|
34741
|
-
|
|
34779
|
+
immer.setAutoFreeze.bind(immer);
|
|
34742
34780
|
/**
|
|
34743
34781
|
* Pass true to use the ES2015 `Proxy` class when creating drafts, which is
|
|
34744
34782
|
* always faster than using ES5 proxies.
|
|
@@ -34746,20 +34784,20 @@ var setAutoFreeze = immer.setAutoFreeze.bind(immer);
|
|
|
34746
34784
|
* By default, feature detection is used, so calling this is rarely necessary.
|
|
34747
34785
|
*/
|
|
34748
34786
|
|
|
34749
|
-
|
|
34787
|
+
immer.setUseProxies.bind(immer);
|
|
34750
34788
|
/**
|
|
34751
34789
|
* Apply an array of Immer patches to the first argument.
|
|
34752
34790
|
*
|
|
34753
34791
|
* This function is a producer, which means copy-on-write is in effect.
|
|
34754
34792
|
*/
|
|
34755
34793
|
|
|
34756
|
-
|
|
34794
|
+
immer.applyPatches.bind(immer);
|
|
34757
34795
|
/**
|
|
34758
34796
|
* Create an Immer draft from the given base state, which may be a draft itself.
|
|
34759
34797
|
* The draft can be modified until you finalize it with the `finishDraft` function.
|
|
34760
34798
|
*/
|
|
34761
34799
|
|
|
34762
|
-
|
|
34800
|
+
immer.createDraft.bind(immer);
|
|
34763
34801
|
/**
|
|
34764
34802
|
* Finalize an Immer draft from a `createDraft` call, returning the base state
|
|
34765
34803
|
* (if no changes were made) or a modified copy. The draft must *not* be
|
|
@@ -34769,7 +34807,7 @@ var createDraft = immer.createDraft.bind(immer);
|
|
|
34769
34807
|
* changes that were made.
|
|
34770
34808
|
*/
|
|
34771
34809
|
|
|
34772
|
-
|
|
34810
|
+
immer.finishDraft.bind(immer);
|
|
34773
34811
|
|
|
34774
34812
|
const createInitialState = formConfig => {
|
|
34775
34813
|
let initialForm = {};
|
|
@@ -34794,7 +34832,7 @@ const createInitialState = formConfig => {
|
|
|
34794
34832
|
};
|
|
34795
34833
|
|
|
34796
34834
|
const SET = "field/SET";
|
|
34797
|
-
const set
|
|
34835
|
+
const set = fieldName => value => ({
|
|
34798
34836
|
type: SET,
|
|
34799
34837
|
payload: { fieldName, value }
|
|
34800
34838
|
});
|
|
@@ -34874,7 +34912,7 @@ const createMapDispatchToProps = formConfig => {
|
|
|
34874
34912
|
const keys = Object.keys(formConfig);
|
|
34875
34913
|
for (let fieldName of keys) {
|
|
34876
34914
|
dispatchObj.fields[fieldName] = {
|
|
34877
|
-
set: value => dispatch(set
|
|
34915
|
+
set: value => dispatch(set(fieldName)(value)),
|
|
34878
34916
|
addValidator: validator => dispatch(addValidator(fieldName)(validator))
|
|
34879
34917
|
};
|
|
34880
34918
|
}
|
|
@@ -41427,6 +41465,119 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
41427
41465
|
}))));
|
|
41428
41466
|
};
|
|
41429
41467
|
|
|
41468
|
+
var DashboardIframe = styled.iframe.withConfig({
|
|
41469
|
+
displayName: "PeriscopeDashboardIframestyled__DashboardIframe",
|
|
41470
|
+
componentId: "sc-j0cucj-0"
|
|
41471
|
+
})(["border:none;box-shadow:0 0 5px 0 ", ";display:none;"], ALTO_GREY);
|
|
41472
|
+
|
|
41473
|
+
/**
|
|
41474
|
+
* Component: PeriscopeDashboardIframe
|
|
41475
|
+
*
|
|
41476
|
+
* Used for rendering Citybase's periscope reporting dashboards in iframes.
|
|
41477
|
+
* Receives action props to trigger a request on mount for the iframe's url.
|
|
41478
|
+
* Receives a string prop if/when we receive the url result.
|
|
41479
|
+
* And receives action props to emit errors from failed iframe loading.
|
|
41480
|
+
*
|
|
41481
|
+
* The logic and api client methods to handle requests/response,
|
|
41482
|
+
* store the url, etc. should be provided from the app consuming this library.
|
|
41483
|
+
*
|
|
41484
|
+
* If the url request is pending, render a spinner.
|
|
41485
|
+
* If the url request failed, render a UI error state.
|
|
41486
|
+
**/
|
|
41487
|
+
|
|
41488
|
+
var DASHBOARD_SIZE_MESSAGE_TYPE = "dashboard_resize";
|
|
41489
|
+
var PERISCOPE_ORIGIN = "https://app.periscopedata.com";
|
|
41490
|
+
|
|
41491
|
+
var isValidMessage = function isValidMessage(message) {
|
|
41492
|
+
return message.isTrusted && message.origin === PERISCOPE_ORIGIN && message.data && message.data.event_type === DASHBOARD_SIZE_MESSAGE_TYPE;
|
|
41493
|
+
};
|
|
41494
|
+
|
|
41495
|
+
var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
|
|
41496
|
+
var url = _ref.url,
|
|
41497
|
+
requestDashboardUrl = _ref.requestDashboardUrl,
|
|
41498
|
+
periscopeDataPending = _ref.periscopeDataPending,
|
|
41499
|
+
periscopeDataSuccess = _ref.periscopeDataSuccess,
|
|
41500
|
+
periscopeDataFailure = _ref.periscopeDataFailure,
|
|
41501
|
+
periscopeDataRequestSuccess = _ref.periscopeDataRequestSuccess,
|
|
41502
|
+
periscopeDataRequestFailure = _ref.periscopeDataRequestFailure;
|
|
41503
|
+
|
|
41504
|
+
var _useState = useState(0),
|
|
41505
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41506
|
+
height = _useState2[0],
|
|
41507
|
+
setHeight = _useState2[1];
|
|
41508
|
+
|
|
41509
|
+
var time = {
|
|
41510
|
+
timer: null
|
|
41511
|
+
};
|
|
41512
|
+
useEffect$1(function () {
|
|
41513
|
+
time.timer = setTimeout(function () {
|
|
41514
|
+
periscopeDataRequestFailure();
|
|
41515
|
+
}, 10000);
|
|
41516
|
+
}, []);
|
|
41517
|
+
|
|
41518
|
+
var Dashboard = function Dashboard(height) {
|
|
41519
|
+
return function (url) {
|
|
41520
|
+
return /*#__PURE__*/React.createElement(DashboardIframe, {
|
|
41521
|
+
src: url,
|
|
41522
|
+
width: "100%",
|
|
41523
|
+
height: height,
|
|
41524
|
+
"data-qa": "DashboardIframe",
|
|
41525
|
+
onLoad: function onLoad() {
|
|
41526
|
+
var iframe = document.querySelector("iframe");
|
|
41527
|
+
iframe.style.display = "initial";
|
|
41528
|
+
}
|
|
41529
|
+
});
|
|
41530
|
+
};
|
|
41531
|
+
};
|
|
41532
|
+
|
|
41533
|
+
var validatePeriscope = function validatePeriscope(message) {
|
|
41534
|
+
if (isValidMessage(message)) {
|
|
41535
|
+
setHeight(message.data.dashboard_height + 100);
|
|
41536
|
+
clearTimeout(time.timer);
|
|
41537
|
+
periscopeDataRequestSuccess();
|
|
41538
|
+
}
|
|
41539
|
+
};
|
|
41540
|
+
|
|
41541
|
+
useLayoutEffect(function () {
|
|
41542
|
+
window.addEventListener("message", validatePeriscope);
|
|
41543
|
+
requestDashboardUrl();
|
|
41544
|
+
return function () {
|
|
41545
|
+
return window.removeEventListener("message", validatePeriscope);
|
|
41546
|
+
};
|
|
41547
|
+
}, [requestDashboardUrl]);
|
|
41548
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BoxWithShadow$1, {
|
|
41549
|
+
padding: "0",
|
|
41550
|
+
minWidth: "100%",
|
|
41551
|
+
minHeight: "592px",
|
|
41552
|
+
variant: "baseStandard",
|
|
41553
|
+
background: "#fff",
|
|
41554
|
+
borderRadius: "4px",
|
|
41555
|
+
extraStyles: "display: flex; justify-content: center; align-items: center; flex-direction: column;"
|
|
41556
|
+
}, periscopeDataPending && !periscopeDataSuccess && /*#__PURE__*/React.createElement(Cover, {
|
|
41557
|
+
minHeight: "100%",
|
|
41558
|
+
singleChild: true
|
|
41559
|
+
}, /*#__PURE__*/React.createElement(Center, {
|
|
41560
|
+
intrinsic: true
|
|
41561
|
+
}, /*#__PURE__*/React.createElement(Spinner$2, {
|
|
41562
|
+
size: "100"
|
|
41563
|
+
}))), periscopeDataFailure && !periscopeDataSuccess && /*#__PURE__*/React.createElement(Box, {
|
|
41564
|
+
padding: "64px"
|
|
41565
|
+
}, /*#__PURE__*/React.createElement(Center, {
|
|
41566
|
+
intrinsic: true
|
|
41567
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
41568
|
+
padding: "0 0 2rem"
|
|
41569
|
+
}, /*#__PURE__*/React.createElement(PeriscopeFailedIcon, null)), /*#__PURE__*/React.createElement(Heading$1, {
|
|
41570
|
+
variant: "h3",
|
|
41571
|
+
weight: "700"
|
|
41572
|
+
}, "Something Went Wrong"), /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
41573
|
+
variant: "p",
|
|
41574
|
+
extraStyles: "text-align: center;"
|
|
41575
|
+
}, "There was an issue trying to load the dashboard."), /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
41576
|
+
variant: "p",
|
|
41577
|
+
extraStyles: "text-align: center;"
|
|
41578
|
+
}, "Your organization may not have a dashboard configured."))), !periscopeDataFailure && url && Dashboard(height)(url)));
|
|
41579
|
+
};
|
|
41580
|
+
|
|
41430
41581
|
var pageBackground = "#F6F6F9";
|
|
41431
41582
|
var fallbackValues$H = {
|
|
41432
41583
|
pageBackground: pageBackground
|
|
@@ -41701,5 +41852,5 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
41701
41852
|
theme: themeUtils
|
|
41702
41853
|
});
|
|
41703
41854
|
|
|
41704
|
-
export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, AutopayOnIcon$1 as AutopayOnIcon, BankIcon, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackReversalIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, ErroredIcon, ExternalLink, FailedIcon, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, IconAdd, IconQuitLarge, Imposter, InternalLink, InternalUserInfoForm, Jumbo$1 as Jumbo, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, Loading, LoginForm, Modal$1 as Modal, Module$1 as Module, Motion, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NoCustomerResultsIcon, NoPaymentResultsIcon, NotFoundIcon, Obligation, iconsMap as ObligationIcons, Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentIcon, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PendingIcon, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioSection$1 as RadioSection, Reel, RefundIcon, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess, RoutingNumberImage, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, Switcher, TabSidebar$1 as TabSidebar, TableListItem, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletIcon$1 as WalletIcon, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, cardRegistry, index$4 as constants, createPartialAmountFormState, index$5 as util, withWindowSize };
|
|
41855
|
+
export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, AutopayOnIcon$1 as AutopayOnIcon, BankIcon, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackReversalIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, ErroredIcon, ExternalLink, FailedIcon, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, IconAdd, IconQuitLarge, Imposter, InternalLink, InternalUserInfoForm, Jumbo$1 as Jumbo, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, Loading, LoginForm, Modal$1 as Modal, Module$1 as Module, Motion, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NoCustomerResultsIcon, NoPaymentResultsIcon, NotFoundIcon, Obligation, iconsMap as ObligationIcons, Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentIcon, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioSection$1 as RadioSection, Reel, RefundIcon, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess, RoutingNumberImage, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, Switcher, TabSidebar$1 as TabSidebar, TableListItem, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletIcon$1 as WalletIcon, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, cardRegistry, index$4 as constants, createPartialAmountFormState, index$5 as util, withWindowSize };
|
|
41705
41856
|
//# sourceMappingURL=index.esm.js.map
|