@licklist/design 0.66.12 → 0.66.13
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/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/layout/DropDown.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/form/ProductZonesControl.d.ts +10 -0
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -0
- package/dist/product-set/form/ProductZonesControl.js +1 -0
- package/dist/product-set/form/ProductsControl.d.ts +1 -3
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts +5 -8
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.d.ts +9 -0
- package/dist/product-set/product/advanced-options/AdvancedOptions.d.ts.map +1 -0
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -0
- package/dist/product-set/product/advanced-options/index.d.ts +2 -0
- package/dist/product-set/product/advanced-options/index.d.ts.map +1 -0
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -2
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/product-set/product-zone/ProductZoneControl.d.ts +16 -0
- package/dist/product-set/product-zone/ProductZoneControl.d.ts.map +1 -0
- package/dist/product-set/product-zone/ProductZoneControl.js +1 -0
- package/dist/product-set/product-zone/index.d.ts +2 -0
- package/dist/product-set/product-zone/index.d.ts.map +1 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts +3 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +1 -1
- package/dist/styles/product-set/CreateProductSetItem.scss +8 -0
- package/dist/styles/product-set/EditZoneSettingModal.scss +16 -0
- package/dist/styles/product-set/ProductSetForm.scss +14 -1
- package/dist/styles/product-set/_index.scss +2 -1
- package/package.json +4 -4
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -4
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
- package/src/layout/DropDown.tsx +1 -1
- package/src/product-set/control/ProductSetControl.tsx +11 -6
- package/src/product-set/form/ProductCategoriesControl.tsx +0 -3
- package/src/product-set/form/ProductZonesControl.tsx +181 -0
- package/src/product-set/form/ProductsControl.tsx +8 -24
- package/src/product-set/form/SubProductsControl.tsx +3 -0
- package/src/product-set/form/VenueMapsControl.tsx +3 -0
- package/src/product-set/product/ProductControl.tsx +23 -268
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +168 -0
- package/src/product-set/product/advanced-options/index.ts +1 -0
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +1 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +1 -60
- package/src/product-set/product-zone/ProductZoneControl.tsx +247 -0
- package/src/product-set/product-zone/index.ts +1 -0
- package/src/product-set/utils/index.ts +9 -5
- package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
- package/src/sortable-tree/SortableTreeItem.tsx +59 -45
- package/src/styles/product-set/CreateProductSetItem.scss +8 -0
- package/src/styles/product-set/EditZoneSettingModal.scss +16 -0
- package/src/styles/product-set/ProductSetForm.scss +14 -1
- package/src/styles/product-set/_index.scss +2 -1
|
@@ -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,
|
|
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,a=require("react-i18next"),l=require("react-bootstrap"),n=require("react-hook-form"),m=require("../../../static/form-number-input/FormNumberInput.js");require("../../../static/index.js");exports.FixedDurationOptions=function(e){var t=e.fieldNamePrefix,i=e.isOverrides,s=a.useTranslation("Design").t,o=n.useWatch({name:"".concat(t,".subSlots")});return r.createElement(r.Fragment,null,r.createElement(l.Row,{className:"mt-4"},r.createElement(l.Col,{lg:4,md:4,sm:6},r.createElement(m.FormNumberInput,{fieldName:"".concat(t,".subSlots"),label:s("subSlotsInMin"),disabled:i})),r.createElement(l.Col,{lg:4,md:4,sm:6},r.createElement(m.FormNumberInput,{fieldName:"".concat(t,".pause"),label:s("pauseInMin"),disabled:!o||i}))),r.createElement(l.Row,null,r.createElement(l.Col,{lg:4,md:4,sm:6},r.createElement(m.FormNumberInput,{fieldName:"".concat(t,".offset"),label:s("offsetInMin"),disabled:i})),r.createElement(l.Col,{lg:4,md:4,sm:6},r.createElement(m.FormNumberInput,{fieldName:"".concat(t,".serviceTime"),label:s("serviceTimeInMin"),disabled:i}))))};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormValues } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
|
|
3
3
|
import { QuantityType, CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
4
|
-
import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
|
|
5
4
|
import { IsDeletableEvent } from "../types";
|
|
6
5
|
export interface ProductCategoryControlValues extends FormValues {
|
|
7
6
|
id: number;
|
|
@@ -22,7 +21,6 @@ export interface ProductCategoryControlValues extends FormValues {
|
|
|
22
21
|
weight?: number;
|
|
23
22
|
isReusable?: boolean;
|
|
24
23
|
termsAndConditions?: string;
|
|
25
|
-
zoneId?: Zone["id"];
|
|
26
24
|
sort: number | null;
|
|
27
25
|
}
|
|
28
26
|
export interface ProductCategoryControlProps extends IsDeletableEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCategoryControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product-category/ProductCategoryControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE1F,OAAO,EACL,YAAY,EACZ,YAAY,EAKb,MAAM,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductCategoryControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product-category/ProductCategoryControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE1F,OAAO,EACL,YAAY,EACZ,YAAY,EAKb,MAAM,kEAAkE,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAG7D,MAAM,WAAW,4BAA6B,SAAQ,UAAU;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IAErB,oBAAoB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAQD,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,UAAkB,GACnB,EAAE,2BAA2B,eA4e7B"}
|
|
@@ -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"),n=require("react"),a=e(n),r=require("react-i18next"),l=require("react-bootstrap"),o=require("react-hook-form"),c=e(require("@licklist/plugins/dist/services/Form/HookFormService")),m=require("@react-aria/utils"),i=require("../../static/switch/Switch.js"),u=require("../../static/switch/BooleanSwitch.js"),s=require("../../assets/dashboard/increment.svg.js");require("../../static/index.js");var d=require("
|
|
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"),n=require("react"),a=e(n),r=require("react-i18next"),l=require("react-bootstrap"),o=require("react-hook-form"),c=e(require("@licklist/plugins/dist/services/Form/HookFormService")),m=require("@react-aria/utils"),i=require("../../static/switch/Switch.js"),u=require("../../static/switch/BooleanSwitch.js"),s=require("../../assets/dashboard/increment.svg.js");require("../../static/index.js");var d=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),p=[d.CATEGORY_TYPE_TICKETS,d.CATEGORY_TYPE_FIXED_DURATION,d.CATEGORY_TYPE_GAME];exports.ProductCategoryControl=function(e){var E,v,b,I,C=e.isLoading,f=e.categoryName,h=e.onCategoryNameChange,g=e.productCategoryIndex,F=e.stepIndex,x=e.isOverride,y=void 0!==x&&x,T=o.useFormContext(),N=T.control,G=T.formState.errors,S=T.register,k=T.clearErrors,w=T.setValue,_=T.getValues,q=T.watch,R=T.trigger,V=r.useTranslation("Design").t,L=t.__read(n.useState(!1),2),P=L[0],A=L[1],D="steps.".concat(F,".productCategories.").concat(g),Y=o.useWatch({name:D}),B=q("".concat(D,".maxSubItems"))||0,O=q("".concat(D,".minSubItems"))||0,M=q("".concat(D,".allowDeposits")),Q=p.includes(Y.type),j=null===(I=null===(b=null===(v=null===(E=null==G?void 0:G.steps)||void 0===E?void 0:E[F])||void 0===v?void 0:v.productCategories)||void 0===b?void 0:b[g])||void 0===I?void 0:I.products,U=m.useId(),K=m.useId(),H=m.useId(),W=m.useId(),X=m.useId(),z=m.useId(),J=m.useId(),Z=m.useId(),$=m.useId(),ee=m.useId(),te=m.useId(),ne=n.useCallback((function(){return A((function(e){return!e}))}),[]);return n.useEffect((function(){R("".concat(D,".maxSubItems"))}),[O,D]),n.useEffect((function(){R("".concat(D,".minSubItems"))}),[B,D]),a.createElement(a.Fragment,null,a.createElement(l.Col,{md:12,xl:!0,className:"p-0"},a.createElement(l.Form.Group,{controlId:K},a.createElement(l.Form.Label,null,V("nameOfTheCategory")),a.createElement(l.Form.Control,t.__assign({},S("".concat(D,".name"),{required:V("Validation:fieldRequired",{attribute:V("name")}),validate:function(){return(null==j?void 0:j.type)===c.manualErrorType&&k("".concat(D,".products")),!0}}),{value:f,onChange:h,isInvalid:c.isInvalid("".concat(D,".name"),G),placeholder:V("name"),disabled:C||y})),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(D,".name"),G))),a.createElement(l.Form.Group,{controlId:X},a.createElement(o.Controller,{control:N,name:"".concat(D,".quantityType"),render:function(e){var t=e.field;return a.createElement(l.Form.Group,{className:"d-flex flex-column flex-grow-1 align-items-start"},a.createElement(l.Form.Label,null,V("quantityType")),a.createElement(i.Switch,{name:t.name,options:d.QUANTITY_TYPES.map((function(e){return{key:e,id:e,value:V(e)}})),value:t.value,onChange:t.onChange,disabled:C||y}))}})),a.createElement(l.Row,null,a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:H},a.createElement(l.Form.Label,null,V("minItems")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(_("".concat(D,".minSubItems"))||0);w("".concat(D,".minSubItems"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",min:0,step:1,value:null===n?"":n,onChange:r,isInvalid:c.isInvalid("".concat(D,".minSubItems"),G),disabled:C||y,name:o})},control:N,name:"".concat(D,".minSubItems"),rules:{min:{value:0,message:V("Validation:fieldMinNumber",{attribute:V("minItems"),min:0})},max:B?{value:Number(B),message:V("Validation:fieldMaxNumber",{attribute:V("minItems"),max:V("maxItems")})}:void 0}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(D,".minSubItems"),G))))),a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:W},a.createElement(l.Form.Label,null,V("maxItems")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(_("".concat(D,".maxSubItems"))||0);w("".concat(D,".maxSubItems"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",step:1,name:o,value:null===n?"":n,onChange:r,isInvalid:c.isInvalid("".concat(D,".maxSubItems"),G),disabled:C||y})},control:N,name:"".concat(D,".maxSubItems"),rules:{min:{value:Number(O),message:V("Validation:fieldGreaterMinNumber",{attribute:V("maxItems"),min:V("minItems")})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(D,".maxSubItems"),G)))))),a.createElement(l.Row,null,a.createElement(l.Col,{md:6,sm:6,xs:6},a.createElement(l.Form.Group,{controlId:$},a.createElement(l.Form.Label,null,V("Design:overallQuantity")),a.createElement(l.InputGroup,{hasValidation:!0},a.createElement(l.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){var e=Number(_("".concat(D,".overallQuantity"))||0);w("".concat(D,".overallQuantity"),e+1,{shouldValidate:!0})}},a.createElement(l.InputGroup.Text,{className:"py-0 px-3"},a.createElement(s.ReactComponent,null))),a.createElement(o.Controller,{control:N,name:"".concat(D,".overallQuantity"),render:function(e){var n=e.field;return a.createElement(l.Form.Control,t.__assign({min:0,step:1,type:"number",disabled:y,isInvalid:c.isInvalid("".concat(D,".overallQuantity"),G)},n))},rules:{min:{value:0,message:V("Validation:fieldMinNumber",{attribute:V("overallQuantity"),min:0})}}}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(D,".overallQuantity"),G))))))),a.createElement(l.Col,{md:12,xl:!0,className:"p-0"},a.createElement(l.Form.Group,{controlId:U,className:"custom-checkbox"},a.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:U,disabled:C,id:"check-api"},a.createElement(l.Form.Check.Input,{checked:P,onChange:ne,disabled:y,type:"checkbox"}),a.createElement(l.Form.Check.Label,null,V("showAdvancedOptions")))),a.createElement(l.Collapse,{in:P},a.createElement("div",null,Q&&a.createElement(l.Form.Group,{controlId:Z,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,V("hasTicket")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:Y.type===d.CATEGORY_TYPE_TICKETS})},control:N,name:"".concat(D,".hasTicket")}))),Y.hasTicket&&a.createElement(l.Form.Group,{controlId:J,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,V("collectUserInfo")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:C||y})},control:N,name:"".concat(D,".collectUserInfo")}))),!Y.hasTicket&&a.createElement(l.Form.Group,{controlId:z,className:"advanced-switch-container"},a.createElement(a.Fragment,null,a.createElement(l.Form.Label,null,V("isTimeRelated")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:C||y})},control:N,name:"".concat(D,".isTimeRelated")})))),a.createElement(l.Form.Group,{controlId:ee,className:"advanced-switch-container"},a.createElement(l.Form.Label,null,V("allowDeposits")),a.createElement("div",null,a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.name,r=t.value,l=t.onChange;return a.createElement(u.BooleanSwitch,{name:n,value:Boolean(r),onChange:l,disabled:C||y})},control:N,name:"".concat(D,".allowDeposits")}))),M&&a.createElement(l.Form.Group,{controlId:te,className:"deposit-days"},a.createElement(l.Form.Label,null,V("depositDays")),a.createElement(o.Controller,{render:function(e){var t=e.field,n=t.value,r=t.onChange,o=t.name,m=t.ref;return a.createElement(l.Form.Control,{ref:m,type:"number",min:0,step:1,value:n,onChange:r,isInvalid:c.isInvalid("".concat(D,".remainderExpireAfter"),G),disabled:C||y,name:o})},control:N,name:"".concat(D,".remainderExpireAfter")}),a.createElement(l.Form.Control.Feedback,{type:"invalid"},c.getErrors("".concat(D,".remainderExpireAfter"),G)))))))};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ArrayPath } from "react-hook-form";
|
|
3
|
+
import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
4
|
+
import { FieldNamePrefixPath, FormValues } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
|
|
5
|
+
import { ProductZone } from "@licklist/core/dist/DataMapper/Product/ProductZoneDataMapper";
|
|
6
|
+
export interface ProductZoneControlValues extends FormValues, ProductZone {
|
|
7
|
+
id: number | null;
|
|
8
|
+
}
|
|
9
|
+
interface ProductZoneProps<T> extends FieldNamePrefixPath<T> {
|
|
10
|
+
isOverrides: boolean;
|
|
11
|
+
categoryType?: CategoryType;
|
|
12
|
+
productZonesFieldName: ArrayPath<T>;
|
|
13
|
+
}
|
|
14
|
+
export declare const ProductZoneControl: <T extends FormValues>({ isOverrides, categoryType, fieldNamePrefix, productZonesFieldName, }: ProductZoneProps<T>) => JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ProductZoneControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductZoneControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product-zone/ProductZoneControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,SAAS,EAOV,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,YAAY,EAGb,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAM3F,MAAM,WAAW,wBAAyB,SAAQ,UAAU,EAAE,WAAW;IACvE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED,UAAU,gBAAgB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAC1D,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,qBAAqB,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB,oIAgN9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),n=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,a=require("react-i18next"),i=require("react-bootstrap"),o=require("react-hook-form"),l=require("../../static/form-number-input/FormNumberInput.js"),u=require("@licklist/plugins"),c=require("../form/context.js"),d=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),m=require("../product/duration/ProductDurationControl.js"),s=require("../product/fixed-duration-fields/FixedDurationOptions.js");exports.ProductZoneControl=function(e){var f=e.isOverrides,p=e.categoryType,E=e.fieldNamePrefix,g=e.productZonesFieldName,b=a.useTranslation(["Design","Validation","ProductSet"]).t,v=o.useFormContext(),N=v.trigger,F=v.control,y=v.setValue,C=v.clearErrors,D=v.formState.errors,q=o.useWatch({control:F,name:g}),I=o.useWatch({control:F,name:"".concat(E)}),x=I.capacity,P=I.zoneId,M="0"===x||!x,z=r.useContext(c.ProductSetLoadingContext),_=z.providerHasBookingManagement,k=z.zones,O=void 0===k?[]:k,R=O.find((function(e){return e.id===Number(P)})),h=r.useMemo((function(){return O.filter((function(e){return!q.find((function(t){return Number(t.zoneId)===e.id&&t.zoneId!==P}))}))}),[O,q,P]);r.useEffect((function(){M?(y("".concat(E,".duration"),0),C("".concat(E,".duration"))):N("".concat(E,".duration"))}),[M]);return n.createElement(n.Fragment,null,n.createElement(n.Fragment,null,n.createElement(i.Row,null,n.createElement(i.Col,null,n.createElement(i.Form.Group,null,n.createElement(i.Form.Label,null,b("Design:zone")),n.createElement(o.Controller,{control:F,name:"".concat(E,".zoneId"),render:function(e){var r=e.field;return n.createElement(i.Form.Control,t.__assign({as:"select",disabled:f,isInvalid:u.HookFormService.isInvalid("".concat(E,".zoneId"),D)},r),n.createElement("option",{value:null},b("Design:choose")),h.map((function(e){return n.createElement("option",{key:e.id,value:e.id},e.name)})))},rules:{required:{value:_,message:b("Validation:fieldRequired",{attribute:b("zone")})}}}),n.createElement(i.Form.Control.Feedback,{type:"invalid"},u.HookFormService.getErrors("".concat(E,".zoneId"),D)))))),p===d.CATEGORY_TYPE_FIXED_DURATION&&n.createElement(i.Row,{className:"align-items-start duration-capacity-container"},n.createElement(m.ProductDurationControl,{fieldNamePrefix:E,disabled:M||f}),n.createElement(i.Col,{lg:4,md:4},n.createElement(l.FormNumberInput,{fieldName:"".concat(E,".capacity"),label:b("capacity"),disabled:f,rules:{min:{value:0,message:b("Validation:fieldMinNumber",{attribute:b("capacity"),min:0})}}})),M&&n.createElement("div",{className:"duration-hint duration-capacity-container"},b("Design:forDurationEditing"))),p===d.CATEGORY_TYPE_GAME&&n.createElement(n.Fragment,null,n.createElement(i.Row,{className:"align-items-start duration-capacity-container"},n.createElement(i.Col,{lg:4,md:4},n.createElement(l.FormNumberInput,{fieldName:"".concat(E,".capacity"),label:b("capacity"),onChange:function(e){(null==R?void 0:R.defaultDuration)&&y("".concat(E,".duration"),e*(null==R?void 0:R.defaultDuration))},disabled:f,rules:{min:{value:0,message:b("Validation:fieldMinNumber",{attribute:b("capacity"),min:1})}}})),n.createElement(i.Col,{lg:4,md:4},n.createElement(l.FormNumberInput,{fieldName:"".concat(E,".duration"),label:b("durationMinutes"),disabled:M||f,rules:{min:{value:0,message:b("Validation:fieldMinNumber",{attribute:b("duration"),min:0})},validate:function(e){return!(!M&&(!e||e<1))||b("Validation:fieldRequired",{attribute:b("duration")})}}}))),M&&n.createElement("div",{className:"duration-hint pl-0"},b("Design:forDurationEditing"))),n.createElement(s.FixedDurationOptions,{fieldNamePrefix:E,isOverrides:f}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product-set/product-zone/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product-set/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product-set/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,UAAU,yBAAyB;IACjC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAChD,CAAC,EAAE,SAAS,CAAC;CACd;AAED,eAAO,MAAM,iBAAiB,6BAEjB,MAAM,aACN,MAAM,QAQlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;IAE5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,eACnB,aAAa,EAAE,GAAG,WAAW,EAAE,kBAC3B,YAAY,EAAE,KAC7B,YAAY,EAAE,GAAG,SAmBnB,CAAC;AAEF,eAAO,MAAM,yBAAyB,6BAInC,yBAAyB,YA0B3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib");exports.checkAvailableTimesErrors=function(e){var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("@licklist/plugins");exports.checkAvailableTimesErrors=function(e){var n,r,t=e.values,o=e.setError,l=e.t,u=!1;return(null===(n=null==t?void 0:t.steps)||void 0===n?void 0:n.some((function(e){return!!(null==e?void 0:e.productCategories.some((function(e){return i.checkIfZoneCategory(e.type)})))})))?(null===(r=null==t?void 0:t.menuRecurrences)||void 0===r||r.forEach((function(e,i){var n;(null===(n=null==e?void 0:e.availableTimes)||void 0===n?void 0:n.length)||(u=!0,o("menuRecurrences.".concat(i,".availableTimes"),{type:"validate",message:l("Validation:fieldMinNumber",{attribute:l("startTimes"),min:1})}))})),u):u},exports.getFilteredTemplates=function(e,i){var n;if(e)return null===(n=null==e?void 0:e.filter((function(e){return e.notification.isActive&&!(null==i?void 0:i.find((function(i){return i.value.notification.type===e.notification.type})))})))||void 0===n?void 0:n.map((function(e){var i;return{id:null==e?void 0:e.id,value:e,label:null===(i=null==e?void 0:e.notification)||void 0===i?void 0:i.name}}))},exports.moveArrayElements=function(i,n,r){var t=e.__spreadArray([],e.__read(i),!1);return t.splice(r,0,t.splice(n,1)[0]),t},exports.sortArrayByIndex=function(i){return i.map((function(i,n){return e.__assign(e.__assign({},i),{sort:n})}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../../../src/snippet/snippet-template/preview/Preview.tsx"],"names":[],"mappings":";AAiCA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,OAAO,CAAC,EACtB,cAAc,EACd,cAAsB,GACvB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../../../src/snippet/snippet-template/preview/Preview.tsx"],"names":[],"mappings":";AAiCA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,OAAO,CAAC,EACtB,cAAc,EACd,cAAsB,GACvB,EAAE,YAAY,eA4Vd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),a=require("react"),r=(e=a)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-router-dom"),i=require("react-i18next"),o=require("react-bootstrap"),s=require("../context/snippetTemplate.js"),m=require("../context/snippetTemplateView.js"),l=require("@licklist/core/dist/DataMapper/Provider/SnippetDataMapper");require("../../../calendar/components/CalendarSelect/CalendarSelect.js");var c=require("../../../calendar/Calendar.js"),u=require("../../../calendar/utils/index.js"),d=require("../../../iframe/event/event-card/IframeEventCard.js");require("../../../iframe/event/event-card/IframeEventCardSkeleton.js");var p=require("../settings/SettingButton.js"),v=require("../../../iframe/order-process/components/Timer/Timer.js"),f=require("../../../iframe/order-process/components/NavigationSteps/NavigationSteps.js");require("../../../iframe/powered-by/PoweredBy.js");var E=require("../../../iframe/page/Page.js"),g=require("../../../iframe/page/components/PageBody/PageBody.js");require("../../../iframe/back-button/BackButton.js");var y=require("../../../iframe/page/components/PageHeader/PageHeader.js");require("../../../iframe/event/event-booking-form/EventBookingForm.js"),require("../../../iframe/event/event-booking-view/EventBookingView.js"),require("../../../iframe/event/ticket-description/TicketDescription.js"),require("../../../iframe/event/event-tables/EventTables.js"),require("../../../iframe/event/event-order-summary/EventOrderSummary.js"),require("../../../iframe/event/event-booking-products/EventBookingProducts.js"),require("../../../iframe/event/event-order-short-summary/EventOrderShortSummary.js"),require("../../../iframe/order-process/components/NavigationFooter/NavigationFooter.js"),require("../../../iframe/event/event-description/EventDescription.js");var b=require("../../../iframe/event/event-product-sets/EventProductSets.js");require("../../../iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.js");var N=require("../../../iframe/event/event-venue-map/IframeEventVenueMap.js");require("../../../iframe/payment/payment-form/PaymentForm.js"),require("../../../iframe/payment/order-items-table/OrderItemsTable.js"),require("../../../iframe/payment/payment-status-header/PaymentStatusHeader.js");var S=require("../../../iframe/order-process/components/BookingSummary/BookingSummary.js");require("../../../iframe/order-process/components/PaymentCard/PaymentCard.js");var C=require("../../../iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js"),q=require("../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js");require("../../../iframe/order-process/components/ErrorModal/ErrorModal.js"),require("../../../iframe/order-process/components/utils/useCategoryVerification.js"),require("../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js"),require("../../../iframe/payment/payment-page/PaymentPage.js"),require("../../../iframe/payment/payment-status-page/PaymentStatusPage.js"),require("../../../iframe/activity-card/ActivityCard.js"),require("../../../iframe/custom-fields/components/CustomDateField.js");exports.Preview=function(e){var h=e.onSettingClick,B=e.providerHasMap,j=void 0!==B&&B,k=i.useTranslation("Design").t,P=t.__read(a.useState(0),2),w=P[0],x=P[1],I=t.__read(a.useState(0),2),T=I[0],D=I[1],A=a.useContext(m.SnippetTemplateViewContext).setView,M=a.useContext(s.SnippetTemplateContext).template.type,_=void 0===M?l.SNIPPET_TYPE_EVENT_LIST:M,V=function(e){A(e),h()},F=t.__read(a.useState(c.defaultStartDay),2),H=F[0],X=F[1],O=t.__read(a.useState(null),2),U=O[0],Q=O[1],R=u.getMonthCalendarDates(H);return r.createElement("div",{className:"w-100 h-100 snippet-template-preview"},r.createElement(E.Page,{headerBlock:r.createElement("div",{className:"d-flex mt-5 pt-5 p-5 iframe-page snippet-template-additional-header"},r.createElement(p.SettingButton,{view:"pageHeaderSteps",onClick:V,className:"m-0"},r.createElement(p.SettingButton,{view:"pageHeader",onClick:V,className:"m-0 snippet-template-button-left",containerClassName:"mr-5 asd"}),r.createElement("div",{className:"header-block mt-5 pt-5"},r.createElement("div",{className:"mt-5 pt-5 external-header"},r.createElement(y.PageHeader,{showCloseButton:!0,showBackButton:!0},r.createElement(v.Timer,{timer:600}),r.createElement(n.MemoryRouter,{initialEntries:["/step1","/step2"]},r.createElement(f.NavigationSteps,{steps:[{pathname:"/step1",key:"/step1",name:"Burger"},{pathname:"/step2",key:"/step2",name:"Cheese"}]})))))))},r.createElement("div",{className:"page-body pb-5 mb-5 pt-3 mt-3"},r.createElement(p.SettingButton,{view:"page",onClick:V,className:"snippet-template-body-button"})),r.createElement(g.PageBody,{className:"snippet-template",leftBlock:r.createElement(p.SettingButton,{view:"pageBodyLeftBlock",onClick:V,className:"mr-4"},r.createElement(g.PageBody.LeftBlock,{title:"About this event"},r.createElement(p.SettingButton,{view:"elements",onClick:V,className:"mt-5 m-0",containerClassName:"mt-5 pt-5"},r.createElement("div",{className:"mt-3"},r.createElement("h3",null,k("elements"))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Texts")),r.createElement("p",null,"XXXX")),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("form")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("firstName")),r.createElement("input",{type:"text",className:"form-control",placeholder:k("firstName")}))),r.createElement("div",{className:"form-row"},r.createElement("button",{type:"button",className:"btn btn-link"},k("iHaveAccount")))))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Number input")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(q.NumberInput,{value:w,onChange:function(e){return x(e)},onArrowDown:function(){return x((function(e){return e-1}))},onArrowUp:function(){return x((function(e){return e+1}))}}))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Dropdown")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("dayOfBirthShort")),r.createElement("select",{className:"form-control",placeholder:k("firstName")},r.createElement("option",null,"2022"),r.createElement("option",null,"2023"))))))),r.createElement("div",{className:"mt-5 snippet-template__form"},r.createElement("h4",null,k("Button")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(o.Button,{size:"sm"},"Submit")))),j&&_===l.SNIPPET_TYPE_VENUE_MAP&&r.createElement(r.Fragment,null,r.createElement("div",{className:"pt-4"},r.createElement("h4",null,k("Calendar")),r.createElement(p.SettingButton,{view:"calendar",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement(c.Calendar,{currentDate:H,setCurrentDate:X,selectedDate:U,setSelectedDate:Q,calendarDates:R,getDateTimeButtonProps:function(){return{isDisabled:!1}}}))),r.createElement("div",{className:"pt-4"},r.createElement(p.SettingButton,{view:"productSet",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement("h4",null,k("Product Sets")),r.createElement("div",{className:"pt-5 mt-5"},r.createElement(b.EventProductSets,{productSets:[{id:1,name:"Test 1"},{id:2,name:"Test 2"},{id:3,name:"Test 3"}],onSelectProductSet:D,selectedProductSetId:T})))),r.createElement("div",{className:"pt-4"},r.createElement("form",{className:"category-steps-form pt-4 mt-4"},r.createElement("h4",null,k("Venue Map")),r.createElement("div",{className:"position-relative pt-4 mt-4"},r.createElement(p.SettingButton,{view:"venueMap",onClick:V,className:"mt-n6 m-0",containerClassName:"mt-5 pt-5"},r.createElement(N.IframeEventVenueMap,{url:"https://fastly.picsum.photos/id/13/2500/1667.jpg?hmac=SoX9UoHhN8HyklRA4A3vcCWJMVtiBXUg0W4ljWTor7s",usedInIframe:!0,pointProducts:[{id:9,menuStepId:75,pointId:21,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:10,menuStepId:75,pointId:24,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}],points:[{id:21,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:799.39,yCoordinate:1108.45},{id:24,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:1400.2,yCoordinate:1431.77}],choosedProductUuids:["beb6393c-2fdd-40f7-bb92-8800685b203f"],products:[{id:148,productCategoryId:57,productGroupId:null,availableQuantity:980,zoneId:null,name:"Cofee",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",capacity:0,duration:0,weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:149,productCategoryId:57,productGroupId:null,availableQuantity:980,zoneId:null,name:"Cofee 2",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",capacity:0,duration:0,weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}]})))))))),rightBlock:r.createElement(g.PageBody.RightBlock,{bottomBlock:r.createElement(C.BookingSummaryFooter,null)},r.createElement(p.SettingButton,{view:"pageBodyRightBlock",onClick:V,containerClassName:"snippet-template-button-fixed-height",className:"m-0"}),r.createElement(S.BookingSummary.Accordion,{showTitleOnlyOnMobile:!0},r.createElement(d.IframeEventCard,{imageSrc:"https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80",title:"XXXX",type:"Party Doors 22:00 - 03:00",cost:6,date:"Sat 2nd May",goToDetails:function(){return null},shortDate:"07/03/2023"})))})))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),a=require("react"),r=(e=a)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-router-dom"),i=require("react-i18next"),o=require("react-bootstrap"),s=require("../context/snippetTemplate.js"),m=require("../context/snippetTemplateView.js"),l=require("@licklist/core/dist/DataMapper/Provider/SnippetDataMapper");require("../../../calendar/components/CalendarSelect/CalendarSelect.js");var c=require("../../../calendar/Calendar.js"),u=require("../../../calendar/utils/index.js"),d=require("../../../iframe/event/event-card/IframeEventCard.js");require("../../../iframe/event/event-card/IframeEventCardSkeleton.js");var p=require("../settings/SettingButton.js"),v=require("../../../iframe/order-process/components/Timer/Timer.js"),f=require("../../../iframe/order-process/components/NavigationSteps/NavigationSteps.js");require("../../../iframe/powered-by/PoweredBy.js");var E=require("../../../iframe/page/Page.js"),g=require("../../../iframe/page/components/PageBody/PageBody.js");require("../../../iframe/back-button/BackButton.js");var y=require("../../../iframe/page/components/PageHeader/PageHeader.js");require("../../../iframe/event/event-booking-form/EventBookingForm.js"),require("../../../iframe/event/event-booking-view/EventBookingView.js"),require("../../../iframe/event/ticket-description/TicketDescription.js"),require("../../../iframe/event/event-tables/EventTables.js"),require("../../../iframe/event/event-order-summary/EventOrderSummary.js"),require("../../../iframe/event/event-booking-products/EventBookingProducts.js"),require("../../../iframe/event/event-order-short-summary/EventOrderShortSummary.js"),require("../../../iframe/order-process/components/NavigationFooter/NavigationFooter.js"),require("../../../iframe/event/event-description/EventDescription.js");var b=require("../../../iframe/event/event-product-sets/EventProductSets.js");require("../../../iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.js");var N=require("../../../iframe/event/event-venue-map/IframeEventVenueMap.js");require("../../../iframe/payment/payment-form/PaymentForm.js"),require("../../../iframe/payment/order-items-table/OrderItemsTable.js"),require("../../../iframe/payment/payment-status-header/PaymentStatusHeader.js");var S=require("../../../iframe/order-process/components/BookingSummary/BookingSummary.js");require("../../../iframe/order-process/components/PaymentCard/PaymentCard.js");var C=require("../../../iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js"),q=require("../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js");require("../../../iframe/order-process/components/ErrorModal/ErrorModal.js"),require("../../../iframe/order-process/components/utils/useCategoryVerification.js"),require("../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js"),require("../../../iframe/payment/payment-page/PaymentPage.js"),require("../../../iframe/payment/payment-status-page/PaymentStatusPage.js"),require("../../../iframe/activity-card/ActivityCard.js"),require("../../../iframe/custom-fields/components/CustomDateField.js");exports.Preview=function(e){var h=e.onSettingClick,B=e.providerHasMap,j=void 0!==B&&B,k=i.useTranslation("Design").t,P=t.__read(a.useState(0),2),w=P[0],x=P[1],I=t.__read(a.useState(0),2),T=I[0],D=I[1],A=a.useContext(m.SnippetTemplateViewContext).setView,M=a.useContext(s.SnippetTemplateContext).template.type,_=void 0===M?l.SNIPPET_TYPE_EVENT_LIST:M,V=function(e){A(e),h()},F=t.__read(a.useState(c.defaultStartDay),2),H=F[0],X=F[1],O=t.__read(a.useState(null),2),U=O[0],Q=O[1],R=u.getMonthCalendarDates(H);return r.createElement("div",{className:"w-100 h-100 snippet-template-preview"},r.createElement(E.Page,{headerBlock:r.createElement("div",{className:"d-flex mt-5 pt-5 p-5 iframe-page snippet-template-additional-header"},r.createElement(p.SettingButton,{view:"pageHeaderSteps",onClick:V,className:"m-0"},r.createElement(p.SettingButton,{view:"pageHeader",onClick:V,className:"m-0 snippet-template-button-left",containerClassName:"mr-5 asd"}),r.createElement("div",{className:"header-block mt-5 pt-5"},r.createElement("div",{className:"mt-5 pt-5 external-header"},r.createElement(y.PageHeader,{showCloseButton:!0,showBackButton:!0},r.createElement(v.Timer,{timer:600}),r.createElement(n.MemoryRouter,{initialEntries:["/step1","/step2"]},r.createElement(f.NavigationSteps,{steps:[{pathname:"/step1",key:"/step1",name:"Burger"},{pathname:"/step2",key:"/step2",name:"Cheese"}]})))))))},r.createElement("div",{className:"page-body pb-5 mb-5 pt-3 mt-3"},r.createElement(p.SettingButton,{view:"page",onClick:V,className:"snippet-template-body-button"})),r.createElement(g.PageBody,{className:"snippet-template",leftBlock:r.createElement(p.SettingButton,{view:"pageBodyLeftBlock",onClick:V,className:"mr-4"},r.createElement(g.PageBody.LeftBlock,{title:"About this event"},r.createElement(p.SettingButton,{view:"elements",onClick:V,className:"mt-5 m-0",containerClassName:"mt-5 pt-5"},r.createElement("div",{className:"mt-3"},r.createElement("h3",null,k("elements"))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Texts")),r.createElement("p",null,"XXXX")),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("form")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("firstName")),r.createElement("input",{type:"text",className:"form-control",placeholder:k("firstName")}))),r.createElement("div",{className:"form-row"},r.createElement("button",{type:"button",className:"btn btn-link"},k("iHaveAccount")))))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Number input")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(q.NumberInput,{value:w,onChange:function(e){return x(e)},onArrowDown:function(){return x((function(e){return e-1}))},onArrowUp:function(){return x((function(e){return e+1}))}}))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Dropdown")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("dayOfBirthShort")),r.createElement("select",{className:"form-control",placeholder:k("firstName")},r.createElement("option",null,"2022"),r.createElement("option",null,"2023"))))))),r.createElement("div",{className:"mt-5 snippet-template__form"},r.createElement("h4",null,k("Button")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(o.Button,{size:"sm"},"Submit")))),j&&_===l.SNIPPET_TYPE_VENUE_MAP&&r.createElement(r.Fragment,null,r.createElement("div",{className:"pt-4"},r.createElement("h4",null,k("Calendar")),r.createElement(p.SettingButton,{view:"calendar",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement(c.Calendar,{currentDate:H,setCurrentDate:X,selectedDate:U,setSelectedDate:Q,calendarDates:R,getDateTimeButtonProps:function(){return{isDisabled:!1}}}))),r.createElement("div",{className:"pt-4"},r.createElement(p.SettingButton,{view:"productSet",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement("h4",null,k("Product Sets")),r.createElement("div",{className:"pt-5 mt-5"},r.createElement(b.EventProductSets,{productSets:[{id:1,name:"Test 1"},{id:2,name:"Test 2"},{id:3,name:"Test 3"}],onSelectProductSet:D,selectedProductSetId:T})))),r.createElement("div",{className:"pt-4"},r.createElement("form",{className:"category-steps-form pt-4 mt-4"},r.createElement("h4",null,k("Venue Map")),r.createElement("div",{className:"position-relative pt-4 mt-4"},r.createElement(p.SettingButton,{view:"venueMap",onClick:V,className:"mt-n6 m-0",containerClassName:"mt-5 pt-5"},r.createElement(N.IframeEventVenueMap,{url:"https://fastly.picsum.photos/id/13/2500/1667.jpg?hmac=SoX9UoHhN8HyklRA4A3vcCWJMVtiBXUg0W4ljWTor7s",usedInIframe:!0,pointProducts:[{id:9,menuStepId:75,pointId:21,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:10,menuStepId:75,pointId:24,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}],points:[{id:21,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:799.39,yCoordinate:1108.45},{id:24,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:1400.2,yCoordinate:1431.77}],choosedProductUuids:["beb6393c-2fdd-40f7-bb92-8800685b203f"],products:[{id:148,productCategoryId:57,productGroupId:null,availableQuantity:980,name:"Cofee",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:149,productCategoryId:57,productGroupId:null,availableQuantity:980,name:"Cofee 2",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}]})))))))),rightBlock:r.createElement(g.PageBody.RightBlock,{bottomBlock:r.createElement(C.BookingSummaryFooter,null)},r.createElement(p.SettingButton,{view:"pageBodyRightBlock",onClick:V,containerClassName:"snippet-template-button-fixed-height",className:"m-0"}),r.createElement(S.BookingSummary.Accordion,{showTitleOnlyOnMobile:!0},r.createElement(d.IframeEventCard,{imageSrc:"https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80",title:"XXXX",type:"Party Doors 22:00 - 03:00",cost:6,date:"Sat 2nd May",goToDetails:function(){return null},shortDate:"07/03/2023"})))})))};
|
|
@@ -3,6 +3,7 @@ export declare const ProductSetModalClasses: {
|
|
|
3
3
|
readonly step: "edit-product-step";
|
|
4
4
|
readonly category: "edit-product-category";
|
|
5
5
|
readonly product: "edit-product";
|
|
6
|
+
readonly productZones: "edit-product-zone";
|
|
6
7
|
};
|
|
7
8
|
export type ProductSetModalClassesType = typeof ProductSetModalClasses[keyof typeof ProductSetModalClasses];
|
|
8
9
|
export interface SortableTreeItemProps {
|
|
@@ -16,6 +17,7 @@ export interface SortableTreeItemProps {
|
|
|
16
17
|
postItem?: ReactNode;
|
|
17
18
|
sortableItems?: string[];
|
|
18
19
|
isExpanded?: boolean;
|
|
20
|
+
shouldExpand?: boolean;
|
|
19
21
|
isInvalid?: boolean;
|
|
20
22
|
isIconInHeader?: boolean;
|
|
21
23
|
treeLineIconColor?: string;
|
|
@@ -34,5 +36,5 @@ export interface SortableTreeItemProps {
|
|
|
34
36
|
setIsExpanded?: () => void;
|
|
35
37
|
isOverride?: boolean;
|
|
36
38
|
}
|
|
37
|
-
export declare function SortableTreeItem({ id, title, badge, subTitle, body, children, preItem, postItem, sortableItems, isExpanded, isInvalid, isIconInHeader, treeLineIconColor, modalLabel, modalClass, isNewAdded, onDelete, validate, cancelChanges, saveValidField, edit, secondaryBadge, setIsExpanded, isOverride, }: SortableTreeItemProps): JSX.Element;
|
|
39
|
+
export declare function SortableTreeItem({ id, title, badge, subTitle, body, children, preItem, postItem, sortableItems, isExpanded, shouldExpand, isInvalid, isIconInHeader, treeLineIconColor, modalLabel, modalClass, isNewAdded, onDelete, validate, cancelChanges, saveValidField, edit, secondaryBadge, setIsExpanded, isOverride, }: SortableTreeItemProps): JSX.Element;
|
|
38
40
|
//# sourceMappingURL=SortableTreeItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableTreeItem.d.ts","sourceRoot":"","sources":["../../src/sortable-tree/SortableTreeItem.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAkB3E,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"SortableTreeItem.d.ts","sourceRoot":"","sources":["../../src/sortable-tree/SortableTreeItem.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAkB3E,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,MAAM,MAAM,0BAA0B,GACpC,OAAO,sBAAsB,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAkB,EAClB,YAAmB,EACnB,SAAiB,EACjB,cAAqB,EACrB,iBAAsB,EACtB,UAAe,EACf,UAAU,EACV,UAAkB,EAClB,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,cAAc,EACd,IAAI,EACJ,cAAc,EACd,aAAa,EACb,UAAU,GACX,EAAE,qBAAqB,eA2TvB"}
|
|
@@ -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"),a=require("react"),n=e(a),r=require("react-i18next"),l=require("react-bootstrap"),
|
|
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"),a=require("react"),n=e(a),r=require("react-i18next"),l=require("react-bootstrap"),o=require("../static/Icon.js"),s=e(require("clsx")),i=require("@dnd-kit/core"),c=require("@dnd-kit/sortable"),d=require("@dnd-kit/utilities"),m=require("../modals/confirmation/ConfirmModal.js");require("../modals/dialog/Dialog.js"),require("../modals/dialog/DialogContext.js");var u=require("../product-set/elements/DeleteFieldButton.js"),p={step:"edit-product-step",category:"edit-product-category",product:"edit-product",productZones:"edit-product-zone"};exports.ProductSetModalClasses=p,exports.SortableTreeItem=function(e){var b=this,g=e.id,v=e.title,E=e.badge,f=e.subTitle,N=e.body,h=e.children,y=e.preItem,C=e.postItem,w=e.sortableItems,x=e.isExpanded,_=void 0!==x&&x,D=e.shouldExpand,S=void 0===D||D,q=e.isInvalid,M=void 0!==q&&q,k=e.isIconInHeader,I=void 0===k||k,B=e.treeLineIconColor,j=void 0===B?"":B,P=e.modalLabel,T=void 0===P?"":P,X=e.modalClass,Y=e.isNewAdded,A=void 0!==Y&&Y,z=e.onDelete,F=e.validate,L=e.cancelChanges,R=e.saveValidField,U=e.edit,V=e.secondaryBadge,H=e.setIsExpanded,K=e.isOverride,O=t.__read(a.useState(_),2),Z=O[0],G=O[1],J=t.__read(a.useState(A),2),Q=J[0],W=J[1],$=r.useTranslation("Design").t,ee=c.useSortable({id:g}),te=ee.attributes,ae=ee.listeners,ne=ee.setNodeRef,re=ee.transform,le=ee.transition,oe=t.__read(a.useState({pageX:0,pageY:0}),2),se=oe[0],ie=oe[1],ce=i.useDraggable({id:g,disabled:K||!S}),de=ce.isDragging,me=ce.attributes,ue=ce.listeners,pe=ce.setNodeRef,be=ce.transform,ge=a.useCallback((function(e){if(S){var t=e.pageX-se.pageX,a=e.pageY-se.pageY;Math.sqrt(t*t+a*a)>5||(H?H():G((function(e){return!e})))}}),[se,S,H]),ve=Boolean(z)&&!K,Ee=a.useCallback((function(e){S&&ie({pageX:e.pageX,pageY:e.pageY})}),[S]),fe=function(){return t.__awaiter(b,void 0,void 0,(function(){return t.__generator(this,(function(e){switch(e.label){case 0:return F||W(!1),[4,null==F?void 0:F()];case 1:return e.sent()&&(R&&R(),W(!1)),[2]}}))}))};return a.useEffect((function(){G(_)}),[_]),n.createElement("div",t.__assign({className:"sortable-tree-root",style:{transform:d.CSS.Translate.toString(re),transition:le}},me,ue,{ref:ne}),n.createElement("div",t.__assign({className:"sortable-tree-wrapper",ref:pe},me,ue,{onKeyDown:function(e){return e.stopPropagation()},onMouseDown:function(e){Q&&e.stopPropagation()},onMouseUp:function(e){Q&&e.stopPropagation()},role:"button",tabIndex:0,style:X===p.step?{transform:d.CSS.Translate.toString(be),opacity:de?.7:1}:null}),S&&n.createElement("div",{className:"sortable-tree-line"},n.createElement(l.Button,{variant:"link",size:"sm",onMouseDown:Ee,onMouseUp:ge},Z?n.createElement(o.default,{type:"minus",width:".7rem"}):n.createElement("div",{className:"expand-icon-container"},n.createElement("div",null),n.createElement("div",null),n.createElement("div",null))),Z&&n.createElement("svg",{className:"sortable-tree-line-icon",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none"},n.createElement("g",null,n.createElement("path",{className:s("sortable-tree-line-icon-path",j&&"sortable-tree-line-product-element"),style:{stroke:j},d:"M 50 0 V 100"})))),n.createElement("div",{className:"sortable-tree-item-wrapper"},n.createElement("div",{className:s("sortable-tree-item",M?"invalid":"")},n.createElement("div",{className:"sortable-tree-item-header"},I&&n.createElement(l.Button,t.__assign({variant:"link",className:"sortable-tree-item-handle"},te,ae),n.createElement(o.default,{type:"grip-vertical"})),n.createElement(l.Button,{className:"sortable-tree-item-toggle",variant:"link",onMouseDown:Ee,onMouseUp:ge},E&&n.createElement("span",{className:"sortable-tree-item-badge"},E),n.createElement("div",{className:s(T?"sortable-tree-product-set-title-container":"sortable-tree-title-container")},n.createElement("span",{className:s("sortable-tree-item-title",T&&"sortable-tree-product-set-element-title")},v),!Z&&n.createElement("span",{className:"sortable-tree-item-subtitle"},f)),n.createElement("div",{className:"border-0 open-edit-right-modal-button",role:"button",tabIndex:0,onClick:function(e){return function(e){e.stopPropagation(),U&&!Q&&U(),W(!0)}(e)},onKeyDown:function(e){return e.stopPropagation()}},n.createElement(o.default,{type:"ellipsis-h",color:"#0E8CE2",height:"1rem"})))),I?n.createElement(l.Collapse,{in:Z},n.createElement("div",null,n.createElement("div",{className:"sortable-tree-item-body"},N))):n.createElement(l.Modal,{size:"lg",show:Q,className:s("m-0 edit-product-set-element-modal edit-right-form-modal h-100",X),dialogClassName:"edit-event-dialog edit-step-dialog",onHide:fe},n.createElement("div",{className:"edit-step-modal-header"},n.createElement("button",{className:"p-0 cancel-add-step-btn border-0",type:"button",onClick:function(){L?(L(),W(!1)):fe()}},n.createElement("span",null,$("Design:cancel"))),V&&n.createElement("div",{className:"secondary-badge ".concat(null==V?void 0:V.className)},null==V?void 0:V.label)),n.createElement(l.Modal.Body,{as:"form",noValidate:!0},n.createElement("div",{className:"top-label-container"},n.createElement("span",null,T)),N,n.createElement("div",{className:"d-flex product-set-element-control-btns justify-content-between"},n.createElement(l.Button,{className:"step-save-btn mt-4",type:"button",onClick:fe},$("saveAndAdd")),ve&&n.createElement("div",{className:"d-flex justify-content-end mt-4 delete-btn"},n.createElement(m.ConfirmModal,null,(function(e){return n.createElement(u.DeleteFieldButton,{onDelete:function(){return e(z)}})}))))))),w&&n.createElement("div",{className:"sortable-tree-subitems"},y,n.createElement(i.DndContext,null,n.createElement(c.SortableContext,{items:w,strategy:c.verticalListSortingStrategy},n.createElement(l.Collapse,{in:Z},n.createElement("div",{className:"ml-0"},h)))),C))))};
|
|
@@ -17,6 +17,14 @@ $product-set-item-hover-bg-color: #d9efff !default;
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
.product-set-item-wrapper-zone {
|
|
21
|
+
color:#84269B;
|
|
22
|
+
background-color: rgba($color: #84269B, $alpha: 0.1);
|
|
23
|
+
.product-set-item-icon {
|
|
24
|
+
background-color: #84269B;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
.product-set-item-wrapper-category {
|
|
21
29
|
color: #1A93AA;
|
|
22
30
|
background-color: rgba($color: #1A93AA, $alpha: 0.1);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.edit-right-form-modal.edit-product-zone {
|
|
2
|
+
padding: 0;
|
|
3
|
+
.top-label-container {
|
|
4
|
+
background-color: #EFE9F5;
|
|
5
|
+
span {
|
|
6
|
+
color:#84269B;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
@include media-breakpoint-down(sm) {
|
|
10
|
+
top: 5%;
|
|
11
|
+
.step-save-btn {
|
|
12
|
+
margin-top: 1rem;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
.step-badge,
|
|
52
52
|
.category-badge,
|
|
53
|
-
.product-badge
|
|
53
|
+
.product-badge {
|
|
54
54
|
font-size: 0.875rem;
|
|
55
55
|
font-weight: 600;
|
|
56
56
|
}
|
|
@@ -67,6 +67,8 @@
|
|
|
67
67
|
background-color: #e9f5ea;
|
|
68
68
|
color: #269b36;
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
.product-set-mobile-footer {
|
|
@@ -174,3 +176,14 @@
|
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
.sortable-tree-item-toggle {
|
|
182
|
+
|
|
183
|
+
.product-zone-badge {
|
|
184
|
+
background-color: #EFE9F5;
|
|
185
|
+
color:#84269B;
|
|
186
|
+
font-size: 0.875rem;
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
}
|
|
189
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.13",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@fortawesome/free-brands-svg-icons": "5.15.2",
|
|
51
51
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
52
52
|
"@fortawesome/react-fontawesome": "0.1.9",
|
|
53
|
-
"@licklist/core": "0.28.
|
|
53
|
+
"@licklist/core": "0.28.7",
|
|
54
54
|
"@licklist/eslint-config": "0.4.5",
|
|
55
|
-
"@licklist/plugins": "0.31.
|
|
55
|
+
"@licklist/plugins": "0.31.6",
|
|
56
56
|
"@mdx-js/react": "1.6.22",
|
|
57
57
|
"@popperjs/core": "2.11.8",
|
|
58
58
|
"@react-aria/utils": "3.9.0",
|
|
@@ -196,4 +196,4 @@
|
|
|
196
196
|
"node": "16.20.2",
|
|
197
197
|
"yarn": "1.22.18"
|
|
198
198
|
}
|
|
199
|
-
}
|
|
199
|
+
}
|
|
@@ -33,16 +33,14 @@ export const getDefaultValues = (
|
|
|
33
33
|
productCategories?.map(({ products, ...productCategory }) => ({
|
|
34
34
|
...productCategory,
|
|
35
35
|
products:
|
|
36
|
-
products?.map(({
|
|
36
|
+
products?.map(({ subProducts, ...product }) => ({
|
|
37
37
|
...product,
|
|
38
|
-
subProducts: subProducts?.map(({
|
|
38
|
+
subProducts: subProducts?.map(({ ...subProducts }) => ({
|
|
39
39
|
...subProducts,
|
|
40
40
|
originalProductId: null,
|
|
41
41
|
productCategoryId: undefined,
|
|
42
|
-
zoneId,
|
|
43
42
|
})),
|
|
44
43
|
productCategoryId: undefined,
|
|
45
|
-
zoneId,
|
|
46
44
|
})) ?? [],
|
|
47
45
|
})) ?? [],
|
|
48
46
|
venueMapSetId: step?.venueMapSet ? step?.venueMapSet?.id : null,
|
package/src/layout/DropDown.tsx
CHANGED
|
@@ -22,6 +22,7 @@ import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemp
|
|
|
22
22
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
23
23
|
import { ruleForUrlWithProtocol } from "@licklist/plugins/dist/validation/Rules/urlRule";
|
|
24
24
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
25
|
+
import { checkIfZoneCategory } from "@licklist/plugins";
|
|
25
26
|
import { WarningMessage } from "../../static";
|
|
26
27
|
import { SelectItem } from "../../types/generic/SelectItem";
|
|
27
28
|
import {
|
|
@@ -127,6 +128,10 @@ export function ProductSetControl({
|
|
|
127
128
|
const showEmailTemplateSelector = showEmailTemplate && !isOverrides;
|
|
128
129
|
const showDateSelector = !isEventEditProductSet && isOverrides;
|
|
129
130
|
|
|
131
|
+
const isZoneAdded = steps?.some(({ productCategories }) =>
|
|
132
|
+
productCategories?.some((category) => checkIfZoneCategory(category?.type)),
|
|
133
|
+
);
|
|
134
|
+
|
|
130
135
|
return (
|
|
131
136
|
<Row
|
|
132
137
|
className={`product-set-form ${
|
|
@@ -170,7 +175,7 @@ export function ProductSetControl({
|
|
|
170
175
|
|
|
171
176
|
{showDateSelector ? (
|
|
172
177
|
<DateInput
|
|
173
|
-
workHours={workHours}
|
|
178
|
+
workHours={isZoneAdded ? workHours : undefined}
|
|
174
179
|
isLoading={isLoading}
|
|
175
180
|
providerHasBookingManagement={providerHasBookingManagement}
|
|
176
181
|
/>
|
|
@@ -179,7 +184,7 @@ export function ProductSetControl({
|
|
|
179
184
|
{isCreateAction && (
|
|
180
185
|
<DateAndRecurrenceInput
|
|
181
186
|
isEventEditProductSet={isEventEditProductSet}
|
|
182
|
-
workHours={workHours}
|
|
187
|
+
workHours={isZoneAdded ? workHours : undefined}
|
|
183
188
|
isLoading={isLoading}
|
|
184
189
|
providerHasBookingManagement={providerHasBookingManagement}
|
|
185
190
|
/>
|
|
@@ -250,7 +255,7 @@ export function ProductSetControl({
|
|
|
250
255
|
],
|
|
251
256
|
{
|
|
252
257
|
companyName,
|
|
253
|
-
}
|
|
258
|
+
},
|
|
254
259
|
)}
|
|
255
260
|
</option>
|
|
256
261
|
))}
|
|
@@ -278,7 +283,7 @@ export function ProductSetControl({
|
|
|
278
283
|
{t(
|
|
279
284
|
RELY_ON_PEOPLE_TYPE_TITLES[
|
|
280
285
|
RELY_ON_PEOPLE_TYPES[relyOnPeopleType]
|
|
281
|
-
]
|
|
286
|
+
],
|
|
282
287
|
)}
|
|
283
288
|
</option>
|
|
284
289
|
))}
|
|
@@ -297,7 +302,7 @@ export function ProductSetControl({
|
|
|
297
302
|
disabled={isLoading || isOverrides}
|
|
298
303
|
isInvalid={HookFormService.isInvalid(
|
|
299
304
|
"termsAndConditions",
|
|
300
|
-
errors
|
|
305
|
+
errors,
|
|
301
306
|
)}
|
|
302
307
|
/>
|
|
303
308
|
<Form.Control.Feedback type="invalid">
|
|
@@ -370,7 +375,7 @@ export function ProductSetControl({
|
|
|
370
375
|
disabled={isOverrides}
|
|
371
376
|
isInvalid={HookFormService.isInvalid(
|
|
372
377
|
"fieldSetId",
|
|
373
|
-
errors
|
|
378
|
+
errors,
|
|
374
379
|
)}
|
|
375
380
|
>
|
|
376
381
|
<option value="">{t("Design:choose")}</option>
|
|
@@ -61,7 +61,6 @@ const getCategoryDefaultValue = (
|
|
|
61
61
|
isReusable: false,
|
|
62
62
|
hasSubEvents: false,
|
|
63
63
|
products: [],
|
|
64
|
-
zoneId: null,
|
|
65
64
|
sort,
|
|
66
65
|
});
|
|
67
66
|
|
|
@@ -77,7 +76,6 @@ export function ProductCategoriesControl({
|
|
|
77
76
|
providerHasMap,
|
|
78
77
|
expandedProductCategories,
|
|
79
78
|
setExpandedProductCategories,
|
|
80
|
-
zones,
|
|
81
79
|
} = useContext(ProductSetLoadingContext);
|
|
82
80
|
const form = useFormContext<ProductSetFormValues>();
|
|
83
81
|
const [isSelectCategoryVisible, setIsSelectCategoryVisible] = useState(false);
|
|
@@ -305,7 +303,6 @@ export function ProductCategoriesControl({
|
|
|
305
303
|
quantityType={productCategory.quantityType}
|
|
306
304
|
hasTicket={productCategory?.hasTicket}
|
|
307
305
|
stepIndex={stepIndex}
|
|
308
|
-
zones={zones}
|
|
309
306
|
productCategoryIndex={index}
|
|
310
307
|
categoryType={productCategory.type}
|
|
311
308
|
isOverrides={isOverrides}
|