@misk/components
Advanced tools
Comparing version 0.0.48 to 0.0.49
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("@blueprintjs/core"),require("styled-components"),require("@blueprintjs/icons"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["react","@blueprintjs/core","styled-components","@blueprintjs/icons","react-router-dom"],n):"object"==typeof exports?exports.Components=n(require("react"),require("@blueprintjs/core"),require("styled-components"),require("@blueprintjs/icons"),require("react-router-dom")):(e.Misk=e.Misk||{},e.Misk.Components=n(e.React,e.Blueprint.Core,e.StyledComponents,e.Blueprint.Icons,e.ReactRouterDom))}("undefined"!=typeof self?self:this,function(e,n,t,r,o){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=6)}([function(e,n,t){"use strict";t.r(n),t.d(n,"__extends",function(){return o}),t.d(n,"__assign",function(){return a}),t.d(n,"__rest",function(){return i}),t.d(n,"__decorate",function(){return c}),t.d(n,"__param",function(){return u}),t.d(n,"__metadata",function(){return l}),t.d(n,"__awaiter",function(){return p}),t.d(n,"__generator",function(){return f}),t.d(n,"__exportStar",function(){return d}),t.d(n,"__values",function(){return s}),t.d(n,"__read",function(){return m}),t.d(n,"__spread",function(){return x}),t.d(n,"__await",function(){return b}),t.d(n,"__asyncGenerator",function(){return _}),t.d(n,"__asyncDelegator",function(){return h}),t.d(n,"__asyncValues",function(){return y}),t.d(n,"__makeTemplateObject",function(){return v}),t.d(n,"__importStar",function(){return g}),t.d(n,"__importDefault",function(){return w}); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("@blueprintjs/core"),require("styled-components"),require("@blueprintjs/icons"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["react","@blueprintjs/core","styled-components","@blueprintjs/icons","react-router-dom"],n):"object"==typeof exports?exports.Components=n(require("react"),require("@blueprintjs/core"),require("styled-components"),require("@blueprintjs/icons"),require("react-router-dom")):(e.Misk=e.Misk||{},e.Misk.Components=n(e.React,e.Blueprint.Core,e.StyledComponents,e.Blueprint.Icons,e.ReactRouterDom))}("undefined"!=typeof self?self:this,function(e,n,t,r,o){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=6)}([function(e,n,t){"use strict";t.r(n),t.d(n,"__extends",function(){return o}),t.d(n,"__assign",function(){return a}),t.d(n,"__rest",function(){return i}),t.d(n,"__decorate",function(){return u}),t.d(n,"__param",function(){return c}),t.d(n,"__metadata",function(){return l}),t.d(n,"__awaiter",function(){return p}),t.d(n,"__generator",function(){return f}),t.d(n,"__exportStar",function(){return d}),t.d(n,"__values",function(){return s}),t.d(n,"__read",function(){return m}),t.d(n,"__spread",function(){return x}),t.d(n,"__await",function(){return _}),t.d(n,"__asyncGenerator",function(){return b}),t.d(n,"__asyncDelegator",function(){return h}),t.d(n,"__asyncValues",function(){return y}),t.d(n,"__makeTemplateObject",function(){return g}),t.d(n,"__importStar",function(){return v}),t.d(n,"__importDefault",function(){return w}); | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function o(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var a=function(){return(a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function i(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t}function c(e,n,t,r){var o,a=arguments.length,i=a<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,n,t,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(n,t,i):o(n,t))||i);return a>3&&i&&Object.defineProperty(n,t,i),i}function u(e,n){return function(t,r){n(t,r,e)}}function l(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function p(e,n,t,r){return new(t||(t=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new t(function(n){n(e.value)}).then(i,c)}u((r=r.apply(e,n||[])).next())})}function f(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function d(e,n){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}function s(e){var n="function"==typeof Symbol&&e[Symbol.iterator],t=0;return n?n.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}function m(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,a=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(o)throw o.error}}return i}function x(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(m(arguments[n]));return e}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function _(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=t.apply(e,n||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(n){return new Promise(function(t,r){a.push([e,n,t,r])>1||c(e,n)})})}function c(e,n){try{!function(e){e.value instanceof b?Promise.resolve(e.value.v).then(u,l):p(a[0][2],e)}(o[e](n))}catch(e){p(a[0][3],e)}}function u(e){c("next",e)}function l(e){c("throw",e)}function p(e,n){e(n),a.shift(),a.length&&c(a[0][0],a[0][1])}}function h(e){var n,t;return n={},r("next"),r("throw",function(e){throw e}),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,o){n[r]=e[r]?function(n){return(t=!t)?{value:b(e[r](n)),done:"return"===r}:o?o(n):n}:o}}function y(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e=s(e),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,o){(function(e,n,t,r){Promise.resolve(r).then(function(n){e({value:n,done:t})},n)})(r,o,(n=e[t](n)).done,n.value)})}}}function v(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e}function g(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function w(e){return e&&e.__esModule?e:{default:e}}},function(n,t){n.exports=e},function(e,t){e.exports=n},function(e,n){e.exports=t},function(e,n){e.exports=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t(0).__exportStar(t(14),n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0);r.__exportStar(t(7),n),r.__exportStar(t(5),n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0);r.__exportStar(t(8),n),r.__exportStar(t(9),n),r.__exportStar(t(10),n),r.__exportStar(t(11),n),r.__exportStar(t(12),n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0).__importStar(t(1));n.NoMatchComponent=function(e){return r.createElement("div",null,e.prefix,": No Match Found")}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),o=t(2),a=t(4),i=r.__importStar(t(1));n.OfflineComponent=function(e){return i.createElement(o.NonIdealState,{icon:e.icon?e.icon:a.IconNames.OFFLINE,title:e.title?e.title:"Loading Error",description:e.endpoint?"The following server endpoint(s) are unavailable: "+e.endpoint+".":e.description?e.description:"A server endpoint is unavailable."},i.createElement(o.Card,null,i.createElement("h5",{className:o.Classes.SKELETON},"Your head is not an artifact!"),i.createElement("p",{className:o.Classes.SKELETON},"Maybe we better talk out here; the observation lounge has turned into a swamp. Some days you get the bear, and some days the bear gets you.")))}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0).__importStar(t(1));n.PathDebugComponent=function(e){return r.createElement("div",null,r.createElement("p",null,"hash: ",e.hash),r.createElement("p",null,"pathname: ",e.pathname),r.createElement("p",null,"search: ",e.search))}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=t(0),a=t(2),i=o.__importStar(t(1)),c=o.__importDefault(t(3)).default.div(r||(r=o.__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"])));n.SidebarComponent=function(e){return i.createElement(c,null,i.createElement(a.Menu,null,function(e){return e.map(function(e){return i.createElement(a.MenuItem,{key:e.slug,href:e.url_path_prefix,className:"",text:e.category+" :: "+e.name})})}(e.adminTabs)))}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o,a,i,c,u,l,p,f,d,s,m,x,b,_=t(0),h=t(2),y=t(4),v=_.__importStar(t(1)),g=t(13),w=_.__importDefault(t(3)),O=t(5),j=w.default(h.Navbar)(r||(r=_.__makeTemplateObject(["\n background-color: #29333a;\n min-height: 74px;\n margin-bottom: 20px;\n box-sizing: border-box;\n border: 1px solid #14191c;\n padding-top: 10px;\n position: fixed;\n top: 0px;\n z-index: 1010;\n"],["\n background-color: #29333a;\n min-height: 74px;\n margin-bottom: 20px;\n box-sizing: border-box;\n border: 1px solid #14191c;\n padding-top: 10px;\n position: fixed;\n top: 0px;\n z-index: 1010;\n"]))),k=w.default(h.NavbarGroup)(o||(o=_.__makeTemplateObject(["\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 20px;\n position: relative;\n color: #9da2a6;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n @media (max-width: 870px) {\n padding-left: 60px;\n }\n @media (min-width: 992px) and (max-width: 1085px) {\n padding-left: 60px;\n }\n @media (min-width: 1200px) and (max-width: 1285px) {\n padding-left: 60px;\n }\n"],["\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 20px;\n position: relative;\n color: #9da2a6;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n @media (max-width: 870px) {\n padding-left: 60px;\n }\n @media (min-width: 992px) and (max-width: 1085px) {\n padding-left: 60px;\n }\n @media (min-width: 1200px) and (max-width: 1285px) {\n padding-left: 60px;\n }\n"]))),S=w.default(h.NavbarHeading)(a||(a=_.__makeTemplateObject(["\n font-size: 24px;\n text-decoration: none;\n text-transform: uppercase;\n letter-spacing: 0px;\n padding-top: 25px;\n padding-bottom: 27px;\n color: #cecece\n"],["\n font-size: 24px;\n text-decoration: none;\n text-transform: uppercase;\n letter-spacing: 0px;\n padding-top: 25px;\n padding-bottom: 27px;\n color: #cecece\n"]))),E=w.default(g.Link)(i||(i=_.__makeTemplateObject(["\n font-size: 16px;\n font-weight: 500;\n color: #9da2a6;\n text-decoration: none;\n letter-spacing: 1px;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n"],["\n font-size: 16px;\n font-weight: 500;\n color: #9da2a6;\n text-decoration: none;\n letter-spacing: 1px;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n"]))),M=w.default(E)(c||(c=_.__makeTemplateObject(["\n text-transform: uppercase;\n padding-top: 30px;\n padding-bottom: 27px;\n"],["\n text-transform: uppercase;\n padding-top: 30px;\n padding-bottom: 27px;\n"]))),P=w.default(h.NavbarDivider)(u||(u=_.__makeTemplateObject(["\n border: none\n"],["\n border: none\n"]))),C=w.default(h.Button)(l||(l=_.__makeTemplateObject(["\n background-color: #29333a !important;\n box-shadow: none !important;\n background-image: none !important;\n top: 15px;\n left: 15px;\n position: absolute;\n z-index: 1020;\n"],["\n background-color: #29333a !important;\n box-shadow: none !important;\n background-image: none !important;\n top: 15px;\n left: 15px;\n position: absolute;\n z-index: 1020;\n"]))),T=w.default(h.Icon)(p||(p=_.__makeTemplateObject(["\n color: #9da2a6 !important;\n &:hover {\n color: #fff;\n }\n"],["\n color: #9da2a6 !important;\n &:hover {\n color: #fff;\n }\n"]))),N=w.default(h.Collapse)(f||(f=_.__makeTemplateObject(["\n color: #fff;\n background-color: #29333a;\n display: block;\n margin: 60px -20px 0 -20px;\n"],["\n color: #fff;\n background-color: #29333a;\n display: block;\n margin: 60px -20px 0 -20px;\n"]))),I=w.default.div(d||(d=_.__makeTemplateObject(["\n min-height: 250px;\n @media (max-width: 768px) {\n padding: 0 20px 20px 20px;\n }\n"],["\n min-height: 250px;\n @media (max-width: 768px) {\n padding: 0 20px 20px 20px;\n }\n"]))),z=w.default.div(s||(s=_.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding-bottom: 35px;\n"],["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding-bottom: 35px;\n"]))),R=w.default(E)(m||(m=_.__makeTemplateObject(["\n flex-basis: 300px;\n padding: 5px 0;\n color: #cecece;\n"],["\n flex-basis: 300px;\n padding: 5px 0;\n color: #cecece;\n"]))),q=w.default.span(x||(x=_.__makeTemplateObject(["\n font-size: 24px;\n color: #9da2a6;\n letter-spacing: 0px; \n display: block;\n"],["\n font-size: 24px;\n color: #9da2a6;\n letter-spacing: 0px; \n display: block;\n"]))),D=w.default.hr(b||(b=_.__makeTemplateObject(["\n border-color: #9da2a6;\n margin: 5px 0 10px 0;\n"],["\n border-color: #9da2a6;\n margin: 5px 0 10px 0;\n"]))),L=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={isOpen:!1},n.handleClick=function(){n.setState(_.__assign({},n.state,{isOpen:!n.state.isOpen}))},n.groupBy=function(e,n){return e.reduce(function(e,t){var r;return _.__assign({},e,((r={})[t[n]]=(e[t[n]]||[]).concat([t]),r))},{})},n.sortBy=function(e,n){return e.sort(function(e,t){return e[n]<t[n]?-1:e[n]>t[n]?1:0})},n}return _.__extends(n,e),n.prototype.render=function(){var e=this.state.isOpen,n=this.props,t=n.links,r=n.serviceMetadata;return v.createElement(j,null,v.createElement(C,{onClick:this.handleClick},v.createElement(T,{iconSize:32,icon:e?y.IconNames.CROSS:y.IconNames.MENU})),v.createElement(O.ResponsiveContainer,null,v.createElement(k,{align:h.Alignment.LEFT,className:"bp3-dark"},this.renderMenuLink(r),v.createElement(P,null))),v.createElement(N,{isOpen:e,keepChildrenMounted:!0},v.createElement(O.ResponsiveContainer,null,v.createElement(I,null,t?this.renderMenuCategories(t):v.createElement("span",null,"Loading...")))))},n.prototype.renderMenuLink=function(e){return e?v.createElement(M,{to:e.url},v.createElement(S,null,e.name)):(console.log("[MISK][WARN] Multibind ServiceMetadata in service module to pass service name, link, and environment to dashboard."),v.createElement(S,null,"Misk"))},n.prototype.renderMenuCategories=function(e){var n=this;return Object.entries(this.groupBy(e,"category")).map(function(e){var t=e[0],r=e[1];return n.renderMenuCategory(t,r)})},n.prototype.renderMenuCategory=function(e,n){var t=this,r=this.sortBy(n,"name").filter(function(e){return""!==e.category});return v.createElement("div",null,v.createElement(q,null,e),v.createElement(D,null),v.createElement(z,null,r.map(function(e){return v.createElement(R,{key:e.slug,onClick:t.handleClick,to:e.url_path_prefix},e.name)})))},n}(v.Component);n.TopbarComponent=L},function(e,n){e.exports=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=t(0),a=o.__importDefault(t(3));n.ResponsiveContainer=a.default.div(r||(r=o.__makeTemplateObject(["\n margin: 0 auto;\n @media (min-width: 768px) {\n width: 750px;\n }\n @media (min-width: 992px) {\n width: 970px;\n }\n @media (min-width: 1200px) {\n width: 1170px;\n }\n"],["\n margin: 0 auto;\n @media (min-width: 768px) {\n width: 750px;\n }\n @media (min-width: 992px) {\n width: 970px;\n }\n @media (min-width: 1200px) {\n width: 1170px;\n }\n"])))}])}); | ||
var r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function o(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var a=function(){return(a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function i(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&(t[r[o]]=e[r[o]])}return t}function u(e,n,t,r){var o,a=arguments.length,i=a<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,n,t,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(a<3?o(i):a>3?o(n,t,i):o(n,t))||i);return a>3&&i&&Object.defineProperty(n,t,i),i}function c(e,n){return function(t,r){n(t,r,e)}}function l(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function p(e,n,t,r){return new(t||(t=Promise))(function(o,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function u(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?o(e.value):new t(function(n){n(e.value)}).then(i,u)}c((r=r.apply(e,n||[])).next())})}function f(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function d(e,n){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}function s(e){var n="function"==typeof Symbol&&e[Symbol.iterator],t=0;return n?n.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}function m(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,a=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=a.return)&&t.call(a)}finally{if(o)throw o.error}}return i}function x(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(m(arguments[n]));return e}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function b(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=t.apply(e,n||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(n){return new Promise(function(t,r){a.push([e,n,t,r])>1||u(e,n)})})}function u(e,n){try{!function(e){e.value instanceof _?Promise.resolve(e.value.v).then(c,l):p(a[0][2],e)}(o[e](n))}catch(e){p(a[0][3],e)}}function c(e){u("next",e)}function l(e){u("throw",e)}function p(e,n){e(n),a.shift(),a.length&&u(a[0][0],a[0][1])}}function h(e){var n,t;return n={},r("next"),r("throw",function(e){throw e}),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,o){n[r]=e[r]?function(n){return(t=!t)?{value:_(e[r](n)),done:"return"===r}:o?o(n):n}:o}}function y(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e=s(e),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,o){(function(e,n,t,r){Promise.resolve(r).then(function(n){e({value:n,done:t})},n)})(r,o,(n=e[t](n)).done,n.value)})}}}function g(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e}function v(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function w(e){return e&&e.__esModule?e:{default:e}}},function(n,t){n.exports=e},function(e,t){e.exports=n},function(e,n){e.exports=t},function(e,n){e.exports=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t(0).__exportStar(t(14),n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0);r.__exportStar(t(7),n),r.__exportStar(t(5),n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0);r.__exportStar(t(8),n),r.__exportStar(t(9),n),r.__exportStar(t(10),n),r.__exportStar(t(11),n),r.__exportStar(t(12),n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0).__importStar(t(1));n.NoMatchComponent=function(e){return r.createElement("div",null,e.prefix,": No Match Found")}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),o=t(2),a=t(4),i=r.__importStar(t(1));n.OfflineComponent=function(e){return i.createElement(o.NonIdealState,{icon:e.icon?e.icon:a.IconNames.OFFLINE,title:e.title?e.title:"Loading Error",description:e.endpoint?"The following server endpoint(s) are unavailable: "+e.endpoint+".":e.description?e.description:"A server endpoint is unavailable."},i.createElement(o.Card,null,i.createElement("h5",{className:o.Classes.SKELETON},"Your head is not an artifact!"),i.createElement("p",{className:o.Classes.SKELETON},"Maybe we better talk out here; the observation lounge has turned into a swamp. Some days you get the bear, and some days the bear gets you.")))}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0).__importStar(t(1));n.PathDebugComponent=function(e){return r.createElement("div",null,r.createElement("p",null,"hash: ",e.hash),r.createElement("p",null,"pathname: ",e.pathname),r.createElement("p",null,"search: ",e.search))}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=t(0),a=t(2),i=o.__importStar(t(1)),u=o.__importDefault(t(3)).default.div(r||(r=o.__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"])));n.SidebarComponent=function(e){return i.createElement(u,null,i.createElement(a.Menu,null,function(e){return e.map(function(e){return i.createElement(a.MenuItem,{key:e.slug,href:e.url_path_prefix,className:"",text:e.category+" :: "+e.name})})}(e.adminTabs)))}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o,a,i,u,c,l,p,f,d,s,m,x,_,b=t(0),h=t(2),y=t(4),g=b.__importStar(t(1)),v=t(13),w=b.__importDefault(t(3)),O=t(5),j=w.default(h.Navbar)(r||(r=b.__makeTemplateObject(["\n background-color: #29333a;\n min-height: 74px;\n margin-bottom: 20px;\n box-sizing: border-box;\n border: 1px solid #14191c;\n padding-top: 10px;\n position: fixed;\n top: 0px;\n z-index: 1010;\n"],["\n background-color: #29333a;\n min-height: 74px;\n margin-bottom: 20px;\n box-sizing: border-box;\n border: 1px solid #14191c;\n padding-top: 10px;\n position: fixed;\n top: 0px;\n z-index: 1010;\n"]))),k=w.default(h.NavbarGroup)(o||(o=b.__makeTemplateObject(["\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 20px;\n position: relative;\n color: #9da2a6;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n @media (max-width: 870px) {\n padding-left: 60px;\n }\n @media (min-width: 992px) and (max-width: 1085px) {\n padding-left: 60px;\n }\n @media (min-width: 1200px) and (max-width: 1285px) {\n padding-left: 60px;\n }\n"],["\n font-size: 13px !important;\n font-weight: 600 !important;\n line-height: 20px;\n position: relative;\n color: #9da2a6;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n @media (max-width: 870px) {\n padding-left: 60px;\n }\n @media (min-width: 992px) and (max-width: 1085px) {\n padding-left: 60px;\n }\n @media (min-width: 1200px) and (max-width: 1285px) {\n padding-left: 60px;\n }\n"]))),S=w.default(h.NavbarHeading)(a||(a=b.__makeTemplateObject(["\n font-size: 24px;\n text-decoration: none;\n text-transform: uppercase;\n letter-spacing: 0px;\n padding-top: 25px;\n padding-bottom: 27px;\n color: #cecece\n"],["\n font-size: 24px;\n text-decoration: none;\n text-transform: uppercase;\n letter-spacing: 0px;\n padding-top: 25px;\n padding-bottom: 27px;\n color: #cecece\n"]))),E=w.default(v.Link)(i||(i=b.__makeTemplateObject(["\n font-size: 16px;\n font-weight: 500;\n color: #9da2a6;\n text-decoration: none;\n letter-spacing: 1px;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n"],["\n font-size: 16px;\n font-weight: 500;\n color: #9da2a6;\n text-decoration: none;\n letter-spacing: 1px;\n &:hover {\n color: #fff;\n text-decoration: none;\n }\n"]))),M=w.default(E)(u||(u=b.__makeTemplateObject(["\n text-transform: uppercase;\n padding-top: 30px;\n padding-bottom: 27px;\n"],["\n text-transform: uppercase;\n padding-top: 30px;\n padding-bottom: 27px;\n"]))),P=w.default(h.NavbarDivider)(c||(c=b.__makeTemplateObject(["\n border: none\n"],["\n border: none\n"]))),C=w.default(h.Button)(l||(l=b.__makeTemplateObject(["\n background-color: #29333a !important;\n box-shadow: none !important;\n background-image: none !important;\n top: 15px;\n left: 15px;\n position: absolute;\n z-index: 1020;\n"],["\n background-color: #29333a !important;\n box-shadow: none !important;\n background-image: none !important;\n top: 15px;\n left: 15px;\n position: absolute;\n z-index: 1020;\n"]))),T=w.default(h.Icon)(p||(p=b.__makeTemplateObject(["\n color: #9da2a6 !important;\n &:hover {\n color: #fff;\n }\n"],["\n color: #9da2a6 !important;\n &:hover {\n color: #fff;\n }\n"]))),N=w.default(h.Collapse)(f||(f=b.__makeTemplateObject(["\n color: #fff;\n background-color: #29333a;\n display: block;\n margin: 60px -20px 0 -20px;\n"],["\n color: #fff;\n background-color: #29333a;\n display: block;\n margin: 60px -20px 0 -20px;\n"]))),z=w.default.div(d||(d=b.__makeTemplateObject(["\n min-height: 250px;\n @media (max-width: 768px) {\n padding: 0 20px 20px 20px;\n }\n"],["\n min-height: 250px;\n @media (max-width: 768px) {\n padding: 0 20px 20px 20px;\n }\n"]))),I=w.default.div(s||(s=b.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding-bottom: 35px;\n"],["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding-bottom: 35px;\n"]))),R=w.default(E)(m||(m=b.__makeTemplateObject(["\n flex-basis: 300px;\n padding: 5px 0;\n color: #cecece;\n"],["\n flex-basis: 300px;\n padding: 5px 0;\n color: #cecece;\n"]))),q=w.default.span(x||(x=b.__makeTemplateObject(["\n font-size: 24px;\n color: #9da2a6;\n letter-spacing: 0px; \n display: block;\n"],["\n font-size: 24px;\n color: #9da2a6;\n letter-spacing: 0px; \n display: block;\n"]))),D=w.default.hr(_||(_=b.__makeTemplateObject(["\n border-color: #9da2a6;\n margin: 5px 0 10px 0;\n"],["\n border-color: #9da2a6;\n margin: 5px 0 10px 0;\n"]))),L=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={isOpen:!1},n.handleClick=function(){n.setState(b.__assign({},n.state,{isOpen:!n.state.isOpen}))},n.groupBy=function(e,n){return e.reduce(function(e,t){var r;return b.__assign({},e,((r={})[t[n]]=(e[t[n]]||[]).concat([t]),r))},{})},n.sortBy=function(e,n){return e.sort(function(e,t){return e[n]<t[n]?-1:e[n]>t[n]?1:0})},n}return b.__extends(n,e),n.prototype.render=function(){var e=this.state.isOpen,n=this.props,t=n.links,r=n.serviceMetadata;return g.createElement(j,null,g.createElement(C,{onClick:this.handleClick},g.createElement(T,{iconSize:32,icon:e?y.IconNames.CROSS:y.IconNames.MENU})),g.createElement(O.ResponsiveContainer,null,g.createElement(k,{align:h.Alignment.LEFT,className:"bp3-dark"},this.renderMenuLink(r),g.createElement(P,null))),g.createElement(N,{isOpen:e,keepChildrenMounted:!0},g.createElement(O.ResponsiveContainer,null,g.createElement(z,null,t?this.renderMenuCategories(t):g.createElement("span",null,"Loading...")))))},n.prototype.renderMenuLink=function(e){return e?g.createElement(M,{to:e.url},g.createElement(S,null,e.name)):g.createElement(S,null,"Misk")},n.prototype.renderMenuCategories=function(e){var n=this;return Object.entries(this.groupBy(e,"category")).map(function(e){var t=e[0],r=e[1];return n.renderMenuCategory(t,r)})},n.prototype.renderMenuCategory=function(e,n){var t=this,r=this.sortBy(n,"name").filter(function(e){return""!==e.category});return g.createElement("div",null,g.createElement(q,null,e),g.createElement(D,null),g.createElement(I,null,r.map(function(e){return g.createElement(R,{key:e.slug,onClick:t.handleClick,to:e.url_path_prefix},e.name)})))},n}(g.Component);n.TopbarComponent=L},function(e,n){e.exports=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=t(0),a=o.__importDefault(t(3));n.ResponsiveContainer=a.default.div(r||(r=o.__makeTemplateObject(["\n margin: 0 auto;\n @media (min-width: 768px) {\n width: 750px;\n }\n @media (min-width: 992px) {\n width: 970px;\n }\n @media (min-width: 1200px) {\n width: 1170px;\n }\n"],["\n margin: 0 auto;\n @media (min-width: 768px) {\n width: 750px;\n }\n @media (min-width: 992px) {\n width: 970px;\n }\n @media (min-width: 1200px) {\n width: 1170px;\n }\n"])))}])}); | ||
//# sourceMappingURL=components.js.map |
{ | ||
"name": "@misk/components", | ||
"version": "0.0.48", | ||
"version": "0.0.49", | ||
"description": "Microservice Kontainer Common Components", | ||
@@ -5,0 +5,0 @@ "author": "Square/Misk Authors (https://github.com/square/misk/graphs/contributors)", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61081
131