Merged develop into feat/hotel-pages-intro-section
This commit is contained in:
6
types/components/imageContainer.ts
Normal file
6
types/components/imageContainer.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { ImageVaultAsset } from "./imageVaultImage"
|
||||
|
||||
export type ImageContainerProps = {
|
||||
leftImage: ImageVaultAsset
|
||||
rightImage: ImageVaultAsset
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { ImageContainer } from "./imageContainer"
|
||||
import type { SysAsset } from "./utils/asset"
|
||||
|
||||
export type Embeds = SysAsset
|
||||
export type Embeds = SysAsset | ImageContainer
|
||||
|
||||
14
types/requests/imageContainer.ts
Normal file
14
types/requests/imageContainer.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { InsertResponse } from "../components/imageVaultImage"
|
||||
import { EmbedEnum } from "./utils/embeds"
|
||||
import { Typename } from "./utils/typename"
|
||||
|
||||
export type ImageContainer = Typename<
|
||||
{
|
||||
image_left: InsertResponse
|
||||
image_right: InsertResponse
|
||||
system: {
|
||||
uid: string
|
||||
}
|
||||
},
|
||||
EmbedEnum.ImageContainer
|
||||
>
|
||||
6
types/requests/rte.ts
Normal file
6
types/requests/rte.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum RTEEmbedsEnum {
|
||||
AccountPage = "AccountPage",
|
||||
ContentPage = "ContentPage",
|
||||
LoyaltyPage = "LoyaltyPage",
|
||||
ImageContainer = "ImageContainer",
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
export enum EmbedEnum {
|
||||
CurrentBlocksPage = "CurrentBlocksPage",
|
||||
SysAsset = "SysAsset",
|
||||
ImageContainer = "ImageContainer",
|
||||
LoyaltyPage = "LoyaltyPage",
|
||||
AccountPage = "AccountPage",
|
||||
ContentPage = "ContentPage",
|
||||
}
|
||||
|
||||
export type Embed = keyof typeof EmbedEnum
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { InsertResponse } from "../components/imageVaultImage"
|
||||
import { RTEItemTypeEnum } from "./enums"
|
||||
import type { EmbedTypesEnum, RTEItemType } from "./enums"
|
||||
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type { EmbedTypesEnum, RTEItemType } from "./enums"
|
||||
|
||||
export interface Attributes {
|
||||
[key: string]: any
|
||||
@@ -36,3 +38,9 @@ export interface RTELinkAttrs extends Attributes {
|
||||
target: HTMLAnchorElement["target"]
|
||||
type: RTEItemTypeEnum.entry
|
||||
}
|
||||
|
||||
export interface RTEImageVaultAttrs extends Attributes, InsertResponse {
|
||||
height: string
|
||||
width: string
|
||||
style: string[]
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ export enum RTETypeEnum {
|
||||
thead = "thead",
|
||||
tr = "tr",
|
||||
ul = "ul",
|
||||
ImageVault = "ImageVault",
|
||||
fragment = "fragment",
|
||||
}
|
||||
|
||||
export type RTEType = keyof typeof RTETypeEnum
|
||||
@@ -46,3 +48,17 @@ export enum RTEItemTypeEnum {
|
||||
}
|
||||
|
||||
export type RTEItemType = keyof typeof RTEItemTypeEnum
|
||||
|
||||
export enum AvailableParagraphFormatEnum {
|
||||
"script-1" = "script-1",
|
||||
"script-2" = "script-2",
|
||||
"footnote" = "footnote",
|
||||
"caption" = "caption",
|
||||
"subtitle-1" = "subtitle-1",
|
||||
"subtitle-2" = "subtitle-2",
|
||||
}
|
||||
|
||||
export enum AvailableULFormatEnum {
|
||||
"heart" = "heart",
|
||||
"check" = "check",
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import type {
|
||||
Attributes,
|
||||
RTEAnchorAttrs,
|
||||
RTEAssetAttrs,
|
||||
RTEImageVaultAttrs,
|
||||
RTELinkAttrs,
|
||||
} from "./attrs"
|
||||
import type { RenderOptions } from "./option"
|
||||
@@ -36,6 +37,11 @@ export interface RTEReferenceLinkNode extends RTEDefaultNode {
|
||||
attrs: RTELinkAttrs
|
||||
}
|
||||
|
||||
export interface RTEImageVaultNode extends RTEDefaultNode {
|
||||
attrs: RTEImageVaultAttrs
|
||||
type: RTETypeEnum.ImageVault
|
||||
}
|
||||
|
||||
export enum RTEMarkType {
|
||||
bold = "bold",
|
||||
break = "break",
|
||||
@@ -58,9 +64,11 @@ export type RTETextNode = RTETextNodeOptionalKeys & {
|
||||
text: string
|
||||
}
|
||||
|
||||
export type RTERegularNode = RTEDefaultNode | RTEAnchorNode
|
||||
export type RTERegularNode = RTEDefaultNode | RTEAnchorNode | RTEImageVaultNode
|
||||
|
||||
export type RTEReferenceNode = RTEDefaultNode | RTEAnchorNode
|
||||
export type RTEImageNode = RTEDefaultNode | RTEImageVaultNode
|
||||
|
||||
export type RTEReferenceNode = RTEAnchorNode
|
||||
|
||||
export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user