tocco-widget-showcase 3.9.2 → 3.9.4
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/changelog.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
3.9.4
|
|
2
|
+
- split styling of blocking display for admin and widget
|
|
3
|
+
- fix multivalue label text overflow
|
|
4
|
+
|
|
5
|
+
3.9.3
|
|
6
|
+
- add readonly terms config and use pristine value change for placeholders
|
|
7
|
+
- handle immutable prop in TermsEdit
|
|
8
|
+
- check for writable paths in form instead of actions
|
|
9
|
+
- only set form builder readonly if mode is not create
|
|
10
|
+
|
|
1
11
|
3.9.2
|
|
2
12
|
- split toaster into widget and admin components
|
|
3
13
|
- adjust height of evaluation tree table to scale depending on available viewport height
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktocco_widget_showcase=self.webpackChunktocco_widget_showcase||[]).push([[675],{94675:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ke});var i=n(70340),s=n(75508),o=n(16973),a=(n(45697),n(1024)),c=n(12938),r=n(45693);const d=n.p+"imgs/tocco-circle.7ab925bf473f813493f00f069ed9746e.svg";var l=n(47874),g=n(15861),u=n(93433),h=n(29439),p=n(64687),w=n.n(p),f=n(77017),m=n(4942),x=n(28002),y=n(15019),j="widget-container",b="widget";function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,m.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C,S=function(){return document.getElementById(j)},k=function(){var e=(0,g.Z)(w().mark((function e(t,n,i,s,o){var a,c,r,d,l,g,u,h;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.packageName,c=i.appName,r=i.locale,d=i.config,l=x.Z.getBackendUrl(),e.next=4,y.Z.loadScriptAsync("".concat(l).concat(y.Z.getEntryFilePath(a,c)));case 4:return g=Z(Z(Z({backendUrl:l,locale:r},s?{customTheme:s}:{}),d),{},{appContext:{embedType:"widget",widgetConfigKey:n}},o),u="".concat(l,"/js/tocco-").concat(a,"/dist/"),h=window.reactRegistry.render(c,t,b,g,{},u),e.abrupt("return",{methods:h,input:g});case 8:case"end":return e.stop()}}),e)})));return function(t,n,i,s,o){return e.apply(this,arguments)}}(),W=n(85893);const P=function(e){var t,n=e.label,s=e.onClick,o=e.intl,c=(0,a.useState)("[]"),d=(0,h.Z)(c,2),l=d[0],g=d[1];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(r.ZT.H3,{children:n}),(0,W.jsx)(r.X_,{label:(t="client.widget-showcase.methodArguments",o.formatMessage({id:t})),children:(0,W.jsx)(r.a$,{type:"code",value:l,events:{onChange:g},options:{autoFocusOnMount:!1,mode:"json"}})}),(0,W.jsx)(r.zx,{type:"button",onClick:function(){return s.apply(void 0,(0,u.Z)(JSON.parse(l)))},look:"raised",children:C||(C=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.execute"}))})]})};var F,N,M,O,A,T,E,I,z,D,R,H,_,q,B,L,V,X,J=n(30168),U=n(67165),$=U.ZP.div.withConfig({displayName:"Container"})(F||(F=(0,J.Z)(["\n max-width: 1600px;\n margin: 0 auto;\n"]))),K=U.ZP.div.withConfig({displayName:"StyledWidgetContainer"})(N||(N=(0,J.Z)(["\n & * {\n ","\n }\n"])),(0,r.wy)({color:"inherit"})),G=U.ZP.span.withConfig({displayName:"StyledEmptyInput"})(M||(M=(0,J.Z)(["\n ","\n min-height: 2.6rem;\n display: flex;\n align-items: center;\n"])),(0,r.wy)()),Q=U.ZP.div.withConfig({displayName:"StyledSection"})(O||(O=(0,J.Z)(["\n margin: 40px 0;\n"]))),Y=((0,U.ZP)(r.zx).withConfig({displayName:"StyledRefreshButton"})(A||(A=(0,J.Z)(["\n margin: 15px 0 0;\n"]))),(0,U.ZP)(r.zx).withConfig({displayName:"StyledInputViewButton"})(T||(T=(0,J.Z)(["\n margin-left: 15px;\n"])))),ee=U.ZP.span.withConfig({displayName:"StyledVisibilityStatus"})(E||(E=(0,J.Z)(["\n ","\n border: 1px solid #e6e6e6;\n background-color: #e6e6e6;\n border-radius: ",";\n padding: "," ",";\n"])),(0,r.wy)(),r.FS.radii("button"),r.bA.space(-2.1),r.bA.space(0));const te=function(e){var t=e.selectedWidget,n=e.setSelectedWidget,s=e.selectedWidgetConfig,o=e.setSelectedWidgetConfig,c=e.loadWidgets,d=e.widgets,l=e.widgetConfigs,p=e.widgetConfig,m=e.editWidgetConfig,x=e.theme,y=e.editTheme,v=e.viewWidgetInput,Z=e.isWidgetManager,C=e.intl,F=function(e){return C.formatMessage({id:e})};(0,a.useEffect)((function(){c()}),[c]);var N=d.map((function(e){return{key:e.key,display:e.label}})),M=l.map((function(e){return{key:e.key,uniqueId:e.uniqueId,display:"".concat(e.uniqueId," - ").concat(e.label)}})),O=(0,a.useState)([]),A=(0,h.Z)(O,2),T=A[0],E=A[1],J=(0,a.useState)([]),U=(0,h.Z)(J,2),te=U[0],ne=U[1],ie=(0,a.useState)(null),se=(0,h.Z)(ie,2),oe=se[0],ae=se[1],ce=(0,a.useState)(null),re=(0,h.Z)(ce,2),de=re[0],le=re[1],ge=function(e,t){return ne((function(n){return[].concat((0,u.Z)(n),[{key:(0,f.v4)(),name:e,args:t}])}))},ue=null==s?void 0:s.uniqueId,he=(0,a.useCallback)((0,g.Z)(w().mark((function e(){var t,n,i,s,o,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S(),n=x,i={onVisibilityStatusChange:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0].status;E(i),ge("onVisibilityStatusChange",t)}},e.next=5,k(t,ue,p,n,i);case 5:s=e.sent,o=s.input,a=s.methods,ae(a),le(o);case 9:case"end":return e.stop()}}),e)}))),[x,ue,p]),pe=(0,a.useCallback)((0,g.Z)(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return history.pushState("",document.title,window.location.pathname+window.location.search),E([]),ne([]),ae(null),le(null),e.next=7,new Promise((function(e){0!==S().children.length?setTimeout((function(){window.reactRegistry.unmount(b),e()}),0):e()}));case 7:case"end":return e.stop()}}),e)}))),[]),we=(0,a.useCallback)((0,g.Z)(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pe();case 2:he();case 3:case"end":return e.stop()}}),e)}))),[he,pe]);return(0,a.useEffect)((function(){p?we():pe()}),[p,pe,we]),(0,W.jsxs)($,{children:[I||(I=(0,W.jsx)(r.ZT.H1,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.showcase"})})),(0,W.jsx)(r.X_,{label:F("client.widget-showcase.widget"),children:(0,W.jsx)(r.a$,{type:"single-select",value:t,options:{options:N},events:{onChange:n}})}),(0,W.jsx)(r.X_,{label:F("client.widget-showcase.widgetConfiguration"),children:t?(0,W.jsx)(r.a$,{type:"single-select",value:s,options:{options:M},events:{onChange:o}}):z||(z=(0,W.jsx)(G,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.selectWidget"})}))}),Z?(0,W.jsx)(r.zx,{type:"button",onClick:m,ink:"primary",look:"raised",disabled:!s,children:D||(D=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.widgetConfiguration.edit"}))}):null,(0,W.jsx)(r.zx,{type:"button",onClick:y,ink:"primary",look:"raised",disabled:!s,children:R||(R=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.theme.edit"}))}),(0,W.jsxs)(Q,{children:[(0,W.jsxs)(r.ZT.H2,{children:[H||(H=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.widget"})),s&&(0,W.jsx)(Y,{type:"button",icon:"info",look:"raised",onClick:function(){return v(de)},children:_||(_=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.widgetInput.view"}))}),T&&T.length>0&&(0,W.jsxs)(ee,{children:[q||(q=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.visibilityStatus"})),": ",T.join(",")]})]}),B||(B=(0,W.jsx)(K,{id:j}))]}),(0,W.jsxs)(Q,{children:[L||(L=(0,W.jsx)(r.ZT.H2,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.events"})})),te.length>0?(0,W.jsx)("pre",{children:te.map((function(e){var t=e.key,n=e.name,i=e.args;return(0,W.jsxs)(a.Fragment,{children:[n," - ",JSON.stringify(i),V||(V=(0,W.jsx)("br",{}))]},t)}))}):"-"]}),(0,W.jsxs)(Q,{children:[X||(X=(0,W.jsx)(r.ZT.H2,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.methods"})})),oe?(0,W.jsx)(W.Fragment,{children:Object.keys(oe).map((function(e){return(0,W.jsx)(P,{label:e,onClick:oe[e],intl:C},e)}))}):"-"]})]})};var ne={setSelectedWidget:o.yA,setSelectedWidgetConfig:o.sR,loadWidgets:o.G1,setWidgetConfig:o.EK,editWidgetConfig:l.gk,editTheme:l.dD,viewWidgetInput:l.R2};const ie=(0,s.connect)((function(e){return{selectedWidget:e.showcase.selectedWidget,selectedWidgetConfig:e.showcase.selectedWidgetConfig,widgets:e.showcase.widgets,widgetConfigs:e.showcase.widgetConfigs,widgetConfig:e.showcase.widgetConfig,theme:e.showcase.theme,isWidgetManager:e.showcase.access.isWidgetManager}}),ne)((0,i.injectIntl)(te));var se,oe,ae,ce,re,de,le,ge,ue,he,pe,we,fe=(0,U.vJ)(se||(se=(0,J.Z)(["\n html,\n body {\n ","\n font-size: 14px !important;\n }\n"])),(0,r.wy)()),me=U.ZP.div.withConfig({displayName:"StyledWidgetShowcaseWrapper"})(oe||(oe=(0,J.Z)(["\n background-color: ",";\n display: flex;\n flex-direction: column;\n height: 100%;\n ","\n"])),r.FS.color("paper"),(0,r.wy)()),xe=U.ZP.img.withConfig({displayName:"StyledLogo"})(ae||(ae=(0,J.Z)(["\n width: 40px;\n height: auto;\n"]))),ye=U.ZP.div.withConfig({displayName:"StyledBrand"})(ce||(ce=(0,J.Z)(["\n display: flex;\n gap: ",";\n align-items: center;\n\n "," {\n margin-top: 0;\n ","\n }\n"])),r.bA.space(0),r.XU,(0,r.wy)({fontSize:r.bA.font(9),fontWeight:r.FS.fontWeight("bold")})),je=U.ZP.span.withConfig({displayName:"StyledLightText"})(re||(re=(0,J.Z)(["\n ","\n"])),(0,r.wy)({color:r.FS.color("textLight"),fontSize:r.bA.font(9)})),be=U.ZP.header.withConfig({displayName:"StyledHeader"})(de||(de=(0,J.Z)(["\n position: sticky;\n top: 0;\n z-index: 9999;\n background-color: ",";\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n border-bottom: 1px solid ",";\n"])),r.FS.color("paper"),r.FS.color("borderLight")),ve=U.ZP.nav.withConfig({displayName:"StyledNavigationWrapper"})(le||(le=(0,J.Z)(["\n min-height: 50px;\n max-width: 1600px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: "," ",";\n box-sizing: border-box;\n margin: 0 auto;\n"])),r.bA.space(-.5),r.bA.space(.5)),Ze=(U.ZP.ul.withConfig({displayName:"StyledNavigationList"})(ge||(ge=(0,J.Z)(["\n list-style: none;\n display: flex;\n"]))),U.ZP.main.withConfig({displayName:"StyledMain"})(ue||(ue=(0,J.Z)(["\n flex: 1;\n padding: "," ",";\n overflow: auto;\n"])),r.bA.space(1),r.bA.space(.5)));const Ce=function(e){var t=e.checkAccess,n=e.isDevelopmentRunEnv,s=e.isWidgetManager;return(0,a.useEffect)((function(){t()}),[t]),(0,W.jsxs)(r.oT,{required:[void 0!==s&&"undefined"!==n],children:[he||(he=(0,W.jsx)(fe,{})),s||n?pe||(pe=(0,W.jsxs)(me,{children:[(0,W.jsx)(be,{children:(0,W.jsx)(ve,{children:(0,W.jsxs)(ye,{children:[(0,W.jsx)(xe,{src:d,alt:"tocco-logo"}),(0,W.jsxs)(r.ZT.H1,{children:["Tocco ",(0,W.jsx)(je,{children:"Widget Showcase"})]})]})})}),(0,W.jsx)(c.Z.Notifications,{}),(0,W.jsx)(Ze,{children:(0,W.jsx)(ie,{})})]})):we||(we=(0,W.jsx)(r.ZT.P,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.noAccess"})}))]})};var Se={checkAccess:o.WD};const ke=(0,s.connect)((function(e){return{isDevelopmentRunEnv:e.showcase.access.isDevelopmentRunEnv,isWidgetManager:e.showcase.access.isWidgetManager}}),Se)((0,i.injectIntl)(Ce))}}]);
|
|
1
|
+
"use strict";(self.webpackChunktocco_widget_showcase=self.webpackChunktocco_widget_showcase||[]).push([[675],{94675:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ke});var i=n(70340),s=n(75508),o=n(16973),a=(n(45697),n(1024)),c=n(25047),r=n(45693);const d=n.p+"imgs/tocco-circle.7ab925bf473f813493f00f069ed9746e.svg";var l=n(47874),g=n(15861),u=n(93433),h=n(29439),p=n(64687),w=n.n(p),f=n(77017),m=n(4942),x=n(28002),y=n(15019),j="widget-container",b="widget";function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,m.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C,S=function(){return document.getElementById(j)},k=function(){var e=(0,g.Z)(w().mark((function e(t,n,i,s,o){var a,c,r,d,l,g,u,h;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.packageName,c=i.appName,r=i.locale,d=i.config,l=x.Z.getBackendUrl(),e.next=4,y.Z.loadScriptAsync("".concat(l).concat(y.Z.getEntryFilePath(a,c)));case 4:return g=Z(Z(Z({backendUrl:l,locale:r},s?{customTheme:s}:{}),d),{},{appContext:{embedType:"widget",widgetConfigKey:n}},o),u="".concat(l,"/js/tocco-").concat(a,"/dist/"),h=window.reactRegistry.render(c,t,b,g,{},u),e.abrupt("return",{methods:h,input:g});case 8:case"end":return e.stop()}}),e)})));return function(t,n,i,s,o){return e.apply(this,arguments)}}(),W=n(85893);const P=function(e){var t,n=e.label,s=e.onClick,o=e.intl,c=(0,a.useState)("[]"),d=(0,h.Z)(c,2),l=d[0],g=d[1];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(r.ZT.H3,{children:n}),(0,W.jsx)(r.X_,{label:(t="client.widget-showcase.methodArguments",o.formatMessage({id:t})),children:(0,W.jsx)(r.a$,{type:"code",value:l,events:{onChange:g},options:{autoFocusOnMount:!1,mode:"json"}})}),(0,W.jsx)(r.zx,{type:"button",onClick:function(){return s.apply(void 0,(0,u.Z)(JSON.parse(l)))},look:"raised",children:C||(C=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.execute"}))})]})};var F,N,M,O,A,T,E,I,z,D,R,H,_,q,B,L,V,X,J=n(30168),U=n(67165),$=U.ZP.div.withConfig({displayName:"Container"})(F||(F=(0,J.Z)(["\n max-width: 1600px;\n margin: 0 auto;\n"]))),K=U.ZP.div.withConfig({displayName:"StyledWidgetContainer"})(N||(N=(0,J.Z)(["\n & * {\n ","\n }\n"])),(0,r.wy)({color:"inherit"})),G=U.ZP.span.withConfig({displayName:"StyledEmptyInput"})(M||(M=(0,J.Z)(["\n ","\n min-height: 2.6rem;\n display: flex;\n align-items: center;\n"])),(0,r.wy)()),Q=U.ZP.div.withConfig({displayName:"StyledSection"})(O||(O=(0,J.Z)(["\n margin: 40px 0;\n"]))),Y=((0,U.ZP)(r.zx).withConfig({displayName:"StyledRefreshButton"})(A||(A=(0,J.Z)(["\n margin: 15px 0 0;\n"]))),(0,U.ZP)(r.zx).withConfig({displayName:"StyledInputViewButton"})(T||(T=(0,J.Z)(["\n margin-left: 15px;\n"])))),ee=U.ZP.span.withConfig({displayName:"StyledVisibilityStatus"})(E||(E=(0,J.Z)(["\n ","\n border: 1px solid #e6e6e6;\n background-color: #e6e6e6;\n border-radius: ",";\n padding: "," ",";\n"])),(0,r.wy)(),r.FS.radii("button"),r.bA.space(-2.1),r.bA.space(0));const te=function(e){var t=e.selectedWidget,n=e.setSelectedWidget,s=e.selectedWidgetConfig,o=e.setSelectedWidgetConfig,c=e.loadWidgets,d=e.widgets,l=e.widgetConfigs,p=e.widgetConfig,m=e.editWidgetConfig,x=e.theme,y=e.editTheme,v=e.viewWidgetInput,Z=e.isWidgetManager,C=e.intl,F=function(e){return C.formatMessage({id:e})};(0,a.useEffect)((function(){c()}),[c]);var N=d.map((function(e){return{key:e.key,display:e.label}})),M=l.map((function(e){return{key:e.key,uniqueId:e.uniqueId,display:"".concat(e.uniqueId," - ").concat(e.label)}})),O=(0,a.useState)([]),A=(0,h.Z)(O,2),T=A[0],E=A[1],J=(0,a.useState)([]),U=(0,h.Z)(J,2),te=U[0],ne=U[1],ie=(0,a.useState)(null),se=(0,h.Z)(ie,2),oe=se[0],ae=se[1],ce=(0,a.useState)(null),re=(0,h.Z)(ce,2),de=re[0],le=re[1],ge=function(e,t){return ne((function(n){return[].concat((0,u.Z)(n),[{key:(0,f.v4)(),name:e,args:t}])}))},ue=null==s?void 0:s.uniqueId,he=(0,a.useCallback)((0,g.Z)(w().mark((function e(){var t,n,i,s,o,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S(),n=x,i={onVisibilityStatusChange:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0].status;E(i),ge("onVisibilityStatusChange",t)}},e.next=5,k(t,ue,p,n,i);case 5:s=e.sent,o=s.input,a=s.methods,ae(a),le(o);case 9:case"end":return e.stop()}}),e)}))),[x,ue,p]),pe=(0,a.useCallback)((0,g.Z)(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return history.pushState("",document.title,window.location.pathname+window.location.search),E([]),ne([]),ae(null),le(null),e.next=7,new Promise((function(e){0!==S().children.length?setTimeout((function(){window.reactRegistry.unmount(b),e()}),0):e()}));case 7:case"end":return e.stop()}}),e)}))),[]),we=(0,a.useCallback)((0,g.Z)(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pe();case 2:he();case 3:case"end":return e.stop()}}),e)}))),[he,pe]);return(0,a.useEffect)((function(){p?we():pe()}),[p,pe,we]),(0,W.jsxs)($,{children:[I||(I=(0,W.jsx)(r.ZT.H1,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.showcase"})})),(0,W.jsx)(r.X_,{label:F("client.widget-showcase.widget"),children:(0,W.jsx)(r.a$,{type:"single-select",value:t,options:{options:N},events:{onChange:n}})}),(0,W.jsx)(r.X_,{label:F("client.widget-showcase.widgetConfiguration"),children:t?(0,W.jsx)(r.a$,{type:"single-select",value:s,options:{options:M},events:{onChange:o}}):z||(z=(0,W.jsx)(G,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.selectWidget"})}))}),Z?(0,W.jsx)(r.zx,{type:"button",onClick:m,ink:"primary",look:"raised",disabled:!s,children:D||(D=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.widgetConfiguration.edit"}))}):null,(0,W.jsx)(r.zx,{type:"button",onClick:y,ink:"primary",look:"raised",disabled:!s,children:R||(R=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.theme.edit"}))}),(0,W.jsxs)(Q,{children:[(0,W.jsxs)(r.ZT.H2,{children:[H||(H=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.widget"})),s&&(0,W.jsx)(Y,{type:"button",icon:"info",look:"raised",onClick:function(){return v(de)},children:_||(_=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.widgetInput.view"}))}),T&&T.length>0&&(0,W.jsxs)(ee,{children:[q||(q=(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.visibilityStatus"})),": ",T.join(",")]})]}),B||(B=(0,W.jsx)(K,{id:j}))]}),(0,W.jsxs)(Q,{children:[L||(L=(0,W.jsx)(r.ZT.H2,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.events"})})),te.length>0?(0,W.jsx)("pre",{children:te.map((function(e){var t=e.key,n=e.name,i=e.args;return(0,W.jsxs)(a.Fragment,{children:[n," - ",JSON.stringify(i),V||(V=(0,W.jsx)("br",{}))]},t)}))}):"-"]}),(0,W.jsxs)(Q,{children:[X||(X=(0,W.jsx)(r.ZT.H2,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.methods"})})),oe?(0,W.jsx)(W.Fragment,{children:Object.keys(oe).map((function(e){return(0,W.jsx)(P,{label:e,onClick:oe[e],intl:C},e)}))}):"-"]})]})};var ne={setSelectedWidget:o.yA,setSelectedWidgetConfig:o.sR,loadWidgets:o.G1,setWidgetConfig:o.EK,editWidgetConfig:l.gk,editTheme:l.dD,viewWidgetInput:l.R2};const ie=(0,s.connect)((function(e){return{selectedWidget:e.showcase.selectedWidget,selectedWidgetConfig:e.showcase.selectedWidgetConfig,widgets:e.showcase.widgets,widgetConfigs:e.showcase.widgetConfigs,widgetConfig:e.showcase.widgetConfig,theme:e.showcase.theme,isWidgetManager:e.showcase.access.isWidgetManager}}),ne)((0,i.injectIntl)(te));var se,oe,ae,ce,re,de,le,ge,ue,he,pe,we,fe=(0,U.vJ)(se||(se=(0,J.Z)(["\n html,\n body {\n ","\n font-size: 14px !important;\n }\n"])),(0,r.wy)()),me=U.ZP.div.withConfig({displayName:"StyledWidgetShowcaseWrapper"})(oe||(oe=(0,J.Z)(["\n background-color: ",";\n display: flex;\n flex-direction: column;\n height: 100%;\n ","\n"])),r.FS.color("paper"),(0,r.wy)()),xe=U.ZP.img.withConfig({displayName:"StyledLogo"})(ae||(ae=(0,J.Z)(["\n width: 40px;\n height: auto;\n"]))),ye=U.ZP.div.withConfig({displayName:"StyledBrand"})(ce||(ce=(0,J.Z)(["\n display: flex;\n gap: ",";\n align-items: center;\n\n "," {\n margin-top: 0;\n ","\n }\n"])),r.bA.space(0),r.XU,(0,r.wy)({fontSize:r.bA.font(9),fontWeight:r.FS.fontWeight("bold")})),je=U.ZP.span.withConfig({displayName:"StyledLightText"})(re||(re=(0,J.Z)(["\n ","\n"])),(0,r.wy)({color:r.FS.color("textLight"),fontSize:r.bA.font(9)})),be=U.ZP.header.withConfig({displayName:"StyledHeader"})(de||(de=(0,J.Z)(["\n position: sticky;\n top: 0;\n z-index: 9999;\n background-color: ",";\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\n border-bottom: 1px solid ",";\n"])),r.FS.color("paper"),r.FS.color("borderLight")),ve=U.ZP.nav.withConfig({displayName:"StyledNavigationWrapper"})(le||(le=(0,J.Z)(["\n min-height: 50px;\n max-width: 1600px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: "," ",";\n box-sizing: border-box;\n margin: 0 auto;\n"])),r.bA.space(-.5),r.bA.space(.5)),Ze=(U.ZP.ul.withConfig({displayName:"StyledNavigationList"})(ge||(ge=(0,J.Z)(["\n list-style: none;\n display: flex;\n"]))),U.ZP.main.withConfig({displayName:"StyledMain"})(ue||(ue=(0,J.Z)(["\n flex: 1;\n padding: "," ",";\n overflow: auto;\n"])),r.bA.space(1),r.bA.space(.5)));const Ce=function(e){var t=e.checkAccess,n=e.isDevelopmentRunEnv,s=e.isWidgetManager;return(0,a.useEffect)((function(){t()}),[t]),(0,W.jsxs)(r.oT,{required:[void 0!==s&&"undefined"!==n],children:[he||(he=(0,W.jsx)(fe,{})),s||n?pe||(pe=(0,W.jsxs)(me,{children:[(0,W.jsx)(be,{children:(0,W.jsx)(ve,{children:(0,W.jsxs)(ye,{children:[(0,W.jsx)(xe,{src:d,alt:"tocco-logo"}),(0,W.jsxs)(r.ZT.H1,{children:["Tocco ",(0,W.jsx)(je,{children:"Widget Showcase"})]})]})})}),(0,W.jsx)(c.Z.Notifications,{}),(0,W.jsx)(Ze,{children:(0,W.jsx)(ie,{})})]})):we||(we=(0,W.jsx)(r.ZT.P,{children:(0,W.jsx)(i.FormattedMessage,{id:"client.widget-showcase.noAccess"})}))]})};var Se={checkAccess:o.WD};const ke=(0,s.connect)((function(e){return{isDevelopmentRunEnv:e.showcase.access.isDevelopmentRunEnv,isWidgetManager:e.showcase.access.isWidgetManager}}),Se)((0,i.injectIntl)(Ce))}}]);
|