bookito-widget 0.42.16-beta.13 → 0.42.16-beta.15
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 +14 -4
- package/dist/3140.js +1 -1
- package/dist/bookito-widget.umd.js +49 -49
- package/dist/bookito-widget.window.js +49 -49
- 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,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [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)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* bookito-kit migration and rrule computation refactor (CAR-535) ([33da66d](https://github.com/Carlito-GmbH/carlito-platform/commit/33da66daf82acda40a809cb9c7e7451e87bd6352))
|
|
11
|
+
* **bookito:** timezone-aware guest app, widget & booking flow (CAR-535) ([a84e3a3](https://github.com/Carlito-GmbH/carlito-platform/commit/a84e3a33cb0010ce23f3193bfada23a7b0bd68a0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [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)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
## [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)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -219,10 +233,6 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/s
|
|
|
219
233
|
|
|
220
234
|
|
|
221
235
|
|
|
222
|
-
## [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)
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
236
|
## [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)
|
|
227
237
|
|
|
228
238
|
|
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})})})]})})]})]})}}}]);
|