@flarehr/salpac-cars-calculator 1.0.2
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e,t,n,_,o,r,l,i={},u=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,c=Array.isArray;function f(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function a(t,n,_){var o,r,l,i={};for(l in n)"key"==l?o=n[l]:"ref"==l?r=n[l]:i[l]=n[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===i[l]&&(i[l]=t.defaultProps[l]);return d(t,i,o,r,null)}function d(e,_,o,r,l){var i={type:e,props:_,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++n:l};return null==l&&null!=t.vnode&&t.vnode(i),i}function h(e){return e.children}function v(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?y(e):null}function m(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return m(e)}}function b(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!g.__r++||o!==t.debounceRendering)&&((o=t.debounceRendering)||r)(g)}function g(){var e,t,n,o,r,i,u,s,c;for(_.sort(l);e=_.shift();)e.__d&&(t=_.length,o=void 0,r=void 0,i=void 0,s=(u=(n=e).__v).__e,(c=n.__P)&&(o=[],r=[],(i=f({},u)).__v=u.__v+1,L(c,u,i,n.__n,void 0!==c.ownerSVGElement,null!=u.__h?[s]:null,o,null==s?y(u):s,u.__h,r),D(o,u,r),u.__e!=s&&m(u)),_.length>t&&_.sort(l));g.__r=0}function k(e,t,n,_,o,r,l,s,f,p,a){var v,y,m,b,g,k,w,S,E,T,D=0,U=_&&_.__k||u,O=U.length,A=O,H=t.length;for(n.__k=[],v=0;v<H;v++)null!=(b=n.__k[v]=null==(b=t[v])||"boolean"==typeof b||"function"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?d(null,b,null,null,b):c(b)?d(h,{children:b},null,null,null):b.__b>0?d(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)&&(b.__=n,b.__b=n.__b+1,-1===(S=P(b,U,w=v+D,A))?m=i:(m=U[S]||i,U[S]=void 0,A--),L(e,b,m,o,r,l,s,f,p,a),g=b.__e,(y=b.ref)&&m.ref!=y&&(m.ref&&M(m.ref,null,b),a.push(y,b.__c||g,b)),null!=g&&(null==k&&(k=g),T=!(E=m===i||null===m.__v)&&S===w,E?-1==S&&D--:S!==w&&(S===w+1?(D++,T=!0):S>w?A>H-w?(D+=S-w,T=!0):D--:D=S<w&&S==w-1?S-w:0),w=v+D,T=T||S==v&&!E,"function"!=typeof b.type||S===w&&m.__k!==b.__k?"function"==typeof b.type||T?void 0!==b.__d?(f=b.__d,b.__d=void 0):f=g.nextSibling:f=x(e,g,f):f=C(b,f,e),"function"==typeof n.type&&(n.__d=f)));for(n.__e=k,v=O;v--;)null!=U[v]&&("function"==typeof n.type&&null!=U[v].__e&&U[v].__e==n.__d&&(n.__d=U[v].__e.nextSibling),N(U[v],U[v]))}function C(e,t,n){for(var _,o=e.__k,r=0;o&&r<o.length;r++)(_=o[r])&&(_.__=e,t="function"==typeof _.type?C(_,t,n):x(n,_.__e,t));return t}function x(e,t,n){return null==n||n.parentNode!==e?e.insertBefore(t,null):t==n&&null!=t.parentNode||e.insertBefore(t,n),t.nextSibling}function P(e,t,n,_){var o=e.key,r=e.type,l=n-1,i=n+1,u=t[n];if(null===u||u&&o==u.key&&r===u.type)return n;if(_>(null!=u?1:0))for(;l>=0||i<t.length;){if(l>=0){if((u=t[l])&&o==u.key&&r===u.type)return l;l--}if(i<t.length){if((u=t[i])&&o==u.key&&r===u.type)return i;i++}}return-1}function w(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||s.test(t)?n:n+"px"}function S(e,t,n,_,o){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||w(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||w(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?_||e.addEventListener(t,r?T:E,r):e.removeEventListener(t,r?T:E,r);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function E(e){return this.l[e.type+!1](t.event?t.event(e):e)}function T(e){return this.l[e.type+!0](t.event?t.event(e):e)}function L(e,n,_,o,r,l,i,u,s,p){var a,d,y,m,b,g,C,x,P,w,S,E,T,L,D,M=n.type;if(void 0!==n.constructor)return null;null!=_.__h&&(s=_.__h,u=n.__e=_.__e,n.__h=null,l=[u]),(a=t.__b)&&a(n);try{e:if("function"==typeof M){if(x=n.props,P=(a=M.contextType)&&o[a.__c],w=a?P?P.props.value:a.__:o,_.__c?C=(d=n.__c=_.__c).__=d.__E:("prototype"in M&&M.prototype.render?n.__c=d=new M(x,w):(n.__c=d=new v(x,w),d.constructor=M,d.render=O),P&&P.sub(d),d.props=x,d.state||(d.state={}),d.context=w,d.__n=o,y=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=M.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=f({},d.__s)),f(d.__s,M.getDerivedStateFromProps(x,d.__s))),m=d.props,b=d.state,d.__v=n,y)null==M.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==M.getDerivedStateFromProps&&x!==m&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(x,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(x,d.__s,w)||n.__v===_.__v)){for(n.__v!==_.__v&&(d.props=x,d.state=d.__s,d.__d=!1),n.__e=_.__e,n.__k=_.__k,n.__k.forEach((function(e){e&&(e.__=n)})),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[],d.__h.length&&i.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(x,d.__s,w),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(m,b,g)}))}if(d.context=w,d.props=x,d.__P=e,d.__e=!1,E=t.__r,T=0,"prototype"in M&&M.prototype.render){for(d.state=d.__s,d.__d=!1,E&&E(n),a=d.render(d.props,d.state,d.context),L=0;L<d._sb.length;L++)d.__h.push(d._sb[L]);d._sb=[]}else do{d.__d=!1,E&&E(n),a=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++T<25);d.state=d.__s,null!=d.getChildContext&&(o=f(f({},o),d.getChildContext())),y||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(m,b)),k(e,c(D=null!=a&&a.type===h&&null==a.key?a.props.children:a)?D:[D],n,_,o,r,l,i,u,s,p),d.base=n.__e,n.__h=null,d.__h.length&&i.push(d),C&&(d.__E=d.__=null)}else null==l&&n.__v===_.__v?(n.__k=_.__k,n.__e=_.__e):n.__e=U(_.__e,n,_,o,r,l,i,s,p);(a=t.diffed)&&a(n)}catch(e){n.__v=null,(s||null!=l)&&(n.__e=u,n.__h=!!s,l[l.indexOf(u)]=null),t.__e(e,n,_)}}function D(e,n,_){for(var o=0;o<_.length;o++)M(_[o],_[++o],_[++o]);t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function U(t,n,_,o,r,l,u,s,f){var a,d,h,v=_.props,m=n.props,b=n.type,g=0;if("svg"===b&&(r=!0),null!=l)for(;g<l.length;g++)if((a=l[g])&&"setAttribute"in a==!!b&&(b?a.localName===b:3===a.nodeType)){t=a,l[g]=null;break}if(null==t){if(null===b)return document.createTextNode(m);t=r?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,m.is&&m),l=null,s=!1}if(null===b)v===m||s&&t.data===m||(t.data=m);else{if(l=l&&e.call(t.childNodes),d=(v=_.props||i).dangerouslySetInnerHTML,h=m.dangerouslySetInnerHTML,!s){if(null!=l)for(v={},g=0;g<t.attributes.length;g++)v[t.attributes[g].name]=t.attributes[g].value;(h||d)&&(h&&(d&&h.__html==d.__html||h.__html===t.innerHTML)||(t.innerHTML=h&&h.__html||""))}if(function(e,t,n,_,o){var r;for(r in n)"children"===r||"key"===r||r in t||S(e,r,null,n[r],_);for(r in t)o&&"function"!=typeof t[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===t[r]||S(e,r,t[r],n[r],_)}(t,m,v,r,s),h)n.__k=[];else if(k(t,c(g=n.props.children)?g:[g],n,_,o,r&&"foreignObject"!==b,l,u,l?l[0]:_.__k&&y(_,0),s,f),null!=l)for(g=l.length;g--;)null!=l[g]&&p(l[g]);s||("value"in m&&void 0!==(g=m.value)&&(g!==t.value||"progress"===b&&!g||"option"===b&&g!==v.value)&&S(t,"value",g,v.value,!1),"checked"in m&&void 0!==(g=m.checked)&&g!==t.checked&&S(t,"checked",g,v.checked,!1))}return t}function M(e,n,_){try{"function"==typeof e?e(n):e.current=n}catch(e){t.__e(e,_)}}function N(e,n,_){var o,r;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||M(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){t.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&N(o[r],n,_||"function"!=typeof e.type);_||null==e.__e||p(e.__e),e.__=e.__e=e.__d=void 0}function O(e,t,n){return this.constructor(e,n)}function A(n,_,o){var r,l,u,s;t.__&&t.__(n,_),l=(r="function"==typeof o)?null:o&&o.__k||_.__k,u=[],s=[],L(_,n=(!r&&o||_).__k=a(h,null,[n]),l||i,i,void 0!==_.ownerSVGElement,!r&&o?[o]:l?null:_.firstChild?e.call(_.childNodes):null,u,!r&&o?o:l?l.__e:_.firstChild,r,s),D(u,n,s)}function H(e,t){A(e,t,H)}function W(t,n,_){var o,r,l,i,u=f({},t.props);for(l in t.type&&t.type.defaultProps&&(i=t.type.defaultProps),n)"key"==l?o=n[l]:"ref"==l?r=n[l]:u[l]=void 0===n[l]&&void 0!==i?i[l]:n[l];return arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):_),d(t.type,u,o||t.key,r||t.ref,null)}function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}function F(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,_,o={},r=Object.keys(e);for(_=0;_<r.length;_++)t.indexOf(n=r[_])>=0||(o[n]=e[n]);return o}(e,["context","children"]);return W(t,n)}function R(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=a(F,j({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var _=[],o={},r=0,l=t.attributes,i=t.childNodes;for(r=l.length;r--;)"slot"!==l[r].name&&(o[l[r].name]=l[r].value,o[B(l[r].name)]=l[r].value);for(r=i.length;r--;){var u=e(i[r],null),s=i[r].slot;s?o[s]=a(G,{name:s},u):_[r]=u}var c=n?a(G,null,_):_;return a(n||t.nodeName.toLowerCase(),o,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?H:A)(this._vdom,this._root)}function B(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function I(e,t,n){if(this._vdom){var _={};_[e]=n=null==n?void 0:n,_[B(e)]=n,this._vdom=W(this._vdom,_),A(this._vdom,this._root)}}function $(){A(this._vdom=null,this._root)}function G(e,t){var n=this;return a("slot",j({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}e=u.slice,t={__e:function(e,t,n,_){for(var o,r,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,_||{}),l=o.__d),l)return o.__E=o}catch(t){e=t}throw e}},n=0,v.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},v.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},v.prototype.render=h,_=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},g.__r=0;var V=0;function z(e,n,_,o,r,l){var i,u,s={};for(u in n)"ref"==u?i=n[u]:s[u]=n[u];var c={type:e,props:s,key:_,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--V,__source:r,__self:l};if("function"==typeof e&&(i=e.defaultProps))for(u in i)void 0===s[u]&&(s[u]=i[u]);return t.vnode&&t.vnode(c),c}!function(e,t,n,_){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=R,o.prototype.attributeChangedCallback=I,o.prototype.disconnectedCallback=$,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define("cars-calculator",o)}((function(e){return z("div",{children:z("h3",{children:"Hello World!"})})}),0,["backend-url"])})();
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flarehr/salpac-cars-calculator",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Flare Cars Calculator",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "webpack serve --mode development",
|
|
11
|
+
"build": "webpack --mode production --node-env production",
|
|
12
|
+
"test": "jest",
|
|
13
|
+
"lint": "eslint src/**/*.{js,jsx,ts,tsx}",
|
|
14
|
+
"lint:fix": "eslint src/**/*.{js,jsx,ts,tsx} --fix"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"axios": "^0.27.2",
|
|
18
|
+
"goober": "^2.1.13",
|
|
19
|
+
"preact": "^10.16.0",
|
|
20
|
+
"preact-custom-element": "^4.2.1"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@babel/core": "^7.22.8",
|
|
24
|
+
"@babel/preset-env": "^7.22.7",
|
|
25
|
+
"@svgr/webpack": "^6.3.1",
|
|
26
|
+
"@tailwindcss/forms": "^0.5.2",
|
|
27
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
28
|
+
"@testing-library/preact": "^3.2.3",
|
|
29
|
+
"@types/jest": "^29.5.3",
|
|
30
|
+
"@types/preact-custom-element": "^4.0.1",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
|
32
|
+
"@typescript-eslint/parser": "^5.33.0",
|
|
33
|
+
"autoprefixer": "^10.4.7",
|
|
34
|
+
"css-loader": "^6.7.1",
|
|
35
|
+
"cssnano": "^5.1.12",
|
|
36
|
+
"eslint": "^8.21.0",
|
|
37
|
+
"eslint-config-preact": "^1.3.0",
|
|
38
|
+
"eslint-config-prettier": "^8.5.0",
|
|
39
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
40
|
+
"html-webpack-plugin": "^5.5.0",
|
|
41
|
+
"jest": "^27.5.1",
|
|
42
|
+
"postcss": "^8.4.14",
|
|
43
|
+
"postcss-loader": "^7.0.1",
|
|
44
|
+
"preact-cli": "^3.4.6",
|
|
45
|
+
"prettier": "^2.7.1",
|
|
46
|
+
"tailwindcss": "^3.3.2",
|
|
47
|
+
"ts-loader": "^9.3.1",
|
|
48
|
+
"typescript": "^4.7.4",
|
|
49
|
+
"webpack": "^5.74.0",
|
|
50
|
+
"webpack-cli": "^4.10.0",
|
|
51
|
+
"webpack-dev-server": "^4.9.3"
|
|
52
|
+
}
|
|
53
|
+
}
|