From ecbbd6898de430d4e430f6f74c9698866a2a09c0 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Thu, 30 Nov 2023 17:26:17 +0800 Subject: [PATCH] Split components into separate files Signed-off-by: Egor Savkin --- static/js/shop.bundle.js | 2 +- static/js/shop.jsx | 2483 +---------------- static/js/shop/Backlog.jsx | 118 + static/js/shop/Cart.jsx | 101 + static/js/shop/Crate.jsx | 44 + static/js/shop/CrateMode.jsx | 48 + static/js/shop/FakePlaceholder.jsx | 47 + static/js/shop/Layout.jsx | 273 ++ static/js/shop/OrderForm.jsx | 220 ++ static/js/shop/OrderPanel.jsx | 75 + static/js/shop/OrderSummary.jsx | 216 ++ static/js/shop/ProductCartItem.jsx | 252 ++ static/js/shop/ProductItem.jsx | 120 + static/js/shop/Shop.jsx | 886 ++++++ static/js/shop/options/DialogPopup.jsx | 34 + static/js/shop/options/Options.jsx | 42 + static/js/shop/options/SummaryPopup.jsx | 95 + static/js/shop/options/components/Line.jsx | 43 + static/js/shop/options/components/Radio.jsx | 60 + static/js/shop/options/components/Switch.jsx | 54 + .../js/shop/options/components/SwitchLine.jsx | 67 + static/js/shop/options/components/Tip.jsx | 15 + .../components/UnimplementedComponent.jsx | 6 + .../js/shop/options/components/components.js | 15 + static/js/shop/options/utils.js | 38 + static/js/shop/utils.js | 131 + static/js/shop_components.jsx | 450 --- 27 files changed, 3003 insertions(+), 2932 deletions(-) create mode 100644 static/js/shop/Backlog.jsx create mode 100644 static/js/shop/Cart.jsx create mode 100644 static/js/shop/Crate.jsx create mode 100644 static/js/shop/CrateMode.jsx create mode 100644 static/js/shop/FakePlaceholder.jsx create mode 100644 static/js/shop/Layout.jsx create mode 100644 static/js/shop/OrderForm.jsx create mode 100644 static/js/shop/OrderPanel.jsx create mode 100644 static/js/shop/OrderSummary.jsx create mode 100644 static/js/shop/ProductCartItem.jsx create mode 100644 static/js/shop/ProductItem.jsx create mode 100644 static/js/shop/Shop.jsx create mode 100644 static/js/shop/options/DialogPopup.jsx create mode 100644 static/js/shop/options/Options.jsx create mode 100644 static/js/shop/options/SummaryPopup.jsx create mode 100644 static/js/shop/options/components/Line.jsx create mode 100644 static/js/shop/options/components/Radio.jsx create mode 100644 static/js/shop/options/components/Switch.jsx create mode 100644 static/js/shop/options/components/SwitchLine.jsx create mode 100644 static/js/shop/options/components/Tip.jsx create mode 100644 static/js/shop/options/components/UnimplementedComponent.jsx create mode 100644 static/js/shop/options/components/components.js create mode 100644 static/js/shop/options/utils.js create mode 100644 static/js/shop/utils.js delete mode 100644 static/js/shop_components.jsx diff --git a/static/js/shop.bundle.js b/static/js/shop.bundle.js index 888fb54a..e130022b 100644 --- a/static/js/shop.bundle.js +++ b/static/js/shop.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see shop.bundle.js.LICENSE.txt */ -(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t{"use strict";var r=n(296),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=u(t),h=u(n),g=0;g{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case s:case f:case g:case h:case u:return e;default:return t}}case a:return t}}}function x(e){return E(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=s,t.ContextProvider=u,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||E(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return E(e)===s},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===h},t.isPortal=function(e){return E(e)===a},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===u||e.$$typeof===s||e.$$typeof===f||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===v)},t.typeOf=E},296:(e,t,n)=>{"use strict";e.exports=n(103)},143:e=>{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,a,o,i,l],c=0;(u=new Error(t.replace(/%s/g,(function(){return s[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},962:function(e,t,n){var r,a;r=function(){"use strict";Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var e={},t={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"<":function(e,t,n){return void 0===n?e=t?[]:r}};return e.is_logic=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&1===Object.keys(e).length},e.truthy=function(e){return!(Array.isArray(e)&&0===e.length||!e)},e.get_operator=function(e){return Object.keys(e)[0]},e.get_values=function(t){return t[e.get_operator(t)]},e.apply=function(n,r){if(Array.isArray(n))return n.map((function(t){return e.apply(t,r)}));if(!e.is_logic(n))return n;var a,o,i,l,u,s=e.get_operator(n),c=n[s];if(Array.isArray(c)||(c=[c]),"if"===s||"?:"==s){for(a=0;a0){var d=String(s).split("."),f=t;for(a=0;a{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},448:(e,t,n)=>{"use strict";var r=n(294),a=n(840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n