ordering-ui-external 1.5.4 → 1.6.0

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.
Files changed (81) hide show
  1. package/_bundles/0.ordering-ui.ff76ec87ed271a678f9d.js +1 -0
  2. package/_bundles/{1.ordering-ui.5de718771fdf8a9bc402.js → 1.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  3. package/_bundles/{2.ordering-ui.5de718771fdf8a9bc402.js → 2.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  4. package/_bundles/{4.ordering-ui.5de718771fdf8a9bc402.js → 4.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  5. package/_bundles/{5.ordering-ui.5de718771fdf8a9bc402.js → 5.ordering-ui.ff76ec87ed271a678f9d.js} +1 -1
  6. package/_bundles/{6.ordering-ui.5de718771fdf8a9bc402.js → 6.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  7. package/_bundles/{7.ordering-ui.5de718771fdf8a9bc402.js → 7.ordering-ui.ff76ec87ed271a678f9d.js} +2 -2
  8. package/_bundles/{7.ordering-ui.5de718771fdf8a9bc402.js.LICENSE.txt → 7.ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.5de718771fdf8a9bc402.js → 8.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  10. package/_bundles/{9.ordering-ui.5de718771fdf8a9bc402.js → 9.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  11. package/_bundles/ordering-ui.ff76ec87ed271a678f9d.js +2 -0
  12. package/_bundles/{ordering-ui.5de718771fdf8a9bc402.js.LICENSE.txt → ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessTypeFilter/index.js +6 -3
  14. package/_modules/components/CancellationComponent/index.js +58 -0
  15. package/_modules/components/CancellationComponent/styles.js +43 -0
  16. package/_modules/components/Header/index.js +1 -1
  17. package/_modules/index.js +7 -0
  18. package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +1 -1
  19. package/_modules/themes/five/src/components/AddressForm/index.js +5 -5
  20. package/_modules/themes/five/src/components/AddressList/index.js +3 -1
  21. package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
  22. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +4 -2
  23. package/_modules/themes/five/src/components/BusinessController/index.js +22 -13
  24. package/_modules/themes/five/src/components/BusinessReviews/index.js +4 -4
  25. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -5
  26. package/_modules/themes/five/src/components/Cart/index.js +13 -2
  27. package/_modules/themes/five/src/components/HomeHero/index.js +5 -3
  28. package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +1 -1
  29. package/_modules/themes/five/src/components/OrderDetails/OrderActionsSection.js +38 -0
  30. package/_modules/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +27 -0
  31. package/_modules/themes/five/src/components/OrderDetails/index.js +64 -60
  32. package/_modules/themes/five/src/components/OrderDetails/styles.js +7 -5
  33. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -2
  34. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
  35. package/_modules/themes/five/src/components/OrdersOption/index.js +4 -2
  36. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -3
  37. package/_modules/themes/five/src/components/ServiceForm/index.js +33 -7
  38. package/_modules/themes/five/src/components/ServiceForm/styles.js +8 -3
  39. package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
  40. package/_modules/themes/five/src/components/SingleProductCard/index.js +4 -4
  41. package/_modules/themes/five/src/components/UserFormDetails/index.js +51 -26
  42. package/_modules/themes/five/src/components/UserFormDetails/styles.js +9 -3
  43. package/_modules/themes/five/src/components/UserVerification/index.js +7 -2
  44. package/index-template.js +7 -5
  45. package/package.json +2 -2
  46. package/src/components/BusinessTypeFilter/index.js +2 -2
  47. package/src/components/CancellationComponent/index.js +62 -0
  48. package/src/components/CancellationComponent/styles.js +162 -0
  49. package/src/components/Header/index.js +1 -1
  50. package/src/index.js +2 -0
  51. package/src/themes/callcenterOriginal/src/components/Header/styles.js +1 -0
  52. package/src/themes/five/src/components/AddressForm/index.js +2 -2
  53. package/src/themes/five/src/components/AddressList/index.js +2 -1
  54. package/src/themes/five/src/components/AddressList/styles.js +4 -1
  55. package/src/themes/five/src/components/BusinessBasicInformation/index.js +3 -2
  56. package/src/themes/five/src/components/BusinessController/index.js +68 -44
  57. package/src/themes/five/src/components/BusinessReviews/index.js +4 -4
  58. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +15 -11
  59. package/src/themes/five/src/components/Cart/index.js +24 -9
  60. package/src/themes/five/src/components/HomeHero/index.js +4 -2
  61. package/src/themes/five/src/components/MultiOrdersDetails/styles.js +5 -1
  62. package/src/themes/five/src/components/OrderDetails/OrderActionsSection.js +33 -0
  63. package/src/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +20 -0
  64. package/src/themes/five/src/components/OrderDetails/index.js +84 -100
  65. package/src/themes/five/src/components/OrderDetails/styles.js +4 -1
  66. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +4 -2
  67. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
  68. package/src/themes/five/src/components/OrdersOption/index.js +3 -1
  69. package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -2
  70. package/src/themes/five/src/components/ServiceForm/index.js +162 -139
  71. package/src/themes/five/src/components/ServiceForm/styles.js +10 -0
  72. package/src/themes/five/src/components/SignUpApproval/index.js +6 -7
  73. package/src/themes/five/src/components/SingleProductCard/index.js +3 -3
  74. package/src/themes/five/src/components/UserFormDetails/index.js +59 -23
  75. package/src/themes/five/src/components/UserFormDetails/styles.js +26 -0
  76. package/src/themes/five/src/components/UserVerification/index.js +18 -11
  77. package/template/app.js +385 -367
  78. package/template/components/SubdomainComponent/index.js +54 -0
  79. package/template/config.json +4 -1
  80. package/_bundles/0.ordering-ui.5de718771fdf8a9bc402.js +0 -1
  81. package/_bundles/ordering-ui.5de718771fdf8a9bc402.js +0 -2
@@ -0,0 +1,54 @@
1
+ import React, { cloneElement, useEffect, useState } from 'react'
2
+
3
+ import { SpinnerLoader } from '../../../src/components/SpinnerLoader'
4
+ import settings from '../../config'
5
+
6
+ export const SubdomainComponent = (props) => {
7
+ const [checkState, setCheckState] = useState({ loading: true, result: null, error: null })
8
+
9
+ const project = window.location.hostname.split('.').slice(0, 1).join()
10
+
11
+ const checkProject = async () => {
12
+ try {
13
+ const response = await fetch(`${settings?.api?.url}/${settings?.api?.version}/system/integrations/projects/check_availability?project_code=${project}`, {
14
+ method: 'GET',
15
+ headers: { 'Content-Type': 'application/json' }
16
+ })
17
+ const { error, result } = await response.json()
18
+
19
+ setCheckState({
20
+ ...checkState,
21
+ loading: false,
22
+ result: error ? [] : result,
23
+ error: error
24
+ ? typeof result === 'string' ? result : result?.[0]
25
+ : null
26
+ })
27
+ } catch (error) {
28
+ setCheckState({
29
+ ...checkState,
30
+ loading: false,
31
+ error: error.message
32
+ })
33
+ }
34
+ }
35
+
36
+ useEffect(() => {
37
+ checkProject()
38
+ }, [])
39
+
40
+ return (
41
+ checkState.loading
42
+ ? <SpinnerLoader />
43
+ : cloneElement(props.children, {
44
+ settings: {
45
+ ...settings,
46
+ project: settings?.use_project_domain
47
+ ? '_'
48
+ : settings?.use_project_subdomain
49
+ ? project
50
+ : settings?.project
51
+ }
52
+ })
53
+ )
54
+ }
@@ -11,11 +11,14 @@
11
11
  "url": "https://socket.ordering.co"
12
12
  },
13
13
  "use_marketplace": false,
14
+ "use_project_domain": false,
15
+ "use_project_subdomain": false,
14
16
  "store_android_id": "",
15
17
  "store_apple_id": "",
16
18
  "store_kindle_id": "",
17
19
  "url_dashboard": "https://app.tryordering.com",
18
20
  "use_kiosk": false,
19
21
  "businessSlug": "",
20
- "franchiseSlug": null
22
+ "franchiseSlug": null,
23
+ "isCancellation" : false
21
24
  }
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[0],{596:function(t,n,e){"use strict";function i(t,n){var e,i;return"boolean"==typeof(null==n?void 0:n.enabled)?n.enabled:null===(i=null===(e=null==t?void 0:t.__default)||void 0===e?void 0:e.enabled)||void 0===i||i}e.d(n,"a",(function(){return i}))},698:function(t,n,e){"use strict";e.r(n),e.d(n,"LegacyDestination",(function(){return O})),e.d(n,"ajsDestinations",(function(){return _}));var i=e(3),r=e(55),o=e(46),a=e(18),s=e(101),c=e(64),u=e(63),d=e(596),l=e(189),h=e(193),v=e(47),f=e(69),b=e(335),p=e(85),g=e(106);function y(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function j(t,n){return void 0===n&&(n=!1),n?btoa(t).replace(/=/g,""):void 0}function m(t,n,e,r,o,a){return Object(i.b)(this,void 0,void 0,(function(){var s,c,u,d,l,h,v,f;return Object(i.d)(this,(function(b){switch(b.label){case 0:s=y(e),c=j(s,a),u=Object(p.b)(),d="".concat(u,"/integrations/").concat(null!=c?c:s,"/").concat(r,"/").concat(null!=c?c:s,".dynamic.js.gz"),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,Object(g.a)(d)];case 2:return b.sent(),function(t,n,e){var r,o;try{var a=(null!==(o=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==o?o:[])[0];a&&n.stats.gauge("legacy_destination_time",Math.round(a.duration),Object(i.f)([e],a.duration<100?["cached"]:[],!0))}catch(t){}}(d,t,e),[3,4];case 3:throw l=b.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(e),"failed"]),l;case 4:return h=window["".concat(s,"Deps")],[4,Promise.all(h.map((function(t){return Object(g.a)(u+t+".gz")})))];case 5:return b.sent(),window["".concat(s,"Loader")](),(v=window["".concat(s,"Integration")]).Integration&&(v({user:function(){return n.user()},addIntegration:function(){}}),v=v.Integration),(f=new v(o)).analytics=n,[2,f]}}))}))}function w(t,n){return Object(i.b)(this,void 0,void 0,(function(){var e,r=this;return Object(i.d)(this,(function(s){switch(s.label){case 0:return e=[],Object(o.a)()?[2,n]:[4,Object(h.a)((function(){return n.length>0&&Object(o.b)()}),(function(){return Object(i.b)(r,void 0,void 0,(function(){var r,o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return(r=n.pop())?[4,Object(c.a)(r,t)]:[2];case 1:return o=i.sent(),o instanceof a.a||e.push(r),[2]}}))}))}))];case 1:return s.sent(),e.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}var O=function(){function t(t,n,e,r){void 0===e&&(e={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=t,this.version=n,this.settings=Object(i.a)({},e),this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=r,this.buffer=r.disableClientPersistence?new v.b(4,[]):new f.a(4,"dest-".concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return this._ready},t.prototype.ready=function(){var t;return null!==(t=this.onReady)&&void 0!==t?t:Promise.resolve()},t.prototype.load=function(t,n){return Object(i.b)(this,void 0,void 0,(function(){var e,r=this;return Object(i.d)(this,(function(i){switch(i.label){case 0:return this._ready||void 0!==this.onReady?[2]:(e=this,[4,m(t,n,this.name,this.version,this.settings,this.options.obfuscate)]);case 1:e.integration=i.sent(),this.onReady=new Promise((function(t){r.integration.once("ready",(function(){r._ready=!0,t(!0)}))})),this.onInitialize=new Promise((function(t){r.integration.on("initialize",(function(){r._initialized=!0,t(!0)}))}));try{t.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(n){throw t.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),n}return[2]}}))}))},t.prototype.unload=function(t,n){return function(t,n,e){return Object(i.b)(this,void 0,void 0,(function(){var r,o,a,s;return Object(i.d)(this,(function(i){return r=Object(p.b)(),o=y(t),a=j(t,e),s="".concat(r,"/integrations/").concat(null!=a?a:o,"/").concat(n,"/").concat(null!=a?a:o,".dynamic.js.gz"),[2,Object(g.b)(s)]}))}))}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];this.middleware=(t=this.middleware).concat.apply(t,n)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(Object(o.a)()||!1===this._ready||!1===this._initialized)},t.prototype.send=function(t,n,e){var r,o;return Object(i.b)(this,void 0,void 0,(function(){var s,c,l,h,v,f;return Object(i.d)(this,(function(p){switch(p.label){case 0:if(this.shouldBuffer(t))return this.buffer.push(t),this.scheduleFlush(),[2,t];if(s=null===(o=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===o?void 0:o.track,c=t.event.event,s&&c&&"Segment.io"!==this.name){if(l=s[c],!Object(d.a)(s,l))return t.updateEvent("integrations",Object(i.a)(Object(i.a)({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new a.b({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t];if(t.updateEvent("integrations",Object(i.a)(Object(i.a)({},t.event.integrations),null==l?void 0:l.integrations)),(null==l?void 0:l.enabled)&&!1===(null==l?void 0:l.integrations[this.name]))return t.cancel(new a.b({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t]}return[4,Object(b.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:if(null===(h=p.sent()))return[2,t];v=new n(h,{}),t.stats.increment("analytics_js.integration.invoke",1,["method:".concat(e),"integration_name:".concat(this.name)]),p.label=2;case 2:return p.trys.push([2,5,,6]),this.integration?[4,Object(u.a)(this.integration.invoke.call(this.integration,e,v))]:[3,4];case 3:p.sent(),p.label=4;case 4:return[3,6];case 5:throw f=p.sent(),t.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(e),"integration_name:".concat(this.name)]),f;case 6:return[2,t]}}))}))},t.prototype.track=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Track,"track")]}))}))},t.prototype.page=function(t){var n;return Object(i.b)(this,void 0,void 0,(function(){var e=this;return Object(i.d)(this,(function(i){return(null===(n=this.integration)||void 0===n?void 0:n._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return e.send(t,r.Page,"page")}))]}))}))},t.prototype.identify=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Identify,"identify")]}))}))},t.prototype.alias=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Alias,"alias")]}))}))},t.prototype.group=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Group,"group")]}))}))},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout((function(){return Object(i.b)(t,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return this.flushing=!0,t=this,[4,w(this,this.buffer)];case 1:return t.buffer=n.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},t}();function _(t,n,e,i){var r,o;if(void 0===n&&(n={}),void 0===e&&(e={}),Object(s.b)())return[];t.plan&&((e=null!=e?e:{}).plan=t.plan);var a=null!==(o=null===(r=t.middlewareSettings)||void 0===r?void 0:r.routingRules)&&void 0!==o?o:[],c=Object(l.a)(t,null!=e?e:{});return Object.entries(t.integrations).map((function(t){var r,o=t[0],s=t[1];if(!o.startsWith("Segment")){var u=!1===n.All&&void 0===n[o];if(!1!==n[o]&&!u){var d=s.type,l=s.bundlingStatus,h=s.versionSettings;if(("unbundled"!==l&&("browser"===d||(null===(r=null==h?void 0:h.componentTypes)||void 0===r?void 0:r.includes("browser")))||"Segment.io"===o)&&"Iterable"!==o){var v=function(t){var n,e,i,r;return null!==(r=null!==(e=null===(n=t.versionSettings)||void 0===n?void 0:n.override)&&void 0!==e?e:null===(i=t.versionSettings)||void 0===i?void 0:i.version)&&void 0!==r?r:"latest"}(s),f=new O(o,v,c[o],e);return a.filter((function(t){return t.destinationName===o})).length>0&&i&&f.addMiddleware(i),f}}}})).filter((function(t){return void 0!==t}))}}}]);