@bigbinary/neeto-molecules 3.16.69 → 3.16.71
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/BoardView.js +26 -11
- package/dist/BoardView.js.map +1 -1
- package/dist/ProductEmbed.js +4 -48
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/cjs/BoardView.js +26 -11
- package/dist/cjs/BoardView.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +4 -48
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/package.json +1 -1
- package/types/BoardView.d.ts +2 -0
package/dist/cjs/BoardView.js
CHANGED
|
@@ -119,14 +119,17 @@ var DragDropContainer$1 = function DragDropContainer(_ref) {
|
|
|
119
119
|
var id = _ref.id,
|
|
120
120
|
index = _ref.index,
|
|
121
121
|
data = _ref.data,
|
|
122
|
-
render = _ref.render
|
|
122
|
+
render = _ref.render,
|
|
123
|
+
_ref$isDragAndDropDis = _ref.isDragAndDropDisabled,
|
|
124
|
+
isDragAndDropDisabled = _ref$isDragAndDropDis === void 0 ? false : _ref$isDragAndDropDis;
|
|
123
125
|
var _useDraggable = core.useDraggable({
|
|
124
126
|
data: _objectSpread$3(_objectSpread$3({}, data), {}, {
|
|
125
127
|
index: index,
|
|
126
128
|
type: DRAGGABLE_TYPES.ITEM,
|
|
127
129
|
direction: "vertical"
|
|
128
130
|
}),
|
|
129
|
-
id: "draggable-item--".concat(id)
|
|
131
|
+
id: "draggable-item--".concat(id),
|
|
132
|
+
disabled: isDragAndDropDisabled
|
|
130
133
|
}),
|
|
131
134
|
attributes = _useDraggable.attributes,
|
|
132
135
|
listeners = _useDraggable.listeners,
|
|
@@ -150,7 +153,7 @@ var DragDropContainer$1 = function DragDropContainer(_ref) {
|
|
|
150
153
|
setDraggableNodeRef(node);
|
|
151
154
|
setDroppableNodeRef(node);
|
|
152
155
|
}
|
|
153
|
-
}, attributes), listeners), {}, {
|
|
156
|
+
}, !isDragAndDropDisabled && attributes), !isDragAndDropDisabled && listeners), {}, {
|
|
154
157
|
children: [render(), isIndicatorVisible && /*#__PURE__*/jsxRuntime.jsx(DndIndicator, {
|
|
155
158
|
layout: "horizontal"
|
|
156
159
|
})]
|
|
@@ -210,7 +213,8 @@ var ItemPlaceholder = function ItemPlaceholder(_ref) {
|
|
|
210
213
|
var Section = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
211
214
|
var section = _ref.section,
|
|
212
215
|
items = _ref.items,
|
|
213
|
-
renderItem = _ref.renderItem
|
|
216
|
+
renderItem = _ref.renderItem,
|
|
217
|
+
isDragAndDropDisabled = _ref.isDragAndDropDisabled;
|
|
214
218
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
215
219
|
ref: ref,
|
|
216
220
|
className: "neeto-molecules-boardview-section__body relative min-h-0 flex-1 basis-0 overflow-y-auto",
|
|
@@ -221,6 +225,7 @@ var Section = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
221
225
|
}), items.map(function (item, index) {
|
|
222
226
|
return /*#__PURE__*/React.createElement(ItemContainer, {
|
|
223
227
|
index: index,
|
|
228
|
+
isDragAndDropDisabled: isDragAndDropDisabled,
|
|
224
229
|
data: {
|
|
225
230
|
section: section,
|
|
226
231
|
item: item
|
|
@@ -247,6 +252,8 @@ Section.propTypes = {
|
|
|
247
252
|
section: index.PropTypes.shape({
|
|
248
253
|
id: index.PropTypes.string.isRequired
|
|
249
254
|
}).isRequired,
|
|
255
|
+
/** When true, disables all drag and drop functionality for the section */
|
|
256
|
+
isDragAndDropDisabled: index.PropTypes.bool,
|
|
250
257
|
/** An array of items belonging to the current section. */
|
|
251
258
|
items: index.PropTypes.arrayOf(index.PropTypes.shape({
|
|
252
259
|
id: index.PropTypes.string.isRequired
|
|
@@ -261,13 +268,16 @@ var DragDropContainer = function DragDropContainer(_ref) {
|
|
|
261
268
|
var id = _ref.id,
|
|
262
269
|
index = _ref.index,
|
|
263
270
|
data = _ref.data,
|
|
264
|
-
render = _ref.render
|
|
271
|
+
render = _ref.render,
|
|
272
|
+
_ref$isDragAndDropDis = _ref.isDragAndDropDisabled,
|
|
273
|
+
isDragAndDropDisabled = _ref$isDragAndDropDis === void 0 ? false : _ref$isDragAndDropDis;
|
|
265
274
|
var _useDraggable = core.useDraggable({
|
|
266
275
|
data: _objectSpread$1(_objectSpread$1({}, data), {}, {
|
|
267
276
|
type: DRAGGABLE_TYPES.SECTION,
|
|
268
277
|
index: index
|
|
269
278
|
}),
|
|
270
|
-
id: "draggable-section--".concat(id)
|
|
279
|
+
id: "draggable-section--".concat(id),
|
|
280
|
+
disabled: isDragAndDropDisabled
|
|
271
281
|
}),
|
|
272
282
|
attributes = _useDraggable.attributes,
|
|
273
283
|
listeners = _useDraggable.listeners,
|
|
@@ -283,7 +293,7 @@ var DragDropContainer = function DragDropContainer(_ref) {
|
|
|
283
293
|
isOver = _useDroppable.isOver,
|
|
284
294
|
setDroppableNodeRef = _useDroppable.setNodeRef;
|
|
285
295
|
var isIndicatorVisible = !isDragging && isOver;
|
|
286
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread$1(_objectSpread$1(_objectSpread$1({}, listeners), attributes), {}, {
|
|
296
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread$1(_objectSpread$1(_objectSpread$1({}, !isDragAndDropDisabled && listeners), !isDragAndDropDisabled && attributes), {}, {
|
|
287
297
|
className: classnames("relative h-full w-full flex-col", {
|
|
288
298
|
"opacity-65": isDragging
|
|
289
299
|
}),
|
|
@@ -346,7 +356,9 @@ var measuringConfig = {
|
|
|
346
356
|
}
|
|
347
357
|
};
|
|
348
358
|
var BoardView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
349
|
-
var
|
|
359
|
+
var _props$isDragAndDropD = props.isDragAndDropDisabled,
|
|
360
|
+
isDragAndDropDisabled = _props$isDragAndDropD === void 0 ? false : _props$isDragAndDropD,
|
|
361
|
+
sections = props.sections,
|
|
350
362
|
onMoveSection = props.onMoveSection,
|
|
351
363
|
onMoveItem = props.onMoveItem,
|
|
352
364
|
renderSection = props.renderSection,
|
|
@@ -358,6 +370,7 @@ var BoardView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
358
370
|
var sensors = core.useSensors(core.useSensor(core.PointerSensor, sensorConfig));
|
|
359
371
|
var onDragEnd = function onDragEnd(drag) {
|
|
360
372
|
var _drag$over;
|
|
373
|
+
if (isDragAndDropDisabled) return;
|
|
361
374
|
var active = dragState.active.data.current;
|
|
362
375
|
var over = (_drag$over = drag.over) === null || _drag$over === void 0 ? void 0 : _drag$over.data.current;
|
|
363
376
|
if (!active || !over) return;
|
|
@@ -369,16 +382,17 @@ var BoardView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
369
382
|
};
|
|
370
383
|
return /*#__PURE__*/jsxRuntime.jsxs(core.DndContext, {
|
|
371
384
|
onDragEnd: onDragEnd,
|
|
372
|
-
sensors: sensors,
|
|
373
385
|
collisionDetection: closestCenter(dragState),
|
|
374
386
|
measuring: measuringConfig,
|
|
375
|
-
|
|
387
|
+
sensors: isDragAndDropDisabled ? [] : sensors,
|
|
388
|
+
onDragStart: isDragAndDropDisabled ? undefined : setDragState,
|
|
376
389
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
377
390
|
ref: ref,
|
|
378
391
|
className: classnames("neeto-molecules-boardview-outer-wrapper flex w-full flex-1 overflow-x-auto", className),
|
|
379
392
|
children: [/*#__PURE__*/jsxRuntime.jsx(SectionPlaceholder, {}), sections.map(function (section, index) {
|
|
380
393
|
return /*#__PURE__*/React.createElement(SectionContainer, {
|
|
381
394
|
index: index,
|
|
395
|
+
isDragAndDropDisabled: isDragAndDropDisabled,
|
|
382
396
|
data: {
|
|
383
397
|
section: section
|
|
384
398
|
},
|
|
@@ -387,7 +401,8 @@ var BoardView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
387
401
|
render: function render() {
|
|
388
402
|
return renderSection({
|
|
389
403
|
index: index,
|
|
390
|
-
section: section
|
|
404
|
+
section: section,
|
|
405
|
+
isDragAndDropDisabled: isDragAndDropDisabled
|
|
391
406
|
});
|
|
392
407
|
}
|
|
393
408
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoardView.js","sources":["../../src/components/BoardView/closestCenter.js","../../src/components/BoardView/constants.js","../../src/components/BoardView/Overlay.jsx","../../src/components/BoardView/Indicator.jsx","../../src/components/BoardView/Item/Container.jsx","../../src/components/BoardView/Item/Placeholder.jsx","../../src/components/BoardView/Section/index.jsx","../../src/components/BoardView/Section/Container.jsx","../../src/components/BoardView/Section/Placeholder.jsx","../../src/components/BoardView/index.jsx"],"sourcesContent":["const distanceBetween = (p1, p2) =>\n Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n\nconst centerOfRectangle = (rect, left = rect.left, top = rect.top) => ({\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5,\n});\n\nconst matchType = (draggable, droppable) =>\n droppable.data.current.accepts.includes(draggable.data.current.type);\n\nconst matchDirection = (direction, droppable, reference) => {\n const matchX = () =>\n reference.x > droppable.left &&\n reference.x < droppable.left + droppable.width;\n\n const matchY = () =>\n reference.y > droppable.top &&\n reference.y < droppable.top + droppable.height;\n\n if (direction === \"vertical\") return matchX();\n else if (direction === \"horizontal\") return matchY();\n\n return true;\n};\nexport const closestCenter =\n ({ active }) =>\n ({\n collisionRect,\n droppableRects,\n droppableContainers,\n pointerCoordinates,\n }) => {\n const direction = active.data.current?.direction;\n const centerRect = centerOfRectangle(\n collisionRect,\n collisionRect.left,\n collisionRect.top\n );\n\n let minDistance = Number.POSITIVE_INFINITY;\n let collision = { id: undefined };\n\n // eslint-disable-next-line @bigbinary/neeto/use-array-methods\n for (const droppableContainer of droppableContainers) {\n const rect = droppableRects.get(droppableContainer.id);\n\n if (!rect || droppableContainer.id === active.id) continue;\n else if (!matchType(active, droppableContainer)) continue;\n else if (!matchDirection(direction, rect, pointerCoordinates)) continue;\n\n const distance = distanceBetween(centerOfRectangle(rect), centerRect);\n if (distance < minDistance) {\n minDistance = distance;\n collision = {\n id: droppableContainer.id,\n data: { droppableContainer, value: distance },\n };\n }\n }\n\n return [collision];\n };\n","export const DRAGGABLE_TYPES = { SECTION: \"section\", ITEM: \"item\" };\n","import { DragOverlay } from \"@dnd-kit/core\";\n\nimport { DRAGGABLE_TYPES } from \"./constants\";\n\nconst DndOverlay = ({ props, state }) => {\n const { renderSectionOverlay, renderItemOverlay } = props;\n const data = state.active?.data.current || {};\n\n return (\n <DragOverlay>\n {data.type === DRAGGABLE_TYPES.ITEM && renderItemOverlay?.(data)}\n {data.type === DRAGGABLE_TYPES.SECTION && renderSectionOverlay?.(data)}\n </DragOverlay>\n );\n};\n\nexport default DndOverlay;\n","import classNames from \"classnames\";\n\nconst DndIndicator = ({ layout = \"vertical\" }) => (\n <div\n className={classNames(\n \"neeto-ui-rounded-xl neeto-ui-bg-accent-600 absolute\",\n {\n \"-bottom-3 left-0 right-0 h-1\": layout === \"horizontal\",\n \"-right-2 bottom-0 top-0 w-1\": layout === \"vertical\",\n }\n )}\n />\n);\n\nexport default DndIndicator;\n","import { useRef } from \"react\";\n\nimport { useDraggable, useDroppable } from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\nimport { useInView } from \"react-intersection-observer\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst DragDropContainer = ({ id, index, data, render }) => {\n const {\n attributes,\n listeners,\n isDragging,\n setNodeRef: setDraggableNodeRef,\n } = useDraggable({\n data: { ...data, index, type: DRAGGABLE_TYPES.ITEM, direction: \"vertical\" },\n id: `draggable-item--${id}`,\n });\n\n const { isOver, setNodeRef: setDroppableNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.ITEM], index: index + 1 },\n id: `droppable-item--${id}`,\n });\n\n const isIndicatorVisible = !isDragging && isOver;\n\n return (\n <div\n className={classNames(\"relative h-full w-full\", {\n \"opacity-65\": isDragging,\n })}\n ref={node => {\n setDraggableNodeRef(node);\n setDroppableNodeRef(node);\n }}\n {...attributes}\n {...listeners}\n >\n {render()}\n {isIndicatorVisible && <DndIndicator layout=\"horizontal\" />}\n </div>\n );\n};\n\nconst ItemContainer = props => {\n const mutables = useRef({ containerHeight: 128 }).current;\n\n const [setViewRef, inView] = useInView({\n onChange: (inView, entry) => {\n if (inView) return; // We need the last height value when elements moves out.\n mutables.containerHeight = entry.target.clientHeight;\n },\n });\n\n return (\n <div\n className=\"neeto-molecules-boardview-section__card relative shrink-0\"\n id={props.id}\n style={{ height: inView ? undefined : mutables.containerHeight }}\n ref={node => {\n setViewRef(node);\n }}\n >\n {inView && <DragDropContainer {...props} />}\n </div>\n );\n};\n\nexport default ItemContainer;\n","import { useId } from \"react\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst ItemPlaceholder = ({ data, index = 0 }) => {\n const id = useId();\n\n const { isOver, setNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.ITEM], index },\n id: `droppable-item--${id}`,\n });\n\n return (\n <div className=\"relative\" ref={setNodeRef}>\n {isOver && <DndIndicator layout=\"horizontal\" />}\n </div>\n );\n};\n\nexport default ItemPlaceholder;\n","import { forwardRef } from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport ItemContainer from \"../Item/Container\";\nimport ItemPlaceholder from \"../Item/Placeholder\";\n\nconst Section = forwardRef(({ section, items, renderItem }, ref) => (\n <div\n {...{ ref }}\n className=\"neeto-molecules-boardview-section__body relative min-h-0 flex-1 basis-0 overflow-y-auto\"\n >\n <ItemPlaceholder data={{ section }} />\n {items.map((item, index) => (\n <ItemContainer\n {...{ index }}\n data={{ section, item }}\n id={`${section.id}--${item.id}`}\n key={`${section.id}--${item.id}`}\n render={() => renderItem({ index, item, section })}\n />\n ))}\n </div>\n));\n\nSection.displayName = \"Section\";\nSection.propTypes = {\n /** A reference to the section container element. */\n // eslint-disable-next-line react/no-unused-prop-types\n ref: PropTypes.any,\n\n /** The current section data */\n section: PropTypes.shape({ id: PropTypes.string.isRequired }).isRequired,\n\n /** An array of items belonging to the current section. */\n items: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired }))\n .isRequired,\n\n /** A function that renders the content of each item in the list. */\n renderItem: PropTypes.func.isRequired,\n};\n\nexport default Section;\n","import { useDraggable, useDroppable } from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\nimport { useInView } from \"react-intersection-observer\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst DragDropContainer = ({ id, index, data, render }) => {\n const {\n attributes,\n listeners,\n isDragging,\n setNodeRef: setDraggableNodeRef,\n } = useDraggable({\n data: { ...data, type: DRAGGABLE_TYPES.SECTION, index },\n id: `draggable-section--${id}`,\n });\n\n const { isOver, setNodeRef: setDroppableNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.SECTION], index: index + 1 },\n id: `droppable-section--${id}`,\n });\n\n const isIndicatorVisible = !isDragging && isOver;\n\n return (\n <div\n {...listeners}\n {...attributes}\n className={classNames(\"relative h-full w-full flex-col\", {\n \"opacity-65\": isDragging,\n })}\n ref={node => {\n setDraggableNodeRef(node);\n setDroppableNodeRef(node);\n }}\n >\n {render()}\n {isIndicatorVisible && <DndIndicator layout=\"vertical\" />}\n </div>\n );\n};\n\nconst SectionContainer = props => {\n const [setViewRef, inView] = useInView();\n\n return (\n <div\n className=\"neeto-molecules-boardview-section relative mr-3 h-full last-of-type:mr-0\"\n ref={node => {\n setViewRef(node);\n }}\n >\n {inView && <DragDropContainer {...props} />}\n </div>\n );\n};\n\nexport default SectionContainer;\n","import { useId } from \"react\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst SectionPlaceholder = ({ data, index = 0 }) => {\n const id = useId();\n\n const { isOver, setNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.SECTION], index },\n id: `droppable-section--${id}`,\n });\n\n return (\n <div className=\"relative\" ref={setNodeRef}>\n {isOver && <DndIndicator layout=\"vertical\" />}\n </div>\n );\n};\n\nexport default SectionPlaceholder;\n","import { forwardRef, useState } from \"react\";\n\nimport {\n DndContext,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport \"./boardview.scss\";\nimport { closestCenter } from \"./closestCenter\";\nimport { DRAGGABLE_TYPES } from \"./constants\";\nimport DndOverlay from \"./Overlay\";\nimport Section from \"./Section\";\nimport SectionContainer from \"./Section/Container\";\nimport SectionPlaceholder from \"./Section/Placeholder\";\n\nconst sensorConfig = { activationConstraint: { distance: 8 } };\nconst measuringConfig = { droppable: { frequency: 500 } };\n\nconst BoardView = forwardRef((props, ref) => {\n const { sections, onMoveSection, onMoveItem, renderSection, className } =\n props;\n\n const [dragState, setDragState] = useState({});\n const sensors = useSensors(useSensor(PointerSensor, sensorConfig));\n\n const onDragEnd = drag => {\n const active = dragState.active.data.current;\n const over = drag.over?.data.current;\n if (!active || !over) return;\n\n if (active.type === DRAGGABLE_TYPES.ITEM) {\n onMoveItem?.(active, over);\n } else if (active.type === DRAGGABLE_TYPES.SECTION) {\n onMoveSection?.(active, over);\n }\n };\n\n return (\n <DndContext\n {...{ onDragEnd, sensors }}\n collisionDetection={closestCenter(dragState)}\n measuring={measuringConfig}\n onDragStart={setDragState}\n >\n <div\n {...{ ref }}\n className={classNames(\n \"neeto-molecules-boardview-outer-wrapper flex w-full flex-1 overflow-x-auto\",\n className\n )}\n >\n <SectionPlaceholder />\n {sections.map((section, index) => (\n <SectionContainer\n {...{ index }}\n data={{ section }}\n id={section.id}\n key={section.id}\n render={() => renderSection({ index, section })}\n />\n ))}\n </div>\n <DndOverlay {...{ props }} state={dragState} />\n </DndContext>\n );\n});\n\nBoardView.displayName = \"BoardView\";\nBoardView.Section = Section;\nBoardView.propTypes = {\n /** A reference to the container element. */\n // eslint-disable-next-line react/no-unused-prop-types\n ref: PropTypes.any,\n\n /**\n An array of sections, each defined by an object with an `id` string.\n */\n sections: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string.isRequired })\n ).isRequired,\n\n /** function to render each section content in the board view */\n renderSection: PropTypes.func.isRequired,\n\n /** A function to render a drag overlay for individual sections (drag preview) */\n // eslint-disable-next-line react/no-unused-prop-types\n renderSectionOverlay: PropTypes.func.isRequired,\n\n /** A function to render a drag overlay for individual items (drag preview) */\n // eslint-disable-next-line react/no-unused-prop-types\n renderItemOverlay: PropTypes.func.isRequired,\n\n /** Callback function triggered when a section is reordered */\n onMoveSection: PropTypes.func,\n\n /** Callback function triggered when an item is moved */\n onMoveItem: PropTypes.func,\n /**\n * Additional classes passed on to the board view.\n */\n className: PropTypes.string,\n};\n\nexport default BoardView;\n"],"names":["distanceBetween","p1","p2","Math","sqrt","pow","x","y","centerOfRectangle","rect","left","arguments","length","undefined","top","width","height","matchType","draggable","droppable","data","current","accepts","includes","type","matchDirection","direction","reference","matchX","matchY","closestCenter","_ref","active","_ref2","_active$data$current","collisionRect","droppableRects","droppableContainers","pointerCoordinates","centerRect","minDistance","Number","POSITIVE_INFINITY","collision","id","_iterator","_createForOfIteratorHelper","_step","s","n","done","droppableContainer","value","get","distance","err","e","f","DRAGGABLE_TYPES","SECTION","ITEM","DndOverlay","_state$active","props","state","renderSectionOverlay","renderItemOverlay","_jsxs","DragOverlay","children","DndIndicator","_ref$layout","layout","_jsx","className","classNames","DragDropContainer","index","render","_useDraggable","useDraggable","_objectSpread","concat","attributes","listeners","isDragging","setDraggableNodeRef","setNodeRef","_useDroppable","useDroppable","isOver","setDroppableNodeRef","isIndicatorVisible","ref","node","ItemContainer","mutables","useRef","containerHeight","_useInView","useInView","onChange","inView","entry","target","clientHeight","_useInView2","_slicedToArray","setViewRef","style","ItemPlaceholder","_ref$index","useId","Section","forwardRef","section","items","renderItem","map","item","_createElement","key","displayName","propTypes","PropTypes","any","shape","string","isRequired","arrayOf","func","SectionContainer","SectionPlaceholder","sensorConfig","activationConstraint","measuringConfig","frequency","BoardView","sections","onMoveSection","onMoveItem","renderSection","_useState","useState","_useState2","dragState","setDragState","sensors","useSensors","useSensor","PointerSensor","onDragEnd","drag","_drag$over","over","DndContext","collisionDetection","measuring","onDragStart"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,EAAE,EAAEC,EAAE,EAAA;AAAA,EAAA,OAC7BC,IAAI,CAACC,IAAI,CAACD,IAAI,CAACE,GAAG,CAACJ,EAAE,CAACK,CAAC,GAAGJ,EAAE,CAACI,CAAC,EAAE,CAAC,CAAC,GAAGH,IAAI,CAACE,GAAG,CAACJ,EAAE,CAACM,CAAC,GAAGL,EAAE,CAACK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAAA,CAAA,CAAA;AAEhE,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,IAAI,EAAA;AAAA,EAAA,IAAEC,IAAI,GAAAC,SAAA,CAAAC,MAAA,GAAAD,CAAAA,IAAAA,SAAA,CAAAE,CAAAA,CAAAA,KAAAA,SAAA,GAAAF,SAAA,CAAGF,CAAAA,CAAAA,GAAAA,IAAI,CAACC,IAAI,CAAA;AAAA,EAAA,IAAEI,GAAG,GAAAH,SAAA,CAAAC,MAAA,GAAAD,CAAAA,IAAAA,SAAA,CAAAE,CAAAA,CAAAA,KAAAA,SAAA,GAAAF,SAAA,CAAGF,CAAAA,CAAAA,GAAAA,IAAI,CAACK,GAAG,CAAA;EAAA,OAAM;AACrER,IAAAA,CAAC,EAAEI,IAAI,GAAGD,IAAI,CAACM,KAAK,GAAG,GAAG;AAC1BR,IAAAA,CAAC,EAAEO,GAAG,GAAGL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E,OAAO,CAACvE,EAAG;UACf6E,GAAG,EAAEN,OAAO,CAACvE,EAAG;UAChBkC,MAAM,EAAE,SAARA,MAAMA,GAAA;AAAA,YAAA,OAAQ+D,aAAa,CAAC;AAAEhE,cAAAA,KAAK,EAALA,KAAK;AAAEsC,cAAAA,OAAO,EAAPA,OAAAA;AAAQ,aAAC,CAAC,CAAA;AAAA,WAAA;AAAC,SACjD,CAAC,CAAA;AAAA,OACH,CAAC,CAAA;AAAA,KACC,CAAC,eACN1C,cAAA,CAACZ,UAAU,EAAA;AAAOE,MAAAA,KAAK,EAALA,KAAK;AAAIC,MAAAA,KAAK,EAAEiF,SAAAA;AAAU,KAAE,CAAC,CAAA;AAAA,GACrC,CAAC,CAAA;AAEjB,CAAC,EAAC;AAEFR,SAAS,CAACf,WAAW,GAAG,WAAW,CAAA;AACnCe,SAAS,CAACxB,OAAO,GAAGA,OAAO;;;;"}
|
|
1
|
+
{"version":3,"file":"BoardView.js","sources":["../../src/components/BoardView/closestCenter.js","../../src/components/BoardView/constants.js","../../src/components/BoardView/Overlay.jsx","../../src/components/BoardView/Indicator.jsx","../../src/components/BoardView/Item/Container.jsx","../../src/components/BoardView/Item/Placeholder.jsx","../../src/components/BoardView/Section/index.jsx","../../src/components/BoardView/Section/Container.jsx","../../src/components/BoardView/Section/Placeholder.jsx","../../src/components/BoardView/index.jsx"],"sourcesContent":["const distanceBetween = (p1, p2) =>\n Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n\nconst centerOfRectangle = (rect, left = rect.left, top = rect.top) => ({\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5,\n});\n\nconst matchType = (draggable, droppable) =>\n droppable.data.current.accepts.includes(draggable.data.current.type);\n\nconst matchDirection = (direction, droppable, reference) => {\n const matchX = () =>\n reference.x > droppable.left &&\n reference.x < droppable.left + droppable.width;\n\n const matchY = () =>\n reference.y > droppable.top &&\n reference.y < droppable.top + droppable.height;\n\n if (direction === \"vertical\") return matchX();\n else if (direction === \"horizontal\") return matchY();\n\n return true;\n};\nexport const closestCenter =\n ({ active }) =>\n ({\n collisionRect,\n droppableRects,\n droppableContainers,\n pointerCoordinates,\n }) => {\n const direction = active.data.current?.direction;\n const centerRect = centerOfRectangle(\n collisionRect,\n collisionRect.left,\n collisionRect.top\n );\n\n let minDistance = Number.POSITIVE_INFINITY;\n let collision = { id: undefined };\n\n // eslint-disable-next-line @bigbinary/neeto/use-array-methods\n for (const droppableContainer of droppableContainers) {\n const rect = droppableRects.get(droppableContainer.id);\n\n if (!rect || droppableContainer.id === active.id) continue;\n else if (!matchType(active, droppableContainer)) continue;\n else if (!matchDirection(direction, rect, pointerCoordinates)) continue;\n\n const distance = distanceBetween(centerOfRectangle(rect), centerRect);\n if (distance < minDistance) {\n minDistance = distance;\n collision = {\n id: droppableContainer.id,\n data: { droppableContainer, value: distance },\n };\n }\n }\n\n return [collision];\n };\n","export const DRAGGABLE_TYPES = { SECTION: \"section\", ITEM: \"item\" };\n","import { DragOverlay } from \"@dnd-kit/core\";\n\nimport { DRAGGABLE_TYPES } from \"./constants\";\n\nconst DndOverlay = ({ props, state }) => {\n const { renderSectionOverlay, renderItemOverlay } = props;\n const data = state.active?.data.current || {};\n\n return (\n <DragOverlay>\n {data.type === DRAGGABLE_TYPES.ITEM && renderItemOverlay?.(data)}\n {data.type === DRAGGABLE_TYPES.SECTION && renderSectionOverlay?.(data)}\n </DragOverlay>\n );\n};\n\nexport default DndOverlay;\n","import classNames from \"classnames\";\n\nconst DndIndicator = ({ layout = \"vertical\" }) => (\n <div\n className={classNames(\n \"neeto-ui-rounded-xl neeto-ui-bg-accent-600 absolute\",\n {\n \"-bottom-3 left-0 right-0 h-1\": layout === \"horizontal\",\n \"-right-2 bottom-0 top-0 w-1\": layout === \"vertical\",\n }\n )}\n />\n);\n\nexport default DndIndicator;\n","import { useRef } from \"react\";\n\nimport { useDraggable, useDroppable } from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\nimport { useInView } from \"react-intersection-observer\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst DragDropContainer = ({\n id,\n index,\n data,\n render,\n isDragAndDropDisabled = false,\n}) => {\n const {\n attributes,\n listeners,\n isDragging,\n setNodeRef: setDraggableNodeRef,\n } = useDraggable({\n data: { ...data, index, type: DRAGGABLE_TYPES.ITEM, direction: \"vertical\" },\n id: `draggable-item--${id}`,\n disabled: isDragAndDropDisabled,\n });\n\n const { isOver, setNodeRef: setDroppableNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.ITEM], index: index + 1 },\n id: `droppable-item--${id}`,\n });\n\n const isIndicatorVisible = !isDragging && isOver;\n\n return (\n <div\n className={classNames(\"relative h-full w-full\", {\n \"opacity-65\": isDragging,\n })}\n ref={node => {\n setDraggableNodeRef(node);\n setDroppableNodeRef(node);\n }}\n {...(!isDragAndDropDisabled && attributes)}\n {...(!isDragAndDropDisabled && listeners)}\n >\n {render()}\n {isIndicatorVisible && <DndIndicator layout=\"horizontal\" />}\n </div>\n );\n};\n\nconst ItemContainer = props => {\n const mutables = useRef({ containerHeight: 128 }).current;\n\n const [setViewRef, inView] = useInView({\n onChange: (inView, entry) => {\n if (inView) return; // We need the last height value when elements moves out.\n mutables.containerHeight = entry.target.clientHeight;\n },\n });\n\n return (\n <div\n className=\"neeto-molecules-boardview-section__card relative shrink-0\"\n id={props.id}\n style={{ height: inView ? undefined : mutables.containerHeight }}\n ref={node => {\n setViewRef(node);\n }}\n >\n {inView && <DragDropContainer {...props} />}\n </div>\n );\n};\n\nexport default ItemContainer;\n","import { useId } from \"react\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst ItemPlaceholder = ({ data, index = 0 }) => {\n const id = useId();\n\n const { isOver, setNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.ITEM], index },\n id: `droppable-item--${id}`,\n });\n\n return (\n <div className=\"relative\" ref={setNodeRef}>\n {isOver && <DndIndicator layout=\"horizontal\" />}\n </div>\n );\n};\n\nexport default ItemPlaceholder;\n","import { forwardRef } from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport ItemContainer from \"../Item/Container\";\nimport ItemPlaceholder from \"../Item/Placeholder\";\n\nconst Section = forwardRef(\n ({ section, items, renderItem, isDragAndDropDisabled }, ref) => (\n <div\n {...{ ref }}\n className=\"neeto-molecules-boardview-section__body relative min-h-0 flex-1 basis-0 overflow-y-auto\"\n >\n <ItemPlaceholder data={{ section }} />\n {items.map((item, index) => (\n <ItemContainer\n {...{ index, isDragAndDropDisabled }}\n data={{ section, item }}\n id={`${section.id}--${item.id}`}\n key={`${section.id}--${item.id}`}\n render={() => renderItem({ index, item, section })}\n />\n ))}\n </div>\n )\n);\n\nSection.displayName = \"Section\";\nSection.propTypes = {\n /** A reference to the section container element. */\n // eslint-disable-next-line react/no-unused-prop-types\n ref: PropTypes.any,\n\n /** The current section data */\n section: PropTypes.shape({ id: PropTypes.string.isRequired }).isRequired,\n\n /** When true, disables all drag and drop functionality for the section */\n isDragAndDropDisabled: PropTypes.bool,\n\n /** An array of items belonging to the current section. */\n items: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired }))\n .isRequired,\n\n /** A function that renders the content of each item in the list. */\n renderItem: PropTypes.func.isRequired,\n};\n\nexport default Section;\n","import { useDraggable, useDroppable } from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\nimport { useInView } from \"react-intersection-observer\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst DragDropContainer = ({\n id,\n index,\n data,\n render,\n isDragAndDropDisabled = false,\n}) => {\n const {\n attributes,\n listeners,\n isDragging,\n setNodeRef: setDraggableNodeRef,\n } = useDraggable({\n data: { ...data, type: DRAGGABLE_TYPES.SECTION, index },\n id: `draggable-section--${id}`,\n disabled: isDragAndDropDisabled,\n });\n\n const { isOver, setNodeRef: setDroppableNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.SECTION], index: index + 1 },\n id: `droppable-section--${id}`,\n });\n\n const isIndicatorVisible = !isDragging && isOver;\n\n return (\n <div\n {...(!isDragAndDropDisabled && listeners)}\n {...(!isDragAndDropDisabled && attributes)}\n className={classNames(\"relative h-full w-full flex-col\", {\n \"opacity-65\": isDragging,\n })}\n ref={node => {\n setDraggableNodeRef(node);\n setDroppableNodeRef(node);\n }}\n >\n {render()}\n {isIndicatorVisible && <DndIndicator layout=\"vertical\" />}\n </div>\n );\n};\n\nconst SectionContainer = props => {\n const [setViewRef, inView] = useInView();\n\n return (\n <div\n className=\"neeto-molecules-boardview-section relative mr-3 h-full last-of-type:mr-0\"\n ref={node => {\n setViewRef(node);\n }}\n >\n {inView && <DragDropContainer {...props} />}\n </div>\n );\n};\n\nexport default SectionContainer;\n","import { useId } from \"react\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport { DRAGGABLE_TYPES } from \"../constants\";\nimport DndIndicator from \"../Indicator\";\n\nconst SectionPlaceholder = ({ data, index = 0 }) => {\n const id = useId();\n\n const { isOver, setNodeRef } = useDroppable({\n data: { ...data, accepts: [DRAGGABLE_TYPES.SECTION], index },\n id: `droppable-section--${id}`,\n });\n\n return (\n <div className=\"relative\" ref={setNodeRef}>\n {isOver && <DndIndicator layout=\"vertical\" />}\n </div>\n );\n};\n\nexport default SectionPlaceholder;\n","import { forwardRef, useState } from \"react\";\n\nimport {\n DndContext,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport \"./boardview.scss\";\nimport { closestCenter } from \"./closestCenter\";\nimport { DRAGGABLE_TYPES } from \"./constants\";\nimport DndOverlay from \"./Overlay\";\nimport Section from \"./Section\";\nimport SectionContainer from \"./Section/Container\";\nimport SectionPlaceholder from \"./Section/Placeholder\";\n\nconst sensorConfig = { activationConstraint: { distance: 8 } };\nconst measuringConfig = { droppable: { frequency: 500 } };\n\nconst BoardView = forwardRef((props, ref) => {\n const {\n isDragAndDropDisabled = false,\n sections,\n onMoveSection,\n onMoveItem,\n renderSection,\n className,\n } = props;\n\n const [dragState, setDragState] = useState({});\n const sensors = useSensors(useSensor(PointerSensor, sensorConfig));\n\n const onDragEnd = drag => {\n if (isDragAndDropDisabled) return;\n\n const active = dragState.active.data.current;\n const over = drag.over?.data.current;\n if (!active || !over) return;\n\n if (active.type === DRAGGABLE_TYPES.ITEM) {\n onMoveItem?.(active, over);\n } else if (active.type === DRAGGABLE_TYPES.SECTION) {\n onMoveSection?.(active, over);\n }\n };\n\n return (\n <DndContext\n {...{ onDragEnd }}\n collisionDetection={closestCenter(dragState)}\n measuring={measuringConfig}\n sensors={isDragAndDropDisabled ? [] : sensors}\n onDragStart={isDragAndDropDisabled ? undefined : setDragState}\n >\n <div\n {...{ ref }}\n className={classNames(\n \"neeto-molecules-boardview-outer-wrapper flex w-full flex-1 overflow-x-auto\",\n className\n )}\n >\n <SectionPlaceholder />\n {sections.map((section, index) => (\n <SectionContainer\n {...{ index, isDragAndDropDisabled }}\n data={{ section }}\n id={section.id}\n key={section.id}\n render={() =>\n renderSection({ index, section, isDragAndDropDisabled })\n }\n />\n ))}\n </div>\n <DndOverlay {...{ props }} state={dragState} />\n </DndContext>\n );\n});\n\nBoardView.displayName = \"BoardView\";\nBoardView.Section = Section;\nBoardView.propTypes = {\n /** A reference to the container element. */\n // eslint-disable-next-line react/no-unused-prop-types\n ref: PropTypes.any,\n\n /**\n An array of sections, each defined by an object with an `id` string.\n */\n sections: PropTypes.arrayOf(\n PropTypes.shape({ id: PropTypes.string.isRequired })\n ).isRequired,\n\n /** function to render each section content in the board view */\n renderSection: PropTypes.func.isRequired,\n\n /** A function to render a drag overlay for individual sections (drag preview) */\n // eslint-disable-next-line react/no-unused-prop-types\n renderSectionOverlay: PropTypes.func.isRequired,\n\n /** A function to render a drag overlay for individual items (drag preview) */\n // eslint-disable-next-line react/no-unused-prop-types\n renderItemOverlay: PropTypes.func.isRequired,\n\n /** Callback function triggered when a section is reordered */\n onMoveSection: PropTypes.func,\n\n /** Callback function triggered when an item is moved */\n onMoveItem: PropTypes.func,\n\n /** When true, disables all drag and drop functionality for the board view */\n isDragAndDropDisabled: PropTypes.bool,\n\n /**\n * Additional classes passed on to the board view.\n */\n className: PropTypes.string,\n};\n\nexport default BoardView;\n"],"names":["distanceBetween","p1","p2","Math","sqrt","pow","x","y","centerOfRectangle","rect","left","arguments","length","undefined","top","width","height","matchType","draggable","droppable","data","current","accepts","includes","type","matchDirection","direction","reference","matchX","matchY","closestCenter","_ref","active","_ref2","_active$data$current","collisionRect","droppableRects","droppableContainers","pointerCoordinates","centerRect","minDistance","Number","POSITIVE_INFINITY","collision","id","_iterator","_createForOfIteratorHelper","_step","s","n","done","droppableContainer","value","get","distance","err","e","f","DRAGGABLE_TYPES","SECTION","ITEM","DndOverlay","_state$active","props","state","renderSectionOverlay","renderItemOverlay","_jsxs","DragOverlay","children","DndIndicator","_ref$layout","layout","_jsx","className","classNames","DragDropContainer","index","render","_ref$isDragAndDropDis","isDragAndDropDisabled","_useDraggable","useDraggable","_objectSpread","concat","disabled","attributes","listeners","isDragging","setDraggableNodeRef","setNodeRef","_useDroppable","useDroppable","isOver","setDroppableNodeRef","isIndicatorVisible","ref","node","ItemContainer","mutables","useRef","containerHeight","_useInView","useInView","onChange","inView","entry","target","clientHeight","_useInView2","_slicedToArray","setViewRef","style","ItemPlaceholder","_ref$index","useId","Section","forwardRef","section","items","renderItem","map","item","_createElement","key","displayName","propTypes","PropTypes","any","shape","string","isRequired","bool","arrayOf","func","SectionContainer","SectionPlaceholder","sensorConfig","activationConstraint","measuringConfig","frequency","BoardView","_props$isDragAndDropD","sections","onMoveSection","onMoveItem","renderSection","_useState","useState","_useState2","dragState","setDragState","sensors","useSensors","useSensor","PointerSensor","onDragEnd","drag","_drag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
|
|
153
153
|
queryParams: queryParams,
|
|
154
154
|
extraArgs: extraArgs
|
|
155
155
|
});
|
|
156
|
-
return "\n <!-- ".concat(globalProps.appName, " iframe embed code begins -->\n <iframe\n allowfullscreen\n height=\"").concat(height, "
|
|
156
|
+
return "\n <!-- ".concat(globalProps.appName, " iframe embed code begins -->\n <iframe\n allowfullscreen\n height=\"").concat(height, "\"\n width=\"").concat(width, "\"\n frameborder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n />\n <!-- ").concat(globalProps.appName, " iframe embed code ends -->");
|
|
157
157
|
};
|
|
158
158
|
var htmlCodeGenerators = {
|
|
159
159
|
inline: inlineEmbedCode$1,
|
|
@@ -242,7 +242,7 @@ var iframeEmbedCode = function iframeEmbedCode(_ref6) {
|
|
|
242
242
|
queryParams: queryParams,
|
|
243
243
|
extraArgs: extraArgs
|
|
244
244
|
});
|
|
245
|
-
return "\n const App = () => {\n return (\n <>\n {/* ".concat(globalProps.appName, " iframe embed code begins */}\n <iframe\n allowFullScreen\n height=\"").concat(height, "
|
|
245
|
+
return "\n const App = () => {\n return (\n <>\n {/* ".concat(globalProps.appName, " iframe embed code begins */}\n <iframe\n allowFullScreen\n height=\"").concat(height, "\"\n width=\"").concat(width, "\"\n frameBorder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n />\n {/* ").concat(globalProps.appName, " iframe embed code ends */}\n </>\n );\n };\n ");
|
|
246
246
|
};
|
|
247
247
|
var reactCodeGenerators = {
|
|
248
248
|
inline: inlineEmbedCode,
|
|
@@ -539,23 +539,14 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
539
539
|
};
|
|
540
540
|
|
|
541
541
|
var Iframe$1 = function Iframe(_ref) {
|
|
542
|
-
var
|
|
543
|
-
updateCustomization = _ref.updateCustomization,
|
|
542
|
+
var updateCustomization = _ref.updateCustomization,
|
|
544
543
|
otherCustomizations = _ref.otherCustomizations;
|
|
545
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
546
|
-
t = _useTranslation.t;
|
|
547
544
|
var _useProductEmbedStore = useProductEmbedStore(function (store) {
|
|
548
545
|
return {
|
|
549
546
|
isQueryParamsEnabled: store["isQueryParamsEnabled"]
|
|
550
547
|
};
|
|
551
548
|
}, shallow.shallow),
|
|
552
549
|
isQueryParamsEnabled = _useProductEmbedStore.isQueryParamsEnabled;
|
|
553
|
-
var height = customization.height,
|
|
554
|
-
width = customization.width;
|
|
555
|
-
var handleInputChange = function handleInputChange(_ref2, attribute) {
|
|
556
|
-
var value = _ref2.target.value;
|
|
557
|
-
return updateCustomization(_defineProperty({}, attribute, value));
|
|
558
|
-
};
|
|
559
550
|
React.useEffect(function () {
|
|
560
551
|
if (isQueryParamsEnabled) return;
|
|
561
552
|
updateCustomization({
|
|
@@ -563,42 +554,7 @@ var Iframe$1 = function Iframe(_ref) {
|
|
|
563
554
|
});
|
|
564
555
|
}, []);
|
|
565
556
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
566
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
567
|
-
className: "flex flex-col gap-2",
|
|
568
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
569
|
-
"data-cy": "window-size-text",
|
|
570
|
-
children: t("neetoMolecules.productEmbed.iframe.sizeOfIframe")
|
|
571
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
572
|
-
className: "flex justify-between gap-x-2",
|
|
573
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
574
|
-
className: "neeto-molecules-product-embed-size-input",
|
|
575
|
-
"data-cy": "iframe-width-input-field",
|
|
576
|
-
"data-testid": "iframe-width-input-field",
|
|
577
|
-
max: 100,
|
|
578
|
-
min: 0,
|
|
579
|
-
prefix: "W",
|
|
580
|
-
suffix: "%",
|
|
581
|
-
type: "number",
|
|
582
|
-
value: width,
|
|
583
|
-
onChange: function onChange(e) {
|
|
584
|
-
return handleInputChange(e, "width");
|
|
585
|
-
}
|
|
586
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
587
|
-
className: "neeto-molecules-product-embed-size-input",
|
|
588
|
-
"data-cy": "iframe-height-input-field",
|
|
589
|
-
"data-testid": "iframe-height-input-field",
|
|
590
|
-
max: 100,
|
|
591
|
-
min: 0,
|
|
592
|
-
prefix: "H",
|
|
593
|
-
suffix: "%",
|
|
594
|
-
type: "number",
|
|
595
|
-
value: height,
|
|
596
|
-
onChange: function onChange(e) {
|
|
597
|
-
return handleInputChange(e, "height");
|
|
598
|
-
}
|
|
599
|
-
})]
|
|
600
|
-
})]
|
|
601
|
-
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
|
|
557
|
+
children: [otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
|
|
602
558
|
updateCustomization: updateCustomization
|
|
603
559
|
})]
|
|
604
560
|
});
|