@licklist/design 0.44.485-dev.31 → 0.44.485-dev.33
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/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/events/event-venue-map/components/MapPoint/MapPoint.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/MapPoint.js +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +1 -0
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/package.json +1 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
- package/src/events/event-venue-map/components/MapPoint/MapPoint.tsx +3 -1
- package/src/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.tsx +0 -1
- package/src/product-set/control/ProductSetControl.tsx +23 -0
|
@@ -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;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,
|
|
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;AAErE,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"),i=require("../../../product-set/utils/index.js");exports.getDefaultValues=function(o,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),i=require("../../../product-set/utils/index.js");exports.getDefaultValues=function(o,n){var t,d,u,s,r,a,v,p,_,m,c,g;return{id:null!==(t=null==o?void 0:o.id)&&void 0!==t?t:0,name:null!==(d=null==o?void 0:o.name)&&void 0!==d?d:"",type:null!==(u=null==o?void 0:o.type)&&void 0!==u?u:l.DEFAULT_PRODUCT_SET_TYPE,termsAndConditions:null!==(s=null==o?void 0:o.termsAndConditions)&&void 0!==s?s:"",operationalCost:null!==(r=null==o?void 0:o.operationalCost)&&void 0!==r?r:l.DEFAULT_OPERATIONAL_COST_TYPE,thankYouPageUrl:null!==(a=null==o?void 0:o.thankYouPageUrl)&&void 0!==a?a:"",isDefault:null!==(v=null==o?void 0:o.isDefault)&&void 0!==v&&v,fieldSetId:null==o?void 0:o.fieldSetId,emailTemplates:(null==o?void 0:o.mailTemplates)&&(null===(p=null==o?void 0:o.mailTemplates)||void 0===p?void 0:p.length)>0?i.getFilteredTemplates(null==o?void 0:o.mailTemplates):void 0,smsTemplates:(null==o?void 0:o.smsTemplates)&&(null===(_=null==o?void 0:o.smsTemplates)||void 0===_?void 0:_.length)>0?i.getFilteredTemplates(null==o?void 0:o.mailTemplates):void 0,steps:null!==(c=null===(m=null==o?void 0:o.steps)||void 0===m?void 0:m.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!==c?c:void 0,menuRecurrences:n?[]:null!==(g=null==o?void 0:o.menuRecurrences)&&void 0!==g?g:[]}};
|
|
@@ -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,KAAK,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,
|
|
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,KAAK,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,
|
|
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":"ProductTooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.tsx"],"names":[],"mappings":";AAkBA,KAAK,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,
|
|
1
|
+
{"version":3,"file":"ProductTooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.tsx"],"names":[],"mappings":";AAkBA,KAAK,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"}
|
package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.js
CHANGED
|
@@ -1 +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,{
|
|
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"}))};
|
|
@@ -15,6 +15,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
15
15
|
name: string;
|
|
16
16
|
type: ProductSetType;
|
|
17
17
|
termsAndConditions: string;
|
|
18
|
+
thankYouPageUrl: string;
|
|
18
19
|
isDefault: boolean;
|
|
19
20
|
operationalCost: OperationalCostType;
|
|
20
21
|
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;
|
|
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;AAIhG,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAShC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,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,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;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,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,EAAE,sBAAsB,eAyPxB"}
|
|
@@ -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"),
|
|
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"),p=(e(d),require("./DateAndRecurrenceInput.js")),E=require("./TutorialGifCard.js"),g=require("../form/StepsControl.js"),v=require("../../typeahead/Typeahead.js"),T=((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,h=e.fee,F=void 0===h?"5%":h,P=e.fieldSets,O=void 0===P?[]:P,S=e.emailTemplates,D=void 0===S?[]:S,_=e.smsTemplates,b=void 0===_?[]:_,A=e.isEventEditProductSet,I=e.isCreateAction,N=e.showEmailTemplate,q=e.showSmsTemplate,R=a.useTranslation(["Design","Validation","Notification"]).t,k=o.useFormContext(),L=k.register,y=k.control,x=k.formState.errors,M=k.watch,Y=k.setError,j=k.clearErrors,U=M("steps"),V=i.useId(),G=i.useId();return r.createElement(n.Row,{className:"product-set-form ".concat(A&&"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,R("Design:name"),"*"),r.createElement(n.Form.Control,t.__assign({},L("name",{required:R("Validation:fieldRequired",{attribute:R("name")}),maxLength:255,validate:function(){var e;return U.length?(null===(e=x.steps)||void 0===e?void 0:e.type)===l.manualErrorType&&j("steps"):Y("steps",{type:l.manualErrorType,message:R("Validation:fieldMinNumber",{attribute:R("steps"),min:1})}),!0}}),{placeholder:R("Design:placeholderProductSetName"),isInvalid:Boolean(x.name)})),r.createElement(n.Form.Control.Feedback,{type:"invalid"},null===(c=x.name)||void 0===c?void 0:c.message)),I&&r.createElement(p.DateAndRecurrenceInput,{isEventEditProductSet:A}),r.createElement("div",{className:"divider"}),r.createElement(E.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"},R("Design:operationalCost")),r.createElement("div",{className:"d-flex"},r.createElement("span",{className:"booking-fee-text"},R("bookingFeePaid",{fee:F}))),r.createElement(n.Form.Control,t.__assign({},L("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]},R(T[u.OPERATIONAL_COST_TYPES[e]],{companyName:f}))})))),r.createElement(n.Form.Group,{controlId:G},r.createElement(n.Form.Label,null,R("Design:termsAndConditions")),r.createElement(n.Form.Control,t.__assign({},L("termsAndConditions"),{as:"textarea",rows:2,disabled:C}))),r.createElement(n.Form.Group,null,r.createElement(n.Form.Label,{className:"mt-4"},R("Design:emailTemplate")),N?r.createElement(v.Typeahead,{name:"emailTemplates",options:D,isMultipleChoise:!0,placeholder:R("Design:choose"),noOptionsMessage:R("Design:noActiveTemplates",{notification:R("Design:email")})}):r.createElement(m.default,{message:R("Design:noActiveTemplates",{notification:R("Design:email")})}),r.createElement(n.Form.Label,{className:s(D.length>0?"mt-4":"mt-1")},R("Design:smsTemplate")),q?r.createElement(v.Typeahead,{name:"smsTemplates",options:b,isMultipleChoise:!0,placeholder:R("Design:choose"),noOptionsMessage:R("Design:noActiveTemplates",{notification:R("Design:sms")})}):r.createElement(m.default,{message:R("Design:noActiveTemplates",{notification:R("Design:sms")})})),r.createElement(n.Form.Group,null,r.createElement(o.Controller,{control:y,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,R("Design:customFields")),r.createElement(n.Form.Control,{onChange:t.onChange,as:"select"},r.createElement("option",{value:"",selected:""===a},R("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)}))))}})),r.createElement(n.Form.Group,{controlId:"thankYouPageUrlId"},r.createElement(n.Form.Label,null,R("thankYouPageUrl")),r.createElement(n.Form.Control,t.__assign({},L("thankYouPageUrl",{validate:function(e){return!e||(!!d.ruleForUrlWithProtocol.test(e)||R("Validation:fieldValidWebURL",{attribute:R("thankYouPageUrl")}))}}),{isInvalid:l.isInvalid("thankYouPageUrl",x)})),r.createElement(n.Form.Control.Feedback,{type:"invalid"},l.getErrors("thankYouPageUrl",x))))))};
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ export const getDefaultValues = (
|
|
|
15
15
|
type: productSet?.type ?? DEFAULT_PRODUCT_SET_TYPE,
|
|
16
16
|
termsAndConditions: productSet?.termsAndConditions ?? "",
|
|
17
17
|
operationalCost: productSet?.operationalCost ?? DEFAULT_OPERATIONAL_COST_TYPE,
|
|
18
|
+
thankYouPageUrl: productSet?.thankYouPageUrl ?? "",
|
|
18
19
|
isDefault: productSet?.isDefault ?? false,
|
|
19
20
|
fieldSetId: productSet?.fieldSetId,
|
|
20
21
|
emailTemplates:
|
|
@@ -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
|
-
(
|
|
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
|
|
|
@@ -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 {
|
|
@@ -43,6 +44,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
|
|
|
43
44
|
name: string;
|
|
44
45
|
type: ProductSetType;
|
|
45
46
|
termsAndConditions: string;
|
|
47
|
+
thankYouPageUrl: string;
|
|
46
48
|
isDefault: boolean;
|
|
47
49
|
operationalCost: OperationalCostType;
|
|
48
50
|
productGroups?: SelectItem[];
|
|
@@ -307,6 +309,27 @@ export function ProductSetControl({
|
|
|
307
309
|
}}
|
|
308
310
|
/>
|
|
309
311
|
</Form.Group>
|
|
312
|
+
|
|
313
|
+
<Form.Group controlId="thankYouPageUrlId">
|
|
314
|
+
<Form.Label>{t("thankYouPageUrl")}</Form.Label>
|
|
315
|
+
|
|
316
|
+
<Form.Control
|
|
317
|
+
{...register("thankYouPageUrl", {
|
|
318
|
+
validate: (url) => {
|
|
319
|
+
if (!url) return true;
|
|
320
|
+
if (ruleForUrlWithProtocol.test(url as string)) return true;
|
|
321
|
+
return t("Validation:fieldValidWebURL", {
|
|
322
|
+
attribute: t("thankYouPageUrl"),
|
|
323
|
+
}) as string;
|
|
324
|
+
},
|
|
325
|
+
})}
|
|
326
|
+
isInvalid={HookFormService.isInvalid("thankYouPageUrl", errors)}
|
|
327
|
+
/>
|
|
328
|
+
|
|
329
|
+
<Form.Control.Feedback type="invalid">
|
|
330
|
+
{HookFormService.getErrors("thankYouPageUrl", errors)}
|
|
331
|
+
</Form.Control.Feedback>
|
|
332
|
+
</Form.Group>
|
|
310
333
|
</div>
|
|
311
334
|
</Col>
|
|
312
335
|
</Row>
|