@jotforminc/dnd-builder 2.5.4 → 2.5.5
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
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.5.5](https://github.com/jotform/dnd-builder/compare/v2.5.4...v2.5.5) (2023-03-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **zoom-pan-pinch:** disable mouse wheel zooming func ([fed16bf](https://github.com/jotform/dnd-builder/commit/fed16bf9afd99a1451f5c0a06168837a268e1203))
|
|
11
|
+
|
|
5
12
|
### [2.5.4](https://github.com/jotform/dnd-builder/compare/v2.5.3...v2.5.4) (2023-03-03)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -46,6 +46,9 @@ var withZoomPanPinchHOC = function withZoomPanPinchHOC(WrappedComponent) {
|
|
|
46
46
|
pinch: {
|
|
47
47
|
step: 1
|
|
48
48
|
},
|
|
49
|
+
wheel: {
|
|
50
|
+
wheelDisabled: true
|
|
51
|
+
},
|
|
49
52
|
children: /*#__PURE__*/jsxRuntime.jsx(reactZoomPanPinch.TransformComponent, {
|
|
50
53
|
wrapperStyle: {
|
|
51
54
|
height: '100%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withZoomPanPinchHOC.js","sources":["../../../src/components/withZoomPanPinchHOC.js"],"sourcesContent":["import {\n string, func, any, oneOfType, shape,\n} from 'prop-types';\nimport { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';\nimport { useBuilderContext } from '../utils/builderContext';\nimport { usePresentationContext } from '../utils/presentationContext';\n\nconst withZoomPanPinchHOC = WrappedComponent => {\n const ZoomPanPinchHOC = props => {\n const { handleZoom, mode, refSetter } = props;\n\n const { zoom } = useBuilderContext();\n const { fittedZoom } = usePresentationContext();\n\n if (mode !== 'presentation') {\n return <WrappedComponent {...props} />;\n }\n\n return (\n <TransformWrapper\n ref={refSetter}\n centerOnInit={true}\n centerZoomedOut={true}\n disablePadding={true}\n doubleClick={{\n step: 0.2,\n }}\n initialScale={zoom}\n maxScale={2}\n minScale={0.5}\n onZoom={handleZoom}\n panning={{\n disabled: zoom <= fittedZoom,\n }}\n pinch={{\n step: 1,\n }}\n >\n <TransformComponent\n wrapperStyle={{ height: '100%', width: '100%' }}\n >\n <WrappedComponent {...props} />\n </TransformComponent>\n </TransformWrapper>\n );\n };\n\n ZoomPanPinchHOC.propTypes = {\n handleZoom: func.isRequired,\n mode: string,\n refSetter: oneOfType([\n func,\n shape({ current: any }),\n ]).isRequired,\n };\n\n ZoomPanPinchHOC.defaultProps = {\n mode: '',\n };\n\n return ZoomPanPinchHOC;\n};\n\nexport default withZoomPanPinchHOC;\n"],"names":["withZoomPanPinchHOC","WrappedComponent","ZoomPanPinchHOC","props","handleZoom","mode","refSetter","useBuilderContext","zoom","usePresentationContext","fittedZoom","_jsx","TransformWrapper","step","disabled","TransformComponent","height","width","propTypes","func","isRequired","string","oneOfType","shape","current","any","defaultProps"],"mappings":";;;;;;;;;;;;;;IAOMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAAC,gBAAgB,EAAI;AAC9C,MAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAAC,KAAK,EAAI;AAC/B,QAAQC,UAAR,GAAwCD,KAAxC,CAAQC,UAAR;AAAA,QAAoBC,IAApB,GAAwCF,KAAxC,CAAoBE,IAApB;AAAA,QAA0BC,SAA1B,GAAwCH,KAAxC,CAA0BG,SAA1B;;AAEA,6BAAiBC,gCAAiB,EAAlC;AAAA,QAAQC,IAAR,sBAAQA,IAAR;;AACA,gCAAuBC,0CAAsB,EAA7C;AAAA,QAAQC,UAAR,yBAAQA,UAAR;;AAEA,QAAIL,IAAI,KAAK,cAAb,EAA6B;AAC3B,0BAAOM,eAAC,gBAAD,oBAAsBR,KAAtB,EAAP;AACD;;AAED,wBACEQ,eAACC,kCAAD;AACE,MAAA,GAAG,EAAEN,SADP;AAEE,MAAA,YAAY,EAAE,IAFhB;AAGE,MAAA,eAAe,EAAE,IAHnB;AAIE,MAAA,cAAc,EAAE,IAJlB;AAKE,MAAA,WAAW,EAAE;AACXO,QAAAA,IAAI,EAAE;AADK,OALf;AAQE,MAAA,YAAY,EAAEL,IARhB;AASE,MAAA,QAAQ,EAAE,CATZ;AAUE,MAAA,QAAQ,EAAE,GAVZ;AAWE,MAAA,MAAM,EAAEJ,UAXV;AAYE,MAAA,OAAO,EAAE;AACPU,QAAAA,QAAQ,EAAEN,IAAI,IAAIE;AADX,OAZX;AAeE,MAAA,KAAK,EAAE;AACLG,QAAAA,IAAI,EAAE;AADD,OAfT;AAAA,
|
|
1
|
+
{"version":3,"file":"withZoomPanPinchHOC.js","sources":["../../../src/components/withZoomPanPinchHOC.js"],"sourcesContent":["import {\n string, func, any, oneOfType, shape,\n} from 'prop-types';\nimport { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';\nimport { useBuilderContext } from '../utils/builderContext';\nimport { usePresentationContext } from '../utils/presentationContext';\n\nconst withZoomPanPinchHOC = WrappedComponent => {\n const ZoomPanPinchHOC = props => {\n const { handleZoom, mode, refSetter } = props;\n\n const { zoom } = useBuilderContext();\n const { fittedZoom } = usePresentationContext();\n\n if (mode !== 'presentation') {\n return <WrappedComponent {...props} />;\n }\n\n return (\n <TransformWrapper\n ref={refSetter}\n centerOnInit={true}\n centerZoomedOut={true}\n disablePadding={true}\n doubleClick={{\n step: 0.2,\n }}\n initialScale={zoom}\n maxScale={2}\n minScale={0.5}\n onZoom={handleZoom}\n panning={{\n disabled: zoom <= fittedZoom,\n }}\n pinch={{\n step: 1,\n }}\n wheel={{\n wheelDisabled: true,\n }}\n >\n <TransformComponent\n wrapperStyle={{ height: '100%', width: '100%' }}\n >\n <WrappedComponent {...props} />\n </TransformComponent>\n </TransformWrapper>\n );\n };\n\n ZoomPanPinchHOC.propTypes = {\n handleZoom: func.isRequired,\n mode: string,\n refSetter: oneOfType([\n func,\n shape({ current: any }),\n ]).isRequired,\n };\n\n ZoomPanPinchHOC.defaultProps = {\n mode: '',\n };\n\n return ZoomPanPinchHOC;\n};\n\nexport default withZoomPanPinchHOC;\n"],"names":["withZoomPanPinchHOC","WrappedComponent","ZoomPanPinchHOC","props","handleZoom","mode","refSetter","useBuilderContext","zoom","usePresentationContext","fittedZoom","_jsx","TransformWrapper","step","disabled","wheelDisabled","TransformComponent","height","width","propTypes","func","isRequired","string","oneOfType","shape","current","any","defaultProps"],"mappings":";;;;;;;;;;;;;;IAOMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAAC,gBAAgB,EAAI;AAC9C,MAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAAC,KAAK,EAAI;AAC/B,QAAQC,UAAR,GAAwCD,KAAxC,CAAQC,UAAR;AAAA,QAAoBC,IAApB,GAAwCF,KAAxC,CAAoBE,IAApB;AAAA,QAA0BC,SAA1B,GAAwCH,KAAxC,CAA0BG,SAA1B;;AAEA,6BAAiBC,gCAAiB,EAAlC;AAAA,QAAQC,IAAR,sBAAQA,IAAR;;AACA,gCAAuBC,0CAAsB,EAA7C;AAAA,QAAQC,UAAR,yBAAQA,UAAR;;AAEA,QAAIL,IAAI,KAAK,cAAb,EAA6B;AAC3B,0BAAOM,eAAC,gBAAD,oBAAsBR,KAAtB,EAAP;AACD;;AAED,wBACEQ,eAACC,kCAAD;AACE,MAAA,GAAG,EAAEN,SADP;AAEE,MAAA,YAAY,EAAE,IAFhB;AAGE,MAAA,eAAe,EAAE,IAHnB;AAIE,MAAA,cAAc,EAAE,IAJlB;AAKE,MAAA,WAAW,EAAE;AACXO,QAAAA,IAAI,EAAE;AADK,OALf;AAQE,MAAA,YAAY,EAAEL,IARhB;AASE,MAAA,QAAQ,EAAE,CATZ;AAUE,MAAA,QAAQ,EAAE,GAVZ;AAWE,MAAA,MAAM,EAAEJ,UAXV;AAYE,MAAA,OAAO,EAAE;AACPU,QAAAA,QAAQ,EAAEN,IAAI,IAAIE;AADX,OAZX;AAeE,MAAA,KAAK,EAAE;AACLG,QAAAA,IAAI,EAAE;AADD,OAfT;AAkBE,MAAA,KAAK,EAAE;AACLE,QAAAA,aAAa,EAAE;AADV,OAlBT;AAAA,6BAsBEJ,eAACK,oCAAD;AACE,QAAA,YAAY,EAAE;AAAEC,UAAAA,MAAM,EAAE,MAAV;AAAkBC,UAAAA,KAAK,EAAE;AAAzB,SADhB;AAAA,+BAGEP,eAAC,gBAAD,oBAAsBR,KAAtB;AAHF;AAtBF,MADF;AA8BD,GAxCD;;AA0CAD,EAAAA,eAAe,CAACiB,SAAhB,GAA4B;AAC1Bf,IAAAA,UAAU,EAAEgB,cAAI,CAACC,UADS;AAE1BhB,IAAAA,IAAI,EAAEiB,gBAFoB;AAG1BhB,IAAAA,SAAS,EAAEiB,mBAAS,CAAC,CACnBH,cADmB,EAEnBI,eAAK,CAAC;AAAEC,MAAAA,OAAO,EAAEC;AAAX,KAAD,CAFc,CAAD,CAAT,CAGRL;AANuB,GAA5B;AASAnB,EAAAA,eAAe,CAACyB,YAAhB,GAA+B;AAC7BtB,IAAAA,IAAI,EAAE;AADuB,GAA/B;AAIA,SAAOH,eAAP;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withZoomPanPinchHOC.js","sources":["../../../src/components/withZoomPanPinchHOC.js"],"sourcesContent":["import {\n string, func, any, oneOfType, shape,\n} from 'prop-types';\nimport { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';\nimport { useBuilderContext } from '../utils/builderContext';\nimport { usePresentationContext } from '../utils/presentationContext';\n\nconst withZoomPanPinchHOC = WrappedComponent => {\n const ZoomPanPinchHOC = props => {\n const { handleZoom, mode, refSetter } = props;\n\n const { zoom } = useBuilderContext();\n const { fittedZoom } = usePresentationContext();\n\n if (mode !== 'presentation') {\n return <WrappedComponent {...props} />;\n }\n\n return (\n <TransformWrapper\n ref={refSetter}\n centerOnInit={true}\n centerZoomedOut={true}\n disablePadding={true}\n doubleClick={{\n step: 0.2,\n }}\n initialScale={zoom}\n maxScale={2}\n minScale={0.5}\n onZoom={handleZoom}\n panning={{\n disabled: zoom <= fittedZoom,\n }}\n pinch={{\n step: 1,\n }}\n >\n <TransformComponent\n wrapperStyle={{ height: '100%', width: '100%' }}\n >\n <WrappedComponent {...props} />\n </TransformComponent>\n </TransformWrapper>\n );\n };\n\n ZoomPanPinchHOC.propTypes = {\n handleZoom: func.isRequired,\n mode: string,\n refSetter: oneOfType([\n func,\n shape({ current: any }),\n ]).isRequired,\n };\n\n ZoomPanPinchHOC.defaultProps = {\n mode: '',\n };\n\n return ZoomPanPinchHOC;\n};\n\nexport default withZoomPanPinchHOC;\n"],"names":["withZoomPanPinchHOC","WrappedComponent","ZoomPanPinchHOC","props","handleZoom","mode","refSetter","useBuilderContext","zoom","usePresentationContext","fittedZoom","_jsx","step","disabled","height","width","propTypes","func","isRequired","string","oneOfType","shape","current","any","defaultProps"],"mappings":";;;;;;;;;;;;IAOMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAAC,gBAAgB,EAAI;AAC9C,MAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAAC,KAAK,EAAI;AAC/B,QAAQC,UAAR,GAAwCD,KAAxC,CAAQC,UAAR;AAAA,QAAoBC,IAApB,GAAwCF,KAAxC,CAAoBE,IAApB;AAAA,QAA0BC,SAA1B,GAAwCH,KAAxC,CAA0BG,SAA1B;;AAEA,6BAAiBC,iBAAiB,EAAlC;AAAA,QAAQC,IAAR,sBAAQA,IAAR;;AACA,gCAAuBC,sBAAsB,EAA7C;AAAA,QAAQC,UAAR,yBAAQA,UAAR;;AAEA,QAAIL,IAAI,KAAK,cAAb,EAA6B;AAC3B,0BAAOM,IAAC,gBAAD,oBAAsBR,KAAtB,EAAP;AACD;;AAED,wBACEQ,IAAC,gBAAD;AACE,MAAA,GAAG,EAAEL,SADP;AAEE,MAAA,YAAY,EAAE,IAFhB;AAGE,MAAA,eAAe,EAAE,IAHnB;AAIE,MAAA,cAAc,EAAE,IAJlB;AAKE,MAAA,WAAW,EAAE;AACXM,QAAAA,IAAI,EAAE;AADK,OALf;AAQE,MAAA,YAAY,EAAEJ,IARhB;AASE,MAAA,QAAQ,EAAE,CATZ;AAUE,MAAA,QAAQ,EAAE,GAVZ;AAWE,MAAA,MAAM,EAAEJ,UAXV;AAYE,MAAA,OAAO,EAAE;AACPS,QAAAA,QAAQ,EAAEL,IAAI,IAAIE;AADX,OAZX;AAeE,MAAA,KAAK,EAAE;AACLE,QAAAA,IAAI,EAAE;AADD,OAfT;AAAA,
|
|
1
|
+
{"version":3,"file":"withZoomPanPinchHOC.js","sources":["../../../src/components/withZoomPanPinchHOC.js"],"sourcesContent":["import {\n string, func, any, oneOfType, shape,\n} from 'prop-types';\nimport { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';\nimport { useBuilderContext } from '../utils/builderContext';\nimport { usePresentationContext } from '../utils/presentationContext';\n\nconst withZoomPanPinchHOC = WrappedComponent => {\n const ZoomPanPinchHOC = props => {\n const { handleZoom, mode, refSetter } = props;\n\n const { zoom } = useBuilderContext();\n const { fittedZoom } = usePresentationContext();\n\n if (mode !== 'presentation') {\n return <WrappedComponent {...props} />;\n }\n\n return (\n <TransformWrapper\n ref={refSetter}\n centerOnInit={true}\n centerZoomedOut={true}\n disablePadding={true}\n doubleClick={{\n step: 0.2,\n }}\n initialScale={zoom}\n maxScale={2}\n minScale={0.5}\n onZoom={handleZoom}\n panning={{\n disabled: zoom <= fittedZoom,\n }}\n pinch={{\n step: 1,\n }}\n wheel={{\n wheelDisabled: true,\n }}\n >\n <TransformComponent\n wrapperStyle={{ height: '100%', width: '100%' }}\n >\n <WrappedComponent {...props} />\n </TransformComponent>\n </TransformWrapper>\n );\n };\n\n ZoomPanPinchHOC.propTypes = {\n handleZoom: func.isRequired,\n mode: string,\n refSetter: oneOfType([\n func,\n shape({ current: any }),\n ]).isRequired,\n };\n\n ZoomPanPinchHOC.defaultProps = {\n mode: '',\n };\n\n return ZoomPanPinchHOC;\n};\n\nexport default withZoomPanPinchHOC;\n"],"names":["withZoomPanPinchHOC","WrappedComponent","ZoomPanPinchHOC","props","handleZoom","mode","refSetter","useBuilderContext","zoom","usePresentationContext","fittedZoom","_jsx","step","disabled","wheelDisabled","height","width","propTypes","func","isRequired","string","oneOfType","shape","current","any","defaultProps"],"mappings":";;;;;;;;;;;;IAOMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAAC,gBAAgB,EAAI;AAC9C,MAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAAC,KAAK,EAAI;AAC/B,QAAQC,UAAR,GAAwCD,KAAxC,CAAQC,UAAR;AAAA,QAAoBC,IAApB,GAAwCF,KAAxC,CAAoBE,IAApB;AAAA,QAA0BC,SAA1B,GAAwCH,KAAxC,CAA0BG,SAA1B;;AAEA,6BAAiBC,iBAAiB,EAAlC;AAAA,QAAQC,IAAR,sBAAQA,IAAR;;AACA,gCAAuBC,sBAAsB,EAA7C;AAAA,QAAQC,UAAR,yBAAQA,UAAR;;AAEA,QAAIL,IAAI,KAAK,cAAb,EAA6B;AAC3B,0BAAOM,IAAC,gBAAD,oBAAsBR,KAAtB,EAAP;AACD;;AAED,wBACEQ,IAAC,gBAAD;AACE,MAAA,GAAG,EAAEL,SADP;AAEE,MAAA,YAAY,EAAE,IAFhB;AAGE,MAAA,eAAe,EAAE,IAHnB;AAIE,MAAA,cAAc,EAAE,IAJlB;AAKE,MAAA,WAAW,EAAE;AACXM,QAAAA,IAAI,EAAE;AADK,OALf;AAQE,MAAA,YAAY,EAAEJ,IARhB;AASE,MAAA,QAAQ,EAAE,CATZ;AAUE,MAAA,QAAQ,EAAE,GAVZ;AAWE,MAAA,MAAM,EAAEJ,UAXV;AAYE,MAAA,OAAO,EAAE;AACPS,QAAAA,QAAQ,EAAEL,IAAI,IAAIE;AADX,OAZX;AAeE,MAAA,KAAK,EAAE;AACLE,QAAAA,IAAI,EAAE;AADD,OAfT;AAkBE,MAAA,KAAK,EAAE;AACLE,QAAAA,aAAa,EAAE;AADV,OAlBT;AAAA,6BAsBEH,IAAC,kBAAD;AACE,QAAA,YAAY,EAAE;AAAEI,UAAAA,MAAM,EAAE,MAAV;AAAkBC,UAAAA,KAAK,EAAE;AAAzB,SADhB;AAAA,+BAGEL,IAAC,gBAAD,oBAAsBR,KAAtB;AAHF;AAtBF,MADF;AA8BD,GAxCD;;AA0CAD,EAAAA,eAAe,CAACe,SAAhB,GAA4B;AAC1Bb,IAAAA,UAAU,EAAEc,IAAI,CAACC,UADS;AAE1Bd,IAAAA,IAAI,EAAEe,MAFoB;AAG1Bd,IAAAA,SAAS,EAAEe,SAAS,CAAC,CACnBH,IADmB,EAEnBI,KAAK,CAAC;AAAEC,MAAAA,OAAO,EAAEC;AAAX,KAAD,CAFc,CAAD,CAAT,CAGRL;AANuB,GAA5B;AASAjB,EAAAA,eAAe,CAACuB,YAAhB,GAA+B;AAC7BpB,IAAAA,IAAI,EAAE;AADuB,GAA/B;AAIA,SAAOH,eAAP;AACD;;;;"}
|