bookito-widget 0.42.16-beta.9 → 0.42.17-beta.0
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/CHANGELOG.md +70 -4
- package/dist/3140.js +1 -1
- package/dist/bookito-widget.umd.js +66 -161
- package/dist/bookito-widget.window.js +66 -161
- package/package.json +1 -1
- package/src/BookitoEventDetail/index.tsx +11 -5
- package/src/BookitoEventModal/index.tsx +22 -19
- package/src/BookitoForm/EventInfo.tsx +1 -3
- package/src/BookitoForm/NewBookingForm.tsx +14 -11
- package/src/BookitoWidget/index.tsx +46 -10
- package/src/BookitoWidgetProvider/BookitoWidgetProvider.tsx +1 -1
- package/src/Card/index.tsx +23 -15
- package/src/CardHolder/index.tsx +5 -3
- package/src/calendar-styles.css +16 -0
- package/src/types.ts +7 -0
- package/src/utils/index.tsx +0 -47
- package/src/BookitoForm/BookingForm.tsx +0 -470
- package/src/BookitoForm/helper.tsx +0 -266
- package/src/BookitoForm/index.tsx +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,76 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.42.17-beta.0](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.24...bookito-widget-0.42.17-beta.0) (2026-08-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.42.16-beta.24](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.23...bookito-widget-0.42.16-beta.24) (2026-08-11)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [0.42.16-beta.23](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.22...bookito-widget-0.42.16-beta.23) (2026-08-10)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.42.16-beta.22](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.21...bookito-widget-0.42.16-beta.22) (2026-08-10)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [0.42.16-beta.21](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.20...bookito-widget-0.42.16-beta.21) (2026-08-10)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.42.16-beta.20](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.19...bookito-widget-0.42.16-beta.20) (2026-08-10)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [0.42.16-beta.19](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.18...bookito-widget-0.42.16-beta.19) (2026-08-06)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.42.16-beta.18](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.17...bookito-widget-0.42.16-beta.18) (2026-08-06)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## [0.42.16-beta.17](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.16...bookito-widget-0.42.16-beta.17) (2026-08-06)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [0.42.16-beta.16](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.15...bookito-widget-0.42.16-beta.16) (2026-07-30)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [0.42.16-beta.15](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.14...bookito-widget-0.42.16-beta.15) (2026-07-30)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* bookito-kit migration and rrule computation refactor (CAR-535) ([33da66d](https://github.com/Carlito-GmbH/carlito-platform/commit/33da66daf82acda40a809cb9c7e7451e87bd6352))
|
|
51
|
+
* **bookito:** timezone-aware guest app, widget & booking flow (CAR-535) ([a84e3a3](https://github.com/Carlito-GmbH/carlito-platform/commit/a84e3a33cb0010ce23f3193bfada23a7b0bd68a0))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [0.42.16-beta.14](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.13...bookito-widget-0.42.16-beta.14) (2026-07-28)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## [0.42.16-beta.13](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.12...bookito-widget-0.42.16-beta.13) (2026-07-28)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## [0.42.16-beta.12](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.11...bookito-widget-0.42.16-beta.12) (2026-07-27)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## [0.42.16-beta.11](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.10...bookito-widget-0.42.16-beta.11) (2026-07-27)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [0.42.16-beta.10](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.9...bookito-widget-0.42.16-beta.10) (2026-07-27)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
5
75
|
## [0.42.16-beta.9](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.16-beta.8...bookito-widget-0.42.16-beta.9) (2026-07-24)
|
|
6
76
|
|
|
7
77
|
|
|
@@ -203,10 +273,6 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/s
|
|
|
203
273
|
|
|
204
274
|
|
|
205
275
|
|
|
206
|
-
## [0.42.7](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.7-beta.8...bookito-widget-0.42.7) (2026-05-20)
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
276
|
## [0.42.7-beta.9](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.42.7-beta.8...bookito-widget-0.42.7-beta.9) (2026-05-26)
|
|
211
277
|
|
|
212
278
|
|
package/dist/3140.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkbookito_widget=self.webpackChunkbookito_widget||[]).push([[3140],{63140:(e,t,n)=>{n.r(t),n.d(t,{default:()=>PdfEmbed_PdfViewer});n(64815),n(2964);var s=n(86326),i=n(
|
|
1
|
+
"use strict";(self.webpackChunkbookito_widget=self.webpackChunkbookito_widget||[]).push([[3140],{63140:(e,t,n)=>{n.r(t),n.d(t,{default:()=>PdfEmbed_PdfViewer});n(64815),n(2964);var s=n(86326),i=n(51389),o=n(79369),a=n(62084),l=n(16951),c=n.n(l),r=n(7620),d=n(51219),u=(n(40216),n(87921),n(31327),n(35934),n(178));function useRenderPdf({canvasContainer:e,isVisible:t=!0,fileUrl:n,pageNumber:i=1,onDocumentLoaded:o}){const[a,l]=(0,s.useState)(),[c,r]=(0,s.useState)(),[d,f]=(0,s.useState)("idle"),[g,h]=(0,s.useState)(),m=(0,s.useMemo)(()=>function log(...e){0},[n]);return(0,s.useEffect)(()=>{n&&g&&(m("URL changed, resetting loaded document"),h(void 0))},[n]),(0,s.useEffect)(()=>{let e=!1;return t&&n&&(void 0===(null==g?void 0:g.pageNumber)||g.pageNumber!==i)&&setTimeout(()=>{e||(async()=>{f("loading");const e=await async function loadPage({fileUrl:e,pageNumber:t=1,pdfDocument:n}){const s=n||await u.getDocument(e).promise;return{page:await s.getPage(t),pdfDocument:s}}({fileUrl:n,pageNumber:i,pdfDocument:null==g?void 0:g.pdfDocument});f("loaded"),h(Object.assign({},e,{pageNumber:i}))})()},100),()=>{e=!0}},[t,n,i,null==g?void 0:g.pdfDocument]),(0,s.useEffect)(()=>{let n=!1;return null!=g&&g.page&&t&&e&&"rendered"!==d&&setTimeout(()=>{n||(async()=>{m(`Rendering page ${i}`);const{canvas:t}=await async function renderPage({canvasContainer:e,page:t}){e.innerHTML="";const n=document.createElement("canvas");n.style.height="100%",n.style.width="100%",e.appendChild(n);const s=n.getContext("2d");if(!s)throw new Error("Could not get canvas context");const i=window.devicePixelRatio||1,o=t.getViewport({scale:i});n.width=o.width,n.height=o.height;const a={canvasContext:s,viewport:o};return s.clearRect(0,0,n.width,n.height),s.beginPath(),await t.render(a),{canvas:n}}({canvasContainer:e,page:g.page}),s=e.clientHeight;n||(r(t),l(s),f("rendered"))})()},100),()=>{n=!0}},[null==g?void 0:g.page,t,e]),(0,s.useEffect)(()=>{let e=!1;return n&&null!=g&&g.pdfDocument&&o&&(async t=>{const s=await g.pdfDocument.getMetadata(),i=u.getFilenameFromUrl(n),a=s.info,l=null!=(t=null==a?void 0:a.Title)?t:i;e||o({title:l,numPages:g.pdfDocument.numPages})})(),()=>{e=!0}},[null==g?void 0:g.pdfDocument,o]),(0,s.useEffect)(()=>{let e,n=!1;return!t&&null!=g&&g.pdfDocument&&"rendered"===d&&(e=window.setTimeout(()=>{n||g.page.destroyed||(m("Destroying document"),g.pdfDocument.destroy(),c&&function releaseCanvas(e){e.width=1,e.height=1;const t=e.getContext("2d");t&&t.clearRect(0,0,1,1)}(c),h(void 0),f("idle"))},2e3)),()=>{n=!0,void 0!==e&&window.clearTimeout(e)}},[null==g?void 0:g.pdfDocument,t,d]),{displayState:d,lastHeight:a}}var f=n(36870);const g=(0,s.forwardRef)((e,t)=>{var n;const i=s.useRef(null),{lastHeight:o}=useRenderPdf(Object.assign({},e,{canvasContainer:null!=(n=i.current)?n:void 0}));return(0,f.jsx)("div",{ref:t,children:(0,f.jsx)("div",{ref:i,style:o?{minHeight:`${o}px`}:void 0,className:"h-full w-full block"})})}),h={title:"",numPages:0},PdfEmbed_PdfViewer=({open:e,onClose:t,pdfUrl:n})=>{const l=(0,s.useRef)(null),[u,m]=(0,s.useState)(1),[p,v]=(0,s.useState)(h);(0,s.useEffect)(()=>{e||v(h)},[e]);const w=(0,s.useRef)(null),x=(0,s.useRef)(null),j=0===p.numPages;return(0,o.wY)(x,e=>{w.current&&w.current.centerView()}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i.oI,{isOpen:e&&j}),(0,f.jsxs)(a.Sb,{onWillDismiss:()=>{m(1),t()},isOpen:e,className:"pdf-modal",style:{"--width":"80vw","--height":"80vh"},children:[(0,f.jsx)(a.eU,{children:(0,f.jsx)(a.ai,{children:(0,f.jsx)(a.QW,{slot:"start",children:(0,f.jsxs)(a.Jm,{onClick:()=>{t()},color:"secondary",children:[(0,f.jsx)(a.iq,{slot:"start",icon:r.fcl}),"Back"]})})})}),(0,f.jsx)(a.W9,{children:(0,f.jsx)("div",{ref:l,className:c()("rounded w-full h-full flex justify-center items-center"),children:(0,f.jsx)(d.GT,{ref:w,children:(0,f.jsx)(d.WZ,{wrapperStyle:{overflow:"visible",width:"100vw",height:"100vh"},children:(0,f.jsx)(g,{ref:x,onDocumentLoaded:v,pageNumber:u,fileUrl:n})})})})}),(0,f.jsx)(a.M0,{children:(0,f.jsxs)(a.ai,{children:[(0,f.jsx)(a.QW,{slot:"start",children:(0,f.jsx)(a.Jm,{onClick:function onPreviousPage(){const e=u-1;m(e<=0?p.numPages:e)},color:"secondary",children:(0,f.jsx)(a.iq,{"data-test-id":"btn-back",slot:"icon-only",icon:r.fcl})})}),(0,f.jsxs)(a.BC,{"data-test-id":"pdf-pagination",children:[u,"/",p.numPages]}),(0,f.jsx)(a.QW,{slot:"end",children:(0,f.jsx)(a.Jm,{color:"secondary",onClick:function onNextPage(){const e=u+1;e>p.numPages?m(1):m(e)},children:(0,f.jsx)(a.iq,{"data-test-id":"btn-next",slot:"icon-only",icon:r.fZ})})})]})})]})]})}}}]);
|