bookito-widget
Advanced tools
Comparing version 0.22.4 to 0.23.0
@@ -5,2 +5,14 @@ # Changelog | ||
# [0.23.0](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.5...bookito-widget-0.23.0) (2024-03-28) | ||
### Features | ||
* **carlito-app:** add misssing translation ([c3f4065](https://github.com/Carlito-GmbH/carlito-platform/commit/c3f40651e100d6ad8fdf2ea95655d1afb943f630)) | ||
* **carlito-app:** event booking form enableReinitialize ([c697a7b](https://github.com/Carlito-GmbH/carlito-platform/commit/c697a7bf73b397d2fc04d3ea8253ea4920ee209a)) | ||
* **carlito-app:** hide guest info form when hotel has pms enabled ([fd814d1](https://github.com/Carlito-GmbH/carlito-platform/commit/fd814d1d5e5bb9459940534dc0ea28ac2b74c2e9)) | ||
* **carlito-app:** refactor form ([69169a2](https://github.com/Carlito-GmbH/carlito-platform/commit/69169a28752e7d9836f5eb12f20cfec979acc0d3)) | ||
## [0.22.4](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.22.3...bookito-widget-0.22.4) (2024-03-11) | ||
@@ -18,2 +30,6 @@ | ||
## [0.22.2](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.22.1...bookito-widget-0.22.2) (2024-03-11) | ||
### Bug Fixes | ||
@@ -25,2 +41,49 @@ | ||
## [0.22.1](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.22.0...bookito-widget-0.22.1) (2024-03-11) | ||
### Bug Fixes | ||
* **bookito-widget:** design adjustments ([bfcab8b](https://github.com/Carlito-GmbH/carlito-platform/commit/bfcab8b1134bfcf71f6f3d7babc942f398843243)) | ||
# [0.22.0](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.21.0...bookito-widget-0.22.0) (2024-03-08) | ||
### Features | ||
* **carlito-app:** event booking : Make it possible to pick participants ([a9eba7d](https://github.com/Carlito-GmbH/carlito-platform/commit/a9eba7d840e6fb435f5d80db075419d633755841)) | ||
# [0.21.0](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.0...bookito-widget-0.21.0) (2024-02-22) | ||
### Features | ||
* **bookito-widget:** basic adjustments to support hub based auth ([3de88ac](https://github.com/Carlito-GmbH/carlito-platform/commit/3de88ac5b0b650a57ff548612e0a87d01aa94601)) | ||
* **carlito-app:** bookito form hub integration ([24ae644](https://github.com/Carlito-GmbH/carlito-platform/commit/24ae64425ecfeaf03e2ae1b08ec1da9a38eabb77)) | ||
* **carlito-hub:** make sure guest data is also refreshed from pms ([2019dc4](https://github.com/Carlito-GmbH/carlito-platform/commit/2019dc4c34e34d9dcc41efbaff91b808984d10c9)) | ||
## [0.22.4](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.22.3...bookito-widget-0.22.4) (2024-03-11) | ||
### Bug Fixes | ||
* **carlito-app:** booking without pms ([c35e837](https://github.com/Carlito-GmbH/carlito-platform/commit/c35e8378281ffc3ec86eea04505dc35863562496)) | ||
## [0.22.3](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.22.2...bookito-widget-0.22.3) (2024-03-11) | ||
### Bug Fixes | ||
* **carlito-app:** fix phone number input ([b136aff](https://github.com/Carlito-GmbH/carlito-platform/commit/b136aff2b9106317dcf2db9dcc8b0425a3aa8ae8)) | ||
## [0.22.2](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.22.1...bookito-widget-0.22.2) (2024-03-11) | ||
@@ -56,5 +119,34 @@ | ||
* **carlito-hub:** make sure guest data is also refreshed from pms ([2019dc4](https://github.com/Carlito-GmbH/carlito-platform/commit/2019dc4c34e34d9dcc41efbaff91b808984d10c9)) | ||
## [0.20.5](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.4...bookito-widget-0.20.5) (2024-03-22) | ||
## [0.20.4](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.3...bookito-widget-0.20.4) (2024-03-22) | ||
## [0.20.3](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.2...bookito-widget-0.20.3) (2024-03-22) | ||
## [0.20.2](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.1...bookito-widget-0.20.2) (2024-03-22) | ||
## [0.20.3](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.2...bookito-widget-0.20.3) (2024-03-22) | ||
## [0.20.2](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.1...bookito-widget-0.20.2) (2024-03-22) | ||
## [0.20.1](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.0...bookito-widget-0.20.1) (2024-03-22) | ||
## [0.20.1](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.20.0...bookito-widget-0.20.1) (2024-03-22) | ||
# [0.20.0](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.19.2...bookito-widget-0.20.0) (2024-01-29) | ||
@@ -61,0 +153,0 @@ |
@@ -1,2 +0,2 @@ | ||
(self.webpackChunkbookito_widget=self.webpackChunkbookito_widget||[]).push([[247],{8e4:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>PdfEmbed_PdfViewer});n(48868),n(54861);var s=n(32735),i=n(46163),o=n(20804),a=n(40841),l=n.n(a),r=n(17922),c=n(7853),d=(n(96609),n(63045),n(96126),n(69847));const u=100,f=2e3;function useRenderPdf({canvasContainer:e,isVisible:t=!0,fileUrl:n,pageNumber:i=1,onDocumentLoaded:o}){const[a,l]=(0,s.useState)(),[r,c]=(0,s.useState)(),[g,h]=(0,s.useState)("idle"),[m,p]=(0,s.useState)(),v=(0,s.useMemo)((()=>function log(...e){0}),[n]);return(0,s.useEffect)((()=>{n&&m&&(v("URL changed, resetting loaded document"),p(void 0))}),[n]),(0,s.useEffect)((()=>{let e=!1;return t&&n&&(void 0===(null==m?void 0:m.pageNumber)||m.pageNumber!==i)&&setTimeout((()=>{e||(async()=>{h("loading");const e=await async function loadPage({fileUrl:e,pageNumber:t=1,pdfDocument:n}){const s=n||await d.getDocument(e).promise;return{page:await s.getPage(t),pdfDocument:s}}({fileUrl:n,pageNumber:i,pdfDocument:null==m?void 0:m.pdfDocument});h("loaded"),p(Object.assign({},e,{pageNumber:i}))})()}),u),()=>{e=!0}}),[t,n,i,null==m?void 0:m.pdfDocument]),(0,s.useEffect)((()=>{let n=!1;return null!=m&&m.page&&t&&e&&"rendered"!==g&&setTimeout((()=>{n||(async()=>{v(`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:m.page}),s=e.clientHeight;n||(c(t),l(s),h("rendered"))})()}),u),()=>{n=!0}}),[null==m?void 0:m.page,t,e]),(0,s.useEffect)((()=>{let e=!1;return n&&null!=m&&m.pdfDocument&&o&&(async()=>{var t;const s=await m.pdfDocument.getMetadata(),i=d.getFilenameFromUrl(n),a=s.info,l=null!=(t=null==a?void 0:a.Title)?t:i;e||o({title:l,numPages:m.pdfDocument.numPages})})(),()=>{e=!0}}),[null==m?void 0:m.pdfDocument,o]),(0,s.useEffect)((()=>{let e,n=!1;return!t&&null!=m&&m.pdfDocument&&"rendered"===g&&(e=window.setTimeout((()=>{n||m.page.destroyed||(v("Destroying document"),m.pdfDocument.destroy(),r&&function releaseCanvas(e){e.width=1,e.height=1;const t=e.getContext("2d");t&&t.clearRect(0,0,1,1)}(r),p(void 0),h("idle"))}),f)),()=>{n=!0,void 0!==e&&window.clearTimeout(e)}}),[null==m?void 0:m.pdfDocument,t,g]),{displayState:g,lastHeight:a}}var g=n(74512);const h=(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,g.jsx)("div",{ref:t,children:(0,g.jsx)("div",{ref:i,style:o?{minHeight:`${o}px`}:void 0,className:"h-full w-full block"})})})),m={title:"",numPages:0},PdfEmbed_PdfViewer=({open:e,onClose:t,pdfUrl:n})=>{const a=(0,s.useRef)(null),[d,u]=(0,s.useState)(1),[f,p]=(0,s.useState)(m);(0,s.useEffect)((()=>{e||p(m)}),[e]);const v=(0,s.useRef)(null),w=(0,s.useRef)(null),x=0===f.numPages;return(0,i.yU)(w,(e=>{v.current&&v.current.centerView()})),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(o.wh,{isOpen:e&&x}),(0,g.jsxs)(o.ki,{onWillDismiss:()=>{u(1),t()},isOpen:e,className:"pdf-modal",style:{"--width":"80vw","--height":"80vh"},children:[(0,g.jsx)(o.Gu,{children:(0,g.jsx)(o.sr,{children:(0,g.jsx)(o.Sm,{slot:"start",children:(0,g.jsxs)(o.YG,{onClick:()=>{t()},color:"secondary",children:[(0,g.jsx)(o.gu,{slot:"start",icon:r.Mny}),"Back"]})})})}),(0,g.jsx)(o.W2,{children:(0,g.jsx)("div",{ref:a,className:l()("rounded w-full h-full flex justify-center items-center"),children:(0,g.jsx)(c.d$,{ref:v,children:(0,g.jsx)(c.Uv,{wrapperStyle:{overflow:"visible",width:"100vw",height:"100vh"},children:(0,g.jsx)(h,{ref:w,onDocumentLoaded:p,pageNumber:d,fileUrl:n})})})})}),(0,g.jsx)(o.fr,{children:(0,g.jsxs)(o.sr,{children:[(0,g.jsx)(o.Sm,{slot:"start",children:(0,g.jsx)(o.YG,{onClick:function onPreviousPage(){const e=d-1;u(e<=0?f.numPages:e)},color:"secondary",children:(0,g.jsx)(o.gu,{"data-test-id":"btn-back",slot:"icon-only",icon:r.Mny})})}),(0,g.jsxs)(o.wd,{"data-test-id":"pdf-pagination",children:[d,"/",f.numPages]}),(0,g.jsx)(o.Sm,{slot:"end",children:(0,g.jsx)(o.YG,{color:"secondary",onClick:function onNextPage(){const e=d+1;e>f.numPages?u(1):u(e)},children:(0,g.jsx)(o.gu,{"data-test-id":"btn-next",slot:"icon-only",icon:r.XXs})})})]})})]})]})}},93649:()=>{},42597:()=>{},74982:()=>{},94356:()=>{},41229:()=>{},45847:()=>{}}]); | ||
(self.webpackChunkbookito_widget=self.webpackChunkbookito_widget||[]).push([[247],{8e4:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>PdfEmbed_PdfViewer});n(48868),n(54861);var s=n(32735),i=n(46163),o=n(84694),a=n(40841),l=n.n(a),r=n(17922),c=n(7853),d=(n(96609),n(63045),n(96126),n(69847));const u=100,f=2e3;function useRenderPdf({canvasContainer:e,isVisible:t=!0,fileUrl:n,pageNumber:i=1,onDocumentLoaded:o}){const[a,l]=(0,s.useState)(),[r,c]=(0,s.useState)(),[g,h]=(0,s.useState)("idle"),[m,p]=(0,s.useState)(),v=(0,s.useMemo)((()=>function log(...e){0}),[n]);return(0,s.useEffect)((()=>{n&&m&&(v("URL changed, resetting loaded document"),p(void 0))}),[n]),(0,s.useEffect)((()=>{let e=!1;return t&&n&&(void 0===(null==m?void 0:m.pageNumber)||m.pageNumber!==i)&&setTimeout((()=>{e||(async()=>{h("loading");const e=await async function loadPage({fileUrl:e,pageNumber:t=1,pdfDocument:n}){const s=n||await d.getDocument(e).promise;return{page:await s.getPage(t),pdfDocument:s}}({fileUrl:n,pageNumber:i,pdfDocument:null==m?void 0:m.pdfDocument});h("loaded"),p(Object.assign({},e,{pageNumber:i}))})()}),u),()=>{e=!0}}),[t,n,i,null==m?void 0:m.pdfDocument]),(0,s.useEffect)((()=>{let n=!1;return null!=m&&m.page&&t&&e&&"rendered"!==g&&setTimeout((()=>{n||(async()=>{v(`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:m.page}),s=e.clientHeight;n||(c(t),l(s),h("rendered"))})()}),u),()=>{n=!0}}),[null==m?void 0:m.page,t,e]),(0,s.useEffect)((()=>{let e=!1;return n&&null!=m&&m.pdfDocument&&o&&(async()=>{var t;const s=await m.pdfDocument.getMetadata(),i=d.getFilenameFromUrl(n),a=s.info,l=null!=(t=null==a?void 0:a.Title)?t:i;e||o({title:l,numPages:m.pdfDocument.numPages})})(),()=>{e=!0}}),[null==m?void 0:m.pdfDocument,o]),(0,s.useEffect)((()=>{let e,n=!1;return!t&&null!=m&&m.pdfDocument&&"rendered"===g&&(e=window.setTimeout((()=>{n||m.page.destroyed||(v("Destroying document"),m.pdfDocument.destroy(),r&&function releaseCanvas(e){e.width=1,e.height=1;const t=e.getContext("2d");t&&t.clearRect(0,0,1,1)}(r),p(void 0),h("idle"))}),f)),()=>{n=!0,void 0!==e&&window.clearTimeout(e)}}),[null==m?void 0:m.pdfDocument,t,g]),{displayState:g,lastHeight:a}}var g=n(74512);const h=(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,g.jsx)("div",{ref:t,children:(0,g.jsx)("div",{ref:i,style:o?{minHeight:`${o}px`}:void 0,className:"h-full w-full block"})})})),m={title:"",numPages:0},PdfEmbed_PdfViewer=({open:e,onClose:t,pdfUrl:n})=>{const a=(0,s.useRef)(null),[d,u]=(0,s.useState)(1),[f,p]=(0,s.useState)(m);(0,s.useEffect)((()=>{e||p(m)}),[e]);const v=(0,s.useRef)(null),w=(0,s.useRef)(null),x=0===f.numPages;return(0,i.yU)(w,(e=>{v.current&&v.current.centerView()})),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(o.wh,{isOpen:e&&x}),(0,g.jsxs)(o.ki,{onWillDismiss:()=>{u(1),t()},isOpen:e,className:"pdf-modal",style:{"--width":"80vw","--height":"80vh"},children:[(0,g.jsx)(o.Gu,{children:(0,g.jsx)(o.sr,{children:(0,g.jsx)(o.Sm,{slot:"start",children:(0,g.jsxs)(o.YG,{onClick:()=>{t()},color:"secondary",children:[(0,g.jsx)(o.gu,{slot:"start",icon:r.Mny}),"Back"]})})})}),(0,g.jsx)(o.W2,{children:(0,g.jsx)("div",{ref:a,className:l()("rounded w-full h-full flex justify-center items-center"),children:(0,g.jsx)(c.d$,{ref:v,children:(0,g.jsx)(c.Uv,{wrapperStyle:{overflow:"visible",width:"100vw",height:"100vh"},children:(0,g.jsx)(h,{ref:w,onDocumentLoaded:p,pageNumber:d,fileUrl:n})})})})}),(0,g.jsx)(o.fr,{children:(0,g.jsxs)(o.sr,{children:[(0,g.jsx)(o.Sm,{slot:"start",children:(0,g.jsx)(o.YG,{onClick:function onPreviousPage(){const e=d-1;u(e<=0?f.numPages:e)},color:"secondary",children:(0,g.jsx)(o.gu,{"data-test-id":"btn-back",slot:"icon-only",icon:r.Mny})})}),(0,g.jsxs)(o.wd,{"data-test-id":"pdf-pagination",children:[d,"/",f.numPages]}),(0,g.jsx)(o.Sm,{slot:"end",children:(0,g.jsx)(o.YG,{color:"secondary",onClick:function onNextPage(){const e=d+1;e>f.numPages?u(1):u(e)},children:(0,g.jsx)(o.gu,{"data-test-id":"btn-next",slot:"icon-only",icon:r.XXs})})})]})})]})]})}},93649:()=>{},42597:()=>{},74982:()=>{},94356:()=>{},41229:()=>{},45847:()=>{}}]); | ||
//# sourceMappingURL=247.js.map |
{ | ||
"name": "bookito-widget", | ||
"version": "0.22.4", | ||
"version": "0.23.0", | ||
"main": "dist/bookito-widget.umd.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -52,3 +52,2 @@ { | ||
"postTargets": ["bookito-widget:publish-to-npm"], | ||
"baseBranch": "staging", | ||
"push": true | ||
@@ -60,10 +59,8 @@ } | ||
"options": { | ||
"command": "cd libs/apps/bookito-widget && npm publish --registry=https://registry.npmjs.org/ --tag next" | ||
"commands": [ | ||
"echo 'Publishing bookito-widget to npm'", | ||
"echo $TAG", | ||
"cd libs/apps/bookito-widget && npm publish --registry=https://registry.npmjs.org/ --tag $TAG" | ||
] | ||
} | ||
}, | ||
"publish-latest-to-npm": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "./libs/apps/bookito-widget/publish-latest.sh" | ||
} | ||
} | ||
@@ -70,0 +67,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66
30090866
28003