web / useBlockManager
Function: useBlockManager() ​
useBlockManager():
object
Defined in: apps/web/composables/useBlockManager/useBlockManager.ts:29
Returns ​
object
addNewBlock() ​
addNewBlock: (
category
,variationIndex
,targetUuid
,position
) =>void
Parameters ​
category ​
string
variationIndex ​
number
targetUuid ​
string
position ​
"top"
| "bottom"
Returns ​
void
blockHasData() ​
blockHasData: (
block
) =>boolean
Parameters ​
block ​
Block
Returns ​
boolean
blocksLists ​
blocksLists:
Ref
<BlocksList
,BlocksList
>
changeBlockPosition() ​
changeBlockPosition: (
index
,position
) =>void
Parameters ​
index ​
number
position ​
number
Returns ​
void
clickedBlockIndex ​
clickedBlockIndex:
Ref
<null
|number
,null
|number
>
currentBlock ​
currentBlock:
Ref
<null
| {},null
|Block
| {}>
currentBlockUuid ​
currentBlockUuid:
Ref
<null
|string
,null
|string
>
deleteBlock() ​
deleteBlock: (
uuid
) =>void
Parameters ​
uuid ​
string
Returns ​
void
findOrDeleteBlockByUuid() ​
findOrDeleteBlockByUuid: (
blocks
,targetUuid
,deleteBlock
?) =>null
|Block
Parameters ​
blocks ​
Block
[]
targetUuid ​
string
deleteBlock? ​
boolean
Returns ​
null
| Block
getBlocksLists() ​
getBlocksLists: () =>
Promise
<void
>
Returns ​
Promise
<void
>
handleDragEnd() ​
handleDragEnd: () =>
void
Returns ​
void
handleDragStart() ​
handleDragStart: () =>
void
Returns ​
void
handleEdit() ​
handleEdit: (
uuid
) =>void
Parameters ​
uuid ​
string
Returns ​
void
isClicked ​
isClicked:
Ref
<boolean
,boolean
>
isDragging ​
isDragging:
ComputedRef
<boolean
>
isLastBlock() ​
isLastBlock: (
index
) =>boolean
Parameters ​
index ​
number
Returns ​
boolean
isTablet ​
isTablet:
ComputedRef
<any
>
modules ​
modules:
Record
<string
, () =>Promise
<{default
:unknown
; }>>
tabletEdit() ​
tabletEdit: (
index
) =>void
Parameters ​
index ​
number
Returns ​
void
togglePlaceholder() ​
togglePlaceholder: (
uuid
,position
) =>void
Parameters ​
uuid ​
string
position ​
"top"
| "bottom"
Returns ​
void
updateBlock() ​
updateBlock: (
index
,updatedBlock
) =>void
Parameters ​
index ​
number
updatedBlock ​
Block
Returns ​
void
visiblePlaceholder ​
visiblePlaceholder:
Ref
<{position
:"top"
|"bottom"
;uuid
:string
; }, {position
:"top"
|"bottom"
;uuid
:string
; } | {position
:"top"
|"bottom"
;uuid
:string
; }>