@licklist/design 0.44.501 → 0.44.503

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 (25) hide show
  1. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  2. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  3. package/dist/events/event-venue-map/components/MapPoint/MapPoint.d.ts.map +1 -1
  4. package/dist/events/event-venue-map/components/MapPoint/MapPoint.js +1 -1
  5. package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts.map +1 -1
  6. package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.js +1 -1
  7. package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.d.ts +9 -0
  8. package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.d.ts.map +1 -0
  9. package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.js +1 -0
  10. package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.d.ts +2 -0
  11. package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.d.ts.map +1 -0
  12. package/dist/product-set/control/ProductSetControl.d.ts +1 -0
  13. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  14. package/dist/product-set/control/ProductSetControl.js +1 -1
  15. package/dist/types/iframe.d.ts +1 -1
  16. package/dist/types/iframe.d.ts.map +1 -1
  17. package/package.json +1 -1
  18. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  19. package/src/events/event-venue-map/components/MapPoint/MapPoint.tsx +3 -1
  20. package/src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx +13 -2
  21. package/src/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.tsx +68 -0
  22. package/src/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.ts +1 -0
  23. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +5 -0
  24. package/src/product-set/control/ProductSetControl.tsx +23 -0
  25. package/src/types/iframe.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAqCD,CAAC"}
1
+ {"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAsCD,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper");exports.getDefaultValues=function(i,o){var n,d,t,u,s,r,a,v,p,_,c;return{id:null!==(n=null==i?void 0:i.id)&&void 0!==n?n:0,name:null!==(d=null==i?void 0:i.name)&&void 0!==d?d:"",type:null!==(t=null==i?void 0:i.type)&&void 0!==t?t:l.DEFAULT_PRODUCT_SET_TYPE,termsAndConditions:null!==(u=null==i?void 0:i.termsAndConditions)&&void 0!==u?u:"",operationalCost:null!==(s=null==i?void 0:i.operationalCost)&&void 0!==s?s:l.DEFAULT_OPERATIONAL_COST_TYPE,isDefault:null!==(r=null==i?void 0:i.isDefault)&&void 0!==r&&r,fieldSetId:null==i?void 0:i.fieldSetId,emailTemplateId:(null==i?void 0:i.mailTemplates)&&(null===(a=null==i?void 0:i.mailTemplates)||void 0===a?void 0:a.length)>0?null==i?void 0:i.mailTemplates[0].notification.id:void 0,smsTemplateId:(null==i?void 0:i.smsTemplates)&&(null===(v=null==i?void 0:i.smsTemplates)||void 0===v?void 0:v.length)>0?null==i?void 0:i.smsTemplates[0].notification.id:void 0,steps:null!==(_=null===(p=null==i?void 0:i.steps)||void 0===p?void 0:p.map((function(l){var i,o=l.productCategories,n=e.__rest(l,["productCategories"]);return e.__assign(e.__assign({},n),{productCategories:null==o?void 0:o.map((function(l){var i=l.products,o=e.__rest(l,["products"]);return e.__assign(e.__assign({},o),{products:null==i?void 0:i.map((function(l){var i=l.zoneId,o=l.subProducts,n=e.__rest(l,["zoneId","subProducts"]);return e.__assign(e.__assign({},n),{subProducts:null==o?void 0:o.map((function(l){var i=l.zoneId,o=e.__rest(l,["zoneId"]);return e.__assign(e.__assign({},o),{productCategoryId:void 0,zoneId:i})})),productCategoryId:void 0,zoneId:i})}))})})),venueMapSetId:(null==n?void 0:n.venueMapSet)?null===(i=null==n?void 0:n.venueMapSet)||void 0===i?void 0:i.id:null})})))&&void 0!==_?_:void 0,menuRecurrences:o?[]:null!==(c=null==i?void 0:i.menuRecurrences)&&void 0!==c?c:[]}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var l=require("tslib"),e=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper");exports.getDefaultValues=function(o,i){var n,d,t,u,s,a,r,v,p,_,c,m;return{id:null!==(n=null==o?void 0:o.id)&&void 0!==n?n:0,name:null!==(d=null==o?void 0:o.name)&&void 0!==d?d:"",type:null!==(t=null==o?void 0:o.type)&&void 0!==t?t:e.DEFAULT_PRODUCT_SET_TYPE,termsAndConditions:null!==(u=null==o?void 0:o.termsAndConditions)&&void 0!==u?u:"",operationalCost:null!==(s=null==o?void 0:o.operationalCost)&&void 0!==s?s:e.DEFAULT_OPERATIONAL_COST_TYPE,thankYouPageUrl:null!==(a=null==o?void 0:o.thankYouPageUrl)&&void 0!==a?a:"",isDefault:null!==(r=null==o?void 0:o.isDefault)&&void 0!==r&&r,fieldSetId:null==o?void 0:o.fieldSetId,emailTemplateId:(null==o?void 0:o.mailTemplates)&&(null===(v=null==o?void 0:o.mailTemplates)||void 0===v?void 0:v.length)>0?null==o?void 0:o.mailTemplates[0].notification.id:void 0,smsTemplateId:(null==o?void 0:o.smsTemplates)&&(null===(p=null==o?void 0:o.smsTemplates)||void 0===p?void 0:p.length)>0?null==o?void 0:o.smsTemplates[0].notification.id:void 0,steps:null!==(c=null===(_=null==o?void 0:o.steps)||void 0===_?void 0:_.map((function(e){var o,i=e.productCategories,n=l.__rest(e,["productCategories"]);return l.__assign(l.__assign({},n),{productCategories:null==i?void 0:i.map((function(e){var o=e.products,i=l.__rest(e,["products"]);return l.__assign(l.__assign({},i),{products:null==o?void 0:o.map((function(e){var o=e.zoneId,i=e.subProducts,n=l.__rest(e,["zoneId","subProducts"]);return l.__assign(l.__assign({},n),{subProducts:null==i?void 0:i.map((function(e){var o=e.zoneId,i=l.__rest(e,["zoneId"]);return l.__assign(l.__assign({},i),{productCategoryId:void 0,zoneId:o})})),productCategoryId:void 0,zoneId:o})}))})})),venueMapSetId:(null==n?void 0:n.venueMapSet)?null===(o=null==n?void 0:n.venueMapSet)||void 0===o?void 0:o.id:null})})))&&void 0!==c?c:void 0,menuRecurrences:i?[]:null!==(m=null==o?void 0:o.menuRecurrences)&&void 0!==m?m:[]}};
@@ -1 +1 @@
1
- {"version":3,"file":"MapPoint.d.ts","sourceRoot":"","sources":["../../../../../src/events/event-venue-map/components/MapPoint/MapPoint.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,aAAK,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GACjC,WAAW,GAAG;IACZ,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjE,YAAY,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAClC,CAAC;AAEJ,eAAO,MAAM,QAAQ,sMAclB,aAAa,gBAmHf,CAAC"}
1
+ {"version":3,"file":"MapPoint.d.ts","sourceRoot":"","sources":["../../../../../src/events/event-venue-map/components/MapPoint/MapPoint.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,aAAK,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GACjC,WAAW,GAAG;IACZ,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjE,YAAY,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAClC,CAAC;AAEJ,eAAO,MAAM,QAAQ,sMAclB,aAAa,gBAqHf,CAAC"}
@@ -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,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}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("tslib"),o=require("react"),t=(e=o)&&"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=o.useContext(i.EventVenueMapContext),b=y.setActiveElementKey,h=y.activeElementKey,q=y.setMapPoints,U=y.editMode,j=y.mapPointProducts,S=n.__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(){q((function(e){var n=e.slice(),o=n.find((function(e){return a&&e.id===a||m&&e.localId===m})),t=n.indexOf(o);return n.splice(t,1),n.push(o),n}))},X=function(e){e.cancelBubble=!0,A||E||(b(k),V())};return t.createElement(r.Group,{onClick:X,onTap:X,onMouseEnter:function(){V(),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}))};
@@ -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;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"}
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;AA0B1B,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,gBAwGlB,CAAC"}
@@ -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="#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
+ "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=require("../ProductTooltip/ProductTooltip.js"),a="#FFFFFF",c="#FFFFFF80",l="#0E8CE2",u="#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 s,p,v=o.x,C=o.y,f=o.isActive,F=o.isSoldOut,P=o.isErrorOnChoosedProduct,k=o.isProductChoosed,g=-28,h=t.__read(e.useState(!1),2),y=h[0],m=h[1],x=e.useMemo((function(){return{pointBackgroundColor:d("--snippet-canvas-point-background-color")||a,pointBorderColor:d("--snippet-canvas-point-border-color",!0)||c,pointFontColor:d("--snippet-canvas-point-font-color")||l,activePointBackgroundColor:d("--snippet-canvas-active-point-background-color")||l,activePointBorderColor:d("--snippet-canvas-active-point-border-color",!0)||c,activePointFontColor:d("--snippet-canvas-active-point-font-color")||a}}),[f,P,k]);return r.createElement(n.Group,{x:v,y:C,onMouseEnter:function(){return m(!0)},onMouseLeave:function(){return m(!1)}},r.createElement(n.Circle,t.__assign({radius:14,strokeWidth:2,x:0,y:-21},(s=x.pointBackgroundColor,p=x.pointBorderColor,f&&(p=x.activePointBorderColor),k&&(s=x.activePointBackgroundColor),P&&(p="#ff000080"),F&&(p=u,s=u),{fill:s,stroke:p}))),y&&F&&r.createElement(i.ProductTooltip,{x:-7,y:g,text:"Sold out"}),k?r.createElement(n.Path,{x:-7,y:g,data:"M1.5 6L5.5 10L13.5 2",width:28,height:28,fill:x.activePointBackgroundColor,stroke:x.activePointFontColor,strokeWidth:3}):r.createElement(n.Path,{x:-7,y:g,data:"M14 0C9.3569 0.6633 4.6431 0.6633 0 0L6 7V13H3V14H11V13H8V7L14 0Z",width:28,height:28,strokeWidth:1,fill:x.pointFontColor,stroke:x.pointFontColor}))};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ declare type ProductTooltipProps = {
3
+ x: number;
4
+ y: number;
5
+ text: string;
6
+ };
7
+ export declare const ProductTooltip: ({ x, y, text }: ProductTooltipProps) => JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=ProductTooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductTooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.tsx"],"names":[],"mappings":";AAkBA,aAAK,mBAAmB,GAAG;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,mBAAoB,mBAAmB,gBA2CjE,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-konva"),l="#000";exports.ProductTooltip=function(e){var t=e.x,o=e.y,c=e.text;return r.createElement(i.Group,{width:60,height:20,x:t+30,y:o-1},r.createElement(i.Rect,{x:-5,y:5,sceneFunc:function(e){e.beginPath(),e.moveTo(0,5),e.lineTo(5,0),e.lineTo(5,10),e.closePath(),e.fill()},fill:l,borderColor:l,opacity:.8}),r.createElement(i.Rect,{x:0,y:0,width:60,height:20,fill:l,cornerRadius:5,opacity:.8}),r.createElement(i.Text,{y:4,text:c,strokeWidth:5,width:60,align:"center",verticalAlign:"middle",fill:"#FFF"}))};
@@ -0,0 +1,2 @@
1
+ export { ProductTooltip } from "./ProductTooltip";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -10,6 +10,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
10
10
  name: string;
11
11
  type: ProductSetType;
12
12
  termsAndConditions: string;
13
+ thankYouPageUrl: string;
13
14
  isDefault: boolean;
14
15
  operationalCost: OperationalCostType;
15
16
  productGroups?: SelectItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAIL,mBAAmB,EACnB,cAAc,EACf,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAQhC,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,GACf,EAAE,sBAAsB,eA8OxB"}
1
+ {"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAIL,mBAAmB,EACnB,cAAc,EACf,MAAM,6DAA6D,CAAC;AAErE,OAAO,EA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E,sBAAsB,eAmQxB"}
@@ -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=e(require("react")),a=require("react-i18next"),n=require("react-bootstrap"),o=require("react-hook-form"),l=e(require("@licklist/plugins/dist/services/Form/HookFormService")),i=require("@react-aria/utils"),s=e(require("clsx")),m=require("../../static/WarningMessage.js");require("../../static/index.js");var c,u=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),d=require("./DateAndRecurrenceInput.js"),p=require("./TutorialGifCard.js"),E=require("../form/StepsControl.js"),g=((c={})[u.OPERATIONAL_COST_PROVIDER]="operationalCostProvider",c[u.OPERATIONAL_COST_CUSTOMER]="operationalCostCustomer",c);exports.ProductSetControl=function(e){var c,v=e.companyName,f=e.isLoading,C=e.fee,T=void 0===C?"5%":C,S=e.fieldSets,O=void 0===S?[]:S,_=e.emailTemplates,F=void 0===_?[]:_,N=e.smsTemplates,P=void 0===N?[]:N,b=e.isEventEditProductSet,A=e.isCreateAction,D=a.useTranslation(["Design","Validation","Notification"]).t,I=o.useFormContext(),q=I.register,L=I.control,R=I.formState.errors,h=I.watch,y=I.setError,k=I.clearErrors,x=h("steps"),j=h("smsTemplateId"),G=h("emailTemplateId"),M=i.useId(),V=i.useId();return r.createElement(n.Row,{className:"product-set-form ".concat(b&&"event-edit-product-set")},r.createElement(n.Col,{md:6,sm:12,className:"pr-5"},r.createElement(n.Form.Group,{controlId:M},r.createElement(n.Form.Label,null,D("Design:name"),"*"),r.createElement(n.Form.Control,t.__assign({},q("name",{required:D("Validation:fieldRequired",{attribute:D("name")}),maxLength:255,validate:function(){var e;return x.length?(null===(e=R.steps)||void 0===e?void 0:e.type)===l.manualErrorType&&k("steps"):y("steps",{type:l.manualErrorType,message:D("Validation:fieldMinNumber",{attribute:D("steps"),min:1})}),!0}}),{placeholder:D("Design:placeholderProductSetName"),isInvalid:Boolean(R.name)})),r.createElement(n.Form.Control.Feedback,{type:"invalid"},null===(c=R.name)||void 0===c?void 0:c.message)),A&&r.createElement(d.DateAndRecurrenceInput,{isEventEditProductSet:b}),r.createElement("div",{className:"divider"}),r.createElement(p.default,null),r.createElement(E.StepsControl,{isLoading:f})),r.createElement(n.Col,{md:6,sm:12},r.createElement("div",{className:"second-column"},r.createElement(n.Form.Group,null,r.createElement(n.Form.Label,{className:"mb-0"},D("Design:operationalCost")),r.createElement("div",{className:"d-flex"},r.createElement("span",{className:"booking-fee-text"},D("bookingFeePaid",{fee:T}))),r.createElement(n.Form.Control,t.__assign({},q("operationalCost",{required:!0}),{as:"select",defaultValue:u.OPERATIONAL_COST_PROVIDER}),Object.keys(u.OPERATIONAL_COST_TYPES).map((function(e){return r.createElement("option",{value:u.OPERATIONAL_COST_TYPES[e],key:u.OPERATIONAL_COST_TYPES[e]},D(g[u.OPERATIONAL_COST_TYPES[e]],{companyName:v}))})))),r.createElement(n.Form.Group,{controlId:V},r.createElement(n.Form.Label,null,D("Design:termsAndConditions")),r.createElement(n.Form.Control,t.__assign({},q("termsAndConditions"),{as:"textarea",rows:2,disabled:f}))),r.createElement(n.Form.Group,null,r.createElement(n.Form.Label,{className:"mt-4"},D("Design:emailTemplate")),F.length>0?r.createElement(n.Form.Control,t.__assign({},q("emailTemplateId"),{as:"select"}),r.createElement("option",{value:"",selected:""===String(G)},D("Design:choose")),F.map((function(e){return r.createElement("option",{value:Number(e.notification.id),key:e.id},e.notification.name)}))):r.createElement(m.default,{message:D("Design:noActiveTemplates",{notification:D("Design:email")})}),r.createElement(n.Form.Label,{className:s(F.length>0?"mt-4":"mt-1")},D("Design:smsTemplate")),P.length>0?r.createElement(n.Form.Control,t.__assign({},q("smsTemplateId"),{as:"select"}),r.createElement("option",{value:"",selected:""===String(j)},D("Design:choose")),P.map((function(e){return r.createElement("option",{value:Number(e.notification.id),key:e.id},e.notification.name)}))):r.createElement(m.default,{message:D("Design:noActiveTemplates",{notification:D("Design:sms")})})),r.createElement(n.Form.Group,null,r.createElement(o.Controller,{control:L,name:"fieldSetId",render:function(e){var t=e.field,a=String(t.value);return r.createElement(r.Fragment,null,r.createElement(n.Form.Label,null,D("Design:customFields")),r.createElement(n.Form.Control,{onChange:t.onChange,as:"select"},r.createElement("option",{value:"",selected:""===a},D("Design:choose")),null==O?void 0:O.map((function(e){var t=String(e.id);return r.createElement("option",{value:e.id,key:e.id,selected:a===t},e.name)}))))}})))))};
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=e(require("react")),a=require("react-i18next"),n=require("react-bootstrap"),o=require("react-hook-form"),l=e(require("@licklist/plugins/dist/services/Form/HookFormService")),i=require("@react-aria/utils"),s=e(require("clsx")),m=require("../../static/WarningMessage.js");require("../../static/index.js");var c,u=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),d=require("@licklist/plugins/dist/validation/Rules/urlRule"),E=(e(d),require("./DateAndRecurrenceInput.js")),p=require("./TutorialGifCard.js"),g=require("../form/StepsControl.js"),v=((c={})[u.OPERATIONAL_COST_PROVIDER]="operationalCostProvider",c[u.OPERATIONAL_COST_CUSTOMER]="operationalCostCustomer",c);exports.ProductSetControl=function(e){var c,f=e.companyName,C=e.isLoading,T=e.fee,F=void 0===T?"5%":T,P=e.fieldSets,_=void 0===P?[]:P,S=e.emailTemplates,O=void 0===S?[]:S,b=e.smsTemplates,I=void 0===b?[]:b,N=e.isEventEditProductSet,h=e.isCreateAction,A=a.useTranslation(["Design","Validation","Notification"]).t,D=o.useFormContext(),k=D.register,R=D.control,q=D.formState.errors,L=D.watch,y=D.setError,x=D.clearErrors,Y=L("steps"),U=L("smsTemplateId"),j=L("emailTemplateId"),V=i.useId(),G=i.useId();return r.createElement(n.Row,{className:"product-set-form ".concat(N&&"event-edit-product-set")},r.createElement(n.Col,{md:6,sm:12,className:"pr-5"},r.createElement(n.Form.Group,{controlId:V},r.createElement(n.Form.Label,null,A("Design:name"),"*"),r.createElement(n.Form.Control,t.__assign({},k("name",{required:A("Validation:fieldRequired",{attribute:A("name")}),maxLength:255,validate:function(){var e;return Y.length?(null===(e=q.steps)||void 0===e?void 0:e.type)===l.manualErrorType&&x("steps"):y("steps",{type:l.manualErrorType,message:A("Validation:fieldMinNumber",{attribute:A("steps"),min:1})}),!0}}),{placeholder:A("Design:placeholderProductSetName"),isInvalid:Boolean(q.name)})),r.createElement(n.Form.Control.Feedback,{type:"invalid"},null===(c=q.name)||void 0===c?void 0:c.message)),h&&r.createElement(E.DateAndRecurrenceInput,{isEventEditProductSet:N}),r.createElement("div",{className:"divider"}),r.createElement(p.default,null),r.createElement(g.StepsControl,{isLoading:C})),r.createElement(n.Col,{md:6,sm:12},r.createElement("div",{className:"second-column"},r.createElement(n.Form.Group,null,r.createElement(n.Form.Label,{className:"mb-0"},A("Design:operationalCost")),r.createElement("div",{className:"d-flex"},r.createElement("span",{className:"booking-fee-text"},A("bookingFeePaid",{fee:F}))),r.createElement(n.Form.Control,t.__assign({},k("operationalCost",{required:!0}),{as:"select",defaultValue:u.OPERATIONAL_COST_PROVIDER}),Object.keys(u.OPERATIONAL_COST_TYPES).map((function(e){return r.createElement("option",{value:u.OPERATIONAL_COST_TYPES[e],key:u.OPERATIONAL_COST_TYPES[e]},A(v[u.OPERATIONAL_COST_TYPES[e]],{companyName:f}))})))),r.createElement(n.Form.Group,{controlId:G},r.createElement(n.Form.Label,null,A("Design:termsAndConditions")),r.createElement(n.Form.Control,t.__assign({},k("termsAndConditions"),{as:"textarea",rows:2,disabled:C}))),r.createElement(n.Form.Group,null,r.createElement(n.Form.Label,{className:"mt-4"},A("Design:emailTemplate")),O.length>0?r.createElement(n.Form.Control,t.__assign({},k("emailTemplateId"),{as:"select"}),r.createElement("option",{value:"",selected:""===String(j)},A("Design:choose")),O.map((function(e){return r.createElement("option",{value:Number(e.notification.id),key:e.id},e.notification.name)}))):r.createElement(m.default,{message:A("Design:noActiveTemplates",{notification:A("Design:email")})}),r.createElement(n.Form.Label,{className:s(O.length>0?"mt-4":"mt-1")},A("Design:smsTemplate")),I.length>0?r.createElement(n.Form.Control,t.__assign({},k("smsTemplateId"),{as:"select"}),r.createElement("option",{value:"",selected:""===String(U)},A("Design:choose")),I.map((function(e){return r.createElement("option",{value:Number(e.notification.id),key:e.id},e.notification.name)}))):r.createElement(m.default,{message:A("Design:noActiveTemplates",{notification:A("Design:sms")})})),r.createElement(n.Form.Group,null,r.createElement(o.Controller,{control:R,name:"fieldSetId",render:function(e){var t=e.field,a=String(t.value);return r.createElement(r.Fragment,null,r.createElement(n.Form.Label,null,A("Design:customFields")),r.createElement(n.Form.Control,{onChange:t.onChange,as:"select"},r.createElement("option",{value:"",selected:""===a},A("Design:choose")),null==_?void 0:_.map((function(e){var t=String(e.id);return r.createElement("option",{value:e.id,key:e.id,selected:a===t},e.name)}))))}})),r.createElement(n.Form.Group,{controlId:"thankYouPageUrlId"},r.createElement(n.Form.Label,null,A("thankYouPageUrl")),r.createElement(n.Form.Control,t.__assign({},k("thankYouPageUrl",{validate:function(e){return!e||(!!d.ruleForUrlWithProtocol.test(e)||A("Validation:fieldValidWebURL",{attribute:A("thankYouPageUrl")}))}}),{isInvalid:l.isInvalid("thankYouPageUrl",q)})),r.createElement(n.Form.Control.Feedback,{type:"invalid"},l.getErrors("thankYouPageUrl",q))))))};
@@ -8,7 +8,7 @@ export interface Product {
8
8
  minSub?: number;
9
9
  minAmount?: number;
10
10
  maxAmount?: number;
11
- minSpend?: number;
11
+ minSpend?: number | null;
12
12
  isSoldOut?: boolean;
13
13
  isRequired?: boolean;
14
14
  isUnlimited?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/types/iframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAElG,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAA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WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,eAAe,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,oBAAY,UAAU,GAAG,CACvB,GAAG,EACC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACrB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAC5D,IAAI,CAAC;AAEV,oBAAY,gBAAgB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.501",
3
+ "version": "0.44.503",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -14,6 +14,7 @@ export const getDefaultValues = (
14
14
  type: productSet?.type ?? DEFAULT_PRODUCT_SET_TYPE,
15
15
  termsAndConditions: productSet?.termsAndConditions ?? "",
16
16
  operationalCost: productSet?.operationalCost ?? DEFAULT_OPERATIONAL_COST_TYPE,
17
+ thankYouPageUrl: productSet?.thankYouPageUrl ?? "",
17
18
  isDefault: productSet?.isDefault ?? false,
18
19
  fieldSetId: productSet?.fieldSetId,
19
20
  emailTemplateId:
@@ -78,7 +78,8 @@ export const MapPoint = ({
78
78
  // have 2 points near one by one
79
79
  const nextPoints = prevPoints.slice();
80
80
  const currentPoint = nextPoints.find(
81
- (i) => i.id === id || i?.localId === localId
81
+ (point) =>
82
+ (id && point.id === id) || (localId && point.localId === localId)
82
83
  );
83
84
  const currentPointIndex = nextPoints.indexOf(currentPoint);
84
85
 
@@ -106,6 +107,7 @@ export const MapPoint = ({
106
107
  };
107
108
 
108
109
  const onMouseEnter = () => {
110
+ changePointPosition();
109
111
  changeCursorType("pointer");
110
112
  };
111
113
 
@@ -1,6 +1,7 @@
1
- import React, { useMemo } from "react";
1
+ import React, { useMemo, useState } from "react";
2
2
  import { Path, KonvaNodeEvents, Group, Circle } from "react-konva";
3
3
  import Konva from "konva";
4
+ import { ProductTooltip } from "../ProductTooltip";
4
5
 
5
6
  const ICON_DATA =
6
7
  "M14 0C9.3569 0.6633 4.6431 0.6633 0 0L6 7V13H3V14H11V13H8V7L14 0Z";
@@ -62,6 +63,8 @@ export const ProductIcon = ({
62
63
  const defaultX = -X_OFFSET;
63
64
  const defaultY = -Y_OFFSET;
64
65
 
66
+ const [hovered, setHovered] = useState<boolean>(false);
67
+
65
68
  const cssVariableValues = useMemo(() => {
66
69
  return {
67
70
  pointBackgroundColor:
@@ -119,7 +122,12 @@ export const ProductIcon = ({
119
122
  };
120
123
 
121
124
  return (
122
- <Group x={x} y={y}>
125
+ <Group
126
+ x={x}
127
+ y={y}
128
+ onMouseEnter={() => setHovered(true)}
129
+ onMouseLeave={() => setHovered(false)}
130
+ >
123
131
  <Circle
124
132
  radius={CIRCLE_RADIUS}
125
133
  strokeWidth={POINT_STROKE_WIDTH}
@@ -127,6 +135,9 @@ export const ProductIcon = ({
127
135
  y={defaultY * 0.75}
128
136
  {...circleColors()}
129
137
  />
138
+ {hovered && isSoldOut && (
139
+ <ProductTooltip x={defaultX} y={defaultY} text="Sold out" />
140
+ )}
130
141
  {isProductChoosed ? (
131
142
  <Path
132
143
  x={defaultX}
@@ -0,0 +1,68 @@
1
+ import React from "react";
2
+ import { Group, Rect, Text } from "react-konva";
3
+
4
+ const TOOLTIP_WIDTH = 60;
5
+ const TOOLTIP_HEIGHT = 20;
6
+
7
+ const BACKGROUND_COLOR = "#000";
8
+ const BACKGROUND_Y_OFFSET = 1;
9
+ const BACKGROUND_X_OFFSET = 30;
10
+ const BACKGROUND_RADIUS = 5;
11
+ const BACKGROUND_OPACITY = 0.8;
12
+
13
+ const TEXT_Y_OFFSET = 4;
14
+ const TEXT_STROKE_WIDTH = 5;
15
+ const TEXT_COLOR = "#FFF";
16
+ const TEXT_ALIGN = "center";
17
+ const TEXT_VERTICAL_ALIGN = "middle";
18
+
19
+ type ProductTooltipProps = {
20
+ x: number;
21
+ y: number;
22
+ text: string;
23
+ };
24
+
25
+ export const ProductTooltip = ({ x, y, text }: ProductTooltipProps) => {
26
+ return (
27
+ <Group
28
+ width={TOOLTIP_WIDTH}
29
+ height={TOOLTIP_HEIGHT}
30
+ x={x + BACKGROUND_X_OFFSET}
31
+ y={y - BACKGROUND_Y_OFFSET}
32
+ >
33
+ <Rect
34
+ x={-5}
35
+ y={5}
36
+ sceneFunc={(context) => {
37
+ context.beginPath();
38
+ context.moveTo(0, 5);
39
+ context.lineTo(5, 0);
40
+ context.lineTo(5, 10);
41
+ context.closePath();
42
+ context.fill();
43
+ }}
44
+ fill={BACKGROUND_COLOR}
45
+ borderColor={BACKGROUND_COLOR}
46
+ opacity={BACKGROUND_OPACITY}
47
+ />
48
+ <Rect
49
+ x={0}
50
+ y={0}
51
+ width={TOOLTIP_WIDTH}
52
+ height={TOOLTIP_HEIGHT}
53
+ fill={BACKGROUND_COLOR}
54
+ cornerRadius={BACKGROUND_RADIUS}
55
+ opacity={BACKGROUND_OPACITY}
56
+ />
57
+ <Text
58
+ y={TEXT_Y_OFFSET}
59
+ text={text}
60
+ strokeWidth={TEXT_STROKE_WIDTH}
61
+ width={TOOLTIP_WIDTH}
62
+ align={TEXT_ALIGN}
63
+ verticalAlign={TEXT_VERTICAL_ALIGN}
64
+ fill={TEXT_COLOR}
65
+ />
66
+ </Group>
67
+ );
68
+ };
@@ -0,0 +1 @@
1
+ export { ProductTooltip } from "./ProductTooltip";
@@ -6,6 +6,7 @@ import { Page, PageBody, PageHeader } from "../../page";
6
6
  import { BookingSummaryFooter } from "../../order-process/components/BookingSummaryFooter";
7
7
  import { BookingSummary } from "../../order-process/components/BookingSummary";
8
8
  import { CalendarSelect } from "../event-calendar/components/CalendarSelect";
9
+ import { Product } from "../../../types";
9
10
 
10
11
  export default {
11
12
  title: "Iframe/Event/IframeEventVenueMap",
@@ -268,6 +269,10 @@ export function Default() {
268
269
  pointProducts={MENU_STEPS[0].pointProducts}
269
270
  usedInIframe={usedInIframe}
270
271
  onPointClick={(pointId) => console.log({ pointId })}
272
+ products={
273
+ MENU_STEPS[0].productCategories[0]
274
+ .products as Partial<Product>[]
275
+ }
271
276
  choosedProductUuids={[
272
277
  "beb6393c-2fdd-40f7-bb92-8800685b203f",
273
278
  "beb6393c-2fdd-40f7-bb92-8800685b203a",
@@ -15,6 +15,7 @@ import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMappe
15
15
  import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
16
16
  import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper";
17
17
  import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
18
+ import { ruleForUrlWithProtocol } from "@licklist/plugins/dist/validation/Rules/urlRule";
18
19
  import { WarningMessage } from "../../static";
19
20
  import { SelectItem } from "../../types/generic/SelectItem";
20
21
  import {
@@ -36,6 +37,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
36
37
  name: string;
37
38
  type: ProductSetType;
38
39
  termsAndConditions: string;
40
+ thankYouPageUrl: string;
39
41
  isDefault: boolean;
40
42
  operationalCost: OperationalCostType;
41
43
  productGroups?: SelectItem[];
@@ -302,6 +304,27 @@ export function ProductSetControl({
302
304
  }}
303
305
  />
304
306
  </Form.Group>
307
+
308
+ <Form.Group controlId="thankYouPageUrlId">
309
+ <Form.Label>{t("thankYouPageUrl")}</Form.Label>
310
+
311
+ <Form.Control
312
+ {...register("thankYouPageUrl", {
313
+ validate: (url) => {
314
+ if (!url) return true;
315
+ if (ruleForUrlWithProtocol.test(url as string)) return true;
316
+ return t("Validation:fieldValidWebURL", {
317
+ attribute: t("thankYouPageUrl"),
318
+ }) as string;
319
+ },
320
+ })}
321
+ isInvalid={HookFormService.isInvalid("thankYouPageUrl", errors)}
322
+ />
323
+
324
+ <Form.Control.Feedback type="invalid">
325
+ {HookFormService.getErrors("thankYouPageUrl", errors)}
326
+ </Form.Control.Feedback>
327
+ </Form.Group>
305
328
  </div>
306
329
  </Col>
307
330
  </Row>
@@ -9,7 +9,7 @@ export interface Product {
9
9
  minSub?: number;
10
10
  minAmount?: number;
11
11
  maxAmount?: number;
12
- minSpend?: number;
12
+ minSpend?: number | null;
13
13
  isSoldOut?: boolean;
14
14
  isRequired?: boolean;
15
15
  isUnlimited?: boolean;