@licklist/design 0.44.502 → 0.44.504

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.
@@ -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:[]}};
@@ -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,mB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BAAqB,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,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;AAQhC,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,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,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))))))};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- interface Filters {
2
+ export interface Filters {
3
3
  id: string;
4
4
  name: string;
5
5
  email: string;
@@ -14,5 +14,4 @@ export interface SaleFiltersProps {
14
14
  onChange: (values: Filters) => void;
15
15
  }
16
16
  export declare function SaleFilters({ values, onChange }: SaleFiltersProps): JSX.Element;
17
- export {};
18
17
  //# sourceMappingURL=SaleFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SaleFilters.d.ts","sourceRoot":"","sources":["../../../src/sales/filters/SaleFilters.tsx"],"names":[],"mappings":";AAMA,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC;AAUD,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,eAsDjE"}
1
+ {"version":3,"file":"SaleFilters.d.ts","sourceRoot":"","sources":["../../../src/sales/filters/SaleFilters.tsx"],"names":[],"mappings":";AAMA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC;AAUD,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,eAsDjE"}
@@ -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,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,E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
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:
@@ -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>
@@ -4,7 +4,7 @@ import clsx from "clsx";
4
4
  import { TextField } from "../../static/TextField";
5
5
  import { DateRangeInput } from "../../static/date-range-input";
6
6
 
7
- interface Filters {
7
+ export interface Filters {
8
8
  id: string;
9
9
  name: string;
10
10
  email: string;
@@ -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;