@decafhub/decaf-react-webapp 0.0.12 → 0.0.14
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 +14 -0
- package/dist/components/Layout.d.ts +0 -1
- package/dist/components/Layout.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +2 -2
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.d.ts.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.14](https://github.com/teloscube/decaf-react-webapp/compare/v0.0.13...v0.0.14) (2023-02-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **styling:** improve theming on checkbox, datepicker and scrollbar in dark mode ([e894b44](https://github.com/teloscube/decaf-react-webapp/commit/e894b44e3e4bbf4f08e1ed0bc851ee630749fcac))
|
|
9
|
+
|
|
10
|
+
## [0.0.13](https://github.com/teloscube/decaf-react-webapp/compare/v0.0.12...v0.0.13) (2023-02-13)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **routing:** use outlet system instead of children for shared layout ([4258f2f](https://github.com/teloscube/decaf-react-webapp/commit/4258f2f7078f64ac74681eae1951647909e407af))
|
|
16
|
+
|
|
3
17
|
## [0.0.12](https://github.com/teloscube/decaf-react-webapp/compare/v0.0.11...v0.0.12) (2023-02-13)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -12,7 +12,6 @@ export type DecafMenuItem = BaseDecafMenuItem & ({
|
|
|
12
12
|
export interface DecafLayoutProps {
|
|
13
13
|
menu: DecafMenuItem[];
|
|
14
14
|
appName: string;
|
|
15
|
-
children: React.ReactNode;
|
|
16
15
|
}
|
|
17
16
|
export default function DecafLayout(props: DecafLayoutProps): JSX.Element;
|
|
18
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../src/components/Layout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,UAAU,iBAAiB;IACzB,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,CAAC;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../src/components/Layout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,UAAU,iBAAiB;IACzB,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,CAAC;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AA4BD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,eA4D1D"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,cAAc,EAAE,kBAAkB,EAAyB,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,cAAc,EAAE,kBAAkB,EAAyB,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAuB,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AAEpF,OAAoB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AAErC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;OAMG;IACH,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB;;;OAGG;IACH,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAeD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAoE3C;AACD,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=require("@ant-design/icons"),t=require("@decafhub/decaf-react"),n=require("@emotion/react"),o=require("@emotion/styled");require("antd/dist/reset.css");var r=require("react"),l=require("react-router-dom"),a=require("antd"),c=require("html2canvas");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u,d=/*#__PURE__*/i(o),s=/*#__PURE__*/i(r),f=/*#__PURE__*/i(c);function m(){return m=Object.assign?Object.assign.bind():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},m.apply(this,arguments)}function p(){return s.default.createElement(a.Result,{status:"404",title:"404",subTitle:"Sorry, the page you visited does not exist."})}function h(){return s.default.createElement(a.Result,{status:"500",title:"Error",subTitle:s.default.createElement(s.default.Fragment,null,s.default.createElement(a.Typography,null,"Something went wrong. Please try again later. If the problem persists, please contact the administrator."),s.default.createElement(l.Link,{to:"/"},s.default.createElement(a.Button,{style:{marginTop:20}},"Back Home")))})}function g(e,t){var n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);var o=parseInt(e,16),r=(o>>16)+t;r>255?r=255:r<0&&(r=0);var l=(o>>8&255)+t;l>255?l=255:l<0&&(l=0);var a=(255&o)+t;return a>255?a=255:a<0&&(a=0),(n?"#":"")+String("000000"+(a|l<<8|r<<16).toString(16)).slice(-6)}function b(e){var t,n;return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Lato, sans-serif",margin:0},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:0},"#decaf-content":{paddingInline:20,paddingTop:"5rem",paddingBottom:"5rem"},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,background:null==(n=e.token)?void 0:n.colorBgContainer,paddingBlock:0,paddingInline:0,zIndex:999,button:{height:34}},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}}}}var E="#10161d",w="#2c3d50",v={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},y={hashed:!0,algorithm:[a.theme.defaultAlgorithm],token:{borderRadius:0}},k={hashed:!0,components:{Layout:{colorBgHeader:E},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:w},Input:m({},v,{colorBgContainer:w}),Select:m({},v,{colorBgContainer:w}),Dropdown:m({},v),DatePicker:m({},v,{colorBgContainer:w,colorBgElevated:w}),InputNumber:m({},v,{colorBgContainer:w}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Lato, sans-serif",colorPrimary:"#344961",colorBgBase:"#1a242f",colorBgContainer:E,colorBgElevated:"#1a242f",colorBorderSecondary:"#1a242f",colorBorder:"#1a242f",colorBgLayout:"#1a242f",borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[a.theme.darkAlgorithm]},C=s.default.createContext({theme:"dark",toggleTheme:function(){}});function B(e){var t=s.default.useState(function(){var t=e.theme||localStorage.getItem("decafAppTheme");return"dark"===t||"light"===t?t:"dark"}),o=t[0],r=t[1],l="light"===o?y:k;l=m({},l,e.themeConfig||{}),l=m({},l,{token:m({},l.token,{fontFamily:"Lato, sans-serif"})});var c,i,d="light"===o?function(e){return m({},b(e))}(l):function(e){var t,n,o,r,l,a,c,i,u,d;return m({},b(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgBase},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:(null==(o=e.token)?void 0:o.colorWhite)+" !important"},".ant-badge-count":{color:(null==(r=e.token)?void 0:r.colorWhite)+" !important"},".ant-table-thead > tr > th":{background:g((null==(l=e.token)?void 0:l.colorBgContainer)||"",-5)+" !important","&:hover":{background:(null==(a=e.token)?void 0:a.colorBgContainer)+" !important"}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:(null==(c=e.token)?void 0:c.colorBgBase)+" !important"},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:(null==(i=e.token)?void 0:i.colorBgContainer)+" !important"}},".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":{color:(null==(u=e.token)?void 0:u.colorWhite)+" !important"},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:(null==(d=e.token)?void 0:d.colorWhite)+" !important"}}})}(l);return s.default.createElement(C.Provider,{value:{theme:o,toggleTheme:function(){var e="dark"===o?"light":"dark";r(e),localStorage.setItem("decafAppTheme",e)}}},s.default.createElement(a.ConfigProvider,{theme:l},s.default.createElement(n.Global,{styles:n.css(u||(c=["\n @import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);\n "],i||(i=c.slice(0)),c.raw=i,u=c))}),s.default.createElement(n.Global,{styles:d}),e.children))}var x=function(){return s.default.useContext(C)};function z(){return s.default.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:50,height:50},s.default.createElement("g",null,s.default.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),s.default.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),s.default.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),s.default.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),s.default.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),s.default.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),s.default.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function D(){return s.default.createElement("div",null,s.default.createElement(a.Button,{title:"Scroll to top",type:"text",size:"small",onClick:function(){return window.scrollTo({top:0,behavior:"smooth"})},icon:s.default.createElement(e.UpOutlined,null)}),s.default.createElement(a.Button,{title:"Scroll to bottom",type:"text",size:"small",onClick:function(){return window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},icon:s.default.createElement(e.DownOutlined,null)}))}function I(t){var n=function(){try{var e=document.getElementById("decaf-footer");return null==e||e.style.setProperty("display","none"),Promise.resolve(f.default(document.body)).then(function(t){var n=t.toDataURL("image/png");null==e||e.style.setProperty("display","block");var o=document.createElement("a");o.download="screenshot.png",o.href=n,o.click(),o.remove()})}catch(e){return Promise.reject(e)}};return t.triggerNode?s.default.cloneElement(t.triggerNode,{onClick:n}):s.default.createElement(a.Button,{title:"Take a screenshot of the current page",type:"text",size:"small",icon:s.default.createElement(e.CameraOutlined,null),onClick:n})}function S(t){return s.default.createElement(a.Button,{title:"dark"===t.theme?"switch to light theme":"switch to dark theme",type:"text",size:"small",icon:s.default.createElement(e.BulbFilled,{style:{color:"dark"===t.theme?"white":"black"}}),onClick:function(){return t.onChange()}})}function L(e){var t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function T(){var t,n,o,r=-1===(n=(t=window.location.href.split("/")).indexOf("webapps"))?"":t[n+1],l=function(e){var t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}(),c=function(e){return e.startsWith("preview-")&&e.length>8}(o=l)?"preview":function(e){return e.startsWith("v")&&e.length>1}(o)?"release":o,i=[{code:"development",name:"Development Version",color:"red",url:"/webapps/"+r+"/development/"+L(window.location.href),show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:"/webapps/"+r+"/testing/"+L(window.location.href),show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:"/webapps/"+r+"/staging/"+L(window.location.href),show:!0},{code:"production",name:"Production Version",color:"green",url:"/webapps/"+r+"/production/"+L(window.location.href),show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],u=i.find(function(e){return e.code===c});return u?s.default.createElement(a.Dropdown,{placement:"top",arrow:!0,menu:{items:i.filter(function(e){return e.show}).map(function(e){return{key:e.name,label:s.default.createElement("span",null,s.default.createElement("i",{className:"dot "+e.color})," ",e.name),onClick:function(){window.location.href=e.url}}})}},s.default.createElement(a.Button,{type:"text",size:"small"},s.default.createElement("div",{style:{display:"flex",alignItems:"center"}},s.default.createElement("i",{className:"dot "+(null==u?void 0:u.color),style:{marginRight:5}}),"production"!==u.code&&s.default.createElement("span",{style:{marginRight:5}},"You are on ",s.default.createElement("b",null,u.name)),s.default.createElement(e.CaretUpOutlined,null)))):null}var W="https://static.zdassets.com/ekr/snippet.js";function P(){var n=t.useDecaf(),o=n.me,l=n.publicConfig,c=r.useState(!1),i=c[0],u=c[1];return r.useEffect(function(){if(l.zendesk&&"undefined"!=typeof document){var e=document.createElement("script");return e.src=W+"?key="+l.zendesk,e.async=!0,e.id="ze-snippet",e.onload=function(){window.zE("webWidget","hide"),window.zE("webWidget:on","open",function(){window.zE("webWidget","show"),u(!0)}),window.zE("webWidget:on","close",function(){window.zE("webWidget","hide"),u(!1)})},document.body.appendChild(e),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":o.fullname}},{id:"email",prefill:{"*":o.email}}]}},function(){document.body.removeChild(e)}}},[l,o]),l.zendesk?s.default.createElement(a.Button,{size:"small",icon:s.default.createElement(e.QuestionCircleOutlined,null),onClick:function(){i?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),u(!i)}},"Support"):null}function O(e){var t=[];return e.forEach(function(e){var n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=s.default.createElement(l.NavLink,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=s.default.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=O(e.children||[])),t.push(n)}),t}function j(n){var o=O(n.menu),r=l.useMatches().map(function(e){return e.pathname}),c=t.useDecaf().me,i=a.theme.useToken().token,u=x(),d=u.theme,f=u.toggleTheme;return s.default.createElement(a.Layout,{style:{height:"100%"}},s.default.createElement(a.Layout.Header,{id:"decaf-header",style:{background:i.colorBgContainer}},s.default.createElement("div",{style:{paddingInline:20,display:"flex",justifyContent:"space-between",alignItems:"center"}},s.default.createElement(l.Link,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},s.default.createElement(z,null),s.default.createElement(a.Typography.Title,{level:4,style:{margin:0}},n.appName)),s.default.createElement(a.Menu,{style:{justifyContent:"flex-end",backgroundColor:"transparent",border:"none",flex:1},mode:"horizontal",items:o,selectedKeys:r}))),s.default.createElement(a.Layout.Content,{id:"decaf-content"},n.children),s.default.createElement(a.Layout.Footer,{id:"decaf-footer"},s.default.createElement(a.Row,{justify:"space-between",align:"middle"},s.default.createElement(a.Col,{span:10},s.default.createElement(P,null)),s.default.createElement(a.Col,{span:4,style:{textAlign:"center"}},s.default.createElement(a.Typography.Text,{type:"secondary"},"Powered by"," ",s.default.createElement("b",null,s.default.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube")))),s.default.createElement(a.Col,{span:10,style:{justifyContent:"flex-end",display:"flex",gap:10}},s.default.createElement(a.Button,{size:"small",icon:s.default.createElement(e.UserOutlined,null)},c.username),s.default.createElement(T,null),s.default.createElement(S,{theme:d,onChange:f}),s.default.createElement(I,null),s.default.createElement(D,null)))))}function N(e){var n=t.useDecaf().client,o=r.useState(void 0),l=o[0],c=o[1];return r.useEffect(function(){n.barista.get("/version/").then(function(e){return c(e.data.version)})},[n]),s.default.createElement(a.Space,{direction:"vertical",size:"middle",style:{width:"100%"}},s.default.createElement(a.Descriptions,{title:"About",column:1,bordered:!0},s.default.createElement(a.Descriptions.Item,{label:"Web Application Name"},e.appName),s.default.createElement(a.Descriptions.Item,{label:"Web Application Description"},e.appDescription),s.default.createElement(a.Descriptions.Item,{label:"Web Application Version"},"v"+e.appVersion),s.default.createElement(a.Descriptions.Item,{label:"DECAF Barista Version"},"v"+l)),e.content)}function A(e,t){var n=[];return t.forEach(function(t){var o,r=m({},t);t.children?(r.element=null!=(o=t.element)?o:s.default.createElement(l.Outlet,null),r.children=A(e,t.children),r.errorElement=t.errorElement||s.default.createElement(h,null)):r.element=s.default.createElement(j,{menu:e.menuItems,appName:e.appName},t.element),n.push(r)}),n}function R(e,t,n){var o=[].concat(e);return t.forEach(function(e){var t=o.findIndex(function(t){return t[n]===e[n]});t>=0?o[t]=e:o.push(e)}),o}Object.defineProperty(exports,"GlobalStyle",{enumerable:!0,get:function(){return n.Global}}),Object.defineProperty(exports,"css",{enumerable:!0,get:function(){return n.css}}),Object.defineProperty(exports,"styled",{enumerable:!0,get:function(){return d.default}}),exports.DecafWebapp=function(n){var o,a;r.useEffect(function(){var e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",document.body.appendChild(e),function(){document.body.removeChild(e)}},[]);var c=R(n.routes,[{path:"/about",element:s.default.createElement(N,{appName:n.appName,appVersion:null==(o=n.config)?void 0:o.currentVersion,appDescription:n.appDescription,content:n.aboutPageContent})},{path:"*",element:s.default.createElement(p,null)}],"path");c=A(m({},n,{menuItems:R(n.menuItems,[{label:"About",to:"/about",icon:s.default.createElement(e.InfoCircleOutlined,null)}],"to")}),c);var i=l.createBrowserRouter(c,{basename:null==(a=n.config)?void 0:a.basePath}),u=n.controller||t.DecafWebappController;return u.disableZendeskWidget=!0,s.default.createElement(B,{themeConfig:n.themeConfig,theme:n.theme},s.default.createElement(t.DecafApp,{config:n.config,controller:u},s.default.createElement(l.RouterProvider,{router:i})))},exports.decafThemeDark=k,exports.decafThemeLight=y,exports.useTableMaxHeight=function(e,t){var n=r.useState(400),o=n[0],l=n[1],a=document.getElementById(e);return r.useLayoutEffect(function(){var e=function(){if(a){var e=80,n=a.parentElement;n&&(e=parseFloat(getComputedStyle(n,null).paddingBottom),e=isNaN(e)||e<10?80:e);var o=e+50+(t||0),r=a.getBoundingClientRect(),c=window.innerHeight-r.top-o;l(c>350?c:"100%")}};return e(),null==a||a.addEventListener("resize",e),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),null==a||a.removeEventListener("resize",e)}},[e,a,t]),o};
|
|
1
|
+
var e=require("@ant-design/icons"),t=require("@decafhub/decaf-react"),n=require("@emotion/react"),o=require("@emotion/styled");require("antd/dist/reset.css");var r=require("react"),a=require("react-router-dom"),l=require("antd"),c=require("html2canvas");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u,d=/*#__PURE__*/i(o),s=/*#__PURE__*/i(r),f=/*#__PURE__*/i(c);function m(){return s.default.createElement(l.Result,{status:"404",title:"404",subTitle:"Sorry, the page you visited does not exist."})}function p(){return s.default.createElement(l.Result,{status:"500",title:"Error",subTitle:s.default.createElement(s.default.Fragment,null,s.default.createElement(l.Typography,null,"Something went wrong. Please try again later. If the problem persists, please contact the administrator."),s.default.createElement(a.Link,{to:"/"},s.default.createElement(l.Button,{style:{marginTop:20}},"Back Home")))})}function g(){return g=Object.assign?Object.assign.bind():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},g.apply(this,arguments)}function h(e,t){var n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);var o=parseInt(e,16),r=(o>>16)+t;r>255?r=255:r<0&&(r=0);var a=(o>>8&255)+t;a>255?a=255:a<0&&(a=0);var l=(255&o)+t;return l>255?l=255:l<0&&(l=0),(n?"#":"")+String("000000"+(l|a<<8|r<<16).toString(16)).slice(-6)}function b(e){var t,n;return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Lato, sans-serif",margin:0},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:0},"#decaf-content":{paddingInline:20,paddingTop:"5rem",paddingBottom:"5rem"},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,background:null==(n=e.token)?void 0:n.colorBgContainer,paddingBlock:0,paddingInline:0,zIndex:999,button:{height:34}},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}}}}var w="#10161d",E="#2c3d50",v={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},y={hashed:!0,algorithm:[l.theme.defaultAlgorithm],token:{borderRadius:0}},k={hashed:!0,components:{Layout:{colorBgHeader:w},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:E},Input:g({},v,{colorBgContainer:E}),Select:g({},v,{colorBgContainer:E}),Checkbox:g({},v,{colorBgContainer:E}),Dropdown:g({},v),DatePicker:g({},v,{colorBgContainer:E,colorBgElevated:E}),InputNumber:g({},v,{colorBgContainer:E}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Lato, sans-serif",colorPrimary:"#344961",colorBgBase:"#1a242f",colorBgContainer:w,colorBgElevated:"#1a242f",colorBorderSecondary:"#1a242f",colorBorder:"#1a242f",colorBgLayout:"#1a242f",borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[l.theme.darkAlgorithm]},C=s.default.createContext({theme:"dark",toggleTheme:function(){}});function B(e){var t=s.default.useState(function(){var t=e.theme||localStorage.getItem("decafAppTheme");return"dark"===t||"light"===t?t:"dark"}),o=t[0],r=t[1],a="light"===o?y:k;a=g({},a,e.themeConfig||{}),a=g({},a,{token:g({},a.token,{fontFamily:"Lato, sans-serif"})});var c,i,d="light"===o?function(e){return g({},b(e))}(a):function(e){var t,n,o,r,a,l,c,i,u,d,s,f,m,p,w,E;return g({},b(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:(null==(o=e.token)?void 0:o.colorWhite)+" !important"},".ant-badge-count":{color:(null==(r=e.token)?void 0:r.colorWhite)+" !important"},".ant-table-thead > tr > th":{background:h((null==(a=e.token)?void 0:a.colorBgContainer)||"",-5)+" !important","&:hover":{background:(null==(l=e.token)?void 0:l.colorBgContainer)+" !important"}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:(null==(c=e.token)?void 0:c.colorBgBase)+" !important"},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:(null==(i=e.token)?void 0:i.colorBgContainer)+" !important"}},".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":{color:(null==(u=e.token)?void 0:u.colorWhite)+" !important"},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:(null==(d=e.token)?void 0:d.colorWhite)+" !important"}},".ant-radio-button-wrapper-checked":{backgroundColor:(null==(s=e.components)||null==(f=s.Button)?void 0:f.colorBgContainer)+" !important",color:(null==(m=e.token)?void 0:m.colorWhite)+" !important"},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:(null==(p=e.token)?void 0:p.colorBgBase)+" !important"},".ant-picker-cell-inner":{background:(null==(w=e.token)?void 0:w.colorBgBase)+" !important"}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:(null==(E=e.token)?void 0:E.colorPrimary)+" !important"}}}})}(a);return s.default.createElement(C.Provider,{value:{theme:o,toggleTheme:function(){var e="dark"===o?"light":"dark";r(e),localStorage.setItem("decafAppTheme",e)}}},s.default.createElement(l.ConfigProvider,{theme:a},s.default.createElement(n.Global,{styles:n.css(u||(c=["\n @import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);\n "],i||(i=c.slice(0)),c.raw=i,u=c))}),s.default.createElement(n.Global,{styles:d}),e.children))}var x=function(){return s.default.useContext(C)};function z(){return s.default.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:50,height:50},s.default.createElement("g",null,s.default.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),s.default.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),s.default.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),s.default.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),s.default.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),s.default.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),s.default.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function D(){return s.default.createElement("div",null,s.default.createElement(l.Button,{title:"Scroll to top",type:"text",size:"small",onClick:function(){return window.scrollTo({top:0,behavior:"smooth"})},icon:s.default.createElement(e.UpOutlined,null)}),s.default.createElement(l.Button,{title:"Scroll to bottom",type:"text",size:"small",onClick:function(){return window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},icon:s.default.createElement(e.DownOutlined,null)}))}function S(t){var n=function(){try{var e=document.getElementById("decaf-footer");return null==e||e.style.setProperty("display","none"),Promise.resolve(f.default(document.body)).then(function(t){var n=t.toDataURL("image/png");null==e||e.style.setProperty("display","block");var o=document.createElement("a");o.download="screenshot.png",o.href=n,o.click(),o.remove()})}catch(e){return Promise.reject(e)}};return t.triggerNode?s.default.cloneElement(t.triggerNode,{onClick:n}):s.default.createElement(l.Button,{title:"Take a screenshot of the current page",type:"text",size:"small",icon:s.default.createElement(e.CameraOutlined,null),onClick:n})}function I(t){return s.default.createElement(l.Button,{title:"dark"===t.theme?"switch to light theme":"switch to dark theme",type:"text",size:"small",icon:s.default.createElement(e.BulbFilled,{style:{color:"dark"===t.theme?"white":"black"}}),onClick:function(){return t.onChange()}})}function L(e){var t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function T(){var t,n,o,r=-1===(n=(t=window.location.href.split("/")).indexOf("webapps"))?"":t[n+1],a=function(e){var t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}(),c=function(e){return e.startsWith("preview-")&&e.length>8}(o=a)?"preview":function(e){return e.startsWith("v")&&e.length>1}(o)?"release":o,i=[{code:"development",name:"Development Version",color:"red",url:"/webapps/"+r+"/development/"+L(window.location.href),show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:"/webapps/"+r+"/testing/"+L(window.location.href),show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:"/webapps/"+r+"/staging/"+L(window.location.href),show:!0},{code:"production",name:"Production Version",color:"green",url:"/webapps/"+r+"/production/"+L(window.location.href),show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],u=i.find(function(e){return e.code===c});return u?s.default.createElement(l.Dropdown,{placement:"top",arrow:!0,menu:{items:i.filter(function(e){return e.show}).map(function(e){return{key:e.name,label:s.default.createElement("span",null,s.default.createElement("i",{className:"dot "+e.color})," ",e.name),onClick:function(){window.location.href=e.url}}})}},s.default.createElement(l.Button,{type:"text",size:"small"},s.default.createElement("div",{style:{display:"flex",alignItems:"center"}},s.default.createElement("i",{className:"dot "+(null==u?void 0:u.color),style:{marginRight:5}}),"production"!==u.code&&s.default.createElement("span",{style:{marginRight:5}},"You are on ",s.default.createElement("b",null,u.name)),s.default.createElement(e.CaretUpOutlined,null)))):null}var W="https://static.zdassets.com/ekr/snippet.js";function P(){var n=t.useDecaf(),o=n.me,a=n.publicConfig,c=r.useState(!1),i=c[0],u=c[1];return r.useEffect(function(){if(a.zendesk&&"undefined"!=typeof document){var e=document.createElement("script");return e.src=W+"?key="+a.zendesk,e.async=!0,e.id="ze-snippet",e.onload=function(){window.zE("webWidget","hide"),window.zE("webWidget:on","open",function(){window.zE("webWidget","show"),u(!0)}),window.zE("webWidget:on","close",function(){window.zE("webWidget","hide"),u(!1)})},document.body.appendChild(e),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":o.fullname}},{id:"email",prefill:{"*":o.email}}]}},function(){document.body.removeChild(e)}}},[a,o]),a.zendesk?s.default.createElement(l.Button,{size:"small",icon:s.default.createElement(e.QuestionCircleOutlined,null),onClick:function(){i?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),u(!i)}},"Support"):null}function O(e){var t=[];return e.forEach(function(e){var n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=s.default.createElement(a.NavLink,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=s.default.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=O(e.children||[])),t.push(n)}),t}function j(n){var o=O(n.menu),r=a.useMatches(),c=a.useLocation(),i=r.map(function(e){return e.pathname}).filter(function(e){return"/"===c.pathname||"/"!==e}),u=t.useDecaf().me,d=l.theme.useToken().token,f=x(),m=f.theme,p=f.toggleTheme;return s.default.createElement(l.Layout,{style:{height:"100%"}},s.default.createElement(l.Layout.Header,{id:"decaf-header",style:{background:d.colorBgContainer}},s.default.createElement("div",{style:{paddingInline:20,display:"flex",justifyContent:"space-between",alignItems:"center"}},s.default.createElement(a.Link,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},s.default.createElement(z,null),s.default.createElement(l.Typography.Title,{level:4,style:{margin:0}},n.appName)),s.default.createElement(l.Menu,{style:{justifyContent:"flex-end",backgroundColor:"transparent",border:"none",flex:1},mode:"horizontal",items:o,selectedKeys:i}))),s.default.createElement(l.Layout.Content,{id:"decaf-content"},s.default.createElement(a.Outlet,null)),s.default.createElement(l.Layout.Footer,{id:"decaf-footer"},s.default.createElement(l.Row,{justify:"space-between",align:"middle"},s.default.createElement(l.Col,{span:10},s.default.createElement(P,null)),s.default.createElement(l.Col,{span:4,style:{textAlign:"center"}},s.default.createElement(l.Typography.Text,{type:"secondary"},"Powered by"," ",s.default.createElement("b",null,s.default.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube")))),s.default.createElement(l.Col,{span:10,style:{justifyContent:"flex-end",display:"flex",gap:10}},s.default.createElement(l.Button,{size:"small",icon:s.default.createElement(e.UserOutlined,null)},u.username),s.default.createElement(T,null),s.default.createElement(I,{theme:m,onChange:p}),s.default.createElement(S,null),s.default.createElement(D,null)))))}function N(e){var n=t.useDecaf().client,o=r.useState(void 0),a=o[0],c=o[1];return r.useEffect(function(){n.barista.get("/version/").then(function(e){return c(e.data.version)})},[n]),s.default.createElement(l.Space,{direction:"vertical",size:"middle",style:{width:"100%"}},s.default.createElement(l.Descriptions,{title:"About",column:1,bordered:!0},s.default.createElement(l.Descriptions.Item,{label:"Web Application Name"},e.appName),s.default.createElement(l.Descriptions.Item,{label:"Web Application Description"},e.appDescription),s.default.createElement(l.Descriptions.Item,{label:"Web Application Version"},"v"+e.appVersion),s.default.createElement(l.Descriptions.Item,{label:"DECAF Barista Version"},"v"+a)),e.content)}function A(e,t,n){var o=[].concat(e);return t.forEach(function(e){var t=o.findIndex(function(t){return t[n]===e[n]});t>=0?o[t]=e:o.push(e)}),o}Object.defineProperty(exports,"GlobalStyle",{enumerable:!0,get:function(){return n.Global}}),Object.defineProperty(exports,"css",{enumerable:!0,get:function(){return n.css}}),Object.defineProperty(exports,"styled",{enumerable:!0,get:function(){return d.default}}),exports.DecafWebapp=function(n){var o,l;r.useEffect(function(){var e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",document.body.appendChild(e),function(){document.body.removeChild(e)}},[]);var c=A(n.routes,[{path:"/about",element:s.default.createElement(N,{appName:n.appName,appVersion:null==(o=n.config)?void 0:o.currentVersion,appDescription:n.appDescription,content:n.aboutPageContent})},{path:"*",element:s.default.createElement(m,null)}],"path"),i=A(n.menuItems,[{label:"About",to:"/about",icon:s.default.createElement(e.InfoCircleOutlined,null)}],"to");c=[{element:s.default.createElement(j,{menu:i,appName:n.appName}),path:"/",children:c,errorElement:s.default.createElement(p,null)}];var u=a.createBrowserRouter(c,{basename:null==(l=n.config)?void 0:l.basePath}),d=n.controller||t.DecafWebappController;return d.disableZendeskWidget=!0,s.default.createElement(B,{themeConfig:n.themeConfig,theme:n.theme},s.default.createElement(t.DecafApp,{config:n.config,controller:d},s.default.createElement(a.RouterProvider,{router:u})))},exports.decafThemeDark=k,exports.decafThemeLight=y,exports.useTableMaxHeight=function(e,t){var n=r.useState(400),o=n[0],a=n[1],l=document.getElementById(e);return r.useLayoutEffect(function(){var e=function(){if(l){var e=80,n=l.parentElement;n&&(e=parseFloat(getComputedStyle(n,null).paddingBottom),e=isNaN(e)||e<10?80:e);var o=e+50+(t||0),r=l.getBoundingClientRect(),c=window.innerHeight-r.top-o;a(c>350?c:"100%")}};return e(),null==l||l.addEventListener("resize",e),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),null==l||l.removeEventListener("resize",e)}},[e,l,t]),o};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/style.ts","../src/theme.tsx","../src/components/Logo.tsx","../src/components/PageScroller.tsx","../src/components/Screenshotter.tsx","../src/components/ThemeSwitcher.tsx","../src/components/VersionSelector.tsx","../src/components/ZendeskWidget.tsx","../src/components/Layout.tsx","../src/components/PageAbout.tsx","../src/index.tsx"],"sourcesContent":["import { Button, Result, Typography } from 'antd';\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport function Page404() {\n return <Result status=\"404\" title={'404'} subTitle={'Sorry, the page you visited does not exist.'} />;\n}\n\nexport function ErrorElement() {\n return (\n <Result\n status=\"500\"\n title={'Error'}\n subTitle={\n <>\n <Typography>\n Something went wrong. Please try again later. If the problem persists, please contact the administrator.\n </Typography>\n <Link to=\"/\">\n <Button style={{ marginTop: 20 }}>Back Home</Button>\n </Link>\n </>\n }\n />\n );\n}\n","import { useLayoutEffect, useState } from 'react';\n\n/**\n * This hook is used to calculate the max possible height of a table.\n * It is used to set the height of the table to make it scrollable\n * when the content is too large.\n * @param elementId the id of the element that contains the table.\n * @param bottomSpace extra space to be added to the bottom of the table container.\n * @returns the max height of the table.\n * @example\n * ```tsx\n * const maxHeight = useTableMaxHeight('table-container', 50);\n * return (\n * <Table\n {...tableProps}\n id={'table-container'}\n scroll={{\n x: 'max-content',\n y: maxHeight,\n }}\n />\n* );\n* ```\n**/\nexport function useTableMaxHeight(elementId: string, bottomSpace?: number): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const w = document.getElementById(elementId);\n\n useLayoutEffect(() => {\n const calculate = () => {\n if (!w) {\n return;\n }\n const footerHeight = 50; // height of the footer with some padding\n let parentPaddingBottom = 80; // default padding bottom of the container element\n const closestContainer = w.parentElement; // get the closest container element\n if (closestContainer) {\n parentPaddingBottom = parseFloat(getComputedStyle(closestContainer, null).paddingBottom);\n parentPaddingBottom = isNaN(parentPaddingBottom) || parentPaddingBottom < 10 ? 80 : parentPaddingBottom;\n }\n const bottomMargin = parentPaddingBottom + footerHeight + (bottomSpace || 0);\n const boundingRect = w.getBoundingClientRect(); // get area and offset information.\n const max = window.innerHeight - boundingRect.top - bottomMargin; // this is the height of the our table content.\n setMaxHeight(max > 350 ? max : '100%');\n };\n\n calculate();\n w?.addEventListener('resize', calculate);\n window.addEventListener('resize', calculate);\n\n return () => {\n window.removeEventListener('resize', calculate);\n w?.removeEventListener('resize', calculate);\n };\n }, [elementId, w, bottomSpace]);\n\n return maxHeight;\n}\n\nexport function lightenDarkenColor(col: string, amt: number) {\n let usePound = false;\n\n if (col[0] === '#') {\n col = col.slice(1);\n usePound = true;\n }\n\n const num = parseInt(col, 16);\n\n let r = (num >> 16) + amt;\n\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + amt;\n\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + amt;\n\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + String('000000' + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);\n}\n","import { Interpolation, Theme } from '@emotion/react';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport { lightenDarkenColor } from './utils';\n\nfunction getBaseStyles(theme: ThemeConfig): Interpolation<Theme> {\n return {\n body: {\n background: theme.token?.colorBgBase,\n fontFamily: 'Lato, sans-serif',\n margin: 0,\n },\n button: {\n boxShadow: 'none !important',\n },\n '.ant-table-body': {\n overflow: 'auto !important',\n },\n '#decaf-header': {\n position: 'fixed',\n zIndex: 999,\n right: 0,\n left: 0,\n paddingInline: 0,\n },\n '#decaf-content': {\n paddingInline: 20,\n paddingTop: '5rem',\n paddingBottom: '5rem',\n },\n '#decaf-footer': {\n position: 'fixed',\n bottom: 0,\n right: 0,\n left: 0,\n background: theme.token?.colorBgContainer,\n paddingBlock: 0,\n paddingInline: 0,\n zIndex: 999,\n\n button: {\n height: 34,\n },\n },\n '.dot': {\n borderRadius: '50%',\n width: 10,\n height: 10,\n display: 'inline-block',\n backgroundColor: 'rgba(255,255,255,.25)',\n '&.green': {\n backgroundColor: `#80ff00 !important`,\n },\n '&.yellow': {\n backgroundColor: `#ff0 !important`,\n },\n '&.orange': {\n backgroundColor: `#ff7000 !important`,\n },\n '&.red': {\n backgroundColor: `#ff0000 !important`,\n },\n },\n };\n}\n\nexport function getLightStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...(baseStyles as any),\n };\n}\n\nexport function getDarkStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...baseStyles,\n '*': {\n '&::-webkit-scrollbar': {\n width: 10,\n height: 10,\n },\n '&::-webkit-scrollbar-track': {\n background: theme.token?.colorBgBase,\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.token?.colorPrimary,\n },\n },\n '.ant-page-header-back-button, .ant-page-header-heading-title': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-badge-count': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-table-thead > tr > th': {\n background: `${lightenDarkenColor(theme.token?.colorBgContainer || '', -5)} !important`,\n '&:hover': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-table-filter-dropdown': {\n 'input, .ant-table-filter-dropdown-search-input': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-dropdown-menu-item, .ant-dropdown-menu': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-tabs-tab-active': {\n '.ant-tabs-tab-btn': {\n color: `${theme.token?.colorWhite} !important`,\n },\n },\n };\n}\n","import { css, Global } from '@emotion/react';\nimport { ConfigProvider, theme } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { getDarkStyles, getLightStyles } from './style';\n\nconst MAIN_BLACK = '#10161d';\nconst INPUT_BG_COLOR = '#2c3d50';\n\nconst BORDER_COLORS_TRANSPARENT = {\n colorBorder: 'transparent',\n colorBorderSecondary: 'transparent',\n colorBorderBg: 'transparent',\n};\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n token: {\n borderRadius: 0,\n },\n};\n\nexport const decafThemeDark: ThemeConfig = {\n hashed: true,\n components: {\n Layout: {\n colorBgHeader: MAIN_BLACK,\n },\n Button: {\n boxShadow: 'none',\n boxShadowSecondary: 'none',\n colorBgContainer: INPUT_BG_COLOR,\n },\n Input: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Select: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Dropdown: {\n ...BORDER_COLORS_TRANSPARENT,\n },\n DatePicker: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n colorBgElevated: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n colorItemText: 'rgba(255, 255, 255, 0.5)',\n },\n },\n token: {\n fontFamily: 'Lato, sans-serif',\n colorPrimary: '#344961',\n colorBgBase: '#1a242f',\n colorBgContainer: MAIN_BLACK,\n colorBgElevated: '#1a242f',\n colorBorderSecondary: '#1a242f',\n colorBorder: '#1a242f',\n colorBgLayout: '#1a242f',\n borderRadius: 0,\n green: '#48734d',\n red: '#b03a38',\n blue: '#0d6efd',\n yellow: '#ffc107',\n orange: '#fd7e14',\n colorWhite: '#fff',\n colorLink: '#a4bfff',\n colorLinkHover: '#7199fb',\n colorLinkActive: '#7199fb',\n },\n\n algorithm: [theme.darkAlgorithm],\n};\n\ninterface ThemeContextProps {\n theme: 'dark' | 'light';\n toggleTheme: () => void;\n}\nexport const ThemeContext = React.createContext<ThemeContextProps>({\n theme: 'dark',\n toggleTheme: () => {},\n});\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\n}\nexport function ThemeProvider(props: ThemeProviderProps) {\n const [value, setValue] = React.useState<'dark' | 'light'>(() => {\n const theme = props.theme || localStorage.getItem('decafAppTheme');\n if (theme === 'dark' || theme === 'light') {\n return theme;\n }\n return 'dark';\n });\n\n function setTheme() {\n const t = value === 'dark' ? 'light' : 'dark';\n setValue(t);\n localStorage.setItem('decafAppTheme', t);\n }\n\n let theme = value === 'light' ? decafThemeLight : decafThemeDark;\n theme = { ...theme, ...(props.themeConfig || {}) };\n theme = { ...theme, token: { ...theme.token, fontFamily: 'Lato, sans-serif' } };\n\n const globalStyles = value === 'light' ? getLightStyles(theme) : getDarkStyles(theme);\n\n return (\n <ThemeContext.Provider\n value={{\n theme: value,\n toggleTheme: setTheme,\n }}\n >\n <ConfigProvider theme={theme}>\n <Global\n styles={css`\n @import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","import React from 'react';\n\nexport default function Logo() {\n return (\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 649.6 767.9\"\n enableBackground={'new 0 0 649.6 767.9'}\n xmlSpace=\"preserve\"\n width={50}\n height={50}\n >\n <g>\n <path\n fill=\"#52CEF4\"\n d=\"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z\"\n />\n <path\n fill=\"#52CEF4\"\n d=\"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z\"\n />\n </g>\n </svg>\n );\n}\n","import { DownOutlined, UpOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\nexport default function PageScroller() {\n return (\n <div>\n <Button\n title=\"Scroll to top\"\n type=\"text\"\n size=\"small\"\n onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}\n icon={<UpOutlined />}\n />\n <Button\n title=\"Scroll to bottom\"\n type=\"text\"\n size=\"small\"\n onClick={() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })}\n icon={<DownOutlined />}\n />\n </div>\n );\n}\n","import { CameraOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport html2canvas from 'html2canvas';\nimport React from 'react';\n\nexport interface ScreenShotterProps {\n triggerNode?: React.ReactNode;\n}\nexport default function ScreenShotter(props: ScreenShotterProps) {\n async function handleScreenshot() {\n // hide footer before taking screenshot\n const footer = document.getElementById('decaf-footer');\n footer?.style.setProperty('display', 'none');\n\n const canvas = await html2canvas(document.body);\n const dataUrl = canvas.toDataURL('image/png');\n\n // show footer after taking screenshot\n footer?.style.setProperty('display', 'block');\n\n const link = document.createElement('a');\n link.download = 'screenshot.png';\n link.href = dataUrl;\n link.click();\n link.remove();\n }\n\n if (props.triggerNode) {\n return React.cloneElement(props.triggerNode as React.ReactElement, {\n onClick: handleScreenshot,\n });\n } else {\n return (\n <Button\n title=\"Take a screenshot of the current page\"\n type=\"text\"\n size=\"small\"\n icon={<CameraOutlined />}\n onClick={handleScreenshot}\n />\n );\n }\n}\n","import { BulbFilled } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\ninterface ThemeSwitcherProps {\n theme: 'dark' | 'light';\n onChange: () => void;\n}\nexport default function ThemeSwitcher(props: ThemeSwitcherProps) {\n return (\n <Button\n title={props.theme === 'dark' ? 'switch to light theme' : 'switch to dark theme'}\n type=\"text\"\n size=\"small\"\n icon={\n <BulbFilled\n style={{\n color: props.theme === 'dark' ? 'white' : 'black',\n }}\n />\n }\n onClick={() => props.onChange()}\n />\n );\n}\n","import { CaretUpOutlined } from '@ant-design/icons';\nimport { Button, Dropdown } from 'antd';\nimport React from 'react';\n\ntype VersionCode = 'production' | 'staging' | 'testing' | 'development' | 'preview' | 'release';\nexport type Version = {\n code: VersionCode;\n name: string;\n color: string;\n url: string;\n show: boolean;\n};\n\nfunction getAppNameFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 1];\n }\n}\n\nfunction getAppVersionFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 2];\n }\n}\n\nfunction isPreviewVersion(version: string) {\n return version.startsWith('preview-') && version.length > 8;\n}\n\nfunction isReleaseVersion(version: string) {\n return version.startsWith('v') && version.length > 1;\n}\n\nfunction getAppVersionCode(version: string) {\n if (isPreviewVersion(version)) {\n return 'preview';\n } else if (isReleaseVersion(version)) {\n return 'release';\n } else {\n return version;\n }\n}\n\nfunction getCurrentAppPath(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts.slice(indexOfWebapps + 3).join('/');\n }\n}\n\nexport default function VersionSelector() {\n const appName = getAppNameFromUrl(window.location.href);\n const appVersion = getAppVersionFromUrl(window.location.href); // development, staging, preview-123, v1.0.0\n const appVersionCode = getAppVersionCode(appVersion); // development, staging, preview, release\n\n const versions: Version[] = [\n {\n code: 'development',\n name: 'Development Version',\n color: 'red',\n url: `/webapps/${appName}/development/${getCurrentAppPath(window.location.href)}`,\n show: process.env.NODE_ENV === 'development',\n },\n {\n code: 'testing',\n name: 'Testing Version',\n color: 'orange',\n url: `/webapps/${appName}/testing/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'staging',\n name: 'Staging Version',\n color: 'yellow',\n url: `/webapps/${appName}/staging/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'production',\n name: 'Production Version',\n color: 'green',\n url: `/webapps/${appName}/production/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'preview',\n name: 'Preview Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n {\n code: 'release',\n name: 'Release Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n ];\n\n const currentVersion = versions.find((v) => v.code === appVersionCode);\n\n if (!currentVersion) {\n return null;\n }\n\n return (\n <Dropdown\n placement=\"top\"\n arrow\n menu={{\n items: versions\n .filter((v) => v.show)\n .map((version) => ({\n key: version.name,\n label: (\n <span>\n <i className={`dot ${version.color}`} /> {version.name}\n </span>\n ),\n onClick: () => {\n window.location.href = version.url;\n },\n })),\n }}\n >\n <Button type=\"text\" size=\"small\">\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <i className={`dot ${currentVersion?.color}`} style={{ marginRight: 5 }} />\n {currentVersion.code !== 'production' && (\n <span style={{ marginRight: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n )}\n <CaretUpOutlined />\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { QuestionCircleOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nconst ZENDESK_WIDGET_SCRIPT = 'https://static.zdassets.com/ekr/snippet.js';\n\ndeclare global {\n // eslint-disable-next-line no-unused-vars\n interface Window {\n zE: any;\n zESettings: any;\n }\n}\n\nexport default function ZendeskWidget() {\n const { me, publicConfig } = useDecaf();\n const [open, setOpen] = useState(false);\n\n useEffect(() => {\n if (!publicConfig.zendesk || typeof document === 'undefined') return;\n const script = document.createElement('script');\n script.src = ZENDESK_WIDGET_SCRIPT + '?key=' + publicConfig.zendesk;\n script.async = true;\n script.id = 'ze-snippet'; // do not change this. zendesk expects this to be ze-snippet\n script.onload = () => {\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'open', () => {\n window.zE('webWidget', 'show');\n setOpen(true);\n });\n window.zE('webWidget:on', 'close', () => {\n window.zE('webWidget', 'hide');\n setOpen(false);\n });\n };\n\n document.body.appendChild(script);\n window.zESettings = {\n webWidget: {\n offset: {\n horizontal: -7,\n vertical: 20,\n },\n },\n contactForm: {\n subject: true,\n fields: [\n {\n id: 'name',\n prefill: { '*': me.fullname },\n },\n {\n id: 'email',\n prefill: { '*': me.email },\n },\n ],\n },\n };\n\n return () => {\n document.body.removeChild(script);\n };\n }, [publicConfig, me]);\n\n function toggle() {\n if (open) {\n window.zE?.('webWidget', 'close');\n } else {\n window.zE?.('webWidget', 'open');\n }\n setOpen(!open);\n }\n\n if (!publicConfig.zendesk) return null;\n\n return (\n <Button size=\"small\" icon={<QuestionCircleOutlined />} onClick={toggle}>\n Support\n </Button>\n );\n}\n","import { UserOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Col, Layout, Menu, Row, theme as anttheme, Typography } from 'antd';\nimport { ItemType, SubMenuType } from 'antd/es/menu/hooks/useItems';\nimport React from 'react';\nimport { Link, NavLink, useMatches } from 'react-router-dom';\nimport { useDecafTheme } from '../theme';\nimport Logo from './Logo';\nimport PageScroller from './PageScroller';\nimport ScreenShotter from './Screenshotter';\nimport ThemeSwitcher from './ThemeSwitcher';\nimport VersionSelector from './VersionSelector';\nimport ZendeskWidget from './ZendeskWidget';\n\ninterface BaseDecafMenuItem {\n label: any;\n icon?: React.ReactNode;\n children?: DecafMenuItem[];\n}\n\nexport type DecafMenuItem = BaseDecafMenuItem & ({ to?: string } | { href?: string });\n\nexport interface DecafLayoutProps {\n menu: DecafMenuItem[];\n appName: string;\n children: React.ReactNode;\n}\n\nfunction buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n routes.forEach((route) => {\n const item: ItemType = {\n key: 'to' in route ? route.to : route.label,\n label: route.label,\n icon: route.icon,\n };\n if ('to' in route && route.to) {\n item.label = (\n <NavLink to={route.to} end={route.to === '/'}>\n {route.label}\n </NavLink>\n );\n } else if ('href' in route && route.href) {\n item.label = <a href={route.href}>{route.label}</a>;\n } else if (route.children) {\n item.label = route.label;\n (item as SubMenuType).children = buildAntMenuFromDecafMenu(route.children || []);\n }\n result.push(item);\n });\n\n return result;\n}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const menuItems = buildAntMenuFromDecafMenu(props.menu);\n const matches = useMatches();\n const matchedMenuItems = matches.map((match) => match.pathname);\n const { me } = useDecaf();\n const { token } = anttheme.useToken();\n const { theme, toggleTheme: setTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <Layout.Header id=\"decaf-header\" style={{ background: token.colorBgContainer }}>\n <div style={{ paddingInline: 20, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>\n <Link to=\"/\" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>\n <Logo />\n <Typography.Title level={4} style={{ margin: 0 }}>\n {props.appName}\n </Typography.Title>\n </Link>\n <Menu\n style={{ justifyContent: 'flex-end', backgroundColor: 'transparent', border: 'none', flex: 1 }}\n mode=\"horizontal\"\n items={menuItems}\n selectedKeys={matchedMenuItems}\n />\n </div>\n </Layout.Header>\n <Layout.Content id=\"decaf-content\">{props.children}</Layout.Content>\n <Layout.Footer id=\"decaf-footer\">\n <Row justify=\"space-between\" align={'middle'}>\n <Col span={10}>\n <ZendeskWidget />\n </Col>\n <Col span={4} style={{ textAlign: 'center' }}>\n <Typography.Text type=\"secondary\">\n Powered by{' '}\n <b>\n <a href=\"https://teloscube.com\" target=\"_blank\" rel=\"noreferrer\">\n Teloscube\n </a>\n </b>\n </Typography.Text>\n </Col>\n <Col span={10} style={{ justifyContent: 'flex-end', display: 'flex', gap: 10 }}>\n <Button size=\"small\" icon={<UserOutlined />}>\n {me.username}\n </Button>\n <VersionSelector />\n <ThemeSwitcher theme={theme} onChange={setTheme} />\n <ScreenShotter />\n <PageScroller />\n </Col>\n </Row>\n </Layout.Footer>\n </Layout>\n );\n}\n","import { useDecaf } from '@decafhub/decaf-react';\nimport { Descriptions, Space } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nexport interface AboutPageProps {\n appName?: string;\n appVersion?: string;\n appDescription?: string;\n content?: React.ReactNode;\n}\nexport default function PageAbout(props: AboutPageProps) {\n const { client } = useDecaf();\n const [versionBarista, setVersionBarista] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n client.barista.get<{ version: string }>('/version/').then(({ data }) => setVersionBarista(data.version));\n }, [client]);\n\n return (\n <Space direction=\"vertical\" size=\"middle\" style={{ width: '100%' }}>\n <Descriptions title=\"About\" column={1} bordered>\n <Descriptions.Item label=\"Web Application Name\">{props.appName}</Descriptions.Item>\n <Descriptions.Item label=\"Web Application Description\">{props.appDescription}</Descriptions.Item>\n <Descriptions.Item label=\"Web Application Version\">{`v${props.appVersion}`}</Descriptions.Item>\n <Descriptions.Item label=\"DECAF Barista Version\">{`v${versionBarista}`}</Descriptions.Item>\n </Descriptions>\n {props.content}\n </Space>\n );\n}\n","import { InfoCircleOutlined } from '@ant-design/icons';\nimport { DecafApp, DecafAppConfig, DecafAppController, DecafWebappController } from '@decafhub/decaf-react';\nimport { css, Global } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React, { useEffect } from 'react';\nimport { createBrowserRouter, Outlet, RouteObject, RouterProvider } from 'react-router-dom';\nimport { ErrorElement, Page404 } from './components/Error';\nimport DecafLayout, { DecafMenuItem } from './components/Layout';\nimport PageAbout from './components/PageAbout';\nimport { decafThemeDark, decafThemeLight, ThemeProvider } from './theme';\nimport { useTableMaxHeight } from './utils';\n\nexport type DecafRoute = RouteObject;\n\nexport interface DecafWebappProps {\n config?: DecafAppConfig;\n controller?: DecafAppController;\n /**\n * The theme of the app.\n *\n * Defaults to `dark`.\n */\n theme?: 'dark' | 'light';\n /**\n * The theme config of the app.\n *\n * This will be merged with the default theme config (dark or light).\n *\n * See https://ant.design/docs/react/customize-theme\n */\n themeConfig?: ThemeConfig;\n /**\n * App routes.\n *\n * About page and 404 page will be added automatically.\n *\n * See https://reactrouter.com/en/main/routers/create-browser-router#routes\n */\n routes: DecafRoute[];\n /**\n * App menu.<br />\n * About page will be added automatically.\n */\n menuItems: DecafMenuItem[];\n appName: string;\n appDescription?: string;\n /**\n * The extra content to show on the about page.\n */\n aboutPageContent?: React.ReactNode;\n}\n\nfunction buildRoutes(props: DecafWebappProps, routes: DecafRoute[]): RouteObject[] {\n const result: RouteObject[] = [];\n\n routes.forEach((route) => {\n const item: RouteObject = { ...route };\n if (route.children) {\n item.element = route.element ?? <Outlet />;\n item.children = buildRoutes(props, route.children);\n item.errorElement = route.errorElement || <ErrorElement />;\n } else {\n item.element = (\n <DecafLayout menu={props.menuItems} appName={props.appName}>\n {route.element}\n </DecafLayout>\n );\n }\n result.push(item);\n });\n\n return result;\n}\n\nfunction addTo<T>(array: T[], items: T[], key: keyof T): T[] {\n const result: T[] = [...array];\n items.forEach((item) => {\n const index = result.findIndex((r) => r[key] === item[key]);\n if (index >= 0) {\n result[index] = item;\n } else {\n result.push(item);\n }\n });\n return result;\n}\n\nfunction DecafWebapp(props: DecafWebappProps) {\n useEffect(() => {\n // add plausible analytics\n const script = document.createElement('script');\n script.defer = true;\n script.setAttribute('data-domain', location.hostname);\n script.src = 'https://webax.svc.sys.decafhub.com/js/plausible.js';\n document.body.appendChild(script);\n\n return () => {\n document.body.removeChild(script);\n };\n }, []);\n\n let routes = addTo<RouteObject>(\n props.routes,\n [\n {\n path: '/about',\n element: (\n <PageAbout\n appName={props.appName}\n appVersion={props.config?.currentVersion}\n appDescription={props.appDescription}\n content={props.aboutPageContent}\n />\n ),\n },\n { path: '*', element: <Page404 /> },\n ],\n 'path'\n );\n const menuWithAboutPage = addTo(\n props.menuItems,\n [\n {\n label: 'About',\n to: '/about',\n icon: <InfoCircleOutlined />,\n },\n ],\n 'to' as any\n );\n routes = buildRoutes({ ...props, menuItems: menuWithAboutPage }, routes);\n\n const router = createBrowserRouter(routes, {\n basename: props.config?.basePath,\n });\n\n const controller = props.controller || DecafWebappController;\n controller.disableZendeskWidget = true;\n\n return (\n <ThemeProvider themeConfig={props.themeConfig} theme={props.theme}>\n <DecafApp config={props.config} controller={controller}>\n <RouterProvider router={router} />\n </DecafApp>\n </ThemeProvider>\n );\n}\nexport { DecafWebapp, Global as GlobalStyle, css, styled, decafThemeDark, decafThemeLight, useTableMaxHeight };\n"],"names":["Page404","React","createElement","Result","status","title","subTitle","ErrorElement","Fragment","Typography","Link","to","Button","style","marginTop","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","getBaseStyles","theme","_theme$token","_theme$token2","body","background","token","colorBgBase","fontFamily","margin","button","boxShadow","overflow","position","zIndex","right","left","paddingInline","paddingTop","paddingBottom","bottom","colorBgContainer","paddingBlock","height","borderRadius","width","display","backgroundColor","MAIN_BLACK","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","decafThemeLight","hashed","algorithm","defaultAlgorithm","decafThemeDark","components","Layout","colorBgHeader","boxShadowSecondary","Input","Select","Dropdown","_extends","DatePicker","colorBgElevated","InputNumber","Menu","colorItemText","colorPrimary","colorBgLayout","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","ThemeContext","createContext","toggleTheme","ThemeProvider","props","useState","localStorage","getItem","value","_React$useState","setValue","themeConfig","globalStyles","baseStyles","getLightStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$token12","color","getDarkStyles","Provider","t","setItem","ConfigProvider","Global","styles","css","_templateObject","children","useDecafTheme","useContext","Logo","version","id","xmlns","xmlnsXlink","x","y","viewBox","enableBackground","xmlSpace","fill","d","PageScroller","type","size","onClick","window","scrollTo","top","behavior","icon","UpOutlined","document","scrollHeight","DownOutlined","ScreenShotter","handleScreenshot","getElementById","footer","setProperty","Promise","resolve","html2canvas","canvas","dataUrl","toDataURL","link","download","href","click","remove","e","reject","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","onChange","url","parts","split","indexOfWebapps","indexOf","join","VersionSelector","appName","location","appVersion","getAppVersionFromUrl","startsWith","length","isPreviewVersion","isReleaseVersion","versions","code","name","getCurrentAppPath","show","process","env","NODE_ENV","currentVersion","find","v","appVersionCode","placement","arrow","menu","items","filter","map","key","label","className","alignItems","marginRight","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","useDecaf","me","_useDecaf","publicConfig","open","_useState","setOpen","useEffect","zendesk","script","src","async","onload","zE","appendChild","zESettings","webWidget","offset","horizontal","vertical","contactForm","subject","fields","prefill","fullname","email","removeChild","QuestionCircleOutlined","routes","forEach","route","item","NavLink","end","buildAntMenuFromDecafMenu","result","push","DecafLayout","menuItems","matchedMenuItems","useMatches","match","pathname","anttheme","useToken","_useDecafTheme","setTheme","Header","justifyContent","gap","Title","level","border","flex","mode","selectedKeys","Content","Footer","Row","justify","align","Col","span","textAlign","Text","target","rel","UserOutlined","username","PageAbout","client","undefined","versionBarista","setVersionBarista","barista","get","then","data","Space","direction","Descriptions","column","bordered","Item","appDescription","content","buildRoutes","_route$element","element","Outlet","errorElement","addTo","array","index","findIndex","_props$config","_props$config2","defer","setAttribute","hostname","path","config","aboutPageContent","InfoCircleOutlined","router","createBrowserRouter","basename","basePath","controller","DecafWebappController","disableZendeskWidget","DecafApp","RouterProvider","useTableMaxHeight","elementId","bottomSpace","maxHeight","setMaxHeight","w","useLayoutEffect","calculate","parentPaddingBottom","closestContainer","parentElement","parseFloat","getComputedStyle","isNaN","getBoundingClientRect","max","innerHeight","boundingRect","bottomMargin","addEventListener","removeEventListener"],"mappings":"4mBAIgBA,SAAAA,IACd,OAAOC,UAACC,cAAAC,EAAAA,OAAO,CAAAC,OAAO,MAAMC,MAAO,MAAOC,SAAU,+CACtD,UAE4BC,IAC1B,OACEN,UAAAC,cAACC,EAAAA,OAAM,CACLC,OAAO,MACPC,MAAO,QACPC,SACEL,EAAAA,QAAAC,cAAAD,EAAA,QAAAO,SAAA,KACEP,EAAA,QAAAC,cAACO,EAAUA,WAEE,KAAA,4GACbR,EAAAA,QAAAC,cAACQ,EAAIA,KAAA,CAACC,GAAG,KACPV,EAAA,QAAAC,cAACU,EAAAA,OAAM,CAACC,MAAO,CAAEC,UAAW,KAAwB,gBAMhE,CCkCgBC,SAAAA,EAAmBC,EAAaC,GAC9C,IAAYC,GAAG,EAEA,MAAXF,EAAI,KACNA,EAA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AAQA,KAIhC,+EX5HgBS,SAAkBC,EAAmBC,GACnD,MAAkC9O,WAA0B,KAArD+O,EAAWC,EAAAA,GAAAA,OACZC,EAAI1L,SAASK,eAAeiL,GA8BlC,OA5BAK,EAAAA,gBAAgB,WACd,IAAeC,EAAG,WAChB,GAAKF,EAAL,CAGA,IACIG,EAAsB,GACJC,EAAGJ,EAAEK,cACvBD,IACFD,EAAsBG,WAAWC,iBAAiBH,EAAkB,MAAMvS,eAC1EsS,EAAsBK,MAAML,IAAwBA,EAAsB,GAAK,GAAKA,GAEtF,MAAqBA,EAPA,IAOsCN,GAAe,KACrDG,EAAES,wBACjBC,EAAM1M,OAAO2M,YAAcC,EAAa1M,IAAM2M,EACpDd,EAAaW,EAAM,IAAMA,EAAM,OAX9B,CAYH,EAMA,OAJAR,UACAF,GAAAA,EAAGc,iBAAiB,SAAUZ,GAC9BlM,OAAO8M,iBAAiB,SAAUZ,GAE3B,WACLlM,OAAO+M,oBAAoB,SAAUb,GACpC,MAADF,GAAAA,EAAGe,oBAAoB,SAAUb,EACnC,CACF,EAAG,CAACN,EAAWI,EAAGH,IAGpBC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Error.tsx","../src/utils.tsx","../src/style.ts","../src/theme.tsx","../src/components/Logo.tsx","../src/components/PageScroller.tsx","../src/components/Screenshotter.tsx","../src/components/ThemeSwitcher.tsx","../src/components/VersionSelector.tsx","../src/components/ZendeskWidget.tsx","../src/components/Layout.tsx","../src/components/PageAbout.tsx","../src/index.tsx"],"sourcesContent":["import { Button, Result, Typography } from 'antd';\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport function Page404() {\n return <Result status=\"404\" title={'404'} subTitle={'Sorry, the page you visited does not exist.'} />;\n}\n\nexport function ErrorElement() {\n return (\n <Result\n status=\"500\"\n title={'Error'}\n subTitle={\n <>\n <Typography>\n Something went wrong. Please try again later. If the problem persists, please contact the administrator.\n </Typography>\n <Link to=\"/\">\n <Button style={{ marginTop: 20 }}>Back Home</Button>\n </Link>\n </>\n }\n />\n );\n}\n","import { useLayoutEffect, useState } from 'react';\n\n/**\n * This hook is used to calculate the max possible height of a table.\n * It is used to set the height of the table to make it scrollable\n * when the content is too large.\n * @param elementId the id of the element that contains the table.\n * @param bottomSpace extra space to be added to the bottom of the table container.\n * @returns the max height of the table.\n * @example\n * ```tsx\n * const maxHeight = useTableMaxHeight('table-container', 50);\n * return (\n * <Table\n {...tableProps}\n id={'table-container'}\n scroll={{\n x: 'max-content',\n y: maxHeight,\n }}\n />\n* );\n* ```\n**/\nexport function useTableMaxHeight(elementId: string, bottomSpace?: number): string | number {\n const [maxHeight, setMaxHeight] = useState<string | number>(400);\n const w = document.getElementById(elementId);\n\n useLayoutEffect(() => {\n const calculate = () => {\n if (!w) {\n return;\n }\n const footerHeight = 50; // height of the footer with some padding\n let parentPaddingBottom = 80; // default padding bottom of the container element\n const closestContainer = w.parentElement; // get the closest container element\n if (closestContainer) {\n parentPaddingBottom = parseFloat(getComputedStyle(closestContainer, null).paddingBottom);\n parentPaddingBottom = isNaN(parentPaddingBottom) || parentPaddingBottom < 10 ? 80 : parentPaddingBottom;\n }\n const bottomMargin = parentPaddingBottom + footerHeight + (bottomSpace || 0);\n const boundingRect = w.getBoundingClientRect(); // get area and offset information.\n const max = window.innerHeight - boundingRect.top - bottomMargin; // this is the height of the our table content.\n setMaxHeight(max > 350 ? max : '100%');\n };\n\n calculate();\n w?.addEventListener('resize', calculate);\n window.addEventListener('resize', calculate);\n\n return () => {\n window.removeEventListener('resize', calculate);\n w?.removeEventListener('resize', calculate);\n };\n }, [elementId, w, bottomSpace]);\n\n return maxHeight;\n}\n\nexport function lightenDarkenColor(col: string, amt: number) {\n let usePound = false;\n\n if (col[0] === '#') {\n col = col.slice(1);\n usePound = true;\n }\n\n const num = parseInt(col, 16);\n\n let r = (num >> 16) + amt;\n\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + amt;\n\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + amt;\n\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + String('000000' + (g | (b << 8) | (r << 16)).toString(16)).slice(-6);\n}\n","import { Interpolation, Theme } from '@emotion/react';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport { lightenDarkenColor } from './utils';\n\nfunction getBaseStyles(theme: ThemeConfig): Interpolation<Theme> {\n return {\n body: {\n background: theme.token?.colorBgBase,\n fontFamily: 'Lato, sans-serif',\n margin: 0,\n },\n button: {\n boxShadow: 'none !important',\n },\n '.ant-table-body': {\n overflow: 'auto !important',\n },\n '#decaf-header': {\n position: 'fixed',\n zIndex: 999,\n right: 0,\n left: 0,\n paddingInline: 0,\n },\n '#decaf-content': {\n paddingInline: 20,\n paddingTop: '5rem',\n paddingBottom: '5rem',\n },\n '#decaf-footer': {\n position: 'fixed',\n bottom: 0,\n right: 0,\n left: 0,\n background: theme.token?.colorBgContainer,\n paddingBlock: 0,\n paddingInline: 0,\n zIndex: 999,\n\n button: {\n height: 34,\n },\n },\n '.dot': {\n borderRadius: '50%',\n width: 10,\n height: 10,\n display: 'inline-block',\n backgroundColor: 'rgba(255,255,255,.25)',\n '&.green': {\n backgroundColor: `#80ff00 !important`,\n },\n '&.yellow': {\n backgroundColor: `#ff0 !important`,\n },\n '&.orange': {\n backgroundColor: `#ff7000 !important`,\n },\n '&.red': {\n backgroundColor: `#ff0000 !important`,\n },\n },\n };\n}\n\nexport function getLightStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...(baseStyles as any),\n };\n}\n\nexport function getDarkStyles(theme: ThemeConfig): Interpolation<Theme> {\n const baseStyles = getBaseStyles(theme) as any;\n\n return {\n ...baseStyles,\n '*': {\n '&::-webkit-scrollbar': {\n width: 10,\n height: 10,\n },\n '&::-webkit-scrollbar-track': {\n background: theme.token?.colorBgContainer,\n },\n '&::-webkit-scrollbar-thumb': {\n background: theme.token?.colorPrimary,\n },\n },\n '.ant-page-header-back-button, .ant-page-header-heading-title': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-badge-count': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-table-thead > tr > th': {\n background: `${lightenDarkenColor(theme.token?.colorBgContainer || '', -5)} !important`,\n '&:hover': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-table-filter-dropdown': {\n 'input, .ant-table-filter-dropdown-search-input': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-dropdown-menu-item, .ant-dropdown-menu': {\n background: `${theme.token?.colorBgContainer} !important`,\n },\n },\n '.ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected': {\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-tabs-tab-active': {\n '.ant-tabs-tab-btn': {\n color: `${theme.token?.colorWhite} !important`,\n },\n },\n '.ant-radio-button-wrapper-checked': {\n backgroundColor: `${theme.components?.Button?.colorBgContainer} !important`,\n color: `${theme.token?.colorWhite} !important`,\n },\n '.ant-picker-date-panel': {\n '.ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '&::before': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorBgBase} !important`,\n },\n },\n '.ant-picker-cell-range-start, .ant-picker-cell-range-end': {\n '.ant-picker-cell-inner': {\n background: `${theme.token?.colorPrimary} !important`,\n },\n },\n },\n };\n}\n","import { css, Global } from '@emotion/react';\nimport { ConfigProvider, theme } from 'antd';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React from 'react';\nimport { getDarkStyles, getLightStyles } from './style';\n\nconst MAIN_BLACK = '#10161d';\nconst INPUT_BG_COLOR = '#2c3d50';\n\nconst BORDER_COLORS_TRANSPARENT = {\n colorBorder: 'transparent',\n colorBorderSecondary: 'transparent',\n colorBorderBg: 'transparent',\n};\n\nexport const decafThemeLight: ThemeConfig = {\n hashed: true,\n algorithm: [theme.defaultAlgorithm],\n token: {\n borderRadius: 0,\n },\n};\n\nexport const decafThemeDark: ThemeConfig = {\n hashed: true,\n components: {\n Layout: {\n colorBgHeader: MAIN_BLACK,\n },\n Button: {\n boxShadow: 'none',\n boxShadowSecondary: 'none',\n colorBgContainer: INPUT_BG_COLOR,\n },\n Input: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Select: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Checkbox: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Dropdown: {\n ...BORDER_COLORS_TRANSPARENT,\n },\n DatePicker: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n colorBgElevated: INPUT_BG_COLOR,\n },\n InputNumber: {\n ...BORDER_COLORS_TRANSPARENT,\n colorBgContainer: INPUT_BG_COLOR,\n },\n Menu: {\n colorItemText: 'rgba(255, 255, 255, 0.5)',\n },\n },\n token: {\n fontFamily: 'Lato, sans-serif',\n colorPrimary: '#344961',\n colorBgBase: '#1a242f',\n colorBgContainer: MAIN_BLACK,\n colorBgElevated: '#1a242f',\n colorBorderSecondary: '#1a242f',\n colorBorder: '#1a242f',\n colorBgLayout: '#1a242f',\n borderRadius: 0,\n green: '#48734d',\n red: '#b03a38',\n blue: '#0d6efd',\n yellow: '#ffc107',\n orange: '#fd7e14',\n colorWhite: '#fff',\n colorLink: '#a4bfff',\n colorLinkHover: '#7199fb',\n colorLinkActive: '#7199fb',\n },\n\n algorithm: [theme.darkAlgorithm],\n};\n\ninterface ThemeContextProps {\n theme: 'dark' | 'light';\n toggleTheme: () => void;\n}\nexport const ThemeContext = React.createContext<ThemeContextProps>({\n theme: 'dark',\n toggleTheme: () => {},\n});\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n themeConfig?: ThemeConfig;\n theme?: 'dark' | 'light';\n}\nexport function ThemeProvider(props: ThemeProviderProps) {\n const [value, setValue] = React.useState<'dark' | 'light'>(() => {\n const theme = props.theme || localStorage.getItem('decafAppTheme');\n if (theme === 'dark' || theme === 'light') {\n return theme;\n }\n return 'dark';\n });\n\n function setTheme() {\n const t = value === 'dark' ? 'light' : 'dark';\n setValue(t);\n localStorage.setItem('decafAppTheme', t);\n }\n\n let theme = value === 'light' ? decafThemeLight : decafThemeDark;\n theme = { ...theme, ...(props.themeConfig || {}) };\n theme = { ...theme, token: { ...theme.token, fontFamily: 'Lato, sans-serif' } };\n\n const globalStyles = value === 'light' ? getLightStyles(theme) : getDarkStyles(theme);\n\n return (\n <ThemeContext.Provider\n value={{\n theme: value,\n toggleTheme: setTheme,\n }}\n >\n <ConfigProvider theme={theme}>\n <Global\n styles={css`\n @import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);\n `}\n />\n <Global styles={globalStyles} />\n\n {props.children}\n </ConfigProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport const useDecafTheme = () => React.useContext(ThemeContext);\n","import React from 'react';\n\nexport default function Logo() {\n return (\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 649.6 767.9\"\n enableBackground={'new 0 0 649.6 767.9'}\n xmlSpace=\"preserve\"\n width={50}\n height={50}\n >\n <g>\n <path\n fill=\"#52CEF4\"\n d=\"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z\"\n />\n <path\n fill=\"#227EC3\"\n d=\"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z\"\n />\n <path\n fill=\"#52CEF4\"\n d=\"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z\"\n />\n <path\n fill=\"#409DD5\"\n d=\"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z\"\n />\n </g>\n </svg>\n );\n}\n","import { DownOutlined, UpOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\nexport default function PageScroller() {\n return (\n <div>\n <Button\n title=\"Scroll to top\"\n type=\"text\"\n size=\"small\"\n onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}\n icon={<UpOutlined />}\n />\n <Button\n title=\"Scroll to bottom\"\n type=\"text\"\n size=\"small\"\n onClick={() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' })}\n icon={<DownOutlined />}\n />\n </div>\n );\n}\n","import { CameraOutlined } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport html2canvas from 'html2canvas';\nimport React from 'react';\n\nexport interface ScreenShotterProps {\n triggerNode?: React.ReactNode;\n}\nexport default function ScreenShotter(props: ScreenShotterProps) {\n async function handleScreenshot() {\n // hide footer before taking screenshot\n const footer = document.getElementById('decaf-footer');\n footer?.style.setProperty('display', 'none');\n\n const canvas = await html2canvas(document.body);\n const dataUrl = canvas.toDataURL('image/png');\n\n // show footer after taking screenshot\n footer?.style.setProperty('display', 'block');\n\n const link = document.createElement('a');\n link.download = 'screenshot.png';\n link.href = dataUrl;\n link.click();\n link.remove();\n }\n\n if (props.triggerNode) {\n return React.cloneElement(props.triggerNode as React.ReactElement, {\n onClick: handleScreenshot,\n });\n } else {\n return (\n <Button\n title=\"Take a screenshot of the current page\"\n type=\"text\"\n size=\"small\"\n icon={<CameraOutlined />}\n onClick={handleScreenshot}\n />\n );\n }\n}\n","import { BulbFilled } from '@ant-design/icons';\nimport { Button } from 'antd';\nimport React from 'react';\n\ninterface ThemeSwitcherProps {\n theme: 'dark' | 'light';\n onChange: () => void;\n}\nexport default function ThemeSwitcher(props: ThemeSwitcherProps) {\n return (\n <Button\n title={props.theme === 'dark' ? 'switch to light theme' : 'switch to dark theme'}\n type=\"text\"\n size=\"small\"\n icon={\n <BulbFilled\n style={{\n color: props.theme === 'dark' ? 'white' : 'black',\n }}\n />\n }\n onClick={() => props.onChange()}\n />\n );\n}\n","import { CaretUpOutlined } from '@ant-design/icons';\nimport { Button, Dropdown } from 'antd';\nimport React from 'react';\n\ntype VersionCode = 'production' | 'staging' | 'testing' | 'development' | 'preview' | 'release';\nexport type Version = {\n code: VersionCode;\n name: string;\n color: string;\n url: string;\n show: boolean;\n};\n\nfunction getAppNameFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 1];\n }\n}\n\nfunction getAppVersionFromUrl(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts[indexOfWebapps + 2];\n }\n}\n\nfunction isPreviewVersion(version: string) {\n return version.startsWith('preview-') && version.length > 8;\n}\n\nfunction isReleaseVersion(version: string) {\n return version.startsWith('v') && version.length > 1;\n}\n\nfunction getAppVersionCode(version: string) {\n if (isPreviewVersion(version)) {\n return 'preview';\n } else if (isReleaseVersion(version)) {\n return 'release';\n } else {\n return version;\n }\n}\n\nfunction getCurrentAppPath(url: string) {\n const parts = url.split('/');\n const indexOfWebapps = parts.indexOf('webapps');\n if (indexOfWebapps === -1) {\n return '';\n } else {\n return parts.slice(indexOfWebapps + 3).join('/');\n }\n}\n\nexport default function VersionSelector() {\n const appName = getAppNameFromUrl(window.location.href);\n const appVersion = getAppVersionFromUrl(window.location.href); // development, staging, preview-123, v1.0.0\n const appVersionCode = getAppVersionCode(appVersion); // development, staging, preview, release\n\n const versions: Version[] = [\n {\n code: 'development',\n name: 'Development Version',\n color: 'red',\n url: `/webapps/${appName}/development/${getCurrentAppPath(window.location.href)}`,\n show: process.env.NODE_ENV === 'development',\n },\n {\n code: 'testing',\n name: 'Testing Version',\n color: 'orange',\n url: `/webapps/${appName}/testing/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'staging',\n name: 'Staging Version',\n color: 'yellow',\n url: `/webapps/${appName}/staging/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'production',\n name: 'Production Version',\n color: 'green',\n url: `/webapps/${appName}/production/${getCurrentAppPath(window.location.href)}`,\n show: true,\n },\n {\n code: 'preview',\n name: 'Preview Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n {\n code: 'release',\n name: 'Release Version',\n color: 'grey',\n url: `/`,\n show: false,\n },\n ];\n\n const currentVersion = versions.find((v) => v.code === appVersionCode);\n\n if (!currentVersion) {\n return null;\n }\n\n return (\n <Dropdown\n placement=\"top\"\n arrow\n menu={{\n items: versions\n .filter((v) => v.show)\n .map((version) => ({\n key: version.name,\n label: (\n <span>\n <i className={`dot ${version.color}`} /> {version.name}\n </span>\n ),\n onClick: () => {\n window.location.href = version.url;\n },\n })),\n }}\n >\n <Button type=\"text\" size=\"small\">\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <i className={`dot ${currentVersion?.color}`} style={{ marginRight: 5 }} />\n {currentVersion.code !== 'production' && (\n <span style={{ marginRight: 5 }}>\n You are on <b>{currentVersion.name}</b>\n </span>\n )}\n <CaretUpOutlined />\n </div>\n </Button>\n </Dropdown>\n );\n}\n","import { QuestionCircleOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nconst ZENDESK_WIDGET_SCRIPT = 'https://static.zdassets.com/ekr/snippet.js';\n\ndeclare global {\n // eslint-disable-next-line no-unused-vars\n interface Window {\n zE: any;\n zESettings: any;\n }\n}\n\nexport default function ZendeskWidget() {\n const { me, publicConfig } = useDecaf();\n const [open, setOpen] = useState(false);\n\n useEffect(() => {\n if (!publicConfig.zendesk || typeof document === 'undefined') return;\n const script = document.createElement('script');\n script.src = ZENDESK_WIDGET_SCRIPT + '?key=' + publicConfig.zendesk;\n script.async = true;\n script.id = 'ze-snippet'; // do not change this. zendesk expects this to be ze-snippet\n script.onload = () => {\n window.zE('webWidget', 'hide');\n window.zE('webWidget:on', 'open', () => {\n window.zE('webWidget', 'show');\n setOpen(true);\n });\n window.zE('webWidget:on', 'close', () => {\n window.zE('webWidget', 'hide');\n setOpen(false);\n });\n };\n\n document.body.appendChild(script);\n window.zESettings = {\n webWidget: {\n offset: {\n horizontal: -7,\n vertical: 20,\n },\n },\n contactForm: {\n subject: true,\n fields: [\n {\n id: 'name',\n prefill: { '*': me.fullname },\n },\n {\n id: 'email',\n prefill: { '*': me.email },\n },\n ],\n },\n };\n\n return () => {\n document.body.removeChild(script);\n };\n }, [publicConfig, me]);\n\n function toggle() {\n if (open) {\n window.zE?.('webWidget', 'close');\n } else {\n window.zE?.('webWidget', 'open');\n }\n setOpen(!open);\n }\n\n if (!publicConfig.zendesk) return null;\n\n return (\n <Button size=\"small\" icon={<QuestionCircleOutlined />} onClick={toggle}>\n Support\n </Button>\n );\n}\n","import { UserOutlined } from '@ant-design/icons';\nimport { useDecaf } from '@decafhub/decaf-react';\nimport { Button, Col, Layout, Menu, Row, theme as anttheme, Typography } from 'antd';\nimport { ItemType, SubMenuType } from 'antd/es/menu/hooks/useItems';\nimport React from 'react';\nimport { Link, NavLink, Outlet, useLocation, useMatches } from 'react-router-dom';\nimport { useDecafTheme } from '../theme';\nimport Logo from './Logo';\nimport PageScroller from './PageScroller';\nimport ScreenShotter from './Screenshotter';\nimport ThemeSwitcher from './ThemeSwitcher';\nimport VersionSelector from './VersionSelector';\nimport ZendeskWidget from './ZendeskWidget';\n\ninterface BaseDecafMenuItem {\n label: any;\n icon?: React.ReactNode;\n children?: DecafMenuItem[];\n}\n\nexport type DecafMenuItem = BaseDecafMenuItem & ({ to?: string } | { href?: string });\n\nexport interface DecafLayoutProps {\n menu: DecafMenuItem[];\n appName: string;\n}\n\nfunction buildAntMenuFromDecafMenu(routes: DecafMenuItem[]): ItemType[] {\n const result: ItemType[] = [];\n routes.forEach((route) => {\n const item: ItemType = {\n key: 'to' in route ? route.to : route.label,\n label: route.label,\n icon: route.icon,\n };\n if ('to' in route && route.to) {\n item.label = (\n <NavLink to={route.to} end={route.to === '/'}>\n {route.label}\n </NavLink>\n );\n } else if ('href' in route && route.href) {\n item.label = <a href={route.href}>{route.label}</a>;\n } else if (route.children) {\n item.label = route.label;\n (item as SubMenuType).children = buildAntMenuFromDecafMenu(route.children || []);\n }\n result.push(item);\n });\n\n return result;\n}\n\nexport default function DecafLayout(props: DecafLayoutProps) {\n const menuItems = buildAntMenuFromDecafMenu(props.menu);\n const matches = useMatches();\n const location = useLocation();\n const matchedMenuItems = matches\n .map((match) => match.pathname)\n .filter((pathname) => (location.pathname !== '/' ? pathname !== '/' : true)); // WORKAROUND: the root path always matches. We don't want that.\n const { me } = useDecaf();\n const { token } = anttheme.useToken();\n const { theme, toggleTheme: setTheme } = useDecafTheme();\n\n return (\n <Layout style={{ height: '100%' }}>\n <Layout.Header id=\"decaf-header\" style={{ background: token.colorBgContainer }}>\n <div style={{ paddingInline: 20, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>\n <Link to=\"/\" style={{ display: 'flex', alignItems: 'center', gap: 10 }}>\n <Logo />\n <Typography.Title level={4} style={{ margin: 0 }}>\n {props.appName}\n </Typography.Title>\n </Link>\n <Menu\n style={{ justifyContent: 'flex-end', backgroundColor: 'transparent', border: 'none', flex: 1 }}\n mode=\"horizontal\"\n items={menuItems}\n selectedKeys={matchedMenuItems}\n />\n </div>\n </Layout.Header>\n <Layout.Content id=\"decaf-content\">\n <Outlet />\n </Layout.Content>\n <Layout.Footer id=\"decaf-footer\">\n <Row justify=\"space-between\" align={'middle'}>\n <Col span={10}>\n <ZendeskWidget />\n </Col>\n <Col span={4} style={{ textAlign: 'center' }}>\n <Typography.Text type=\"secondary\">\n Powered by{' '}\n <b>\n <a href=\"https://teloscube.com\" target=\"_blank\" rel=\"noreferrer\">\n Teloscube\n </a>\n </b>\n </Typography.Text>\n </Col>\n <Col span={10} style={{ justifyContent: 'flex-end', display: 'flex', gap: 10 }}>\n <Button size=\"small\" icon={<UserOutlined />}>\n {me.username}\n </Button>\n <VersionSelector />\n <ThemeSwitcher theme={theme} onChange={setTheme} />\n <ScreenShotter />\n <PageScroller />\n </Col>\n </Row>\n </Layout.Footer>\n </Layout>\n );\n}\n","import { useDecaf } from '@decafhub/decaf-react';\nimport { Descriptions, Space } from 'antd';\nimport React, { useEffect, useState } from 'react';\n\nexport interface AboutPageProps {\n appName?: string;\n appVersion?: string;\n appDescription?: string;\n content?: React.ReactNode;\n}\nexport default function PageAbout(props: AboutPageProps) {\n const { client } = useDecaf();\n const [versionBarista, setVersionBarista] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n client.barista.get<{ version: string }>('/version/').then(({ data }) => setVersionBarista(data.version));\n }, [client]);\n\n return (\n <Space direction=\"vertical\" size=\"middle\" style={{ width: '100%' }}>\n <Descriptions title=\"About\" column={1} bordered>\n <Descriptions.Item label=\"Web Application Name\">{props.appName}</Descriptions.Item>\n <Descriptions.Item label=\"Web Application Description\">{props.appDescription}</Descriptions.Item>\n <Descriptions.Item label=\"Web Application Version\">{`v${props.appVersion}`}</Descriptions.Item>\n <Descriptions.Item label=\"DECAF Barista Version\">{`v${versionBarista}`}</Descriptions.Item>\n </Descriptions>\n {props.content}\n </Space>\n );\n}\n","import { InfoCircleOutlined } from '@ant-design/icons';\nimport { DecafApp, DecafAppConfig, DecafAppController, DecafWebappController } from '@decafhub/decaf-react';\nimport { css, Global } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport 'antd/dist/reset.css';\nimport { ThemeConfig } from 'antd/es/config-provider/context';\nimport React, { useEffect } from 'react';\nimport { createBrowserRouter, RouteObject, RouterProvider } from 'react-router-dom';\nimport { ErrorElement, Page404 } from './components/Error';\nimport DecafLayout, { DecafMenuItem } from './components/Layout';\nimport PageAbout from './components/PageAbout';\nimport { decafThemeDark, decafThemeLight, ThemeProvider } from './theme';\nimport { useTableMaxHeight } from './utils';\n\nexport type DecafRoute = RouteObject;\n\nexport interface DecafWebappProps {\n config?: DecafAppConfig;\n controller?: DecafAppController;\n /**\n * The theme of the app.\n *\n * Defaults to `dark`.\n */\n theme?: 'dark' | 'light';\n /**\n * The theme config of the app.\n *\n * This will be merged with the default theme config (dark or light).\n *\n * See https://ant.design/docs/react/customize-theme\n */\n themeConfig?: ThemeConfig;\n /**\n * App routes.\n *\n * About page and 404 page will be added automatically.\n *\n * See https://reactrouter.com/en/main/routers/create-browser-router#routes\n */\n routes: DecafRoute[];\n /**\n * App menu.<br />\n * About page will be added automatically.\n */\n menuItems: DecafMenuItem[];\n appName: string;\n appDescription?: string;\n /**\n * The extra content to show on the about page.\n */\n aboutPageContent?: React.ReactNode;\n}\n\nfunction addTo<T>(array: T[], items: T[], key: keyof T): T[] {\n const result: T[] = [...array];\n items.forEach((item) => {\n const index = result.findIndex((r) => r[key] === item[key]);\n if (index >= 0) {\n result[index] = item;\n } else {\n result.push(item);\n }\n });\n return result;\n}\n\nfunction DecafWebapp(props: DecafWebappProps) {\n useEffect(() => {\n // add plausible analytics\n const script = document.createElement('script');\n script.defer = true;\n script.setAttribute('data-domain', location.hostname);\n script.src = 'https://webax.svc.sys.decafhub.com/js/plausible.js';\n document.body.appendChild(script);\n\n return () => {\n document.body.removeChild(script);\n };\n }, []);\n\n let routes = addTo<RouteObject>(\n props.routes,\n [\n {\n path: '/about',\n element: (\n <PageAbout\n appName={props.appName}\n appVersion={props.config?.currentVersion}\n appDescription={props.appDescription}\n content={props.aboutPageContent}\n />\n ),\n },\n { path: '*', element: <Page404 /> },\n ],\n 'path'\n );\n\n const menuWithAboutPage = addTo(\n props.menuItems,\n [\n {\n label: 'About',\n to: '/about',\n icon: <InfoCircleOutlined />,\n },\n ],\n 'to' as any\n );\n\n routes = [\n {\n element: <DecafLayout menu={menuWithAboutPage} appName={props.appName} />,\n path: '/',\n children: routes,\n errorElement: <ErrorElement />,\n },\n ];\n\n const router = createBrowserRouter(routes, {\n basename: props.config?.basePath,\n });\n\n const controller = props.controller || DecafWebappController;\n controller.disableZendeskWidget = true;\n\n return (\n <ThemeProvider themeConfig={props.themeConfig} theme={props.theme}>\n <DecafApp config={props.config} controller={controller}>\n <RouterProvider router={router} />\n </DecafApp>\n </ThemeProvider>\n );\n}\nexport { DecafWebapp, Global as GlobalStyle, css, styled, decafThemeDark, decafThemeLight, useTableMaxHeight };\n"],"names":["Page404","React","createElement","Result","status","title","subTitle","ErrorElement","Fragment","Typography","Link","to","Button","style","marginTop","lightenDarkenColor","col","amt","usePound","slice","num","parseInt","r","b","g","String","toString","getBaseStyles","theme","_theme$token","_theme$token2","body","background","token","colorBgBase","fontFamily","margin","button","boxShadow","overflow","position","zIndex","right","left","paddingInline","paddingTop","paddingBottom","bottom","colorBgContainer","paddingBlock","height","borderRadius","width","display","backgroundColor","MAIN_BLACK","INPUT_BG_COLOR","BORDER_COLORS_TRANSPARENT","colorBorder","colorBorderSecondary","colorBorderBg","decafThemeLight","hashed","algorithm","defaultAlgorithm","decafThemeDark","components","Layout","colorBgHeader","boxShadowSecondary","Input","Select","Checkbox","_extends","Dropdown","DatePicker","colorBgElevated","InputNumber","Menu","colorItemText","colorPrimary","colorBgLayout","green","red","blue","yellow","orange","colorWhite","colorLink","colorLinkHover","colorLinkActive","darkAlgorithm","ThemeContext","createContext","toggleTheme","ThemeProvider","props","_React$useState","useState","localStorage","getItem","value","setValue","themeConfig","globalStyles","baseStyles","getLightStyles","getDarkStyles","_theme$token3","_theme$token4","_theme$token5","_theme$token6","_theme$token7","_theme$token8","_theme$token9","_theme$token10","_theme$token11","_theme$token12","_theme$components","_theme$components$But","_theme$token13","_theme$token14","_theme$token15","_theme$token16","color","Provider","t","setItem","ConfigProvider","Global","styles","css","_templateObject","children","useDecafTheme","useContext","Logo","version","id","xmlns","xmlnsXlink","x","y","viewBox","enableBackground","xmlSpace","fill","d","PageScroller","type","size","onClick","window","scrollTo","top","behavior","icon","UpOutlined","document","scrollHeight","DownOutlined","ScreenShotter","handleScreenshot","getElementById","footer","setProperty","Promise","resolve","html2canvas","canvas","dataUrl","toDataURL","link","download","href","click","remove","e","reject","triggerNode","cloneElement","CameraOutlined","ThemeSwitcher","BulbFilled","onChange","url","parts","split","indexOfWebapps","indexOf","join","VersionSelector","appName","location","appVersion","getAppVersionFromUrl","startsWith","length","isPreviewVersion","isReleaseVersion","versions","code","name","getCurrentAppPath","show","process","env","NODE_ENV","currentVersion","find","v","appVersionCode","placement","arrow","menu","items","filter","map","key","label","className","alignItems","marginRight","CaretUpOutlined","ZENDESK_WIDGET_SCRIPT","ZendeskWidget","useDecaf","me","_useDecaf","publicConfig","open","_useState","setOpen","useEffect","zendesk","script","src","async","onload","zE","appendChild","zESettings","webWidget","offset","horizontal","vertical","contactForm","subject","fields","prefill","fullname","email","removeChild","QuestionCircleOutlined","routes","forEach","route","item","NavLink","end","buildAntMenuFromDecafMenu","result","push","DecafLayout","menuItems","matches","useMatches","useLocation","matchedMenuItems","match","pathname","anttheme","useToken","_useDecafTheme","setTheme","Header","justifyContent","gap","Title","level","border","flex","mode","selectedKeys","Content","Outlet","Footer","Row","justify","align","Col","span","textAlign","Text","target","rel","UserOutlined","username","PageAbout","client","undefined","versionBarista","setVersionBarista","barista","get","then","data","Space","direction","Descriptions","column","bordered","Item","appDescription","content","array","index","findIndex","defer","setAttribute","hostname","addTo","path","element","config","_props$config","aboutPageContent","menuWithAboutPage","InfoCircleOutlined","errorElement","router","createBrowserRouter","basename","_props$config2","basePath","controller","DecafWebappController","disableZendeskWidget","DecafApp","RouterProvider","useTableMaxHeight","elementId","bottomSpace","maxHeight","setMaxHeight","w","useLayoutEffect","calculate","parentPaddingBottom","closestContainer","parentElement","parseFloat","getComputedStyle","isNaN","getBoundingClientRect","max","innerHeight","boundingRect","bottomMargin","addEventListener","removeEventListener"],"mappings":"wYAIgBA,SAAAA,IACd,OAAOC,UAACC,cAAAC,EAAAA,OAAO,CAAAC,OAAO,MAAMC,MAAO,MAAOC,SAAU,+CACtD,UAE4BC,IAC1B,OACEN,UAAAC,cAACC,EAAAA,OAAM,CACLC,OAAO,MACPC,MAAO,QACPC,SACEL,EAAAA,QAAAC,cAAAD,EAAA,QAAAO,SAAA,KACEP,EAAA,QAAAC,cAACO,EAAUA,WAEE,KAAA,4GACbR,EAAAA,QAAAC,cAACQ,EAAIA,KAAA,CAACC,GAAG,KACPV,EAAA,QAAAC,cAACU,EAAAA,OAAM,CAACC,MAAO,CAAEC,UAAW,KAAwB,gBAMhE,qOCkCgBC,SAAAA,EAAmBC,EAAaC,GAC9C,IAAYC,GAAG,EAEA,MAAXF,EAAI,KACNA,EAAMA,EAAIG,MAAM,GAChBD,GAAW,GAGb,IAASE,EAAGC,SAASL,EAAK,IAEtBM,GAAKF,GAAO,IAAMH,EAElBK,EAAI,IAAKA,EAAI,IACRA,EAAI,IAAGA,EAAI,GAEpB,IAAIC,GAAMH,GAAO,EAAK,KAAUH,EAE5BM,EAAI,IAAKA,EAAI,IACRA,EAAI,IAAGA,EAAI,GAEpB,OAAe,IAANH,GAAkBH,EAK3B,OAHIO,EAAI,IAAKA,EAAI,IACRA,EAAI,IAAGA,EAAI,IAEZN,EAAW,IAAM,IAAMO,OAAO,UAAYD,EAAKD,GAAK,E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mBC,GACnD,MAAkCpP,WAA0B,KAArDqP,EAAWC,EAAAA,GAAAA,OACZC,EAAI3L,SAASK,eAAekL,GA8BlC,OA5BAK,EAAAA,gBAAgB,WACd,IAAeC,EAAG,WAChB,GAAKF,EAAL,CAGA,IACIG,EAAsB,GACJC,EAAGJ,EAAEK,cACvBD,IACFD,EAAsBG,WAAWC,iBAAiBH,EAAkB,MAAM/S,eAC1E8S,EAAsBK,MAAML,IAAwBA,EAAsB,GAAK,GAAKA,GAEtF,MAAqBA,EAPA,IAOsCN,GAAe,KACrDG,EAAES,wBACjBC,EAAM3M,OAAO4M,YAAcC,EAAa3M,IAAM4M,EACpDd,EAAaW,EAAM,IAAMA,EAAM,OAX9B,CAYH,EAMA,OAJAR,UACAF,GAAAA,EAAGc,iBAAiB,SAAUZ,GAC9BnM,OAAO+M,iBAAiB,SAAUZ,GAE3B,WACLnM,OAAOgN,oBAAoB,SAAUb,GACpC,MAADF,GAAAA,EAAGe,oBAAoB,SAAUb,EACnC,CACF,EAAG,CAACN,EAAWI,EAAGH,IAGpBC,CAAA"}
|
package/dist/index.modern.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{UpOutlined as e,DownOutlined as t,CameraOutlined as n,BulbFilled as o,CaretUpOutlined as r,QuestionCircleOutlined as l,UserOutlined as
|
|
1
|
+
import{UpOutlined as e,DownOutlined as t,CameraOutlined as n,BulbFilled as o,CaretUpOutlined as r,QuestionCircleOutlined as l,UserOutlined as a,InfoCircleOutlined as c}from"@ant-design/icons";import{useDecaf as i,DecafApp as d,DecafWebappController as s}from"@decafhub/decaf-react";import{Global as m,css as p}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import"antd/dist/reset.css";import u,{useState as g,useLayoutEffect as h,useEffect as f}from"react";import{Link as b,useMatches as w,useLocation as E,Outlet as k,NavLink as y,createBrowserRouter as v,RouterProvider as C}from"react-router-dom";import{Result as B,Typography as x,Button as z,theme as $,ConfigProvider as I,Dropdown as S,Layout as W,Menu as T,Row as N,Col as L,Space as D,Descriptions as P}from"antd";import A from"html2canvas";function j(){return u.createElement(B,{status:"404",title:"404",subTitle:"Sorry, the page you visited does not exist."})}function V(){return u.createElement(B,{status:"500",title:"Error",subTitle:u.createElement(u.Fragment,null,u.createElement(x,null,"Something went wrong. Please try again later. If the problem persists, please contact the administrator."),u.createElement(b,{to:"/"},u.createElement(z,{style:{marginTop:20}},"Back Home")))})}function F(){return F=Object.assign?Object.assign.bind():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},F.apply(this,arguments)}function M(e,t){const[n,o]=g(400),r=document.getElementById(e);return h(()=>{const e=()=>{if(!r)return;let e=80;const n=r.parentElement;n&&(e=parseFloat(getComputedStyle(n,null).paddingBottom),e=isNaN(e)||e<10?80:e);const l=e+50+(t||0),a=r.getBoundingClientRect(),c=window.innerHeight-a.top-l;o(c>350?c:"100%")};return e(),null==r||r.addEventListener("resize",e),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),null==r||r.removeEventListener("resize",e)}},[e,r,t]),n}function O(e,t){let n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);const o=parseInt(e,16);let r=(o>>16)+t;r>255?r=255:r<0&&(r=0);let l=(o>>8&255)+t;l>255?l=255:l<0&&(l=0);let a=(255&o)+t;return a>255?a=255:a<0&&(a=0),(n?"#":"")+String("000000"+(a|l<<8|r<<16).toString(16)).slice(-6)}function R(e){var t,n;return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Lato, sans-serif",margin:0},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:0},"#decaf-content":{paddingInline:20,paddingTop:"5rem",paddingBottom:"5rem"},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,background:null==(n=e.token)?void 0:n.colorBgContainer,paddingBlock:0,paddingInline:0,zIndex:999,button:{height:34}},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}}}}let H,_=e=>e;const G="#10161d",K="#2c3d50",U={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},X={hashed:!0,algorithm:[$.defaultAlgorithm],token:{borderRadius:0}},Y={hashed:!0,components:{Layout:{colorBgHeader:G},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:K},Input:F({},U,{colorBgContainer:K}),Select:F({},U,{colorBgContainer:K}),Checkbox:F({},U,{colorBgContainer:K}),Dropdown:F({},U),DatePicker:F({},U,{colorBgContainer:K,colorBgElevated:K}),InputNumber:F({},U,{colorBgContainer:K}),Menu:{colorItemText:"rgba(255, 255, 255, 0.5)"}},token:{fontFamily:"Lato, sans-serif",colorPrimary:"#344961",colorBgBase:"#1a242f",colorBgContainer:G,colorBgElevated:"#1a242f",colorBorderSecondary:"#1a242f",colorBorder:"#1a242f",colorBgLayout:"#1a242f",borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[$.darkAlgorithm]},Z=u.createContext({theme:"dark",toggleTheme:()=>{}});function q(e){const[t,n]=u.useState(()=>{const t=e.theme||localStorage.getItem("decafAppTheme");return"dark"===t||"light"===t?t:"dark"});let o="light"===t?X:Y;o=F({},o,e.themeConfig||{}),o=F({},o,{token:F({},o.token,{fontFamily:"Lato, sans-serif"})});const r="light"===t?function(e){return F({},R(e))}(o):function(e){var t,n,o,r,l,a,c,i,d,s,m,p,u,g,h,f;return F({},R(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:`${null==(o=e.token)?void 0:o.colorWhite} !important`},".ant-badge-count":{color:`${null==(r=e.token)?void 0:r.colorWhite} !important`},".ant-table-thead > tr > th":{background:`${O((null==(l=e.token)?void 0:l.colorBgContainer)||"",-5)} !important`,"&:hover":{background:`${null==(a=e.token)?void 0:a.colorBgContainer} !important`}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:`${null==(c=e.token)?void 0:c.colorBgBase} !important`},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:`${null==(i=e.token)?void 0:i.colorBgContainer} !important`}},".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":{color:`${null==(d=e.token)?void 0:d.colorWhite} !important`},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:`${null==(s=e.token)?void 0:s.colorWhite} !important`}},".ant-radio-button-wrapper-checked":{backgroundColor:`${null==(m=e.components)||null==(p=m.Button)?void 0:p.colorBgContainer} !important`,color:`${null==(u=e.token)?void 0:u.colorWhite} !important`},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:`${null==(g=e.token)?void 0:g.colorBgBase} !important`},".ant-picker-cell-inner":{background:`${null==(h=e.token)?void 0:h.colorBgBase} !important`}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:`${null==(f=e.token)?void 0:f.colorPrimary} !important`}}}})}(o);return u.createElement(Z.Provider,{value:{theme:t,toggleTheme:function(){const e="dark"===t?"light":"dark";n(e),localStorage.setItem("decafAppTheme",e)}}},u.createElement(I,{theme:o},u.createElement(m,{styles:p(H||(H=_`
|
|
2
2
|
@import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);
|
|
3
|
-
`))}),p.createElement(m,{styles:r}),e.children))}const q=()=>p.useContext(Y);function J(){return p.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:50,height:50},p.createElement("g",null,p.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),p.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),p.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),p.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),p.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),p.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),p.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function Q(){return p.createElement("div",null,p.createElement(B,{title:"Scroll to top",type:"text",size:"small",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),icon:p.createElement(e,null)}),p.createElement(B,{title:"Scroll to bottom",type:"text",size:"small",onClick:()=>window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"}),icon:p.createElement(t,null)}))}function ee(e){async function t(){const e=document.getElementById("decaf-footer");null==e||e.style.setProperty("display","none");const t=(await A(document.body)).toDataURL("image/png");null==e||e.style.setProperty("display","block");const n=document.createElement("a");n.download="screenshot.png",n.href=t,n.click(),n.remove()}return e.triggerNode?p.cloneElement(e.triggerNode,{onClick:t}):p.createElement(B,{title:"Take a screenshot of the current page",type:"text",size:"small",icon:p.createElement(n,null),onClick:t})}function te(e){return p.createElement(B,{title:"dark"===e.theme?"switch to light theme":"switch to dark theme",type:"text",size:"small",icon:p.createElement(o,{style:{color:"dark"===e.theme?"white":"black"}}),onClick:()=>e.onChange()})}function ne(e){const t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function oe(){const e=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+1]}(),t=function(e){return e.startsWith("preview-")&&e.length>8}(n=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}())?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n;var n;const o=[{code:"development",name:"Development Version",color:"red",url:`/webapps/${e}/development/${ne(window.location.href)}`,show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:`/webapps/${e}/testing/${ne(window.location.href)}`,show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:`/webapps/${e}/staging/${ne(window.location.href)}`,show:!0},{code:"production",name:"Production Version",color:"green",url:`/webapps/${e}/production/${ne(window.location.href)}`,show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],l=o.find(e=>e.code===t);return l?p.createElement(S,{placement:"top",arrow:!0,menu:{items:o.filter(e=>e.show).map(e=>({key:e.name,label:p.createElement("span",null,p.createElement("i",{className:`dot ${e.color}`})," ",e.name),onClick:()=>{window.location.href=e.url}}))}},p.createElement(B,{type:"text",size:"small"},p.createElement("div",{style:{display:"flex",alignItems:"center"}},p.createElement("i",{className:`dot ${null==l?void 0:l.color}`,style:{marginRight:5}}),"production"!==l.code&&p.createElement("span",{style:{marginRight:5}},"You are on ",p.createElement("b",null,l.name)),p.createElement(r,null)))):null}const re="https://static.zdassets.com/ekr/snippet.js";function le(){const{me:e,publicConfig:t}=i(),[n,o]=g(!1);return f(()=>{if(!t.zendesk||"undefined"==typeof document)return;const n=document.createElement("script");return n.src=re+"?key="+t.zendesk,n.async=!0,n.id="ze-snippet",n.onload=()=>{window.zE("webWidget","hide"),window.zE("webWidget:on","open",()=>{window.zE("webWidget","show"),o(!0)}),window.zE("webWidget:on","close",()=>{window.zE("webWidget","hide"),o(!1)})},document.body.appendChild(n),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":e.fullname}},{id:"email",prefill:{"*":e.email}}]}},()=>{document.body.removeChild(n)}},[t,e]),t.zendesk?p.createElement(B,{size:"small",icon:p.createElement(l,null),onClick:function(){n?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),o(!n)}},"Support"):null}function ce(e){const t=[];return e.forEach(e=>{const n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=p.createElement(w,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=p.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=ce(e.children||[])),t.push(n)}),t}function ae(e){const t=ce(e.menu),n=E().map(e=>e.pathname),{me:o}=i(),{token:r}=z.useToken(),{theme:l,toggleTheme:a}=q();return p.createElement($,{style:{height:"100%"}},p.createElement($.Header,{id:"decaf-header",style:{background:r.colorBgContainer}},p.createElement("div",{style:{paddingInline:20,display:"flex",justifyContent:"space-between",alignItems:"center"}},p.createElement(b,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},p.createElement(J,null),p.createElement(x.Title,{level:4,style:{margin:0}},e.appName)),p.createElement(W,{style:{justifyContent:"flex-end",backgroundColor:"transparent",border:"none",flex:1},mode:"horizontal",items:t,selectedKeys:n}))),p.createElement($.Content,{id:"decaf-content"},e.children),p.createElement($.Footer,{id:"decaf-footer"},p.createElement(T,{justify:"space-between",align:"middle"},p.createElement(N,{span:10},p.createElement(le,null)),p.createElement(N,{span:4,style:{textAlign:"center"}},p.createElement(x.Text,{type:"secondary"},"Powered by"," ",p.createElement("b",null,p.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube")))),p.createElement(N,{span:10,style:{justifyContent:"flex-end",display:"flex",gap:10}},p.createElement(B,{size:"small",icon:p.createElement(c,null)},o.username),p.createElement(oe,null),p.createElement(te,{theme:l,onChange:a}),p.createElement(ee,null),p.createElement(Q,null)))))}function ie(e){const{client:t}=i(),[n,o]=g(void 0);return f(()=>{t.barista.get("/version/").then(({data:e})=>o(e.version))},[t]),p.createElement(L,{direction:"vertical",size:"middle",style:{width:"100%"}},p.createElement(D,{title:"About",column:1,bordered:!0},p.createElement(D.Item,{label:"Web Application Name"},e.appName),p.createElement(D.Item,{label:"Web Application Description"},e.appDescription),p.createElement(D.Item,{label:"Web Application Version"},`v${e.appVersion}`),p.createElement(D.Item,{label:"DECAF Barista Version"},`v${n}`)),e.content)}function se(e,t){const n=[];return t.forEach(t=>{const o=P({},t);var r;t.children?(o.element=null!=(r=t.element)?r:p.createElement(v,null),o.children=se(e,t.children),o.errorElement=t.errorElement||p.createElement(V,null)):o.element=p.createElement(ae,{menu:e.menuItems,appName:e.appName},t.element),n.push(o)}),n}function de(e,t,n){const o=[...e];return t.forEach(e=>{const t=o.findIndex(t=>t[n]===e[n]);t>=0?o[t]=e:o.push(e)}),o}function me(e){var t,n;f(()=>{const e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]);let o=de(e.routes,[{path:"/about",element:p.createElement(ie,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:e.aboutPageContent})},{path:"*",element:p.createElement(j,null)}],"path");o=se(P({},e,{menuItems:de(e.menuItems,[{label:"About",to:"/about",icon:p.createElement(a,null)}],"to")}),o);const r=y(o,{basename:null==(n=e.config)?void 0:n.basePath}),l=e.controller||d;return l.disableZendeskWidget=!0,p.createElement(Z,{themeConfig:e.themeConfig,theme:e.theme},p.createElement(s,{config:e.config,controller:l},p.createElement(k,{router:r})))}export{me as DecafWebapp,X as decafThemeDark,U as decafThemeLight,F as useTableMaxHeight};
|
|
3
|
+
`))}),u.createElement(m,{styles:r}),e.children))}const J=()=>u.useContext(Z);function Q(){return u.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:50,height:50},u.createElement("g",null,u.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),u.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),u.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),u.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),u.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),u.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),u.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function ee(){return u.createElement("div",null,u.createElement(z,{title:"Scroll to top",type:"text",size:"small",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),icon:u.createElement(e,null)}),u.createElement(z,{title:"Scroll to bottom",type:"text",size:"small",onClick:()=>window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"}),icon:u.createElement(t,null)}))}function te(e){async function t(){const e=document.getElementById("decaf-footer");null==e||e.style.setProperty("display","none");const t=(await A(document.body)).toDataURL("image/png");null==e||e.style.setProperty("display","block");const n=document.createElement("a");n.download="screenshot.png",n.href=t,n.click(),n.remove()}return e.triggerNode?u.cloneElement(e.triggerNode,{onClick:t}):u.createElement(z,{title:"Take a screenshot of the current page",type:"text",size:"small",icon:u.createElement(n,null),onClick:t})}function ne(e){return u.createElement(z,{title:"dark"===e.theme?"switch to light theme":"switch to dark theme",type:"text",size:"small",icon:u.createElement(o,{style:{color:"dark"===e.theme?"white":"black"}}),onClick:()=>e.onChange()})}function oe(e){const t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function re(){const e=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+1]}(),t=function(e){return e.startsWith("preview-")&&e.length>8}(n=function(e){const t=window.location.href.split("/"),n=t.indexOf("webapps");return-1===n?"":t[n+2]}())?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n;var n;const o=[{code:"development",name:"Development Version",color:"red",url:`/webapps/${e}/development/${oe(window.location.href)}`,show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:`/webapps/${e}/testing/${oe(window.location.href)}`,show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:`/webapps/${e}/staging/${oe(window.location.href)}`,show:!0},{code:"production",name:"Production Version",color:"green",url:`/webapps/${e}/production/${oe(window.location.href)}`,show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],l=o.find(e=>e.code===t);return l?u.createElement(S,{placement:"top",arrow:!0,menu:{items:o.filter(e=>e.show).map(e=>({key:e.name,label:u.createElement("span",null,u.createElement("i",{className:`dot ${e.color}`})," ",e.name),onClick:()=>{window.location.href=e.url}}))}},u.createElement(z,{type:"text",size:"small"},u.createElement("div",{style:{display:"flex",alignItems:"center"}},u.createElement("i",{className:`dot ${null==l?void 0:l.color}`,style:{marginRight:5}}),"production"!==l.code&&u.createElement("span",{style:{marginRight:5}},"You are on ",u.createElement("b",null,l.name)),u.createElement(r,null)))):null}const le="https://static.zdassets.com/ekr/snippet.js";function ae(){const{me:e,publicConfig:t}=i(),[n,o]=g(!1);return f(()=>{if(!t.zendesk||"undefined"==typeof document)return;const n=document.createElement("script");return n.src=le+"?key="+t.zendesk,n.async=!0,n.id="ze-snippet",n.onload=()=>{window.zE("webWidget","hide"),window.zE("webWidget:on","open",()=>{window.zE("webWidget","show"),o(!0)}),window.zE("webWidget:on","close",()=>{window.zE("webWidget","hide"),o(!1)})},document.body.appendChild(n),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":e.fullname}},{id:"email",prefill:{"*":e.email}}]}},()=>{document.body.removeChild(n)}},[t,e]),t.zendesk?u.createElement(z,{size:"small",icon:u.createElement(l,null),onClick:function(){n?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),o(!n)}},"Support"):null}function ce(e){const t=[];return e.forEach(e=>{const n={key:"to"in e?e.to:e.label,label:e.label,icon:e.icon};"to"in e&&e.to?n.label=u.createElement(y,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=u.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=ce(e.children||[])),t.push(n)}),t}function ie(e){const t=ce(e.menu),n=w(),o=E(),r=n.map(e=>e.pathname).filter(e=>"/"===o.pathname||"/"!==e),{me:l}=i(),{token:c}=$.useToken(),{theme:d,toggleTheme:s}=J();return u.createElement(W,{style:{height:"100%"}},u.createElement(W.Header,{id:"decaf-header",style:{background:c.colorBgContainer}},u.createElement("div",{style:{paddingInline:20,display:"flex",justifyContent:"space-between",alignItems:"center"}},u.createElement(b,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},u.createElement(Q,null),u.createElement(x.Title,{level:4,style:{margin:0}},e.appName)),u.createElement(T,{style:{justifyContent:"flex-end",backgroundColor:"transparent",border:"none",flex:1},mode:"horizontal",items:t,selectedKeys:r}))),u.createElement(W.Content,{id:"decaf-content"},u.createElement(k,null)),u.createElement(W.Footer,{id:"decaf-footer"},u.createElement(N,{justify:"space-between",align:"middle"},u.createElement(L,{span:10},u.createElement(ae,null)),u.createElement(L,{span:4,style:{textAlign:"center"}},u.createElement(x.Text,{type:"secondary"},"Powered by"," ",u.createElement("b",null,u.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube")))),u.createElement(L,{span:10,style:{justifyContent:"flex-end",display:"flex",gap:10}},u.createElement(z,{size:"small",icon:u.createElement(a,null)},l.username),u.createElement(re,null),u.createElement(ne,{theme:d,onChange:s}),u.createElement(te,null),u.createElement(ee,null)))))}function de(e){const{client:t}=i(),[n,o]=g(void 0);return f(()=>{t.barista.get("/version/").then(({data:e})=>o(e.version))},[t]),u.createElement(D,{direction:"vertical",size:"middle",style:{width:"100%"}},u.createElement(P,{title:"About",column:1,bordered:!0},u.createElement(P.Item,{label:"Web Application Name"},e.appName),u.createElement(P.Item,{label:"Web Application Description"},e.appDescription),u.createElement(P.Item,{label:"Web Application Version"},`v${e.appVersion}`),u.createElement(P.Item,{label:"DECAF Barista Version"},`v${n}`)),e.content)}function se(e,t,n){const o=[...e];return t.forEach(e=>{const t=o.findIndex(t=>t[n]===e[n]);t>=0?o[t]=e:o.push(e)}),o}function me(e){var t,n;f(()=>{const e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]);let o=se(e.routes,[{path:"/about",element:u.createElement(de,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:e.aboutPageContent})},{path:"*",element:u.createElement(j,null)}],"path");const r=se(e.menuItems,[{label:"About",to:"/about",icon:u.createElement(c,null)}],"to");o=[{element:u.createElement(ie,{menu:r,appName:e.appName}),path:"/",children:o,errorElement:u.createElement(V,null)}];const l=v(o,{basename:null==(n=e.config)?void 0:n.basePath}),a=e.controller||s;return a.disableZendeskWidget=!0,u.createElement(q,{themeConfig:e.themeConfig,theme:e.theme},u.createElement(d,{config:e.config,controller:a},u.createElement(C,{router:l})))}export{me as DecafWebapp,Y as decafThemeDark,X as decafThemeLight,M as useTableMaxHeight};
|
|
4
4
|
//# sourceMappingURL=index.modern.mjs.map
|