@griddo/core 1.75.133 → 1.75.135
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/components/GriddoImage/index.d.ts +1 -1
- package/dist/functions/create-schemas/index.d.ts +1 -1
- package/dist/functions/utils.d.ts +15 -32
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/useDataFilters.d.ts +5 -19
- package/dist/hooks/useFetch.d.ts +20 -0
- package/dist/hooks/useList.d.ts +6 -19
- package/dist/hooks/useListWithDefaultStaticPage.d.ts +28 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/api-response-fields/index.d.ts +5 -3
- package/dist/types/core/index.d.ts +4 -0
- package/dist/types/global.d.ts +27 -4
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@ import "./styles.css";
|
|
|
17
17
|
* quality={75}
|
|
18
18
|
* />
|
|
19
19
|
*/
|
|
20
|
-
declare const GriddoImage: React.ForwardRefExoticComponent<(Pick<GriddoImageJpgWebpAvif, "fixed" | "slot" | "style" | "title" | "children" | "color" | "lang" | "url" | "id" | "is" | "key" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crop" | "responsive" | "decoding" | "format" | "height" | "loading" | "quality" | "width" | "useMap" | "alt" | "ratio" | "formats" | "position" | "transforms" | "crossOrigin" | "fetchpriority"> | Pick<GriddoImageGif, "fixed" | "slot" | "style" | "title" | "children" | "color" | "lang" | "url" | "id" | "is" | "key" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crop" | "responsive" | "decoding" | "format" | "height" | "loading" | "quality" | "width" | "useMap" | "alt" | "ratio" | "formats" | "position" | "transforms" | "crossOrigin" | "fetchpriority"> | Pick<GriddoImageSvg, "fixed" | "slot" | "style" | "title" | "children" | "color" | "lang" | "url" | "id" | "is" | "key" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crop" | "responsive" | "decoding" | "format" | "height" | "loading" | "quality" | "width" | "useMap" | "alt" | "ratio" | "formats" | "position" | "transforms" | "crossOrigin" | "fetchpriority">) & React.RefAttributes<HTMLPictureElement>>;
|
|
20
|
+
declare const GriddoImage: React.ForwardRefExoticComponent<(Pick<GriddoImageJpgWebpAvif, "fixed" | "slot" | "style" | "title" | "children" | "color" | "lang" | "id" | "url" | "key" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crop" | "responsive" | "decoding" | "format" | "height" | "loading" | "quality" | "width" | "useMap" | "alt" | "ratio" | "formats" | "position" | "transforms" | "crossOrigin" | "fetchpriority"> | Pick<GriddoImageGif, "fixed" | "slot" | "style" | "title" | "children" | "color" | "lang" | "id" | "url" | "key" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crop" | "responsive" | "decoding" | "format" | "height" | "loading" | "quality" | "width" | "useMap" | "alt" | "ratio" | "formats" | "position" | "transforms" | "crossOrigin" | "fetchpriority"> | Pick<GriddoImageSvg, "fixed" | "slot" | "style" | "title" | "children" | "color" | "lang" | "id" | "url" | "key" | "referrerPolicy" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crop" | "responsive" | "decoding" | "format" | "height" | "loading" | "quality" | "width" | "useMap" | "alt" | "ratio" | "formats" | "position" | "transforms" | "crossOrigin" | "fetchpriority">) & React.RefAttributes<HTMLPictureElement>>;
|
|
21
21
|
interface GriddoImageCommonProps extends Omit<React.ComponentPropsWithRef<"img">, "src" | "srcSet" | "sizes" | "width" | "height"> {
|
|
22
22
|
crop?: ImageCropType;
|
|
23
23
|
fetchpriority?: FetchPriority;
|
|
@@ -14,5 +14,5 @@ declare const createModuleCategoriesSchema: (schema: ModuleCategories) => Module
|
|
|
14
14
|
declare const createModuleSchema: (schema: Module) => Module<unknown, unknown>;
|
|
15
15
|
declare const createTemplateSchema: (schema: Template) => Template<unknown>;
|
|
16
16
|
declare const createThemesSchema: (schema: Themes) => Themes;
|
|
17
|
-
declare const createTranslationsSchema: (schema: Translations) => Partial<Record<"br" | "hr" | "li" | "th" | "tr" | "or" | "Cy_az_AZ" | "Cy_sr_SP" | "Cy_uz_UZ" | "Lt_az_AZ" | "Lt_sr_SP" | "Lt_uz_UZ" | "aa" | "ab" | "ae" | "af" | "af_ZA" | "ak" | "am" | "an" | "ar" | "ar_AE" | "ar_BH" | "ar_DZ" | "ar_EG" | "ar_IQ" | "ar_JO" | "ar_KW" | "ar_LB" | "ar_LY" | "ar_MA" | "ar_OM" | "ar_QA" | "ar_SA" | "ar_SY" | "ar_TN" | "ar_YE" | "as" | "av" | "ay" | "az" | "ba" | "be" | "be_BY" | "bg" | "bg_BG" | "bh" | "bi" | "bm" | "bn" | "bo" | "bs" | "ca" | "ca_ES" | "ce" | "ch" | "co" | "cr" | "cs" | "cs_CZ" | "cu" | "cv" | "cy" | "da" | "da_DK" | "de" | "de_AT" | "de_CH" | "de_DE" | "de_LI" | "de_LU" | "div_MV" | "dv" | "dz" | "ee" | "el" | "el_GR" | "en" | "en_AU" | "en_BZ" | "en_CA" | "en_CB" | "en_GB" | "en_IE" | "en_JM" | "en_NZ" | "en_PH" | "en_TT" | "en_US" | "en_ZA" | "en_ZW" | "eo" | "es" | "es_AR" | "es_BO" | "es_CL" | "es_CO" | "es_CR" | "es_DO" | "es_EC" | "es_ES" | "es_GT" | "es_HN" | "es_MX" | "es_NI" | "es_PA" | "es_PE" | "es_PR" | "es_PY" | "es_SV" | "es_UY" | "es_VE" | "et" | "et_EE" | "eu" | "eu_ES" | "fa" | "fa_IR" | "ff" | "fi" | "fi_FI" | "fj" | "fo" | "fo_FO" | "fr" | "fr_BE" | "fr_CA" | "fr_CH" | "fr_FR" | "fr_LU" | "fr_MC" | "fy" | "ga" | "gd" | "gl" | "gl_ES" | "gn" | "gu" | "gu_IN" | "gv" | "ha" | "he" | "he_IL" | "hi" | "hi_IN" | "ho" | "hr_HR" | "ht" | "hu" | "hu_HU" | "hy" | "hy_AM" | "hz" | "ia" | "
|
|
17
|
+
declare const createTranslationsSchema: (schema: Translations) => Partial<Record<"br" | "hr" | "li" | "th" | "tr" | "or" | "id" | "is" | "Cy_az_AZ" | "Cy_sr_SP" | "Cy_uz_UZ" | "Lt_az_AZ" | "Lt_sr_SP" | "Lt_uz_UZ" | "aa" | "ab" | "ae" | "af" | "af_ZA" | "ak" | "am" | "an" | "ar" | "ar_AE" | "ar_BH" | "ar_DZ" | "ar_EG" | "ar_IQ" | "ar_JO" | "ar_KW" | "ar_LB" | "ar_LY" | "ar_MA" | "ar_OM" | "ar_QA" | "ar_SA" | "ar_SY" | "ar_TN" | "ar_YE" | "as" | "av" | "ay" | "az" | "ba" | "be" | "be_BY" | "bg" | "bg_BG" | "bh" | "bi" | "bm" | "bn" | "bo" | "bs" | "ca" | "ca_ES" | "ce" | "ch" | "co" | "cr" | "cs" | "cs_CZ" | "cu" | "cv" | "cy" | "da" | "da_DK" | "de" | "de_AT" | "de_CH" | "de_DE" | "de_LI" | "de_LU" | "div_MV" | "dv" | "dz" | "ee" | "el" | "el_GR" | "en" | "en_AU" | "en_BZ" | "en_CA" | "en_CB" | "en_GB" | "en_IE" | "en_JM" | "en_NZ" | "en_PH" | "en_TT" | "en_US" | "en_ZA" | "en_ZW" | "eo" | "es" | "es_AR" | "es_BO" | "es_CL" | "es_CO" | "es_CR" | "es_DO" | "es_EC" | "es_ES" | "es_GT" | "es_HN" | "es_MX" | "es_NI" | "es_PA" | "es_PE" | "es_PR" | "es_PY" | "es_SV" | "es_UY" | "es_VE" | "et" | "et_EE" | "eu" | "eu_ES" | "fa" | "fa_IR" | "ff" | "fi" | "fi_FI" | "fj" | "fo" | "fo_FO" | "fr" | "fr_BE" | "fr_CA" | "fr_CH" | "fr_FR" | "fr_LU" | "fr_MC" | "fy" | "ga" | "gd" | "gl" | "gl_ES" | "gn" | "gu" | "gu_IN" | "gv" | "ha" | "he" | "he_IL" | "hi" | "hi_IN" | "ho" | "hr_HR" | "ht" | "hu" | "hu_HU" | "hy" | "hy_AM" | "hz" | "ia" | "id_ID" | "ie" | "ig" | "ii" | "ik" | "io" | "is_IS" | "it" | "it_CH" | "it_IT" | "iu" | "ja" | "ja_JP" | "jv" | "ka" | "ka_GE" | "kg" | "ki" | "kj" | "kk" | "kk_KZ" | "kl" | "km" | "kn" | "kn_IN" | "ko" | "ko_KR" | "kr" | "ks" | "ku" | "kv" | "kw" | "ky" | "ky_KZ" | "la" | "lb" | "lg" | "ln" | "lo" | "lt" | "lt_LT" | "lu" | "lv" | "lv_LV" | "mg" | "mh" | "mi" | "mk" | "mk_MK" | "ml" | "mn" | "mn_MN" | "mr" | "mr_IN" | "ms" | "ms_BN" | "ms_MY" | "mt" | "my" | "na" | "nb" | "nb_NO" | "nd" | "ne" | "ng" | "nl" | "nl_BE" | "nl_NL" | "nn" | "nn_NO" | "no" | "nr" | "nv" | "ny" | "oc" | "oj" | "om" | "os" | "pa" | "pa_IN" | "pi" | "pl" | "pl_PL" | "ps" | "pt" | "pt_BR" | "pt_PT" | "qu" | "rm" | "rn" | "ro" | "ro_RO" | "ru" | "ru_RU" | "rw" | "sa" | "sa_IN" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sk_SK" | "sl" | "sl_SI" | "sm" | "sn" | "so" | "sq" | "sq_AL" | "sr" | "ss" | "st" | "su" | "sv" | "sv_FI" | "sv_SE" | "sw" | "sw_KE" | "ta" | "ta_IN" | "te" | "te_IN" | "tg" | "th_TH" | "ti" | "tk" | "tl" | "tn" | "to" | "tr_TR" | "ts" | "tt" | "tt_RU" | "tw" | "ty" | "ug" | "uk" | "uk_UA" | "ur" | "ur_PK" | "uz" | "ve" | "vi" | "vi_VN" | "vo" | "wa" | "wo" | "xh" | "yi" | "yo" | "za" | "zh" | "zh_CHS" | "zh_CHT" | "zh_CN" | "zh_HK" | "zh_MO" | "zh_SG" | "zh_TW" | "zu", Record<string, unknown>>>;
|
|
18
18
|
export { createCategoryContentTypeSchema, createComponentSchema, createDamDefaultsSchema, createDataPackCategorySchema, createDataPackSchema, createFooterSchema, createHeaderSchema, createLanguagesSchema, createMenuSchema, createModuleCategoriesSchema, createModuleSchema, createPageContentTypeSchema, createSimpleContentTypeSchema, createTemplateSchema, createThemesSchema, createTranslationsSchema, };
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
export interface GetLinkProps {
|
|
2
|
+
href?: string;
|
|
3
|
+
linkToURL?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface RecursiveSearchProps {
|
|
6
|
+
obj?: Record<string, string>;
|
|
7
|
+
searchKey?: string;
|
|
8
|
+
resultsBuffer?: Array<string>;
|
|
9
|
+
unique?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare type PublicApiOperators = "or" | "and" | "OR" | "AND";
|
|
12
|
+
export interface ConcatParams {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
params: Record<string, any>;
|
|
15
|
+
}
|
|
1
16
|
declare function getLinks(url?: GetLinkProps): {
|
|
2
17
|
href: string | null | undefined;
|
|
3
18
|
to: string | null | undefined;
|
|
@@ -33,36 +48,4 @@ declare function recursiveSearch({ obj, searchKey, resultsBuffer, unique, }?: Re
|
|
|
33
48
|
* @returns {string} a string with the params concatenated
|
|
34
49
|
*/
|
|
35
50
|
declare function concatParams({ baseUrl, params }: ConcatParams): string;
|
|
36
|
-
/**
|
|
37
|
-
* slicePageArray
|
|
38
|
-
* Extrae un rango de elementos de un array indicando el número de elementos y
|
|
39
|
-
* usando el concepto "página" como índice.
|
|
40
|
-
* @param {object} props Un objeto con las props
|
|
41
|
-
* @param {array} props.array Array de datos.
|
|
42
|
-
* @param {number} props.page Índice desde el que extraer los elementos.
|
|
43
|
-
* @param {number} props.itemsPerPage Número de elementos que extraerá del array.
|
|
44
|
-
* @return {array} Array con los elementos extraidos
|
|
45
|
-
* @example
|
|
46
|
-
* Extrae la página 2 usando 3 elementos por página
|
|
47
|
-
* slicePageArray({
|
|
48
|
-
* data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
|
49
|
-
* page: 2,
|
|
50
|
-
* itemsPerPage: 3
|
|
51
|
-
* })
|
|
52
|
-
* -> [3, 4, 5]
|
|
53
|
-
*/
|
|
54
|
-
interface GetLinkProps {
|
|
55
|
-
href?: string;
|
|
56
|
-
linkToURL?: string;
|
|
57
|
-
}
|
|
58
|
-
interface RecursiveSearchProps {
|
|
59
|
-
obj?: Record<string, string>;
|
|
60
|
-
searchKey?: string;
|
|
61
|
-
resultsBuffer?: Array<string>;
|
|
62
|
-
unique?: boolean;
|
|
63
|
-
}
|
|
64
|
-
interface ConcatParams {
|
|
65
|
-
baseUrl: string;
|
|
66
|
-
params: Record<string, any>;
|
|
67
|
-
}
|
|
68
51
|
export { getLinks, parseAnchor, getToken, getSiteID, getLang, recursiveSearch, concatParams, };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { useThemeFont } from "./themes/useThemeFont";
|
|
|
5
5
|
import { useThemePrimitives } from "./themes/useThemePrimitives";
|
|
6
6
|
import { useContentType } from "./useContentType";
|
|
7
7
|
import { useDataFilters } from "./useDataFilters";
|
|
8
|
+
import { useFetch } from "./useFetch";
|
|
8
9
|
import { useGriddoImage } from "./useGriddoImage";
|
|
9
10
|
import { useI18n } from "./useI18n";
|
|
10
11
|
import { useImage } from "./useImage";
|
|
@@ -12,6 +13,7 @@ import { useIsClient } from "./useIsClient";
|
|
|
12
13
|
import { useIsFirstRender } from "./useIsFirstRender";
|
|
13
14
|
import { useLink } from "./useLink";
|
|
14
15
|
import { useList } from "./useList";
|
|
16
|
+
import { useListWithDefaultStaticPage } from "./useListWithDefaultStaticPage";
|
|
15
17
|
import { useNavigation } from "./useNavigation";
|
|
16
18
|
import { usePage } from "./usePage";
|
|
17
19
|
import { useReferenceFieldData } from "./useReferenceFieldData";
|
|
@@ -20,4 +22,4 @@ import { useSession } from "./useSession";
|
|
|
20
22
|
import { useSite } from "./useSite";
|
|
21
23
|
import { useSitemap } from "./useSitemap";
|
|
22
24
|
import { useSSR } from "./useSSR";
|
|
23
|
-
export { useContentType, useDataFilters, useGlobalTheme, useGriddoImage, useI18n, useImage, useIsClient, useIsFirstRender, useLink, useList, useNavigation, usePage, useReferenceFieldData as useDistributorData, useReferenceFieldData, useScript, useSession, useSite, useSitemap, useSSR, useTheme, useThemeColors, useThemeFont, useThemePrimitives, };
|
|
25
|
+
export { useContentType, useDataFilters, useFetch, useGlobalTheme, useGriddoImage, useI18n, useImage, useIsClient, useIsFirstRender, useLink, useList, useNavigation, usePage, useReferenceFieldData as useDistributorData, useReferenceFieldData, useScript, useSession, useSite, useSitemap, useSSR, useTheme, useThemeColors, useThemeFont, useThemePrimitives, useListWithDefaultStaticPage, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SetQueryProps } from "../types/global";
|
|
1
|
+
import { FiltersDataApiQueryResponseProps, PickRename, SetQueryProps } from "../types/global";
|
|
2
|
+
import { UseFetchStateProps } from "./useFetch";
|
|
2
3
|
/**
|
|
3
4
|
* `useDataFilters()`
|
|
4
5
|
*
|
|
@@ -9,28 +10,13 @@ import { SetQueryProps } from "../types/global";
|
|
|
9
10
|
* setQuery(data) // `data` from a `ReferenceField`
|
|
10
11
|
*/
|
|
11
12
|
declare function useDataFilters<ContentType>(): UseDataFiltersReturn<ContentType>;
|
|
12
|
-
export declare type UseDataFiltersSetQueryProps<ContentType> = Pick<SetQueryProps<ContentType>, "data" | "apiUrl" | "lang" | "site" | "cached">;
|
|
13
|
-
export declare type UseDataFiltersItem<Item> = Omit<Item, "contentTypeName"> & {
|
|
14
|
-
id: number;
|
|
15
|
-
};
|
|
16
13
|
export interface UseDataFilterSetUrlAction {
|
|
17
14
|
queryUrl: string;
|
|
18
15
|
}
|
|
16
|
+
export declare type UseDataFiltersSetQueryProps<ContentType> = Pick<SetQueryProps<ContentType>, "data" | "apiUrl" | "lang" | "site" | "cached">;
|
|
17
|
+
export declare type UseDataFiltersState<ContentType> = PickRename<UseFetchStateProps<FiltersDataApiQueryResponseProps<ContentType>>, "data", "query">;
|
|
19
18
|
export declare type UseDataFiltersReturn<ContentType> = [
|
|
20
19
|
UseDataFiltersState<ContentType>,
|
|
21
|
-
(setQuery: UseDataFiltersSetQueryProps<ContentType>) => void
|
|
20
|
+
(setQuery: UseDataFiltersSetQueryProps<ContentType>) => void
|
|
22
21
|
];
|
|
23
|
-
export declare type UseDataFiltersState<Item> = {
|
|
24
|
-
isError: boolean;
|
|
25
|
-
isLoading: boolean;
|
|
26
|
-
msg: {
|
|
27
|
-
code: number;
|
|
28
|
-
msg: string;
|
|
29
|
-
};
|
|
30
|
-
query?: {
|
|
31
|
-
page: number;
|
|
32
|
-
totalItems: number;
|
|
33
|
-
items: Array<UseDataFiltersItem<Item>>;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
22
|
export { useDataFilters };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type UseFetchStateProps<T> = {
|
|
2
|
+
isError: boolean;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
msg: {
|
|
5
|
+
code: number;
|
|
6
|
+
msg: string;
|
|
7
|
+
};
|
|
8
|
+
data?: T;
|
|
9
|
+
isFirstFetch: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function useFetch<ApiModelWithContentType>(url?: string): {
|
|
12
|
+
data: ApiModelWithContentType | undefined;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
isError: boolean;
|
|
15
|
+
isFirstFetch: boolean;
|
|
16
|
+
msg: {
|
|
17
|
+
code: number;
|
|
18
|
+
msg: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
package/dist/hooks/useList.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListContentType } from "../types/core";
|
|
2
|
+
import { SetQueryProps, ListApiQueryResponseProps, PickRename } from "../types/global";
|
|
3
|
+
import { UseFetchStateProps } from "./useFetch";
|
|
2
4
|
/**
|
|
3
5
|
* `useList()`
|
|
4
6
|
*
|
|
@@ -9,29 +11,14 @@ import { SetQueryProps } from "../types/global";
|
|
|
9
11
|
* setQuery(data) // `data` from a `ReferenceField`
|
|
10
12
|
*/
|
|
11
13
|
declare function useList<ContentType>(): UseListReturn<ContentType>;
|
|
12
|
-
export declare type UseListSetQueryProps<ContentType> = SetQueryProps<ContentType>;
|
|
13
|
-
export declare type UseListItem<Item> = Omit<Item, "contentTypeName"> & {
|
|
14
|
-
id: number;
|
|
15
|
-
};
|
|
16
14
|
export interface UseListSetUrlAction {
|
|
17
15
|
queryUrl: string | undefined;
|
|
18
16
|
extra: Record<string, unknown> | undefined;
|
|
19
17
|
}
|
|
18
|
+
export declare type UseListSetQueryProps<ContentType> = SetQueryProps<ContentType>;
|
|
19
|
+
export declare type UseListState<Item> = PickRename<UseFetchStateProps<ListApiQueryResponseProps<ListContentType<Item>>>, "data", "query">;
|
|
20
20
|
export declare type UseListReturn<ContentType> = [
|
|
21
21
|
UseListState<ContentType>,
|
|
22
|
-
(setQuery: UseListSetQueryProps<ContentType>) => void
|
|
22
|
+
(setQuery: UseListSetQueryProps<ContentType>) => void
|
|
23
23
|
];
|
|
24
|
-
export declare type UseListState<Item> = {
|
|
25
|
-
isError: boolean;
|
|
26
|
-
isLoading: boolean;
|
|
27
|
-
msg: {
|
|
28
|
-
code: number;
|
|
29
|
-
msg: string;
|
|
30
|
-
};
|
|
31
|
-
query?: {
|
|
32
|
-
page: number;
|
|
33
|
-
totalItems: number;
|
|
34
|
-
items: Array<UseListItem<Item>>;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
24
|
export { useList };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { QueriedData } from "../types/api-response-fields";
|
|
2
|
+
import { PartiallyRequired } from "../types/utilities";
|
|
3
|
+
import { UseListReturn, UseListSetQueryProps } from "./useList";
|
|
4
|
+
export interface useListWithDefaultStaticPageProps<T> extends Omit<PartiallyRequired<UseListSetQueryProps<T>, "items">, "data"> {
|
|
5
|
+
queriedData?: QueriedData<T>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* `useListWithDefaultStaticPage()`
|
|
9
|
+
*
|
|
10
|
+
* Hook to fetch a list of ContentTypes from the public API that returns the first page statically.
|
|
11
|
+
* This way the build process will write the data into the HTML.
|
|
12
|
+
*
|
|
13
|
+
* @warning
|
|
14
|
+
* Maybe you **don't want** to `use { mode: "list" }` in the schema options
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const [{ query, isError, isFirstFetch, isLoading, msg }, setQuery] =
|
|
18
|
+
* useListWithDefaultStaticPage<MEMBERContentTypeProps>({
|
|
19
|
+
* // This is de default query params for the first page
|
|
20
|
+
* queriedData,
|
|
21
|
+
* items: itemsPerPage,
|
|
22
|
+
* page: 1,
|
|
23
|
+
* fields: ["title", "id"],
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
declare function useListWithDefaultStaticPage<T>(props: useListWithDefaultStaticPageProps<T>): UseListReturn<T>;
|
|
28
|
+
export { useListWithDefaultStaticPage };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,12 +11,12 @@ import { SiteProviderProps } from "./contexts/Site";
|
|
|
11
11
|
import { getComponent } from "./functions";
|
|
12
12
|
import { createCategoryContentTypeSchema, createComponentSchema, createDamDefaultsSchema, createDataPackCategorySchema, createDataPackSchema, createFooterSchema, createHeaderSchema, createLanguagesSchema, createMenuSchema, createModuleCategoriesSchema, createModuleSchema, createPageContentTypeSchema, createSimpleContentTypeSchema, createTemplateSchema, createThemesSchema, createTranslationsSchema } from "./functions/create-schemas";
|
|
13
13
|
import { getLang, getSiteID, getToken } from "./functions/utils";
|
|
14
|
-
import { useContentType, useDataFilters, useGlobalTheme, useGriddoImage, useI18n, useImage, useLink, useList, useNavigation, usePage, useReferenceFieldData, useSession, useSite, useSitemap, useTheme, useThemeColors, useThemeFont, useThemePrimitives, useIsClient, useIsFirstRender, useSSR, useScript } from "./hooks";
|
|
15
|
-
import { UseDataFilterSetUrlAction,
|
|
14
|
+
import { useContentType, useDataFilters, useGlobalTheme, useGriddoImage, useI18n, useImage, useLink, useList, useNavigation, usePage, useReferenceFieldData, useSession, useSite, useSitemap, useTheme, useThemeColors, useThemeFont, useThemePrimitives, useListWithDefaultStaticPage, useIsClient, useIsFirstRender, useSSR, useScript } from "./hooks";
|
|
15
|
+
import { UseDataFilterSetUrlAction, UseDataFiltersReturn, UseDataFiltersSetQueryProps, UseDataFiltersState } from "./hooks/useDataFilters";
|
|
16
16
|
import { GenerateImageChunkProps, ImageChunk, ImageConfig, UseGriddoImageProps, UseGriddoImageReturn } from "./hooks/useGriddoImage";
|
|
17
17
|
import { UseI18nProps } from "./hooks/useI18n";
|
|
18
18
|
import { CloudinaryImageCrop, CloudinaryImageFormat, CloudinaryResponsiveImageProps, UseImageProps } from "./hooks/useImage";
|
|
19
|
-
import {
|
|
19
|
+
import { UseListSetQueryProps, UseListSetUrlAction } from "./hooks/useList";
|
|
20
20
|
import { Hideable } from "./types/global";
|
|
21
21
|
import * as Fields from "./types/api-response-fields";
|
|
22
22
|
import * as Core from "./types/core";
|
|
@@ -25,4 +25,4 @@ import * as SimpleContentTypeFields from "./types/schema-fields/simple-content-t
|
|
|
25
25
|
import * as UIFields from "./types/schema-fields/ui-fields";
|
|
26
26
|
import * as Schema from "./types/schemas";
|
|
27
27
|
import * as Theme from "./types/theme";
|
|
28
|
-
export { PageContext, PageProvider, SiteContext, SiteProvider, SessionContext, SessionProvider, SiteProviderProps, CloudinaryBackgroundImage, CloudinaryImage, Component, GriddoBackgroundImage, GriddoImage, GriddoLink, LdJson, Link, Page, Preview, UseDataFilterSetUrlAction,
|
|
28
|
+
export { PageContext, PageProvider, SiteContext, SiteProvider, SessionContext, SessionProvider, SiteProviderProps, CloudinaryBackgroundImage, CloudinaryImage, Component, GriddoBackgroundImage, GriddoImage, GriddoLink, LdJson, Link, Page, Preview, UseDataFilterSetUrlAction, UseDataFiltersReturn, UseDataFiltersSetQueryProps, UseDataFiltersState, UseListSetQueryProps, CloudinaryImageCrop, CloudinaryImageFormat, CloudinaryResponsiveImageProps, GenerateImageChunkProps, ImageChunk, ImageConfig, UseListSetUrlAction, UseGriddoImageProps, UseGriddoImageReturn, UseI18nProps, UseImageProps, useContentType, useDataFilters, useGlobalTheme, useGriddoImage, useI18n, useImage, useIsClient, useIsFirstRender, useLink, useList, useNavigation, usePage, useReferenceFieldData as useDistributorData, useReferenceFieldData, useScript, useSession, useSite, useSitemap, useSSR, useTheme, useThemeColors, useThemeFont, useThemePrimitives, useListWithDefaultStaticPage, getLang, getSiteID, getToken, getComponent, createCategoryContentTypeSchema, createComponentSchema, createDamDefaultsSchema, createDataPackCategorySchema, createDataPackSchema, createFooterSchema, createHeaderSchema, createLanguagesSchema, createMenuSchema, createModuleCategoriesSchema, createModuleSchema, createPageContentTypeSchema, createSimpleContentTypeSchema, createTemplateSchema, createThemesSchema, createTranslationsSchema, Core, Fields, Schema, Theme, UIFields, SimpleContentTypeFields, PageContentTypeFields, CloudinaryImageProps, ComponentProps, GriddoImageProps, GriddoLinkProps, HLocation, LinkGetProps, ModulePreviewProps, PageProps, PreviewProps, WindowLocation, Hideable, };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import t from"react";function n(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function o(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))}var r={domain:"https://res.cloudinary.com",uploadFolder:"image/upload",fallback404ImageId:"dx-placeholders/fallback-404-image",quality:51,crop:"fill",gravity:"faces:center",format:"auto",loading:"lazy",backgroundLazy:!1,decoding:"auto",responsive:[{breakpoint:null,width:"320px"}]};function i(e){return null==e?void 0:e.toString().split(/cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%/)[0]}function a(e){return Object.fromEntries(Object.entries(e).filter((e=>e[1])))}function l(e){var t;const{damId:o,imageConfig:r}=e,l=n(e,["damId","imageConfig"]),s=(c=r,d=l,Object.assign(Object.assign({},a(c)),a(d)));var c,d;const u=s.crop?`c/${s.crop}`:"",p=s.quality?`q/${s.quality}`:"",g=s.format?`f/${s.format}`:"",f=`${u}/${p}/${s.width?`w/${i(s.width)}`:""}/${s.height?`h/${i(s.height)}`:""}/${s.position?`p/${s.position}`:""}/${(null===(t=s.transforms)||void 0===t?void 0:t.length)?`t/${s.transforms}`:""}/${g}`;return function(e){const[t,n]=e.split(/(^https?:\/\/|^\/\/)/).filter(Boolean);return`${t}${null==n?void 0:n.replace(/\/\/+/g,"/").replace(/\/$/,"")}`}(`${r.domain}/${f}/${o}`)}function s(e){return e&&"string"==typeof e?e.split(/(^[http:|https:|\/\/]*[\S][^\/]*)/)[1]:e}function c(e){if(e&&"string"==typeof e){return e.split("/").filter(Boolean).slice(-1)[0]}return e}function d(e){return e.global}function u(e,t){const n=[];if((null==t?void 0:t.global)&&n.push(e.global),null==t?void 0:t.theme){const o=e.themes.find((e=>e.id===t.theme));o&&n.push(o)}else n.push(...e.themes);return 1===n.length?n[0]:n}const p=e=>{const t={},n=e=>{e.forEach((e=>{e.values.forEach((({cssVar:e,value:n})=>{t[e]=n}))}))};return Array.isArray(e)?n(e):Object.values(e).forEach((e=>{n(e)})),t},g=(e,t)=>e.map((e=>Object.assign(Object.assign({},e),{values:e.values.map((e=>([...e.value.matchAll(/var\((.*?)\)/g)].forEach((n=>{n.length>=2&&(e.value=e.value.replace(n[0],t[n[1]]))})),Object.assign({},e)))).filter((({value:e})=>CSS.supports("color",e)))}))).filter((e=>e.values.length)),f=e=>{const t=(e=>{let t=Object.assign({},p(e.primitives));return"subthemes"in e&&e.subthemes&&e.subthemes.forEach((e=>{t=Object.assign(Object.assign({},t),p(e.primitives))})),t})(e);if(Array.isArray(e.primitives))return g(e.primitives,t);const{common:n,light:o,dark:r}=e.primitives;return{common:n&&g(n,t),light:g(o,t),dark:g(r,t)}},m=(e,t)=>e.filter((e=>Array.isArray(t)?t.includes(e.id):e.id===t)),v=(e,t)=>{if(Array.isArray(e.primitives))return m(e.primitives,t);const{common:n,light:o,dark:r}=e.primitives;return{common:n&&m(n,t),light:m(o,t),dark:m(r,t)}},h=e=>{if(Array.isArray(e.primitives))return e.primitives.length;const{common:t,light:n,dark:o}=e.primitives;return(null==t?void 0:t.length)||n.length||o.length},b=(e,t,n)=>{const o=void 0===n;return e.map((e=>Object.assign(Object.assign({},e),{primitives:o?f(e):v(e,n),subthemes:"subthemes"in e&&e.subthemes&&e.subthemes.map((e=>Object.assign(Object.assign({},e),{primitives:o?f(e):v(e,n)}))).filter((e=>h(e)&&(!t||e.id===t)))||[]}))).filter((e=>h(e)||e.subthemes.length))};function y(e,t){const n=[];if((null==t?void 0:t.global)&&n.push(e.global),null==t?void 0:t.theme){const o=e.themes.find((e=>e.id===t.theme));o&&n.push(o)}else n.push(...e.themes);const o=((e,t)=>b(e,t))(n,null==t?void 0:t.subtheme);return o}function j(e,t){const n=[],{global:o,primitive:r,subtheme:i}=t;if(o&&n.push(e.global),t.theme){const o=e.themes.find((e=>e.id===t.theme));o&&n.push(o)}else n.push(...e.themes);return((e,t,n)=>b(e,n,t))(n,r,i)}function O(e,t){return j(e,Object.assign(Object.assign({},t),{primitive:["fontFamily","fontSize"]}))}const S="undefined"!=typeof window;function $(e,t){return(null==t?void 0:t.startsWith(`${e}#`))?`#${t.split("#")[1]}`:t}function E(){const e=localStorage.getItem("persist:app");if(!e||!S)return null;const t=JSON.parse(e);let{token:n}=t;n=JSON.parse(n);return{Authorization:`bearer ${n}`}}function w(){var e;const t=localStorage.getItem("persist:root");if(!S||!t)return 1;const n=JSON.parse(t);let{sites:o}=n;o=JSON.parse(o);return null===(e=o.currentSiteInfo)||void 0===e?void 0:e.id}function x(){const e=localStorage.getItem("langID");return!(!S||!e)&&parseInt(e)}function k({obj:e,searchKey:t,resultsBuffer:n=[],unique:o=!0}={}){if(!e)return[];const r=n;return Object.keys(e).forEach((n=>{const o=e[n];n===t&&"object"!=typeof o?r.push(o):"object"==typeof o&&o&&k({obj:o,searchKey:t,resultsBuffer:r})})),o?[...new Set(r)]:r}function _({baseUrl:e,params:t}){const n=Object.keys(t).map((e=>function(e){return Array.isArray(e)&&e.length>0||"number"==typeof e||"string"==typeof e}(t[e])?`${e}/${t[e]}`:"")).join("/");return`${e}${o=n,o.split("/").filter(Boolean).join("/")}`;var o}const C=e.createContext({translations:{}});function I(t){const{children:n,translations:o}=t;return e.createElement(C.Provider,{value:{translations:o}},n)}const L={linkComponent:function(t){const{children:o}=t,r=n(t,["children"]);return e.createElement("a",Object.assign({"data-griddo":"link"},r),o)},navigate:()=>null},z=e.createContext(L);function P(t){const{children:o}=t,r=n(t,["children"]),i=Object.assign(Object.assign({},L),r);return e.createElement(z.Provider,{value:i},o)}const U=e.createContext({});function N(t){const{children:o}=t,r=n(t,["children"]),i=e.useContext(z),a=null==i?void 0:i.translations;return e.createElement(U.Provider,{value:Object.assign({},r)},e.createElement(I,{translations:a},o))}function q(){var t;const n=e.useContext(U);if(!n)return console.warn("Griddo: You forgot to put <PageProvider>."),{};const o=null===(t=n.pageLanguages)||void 0===t?void 0:t.filter((e=>e.isLive));return Object.assign(Object.assign({},n),{pageLanguages:o})}function R(t){const[n,o]=e.useState(null),{order:r,quantity:i,source:a,mode:l,fixed:s,filter:c,allLanguages:d,fullRelations:u=!1}=t||{},{apiUrl:p}=q();return e.useEffect((()=>{const e=!!x(),t=w()||"global",n=`${p}/site/${t}/distributor`,g=function(e){const t=x();return{method:"POST",mode:"cors",cache:"no-cache",headers:Object.assign({"Content-Type":"application/json",lang:null==t?void 0:t.toString()},E()),redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e)}}("auto"===l?{mode:l,order:r,quantity:i,source:a,filter:c,fullRelations:u,allLanguages:d}:{mode:l,fixed:s,fullRelations:u});e&&fetch(n,g).then((e=>e.json())).then((e=>o(e))).catch((e=>{console.error("Error:",e)}))}),[l,r,i,s,c,a,u,d]),n}function A({data:e,queriedData:t}){return e&&R(e)||t}const T=e.createContext(null);function M(t){return e.createElement(T.Provider,{value:{isNavigation:!0}},t.children)}const D=t.createContext([{},()=>null]),F=e=>{const{children:n}=e,o=H();return t.createElement(D.Provider,{value:o},n)},H=()=>{const[e,n]=t.useState({});return[e,e=>n((t=>Object.assign(Object.assign({},t),e)))]};function B(){const t=e.useContext(z),n=null==t?void 0:t.publicApiUrl,o=null==t?void 0:t.siteId,r=null==t?void 0:t.renderer,{languageId:i}=q(),[a,l]=e.useState(),[s,c]=e.useState(),[d,u]=e.useState(!0),[p,g]=e.useState(!1),[f,m]=e.useState({}),v="editor"===r;return e.useEffect((()=>{if(!s)return;s&&(()=>{u(!0);const{queryUrl:e}=s;fetch(e).then((e=>e.json())).then((e=>{u(!1),g(!1),200!==(null==e?void 0:e.code)&&void 0!==(null==e?void 0:e.code)?(g(!0),m(e)):(g(!1),l(Object.assign({},e)))})).catch((e=>{u(!1),g(!0),console.log(e)}))})()}),[s]),[{query:a,isLoading:d,isError:p,msg:f},function({apiUrl:e=`${n}`,cached:t,data:r,lang:a=i,site:l=o}){if(!r)return;const s=v?(new Date).valueOf():t,d=_({baseUrl:`${e}/filters/${`${r.source||r.fixed}/`}`,params:{site:l,lang:a,cached:s}});return c({queryUrl:d})}]}const G={jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",png:"image/png",avif:"image/avif",webp:"image/webp"},V={quality:75,crop:"cover",loading:"lazy",decoding:"auto",blurSize:"8px",blurCSSTransition:"filter 0s ease-in-out",formats:["webp"]};function J(t){var{url:o}=t,r=n(t,["url"]);if(!o)return{};const a=e.useContext(z),d=(null==a?void 0:a.griddoDamDefaults)||{},u=s(o),p=c(o),g=Object.assign(Object.assign(Object.assign(Object.assign({},V),d),r),{format:"jpeg",domain:u});void 0===g.responsive&&(g.responsive=[{width:g.width,height:g.height,quality:g.quality,crop:g.crop,position:g.position,transforms:g.transforms}]);const f=g.responsive.map((({width:e,height:t,quality:n,crop:o,position:r,transforms:a})=>`${l({damId:p,imageConfig:g,quality:n,crop:o,width:e,height:t,position:r,transforms:a})} ${e?`${i(e)}w`:""}`.trim())),m=function(e){const t=e.filter((e=>null===e.breakpoint));return[...e.filter((e=>null!==e.breakpoint)),...t]}(g.responsive.reverse()).map(((e,t)=>g.responsive&&t<g.responsive.length-1?`(min-width: ${e.breakpoint}) ${e.width}`:`${e.width}`)).join(", "),v=f.map((e=>null==e?void 0:e.split(" ")[0])),h=g.responsive[0],b=`${l(Object.assign({damId:p,imageConfig:g},h))}`;return{type:(null==g?void 0:g.format)?G[null==g?void 0:g.format]:G.jpeg,srcSet:f,srcSetURL:v,src:b,sizes:m,webpFallback:W({srcSet:f,srcSetURL:v,format:"jpeg"}),jpeg:W({srcSet:f,srcSetURL:v,format:"jpeg"}),webp:W({srcSet:f,srcSetURL:v,format:"webp"}),avif:W({srcSet:f,srcSetURL:v,format:"avif"}),png:W({srcSet:f,srcSetURL:v,format:"png"}),gif:W({srcSet:f,srcSetURL:v,format:"gif"}),svg:W({srcSet:f,srcSetURL:v,format:"svg"})}}function W({srcSet:e,srcSetURL:t,format:n}){return{type:G[n],srcSet:null==e?void 0:e.map((e=>null==e?void 0:e.replace(/f\/\w+/,`f/${n}`))),srcSetURL:null==t?void 0:t.map((e=>null==e?void 0:e.replace(/f\/\w+/,`f/${n}`)))}}const K=()=>e.useContext(z);function Y(t){const n=null==t?void 0:t.locale,o=e.useContext(C),{siteLangs:r}=K(),{languageId:i}=q(),a=null==o?void 0:o.translations;a||console.warn("Griddo: <SiteProvider> needs to have the prop translations"),void 0===r&&console.warn("Griddo: <SiteProvider> needs to have the prop siteLangs set with the site languages"),i||console.warn("Griddo: <PageProvider> needs to have the prop languageId set with the page language id"),function(e,t){return!!(null==e?void 0:e.find((e=>e.id===t)))}(r,i)||console.warn(`Griddo: languageId ${i} doesn't exist in this site`),void 0===n||function(e,t){return!!(null==e?void 0:e.find((e=>(null==e?void 0:e.locale)===t)))}(r,n)||console.warn(`Griddo: locale ${n} doesn't exist in this site`);const l=n||function(e,t){var n;return null===(n=null==e?void 0:e.find((e=>e.id===t)))||void 0===n?void 0:n.locale}(r,i),s=a&&l?a[l]:void 0;return l&&i||console.warn("Griddo: You forgot to put <I18nProvider> or exists an error in language id."),{getTranslation:(e,t="")=>s&&s[e]?s[e]:t,getNestedTranslation:(e,t="")=>s&&function(e,t){return null==e?void 0:e.split(".").reduce(((e,t)=>e[t]?e[t]:""),t)}(e,s)||t}}const Z={domain:"https://res.cloudinary.com",uploadFolder:"image/upload",fallback404ImageId:"dx-placeholders/fallback-404-image",quality:51,crop:"fill",gravity:"center",format:"auto",loading:"lazy",backgroundLazy:!1,decoding:"auto",responsive:[{breakpoint:null,width:"320px"}]};function Q(e){var t,o,{publicId:r}=e,a=n(e,["publicId"]);const{cloudinaryCloudName:l,cloudinaryDefaults:s}=K(),c=Object.assign(Object.assign(Object.assign({},Z),s),a),d=`${c.domain}/${l}/${c.uploadFolder}`,u=`${X({root:d,imageConfig:Object.assign(Object.assign({},c),{quality:20,width:"512"})})}/${c.fallback404ImageId}`,p=null===(t=null==c?void 0:c.responsive)||void 0===t?void 0:t.map((({width:e,height:t,quality:n,crop:o})=>`${X({root:d,imageConfig:Object.assign({quality:n,crop:o,width:e,height:t},c)})}/${r} ${i(e)}w`)),g=function(e){if(!e)return[];const t=e.filter((e=>null===e.breakpoint));return[...e.filter((e=>null!==e.breakpoint)),...t]}(null===(o=null==c?void 0:c.responsive)||void 0===o?void 0:o.reverse()).map(((e,t)=>{var n;return c.responsive&&t<(null===(n=null==c?void 0:c.responsive)||void 0===n?void 0:n.length)-1?`(min-width: ${e.breakpoint}) ${e.width}`:`${e.width}`})).join(", "),f=null==p?void 0:p.map((e=>e.split(" ")[0])),m=(null==c?void 0:c.responsive)&&(null==c?void 0:c.responsive[0])||[];return{src:`${X(Object.assign({root:d,imageConfig:c},m))}/${r}`,srcSet:p,sizes:g,fallbackSrcImage:u,srcSetURL:f}}function X(e){const{root:t,imageConfig:n}=e,o=(null==n?void 0:n.crop)?`c_${n.crop}`:"",r=(null==n?void 0:n.quality)?`q_${n.quality}`:"",a=(null==n?void 0:n.gravity)?`g_${n.gravity}`:"",l=(null==n?void 0:n.format)?`f_${n.format}`:"",s=(null==n?void 0:n.width)?`w_${i(n.width)}`:"",c=(null==n?void 0:n.height)?`h_${i(n.height)}`:"",d=(null==n?void 0:n.ar)?`ar_${n.ar}`:"";const u=`${t}/${`${o},${a},${l},${r},${s},${c},${d}`.split(/._null|._undefined|,{1,}|._,|._$|undefined|null/).filter(Boolean).join(",")}`;return console.log(u),u}function ee(){const[t,n]=e.useState(!1);return e.useEffect((()=>{n(!0)}),[]),t}function te(){const t=e.useRef(!0);return t.current?(t.current=!1,!0):t.current}function ne(){const t=e.useContext(z);return null==t?void 0:t.linkComponent}const oe=["or","and"];function re(){const{publicApiUrl:t,siteId:n,renderer:o}=K(),{languageId:r}=q(),[i,a]=e.useState(),[l,s]=e.useState(),[c,d]=e.useState(!0),[u,p]=e.useState(!1),[g,f]=e.useState({}),m="editor"===o;return e.useEffect((()=>{if(!l)return;l&&(e=>{d(!0);const{queryUrl:t,extra:n}=e;t&&n&&fetch(t).then((e=>e.json())).then((e=>{d(!1),p(!1),200!==(null==e?void 0:e.code)&&void 0!==(null==e?void 0:e.code)?(p(!0),f(e)):(p(!1),a(Object.assign(Object.assign({},e),{totalItems:(null==e?void 0:e.totalItems)||(null==n?void 0:n.totalItems)||null})))})).catch((e=>{d(!1),p(!0),console.log(e)}))})(l)}),[l]),[{query:i,isLoading:c,isError:u,msg:g},function({apiUrl:e=`${t}`,cached:o,data:i,exclude:a,fields:l,filterIds:c,filterOperator:d,globalOperator:u,items:p=10,lang:g=r,operator:f,page:v=1,relations:h,search:b,site:y=n,includePending:j,allLanguages:O}){var S,$;if(!i)return;const E=m?(new Date).valueOf().toString():o,w=null==b?void 0:b.replace(/\s/g,"+"),x="auto"===i.mode,k="manual"===i.mode,C=i.source||i.fixed||[],I=x?"/list/":"/list/fixed/",L=null===(S=i.filter)||void 0===S?void 0:S.map((e=>"object"==typeof e?e.id:e)),z=C.length<1,P=_({baseUrl:`${e}${I}${C}/`,params:{site:y,lang:g,get:l,page:v,items:p,order:x?i.order:null,filter:[...L||[],...c||[]],maxItems:i.quantity,search:w,operator:ie(f)?f:null,filterOperator:ie(d)?d:null,globalOperator:ie(u)?u:null,exclude:Array.isArray(a)?a:null,relations:h?"on":null,includePending:j?"on":null,allLanguages:O?"on":null,cached:E}});return s(k&&z?{queryUrl:void 0,extra:void 0}:{queryUrl:P,extra:{totalItems:"manual"===i.mode&&(null===($=i.fixed)||void 0===$?void 0:$.length)}})}]}function ie(e){return!!e&&oe.includes(e.toLowerCase())}function ae(){return e.useContext(T)}const le={};function se(t,n){const[o,r]=e.useState((()=>{var e;return!t||(null==n?void 0:n.shouldPreventLoad)?"idle":"undefined"==typeof window?"loading":null!==(e=le[t])&&void 0!==e?e:"loading"}));return e.useEffect((()=>{var e,o;if(!t||(null==n?void 0:n.shouldPreventLoad))return;const i=le[t];if("ready"===i||"error"===i)return void r(i);const a=function(e){const t=document.querySelector(`script[src="${e}"]`),n=null==t?void 0:t.getAttribute("data-status");return{node:t,status:n}}(t);let l=a.node;if(l)r(null!==(o=null!==(e=a.status)&&void 0!==e?e:i)&&void 0!==o?o:"loading");else{l=document.createElement("script"),l.src=t,l.async=!0,l.setAttribute("data-status","loading"),document.body.appendChild(l);const e=e=>{const t="load"===e.type?"ready":"error";null==l||l.setAttribute("data-status",t)};l.addEventListener("load",e),l.addEventListener("error",e)}const s=e=>{const n="load"===e.type?"ready":"error";r(n),le[t]=n};return l.addEventListener("load",s),l.addEventListener("error",s),()=>{l&&(l.removeEventListener("load",s),l.removeEventListener("error",s)),l&&(null==n?void 0:n.removeOnUnmount)&&l.remove()}}),[t,null==n?void 0:n.shouldPreventLoad,null==n?void 0:n.removeOnUnmount]),o}const ce=()=>t.useContext(D);function de(){const[t,n]=e.useState(),[r,i]=e.useState(!0),{apiUrl:a,header:l,footer:s,fullPath:c}=q(),{siteMetadata:d}=K();e.useEffect((()=>{u()}),[]);const u=()=>o(this,void 0,void 0,(function*(){var e,t,o;const r={};if(r.topMenu=[{label:null==d?void 0:d.title,children:null===(e=l.topMenu)||void 0===e?void 0:e.elements,url:{linkToURL:!!c&&`${c.domainUrl}${c.site}`}}],!d){const e=w(),t=`${a}/site/${e}`,n=yield fetch(t,function(){const e=x();return{method:"GET",mode:"cors",cache:"no-cache",headers:Object.assign({"Content-Type":"application/json",lang:e},E())}}()),{name:o}=yield n.json();r.topMenu[0].label=o,r.siteName=o}r.mainMenu=null===(t=null==l?void 0:l.mainMenu)||void 0===t?void 0:t.elements;const u=null===(o=null==s?void 0:s.legalMenu)||void 0===o?void 0:o.elements;r.footerMenu=[{label:null,children:u}],r.header=l,r.footer=s,n(r),i(!1)}));return[t,r]}function ue(){const e="undefined"!=typeof window&&window.document&&window.document.documentElement;return{isBrowser:e,isServer:!e}}function pe(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}function ge(t){var{backgroundRepeat:o="no-repeat",backgroundSize:i="cover",backgroundPosition:a="50% 50%",children:l,overlayColor:s=null,overlayOpacity:c=0,overlayTransition:d="2s",ratio:u,publicId:p,src:g,customLazyClassName:f="lazy",lazy:m}=t,v=n(t,["backgroundRepeat","backgroundSize","backgroundPosition","children","overlayColor","overlayOpacity","overlayTransition","ratio","publicId","src","customLazyClassName","lazy"]);const{cloudinaryDefaults:h}=K(),b=Object.assign(Object.assign(Object.assign(Object.assign({},h),r),v),{backgroundLazy:h.backgroundLazy||r.backgroundLazy||m}),{srcSetURL:y}=Q({responsive:[...b.responsive],quality:b.quality,crop:b.crop,gravity:b.gravity,format:b.format,publicId:p,ar:u}),j=g?[g]:y,O=g?[]:b.responsive.map((e=>e.breakpoint)),S=`Griddo-BgImage--${Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,8)}`,$=b.backgroundLazy?f:"",E=function(e,t=0){return Array(e).fill(0).map(((e,n)=>n+t))}(j.length-1,1).map((e=>`@media (min-width: ${O[e]}) {\n .${S} {\n background-image: url(${j[e]});\n }\n }\n `)).join("");return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{__html:`\n\n .${S} {\n background-repeat: ${o};\n background-position: ${a};\n background-size: ${i};\n background-image: url(${j[0]});\n }\n\n ${E}\n\n .${S}::before {\n transition: all ${d} ease;\n background-color: rgba(0, 0, 0, ${c});\n ${s?`\n background-color: ${s};\n opacity: ${c};\n `:""}\n }`}}),e.createElement("div",{className:`Griddo-BgImage ${S} ${$}`},l))}function fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function me(e,t){return e(t={exports:{}},t.exports),t.exports}pe('.Griddo-BgImage {\n\tdisplay: flex;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.Griddo-BgImage::before {\n\tz-index: 0;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tcontent: "";\n\tdisplay: block;\n}\n\n.Griddo-BgImage.lazy {\n\tbackground-image: none;\n}\n');var ve=Symbol.for("react.element"),he=Symbol.for("react.fragment"),be=Object.prototype.hasOwnProperty,ye=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,je={key:!0,ref:!0,__self:!0,__source:!0};function Oe(e,t,n){var o,r={},i=null,a=null;for(o in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)be.call(t,o)&&!je.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===r[o]&&(r[o]=t[o]);return{$$typeof:ve,type:e,key:i,ref:a,props:r,_owner:ye.current}}var Se={Fragment:he,jsx:Oe,jsxs:Oe},$e=me((function(e){e.exports=Se})),Ee=me((function(e,n){n.__esModule=!0,n.default=void 0;var o=["className","children","ratio","style"];function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r.apply(this,arguments)}var i="--aspect-ratio";class a extends t.Component{constructor(){super(...arguments),this.node=null,this.setNode=e=>{this.node=e}}componentDidUpdate(){if(this.node){var{node:e}=this;e.style.getPropertyValue(i)||e.style.setProperty(i,"("+this.props.ratio+")")}}render(){var e=this.props,{className:t,children:n,ratio:a,style:l}=e,s=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,o),c=r({},l,{[i]:"("+a+")"});return(0,$e.jsx)("div",r({className:t,ref:this.setNode,style:c},s,{children:n}))}}a.defaultProps={className:"react-aspect-ratio-placeholder",ratio:1};var l=a;n.default=l}));fe(Ee);var we=me((function(e,t){t.__esModule=!0,t.default=void 0;var n=["className","children","ratio","style"];function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}var r="react-aspect-ratio-placeholder";var i=function(e){var{className:t=r,children:i,ratio:a=1,style:l}=e,s=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,n),c=o({},l,{"--aspect-ratio":"("+a+")"});return(0,$e.jsx)("div",o({className:t,style:c},s,{children:i}))};t.default=i}));fe(we);var xe=me((function(e,t){t.__esModule=!0,t.default=t.AspectRatio=void 0;var n=r(Ee),o=r(we);function r(e){return e&&e.__esModule?e:{default:e}}var i=n.default;t.default=i;var a=o.default;t.AspectRatio=a}));fe(xe);var ke=xe.AspectRatio;function _e(t){const{alt:n,width:o,height:i,ratio:a,fixed:l,publicId:s,src:c,objectFit:d="cover"}=t,{cloudinaryDefaults:u}=K(),p=Object.assign(Object.assign(Object.assign({},r),u),t),{srcSet:g,sizes:f,src:m}=Q({crop:p.crop,format:p.format,gravity:p.gravity,quality:p.quality,sizes:p.sizes,responsive:p.responsive,ar:a,publicId:s}),v={alt:n,width:o,height:i,loading:p.loading,style:{objectFit:d},decoding:p.decoding},h=Object.assign(Object.assign({},v),{src:c}),b=Object.assign(Object.assign({},v),{srcSet:g,sizes:f,src:m}),y=c?h:b,j=()=>e.createElement("img",Object.assign({},y));return l?e.createElement(j,null):e.createElement(ke,{ratio:a,style:{maxWidth:"100%",alignSelf:"normal"}},e.createElement(j,null))}pe('[style*="--aspect-ratio"] > img {\n height: auto;\n}\n\n[style*="--aspect-ratio"] {\n position: relative;\n}\n\n[style*="--aspect-ratio"] > :first-child {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n[style*="--aspect-ratio"]::before {\n content: "";\n display: block;\n width: 100%;\n}\n\n@supports not (aspect-ratio: 1/1) {\n [style*="--aspect-ratio"]::before {\n height: 0;\n padding-bottom: calc(100% / (var(--aspect-ratio)));\n }\n}\n\n@supports (aspect-ratio: 1/1) {\n [style*="--aspect-ratio"]::before {\n aspect-ratio: calc(var(--aspect-ratio));\n }\n}\n');const Ce=(e,t)=>{const n=t.component;return void 0!==e[n]?e[n]:(console.warn(`The component <${n}> doesn't exist inside ${JSON.stringify(Object.keys(e))}`),null)},Ie=t=>e.createElement("svg",Object.assign({width:24,height:24,fill:"none"},t),e.createElement("path",{d:"M16 9v10H8V9h8zm-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"})),Le=t=>e.createElement("svg",Object.assign({width:24,height:24,fill:"none"},t),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5263 2.3158H4.78947C3.80526 2.3158 3 3.12106 3 4.10527V16.6316H4.78947V4.10527H15.5263V2.3158ZM18.2105 5.89475H8.36842C7.38421 5.89475 6.57894 6.70001 6.57894 7.68422V20.2105C6.57894 21.1947 7.38421 22 8.36842 22H18.2105C19.1947 22 20 21.1947 20 20.2105V7.68422C20 6.70001 19.1947 5.89475 18.2105 5.89475ZM8.36843 20.2105H18.2105V7.68422H8.36843V20.2105Z"}));pe('.--not-selected-nameplate {\n\tdisplay: none;\n}\n\n.--selected,\n.--selected-header-footer,\n.--selected-nameplate {\n\tdisplay: block;\n\tposition: relative;\n}\n\n.--selected-header-footer::before,\n.--selected::before {\n\tposition: absolute;\n\theight: calc(100% - 8px);\n\twidth: calc(100% - 8px);\n\tpadding-bottom: 4px;\n\tcontent: "";\n\tborder: 4px solid rgb(80, 87, 255);\n\tpointer-events: none;\n\tz-index: 99;\n}\n\n.--selected-header-footer::after {\n\tposition: absolute;\n\tpadding: 8px 16px;\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\ttop: -34px;\n\tleft: 50%;\n\ttransform: translate(-50%, 0px);\n\tcontent: attr(data-text);\n\tz-index: 9;\n\tbackground: rgb(80, 87, 255);\n\tcolor: rgb(255, 255, 255);\n\tfont-family: "Source Sans Pro", sans-serif;\n\tfont-weight: 600;\n\tfont-size: 14px;\n\tline-height: 18px;\n}\n\n.--selected-nameplate {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: absolute;\n\tpadding: 4px 16px;\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\ttop: -34px;\n\tleft: 50%;\n\ttransform: translate(-50%, 0px);\n\tz-index: 9;\n\tbackground: rgb(80, 87, 255);\n\tcolor: rgb(255, 255, 255);\n\tfont-family: "Source Sans Pro", sans-serif;\n\tfont-weight: 600;\n\tfont-size: 14px;\n\tline-height: 18px;\n\ttext-align: center;\n}\n\n.span-svg-action {\n\tpadding-left: 4px;\n}\n\n.span-svg-action:first-child {\n\tpadding-left: 16px;\n}\n\n.svg-action {\n\tfill: #dadada;\n}\n\n.svg-action:hover {\n\tfill: #fff;\n\tcursor: pointer;\n}\n');const ze=t=>{const n=e.useRef(null),[o,r]=e.useState(0),{selectEditorID:i,moduleActions:a}=e.useContext(z),{selectedEditorID:l,editorID:s,component:c,children:d,isSelectionAllowed:u}=t,p=["Header","Footer"].includes(c);e.useEffect((()=>{n&&n.current&&r(n.current.scrollHeight)}),[d]),e.useEffect((()=>{m&&f()}),[n]);const g=e=>{(s||0===s)&&"undefined"!=typeof window&&u&&i&&i(t,void 0,e)},f=()=>{if(!n.current)return;const e=n.current.style.position,t=n.current.style.top;n.current.style.position="relative",n.current.style.top="-34px",n.current.scrollIntoView({behavior:"smooth",block:"nearest"}),n.current.style.top=t,n.current.style.position=e;0===n.current.offsetTop&&(n.current.style.marginTop="36px")},m=!!l&&l===s;m&&f();return e.createElement(e.Fragment,null,"Header"===c&&e.createElement("style",{dangerouslySetInnerHTML:{__html:`\n [data-text="Header"].--selected::before {\n height: ${o-8}px;\n }`}}),p&&e.createElement("span",{className:""+(m?"--selected-header-footer":""),"data-text":c,ref:n,onClick:g},d),!p&&e.createElement("span",{className:""+(m?"--selected":""),"data-text":c,ref:n,onClick:g},e.createElement("span",{className:""+(m?"--selected-nameplate":"--not-selected-nameplate")},c,e.createElement("span",{className:"span-svg-action",onClick:e=>{e.stopPropagation(),a&&s&&a.duplicateModuleAction(s)}},e.createElement(Le,{className:"svg-action"})),e.createElement("span",{className:"span-svg-action",onClick:e=>{e.stopPropagation(),a&&s&&a.deleteModuleAction(s)}},e.createElement(Ie,{className:"svg-action"}))),d))};function Pe(t){var o,{libComponents:r}=t,i=n(t,["libComponents"]);const{component:a,editorID:l,type:s,parentEditorID:c}=i,{renderer:d}=K(),u=null===(o=ae())||void 0===o?void 0:o.isNavigation,p="undefined"!=typeof window?parseInt(localStorage.getItem("selectedID")||"0"):null,g=Ce(r,Object.assign({},i)),f=u&&!["Header","Footer"].includes(a);return"editor"===d?e.createElement(F,null,e.createElement(ze,{selectedEditorID:p,isSelectionAllowed:!f,editorID:l,component:a,type:s,parentEditorID:c},g?e.createElement(g,Object.assign({},i)):e.createElement(e.Fragment,null))):"preview"===d?e.createElement(F,null,g&&e.createElement(g,Object.assign({},i))):g&&e.createElement(g,Object.assign({},i))}pe('.griddo-background-image {\n\tdisplay: flex;\n\twidth: 100%;\n\theight: 100%;\n\n\tposition: relative;\n\n\tbackground-repeat: no-repeat;\n\tbackground-size: cover;\n\tbackground-position: 50% 50%;\n}\n\n.griddo-background-image--lazy .griddo-background-image {\n\tbackground: none !important;\n}\n\n.griddo-background-image::before {\n\tz-index: 0;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tcontent: "";\n\tdisplay: block;\n\ttransition: all var(--veil-transition-time) var(--veil-transition-easing);\n\tbackground-color: var(--veil-opacity);\n}\n');const Ue=e.forwardRef((({children:t,format:n,backgroundSize:o,veilOpacity:r=.5,veilColor:i="#000033",veilTransitionTime:a="2s",veilTransitionEasing:d="easing",url:u,src:p,responsive:g,className:f,style:m,quality:v,lazyOffset:h="200px",loading:b},y)=>{const{griddoDamDefaults:j}=K(),O=e.useRef(null),S=s(u);e.useEffect((()=>{var e;if(IntersectionObserver){if(O.current){let e=new IntersectionObserver((t=>t.forEach((t=>{var n;t.isIntersecting&&(null===(n=O.current)||void 0===n||n.classList.remove("griddo-background-image--lazy"),e=e.disconnect())}))),{rootMargin:`0px 0px ${h} 0px`});return e.observe(O.current),()=>e=e&&e.disconnect()}}else null===(e=O.current)||void 0===e||e.classList.remove("griddo-background-image--lazy")}),[]);const $=g&&Object.fromEntries(Object.keys(g).map((e=>[e,{url:`url("${l({damId:c(u),imageConfig:Object.assign(Object.assign(Object.assign({},j),{quality:v,format:n,domain:S}),g[e])})}")`,customProperty:g[e].customProperty}]))),E=g&&Object.fromEntries(Object.keys(g).map(((e,t)=>[$[e].customProperty?`${$[e].customProperty}`:`--image-${t}`,$[e].url]))),w=p?{"--image-default":`url(${p})`}:E;return e.createElement("div",{ref:O,"data-griddo":"loading-ref",className:""+("lazy"===b?"griddo-background-image--lazy":"")},e.createElement("div",{"data-griddo":"image-ref",ref:y,className:`${f} griddo-background-image`,style:Object.assign(Object.assign(Object.assign({},m),{"--veil-opacity":`${i}${Math.round(255/(1/r)).toString(16)}`,"--veil-transition-time":a,"--veil-transition-easing":d,"--background-size":o}),w)},t))}));pe('[style*="--aspect-ratio"] [data-image="griddo"] {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 100%;\n\twidth: 100%;\n\tobject-fit: cover;\n}\n');const Ne=e.forwardRef(((t,o)=>{var{width:r,height:i,ratio:a,fixed:l,url:s,loading:c,decoding:d,responsive:u,quality:p,crop:g,format:f,formats:m,position:v,transforms:h}=t,b=n(t,["width","height","ratio","fixed","url","loading","decoding","responsive","quality","crop","format","formats","position","transforms"]);if(!s)return null;const{griddoDamDefaults:y}=K()||{},j={loading:c||(null==y?void 0:y.loading),decoding:d||(null==y?void 0:y.decoding),quality:p||(null==y?void 0:y.quality),crop:g||(null==y?void 0:y.crop),format:f,formats:m||(null==y?void 0:y.formats),position:v,transforms:h},{src:O,sizes:S,avif:$,jpeg:E,gif:w,webp:x,svg:k}=J({url:s,crop:j.crop,format:j.format,quality:j.quality,responsive:u,position:j.position,transforms:j.transforms,width:r,height:i}),_=()=>{var t;return e.createElement("img",Object.assign({"data-image":"griddo",loading:c||j.loading,decoding:d||j.decoding,srcSet:u&&(null===(t=null==w?void 0:w.srcSet)||void 0===t?void 0:t.join(",")),sizes:u&&S,src:(null==w?void 0:w.srcSetURL)&&w.srcSetURL[0],width:r,height:i,fetchpriority:b.fetchpriority},b))},C=()=>e.createElement("img",Object.assign({"data-image":"griddo",loading:c||j.loading,decoding:d||j.decoding,src:(null==k?void 0:k.srcSetURL)&&k.srcSetURL[0],width:r,height:i,fetchpriority:b.fetchpriority},b)),I=()=>{var t,n,a,l,s;return e.createElement("picture",{ref:o},(null===(t=j.formats)||void 0===t?void 0:t.includes("avif"))&&e.createElement("source",{srcSet:null===(n=null==$?void 0:$.srcSet)||void 0===n?void 0:n.join(","),sizes:u&&S,type:"image/avif"}),(null===(a=j.formats)||void 0===a?void 0:a.includes("webp"))&&e.createElement("source",{srcSet:null===(l=null==x?void 0:x.srcSet)||void 0===l?void 0:l.join(","),sizes:u&&S,type:"image/webp"}),e.createElement("img",Object.assign({"data-image":"griddo",loading:c||j.loading,decoding:d||j.decoding,sizes:u&&S,srcSet:null===(s=null==E?void 0:E.srcSet)||void 0===s?void 0:s.join(","),src:O,width:r,height:i,fetchpriority:b.fetchpriority},b)))};return s?"svg"===f?e.createElement(C,null):"gif"===f?e.createElement(_,null):l||!u?e.createElement(I,null):e.createElement(ke,{ratio:a,style:{maxWidth:"100%",alignSelf:"normal"}},e.createElement(I,null)):null})),qe="pre",Re="pro";function Ae(t){var{activeClassName:o="",activeStyle:r={},style:i={},children:a,getProps:l,partiallyActive:s,state:c,url:d,title:u,className:p=""}=t,g=n(t,["activeClassName","activeStyle","style","children","getProps","partiallyActive","state","url","title","className"]);const{renderer:f,linkComponent:m}=K(),{fullPath:v}=q(),h="editor"===f,b=null==d?void 0:d.href,y=null==d?void 0:d.linkToURL,j=(null==d?void 0:d.newTab)||!1,O=(null==d?void 0:d.noFollow)||!1,S=!(null==d?void 0:d.linkToURL)&&!(null==d?void 0:d.href),$=y===`${null==v?void 0:v.domainUrl}${null==v?void 0:v.compose}`,E=function(e){var t;return(null===(t=null==e?void 0:e.domainUrl)||void 0===t?void 0:t.endsWith(`/${e.domain}`))?Re:qe}(v),w=function(e,t){return`${t?"nofollow":""} ${e?"noreferrer":""}`.trim()}(j,O),x=function(e){return e?"_blank":"_self"}(j),k=v&&function({env:e,fullPath:t,to:n}){var o,r,i;if("string"!=typeof n)return n;if(e===qe){const e=null===(o=null==t?void 0:t.domainUrl)||void 0===o?void 0:o.split((null==t?void 0:t.domain)||"").join("");return(null===(r=null==n?void 0:n.split(e||""))||void 0===r?void 0:r.join(""))||n}return e===Re&&(null===(i=null==n?void 0:n.split((null==t?void 0:t.domainUrl)||""))||void 0===i?void 0:i.join(""))||n}({env:E,fullPath:v,to:y}),_=h||S?"":k;return b||j?e.createElement("a",Object.assign({"data-link":"anchor",target:x,rel:w,href:b||y,className:p,title:u},g),a):e.createElement(m,Object.assign({rel:w,target:x,to:_,getProps:l,partiallyActive:s,state:c,activeStyle:r,activeClassName:o,title:h?k:u,style:$?r:i,className:$?`${p} ${o||""}`.trim():p},g),a)}function Te(t){const{data:n}=t;return e.createElement("script",{dangerouslySetInnerHTML:{__html:`(function(){\n const ldJsonScript = document.createElement('script');\n ldJsonScript.setAttribute('type', 'application/ld+json');\n ldJsonScript.textContent = \`${JSON.stringify(n)}\`;\n document.head.appendChild(ldJsonScript);\n})();`}})}function Me(t){const{url:o,linkProp:r="to",children:i}=t,a=n(t,["url","linkProp","children"]),{fullUrl:l}=q(),s=ne()||"a",{href:c,to:d}=function(e){const t=null==e?void 0:e.href,n=null==e?void 0:e.linkToURL,o=null==n?void 0:n.match(/^\/{2}|^https?:/g),r=null==n?void 0:n.match(/^\/\w/g);return{href:t||(o?n:null),to:r?n:null}}(o),u=null==o?void 0:o.newTab,p=null==o?void 0:o.noFollow,g=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),u&&{target:"_blank"}),{rel:`${p?"nofollow":""} ${u?"noreferrer":""}`.trim()}),l&&c&&{href:$(l,c)}),l&&d&&{[r]:$(l,d)});return d?e.createElement(e.Fragment,null,e.createElement("p",null,"Router"),e.createElement(s,Object.assign({},g),i)):e.createElement("a",g,i)}function De(t){const{component:n,content:o,library:{components:r}}=t;return o?e.createElement(Pe,Object.assign({libComponents:r,component:n},o)):null}function Fe(t){var n;const{apiUrl:o,content:r,footer:i,header:a,languageId:l,library:{templates:s,components:c},pageLanguages:d,siteMetadata:u}=t,p=s[r.template.templateType],g=r.template.heroSection?r.template.heroSection.modules&&r.template.heroSection.modules[0]:void 0,f=g?g.component:void 0,m=k({obj:r.template,searchKey:"component"}),v=Object.keys(null==r?void 0:r.template).filter((e=>(null==r?void 0:r.template[e])&&r.template[e].component)),h=Object.fromEntries(null==v?void 0:v.map((e=>{var t;return[e,null===(t=null==r?void 0:r.template[e].modules)||void 0===t?void 0:t.map((({component:e})=>e))]})));return e.createElement(N,{activeSectionBase:r.template.activeSectionBase,activeSectionSlug:r.template.activeSectionSlug||"/",apiUrl:o,breadcrumb:r.breadcrumb,componentList:m,dimensions:null===(n=r.dimensions)||void 0===n?void 0:n.values,firstModule:f,footer:i,fullPath:r.fullPath,fullUrl:r.fullUrl,header:a,isHome:r.isHome,languageId:l,modified:r.modified,origin:r.origin,pageLanguages:d,published:r.published,sectionModules:h,site:r.site,siteMetadata:u,siteSlug:r.siteSlug,structuredDataContent:r.structuredDataContent,title:r.title,template:r.template},e.createElement(e.Fragment,null,!!a&&e.createElement(M,null,e.createElement(Pe,Object.assign({libComponents:c},a))),e.createElement(p,Object.assign({},r.template)),!!i&&e.createElement(M,null,e.createElement(Pe,Object.assign({libComponents:c},i)))))}function He(t){const{isPage:o=!1}=t,r=n(t,["isPage"]),i=r,a=r;return o?e.createElement(Fe,Object.assign({},i)):e.createElement(De,Object.assign({},a))}const Be=e=>e,Ge=e=>e,Ve=e=>e,Je=e=>e,We=e=>e,Ke=e=>e,Ye=e=>e,Ze=e=>e,Qe=e=>e,Xe=e=>e,et=e=>e,tt=e=>e,nt=e=>e,ot=e=>e,rt=e=>e,it=e=>e;var at=Object.freeze({__proto__:null}),lt=Object.freeze({__proto__:null}),st=Object.freeze({__proto__:null}),ct=Object.freeze({__proto__:null}),dt=Object.freeze({__proto__:null}),ut=Object.freeze({__proto__:null}),pt=Object.freeze({__proto__:null});export{ge as CloudinaryBackgroundImage,_e as CloudinaryImage,Pe as Component,lt as Core,at as Fields,Ue as GriddoBackgroundImage,Ne as GriddoImage,Ae as GriddoLink,Te as LdJson,Me as Link,Fe as Page,st as PageContentTypeFields,U as PageContext,N as PageProvider,He as Preview,ut as Schema,D as SessionContext,F as SessionProvider,ct as SimpleContentTypeFields,z as SiteContext,P as SiteProvider,pt as Theme,dt as UIFields,Je as createCategoryContentTypeSchema,Be as createComponentSchema,We as createDamDefaultsSchema,Ke as createDataPackCategorySchema,Ye as createDataPackSchema,Ze as createFooterSchema,Qe as createHeaderSchema,Xe as createLanguagesSchema,et as createMenuSchema,tt as createModuleCategoriesSchema,nt as createModuleSchema,Ve as createPageContentTypeSchema,Ge as createSimpleContentTypeSchema,ot as createTemplateSchema,rt as createThemesSchema,it as createTranslationsSchema,Ce as getComponent,x as getLang,w as getSiteID,E as getToken,A as useContentType,B as useDataFilters,R as useDistributorData,d as useGlobalTheme,J as useGriddoImage,Y as useI18n,Q as useImage,ee as useIsClient,te as useIsFirstRender,ne as useLink,re as useList,ae as useNavigation,q as usePage,R as useReferenceFieldData,ue as useSSR,se as useScript,ce as useSession,K as useSite,de as useSitemap,u as useTheme,y as useThemeColors,O as useThemeFont,j as useThemePrimitives};
|
|
1
|
+
import*as e from"react";import t from"react";function n(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function r(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))}var o={domain:"https://res.cloudinary.com",uploadFolder:"image/upload",fallback404ImageId:"dx-placeholders/fallback-404-image",quality:51,crop:"fill",gravity:"faces:center",format:"auto",loading:"lazy",backgroundLazy:!1,decoding:"auto",responsive:[{breakpoint:null,width:"320px"}]};function i(e){return null==e?void 0:e.toString().split(/cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%/)[0]}function a(e){return Object.fromEntries(Object.entries(e).filter((e=>e[1])))}function l(e){var t;const{damId:r,imageConfig:o}=e,l=n(e,["damId","imageConfig"]),s=(c=o,d=l,Object.assign(Object.assign({},a(c)),a(d)));var c,d;const u=s.crop?`c/${s.crop}`:"",p=s.quality?`q/${s.quality}`:"",g=s.format?`f/${s.format}`:"",f=`${u}/${p}/${s.width?`w/${i(s.width)}`:""}/${s.height?`h/${i(s.height)}`:""}/${s.position?`p/${s.position}`:""}/${(null===(t=s.transforms)||void 0===t?void 0:t.length)?`t/${s.transforms}`:""}/${g}`;return function(e){const[t,n]=e.split(/(^https?:\/\/|^\/\/)/).filter(Boolean);return`${t}${null==n?void 0:n.replace(/\/\/+/g,"/").replace(/\/$/,"")}`}(`${o.domain}/${f}/${r}`)}function s(e){return e&&"string"==typeof e?e.split(/(^[http:|https:|\/\/]*[\S][^\/]*)/)[1]:e}function c(e){if(e&&"string"==typeof e){return e.split("/").filter(Boolean).slice(-1)[0]}return e}function d(e){return e.global}function u(e,t){const n=[];if((null==t?void 0:t.global)&&n.push(e.global),null==t?void 0:t.theme){const r=e.themes.find((e=>e.id===t.theme));r&&n.push(r)}else n.push(...e.themes);return 1===n.length?n[0]:n}const p=e=>{const t={},n=e=>{e.forEach((e=>{e.values.forEach((({cssVar:e,value:n})=>{t[e]=n}))}))};return Array.isArray(e)?n(e):Object.values(e).forEach((e=>{n(e)})),t},g=(e,t)=>e.map((e=>Object.assign(Object.assign({},e),{values:e.values.map((e=>([...e.value.matchAll(/var\((.*?)\)/g)].forEach((n=>{n.length>=2&&(e.value=e.value.replace(n[0],t[n[1]]))})),Object.assign({},e)))).filter((({value:e})=>CSS.supports("color",e)))}))).filter((e=>e.values.length)),f=e=>{const t=(e=>{let t=Object.assign({},p(e.primitives));return"subthemes"in e&&e.subthemes&&e.subthemes.forEach((e=>{t=Object.assign(Object.assign({},t),p(e.primitives))})),t})(e);if(Array.isArray(e.primitives))return g(e.primitives,t);const{common:n,light:r,dark:o}=e.primitives;return{common:n&&g(n,t),light:g(r,t),dark:g(o,t)}},m=(e,t)=>e.filter((e=>Array.isArray(t)?t.includes(e.id):e.id===t)),v=(e,t)=>{if(Array.isArray(e.primitives))return m(e.primitives,t);const{common:n,light:r,dark:o}=e.primitives;return{common:n&&m(n,t),light:m(r,t),dark:m(o,t)}},h=e=>{if(Array.isArray(e.primitives))return e.primitives.length;const{common:t,light:n,dark:r}=e.primitives;return(null==t?void 0:t.length)||n.length||r.length},b=(e,t,n)=>{const r=void 0===n;return e.map((e=>Object.assign(Object.assign({},e),{primitives:r?f(e):v(e,n),subthemes:"subthemes"in e&&e.subthemes&&e.subthemes.map((e=>Object.assign(Object.assign({},e),{primitives:r?f(e):v(e,n)}))).filter((e=>h(e)&&(!t||e.id===t)))||[]}))).filter((e=>h(e)||e.subthemes.length))};function y(e,t){const n=[];if((null==t?void 0:t.global)&&n.push(e.global),null==t?void 0:t.theme){const r=e.themes.find((e=>e.id===t.theme));r&&n.push(r)}else n.push(...e.themes);const r=((e,t)=>b(e,t))(n,null==t?void 0:t.subtheme);return r}function j(e,t){const n=[],{global:r,primitive:o,subtheme:i}=t;if(r&&n.push(e.global),t.theme){const r=e.themes.find((e=>e.id===t.theme));r&&n.push(r)}else n.push(...e.themes);return((e,t,n)=>b(e,n,t))(n,o,i)}function O(e,t){return j(e,Object.assign(Object.assign({},t),{primitive:["fontFamily","fontSize"]}))}const S="undefined"!=typeof window;function $(e,t){return(null==t?void 0:t.startsWith(`${e}#`))?`#${t.split("#")[1]}`:t}function E(){const e=localStorage.getItem("persist:app");if(!e||!S)return null;const t=JSON.parse(e);let{token:n}=t;n=JSON.parse(n);return{Authorization:`bearer ${n}`}}function w(){var e;const t=localStorage.getItem("persist:root");if(!S||!t)return 1;const n=JSON.parse(t);let{sites:r}=n;r=JSON.parse(r);return null===(e=r.currentSiteInfo)||void 0===e?void 0:e.id}function x(){const e=localStorage.getItem("langID");return!(!S||!e)&&parseInt(e)}function k({obj:e,searchKey:t,resultsBuffer:n=[],unique:r=!0}={}){if(!e)return[];const o=n;return Object.keys(e).forEach((n=>{const r=e[n];n===t&&"object"!=typeof r?o.push(r):"object"==typeof r&&r&&k({obj:r,searchKey:t,resultsBuffer:o})})),r?[...new Set(o)]:o}function _({baseUrl:e,params:t}){const n=Object.keys(t).map((e=>function(e){return Array.isArray(e)&&e.length>0||"number"==typeof e||"string"==typeof e}(t[e])?`${e}/${t[e]}`:"")).join("/");return`${e}${r=n,r.split("/").filter(Boolean).join("/")}`;var r}const C=e.createContext({translations:{}});function I(t){const{children:n,translations:r}=t;return e.createElement(C.Provider,{value:{translations:r}},n)}const L={linkComponent:function(t){const{children:r}=t,o=n(t,["children"]);return e.createElement("a",Object.assign({"data-griddo":"link"},o),r)},navigate:()=>null},P=e.createContext(L);function z(t){const{children:r}=t,o=n(t,["children"]),i=Object.assign(Object.assign({},L),o);return e.createElement(P.Provider,{value:i},r)}const U=e.createContext({});function N(t){const{children:r}=t,o=n(t,["children"]),i=e.useContext(P),a=null==i?void 0:i.translations;return e.createElement(U.Provider,{value:Object.assign({},o)},e.createElement(I,{translations:a},r))}function q(){var t;const n=e.useContext(U);if(!n)return console.warn("Griddo: You forgot to put <PageProvider>."),{};const r=null===(t=n.pageLanguages)||void 0===t?void 0:t.filter((e=>e.isLive));return Object.assign(Object.assign({},n),{pageLanguages:r})}function R(t){const[n,r]=e.useState(null),{order:o,quantity:i,source:a,mode:l,fixed:s,filter:c,allLanguages:d,fullRelations:u=!1}=t||{},{apiUrl:p}=q();return e.useEffect((()=>{const e=!!x(),t=w()||"global",n=`${p}/site/${t}/distributor`,g=function(e){const t=x();return{method:"POST",mode:"cors",cache:"no-cache",headers:Object.assign({"Content-Type":"application/json",lang:null==t?void 0:t.toString()},E()),redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e)}}("auto"===l?{mode:l,order:o,quantity:i,source:a,filter:c,fullRelations:u,allLanguages:d}:{mode:l,fixed:s,fullRelations:u});e&&fetch(n,g).then((e=>e.json())).then((e=>r(e))).catch((e=>{console.error("Error:",e)}))}),[l,o,i,s,c,a,u,d]),n}function A({data:e,queriedData:t}){return e&&R(e)||t}function F(t){const[n,r]=e.useState(),[o,i]=e.useState(!0),[a,l]=e.useState(!1),[s,c]=e.useState(!0),[d,u]=e.useState({});return e.useEffect((()=>{t&&(i(!0),fetch(t).then((e=>{if(c(!1),200!==e.status)throw i(!1),l(!0),u({code:e.status,msg:e.statusText}),new Error(e.statusText);return e.json()})).then((e=>{r(e)})).finally((()=>{i(!1),l(!1)})).catch((()=>{l(!0)})))}),[t]),{data:n,isLoading:o,isError:a,isFirstFetch:s,msg:d}}const T=e.createContext(null);function M(t){return e.createElement(T.Provider,{value:{isNavigation:!0}},t.children)}const D=t.createContext([{},()=>null]),H=e=>{const{children:n}=e,r=B();return t.createElement(D.Provider,{value:r},n)},B=()=>{const[e,n]=t.useState({});return[e,e=>n((t=>Object.assign(Object.assign({},t),e)))]},G=()=>e.useContext(P);function V(){const{publicApiUrl:t,siteId:n,renderer:r}=G(),{languageId:o}=q(),[i,a]=e.useState(),l="editor"===r;const{isError:s,isLoading:c,msg:d,data:u,isFirstFetch:p}=F(null==i?void 0:i.queryUrl);return[{query:u,isLoading:c,isError:s,msg:d,isFirstFetch:p},function({apiUrl:e=`${t}`,cached:r,data:i,lang:s=o,site:c=n}){if(!i)return;const d=l?(new Date).valueOf():r,u=_({baseUrl:`${e}/filters/${`${i.source||i.fixed}/`}`,params:{site:c,lang:s,cached:d}});a({queryUrl:u})}]}const J={jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",png:"image/png",avif:"image/avif",webp:"image/webp"},W={quality:75,crop:"cover",loading:"lazy",decoding:"auto",blurSize:"8px",blurCSSTransition:"filter 0s ease-in-out",formats:["webp"]};function K(t){var{url:r}=t,o=n(t,["url"]);if(!r)return{};const a=e.useContext(P),d=(null==a?void 0:a.griddoDamDefaults)||{},u=s(r),p=c(r),g=Object.assign(Object.assign(Object.assign(Object.assign({},W),d),o),{format:"jpeg",domain:u});void 0===g.responsive&&(g.responsive=[{width:g.width,height:g.height,quality:g.quality,crop:g.crop,position:g.position,transforms:g.transforms}]);const f=g.responsive.map((({width:e,height:t,quality:n,crop:r,position:o,transforms:a})=>`${l({damId:p,imageConfig:g,quality:n,crop:r,width:e,height:t,position:o,transforms:a})} ${e?`${i(e)}w`:""}`.trim())),m=function(e){const t=e.filter((e=>null===e.breakpoint));return[...e.filter((e=>null!==e.breakpoint)),...t]}(g.responsive.reverse()).map(((e,t)=>g.responsive&&t<g.responsive.length-1?`(min-width: ${e.breakpoint}) ${e.width}`:`${e.width}`)).join(", "),v=f.map((e=>null==e?void 0:e.split(" ")[0])),h=g.responsive[0],b=`${l(Object.assign({damId:p,imageConfig:g},h))}`;return{type:(null==g?void 0:g.format)?J[null==g?void 0:g.format]:J.jpeg,srcSet:f,srcSetURL:v,src:b,sizes:m,webpFallback:Y({srcSet:f,srcSetURL:v,format:"jpeg"}),jpeg:Y({srcSet:f,srcSetURL:v,format:"jpeg"}),webp:Y({srcSet:f,srcSetURL:v,format:"webp"}),avif:Y({srcSet:f,srcSetURL:v,format:"avif"}),png:Y({srcSet:f,srcSetURL:v,format:"png"}),gif:Y({srcSet:f,srcSetURL:v,format:"gif"}),svg:Y({srcSet:f,srcSetURL:v,format:"svg"})}}function Y({srcSet:e,srcSetURL:t,format:n}){return{type:J[n],srcSet:null==e?void 0:e.map((e=>null==e?void 0:e.replace(/f\/\w+/,`f/${n}`))),srcSetURL:null==t?void 0:t.map((e=>null==e?void 0:e.replace(/f\/\w+/,`f/${n}`)))}}function Z(t){const n=null==t?void 0:t.locale,r=e.useContext(C),{siteLangs:o}=G(),{languageId:i}=q(),a=null==r?void 0:r.translations;a||console.warn("Griddo: <SiteProvider> needs to have the prop translations"),void 0===o&&console.warn("Griddo: <SiteProvider> needs to have the prop siteLangs set with the site languages"),i||console.warn("Griddo: <PageProvider> needs to have the prop languageId set with the page language id"),function(e,t){return!!(null==e?void 0:e.find((e=>e.id===t)))}(o,i)||console.warn(`Griddo: languageId ${i} doesn't exist in this site`),void 0===n||function(e,t){return!!(null==e?void 0:e.find((e=>(null==e?void 0:e.locale)===t)))}(o,n)||console.warn(`Griddo: locale ${n} doesn't exist in this site`);const l=n||function(e,t){var n;return null===(n=null==e?void 0:e.find((e=>e.id===t)))||void 0===n?void 0:n.locale}(o,i),s=a&&l?a[l]:void 0;return l&&i||console.warn("Griddo: You forgot to put <I18nProvider> or exists an error in language id."),{getTranslation:(e,t="")=>s&&s[e]?s[e]:t,getNestedTranslation:(e,t="")=>s&&function(e,t){return null==e?void 0:e.split(".").reduce(((e,t)=>e[t]?e[t]:""),t)}(e,s)||t}}const Q={domain:"https://res.cloudinary.com",uploadFolder:"image/upload",fallback404ImageId:"dx-placeholders/fallback-404-image",quality:51,crop:"fill",gravity:"center",format:"auto",loading:"lazy",backgroundLazy:!1,decoding:"auto",responsive:[{breakpoint:null,width:"320px"}]};function X(e){var t,r,{publicId:o}=e,a=n(e,["publicId"]);const{cloudinaryCloudName:l,cloudinaryDefaults:s}=G(),c=Object.assign(Object.assign(Object.assign({},Q),s),a),d=`${c.domain}/${l}/${c.uploadFolder}`,u=`${ee({root:d,imageConfig:Object.assign(Object.assign({},c),{quality:20,width:"512"})})}/${c.fallback404ImageId}`,p=null===(t=null==c?void 0:c.responsive)||void 0===t?void 0:t.map((({width:e,height:t,quality:n,crop:r})=>`${ee({root:d,imageConfig:Object.assign({quality:n,crop:r,width:e,height:t},c)})}/${o} ${i(e)}w`)),g=function(e){if(!e)return[];const t=e.filter((e=>null===e.breakpoint));return[...e.filter((e=>null!==e.breakpoint)),...t]}(null===(r=null==c?void 0:c.responsive)||void 0===r?void 0:r.reverse()).map(((e,t)=>{var n;return c.responsive&&t<(null===(n=null==c?void 0:c.responsive)||void 0===n?void 0:n.length)-1?`(min-width: ${e.breakpoint}) ${e.width}`:`${e.width}`})).join(", "),f=null==p?void 0:p.map((e=>e.split(" ")[0])),m=(null==c?void 0:c.responsive)&&(null==c?void 0:c.responsive[0])||[];return{src:`${ee(Object.assign({root:d,imageConfig:c},m))}/${o}`,srcSet:p,sizes:g,fallbackSrcImage:u,srcSetURL:f}}function ee(e){const{root:t,imageConfig:n}=e,r=(null==n?void 0:n.crop)?`c_${n.crop}`:"",o=(null==n?void 0:n.quality)?`q_${n.quality}`:"",a=(null==n?void 0:n.gravity)?`g_${n.gravity}`:"",l=(null==n?void 0:n.format)?`f_${n.format}`:"",s=(null==n?void 0:n.width)?`w_${i(n.width)}`:"",c=(null==n?void 0:n.height)?`h_${i(n.height)}`:"",d=(null==n?void 0:n.ar)?`ar_${n.ar}`:"";const u=`${t}/${`${r},${a},${l},${o},${s},${c},${d}`.split(/._null|._undefined|,{1,}|._,|._$|undefined|null/).filter(Boolean).join(",")}`;return console.log(u),u}function te(){const[t,n]=e.useState(!1);return e.useEffect((()=>{n(!0)}),[]),t}function ne(){const t=e.useRef(!0);return t.current?(t.current=!1,!0):t.current}function re(){const t=e.useContext(P);return null==t?void 0:t.linkComponent}const oe=["or","and"];function ie(){const{publicApiUrl:t,siteId:n,renderer:r}=G(),{languageId:o}=q(),[i,a]=e.useState(),l="editor"===r;const{isError:s,isLoading:c,msg:d,data:u,isFirstFetch:p}=F(null==i?void 0:i.queryUrl);return[{query:u,isLoading:c,isError:s,msg:d,isFirstFetch:p},function({apiUrl:e=`${t}`,cached:r,data:i,exclude:s,fields:c,filterIds:d,filterOperator:u,globalOperator:p,items:g=10,lang:f=o,operator:m,page:v=1,relations:h,search:b,site:y=n,includePending:j,allLanguages:O}){var S,$;if(!i)return;const E=l?(new Date).valueOf().toString():r,w=null==b?void 0:b.replace(/\s/g,"+"),x="auto"===i.mode,k="manual"===i.mode,C=i.source||i.fixed||[],I=x?"/list/":"/list/fixed/",L=null===(S=i.filter)||void 0===S?void 0:S.map((e=>"object"==typeof e?e.id:e)),P=C.length<1,z=_({baseUrl:`${e}${I}${C}/`,params:{site:y,lang:f,get:c,page:v,items:g,order:x?i.order:void 0,filter:[...L||[],...d||[]],maxItems:i.quantity,search:w,operator:ae(m)?m:void 0,filterOperator:ae(u)?u:void 0,globalOperator:ae(p)?p:void 0,exclude:Array.isArray(s)?s:void 0,relations:h?"on":void 0,includePending:j?"on":void 0,allLanguages:O?"on":void 0,cached:E}});k&&P&&a({queryUrl:void 0,extra:void 0}),a({queryUrl:z,extra:{totalItems:"manual"===i.mode&&(null===($=i.fixed)||void 0===$?void 0:$.length)}})}]}function ae(e){return!!e&&oe.includes(e.toLowerCase())}function le(e){const{items:t,queriedData:n,fields:r,page:o}=e,[{isError:i,isLoading:a,msg:l,query:s,isFirstFetch:c},d]=ie(),u={page:o||1,totalItems:null==n?void 0:n.length,totalPages:(null==n?void 0:n.length)&&t&&Math.ceil((null==n?void 0:n.length)/t),items:null==n?void 0:n.slice(0,t||10).map((e=>Object.assign({id:e.id},function(e,t){if(e)return t?Object.fromEntries(Object.keys(e).map((n=>(null==t?void 0:t.includes(n))&&[n,e[n]])).filter(Boolean)):e}(e.content,r))))};return[{isError:i,isLoading:a,msg:l,isFirstFetch:c,query:(s?Object.assign(Object.assign({},s),{totalPages:t&&(null==s?void 0:s.totalItems)&&Math.ceil((null==s?void 0:s.totalItems)/t)}):void 0)||u},d]}function se(){return e.useContext(T)}const ce={};function de(t,n){const[r,o]=e.useState((()=>{var e;return!t||(null==n?void 0:n.shouldPreventLoad)?"idle":"undefined"==typeof window?"loading":null!==(e=ce[t])&&void 0!==e?e:"loading"}));return e.useEffect((()=>{var e,r;if(!t||(null==n?void 0:n.shouldPreventLoad))return;const i=ce[t];if("ready"===i||"error"===i)return void o(i);const a=function(e){const t=document.querySelector(`script[src="${e}"]`),n=null==t?void 0:t.getAttribute("data-status");return{node:t,status:n}}(t);let l=a.node;if(l)o(null!==(r=null!==(e=a.status)&&void 0!==e?e:i)&&void 0!==r?r:"loading");else{l=document.createElement("script"),l.src=t,l.async=!0,l.setAttribute("data-status","loading"),document.body.appendChild(l);const e=e=>{const t="load"===e.type?"ready":"error";null==l||l.setAttribute("data-status",t)};l.addEventListener("load",e),l.addEventListener("error",e)}const s=e=>{const n="load"===e.type?"ready":"error";o(n),ce[t]=n};return l.addEventListener("load",s),l.addEventListener("error",s),()=>{l&&(l.removeEventListener("load",s),l.removeEventListener("error",s)),l&&(null==n?void 0:n.removeOnUnmount)&&l.remove()}}),[t,null==n?void 0:n.shouldPreventLoad,null==n?void 0:n.removeOnUnmount]),r}const ue=()=>t.useContext(D);function pe(){const[t,n]=e.useState(),[o,i]=e.useState(!0),{apiUrl:a,header:l,footer:s,fullPath:c}=q(),{siteMetadata:d}=G();e.useEffect((()=>{u()}),[]);const u=()=>r(this,void 0,void 0,(function*(){var e,t,r;const o={};if(o.topMenu=[{label:null==d?void 0:d.title,children:null===(e=l.topMenu)||void 0===e?void 0:e.elements,url:{linkToURL:!!c&&`${c.domainUrl}${c.site}`}}],!d){const e=w(),t=`${a}/site/${e}`,n=yield fetch(t,function(){const e=x();return{method:"GET",mode:"cors",cache:"no-cache",headers:Object.assign({"Content-Type":"application/json",lang:e},E())}}()),{name:r}=yield n.json();o.topMenu[0].label=r,o.siteName=r}o.mainMenu=null===(t=null==l?void 0:l.mainMenu)||void 0===t?void 0:t.elements;const u=null===(r=null==s?void 0:s.legalMenu)||void 0===r?void 0:r.elements;o.footerMenu=[{label:null,children:u}],o.header=l,o.footer=s,n(o),i(!1)}));return[t,o]}function ge(){const e="undefined"!=typeof window&&window.document&&window.document.documentElement;return{isBrowser:e,isServer:!e}}function fe(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}function me(t){var{backgroundRepeat:r="no-repeat",backgroundSize:i="cover",backgroundPosition:a="50% 50%",children:l,overlayColor:s=null,overlayOpacity:c=0,overlayTransition:d="2s",ratio:u,publicId:p,src:g,customLazyClassName:f="lazy",lazy:m}=t,v=n(t,["backgroundRepeat","backgroundSize","backgroundPosition","children","overlayColor","overlayOpacity","overlayTransition","ratio","publicId","src","customLazyClassName","lazy"]);const{cloudinaryDefaults:h}=G(),b=Object.assign(Object.assign(Object.assign(Object.assign({},h),o),v),{backgroundLazy:h.backgroundLazy||o.backgroundLazy||m}),{srcSetURL:y}=X({responsive:[...b.responsive],quality:b.quality,crop:b.crop,gravity:b.gravity,format:b.format,publicId:p,ar:u}),j=g?[g]:y,O=g?[]:b.responsive.map((e=>e.breakpoint)),S=`Griddo-BgImage--${Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,8)}`,$=b.backgroundLazy?f:"",E=function(e,t=0){return Array(e).fill(0).map(((e,n)=>n+t))}(j.length-1,1).map((e=>`@media (min-width: ${O[e]}) {\n .${S} {\n background-image: url(${j[e]});\n }\n }\n `)).join("");return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{__html:`\n\n .${S} {\n background-repeat: ${r};\n background-position: ${a};\n background-size: ${i};\n background-image: url(${j[0]});\n }\n\n ${E}\n\n .${S}::before {\n transition: all ${d} ease;\n background-color: rgba(0, 0, 0, ${c});\n ${s?`\n background-color: ${s};\n opacity: ${c};\n `:""}\n }`}}),e.createElement("div",{className:`Griddo-BgImage ${S} ${$}`},l))}function ve(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function he(e,t){return e(t={exports:{}},t.exports),t.exports}fe('.Griddo-BgImage {\n\tdisplay: flex;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.Griddo-BgImage::before {\n\tz-index: 0;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tcontent: "";\n\tdisplay: block;\n}\n\n.Griddo-BgImage.lazy {\n\tbackground-image: none;\n}\n');var be=Symbol.for("react.element"),ye=Symbol.for("react.fragment"),je=Object.prototype.hasOwnProperty,Oe=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Se={key:!0,ref:!0,__self:!0,__source:!0};function $e(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)je.call(t,r)&&!Se.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:be,type:e,key:i,ref:a,props:o,_owner:Oe.current}}var Ee={Fragment:ye,jsx:$e,jsxs:$e},we=he((function(e){e.exports=Ee})),xe=he((function(e,n){n.__esModule=!0,n.default=void 0;var r=["className","children","ratio","style"];function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}var i="--aspect-ratio";class a extends t.Component{constructor(){super(...arguments),this.node=null,this.setNode=e=>{this.node=e}}componentDidUpdate(){if(this.node){var{node:e}=this;e.style.getPropertyValue(i)||e.style.setProperty(i,"("+this.props.ratio+")")}}render(){var e=this.props,{className:t,children:n,ratio:a,style:l}=e,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,r),c=o({},l,{[i]:"("+a+")"});return(0,we.jsx)("div",o({className:t,ref:this.setNode,style:c},s,{children:n}))}}a.defaultProps={className:"react-aspect-ratio-placeholder",ratio:1};var l=a;n.default=l}));ve(xe);var ke=he((function(e,t){t.__esModule=!0,t.default=void 0;var n=["className","children","ratio","style"];function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var o="react-aspect-ratio-placeholder";var i=function(e){var{className:t=o,children:i,ratio:a=1,style:l}=e,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,n),c=r({},l,{"--aspect-ratio":"("+a+")"});return(0,we.jsx)("div",r({className:t,style:c},s,{children:i}))};t.default=i}));ve(ke);var _e=he((function(e,t){t.__esModule=!0,t.default=t.AspectRatio=void 0;var n=o(xe),r=o(ke);function o(e){return e&&e.__esModule?e:{default:e}}var i=n.default;t.default=i;var a=r.default;t.AspectRatio=a}));ve(_e);var Ce=_e.AspectRatio;function Ie(t){const{alt:n,width:r,height:i,ratio:a,fixed:l,publicId:s,src:c,objectFit:d="cover"}=t,{cloudinaryDefaults:u}=G(),p=Object.assign(Object.assign(Object.assign({},o),u),t),{srcSet:g,sizes:f,src:m}=X({crop:p.crop,format:p.format,gravity:p.gravity,quality:p.quality,sizes:p.sizes,responsive:p.responsive,ar:a,publicId:s}),v={alt:n,width:r,height:i,loading:p.loading,style:{objectFit:d},decoding:p.decoding},h=Object.assign(Object.assign({},v),{src:c}),b=Object.assign(Object.assign({},v),{srcSet:g,sizes:f,src:m}),y=c?h:b,j=()=>e.createElement("img",Object.assign({},y));return l?e.createElement(j,null):e.createElement(Ce,{ratio:a,style:{maxWidth:"100%",alignSelf:"normal"}},e.createElement(j,null))}fe('[style*="--aspect-ratio"] > img {\n height: auto;\n}\n\n[style*="--aspect-ratio"] {\n position: relative;\n}\n\n[style*="--aspect-ratio"] > :first-child {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n[style*="--aspect-ratio"]::before {\n content: "";\n display: block;\n width: 100%;\n}\n\n@supports not (aspect-ratio: 1/1) {\n [style*="--aspect-ratio"]::before {\n height: 0;\n padding-bottom: calc(100% / (var(--aspect-ratio)));\n }\n}\n\n@supports (aspect-ratio: 1/1) {\n [style*="--aspect-ratio"]::before {\n aspect-ratio: calc(var(--aspect-ratio));\n }\n}\n');const Le=(e,t)=>{const n=t.component;return void 0!==e[n]?e[n]:(console.warn(`The component <${n}> doesn't exist inside ${JSON.stringify(Object.keys(e))}`),null)},Pe=t=>e.createElement("svg",Object.assign({width:24,height:24,fill:"none"},t),e.createElement("path",{d:"M16 9v10H8V9h8zm-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"})),ze=t=>e.createElement("svg",Object.assign({width:24,height:24,fill:"none"},t),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5263 2.3158H4.78947C3.80526 2.3158 3 3.12106 3 4.10527V16.6316H4.78947V4.10527H15.5263V2.3158ZM18.2105 5.89475H8.36842C7.38421 5.89475 6.57894 6.70001 6.57894 7.68422V20.2105C6.57894 21.1947 7.38421 22 8.36842 22H18.2105C19.1947 22 20 21.1947 20 20.2105V7.68422C20 6.70001 19.1947 5.89475 18.2105 5.89475ZM8.36843 20.2105H18.2105V7.68422H8.36843V20.2105Z"}));fe('.--not-selected-nameplate {\n\tdisplay: none;\n}\n\n.--selected,\n.--selected-header-footer,\n.--selected-nameplate {\n\tdisplay: block;\n\tposition: relative;\n}\n\n.--selected-header-footer::before,\n.--selected::before {\n\tposition: absolute;\n\theight: calc(100% - 8px);\n\twidth: calc(100% - 8px);\n\tpadding-bottom: 4px;\n\tcontent: "";\n\tborder: 4px solid rgb(80, 87, 255);\n\tpointer-events: none;\n\tz-index: 99;\n}\n\n.--selected-header-footer::after {\n\tposition: absolute;\n\tpadding: 8px 16px;\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\ttop: -34px;\n\tleft: 50%;\n\ttransform: translate(-50%, 0px);\n\tcontent: attr(data-text);\n\tz-index: 9;\n\tbackground: rgb(80, 87, 255);\n\tcolor: rgb(255, 255, 255);\n\tfont-family: "Source Sans Pro", sans-serif;\n\tfont-weight: 600;\n\tfont-size: 14px;\n\tline-height: 18px;\n}\n\n.--selected-nameplate {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: absolute;\n\tpadding: 4px 16px;\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\ttop: -34px;\n\tleft: 50%;\n\ttransform: translate(-50%, 0px);\n\tz-index: 9;\n\tbackground: rgb(80, 87, 255);\n\tcolor: rgb(255, 255, 255);\n\tfont-family: "Source Sans Pro", sans-serif;\n\tfont-weight: 600;\n\tfont-size: 14px;\n\tline-height: 18px;\n\ttext-align: center;\n}\n\n.span-svg-action {\n\tpadding-left: 4px;\n}\n\n.span-svg-action:first-child {\n\tpadding-left: 16px;\n}\n\n.svg-action {\n\tfill: #dadada;\n}\n\n.svg-action:hover {\n\tfill: #fff;\n\tcursor: pointer;\n}\n');const Ue=t=>{const n=e.useRef(null),[r,o]=e.useState(0),{selectEditorID:i,moduleActions:a}=e.useContext(P),{selectedEditorID:l,editorID:s,component:c,children:d,isSelectionAllowed:u}=t,p=["Header","Footer"].includes(c);e.useEffect((()=>{n&&n.current&&o(n.current.scrollHeight)}),[d]),e.useEffect((()=>{m&&f()}),[n]);const g=e=>{(s||0===s)&&"undefined"!=typeof window&&u&&i&&i(t,void 0,e)},f=()=>{if(!n.current)return;const e=n.current.style.position,t=n.current.style.top;n.current.style.position="relative",n.current.style.top="-34px",n.current.scrollIntoView({behavior:"smooth",block:"nearest"}),n.current.style.top=t,n.current.style.position=e;0===n.current.offsetTop&&(n.current.style.marginTop="36px")},m=!!l&&l===s;m&&f();return e.createElement(e.Fragment,null,"Header"===c&&e.createElement("style",{dangerouslySetInnerHTML:{__html:`\n [data-text="Header"].--selected::before {\n height: ${r-8}px;\n }`}}),p&&e.createElement("span",{className:""+(m?"--selected-header-footer":""),"data-text":c,ref:n,onClick:g},d),!p&&e.createElement("span",{className:""+(m?"--selected":""),"data-text":c,ref:n,onClick:g},e.createElement("span",{className:""+(m?"--selected-nameplate":"--not-selected-nameplate")},c,e.createElement("span",{className:"span-svg-action",onClick:e=>{e.stopPropagation(),a&&s&&a.duplicateModuleAction(s)}},e.createElement(ze,{className:"svg-action"})),e.createElement("span",{className:"span-svg-action",onClick:e=>{e.stopPropagation(),a&&s&&a.deleteModuleAction(s)}},e.createElement(Pe,{className:"svg-action"}))),d))};function Ne(t){var r,{libComponents:o}=t,i=n(t,["libComponents"]);const{component:a,editorID:l,type:s,parentEditorID:c}=i,{renderer:d}=G(),u=null===(r=se())||void 0===r?void 0:r.isNavigation,p="undefined"!=typeof window?parseInt(localStorage.getItem("selectedID")||"0"):null,g=Le(o,Object.assign({},i)),f=u&&!["Header","Footer"].includes(a);return"editor"===d?e.createElement(H,null,e.createElement(Ue,{selectedEditorID:p,isSelectionAllowed:!f,editorID:l,component:a,type:s,parentEditorID:c},g?e.createElement(g,Object.assign({},i)):e.createElement(e.Fragment,null))):"preview"===d?e.createElement(H,null,g&&e.createElement(g,Object.assign({},i))):g&&e.createElement(g,Object.assign({},i))}fe('.griddo-background-image {\n\tdisplay: flex;\n\twidth: 100%;\n\theight: 100%;\n\n\tposition: relative;\n\n\tbackground-repeat: no-repeat;\n\tbackground-size: cover;\n\tbackground-position: 50% 50%;\n}\n\n.griddo-background-image--lazy .griddo-background-image {\n\tbackground: none !important;\n}\n\n.griddo-background-image::before {\n\tz-index: 0;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tcontent: "";\n\tdisplay: block;\n\ttransition: all var(--veil-transition-time) var(--veil-transition-easing);\n\tbackground-color: var(--veil-opacity);\n}\n');const qe=e.forwardRef((({children:t,format:n,backgroundSize:r,veilOpacity:o=.5,veilColor:i="#000033",veilTransitionTime:a="2s",veilTransitionEasing:d="easing",url:u,src:p,responsive:g,className:f,style:m,quality:v,lazyOffset:h="200px",loading:b},y)=>{const{griddoDamDefaults:j}=G(),O=e.useRef(null),S=s(u);e.useEffect((()=>{var e;if(IntersectionObserver){if(O.current){let e=new IntersectionObserver((t=>t.forEach((t=>{var n;t.isIntersecting&&(null===(n=O.current)||void 0===n||n.classList.remove("griddo-background-image--lazy"),e=e.disconnect())}))),{rootMargin:`0px 0px ${h} 0px`});return e.observe(O.current),()=>e=e&&e.disconnect()}}else null===(e=O.current)||void 0===e||e.classList.remove("griddo-background-image--lazy")}),[]);const $=g&&Object.fromEntries(Object.keys(g).map((e=>[e,{url:`url("${l({damId:c(u),imageConfig:Object.assign(Object.assign(Object.assign({},j),{quality:v,format:n,domain:S}),g[e])})}")`,customProperty:g[e].customProperty}]))),E=g&&Object.fromEntries(Object.keys(g).map(((e,t)=>[$[e].customProperty?`${$[e].customProperty}`:`--image-${t}`,$[e].url]))),w=p?{"--image-default":`url(${p})`}:E;return e.createElement("div",{ref:O,"data-griddo":"loading-ref",className:""+("lazy"===b?"griddo-background-image--lazy":"")},e.createElement("div",{"data-griddo":"image-ref",ref:y,className:`${f} griddo-background-image`,style:Object.assign(Object.assign(Object.assign({},m),{"--veil-opacity":`${i}${Math.round(255/(1/o)).toString(16)}`,"--veil-transition-time":a,"--veil-transition-easing":d,"--background-size":r}),w)},t))}));fe('[style*="--aspect-ratio"] [data-image="griddo"] {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 100%;\n\twidth: 100%;\n\tobject-fit: cover;\n}\n');const Re=e.forwardRef(((t,r)=>{var{width:o,height:i,ratio:a,fixed:l,url:s,loading:c,decoding:d,responsive:u,quality:p,crop:g,format:f,formats:m,position:v,transforms:h}=t,b=n(t,["width","height","ratio","fixed","url","loading","decoding","responsive","quality","crop","format","formats","position","transforms"]);if(!s)return null;const{griddoDamDefaults:y}=G()||{},j={loading:c||(null==y?void 0:y.loading),decoding:d||(null==y?void 0:y.decoding),quality:p||(null==y?void 0:y.quality),crop:g||(null==y?void 0:y.crop),format:f,formats:m||(null==y?void 0:y.formats),position:v,transforms:h},{src:O,sizes:S,avif:$,jpeg:E,gif:w,webp:x,svg:k}=K({url:s,crop:j.crop,format:j.format,quality:j.quality,responsive:u,position:j.position,transforms:j.transforms,width:o,height:i}),_=()=>{var t;return e.createElement("img",Object.assign({"data-image":"griddo",loading:c||j.loading,decoding:d||j.decoding,srcSet:u&&(null===(t=null==w?void 0:w.srcSet)||void 0===t?void 0:t.join(",")),sizes:u&&S,src:(null==w?void 0:w.srcSetURL)&&w.srcSetURL[0],width:o,height:i,fetchpriority:b.fetchpriority},b))},C=()=>e.createElement("img",Object.assign({"data-image":"griddo",loading:c||j.loading,decoding:d||j.decoding,src:(null==k?void 0:k.srcSetURL)&&k.srcSetURL[0],width:o,height:i,fetchpriority:b.fetchpriority},b)),I=()=>{var t,n,a,l,s;return e.createElement("picture",{ref:r},(null===(t=j.formats)||void 0===t?void 0:t.includes("avif"))&&e.createElement("source",{srcSet:null===(n=null==$?void 0:$.srcSet)||void 0===n?void 0:n.join(","),sizes:u&&S,type:"image/avif"}),(null===(a=j.formats)||void 0===a?void 0:a.includes("webp"))&&e.createElement("source",{srcSet:null===(l=null==x?void 0:x.srcSet)||void 0===l?void 0:l.join(","),sizes:u&&S,type:"image/webp"}),e.createElement("img",Object.assign({"data-image":"griddo",loading:c||j.loading,decoding:d||j.decoding,sizes:u&&S,srcSet:null===(s=null==E?void 0:E.srcSet)||void 0===s?void 0:s.join(","),src:O,width:o,height:i,fetchpriority:b.fetchpriority},b)))};return s?"svg"===f?e.createElement(C,null):"gif"===f?e.createElement(_,null):l||!u?e.createElement(I,null):e.createElement(Ce,{ratio:a,style:{maxWidth:"100%",alignSelf:"normal"}},e.createElement(I,null)):null})),Ae="pre",Fe="pro";function Te(t){var{activeClassName:r="",activeStyle:o={},style:i={},children:a,getProps:l,partiallyActive:s,state:c,url:d,title:u,className:p=""}=t,g=n(t,["activeClassName","activeStyle","style","children","getProps","partiallyActive","state","url","title","className"]);const{renderer:f,linkComponent:m}=G(),{fullPath:v}=q(),h="editor"===f,b=null==d?void 0:d.href,y=null==d?void 0:d.linkToURL,j=(null==d?void 0:d.newTab)||!1,O=(null==d?void 0:d.noFollow)||!1,S=!(null==d?void 0:d.linkToURL)&&!(null==d?void 0:d.href),$=y===`${null==v?void 0:v.domainUrl}${null==v?void 0:v.compose}`,E=function(e){var t;return(null===(t=null==e?void 0:e.domainUrl)||void 0===t?void 0:t.endsWith(`/${e.domain}`))?Fe:Ae}(v),w=function(e,t){return`${t?"nofollow":""} ${e?"noreferrer":""}`.trim()}(j,O),x=function(e){return e?"_blank":"_self"}(j),k=v&&function({env:e,fullPath:t,to:n}){var r,o,i;if("string"!=typeof n)return n;if(e===Ae){const e=null===(r=null==t?void 0:t.domainUrl)||void 0===r?void 0:r.split((null==t?void 0:t.domain)||"").join("");return(null===(o=null==n?void 0:n.split(e||""))||void 0===o?void 0:o.join(""))||n}return e===Fe&&(null===(i=null==n?void 0:n.split((null==t?void 0:t.domainUrl)||""))||void 0===i?void 0:i.join(""))||n}({env:E,fullPath:v,to:y}),_=h||S?"":k;return b||j?e.createElement("a",Object.assign({"data-link":"anchor",target:x,rel:w,href:b||y,className:p,title:u},g),a):e.createElement(m,Object.assign({rel:w,target:x,to:_,getProps:l,partiallyActive:s,state:c,activeStyle:o,activeClassName:r,title:h?k:u,style:$?o:i,className:$?`${p} ${r||""}`.trim():p},g),a)}function Me(t){const{data:n}=t;return e.createElement("script",{dangerouslySetInnerHTML:{__html:`(function(){\n const ldJsonScript = document.createElement('script');\n ldJsonScript.setAttribute('type', 'application/ld+json');\n ldJsonScript.textContent = \`${JSON.stringify(n)}\`;\n document.head.appendChild(ldJsonScript);\n})();`}})}function De(t){const{url:r,linkProp:o="to",children:i}=t,a=n(t,["url","linkProp","children"]),{fullUrl:l}=q(),s=re()||"a",{href:c,to:d}=function(e){const t=null==e?void 0:e.href,n=null==e?void 0:e.linkToURL,r=null==n?void 0:n.match(/^\/{2}|^https?:/g),o=null==n?void 0:n.match(/^\/\w/g);return{href:t||(r?n:null),to:o?n:null}}(r),u=null==r?void 0:r.newTab,p=null==r?void 0:r.noFollow,g=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),u&&{target:"_blank"}),{rel:`${p?"nofollow":""} ${u?"noreferrer":""}`.trim()}),l&&c&&{href:$(l,c)}),l&&d&&{[o]:$(l,d)});return d?e.createElement(e.Fragment,null,e.createElement("p",null,"Router"),e.createElement(s,Object.assign({},g),i)):e.createElement("a",g,i)}function He(t){const{component:n,content:r,library:{components:o}}=t;return r?e.createElement(Ne,Object.assign({libComponents:o,component:n},r)):null}function Be(t){var n;const{apiUrl:r,content:o,footer:i,header:a,languageId:l,library:{templates:s,components:c},pageLanguages:d,siteMetadata:u}=t,p=s[o.template.templateType],g=o.template.heroSection?o.template.heroSection.modules&&o.template.heroSection.modules[0]:void 0,f=g?g.component:void 0,m=k({obj:o.template,searchKey:"component"}),v=Object.keys(null==o?void 0:o.template).filter((e=>(null==o?void 0:o.template[e])&&o.template[e].component)),h=Object.fromEntries(null==v?void 0:v.map((e=>{var t;return[e,null===(t=null==o?void 0:o.template[e].modules)||void 0===t?void 0:t.map((({component:e})=>e))]})));return e.createElement(N,{activeSectionBase:o.template.activeSectionBase,activeSectionSlug:o.template.activeSectionSlug||"/",apiUrl:r,breadcrumb:o.breadcrumb,componentList:m,dimensions:null===(n=o.dimensions)||void 0===n?void 0:n.values,firstModule:f,footer:i,fullPath:o.fullPath,fullUrl:o.fullUrl,header:a,isHome:o.isHome,languageId:l,modified:o.modified,origin:o.origin,pageLanguages:d,published:o.published,sectionModules:h,site:o.site,siteMetadata:u,siteSlug:o.siteSlug,structuredDataContent:o.structuredDataContent,title:o.title,template:o.template},e.createElement(e.Fragment,null,!!a&&e.createElement(M,null,e.createElement(Ne,Object.assign({libComponents:c},a))),e.createElement(p,Object.assign({},o.template)),!!i&&e.createElement(M,null,e.createElement(Ne,Object.assign({libComponents:c},i)))))}function Ge(t){const{isPage:r=!1}=t,o=n(t,["isPage"]),i=o,a=o;return r?e.createElement(Be,Object.assign({},i)):e.createElement(He,Object.assign({},a))}const Ve=e=>e,Je=e=>e,We=e=>e,Ke=e=>e,Ye=e=>e,Ze=e=>e,Qe=e=>e,Xe=e=>e,et=e=>e,tt=e=>e,nt=e=>e,rt=e=>e,ot=e=>e,it=e=>e,at=e=>e,lt=e=>e;var st=Object.freeze({__proto__:null}),ct=Object.freeze({__proto__:null}),dt=Object.freeze({__proto__:null}),ut=Object.freeze({__proto__:null}),pt=Object.freeze({__proto__:null}),gt=Object.freeze({__proto__:null}),ft=Object.freeze({__proto__:null});export{me as CloudinaryBackgroundImage,Ie as CloudinaryImage,Ne as Component,ct as Core,st as Fields,qe as GriddoBackgroundImage,Re as GriddoImage,Te as GriddoLink,Me as LdJson,De as Link,Be as Page,dt as PageContentTypeFields,U as PageContext,N as PageProvider,Ge as Preview,gt as Schema,D as SessionContext,H as SessionProvider,ut as SimpleContentTypeFields,P as SiteContext,z as SiteProvider,ft as Theme,pt as UIFields,Ke as createCategoryContentTypeSchema,Ve as createComponentSchema,Ye as createDamDefaultsSchema,Ze as createDataPackCategorySchema,Qe as createDataPackSchema,Xe as createFooterSchema,et as createHeaderSchema,tt as createLanguagesSchema,nt as createMenuSchema,rt as createModuleCategoriesSchema,ot as createModuleSchema,We as createPageContentTypeSchema,Je as createSimpleContentTypeSchema,it as createTemplateSchema,at as createThemesSchema,lt as createTranslationsSchema,Le as getComponent,x as getLang,w as getSiteID,E as getToken,A as useContentType,V as useDataFilters,R as useDistributorData,d as useGlobalTheme,K as useGriddoImage,Z as useI18n,X as useImage,te as useIsClient,ne as useIsFirstRender,re as useLink,ie as useList,le as useListWithDefaultStaticPage,se as useNavigation,q as usePage,R as useReferenceFieldData,ge as useSSR,de as useScript,ue as useSession,G as useSite,pe as useSitemap,u as useTheme,y as useThemeColors,O as useThemeFont,j as useThemePrimitives};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|