@licklist/design 0.44.486 → 0.44.488
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/dist/events/event-venue-map/components/MapPoint/MapPoint.js +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts +2 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/package.json +1 -1
- package/src/events/event-venue-map/components/MapPoint/MapPoint.tsx +2 -2
- package/src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx +8 -0
- package/src/iframe/ryft/RyftPaymentForm.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,o=require("tslib"),n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,i=require("@licklist/plugins/dist/context/event/EventVenueMapContext"),r=require("react-konva"),u=require("../../utils/index.js"),c=require("./components/PointIcon/PointIcon.js"),d=require("./components/ProductIcon/ProductIcon.js");exports.MapPoint=function(e){var s=e.xCoordinate,l=e.yCoordinate,a=e.id,f=e.imageOffsetX,p=e.imageOffsetY,v=e.imageScale,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,o=require("tslib"),n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,i=require("@licklist/plugins/dist/context/event/EventVenueMapContext"),r=require("react-konva"),u=require("../../utils/index.js"),c=require("./components/PointIcon/PointIcon.js"),d=require("./components/ProductIcon/ProductIcon.js");exports.MapPoint=function(e){var s=e.xCoordinate,l=e.yCoordinate,a=e.id,f=e.imageOffsetX,p=e.imageOffsetY,v=e.imageScale,m=e.localId,P=e.pointNumber,I=e.changeCursorType,x=e.usedInIframe,C=e.choosedProductUuids,M=void 0===C?[]:C,O=e.errorOnChoosedProductUuids,g=void 0===O?[]:O,E=e.isSoldOut,y=n.useContext(i.EventVenueMapContext),b=y.setActiveElementKey,h=y.activeElementKey,q=y.setMapPoints,U=y.editMode,j=y.mapPointProducts,S=o.__read(u.calculatePointsCoordinates(s,l,{imageScale:v,imageOffsetX:f,imageOffsetY:p}),2),B=S[0],_=S[1],k=String(a||m),A=k===h,K=j.find((function(e){return a&&e.pointId&&e.pointId===a})),N=Boolean(j.find((function(e){return M.includes(null==e?void 0:e.productUuid)&&M.includes(null==K?void 0:K.productUuid)}))),T=Boolean(j.find((function(e){return g.includes(null==e?void 0:e.productUuid)&&g.includes(null==K?void 0:K.productUuid)}))),V=function(e){e.cancelBubble=!0,A||E||(b(k),q((function(e){var o=e.slice(),n=o.find((function(e){return e.id===a||(null==e?void 0:e.localId)===m})),t=o.indexOf(n);return o.splice(t,1),o.push(n),o})))};return t.createElement(r.Group,{onClick:V,onTap:V,onMouseEnter:function(){I("pointer")},onMouseLeave:function(){I()}},x?t.createElement(d.ProductIcon,{x:B,y:_,isSoldOut:E,isActive:A,isProductChoosed:N,isErrorOnChoosedProduct:T}):t.createElement(c.PointIcon,{x:B,y:_,isActive:A,hasProduct:!E&&Boolean(K),pointNumber:P,onDelete:function(){b(),I(),q((function(e){return u.removeMapPointFromPoints(e,a,m)}))},editMode:U}))};
|
package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ export declare type ProductIconProps = KonvaNodeEvents & Konva.ShapeConfig & {
|
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
7
7
|
isActive?: boolean;
|
|
8
|
+
isSoldOut?: boolean;
|
|
8
9
|
isErrorOnChoosedProduct: boolean;
|
|
9
10
|
isProductChoosed: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const ProductIcon: ({ x, y, isActive, isErrorOnChoosedProduct, isProductChoosed, }: ProductIconProps) => JSX.Element;
|
|
12
|
+
export declare const ProductIcon: ({ x, y, isActive, isSoldOut, isErrorOnChoosedProduct, isProductChoosed, }: ProductIconProps) => JSX.Element;
|
|
12
13
|
//# sourceMappingURL=ProductIcon.d.ts.map
|
package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAQ,eAAe,EAAiB,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAQ,eAAe,EAAiB,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAyB1B,oBAAY,gBAAgB,GAAG,eAAe,GAC5C,KAAK,CAAC,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAkBJ,eAAO,MAAM,WAAW,8EAOrB,gBAAgB,gBA8FlB,CAAC"}
|
package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o,t=require("tslib"),e=require("react"),r=(o=e)&&"object"==typeof o&&"default"in o?o.default:o,n=require("react-konva"),i="#FFFFFF",a="#FFFFFF80",c="#0E8CE2",l=function(o,t){void 0===t&&(t=!1);var e=document.getElementById("snippet-template-context");if(e){var r=getComputedStyle(e).getPropertyValue(o);return!r||r&&!t?r:"".concat(r,"80")}};exports.ProductIcon=function(o){var p,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o,t=require("tslib"),e=require("react"),r=(o=e)&&"object"==typeof o&&"default"in o?o.default:o,n=require("react-konva"),i="#FFFFFF",a="#FFFFFF80",c="#0E8CE2",l="#878787",d=function(o,t){void 0===t&&(t=!1);var e=document.getElementById("snippet-template-context");if(e){var r=getComputedStyle(e).getPropertyValue(o);return!r||r&&!t?r:"".concat(r,"80")}};exports.ProductIcon=function(o){var p,s,u=o.x,v=o.y,C=o.isActive,F=o.isSoldOut,f=o.isErrorOnChoosedProduct,k=o.isProductChoosed,P=e.useMemo((function(){return{pointBackgroundColor:d("--snippet-canvas-point-background-color")||i,pointBorderColor:d("--snippet-canvas-point-border-color",!0)||a,pointFontColor:d("--snippet-canvas-point-font-color")||c,activePointBackgroundColor:d("--snippet-canvas-active-point-background-color")||c,activePointBorderColor:d("--snippet-canvas-active-point-border-color",!0)||a,activePointFontColor:d("--snippet-canvas-active-point-font-color")||i}}),[C,f,k]);return r.createElement(n.Group,{x:u,y:v},r.createElement(n.Circle,t.__assign({radius:14,strokeWidth:2,x:0,y:-21},(p=P.pointBackgroundColor,s=P.pointBorderColor,C&&(s=P.activePointBorderColor),k&&(p=P.activePointBackgroundColor),f&&(s="#ff000080"),F&&(s=l,p=l),{fill:p,stroke:s}))),k?r.createElement(n.Path,{x:-7,y:-28,data:"M1.5 6L5.5 10L13.5 2",width:28,height:28,fill:P.activePointBackgroundColor,stroke:P.activePointFontColor,strokeWidth:3}):r.createElement(n.Path,{x:-7,y:-28,data:"M14 0C9.3569 0.6633 4.6431 0.6633 0 0L6 7V13H3V14H11V13H8V7L14 0Z",width:28,height:28,strokeWidth:1,fill:P.pointFontColor,stroke:P.pointFontColor}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),a=e(r),n=require("react-router-dom"),i=require("../../static/loader/BlockLoader.js"),o=require("react-i18next"),u=e(require("react-bootstrap/Button")),s=require("react-hook-form"),c=e(require("react-bootstrap/Form")),l=require("../../static/loader/ButtonLoader.js"),d=e(require("react-bootstrap/Alert"));require("../../static/index.js");var f=require("@licklist/plugins/dist/hooks/Ryft/useRyftPayment"),m={insufficient_funds:"insufficientFunds",declined_do_not_honour:"declinedDoNotHonour",invalid_card_number:"invalidCardNumber",restricted_card:"restrictedCard",security_violation:"securityViolation",expired_card:"expiredCard",gateway_reject:"gatewayReject",bad_track_data:"badTrackData","3ds_authentication_failure":"3dsAuthenticationFailure",unknown_error:"unknownError"};exports.RyftPaymentForm=function(e){var y=e.accountId,_=e.isCreateLoading,E=e.initRyft,v=e.resetReferrer,p=e.onSubmit,b=o.useTranslation(["Design","Validation","Ryft"]).t,g=n.useHistory(),R=t.__read(r.useState(!1),2),h=R[0],q=R[1],k=t.__read(r.useState(!1),2),w=k[0],S=k[1],T=t.__read(r.useState(!1),2),F=T[0],N=T[1],A=t.__read(r.useState(void 0),2),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),a=e(r),n=require("react-router-dom"),i=require("../../static/loader/BlockLoader.js"),o=require("react-i18next"),u=e(require("react-bootstrap/Button")),s=require("react-hook-form"),c=e(require("react-bootstrap/Form")),l=require("../../static/loader/ButtonLoader.js"),d=e(require("react-bootstrap/Alert"));require("../../static/index.js");var f=require("@licklist/plugins/dist/hooks/Ryft/useRyftPayment"),m={insufficient_funds:"insufficientFunds",declined_do_not_honour:"declinedDoNotHonour",invalid_card_number:"invalidCardNumber",restricted_card:"restrictedCard",security_violation:"securityViolation",expired_card:"expiredCard",gateway_reject:"gatewayReject",bad_track_data:"badTrackData","3ds_authentication_failure":"3dsAuthenticationFailure",unknown_error:"unknownError"};exports.RyftPaymentForm=function(e){var y=e.accountId,_=e.isCreateLoading,E=e.initRyft,v=e.resetReferrer,p=e.onSubmit,b=o.useTranslation(["Design","Validation","Ryft"]).t,g=n.useHistory(),R=t.__read(r.useState(!1),2),h=R[0],q=R[1],k=t.__read(r.useState(!1),2),w=k[0],S=k[1],T=t.__read(r.useState(!1),2),F=T[0],N=T[1],A=t.__read(r.useState(void 0),2),P=A[0],x=A[1],D=f.useRyftPayment().addEventHandler,C=s.useForm(),j=function(){v&&v()},L=function(e){(null==e?void 0:e.id)&&(null==e?void 0:e.returnUrl)&&(window.location.href="".concat(e.returnUrl,"&ps=").concat(e.id),j())};return r.useEffect((function(){y.data&&!y.isError&&E((function(){D("cardValidationChanged",(function(e){q(e.isValid)})),N(!1)}),(function(){return N(!0)}))}),[y.data]),y.isLoading||y.isFetching||_?a.createElement("div",{className:"mt-5 pt-5"},a.createElement(i.BlockLoader,null)):y.isError?a.createElement("div",{className:"mt-5 ryft-init-failure"},a.createElement(d,{key:"danger",variant:"danger"},a.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:noPaymentProviderFound"))):F?a.createElement("div",{className:"mt-5 ryft-init-failure"},a.createElement(d,{key:"danger",variant:"danger"},a.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:initFailureMessage"),a.createElement("div",{className:"flex flex-column align-items-center mt-4"},a.createElement(u,{variant:"primary",onClick:function(){g.go(0)}},b("Ryft:refresh"))))):a.createElement(a.Fragment,null,a.createElement(c.Label,null,b("Design:paymentDetails")),a.createElement("form",{id:"ryft-pay-form",noValidate:!0,onSubmit:C.handleSubmit((function(){return t.__awaiter(void 0,void 0,void 0,(function(){var e,r,a;return t.__generator(this,(function(t){switch(t.label){case 0:S(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p()];case 2:if((e=t.sent())||x("unknown_error"),"requiredAction"in e){if(e.status!==f.RYFT_STATUS_PENDING_ACTION||!(null===(a=e.requiredAction)||void 0===a?void 0:a.url))return L(e),[2];window.location.href=e.requiredAction.url,j()}return e.status===f.RYFT_STATUS_APPROVED||e.status===f.RYFT_STATUS_CAPTURED?(L(e),[2]):(e.lastError&&(x(e.lastError),j()),[3,5]);case 3:return r=t.sent(),x(r),[3,5];case 4:return S(!1),[7];case 5:return[2]}}))}))})),className:"ryft-payment-form"},a.createElement("div",{className:"submit-button-wrapper mt-3 p-1"},a.createElement(u,{type:"submit",disabled:w||!h},w&&a.createElement(l.ButtonLoader,null),b("Design:buyNow"))),P&&a.createElement("div",{id:"ryft-payment-error"},b("".concat(m[P])))))},exports.ryftErrorMap=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":";AAYA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;CACnB;AA4BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,GACV,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":";AAYA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;CACnB;AA4BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,GACV,EAAE,6BAA6B,eAyR/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM;WACH,MAAM;eAAa,MAAM;CAcpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),n=e(r),o=require("react-i18next"),i=require("react-bootstrap"),a=require("react-hook-form"),u=e(require("@licklist/plugins/dist/services/Form/HookFormService")),d=e(require("clsx")),l=require("@dnd-kit/core"),s=require("lodash"),c=require("../../sortable-tree/SortableTreeItem.js"),m=require("../../sortable-tree/SortableTree.js"),p=require("../item/CreateProductSetItem.js"),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),n=e(r),o=require("react-i18next"),i=require("react-bootstrap"),a=require("react-hook-form"),u=e(require("@licklist/plugins/dist/services/Form/HookFormService")),d=e(require("clsx")),l=require("@dnd-kit/core"),s=require("lodash"),c=require("../../sortable-tree/SortableTreeItem.js"),m=require("../../sortable-tree/SortableTree.js"),p=require("../item/CreateProductSetItem.js"),g=require("./context.js"),v=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),f=require("../product-category/ProductCategoryControl.js"),y=require("./ProductsControl.js"),C=require("./SelectCategoryModal.js"),E=require("./VenueMapSetModal.js"),_=require("../utils/index.js");var b=function(e,t){return e===v.CATEGORY_TYPE_GAME?{className:"game-badge",label:t}:e===v.CATEGORY_TYPE_FIXED_DURATION?{className:"fixed-duration-badge",label:t}:null};exports.ProductCategoriesControl=function(e){var I,S,q,T,x,P,N=e.isLoading,M=e.stepIndex,A=o.useTranslation("Design").t,h=r.useContext(g.ProductSetLoadingContext),k=h.providerHasMap,j=h.expandedProductCategories,D=h.setExpandedProductCategories,R=a.useFormContext(),V=t.__read(r.useState(!1),2),Y=V[0],F=V[1],O=t.__read(r.useState(!1),2),B=O[0],L=O[1],w=t.__read(r.useState(!1),2),G=w[0],H=w[1],U=R.control,Q=R.formState.errors,K=R.clearErrors,z=R.watch,W=R.trigger,X=R.getValues,J=R.setValue,Z=z("steps.".concat(M,".hasMap"))||!1,$="steps.".concat(M,".productCategories"),ee=a.useFieldArray({name:$,control:U,keyName:"_id"}),te=ee.fields,re=ee.append,ne=ee.remove,oe=t.__read(r.useState([]),2),ie=oe[0],ae=oe[1],ue=a.useWatch({control:U,name:$}),de=null===(S=null===(I=null==Q?void 0:Q.steps)||void 0===I?void 0:I[M])||void 0===S?void 0:S.productCategories,le=null===(T=null===(q=null==Q?void 0:Q.steps)||void 0===q?void 0:q[M])||void 0===T?void 0:T.venueMapSetId,se=null===(P=null===(x=null==Q?void 0:Q.steps)||void 0===x?void 0:x[M])||void 0===P?void 0:P.pointProducts,ce=Boolean(le||se),me=l.useSensor(l.MouseSensor,{activationConstraint:{distance:10}});return r.useEffect((function(){ue&&ue.length&&ue.forEach((function(e){var r,n,o=null===(r=e.products)||void 0===r?void 0:r.reduce((function(e,t){return e+Number(t.price)*Number(t.totalQuantity)}),0),i=null===(n=e.products)||void 0===n?void 0:n.reduce((function(e,t){return e+(t.isUnlimited?0:Number(t.totalQuantity))}),0);ae((function(r){var n;return t.__assign(t.__assign({},r),((n={})[(null==e?void 0:e.id)||e.uniqueId]={price:o,quantity:i},n))}))}))}),[ue]),r.useEffect((function(){1===te.length&&D((function(e){var r,n,o;return t.__assign(t.__assign({},e),((r={})[String((null===(n=te[0])||void 0===n?void 0:n.id)||(null===(o=te[0])||void 0===o?void 0:o.uniqueId))]=!0,r))}))}),[te]),n.createElement(n.Fragment,null,n.createElement(m.SortableTree,{sensors:[me],items:te.map((function(e){return String(e._id)})),onDragEnd:function(e){var t=e.active,r=e.over;if(t&&r&&(null==t?void 0:t.id)&&(null==r?void 0:r.id)){var n=te.findIndex((function(e){return e._id===t.id})),o=te.findIndex((function(e){return e._id===r.id}));if(n!==o){var i=X($);if(i){var a=_.sortArrayByIndex(_.moveArrayElements(i,n,o));J($,a)}}}}},te.map((function(e,r){var o=(null==e?void 0:e.id)?String(e.id):e.uniqueId,u=function(){!function(e){D((function(r){var n;return t.__assign(t.__assign({},r),((n={})[e]=!r[e],n))}))}(o)};return n.createElement(a.Controller,{key:"product-category-".concat(e._id),name:"".concat($,".").concat(r,".name"),control:U,rules:{required:A("Validation:fieldRequired",{attribute:A("name")})},render:function(t){var a,d,l,s=t.field,p=s.value,g=s.onChange;return n.createElement(m.SortableTree.Item,{id:e._id,title:p,isExpanded:j[o],setIsExpanded:u,isInvalid:!!de,badge:n.createElement(i.Badge,{className:"category-badge"},A("productCategory")),isIconInHeader:!1,subTitle:n.createElement("div",{className:"product-set-badges-container"},n.createElement("div",{className:"product-set-subtitle-dot product-set-subtitle-category-dot"}),n.createElement("span",null,null!==(l=null===(d=ie[null!==(a=null==e?void 0:e.id)&&void 0!==a?a:e.uniqueId])||void 0===d?void 0:d.quantity)&&void 0!==l?l:"N/A"," ",A("products"))),treeLineIconColor:"#1A93AA",modalLabel:A("addNewCategory"),secondaryBadge:b(e.type,A(e.type)),modalClass:c.ProductSetModalClasses.category,isNewAdded:G,body:n.createElement(f.ProductCategoryControl,{isLoading:N,onCategoryNameChange:g,categoryName:p,stepIndex:M,productCategoryIndex:r}),onDelete:function(){return ne(r)},validate:function(){return W("steps.".concat(M,".productCategories.").concat(r))},sortableItems:e.products?e.products.filter((function(e){return e.id})).map((function(e){var t=e.id;return String(t)})):[]},n.createElement(y.ProductsControl,{isLoading:N,quantityType:e.quantityType,hasTicket:null==e?void 0:e.hasTicket,stepIndex:M,productCategoryIndex:r,categoryType:e.type}))}})}))),n.createElement(p.CreateProductSetItem,{title:A("addCategory"),onClick:function(){F(!0)}}),n.createElement(C.SelectCategoryModal,{isVisible:Y,onHide:function(){return F(!1)},onCategorySelect:function(e){re(function(e,t){return{id:null,uniqueId:s.uniqueId("product-category"),name:"",minSubItems:null,maxSubItems:null,quantityType:v.QUANTITY_TYPE_STANDARD,type:e,isRelyOnPeople:e===v.CATEGORY_TYPE_TICKETS,isTimeRelated:!1,collectUserInfo:!1,hasTicket:e===v.CATEGORY_TYPE_TICKETS,allowDeposits:!1,remainderExpireAfter:void 0,hasBookingManagement:!1,weight:0,isReusable:!1,hasSubEvents:!1,products:[],zoneId:null,sort:t}}(e,te.length)),H(!0),(null==de?void 0:de.type)===u.manualErrorType&&K($)}}),k&&Z&&n.createElement(n.Fragment,null,n.createElement(p.CreateProductSetItem,{title:A("editMap"),onClick:function(){L(!0)},className:d("mt-3",ce&&"mb-3",ce&&"is-invalid")}),ce&&n.createElement("div",{className:"manual-form-error"},le&&A("Validation:fieldRequired",{attribute:A("Design:venueMapSet")}),se&&A("Validation:fieldMinNumber",{attribute:A("pointProduct"),min:1})),n.createElement(E.VenueMapSetModal,{isVisible:B,setIsVisible:L,stepIndex:M})),n.createElement("div",{className:"manual-form-error"},de&&de.message))},exports.getBadgeConfig=b;
|
package/package.json
CHANGED
|
@@ -132,7 +132,7 @@ export const MapPoint = ({
|
|
|
132
132
|
<ProductIcon
|
|
133
133
|
x={pointX}
|
|
134
134
|
y={pointY}
|
|
135
|
-
|
|
135
|
+
isSoldOut={isSoldOut}
|
|
136
136
|
isActive={isActive}
|
|
137
137
|
isProductChoosed={isProductChoosed}
|
|
138
138
|
isErrorOnChoosedProduct={isErrorOnChoosedProduct}
|
|
@@ -142,7 +142,7 @@ export const MapPoint = ({
|
|
|
142
142
|
x={pointX}
|
|
143
143
|
y={pointY}
|
|
144
144
|
isActive={isActive}
|
|
145
|
-
hasProduct={Boolean(pointProduct)}
|
|
145
|
+
hasProduct={!isSoldOut && Boolean(pointProduct)}
|
|
146
146
|
pointNumber={pointNumber}
|
|
147
147
|
onDelete={onDelete}
|
|
148
148
|
editMode={editMode}
|
package/src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx
CHANGED
|
@@ -22,6 +22,7 @@ const BACKGROUND_COLOR = "#FFFFFF";
|
|
|
22
22
|
const BACKGROUND_COLOR_TRANSPARENT = "#FFFFFF80";
|
|
23
23
|
const FILL_COLOR = "#0E8CE2";
|
|
24
24
|
const ERROR_COLOR_TRANSPARENT = "#ff000080";
|
|
25
|
+
const NO_PRODUCT_ON_POINT = "#878787";
|
|
25
26
|
const SNIPPET_TEMPLATE_ID = "snippet-template-context";
|
|
26
27
|
|
|
27
28
|
export type ProductIconProps = KonvaNodeEvents &
|
|
@@ -29,6 +30,7 @@ export type ProductIconProps = KonvaNodeEvents &
|
|
|
29
30
|
x: number;
|
|
30
31
|
y: number;
|
|
31
32
|
isActive?: boolean;
|
|
33
|
+
isSoldOut?: boolean;
|
|
32
34
|
isErrorOnChoosedProduct: boolean;
|
|
33
35
|
isProductChoosed: boolean;
|
|
34
36
|
};
|
|
@@ -53,6 +55,7 @@ export const ProductIcon = ({
|
|
|
53
55
|
x,
|
|
54
56
|
y,
|
|
55
57
|
isActive,
|
|
58
|
+
isSoldOut,
|
|
56
59
|
isErrorOnChoosedProduct,
|
|
57
60
|
isProductChoosed,
|
|
58
61
|
}: ProductIconProps) => {
|
|
@@ -107,6 +110,11 @@ export const ProductIcon = ({
|
|
|
107
110
|
stroke = ERROR_COLOR_TRANSPARENT;
|
|
108
111
|
}
|
|
109
112
|
|
|
113
|
+
if (isSoldOut) {
|
|
114
|
+
stroke = NO_PRODUCT_ON_POINT;
|
|
115
|
+
fill = NO_PRODUCT_ON_POINT;
|
|
116
|
+
}
|
|
117
|
+
|
|
110
118
|
return { fill, stroke };
|
|
111
119
|
};
|
|
112
120
|
|
|
@@ -183,7 +183,7 @@ export const RyftPaymentForm = ({
|
|
|
183
183
|
onSubmit={methods.handleSubmit(handleSubmit)}
|
|
184
184
|
className="ryft-payment-form"
|
|
185
185
|
>
|
|
186
|
-
<div className="submit-button-wrapper mt-3
|
|
186
|
+
<div className="submit-button-wrapper mt-3 p-1">
|
|
187
187
|
<Button type="submit" disabled={isBtnDisabled || !isValid}>
|
|
188
188
|
{isBtnDisabled && <ButtonLoader />}
|
|
189
189
|
{t("Design:buyNow")}
|
|
@@ -165,17 +165,21 @@ export function ProductCategoriesControl({
|
|
|
165
165
|
return sum + Number(product.price) * Number(product.totalQuantity);
|
|
166
166
|
}, 0);
|
|
167
167
|
const quantity = productCategory.products?.reduce((sum, product) => {
|
|
168
|
-
|
|
168
|
+
const productQuantity = !product.isUnlimited
|
|
169
|
+
? Number(product.totalQuantity)
|
|
170
|
+
: 0;
|
|
171
|
+
return sum + productQuantity;
|
|
169
172
|
}, 0);
|
|
170
173
|
|
|
171
|
-
setProductCategoryState({
|
|
174
|
+
setProductCategoryState((prevState) => ({
|
|
175
|
+
...prevState,
|
|
172
176
|
// New added categories will have uniqueId
|
|
173
177
|
// but existing have already assigned Id.
|
|
174
178
|
[productCategory?.id || productCategory.uniqueId]: {
|
|
175
179
|
price,
|
|
176
180
|
quantity,
|
|
177
181
|
},
|
|
178
|
-
});
|
|
182
|
+
}));
|
|
179
183
|
});
|
|
180
184
|
}, [productCategories]);
|
|
181
185
|
|