@flarehr/superhero-pba-support-admin 1.0.1
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/README.md +19 -0
- package/dist/assets/icon.png +0 -0
- package/dist/superhero-pba-support-admin.js +1 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# pba-support-admin
|
|
2
|
+
|
|
3
|
+
## CLI Commands
|
|
4
|
+
* `npm install`: Installs dependencies
|
|
5
|
+
|
|
6
|
+
* `npm run dev`: Run a development, HMR server
|
|
7
|
+
|
|
8
|
+
* `npm run serve`: Run a production-like server
|
|
9
|
+
|
|
10
|
+
* `npm run build`: Production-ready build
|
|
11
|
+
|
|
12
|
+
* `npm run lint`: Pass TypeScript files using ESLint
|
|
13
|
+
|
|
14
|
+
* `npm run test`: Run Jest and Enzyme with
|
|
15
|
+
[`enzyme-adapter-preact-pure`](https://github.com/preactjs/enzyme-adapter-preact-pure) for
|
|
16
|
+
your tests
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={383:(t,e,n)=>{n.d(e,{Z:()=>l});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([t.id,'/*! tailwindcss v3.1.3 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}',""]);const l=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(a[c]=!0)}for(var s=0;s<t.length;s++){var u=[].concat(t[s]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},81:t=>{t.exports=function(t){return t[1]}},42:(t,e,n)=>{n.r(e),n.d(e,{Link:()=>C,Route:()=>S,Router:()=>x,default:()=>O,exec:()=>a,getCurrentUrl:()=>h,route:()=>v,subscribers:()=>_});var r=n(400),o={};function i(t,e){for(var n in e)t[n]=e[n];return t}function a(t,e,n){var r,i=/(?:\?([^#]*))?(#.*)?$/,a=t.match(i),l={};if(a&&a[1])for(var c=a[1].split("&"),u=0;u<c.length;u++){var p=c[u].split("=");l[decodeURIComponent(p[0])]=decodeURIComponent(p.slice(1).join("="))}t=s(t.replace(i,"")),e=s(e||"");for(var f=Math.max(t.length,e.length),_=0;_<f;_++)if(e[_]&&":"===e[_].charAt(0)){var d=e[_].replace(/(^:|[+*?]+$)/g,""),h=(e[_].match(/[+*?]+$/)||o)[0]||"",v=~h.indexOf("+"),y=~h.indexOf("*"),b=t[_]||"";if(!b&&!y&&(h.indexOf("?")<0||v)){r=!1;break}if(l[d]=decodeURIComponent(b),v||y){l[d]=t.slice(_).map(decodeURIComponent).join("/");break}}else if(e[_]!==t[_]){r=!1;break}return(!0===n.default||!1!==r)&&l}function l(t,e){return t.rank<e.rank?1:t.rank>e.rank?-1:t.index-e.index}function c(t,e){return t.index=e,t.rank=function(t){return t.props.default?0:s(t.props.path).map(u).join("")}(t),t.props}function s(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")}function u(t){return":"==t.charAt(0)?1+"*+?".indexOf(t.charAt(t.length-1))||4:5}var p=null,f=[],_=[],d={};function h(){var t;return""+((t=p&&p.location?p.location:p&&p.getCurrentLocation?p.getCurrentLocation():"undefined"!=typeof location?location:d).pathname||"")+(t.search||"")}function v(t,e){return void 0===e&&(e=!1),"string"!=typeof t&&t.url&&(e=t.replace,t=t.url),function(t){for(var e=f.length;e--;)if(f[e].canRoute(t))return!0;return!1}(t)&&function(t,e){void 0===e&&(e="push"),p&&p[e]?p[e](t):"undefined"!=typeof history&&history[e+"State"]&&history[e+"State"](null,null,t)}(t,e?"replace":"push"),y(t)}function y(t){for(var e=!1,n=0;n<f.length;n++)!0===f[n].routeTo(t)&&(e=!0);for(var r=_.length;r--;)_[r](t);return e}function b(t){if(t&&t.getAttribute){var e=t.getAttribute("href"),n=t.getAttribute("target");if(e&&e.match(/^\//g)&&(!n||n.match(/^_?self$/i)))return v(e)}}function m(t){if(!(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||0!==t.button))return b(t.currentTarget||t.target||this),g(t)}function g(t){return t&&(t.stopImmediatePropagation&&t.stopImmediatePropagation(),t.stopPropagation&&t.stopPropagation(),t.preventDefault()),!1}function w(t){if(!(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||0!==t.button)){var e=t.target;do{if("A"===String(e.nodeName).toUpperCase()&&e.getAttribute("href")){if(e.hasAttribute("native"))return;if(b(e))return g(t)}}while(e=e.parentNode)}}var k=!1,x=function(t){function e(e){t.call(this,e),e.history&&(p=e.history),this.state={url:e.url||h()},k||("function"==typeof addEventListener&&(p||addEventListener("popstate",(function(){y(h())})),addEventListener("click",w)),k=!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldComponentUpdate=function(t){return!0!==t.static||t.url!==this.props.url||t.onChange!==this.props.onChange},e.prototype.canRoute=function(t){var e=(0,r.toChildArray)(this.props.children);return this.getMatchingChildren(e,t,!1).length>0},e.prototype.routeTo=function(t){this.setState({url:t});var e=this.canRoute(t);return this.updating||this.forceUpdate(),e},e.prototype.componentWillMount=function(){f.push(this),this.updating=!0},e.prototype.componentDidMount=function(){var t=this;p&&(this.unlisten=p.listen((function(e){t.routeTo(""+(e.pathname||"")+(e.search||""))}))),this.updating=!1},e.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),f.splice(f.indexOf(this),1)},e.prototype.componentWillUpdate=function(){this.updating=!0},e.prototype.componentDidUpdate=function(){this.updating=!1},e.prototype.getMatchingChildren=function(t,e,n){return t.filter(c).sort(l).map((function(t){var o=a(e,t.props.path,t.props);if(o){if(!1!==n){var l={url:e,matches:o};return i(l,o),delete l.ref,delete l.key,(0,r.cloneElement)(t,l)}return t}})).filter(Boolean)},e.prototype.render=function(t,e){var n=t.children,o=t.onChange,i=e.url,a=this.getMatchingChildren((0,r.toChildArray)(n),i,!0),l=a[0]||null,c=this.previousUrl;return i!==c&&(this.previousUrl=i,"function"==typeof o&&o({router:this,url:i,previous:c,active:a,current:l})),l},e}(r.Component),C=function(t){return(0,r.createElement)("a",i({onClick:m},t))},S=function(t){return(0,r.createElement)(t.component,t)};x.subscribers=_,x.getCurrentUrl=h,x.route=v,x.Router=x,x.Route=S,x.Link=C,x.exec=a;const O=x},232:(t,e,n)=>{e.rU=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(400),i=n(42);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c=function(t){function e(){var n,r;a(this,e);for(var o=arguments.length,i=Array(o),c=0;c<o;c++)i[c]=arguments[c];return n=r=l(this,t.call.apply(t,[this].concat(i))),r.update=function(t){r.nextUrl=t,r.setState({})},l(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){i.subscribers.push(this.update)},e.prototype.componentWillUnmount=function(){i.subscribers.splice(i.subscribers.indexOf(this.update)>>>0,1)},e.prototype.render=function(t){var e=this.nextUrl||(0,i.getCurrentUrl)(),n=e.replace(/\?.+$/,"");return this.nextUrl=null,t.children({url:e,path:n,matches:!1!==(0,i.exec)(n,t.path,{})})},e}(o.Component),s=function(t){var e=t.activeClassName,n=t.path,a=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["activeClassName","path"]);return(0,o.h)(c,{path:n||a.href},(function(t){var n=t.matches;return(0,o.h)(i.Link,r({},a,{class:[a.class||a.className,n&&e].filter(Boolean).join(" ")}))}))};e.rU=s,c.Link=s},400:(t,e,n)=>{n.r(e),n.d(e,{Component:()=>g,Fragment:()=>m,cloneElement:()=>F,createContext:()=>$,createElement:()=>v,createRef:()=>b,h:()=>v,hydrate:()=>W,isValidElement:()=>a,options:()=>o,render:()=>I,toChildArray:()=>U});var r,o,i,a,l,c,s,u,p={},f=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(t,e){for(var n in e)t[n]=e[n];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var o,i,a,l={};for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:l[a]=e[a];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return y(t,l,o,i,null)}function y(t,e,n,r,a){var l={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=o.vnode&&o.vnode(l),l}function b(){return{current:null}}function m(t){return t.children}function g(t,e){this.props=t,this.context=e}function w(t,e){if(null==e)return t.__?w(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?w(t):null}function k(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return k(t)}}function x(t){(!t.__d&&(t.__d=!0)&&l.push(t)&&!C.__r++||s!==o.debounceRendering)&&((s=o.debounceRendering)||c)(C)}function C(){for(var t;C.__r=l.length;)t=l.sort((function(t,e){return t.__v.__b-e.__v.__b})),l=[],t.some((function(t){var e,n,r,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=d({},o)).__v=o.__v+1,M(a,o,r,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?w(o):i,o.__h),L(n,o),o.__e!=i&&k(o)))}))}function S(t,e,n,r,o,i,a,l,c,s){var u,_,d,h,v,b,g,k=r&&r.__k||f,x=k.length;for(n.__k=[],u=0;u<e.length;u++)if(null!=(h=n.__k[u]=null==(h=e[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?y(null,h,null,null,h):Array.isArray(h)?y(m,{children:h},null,null,null):h.__b>0?y(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(d=k[u])||d&&h.key==d.key&&h.type===d.type)k[u]=void 0;else for(_=0;_<x;_++){if((d=k[_])&&h.key==d.key&&h.type===d.type){k[_]=void 0;break}d=null}M(t,h,d=d||p,o,i,a,l,c,s),v=h.__e,(_=h.ref)&&d.ref!=_&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(_,h.__c||v,h)),null!=v?(null==b&&(b=v),"function"==typeof h.type&&h.__k===d.__k?h.__d=c=O(h,c,t):c=E(t,h,d,k,v,c),"function"==typeof n.type&&(n.__d=c)):c&&d.__e==c&&c.parentNode!=t&&(c=w(d))}for(n.__e=b,u=x;u--;)null!=k[u]&&("function"==typeof n.type&&null!=k[u].__e&&k[u].__e==n.__d&&(n.__d=w(r,u+1)),R(k[u],k[u]));if(g)for(u=0;u<g.length;u++)z(g[u],g[++u],g[++u])}function O(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?O(r,e,n):E(n,r,r,o,r.__e,e));return e}function U(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){U(t,e)})):e.push(t)),e}function E(t,e,n,r,o,i){var a,l,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(l=i,c=0;(l=l.nextSibling)&&c<r.length;c+=2)if(l==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function P(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||_.test(e)?n:n+"px"}function j(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||P(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||P(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?T:A,i):t.removeEventListener(e,i?T:A,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function A(t){this.l[t.type+!1](o.event?o.event(t):t)}function T(t){this.l[t.type+!0](o.event?o.event(t):t)}function M(t,e,n,r,i,a,l,c,s){var u,p,f,_,h,v,y,b,w,k,x,C=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(s=n.__h,c=e.__e=n.__e,e.__h=null,a=[c]),(u=o.__b)&&u(e);try{t:if("function"==typeof C){if(b=e.props,w=(u=C.contextType)&&r[u.__c],k=u?w?w.props.value:u.__:r,n.__c?y=(p=e.__c=n.__c).__=p.__E:("prototype"in C&&C.prototype.render?e.__c=p=new C(b,k):(e.__c=p=new g(b,k),p.constructor=C,p.render=D),w&&w.sub(p),p.props=b,p.state||(p.state={}),p.context=k,p.__n=r,f=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=C.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=d({},p.__s)),d(p.__s,C.getDerivedStateFromProps(b,p.__s))),_=p.props,h=p.state,f)null==C.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==_&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,k),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,k)||e.__v===n.__v){p.props=b,p.state=p.__s,e.__v!==n.__v&&(p.__d=!1),p.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),p.__h.length&&l.push(p);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,k),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(_,h,v)}))}p.context=k,p.props=b,p.state=p.__s,(u=o.__r)&&u(e),p.__d=!1,p.__v=e,p.__P=t,u=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(r=d(d({},r),p.getChildContext())),f||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(_,h)),x=null!=u&&u.type===m&&null==u.key?u.props.children:u,S(t,Array.isArray(x)?x:[x],e,n,r,i,a,l,c,s),p.base=e.__e,e.__h=null,p.__h.length&&l.push(p),y&&(p.__E=p.__=null),p.__e=!1}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=N(n.__e,e,n,r,i,a,l,s);(u=o.diffed)&&u(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),o.__e(t,e,n)}}function L(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function N(t,e,n,o,i,a,l,c){var s,u,f,_=n.props,d=e.props,v=e.type,y=0;if("svg"===v&&(i=!0),null!=a)for(;y<a.length;y++)if((s=a[y])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[y]=null;break}if(null==t){if(null===v)return document.createTextNode(d);t=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,d.is&&d),a=null,c=!1}if(null===v)_===d||c&&t.data===d||(t.data=d);else{if(a=a&&r.call(t.childNodes),u=(_=n.props||p).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!c){if(null!=a)for(_={},y=0;y<t.attributes.length;y++)_[t.attributes[y].name]=t.attributes[y].value;(f||u)&&(f&&(u&&f.__html==u.__html||f.__html===t.innerHTML)||(t.innerHTML=f&&f.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||j(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||j(t,i,e[i],n[i],r)}(t,d,_,i,c),f)e.__k=[];else if(y=e.props.children,S(t,Array.isArray(y)?y:[y],e,n,o,i&&"foreignObject"!==v,a,l,a?a[0]:n.__k&&w(n,0),c),null!=a)for(y=a.length;y--;)null!=a[y]&&h(a[y]);c||("value"in d&&void 0!==(y=d.value)&&(y!==t.value||"progress"===v&&!y||"option"===v&&y!==_.value)&&j(t,"value",y,_.value,!1),"checked"in d&&void 0!==(y=d.checked)&&y!==t.checked&&j(t,"checked",y,_.checked,!1))}return t}function z(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function R(t,e,n){var r,i;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||z(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&R(r[i],e,"function"!=typeof t.type);n||null==t.__e||h(t.__e),t.__e=t.__d=void 0}function D(t,e,n){return this.constructor(t,n)}function I(t,e,n){var i,a,l;o.__&&o.__(t,e),a=(i="function"==typeof n)?null:n&&n.__k||e.__k,l=[],M(e,t=(!i&&n||e).__k=v(m,null,[t]),a||p,p,void 0!==e.ownerSVGElement,!i&&n?[n]:a?null:e.firstChild?r.call(e.childNodes):null,l,!i&&n?n:a?a.__e:e.firstChild,i),L(l,t)}function W(t,e){I(t,e,W)}function F(t,e,n){var o,i,a,l=d({},t.props);for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:l[a]=e[a];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),y(t.type,l,o||t.key,i||t.ref,null)}function $(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(x)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,o={__e:function(t,e,n,r){for(var o,i,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},i=0,a=function(t){return null!=t&&void 0===t.constructor},g.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(d({},n),this.props)),t&&d(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),x(this))},g.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),x(this))},g.prototype.render=m,l=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C.__r=0,u=0}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),(()=>{var t=n(400);function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function r(e){this.getChildContext=function(){return e.context};var n=e.children,r=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}(e,["context","children"]);return(0,t.cloneElement)(n,r)}function o(){var n=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(n),this._vdom=(0,t.h)(r,e({},this._props,{context:n.detail.context}),function e(n,r){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var o=[],a={},l=0,s=n.attributes,u=n.childNodes;for(l=s.length;l--;)"slot"!==s[l].name&&(a[s[l].name]=s[l].value,a[i(s[l].name)]=s[l].value);for(l=u.length;l--;){var p=e(u[l],null),f=u[l].slot;f?a[f]=(0,t.h)(c,{name:f},p):o[l]=p}var _=r?(0,t.h)(c,null,o):o;return(0,t.h)(r||n.nodeName.toLowerCase(),a,_)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?t.hydrate:t.render)(this._vdom,this._root)}function i(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function a(e,n,r){if(this._vdom){var o={};o[e]=r=null==r?void 0:r,o[i(e)]=r,this._vdom=(0,t.cloneElement)(this._vdom,o),(0,t.render)(this._vdom,this._root)}}function l(){(0,t.render)(this._vdom=null,this._root)}function c(n,r){var o=this;return(0,t.h)("slot",e({},n,{ref:function(t){t?(o.ref=t,o._listener||(o._listener=function(t){t.stopPropagation(),t.detail.context=r},t.addEventListener("_preact",o._listener))):o.ref.removeEventListener("_preact",o._listener)}}))}var s=0;function u(e,n,r,o,i){var a,l,c={};for(l in n)"ref"==l?a=n[l]:c[l]=n[l];var u={type:e,props:c,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--s,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return t.options.vnode&&t.options.vnode(u),u}var p=n(232);const f=n.p+"assets/icon.png";var _=function(){return _=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},_.apply(this,arguments)};const d=function(){return u("header",{children:[u("h1",{children:"Support Admin Component"}),u("img",{src:f}),u("nav",{children:u(p.rU,_({href:"/"},{children:"Home"}))})]})};var h=n(383),v=function(){return v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},v.apply(this,arguments)};!function(t,e,n,r){function i(){var e=Reflect.construct(HTMLElement,[],i);return e._vdomComponent=t,e._root=e,e}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=o,i.prototype.attributeChangedCallback=a,i.prototype.disconnectedCallback=l,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),i.observedAttributes=n,n.forEach((function(t){Object.defineProperty(i.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define("superhero-pba-support-admin",i)}((function(e){var n={backendUrl:e["backend-url"],accessToken:e["access-token"]};return u(t.Fragment,{children:[u("style",{children:h.Z}),u("div",v({class:"font-serif"},{children:[u(d,{}),u("p",v({class:"font-mono"},{children:"Hello from the component"})),"Config: ",JSON.stringify(n)]}))]})}),0,["backend-url","access-token"])})()})();
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flarehr/superhero-pba-support-admin",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist/"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "webpack serve --mode development",
|
|
10
|
+
"build": "webpack --mode production --node-env production",
|
|
11
|
+
"test": "jest ./tests",
|
|
12
|
+
"lint": "eslint src/**/*.{js,jsx,ts,tsx}",
|
|
13
|
+
"lint:fix": "eslint src/**/*.{js,jsx,ts,tsx} --fix"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"preact": "^10.3.1",
|
|
17
|
+
"preact-custom-element": "^4.2.1",
|
|
18
|
+
"preact-render-to-string": "^5.1.4",
|
|
19
|
+
"preact-router": "^3.2.1"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/enzyme": "^3.10.5",
|
|
23
|
+
"@types/jest": "^26.0.8",
|
|
24
|
+
"@types/preact-custom-element": "^4.0.1",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
|
26
|
+
"@typescript-eslint/parser": "^5.26.0",
|
|
27
|
+
"css-loader": "^6.7.1",
|
|
28
|
+
"cssnano": "^5.1.11",
|
|
29
|
+
"enzyme": "^3.11.0",
|
|
30
|
+
"enzyme-adapter-preact-pure": "^3.1.0",
|
|
31
|
+
"eslint": "^8.16.0",
|
|
32
|
+
"eslint-config-preact": "^1.3.0",
|
|
33
|
+
"eslint-config-prettier": "^8.5.0",
|
|
34
|
+
"eslint-plugin-jest": "^26.4.5",
|
|
35
|
+
"html-webpack-plugin": "^5.5.0",
|
|
36
|
+
"jest": "^27.2.5",
|
|
37
|
+
"jest-preset-preact": "^4.0.2",
|
|
38
|
+
"postcss": "^8.4.14",
|
|
39
|
+
"preact-cli": "^3.0.0",
|
|
40
|
+
"sirv-cli": "^1.0.0-next.3",
|
|
41
|
+
"tailwindcss": "^3.1.3",
|
|
42
|
+
"ts-loader": "^9.3.0",
|
|
43
|
+
"typescript": "^4.5.2",
|
|
44
|
+
"webpack": "^5.72.1",
|
|
45
|
+
"webpack-cli": "^4.9.2",
|
|
46
|
+
"webpack-dev-server": "^4.9.2"
|
|
47
|
+
}
|
|
48
|
+
}
|