-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-config-js-f9609243acbac5caa9ff.js
2 lines (2 loc) · 10.9 KB
/
component---src-pages-config-js-f9609243acbac5caa9ff.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{"7aN0":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n("q1tI"),r=n.n(a).a.createContext({})},NxeI:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var a=n("q1tI"),r=n.n(a),o=n("vOnD"),c=n("+Wdg"),i=n("otPn"),l=n("T1Te"),u=n("XDYV"),s=n("7aN0"),d=n("cVt8"),b=n("/Rk8"),f=Object(o.css)(["&:hover{"," "," ",";}"],(function(e){return e.theme.tab.hover.background&&Object(o.css)(["background:",";"],Object(d.c)(e.theme.tab.hover.background,e.theme))}),(function(e){return e.theme.tab.hover.color&&Object(o.css)(["color:",";"],Object(d.c)(e.theme.tab.hover.color,e.theme))}),(function(e){return e.theme.tab.hover.extend})),v=o.default.div.withConfig({displayName:"StyledTab",componentId:"sc-1nnwnsb-0"})([""," "," "," ",""],b.g,(function(e){return!e.plain&&!e.disabled&&e.theme.tab.hover&&f}),(function(e){return e.disabled&&e.theme.tab.disabled}),(function(e){return e.theme.tab.extend}));function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}v.defaultProps={},Object.setPrototypeOf(v.defaultProps,c.a);var m=Object(a.forwardRef)((function(e,t){e.active;var n=e.disabled,b=e.children,f=e.icon,m=e.plain,h=e.title,O=e.onMouseOver,g=e.onMouseOut,y=e.reverse,j=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,["active","disabled","children","icon","plain","title","onMouseOver","onMouseOut","reverse"]),x=Object(a.useContext)(s.a),E=x.active,C=x.activeIndex,w=x.onActivate,k=x.setActiveContent,P=x.setActiveTitle,T=Object(a.useContext)(o.ThemeContext)||c.a.theme,I=Object(a.useState)(void 0),S=I[0],A=I[1],z=Object(a.useState)(void 0),N=z[0],D=z[1],F=h,q={};Object(a.useEffect)((function(){E&&(k(b),P("string"==typeof h?h:C+1))}),[E,C,b,k,P,h]);if(E&&n&&console.warn("Warning: Tab props 'active' and 'disabled' have both been set to TRUE on the same Tab resulting in an interesting Tab state. Is this your intent?"),!m){if(F="string"!=typeof h?h:E?r.a.createElement(u.a,T.tab.active,h):n&&T.tab.disabled?r.a.createElement(u.a,T.tab.disabled,h):r.a.createElement(u.a,{color:S?T.tab.hover.color:T.tab.color},h),T.tab.border){var R=T.tab.border.color||T.global.control.border.color;E?R=T.tab.border.active.color||R:n&&T.tab.border.disabled?R=T.tab.border.disabled.color||R:S&&(R=T.tab.border.hover.color||R),R=Object(d.c)(R,T),q.border={side:T.tab.border.side,size:T.tab.border.size,color:R}}q.background=E&&T.tab.active.background||T.tab.background,q.pad=T.tab.pad,q.margin=T.tab.margin}var V,J;f&&(J=f,V=E?r.a.cloneElement(J,p({},T.tab.active)):n?r.a.cloneElement(J,p({},T.tab.disabled)):r.a.cloneElement(J,{color:S?T.tab.hover.color:T.tab.color}));var M,W=y?F:V,B=y?V:F;return W&&B&&(M={direction:"row",align:"center",justify:"center",gap:"small"}),r.a.createElement(l.a,p({ref:t,plain:!0,role:"tab","aria-selected":E,"aria-expanded":E,disabled:n},j,{onClick:function(e){e&&e.preventDefault(),w()},onMouseOver:function(e){A(!0),O&&O(e)},onMouseOut:function(e){A(void 0),g&&g(e)},onFocus:function(){D(!0),O&&O()},onBlur:function(){D(void 0),g&&g()},style:N&&{zIndex:1}}),r.a.createElement(v,p({as:i.a,disabled:n,plain:m},M,q),W,B))}));m.displayName="Tab",m.defaultProps={},Object.setPrototypeOf(m.defaultProps,c.a);var h=m},VwWJ:function(e,t,n){"use strict";var a=n("o0o1"),r=n.n(a),o=(n("ls82"),n("HaE+")),c=n("q1tI"),i=n.n(c),l=n("evJi"),u=n("ebn3"),s=n("/Q2I"),d=n("4416"),b=n("XDYV"),f=n("463D"),v=n("otPn"),p=n("ZmBq"),m=n("oro2"),h=n("NxeI"),O=n("LXcg"),g=n("UEoS");t.a=function(e){var t=e.datasource,n=e.hideCRUDForm,a=e.suffix,y=void 0===a?"":a,j=e.objectClass,x=e.columns,E=e.fetchData,C=e.afterAction,w=Object(c.useState)({}),k=w[0],P=w[1],T=Object(c.useState)(!1),I=T[0],S=T[1],A=Object(c.useState)("read"),z=A[0],N=A[1],D=Object(c.useState)(t||[]),F=D[0],q=D[1],R=Object(c.useState)([]),V=R[0],J=R[1],M=(i.a.useContext(d.a),Object(c.useCallback)(Object(o.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=E,!e.t0){e.next=7;break}return e.t1=q,e.next=5,Object(O.a)(E.action,E.params);case 5:e.t2=e.sent,e.t0=(0,e.t1)(e.t2);case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)}))),[E]));return Object(c.useEffect)((function(){t?q(t):M()}),[M,t]),Object(c.useEffect)((function(){var e=x.map((function(e){return{property:e.property,header:i.a.createElement(b.a,null," ",e.headerText),primary:e.primary,render:e.render}}));!n&&e.push({property:"objectId",header:i.a.createElement(f.a,{onClick:function(){P({}),N("create"),S(!0)}},"Add ",j),render:function(e){return i.a.createElement(i.a.Fragment,null,i.a.createElement(l.a,{onClick:function(){P(e),N("update"),S(!0)},style:{cursor:"pointer"}}),i.a.createElement(u.a,{onClick:function(){P(e),N("delete"),S(!0)},style:{cursor:"pointer"}}))}}),J(e)}),[n,x]),i.a.createElement(i.a.Fragment,null,i.a.createElement(v.a,null,F.length," ",j,i.a.createElement(p.a,{columns:V,data:F.map((function(e){return e.toJSON()}))})),I&&i.a.createElement(s.a,{full:!0,onClose:function(){return S(!1)}},i.a.createElement(m.a,null,i.a.createElement(h.a,{title:"Information"},i.a.createElement(g.a,{formConfig:{config:x},mode:z,model:k,onClick:function(e,t){Object(O.f)(j,t,e,y),setTimeout((function(){M(),S(!1),C&&C()}),1e3)}})))))}},kQFk:function(e,t,n){"use strict";n.r(t);var a=n("q1tI"),r=n.n(a),o=(n("VwWJ"),n("xtVq")),c=n("otPn"),i=n("xHGL"),l=n("T1Te"),u=n("LXcg"),s=n("zpb6");t.default=function(){var e=r.a.useContext(o.a),t=Object(a.useState)({}),n=t[0],d=t[1];Object(a.useEffect)((function(){d(e&&e.config)}),[e]);return r.a.createElement(r.a.Fragment,null,e&&[{name:"Post Template",key:"templateConfig",description:"This is the template for your post. Set it up so it will be auto filled everytime you post to your social media"}].map((function(e,t){return r.a.createElement(c.a,{gap:"small",direction:"column"},e.name,e.description,r.a.createElement(i.a,{rows:"8",size:"xlarge",value:n&&n[e.key],onChange:function(t){var a;d(Object.assign({},n,((a={})[e.key]=t.target.value,a)))}}),r.a.createElement(l.a,{label:"Update",primary:!0,onClick:function(){var t;Object(u.C)((t={},t[e.key]=n[e.key],t)).then((function(){return Object(s.a)("/dashboard")}))}}))})))}},oro2:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var a,r=n("q1tI"),o=n.n(r),c=n("vOnD"),i=n("+Wdg"),l=n("otPn"),u=n("7aN0"),s=n("/Rk8"),d=c.default.div.withConfig({displayName:"StyledTabs__StyledTabsHeader",componentId:"a4fwxl-0"})(["",";"],(function(e){return e.theme.tabs.header.extend}));d.defaultProps={},Object.setPrototypeOf(d.defaultProps,i.a);var b=((a={})[!0]="1 1",a[!1]="0 0",a.grow="1 0",a.shrink="0 1",a),f=Object(c.css)(["flex:",";"],(function(e){return b[e.flex]+(!0!==e.flex?" auto":"")})),v=c.default.div.withConfig({displayName:"StyledTabs__StyledTabPanel",componentId:"a4fwxl-1"})(["min-height:0;"," ",";"],(function(e){return e.flex&&f}),(function(e){return e.theme.tabs.panel.extend}));v.defaultProps={},Object.setPrototypeOf(v.defaultProps,i.a);var p=c.default.div.withConfig({displayName:"StyledTabs",componentId:"a4fwxl-2"})([""," ",";"],s.g,(function(e){return e.theme.tabs.extend}));p.defaultProps={},Object.setPrototypeOf(p.defaultProps,i.a);var m=n("cVt8");function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var O=Object(r.forwardRef)((function(e,t){var n=e.alignControls,a=e.children,s=e.flex,b=e.justify,f=void 0===b?"center":b,O=e.messages,g=void 0===O?{tabContents:"Tab Contents"}:O,y=e.responsive,j=void 0===y||y,x=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,["alignControls","children","flex","justify","messages","responsive"]),E=Object(r.useContext)(c.ThemeContext)||i.a.theme,C=x.activeIndex,w=x.onActive,k=Object(r.useState)(x.activeIndex||0),P=k[0],T=k[1],I=Object(r.useState)(),S=I[0],A=I[1],z=Object(r.useState)(),N=z[0],D=z[1];P!==C&&void 0!==C&&T(C);delete x.activeIndex,delete x.onActive;var F=o.a.Children.map(a,(function(e,t){return o.a.createElement(u.a.Provider,{value:{activeIndex:P,active:P===t,onActivate:function(){return function(e){void 0===C&&T(e),w&&w(e)}(t)},setActiveContent:A,setActiveTitle:D}},e?o.a.cloneElement(e,{active:P===t}):e)})),q={};if(E.tabs.header&&E.tabs.header.border){var R=E.tabs.header.border.color||E.global.control.border.color;R=Object(m.c)(R,E),q.border={side:E.tabs.header.border.side,size:E.tabs.header.border.size,style:E.tabs.header.border.style,color:R}}var V=(N||"")+" "+g.tabContents;return o.a.createElement(p,h({ref:t,as:l.a,role:"tablist",flex:s,responsive:j},x,{background:E.tabs.background}),o.a.createElement(d,h({as:l.a,direction:"row",justify:f,alignSelf:n,flex:!1,wrap:!0,background:E.tabs.header.background,gap:E.tabs.gap},q),F),o.a.createElement(v,{flex:s,"aria-label":V,role:"tabpanel"},S))}));O.displayName="Tabs";var g=O},xHGL:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n("q1tI"),r=n.n(a),o=n("y90F"),c=n("4LIN"),i=n("vOnD"),l=n("/Rk8"),u=n("+Wdg"),s=Object(i.css)(["outline:none;border:none;width:100%;-webkit-appearance:none;"]),d=i.default.textarea.withConfig({displayName:"StyledTextArea",componentId:"sc-17i3mwp-0"})([""," "," "," "," "," ",";"],l.i,(function(e){return void 0!==e.resize&&("horizontal"===(t=e.resize)?"resize: horizontal;":"vertical"===t?"resize: vertical;":t?"resize: both;":"resize: none;");var t}),(function(e){return e.fillArg&&"height: 100%;"}),(function(e){return e.plain&&s}),(function(e){return e.disabled&&Object(l.c)(e.theme.textArea.disabled&&e.theme.textArea.disabled.opacity)}),(function(e){return e.theme.textArea&&e.theme.textArea.extend}));function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}d.defaultProps={},Object.setPrototypeOf(d.defaultProps,u.a);var f=Object(a.forwardRef)((function(e,t){var n=e.a11yTitle,i=e.fill,l=e.name,u=e.onBlur,s=e.onChange,f=e.onFocus,v=e.onKeyDown,p=e.value,m=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,["a11yTitle","fill","name","onBlur","onChange","onFocus","onKeyDown","value"]),h=Object(a.useContext)(o.a).useFormInput(l,p),O=h[0],g=h[1],y=Object(a.useState)(),j=y[0],x=y[1];return r.a.createElement(c.a,{onEsc:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},onKeyDown:v},r.a.createElement(d,b({"aria-label":n,ref:t,name:l,fillArg:i,focus:j,value:O},m,{onFocus:function(e){x(!0),f&&f(e)},onBlur:function(e){x(!1),u&&u(e)},onChange:function(e){g(e.target.value),s&&s(e)}})))}));f.displayName="TextArea";var v=f}}]);
//# sourceMappingURL=component---src-pages-config-js-f9609243acbac5caa9ff.js.map