slackblock 0.4.0 → 1.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -26
- package/LICENSE +21 -21
- package/README.md +95 -85
- package/dist/block.cjs +341 -0
- package/dist/block.cjs.map +1 -0
- package/dist/block.d.mts +412 -0
- package/dist/block.d.ts +412 -0
- package/dist/block.mjs +268 -0
- package/dist/block.mjs.map +1 -0
- package/dist/index.cjs +1202 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +1170 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types.d-DgQXbJte.d.mts +296 -0
- package/dist/types.d-DgQXbJte.d.ts +296 -0
- package/package.json +85 -135
- package/blocks.js +0 -12
- package/index.js +0 -7
- package/lib/components/block/button.js +0 -27
- package/lib/components/block/confirmation.js +0 -27
- package/lib/components/block/image.js +0 -27
- package/lib/components/block/text.js +0 -27
- package/lib/components/index.js +0 -42
- package/lib/components/input/date-picker.js +0 -27
- package/lib/components/input/option-group.js +0 -27
- package/lib/components/input/option.js +0 -27
- package/lib/components/input/overflow.js +0 -27
- package/lib/components/input/radio-group.js +0 -27
- package/lib/components/input/select.js +0 -34
- package/lib/components/input/text.js +0 -27
- package/lib/components/layout/actions.js +0 -27
- package/lib/components/layout/container.js +0 -27
- package/lib/components/layout/context.js +0 -27
- package/lib/components/layout/divider.js +0 -27
- package/lib/components/layout/file.js +0 -27
- package/lib/components/layout/image.js +0 -27
- package/lib/components/layout/input.js +0 -27
- package/lib/components/layout/section.js +0 -27
- package/lib/components/message.js +0 -27
- package/lib/index.js +0 -7
- package/lib/parser/index.js +0 -32
- package/lib/renderer/index.js +0 -71
- package/lib/transformers/block/button.js +0 -29
- package/lib/transformers/block/confirmation.js +0 -18
- package/lib/transformers/block/image.js +0 -10
- package/lib/transformers/block/text.js +0 -16
- package/lib/transformers/index.js +0 -54
- package/lib/transformers/input/date-picker.js +0 -30
- package/lib/transformers/input/option-group.js +0 -19
- package/lib/transformers/input/option.js +0 -19
- package/lib/transformers/input/overflow.js +0 -19
- package/lib/transformers/input/radio-group.js +0 -22
- package/lib/transformers/input/select.js +0 -84
- package/lib/transformers/input/text.js +0 -31
- package/lib/transformers/layout/actions.js +0 -18
- package/lib/transformers/layout/container.js +0 -11
- package/lib/transformers/layout/context.js +0 -18
- package/lib/transformers/layout/divider.js +0 -10
- package/lib/transformers/layout/file.js +0 -14
- package/lib/transformers/layout/image.js +0 -23
- package/lib/transformers/layout/input.js +0 -26
- package/lib/transformers/layout/section.js +0 -31
- package/lib/utils/get-type.js +0 -16
- package/lib/utils/type-helpers.js +0 -2
- package/src/components/block/button.tsx +0 -20
- package/src/components/block/confirmation.tsx +0 -19
- package/src/components/block/image.tsx +0 -8
- package/src/components/block/text.tsx +0 -10
- package/src/components/index.ts +0 -23
- package/src/components/input/date-picker.tsx +0 -11
- package/src/components/input/option-group.tsx +0 -9
- package/src/components/input/option.tsx +0 -9
- package/src/components/input/overflow.tsx +0 -12
- package/src/components/input/radio-group.tsx +0 -13
- package/src/components/input/select.tsx +0 -36
- package/src/components/input/text.tsx +0 -12
- package/src/components/layout/actions.tsx +0 -9
- package/src/components/layout/container.tsx +0 -9
- package/src/components/layout/context.tsx +0 -12
- package/src/components/layout/divider.tsx +0 -7
- package/src/components/layout/file.tsx +0 -8
- package/src/components/layout/image.tsx +0 -10
- package/src/components/layout/input.tsx +0 -12
- package/src/components/layout/section.tsx +0 -15
- package/src/components/message.tsx +0 -20
- package/src/constants/types.d.ts +0 -93
- package/src/index.ts +0 -3
- package/src/parser/index.ts +0 -32
- package/src/renderer/index.ts +0 -75
- package/src/transformers/block/button.tsx +0 -47
- package/src/transformers/block/confirmation.tsx +0 -26
- package/src/transformers/block/image.ts +0 -18
- package/src/transformers/block/text.ts +0 -34
- package/src/transformers/index.ts +0 -65
- package/src/transformers/input/date-picker.tsx +0 -43
- package/src/transformers/input/option-group.tsx +0 -26
- package/src/transformers/input/option.tsx +0 -27
- package/src/transformers/input/overflow.ts +0 -33
- package/src/transformers/input/radio-group.ts +0 -38
- package/src/transformers/input/select.tsx +0 -136
- package/src/transformers/input/text.tsx +0 -47
- package/src/transformers/layout/actions.ts +0 -29
- package/src/transformers/layout/container.ts +0 -16
- package/src/transformers/layout/context.ts +0 -35
- package/src/transformers/layout/divider.ts +0 -20
- package/src/transformers/layout/file.ts +0 -24
- package/src/transformers/layout/image.tsx +0 -34
- package/src/transformers/layout/input.tsx +0 -39
- package/src/transformers/layout/section.ts +0 -53
- package/src/tsconfig.json +0 -11
- package/src/utils/get-type.ts +0 -20
- package/src/utils/type-helpers.ts +0 -1
- package/test/index.test.tsx +0 -11
- package/test/parser/parser.test.tsx +0 -67
- package/test/renderer/renderer.test.tsx +0 -138
- package/test/transformers/block/button.test.tsx +0 -63
- package/test/transformers/block/confirmation.test.tsx +0 -37
- package/test/transformers/block/image.test.tsx +0 -20
- package/test/transformers/block/text.test.tsx +0 -32
- package/test/transformers/input/date-picker.test.tsx +0 -66
- package/test/transformers/input/option-group.test.tsx +0 -26
- package/test/transformers/input/option.test.tsx +0 -36
- package/test/transformers/input/overflow.test.tsx +0 -57
- package/test/transformers/input/radio-group.test.tsx +0 -81
- package/test/transformers/input/select.test.tsx +0 -249
- package/test/transformers/input/text.test.tsx +0 -42
- package/test/transformers/layout/actions.test.tsx +0 -33
- package/test/transformers/layout/container.test.tsx +0 -34
- package/test/transformers/layout/context.test.tsx +0 -43
- package/test/transformers/layout/divider.test.tsx +0 -20
- package/test/transformers/layout/file.test.tsx +0 -26
- package/test/transformers/layout/image.test.tsx +0 -43
- package/test/transformers/layout/input.test.tsx +0 -59
- package/test/transformers/layout/section.test.tsx +0 -89
- package/test/tsconfig.json +0 -9
- package/test/utils/get-type.test.tsx +0 -21
- package/tsconfig.json +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/get-type.ts","../src/utils/validation.ts","../src/transformers/block/text.ts","../src/transformers/block/confirmation.tsx","../src/components/block/text.tsx","../src/transformers/block/button.tsx","../src/transformers/block/image.ts","../src/transformers/layout/container.ts","../src/transformers/layout/section.ts","../src/transformers/layout/actions.ts","../src/transformers/layout/context.ts","../src/transformers/layout/divider.ts","../src/transformers/layout/file.ts","../src/transformers/layout/header.tsx","../src/transformers/layout/image.tsx","../src/transformers/layout/input.tsx","../src/transformers/rich-text/utils.ts","../src/transformers/layout/rich-text.ts","../src/transformers/layout/video.tsx","../src/transformers/input/text.tsx","../src/transformers/input/date-time-picker.ts","../src/transformers/input/date-picker.tsx","../src/transformers/input/checkboxes.ts","../src/transformers/input/select.tsx","../src/components/input/select.tsx","../src/transformers/input/option.tsx","../src/transformers/input/option-group.tsx","../src/transformers/input/overflow.ts","../src/transformers/input/radio-group.ts","../src/transformers/input/time-picker.tsx","../src/transformers/rich-text/section.ts","../src/transformers/rich-text/list.ts","../src/transformers/rich-text/quote.ts","../src/transformers/rich-text/preformatted.ts","../src/transformers/rich-text/text.ts","../src/transformers/rich-text/link.ts","../src/transformers/rich-text/user.ts","../src/transformers/rich-text/channel.ts","../src/transformers/rich-text/emoji.ts","../src/transformers/rich-text/date.ts","../src/transformers/rich-text/broadcast.ts","../src/transformers/rich-text/user-group.ts","../src/transformers/index.ts","../src/parser/index.ts","../src/renderer/index.ts"],"sourcesContent":["import {type Child} from '../constants/types';\n\nconst getType = (element: Child): string => {\n if (typeof element === 'string') {\n return 'string';\n }\n\n if (element === null || element === undefined || typeof element === 'boolean') {\n return 'null';\n }\n\n if (Array.isArray(element)) {\n throw new TypeError('Cannot type arrays');\n }\n\n const {type} = element;\n\n if (typeof type === 'string') {\n return type;\n }\n\n const {slackType, displayName, name} = type as {\n slackType?: string;\n displayName?: string;\n name?: string;\n };\n\n return slackType || displayName || name || (type as string);\n};\n\nexport default getType;\n","const warn = (message: string): void => {\n console.warn(message);\n};\n\nexport const warnIfTooLong = (name: string, value: string | undefined, max: number): void => {\n if (!value) {\n return;\n }\n\n if (value.length > max) {\n warn(`${name} exceeds ${max} characters.`);\n }\n};\n\nexport const warnIfTooMany = (name: string, values: unknown[] | undefined, max: number): void => {\n if (!values) {\n return;\n }\n\n if (values.length > max) {\n warn(`${name} exceeds ${max} items.`);\n }\n};\n","import {type Element} from '../../constants/types';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type TextType = {\n type: 'plain_text' | 'mrkdwn';\n text: string;\n emoji?: boolean;\n verbatim?: boolean;\n};\n\nconst transformText = (element: Element): TextType => {\n const {\n props: {\n plainText,\n children,\n emoji,\n verbatim,\n },\n } = element;\n\n const res: TextType = {\n type: plainText ? 'plain_text' : 'mrkdwn',\n text: children,\n };\n\n if (typeof children === 'string') {\n warnIfTooLong('Text', children, 3000);\n }\n\n if (emoji) {\n res.emoji = true;\n }\n\n if (verbatim) {\n res.verbatim = true;\n }\n\n return res;\n};\n\nexport default transformText;\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {transform} from '..';\nimport {type ConfirmationProps} from '../../components/block/confirmation';\nimport Text from '../../components/block/text';\n\nimport {type TextType} from './text';\n\nexport type ConfirmationType = {\n title: TextType;\n text: TextType;\n confirm: TextType;\n deny: TextType;\n};\n\nconst transformConfirmation = (child: Element): ConfirmationType => {\n const {title, confirm, deny, children}: ConfirmationProps = child.props;\n\n const res: ConfirmationType = {\n title: transform(<Text plainText>{title}</Text>) as TextType,\n text: transform(children) as TextType,\n confirm: transform(<Text plainText>{confirm}</Text>) as TextType,\n deny: transform(<Text plainText>{deny}</Text>) as TextType,\n };\n\n return res;\n};\n\nexport default transformConfirmation;\n","import React from 'react';\n\nexport type Props = {\n children: string;\n plainText?: boolean;\n emoji?: boolean;\n verbatim?: boolean;\n};\n\nexport default class Text extends React.Component<Props> {\n static slackType = 'Text';\n}\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type ButtonProps} from '../../components/block/button';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport Confirmation from '../../components/block/confirmation';\nimport {warnIfTooLong} from '../../utils/validation';\n\nimport {type ConfirmationType} from './confirmation';\nimport {type TextType} from './text';\n\nexport type ButtonType = {\n type: 'button';\n text: TextType;\n action_id: string;\n url?: string;\n value?: string;\n style?: 'primary' | 'danger';\n confirm?: ConfirmationType;\n accessibility_label?: string;\n};\n\nconst transformButton = (child: Element): ButtonType => {\n const {actionId, children, url, value, style, confirm, accessibilityLabel}: ButtonProps = child.props;\n\n warnIfTooLong('Button action_id', actionId, 255);\n if (typeof children === 'string') {\n warnIfTooLong('Button text', children, 75);\n }\n\n warnIfTooLong('Button value', value, 2000);\n\n const res: ButtonType = {\n type: 'button',\n text: transform(<Text plainText>{children}</Text>) as TextType,\n action_id: actionId,\n };\n\n if (url) {\n res.url = url;\n }\n\n if (value) {\n res.value = value;\n }\n\n if (style) {\n res.style = style;\n }\n\n if (confirm) {\n res.confirm = transform(confirm) as ConfirmationType;\n }\n\n if (accessibilityLabel) {\n res.accessibility_label = accessibilityLabel;\n }\n\n return res;\n};\n\nexport default transformButton;\n","import {type Element} from '../../constants/types';\nimport {type Props as ImageProperties} from '../../components/block/image';\n\nexport type ImageType = {\n type: 'image';\n image_url: string;\n alt_text: string;\n};\n\nconst transformImage = (child: Element): ImageType => {\n const {url, alt}: ImageProperties = child.props;\n\n return {\n type: 'image',\n image_url: url,\n alt_text: alt,\n };\n};\n\nexport default transformImage;\n","import {type Props as ContainerProperties} from '../../components/layout/container';\nimport {type Element, type Child} from '../../constants/types';\nimport {transform} from '..';\n\ntype ContainerType = Child[];\n\nconst normalizeChildren = (children: Child): Child[] => {\n const result: Child[] = [];\n const stack = Array.isArray(children) ? [...children] : [children];\n\n while (stack.length > 0) {\n const child = stack.shift();\n\n if (child === null || child === undefined || typeof child === 'boolean') {\n continue;\n }\n\n if (Array.isArray(child)) {\n stack.unshift(...child);\n continue;\n }\n\n result.push(child);\n }\n\n return result;\n};\n\nconst transformContainer = (child: Element): ContainerType => {\n const {children}: ContainerProperties = child.props;\n const elements = normalizeChildren(children);\n\n return (elements as Element[]).map(element => transform(element)) as Child[];\n};\n\nexport default transformContainer;\n","import {type Element, type SerializedBlockElement} from '../../constants/types';\nimport {type TextType as Text} from '../block/text';\nimport {transform} from '..';\nimport {warnIfTooLong, warnIfTooMany} from '../../utils/validation';\n\nexport type SectionType = {\n type: 'section';\n text: Text;\n block_id?: string;\n fields?: Text[];\n accessory?: SerializedBlockElement;\n};\n\nconst transformSection = (element: Element): SectionType => {\n const {\n props: {\n text,\n blockId,\n children,\n accessory,\n },\n } = element;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: SectionType = {\n type: 'section',\n text: transform(text as Element) as Text,\n };\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n if (accessory) {\n res.accessory = transform(accessory) as SerializedBlockElement;\n }\n\n if (children) {\n res.fields = [];\n let fields = children;\n if (!Array.isArray(fields)) {\n fields = [fields];\n }\n\n for (const field of fields) {\n if (field) {\n const t = transform(field as Element);\n res.fields.push(t as Text);\n }\n }\n\n warnIfTooMany('Section fields', res.fields, 10);\n }\n\n return res;\n};\n\nexport default transformSection;\n","import {type Element, type SerializedInteractiveBlockElement, type InteractiveBlockElement} from '../../constants/types';\nimport {type Props as ActionProperties} from '../../components/layout/actions';\nimport {transform} from '..';\nimport {warnIfTooLong, warnIfTooMany} from '../../utils/validation';\n\nexport type ActionType = {\n type: 'actions';\n elements: SerializedInteractiveBlockElement[];\n block_id?: string;\n};\n\nconst transformActions = (child: Element): ActionType => {\n const {children, blockId}: ActionProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n let elements = children;\n if (!Array.isArray(elements)) {\n elements = [elements] as InteractiveBlockElement[];\n }\n\n const res: ActionType = {\n type: 'actions',\n elements: elements.map(element => transform(element as Element) as SerializedInteractiveBlockElement),\n };\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n warnIfTooMany('Actions elements', res.elements, 25);\n\n return res;\n};\n\nexport default transformActions;\n","import {type Element} from '../../constants/types';\nimport {type Props as ContextProperties, type ImageOrText as ImageOrTextElement} from '../../components/layout/context';\nimport {type TextType} from '../block/text';\nimport {type ImageType} from '../block/image';\nimport {transform} from '..';\nimport {warnIfTooLong, warnIfTooMany} from '../../utils/validation';\n\ntype ImageOrText = ImageType | TextType;\ntype ImageOrTextElementSet = ImageOrTextElement | ImageOrTextElement[];\n\nexport type ContextType = {\n type: 'context';\n elements: ImageOrText | ImageOrText[];\n block_id?: string;\n};\n\nconst transformContext = (child: Element): ContextType => {\n const {children, blockId}: ContextProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n let elements = children as ImageOrTextElementSet;\n if (!Array.isArray(elements)) {\n elements = [elements] as ImageOrTextElement[];\n }\n\n const res: ContextType = {\n type: 'context',\n elements: elements.map(element => transform(element as Element) as ImageOrText),\n };\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n warnIfTooMany('Context elements', res.elements as ImageOrText[], 10);\n\n return res;\n};\n\nexport default transformContext;\n","import {type Element} from '../../constants/types';\nimport {type Props as DividerProperties} from '../../components/layout/divider';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type DividerType = {\n type: 'divider';\n block_id?: string;\n};\n\nconst transformDivider = (child: Element): DividerType => {\n const {blockId}: DividerProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: DividerType = {type: 'divider'};\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformDivider;\n","import {type Element} from '../../constants/types';\nimport {type Props as FileProperties} from '../../components/layout/file';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type FileType = {\n type: 'file';\n source: 'remote';\n external_id: string;\n block_id?: string;\n};\n\nconst transformFile = (child: Element): FileType => {\n const {externalId, blockId}: FileProperties = child.props;\n warnIfTooLong('block_id', blockId, 255);\n const res: FileType = {\n type: 'file',\n source: 'remote',\n external_id: externalId,\n };\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformFile;\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type Props as HeaderProperties} from '../../components/layout/header';\nimport {type TextType} from '../block/text';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type HeaderType = {\n type: 'header';\n text: TextType;\n block_id?: string;\n};\n\nconst transformHeader = (child: Element): HeaderType => {\n const {text, blockId, emoji}: HeaderProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: HeaderType = {\n type: 'header',\n text: transform(<Text plainText emoji={emoji}>{text}</Text>) as TextType,\n };\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformHeader;\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport {type Props as ImageProperties} from '../../components/layout/image';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type ImageType = {\n type: 'image';\n image_url: string;\n alt_text: string;\n title?: TextType;\n block_id?: string;\n};\n\nconst transformImageLayout = (child: Element): ImageType => {\n const {url, alt, title, blockId}: ImageProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: ImageType = {\n type: 'image',\n image_url: url,\n alt_text: alt,\n };\n\n if (title) {\n res.title = transform(<Text plainText>{title}</Text>) as TextType;\n }\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformImageLayout;\n","import React from 'react';\n\nimport {type Element, type SerializedInputBlockElement} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport {type Props as InputProperties} from '../../components/layout/input';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type InputType = {\n type: 'input';\n label: TextType;\n element: SerializedInputBlockElement;\n hint?: TextType;\n optional?: boolean;\n block_id?: string;\n};\n\nconst transformInput = (child: Element): InputType => {\n const {label, element, hint, optional, blockId}: InputProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: InputType = {\n type: 'input',\n label: transform(<Text plainText>{label}</Text>) as TextType,\n element: transform(element as Element) as SerializedInputBlockElement,\n };\n\n if (hint) {\n res.hint = transform(<Text plainText>{hint}</Text>) as TextType;\n }\n\n if (optional) {\n res.optional = true;\n }\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformInput;\n","import {type Element} from '../../constants/types';\nimport {transform} from '..';\n\ntype RichTextChild = Element | string;\n\nexport const normalizeRichTextChildren = (children: unknown): RichTextChild[] => {\n const result: RichTextChild[] = [];\n const stack = Array.isArray(children) ? [...children] : [children];\n\n while (stack.length > 0) {\n const child = stack.shift();\n\n if (child === null || child === undefined || typeof child === 'boolean') {\n continue;\n }\n\n if (Array.isArray(child)) {\n stack.unshift(...child);\n continue;\n }\n\n result.push(child as RichTextChild);\n }\n\n return result;\n};\n\nexport const toInlineElements = (children: unknown): Array<Record<string, unknown>> => {\n const items = normalizeRichTextChildren(children);\n\n return items.map(item => {\n if (typeof item === 'string') {\n return {type: 'text', text: item};\n }\n\n return transform(item) as Record<string, unknown>;\n });\n};\n\nexport const toBlockElements = (children: unknown): Array<Record<string, unknown>> => {\n const items = normalizeRichTextChildren(children);\n\n return items.map(item => {\n if (typeof item === 'string') {\n return {\n type: 'rich_text_section',\n elements: [{type: 'text', text: item}],\n };\n }\n\n return transform(item) as Record<string, unknown>;\n });\n};\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextProperties} from '../../components/layout/rich-text';\nimport {toBlockElements} from '../rich-text/utils';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type RichTextType = {\n type: 'rich_text';\n elements: Array<Record<string, unknown>>;\n block_id?: string;\n};\n\nconst transformRichText = (child: Element): RichTextType => {\n const {elements, children, blockId}: RichTextProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: RichTextType = {\n type: 'rich_text',\n elements: elements ?? toBlockElements(children),\n };\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformRichText;\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type Props as VideoProperties} from '../../components/layout/video';\nimport {type TextType} from '../block/text';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type VideoType = {\n type: 'video';\n title: TextType;\n video_url: string;\n thumbnail_url: string;\n alt_text: string;\n title_url?: string;\n description?: TextType;\n author_name?: string;\n provider_name?: string;\n provider_icon_url?: string;\n block_id?: string;\n};\n\nconst transformVideo = (child: Element): VideoType => {\n const {\n title,\n videoUrl,\n thumbnailUrl,\n altText,\n titleUrl,\n description,\n authorName,\n providerName,\n providerIconUrl,\n blockId,\n }: VideoProperties = child.props;\n\n warnIfTooLong('block_id', blockId, 255);\n\n const res: VideoType = {\n type: 'video',\n title: transform(<Text plainText>{title}</Text>) as TextType,\n video_url: videoUrl,\n thumbnail_url: thumbnailUrl,\n alt_text: altText,\n };\n\n if (titleUrl) {\n res.title_url = titleUrl;\n }\n\n if (description) {\n res.description = transform(<Text plainText>{description}</Text>) as TextType;\n }\n\n if (authorName) {\n res.author_name = authorName;\n }\n\n if (providerName) {\n res.provider_name = providerName;\n }\n\n if (providerIconUrl) {\n res.provider_icon_url = providerIconUrl;\n }\n\n if (blockId) {\n res.block_id = blockId;\n }\n\n return res;\n};\n\nexport default transformVideo;\n","import React from 'react';\n\nimport Text from '../../components/block/text';\nimport {type Props as TextInputProperties} from '../../components/input/text';\nimport {type TextType as TextProperties} from '../block/text';\nimport {type Element} from '../../constants/types';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type TextType = {\n type: 'plain_text_input';\n action_id: string;\n placeholder?: TextProperties;\n initial_value?: string;\n multiline?: boolean;\n min_length?: number;\n max_length?: number;\n focus_on_load?: boolean;\n dispatch_action_config?: {\n trigger_actions_on: Array<'on_enter_pressed' | 'on_character_entered'>;\n };\n};\n\nconst transformTextInput = (child: Element): TextType => {\n const {\n actionId,\n placeholder,\n initial,\n multiline,\n minLength,\n maxLength,\n focusOnLoad,\n dispatchActionConfig,\n }: TextInputProperties = child.props;\n\n warnIfTooLong('TextInput action_id', actionId, 255);\n if (placeholder) {\n warnIfTooLong('TextInput placeholder', placeholder, 150);\n }\n\n const res: TextType = {\n type: 'plain_text_input',\n action_id: actionId,\n };\n\n if (placeholder) {\n res.placeholder = transform(<Text plainText>{placeholder}</Text>) as TextProperties;\n }\n\n if (initial) {\n res.initial_value = initial;\n }\n\n if (multiline) {\n res.multiline = true;\n }\n\n if (minLength) {\n res.min_length = minLength;\n }\n\n if (maxLength) {\n res.max_length = maxLength;\n }\n\n if (focusOnLoad !== undefined) {\n res.focus_on_load = focusOnLoad;\n }\n\n if (dispatchActionConfig && dispatchActionConfig.triggerActionsOn.length > 0) {\n res.dispatch_action_config = {\n trigger_actions_on: dispatchActionConfig.triggerActionsOn,\n };\n }\n\n return res;\n};\n\nexport default transformTextInput;\n","import {type Element} from '../../constants/types';\nimport {type Props as DateTimePickerProperties} from '../../components/input/date-time-picker';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type DateTimePickerType = {\n type: 'datetimepicker';\n action_id: string;\n initial_date_time?: number;\n confirm?: ConfirmationType;\n focus_on_load?: boolean;\n};\n\nconst transformDateTimePicker = (child: Element): DateTimePickerType => {\n const {actionId, initialDateTime, confirm, focusOnLoad}: DateTimePickerProperties = child.props;\n\n warnIfTooLong('DateTimePicker action_id', actionId, 255);\n\n const res: DateTimePickerType = {\n type: 'datetimepicker',\n action_id: actionId,\n };\n\n if (initialDateTime !== undefined) {\n if (!Number.isInteger(initialDateTime)) {\n throw new TypeError('DateTime must be a unix timestamp in seconds.');\n }\n\n res.initial_date_time = initialDateTime;\n }\n\n if (confirm) {\n res.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n if (focusOnLoad !== undefined) {\n res.focus_on_load = focusOnLoad;\n }\n\n return res;\n};\n\nexport default transformDateTimePicker;\n","import React from 'react';\n\nimport {type Props as DatePickerProperties} from '../../components/input/date-picker';\nimport {type Element} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type DatePickerType = {\n type: 'datepicker';\n action_id: string;\n placeholder?: TextType;\n initial_date?: string;\n confirm?: ConfirmationType;\n focus_on_load?: boolean;\n};\n\nconst isValidDateString = (value: string): boolean => {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(value);\n if (!match) {\n return false;\n }\n\n const year = Number(match[1]);\n const month = Number(match[2]);\n const day = Number(match[3]);\n\n if (month < 1 || month > 12) {\n return false;\n }\n\n const date = new Date(Date.UTC(year, month - 1, day));\n return date.getUTCFullYear() === year\n && date.getUTCMonth() === month - 1\n && date.getUTCDate() === day;\n};\n\nconst transformDatePicker = (child: Element): DatePickerType => {\n const {actionId, placeholder, initialDate, confirm, focusOnLoad}: DatePickerProperties = child.props;\n\n warnIfTooLong('DatePicker action_id', actionId, 255);\n if (placeholder) {\n warnIfTooLong('DatePicker placeholder', placeholder, 150);\n }\n\n const res: DatePickerType = {\n type: 'datepicker',\n action_id: actionId,\n };\n\n if (placeholder) {\n res.placeholder = transform(<Text plainText>{placeholder}</Text>) as TextType;\n }\n\n if (initialDate) {\n if (!isValidDateString(initialDate)) {\n throw new Error('Date must be valid and in format YYYY-MM-DD.');\n }\n\n res.initial_date = initialDate;\n }\n\n if (confirm) {\n res.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n if (focusOnLoad !== undefined) {\n res.focus_on_load = focusOnLoad;\n }\n\n return res;\n};\n\nexport default transformDatePicker;\n","import {type Element} from '../../constants/types';\nimport {type Props as CheckboxesProperties} from '../../components/input/checkboxes';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nimport {type OptionType} from './option';\n\nexport type CheckboxesType = {\n type: 'checkboxes';\n action_id: string;\n options: OptionType[];\n initial_options?: OptionType[];\n confirm?: ConfirmationType;\n focus_on_load?: boolean;\n};\n\nconst transformCheckboxes = (child: Element): CheckboxesType => {\n const {actionId, children, initialOptions, confirm, focusOnLoad}: CheckboxesProperties = child.props;\n\n warnIfTooLong('Checkboxes action_id', actionId, 255);\n\n let elements = children;\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n const res: CheckboxesType = {\n type: 'checkboxes',\n action_id: actionId,\n options: elements.map(element => transform(element as Element)) as OptionType[],\n };\n\n if (initialOptions && initialOptions.length > 0) {\n res.initial_options = initialOptions.map(option => transform(option as Element)) as OptionType[];\n }\n\n if (confirm) {\n res.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n if (focusOnLoad !== undefined) {\n res.focus_on_load = focusOnLoad;\n }\n\n return res;\n};\n\nexport default transformCheckboxes;\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {type Props as SelectProperties, selectTypes} from '../../components/input/select';\nimport type Option from '../../components/input/option';\nimport Text from '../../components/block/text';\nimport {transform} from '..';\nimport getType from '../../utils/get-type';\nimport type OptionGroup from '../../components/input/option-group';\nimport {warnIfTooLong} from '../../utils/validation';\n\nimport {type OptionGroupType} from './option-group';\nimport {type OptionType} from './option';\n\ntype ValidSelectType =\n 'static_select' |\n 'multi_static_select' |\n 'external_select' |\n 'multi_external_select' |\n 'users_select' |\n 'multi_users_select' |\n 'conversations_select' |\n 'multi_conversations_select' |\n 'channels_select' |\n 'multi_channels_select';\n\ntype SelectionType = NonNullable<SelectProperties['type']>;\n\nexport type SelectType = {\n type: ValidSelectType;\n placeholder: TextType;\n action_id: string;\n options?: OptionType[];\n option_groups?: OptionGroupType[];\n initial_option?: OptionType;\n initial_options?: OptionType[];\n confirm?: ConfirmationType;\n max_selected_items?: number;\n min_query_length?: number;\n focus_on_load?: boolean;\n initial_user?: string;\n initial_users?: string[];\n initial_conversation?: string;\n initial_conversations?: string[];\n initial_channel?: string;\n initial_channels?: string[];\n default_to_current_conversation?: boolean;\n response_url_enabled?: boolean;\n filter?: {\n include?: Array<'im' | 'mpim' | 'private' | 'public'>;\n exclude_external_shared_channels?: boolean;\n exclude_bot_users?: boolean;\n };\n};\n\nconst OPTION = 'Option';\nconst OPTION_GROUP = 'OptionGroup';\n\nconst types = {\n [selectTypes.STATIC]: 'static_select',\n [selectTypes.EXTERNAL]: 'external_select',\n [selectTypes.USER]: 'users_select',\n [selectTypes.CONVERSATION]: 'conversations_select',\n [selectTypes.CHANNEL]: 'channels_select',\n};\nconst MULTI_PREFIX = 'multi_';\n\nconst normalizeElements = (elements?: SelectProperties['children']): React.ReactElement[] => {\n if (!elements) {\n return [];\n }\n\n return Array.isArray(elements) ? elements : [elements];\n};\n\nconst assignStaticOptions = (elements: React.ReactElement[], result: SelectType): void => {\n const elementType = getType(elements[0] as Element);\n if (elements.some(element => getType(element as Element) !== elementType)) {\n if (elementType === OPTION && elements.some(element => getType(element as Element) !== OPTION_GROUP)) {\n throw new TypeError('You cannot mix OptionGroup types with Option types in a Select block.');\n } else if (elementType === OPTION_GROUP && elements.some(element => getType(element as Element) !== OPTION)) {\n throw new TypeError('You cannot mix OptionGroup types with Option types in a Select block.');\n }\n\n throw new TypeError('Only allowed types are Option OR OptionGroup');\n }\n\n if (elementType === OPTION) {\n const options = elements as Array<React.ReactElement<Option>>;\n result.options = options.map(element => transform(element as Element)) as OptionType[];\n } else if (elementType === OPTION_GROUP) {\n const optionGroups = elements as Array<React.ReactElement<OptionGroup>>;\n result.option_groups = optionGroups.map(element => transform(element as Element)) as OptionGroupType[];\n }\n};\n\nconst applyInitialSelections = (\n type: SelectionType,\n isMulti: boolean,\n result: SelectType,\n initialValues: {\n initialOptions?: Array<React.ReactElement<Option>>;\n initialUsers?: string[];\n initialConversations?: string[];\n initialChannels?: string[];\n },\n): void => {\n const {initialOptions, initialUsers, initialConversations, initialChannels} = initialValues;\n\n switch (type) {\n case selectTypes.USER: {\n if (initialUsers && initialUsers.length > 0) {\n if (isMulti) {\n result.initial_users = initialUsers;\n } else {\n result.initial_user = initialUsers[0];\n }\n }\n\n break;\n }\n\n case selectTypes.CONVERSATION: {\n if (initialConversations && initialConversations.length > 0) {\n if (isMulti) {\n result.initial_conversations = initialConversations;\n } else {\n result.initial_conversation = initialConversations[0];\n }\n }\n\n break;\n }\n\n case selectTypes.CHANNEL: {\n if (initialChannels && initialChannels.length > 0) {\n if (isMulti) {\n result.initial_channels = initialChannels;\n } else {\n result.initial_channel = initialChannels[0];\n }\n }\n\n break;\n }\n\n case selectTypes.STATIC:\n case selectTypes.EXTERNAL: {\n if (initialOptions && initialOptions.length > 0) {\n const transformedOptions = initialOptions.map(element => transform(element as Element)) as OptionType[];\n\n if (isMulti) {\n result.initial_options = transformedOptions;\n } else {\n result.initial_option = transformedOptions[0];\n }\n }\n\n break;\n }\n }\n};\n\nconst transformSelect = (child: Element): SelectType => {\n const {\n placeholder,\n actionId,\n multi,\n children,\n initialOptions,\n confirm,\n maxSelectedItems,\n type: typeProperty,\n initialUsers,\n initialConversations,\n initialChannels,\n minQueryLength,\n focusOnLoad,\n defaultToCurrentConversation,\n responseUrlEnabled,\n filter,\n }: SelectProperties = child.props;\n\n const type: SelectionType = typeProperty ?? selectTypes.STATIC;\n const typeString = `${multi ? MULTI_PREFIX : ''}${types[type]}` as ValidSelectType;\n\n warnIfTooLong('Select action_id', actionId, 255);\n warnIfTooLong('Select placeholder', placeholder, 150);\n\n const result: SelectType = {\n type: typeString,\n placeholder: transform(<Text plainText>{placeholder}</Text>) as TextType,\n action_id: actionId,\n };\n\n const elements = normalizeElements(children);\n\n if (type === selectTypes.STATIC) {\n assignStaticOptions(elements, result);\n }\n\n if (confirm) {\n result.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n applyInitialSelections(type, Boolean(multi), result, {\n initialOptions,\n initialUsers,\n initialConversations,\n initialChannels,\n });\n\n if (maxSelectedItems) {\n result.max_selected_items = maxSelectedItems;\n }\n\n if (focusOnLoad !== undefined) {\n result.focus_on_load = focusOnLoad;\n }\n\n if (type === selectTypes.EXTERNAL && minQueryLength !== undefined) {\n result.min_query_length = minQueryLength;\n }\n\n if (type === selectTypes.CONVERSATION) {\n if (defaultToCurrentConversation !== undefined) {\n result.default_to_current_conversation = defaultToCurrentConversation;\n }\n\n if (responseUrlEnabled !== undefined) {\n result.response_url_enabled = responseUrlEnabled;\n }\n\n if (filter) {\n const filterValue: SelectType['filter'] = {};\n\n if (filter.include && filter.include.length > 0) {\n filterValue.include = filter.include;\n }\n\n if (filter.excludeExternalSharedChannels !== undefined) {\n filterValue.exclude_external_shared_channels = filter.excludeExternalSharedChannels;\n }\n\n if (filter.excludeBotUsers !== undefined) {\n filterValue.exclude_bot_users = filter.excludeBotUsers;\n }\n\n if (Object.keys(filterValue).length > 0) {\n result.filter = filterValue;\n }\n }\n }\n\n return result;\n};\n\nexport default transformSelect;\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\nimport type OptionGroup from './option-group';\n\nexport const selectTypes = {\n STATIC: 'static',\n EXTERNAL: 'external',\n USER: 'user',\n CONVERSATION: 'conversation',\n CHANNEL: 'channel',\n} as const;\n\ntype SelectType = typeof selectTypes[keyof typeof selectTypes];\n\ntype ConversationFilter = {\n include?: Array<'im' | 'mpim' | 'private' | 'public'>;\n excludeExternalSharedChannels?: boolean;\n excludeBotUsers?: boolean;\n};\n\nexport type Props = {\n placeholder: string;\n actionId: string;\n type?: SelectType;\n multi?: boolean;\n children?: SingleOrArray<React.ReactElement<Option>> | SingleOrArray<React.ReactElement<OptionGroup>>;\n initialOptions?: Array<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n maxSelectedItems?: number;\n minQueryLength?: number;\n focusOnLoad?: boolean;\n initialUsers?: string[];\n initialConversations?: string[];\n initialChannels?: string[];\n defaultToCurrentConversation?: boolean;\n responseUrlEnabled?: boolean;\n filter?: ConversationFilter;\n};\n\nexport default class Select extends React.Component<Props> {\n static slackType = 'Select';\n}\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport Text from '../../components/block/text';\nimport {type Props as OptionProperties} from '../../components/input/option';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type OptionType = {\n text: TextType;\n value: string;\n description?: TextType;\n url?: string;\n};\n\nconst transformOption = (child: Element): OptionType => {\n const {children: text, value, url, description}: OptionProperties = child.props;\n\n warnIfTooLong('Option text', text, 75);\n warnIfTooLong('Option value', value, 75);\n warnIfTooLong('Option description', description, 75);\n\n const res: OptionType = {\n text: transform(<Text plainText>{text}</Text>) as TextType,\n value,\n };\n\n if (description) {\n res.description = transform(<Text plainText>{description}</Text>) as TextType;\n }\n\n if (url) {\n res.url = url;\n }\n\n return res;\n};\n\nexport default transformOption;\n","import React from 'react';\n\nimport Text from '../../components/block/text';\nimport {type Props as OptionGroupProperties} from '../../components/input/option-group';\nimport {type Element} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nimport {type OptionType} from './option';\n\nexport type OptionGroupType = {\n label: TextType;\n options: OptionType[];\n};\n\nconst transformOptionGroup = (child: Element): OptionGroupType => {\n const {label, children}: OptionGroupProperties = child.props;\n\n warnIfTooLong('OptionGroup label', label, 75);\n\n let options = children;\n if (!Array.isArray(options)) {\n options = [options];\n }\n\n return {\n label: transform(<Text plainText>{label}</Text>) as TextType,\n options: options.map(option => transform(option as Element)) as OptionType[],\n };\n};\n\nexport default transformOptionGroup;\n","import {type Element} from '../../constants/types';\nimport {type Props as OverflowProperties} from '../../components/input/overflow';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nimport {type OptionType} from './option';\n\nexport type OverflowType = {\n type: 'overflow';\n action_id: string;\n options: OptionType[];\n confirm?: ConfirmationType;\n};\n\nconst transformOverflow = (child: Element): OverflowType => {\n const {actionId, children, confirm}: OverflowProperties = child.props;\n\n warnIfTooLong('Overflow action_id', actionId, 255);\n\n let elements = children;\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n const res: OverflowType = {\n type: 'overflow',\n action_id: actionId,\n options: elements.map(element => transform(element as Element)) as OptionType[],\n };\n\n if (confirm) {\n res.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n return res;\n};\n\nexport default transformOverflow;\n","import {type Element} from '../../constants/types';\nimport {type Props as RadioGroupProperties} from '../../components/input/radio-group';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {transform} from '..';\nimport {warnIfTooLong} from '../../utils/validation';\n\nimport {type OptionType} from './option';\n\nexport type RadioGroupType = {\n type: 'radio_buttons';\n action_id: string;\n options: OptionType[];\n initial_option?: OptionType;\n confirm?: ConfirmationType;\n focus_on_load?: boolean;\n};\n\nconst transformRadioGroup = (child: Element): RadioGroupType => {\n const {actionId, children, initialOption, confirm, focusOnLoad}: RadioGroupProperties = child.props;\n\n warnIfTooLong('RadioGroup action_id', actionId, 255);\n\n let elements = children;\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n const res: RadioGroupType = {\n type: 'radio_buttons',\n action_id: actionId,\n options: elements.map(element => transform(element as Element)) as OptionType[],\n };\n\n if (initialOption) {\n res.initial_option = transform(initialOption as Element) as OptionType;\n }\n\n if (confirm) {\n res.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n if (focusOnLoad !== undefined) {\n res.focus_on_load = focusOnLoad;\n }\n\n return res;\n};\n\nexport default transformRadioGroup;\n","import React from 'react';\n\nimport {type Element} from '../../constants/types';\nimport {type TextType} from '../block/text';\nimport {type ConfirmationType} from '../block/confirmation';\nimport {type Props as TimePickerProperties} from '../../components/input/time-picker';\nimport {transform} from '..';\nimport Text from '../../components/block/text';\nimport {warnIfTooLong} from '../../utils/validation';\n\nexport type TimePickerType = {\n type: 'timepicker';\n action_id: string;\n placeholder?: TextType;\n initial_time?: string;\n confirm?: ConfirmationType;\n focus_on_load?: boolean;\n};\n\nconst isValidTimeString = (value: string): boolean => {\n const match = /^(\\d{2}):(\\d{2})$/.exec(value);\n if (!match) {\n return false;\n }\n\n const hours = Number(match[1]);\n const minutes = Number(match[2]);\n\n return hours >= 0 && hours <= 23 && minutes >= 0 && minutes <= 59;\n};\n\nconst transformTimePicker = (child: Element): TimePickerType => {\n const {actionId, placeholder, initialTime, confirm, focusOnLoad}: TimePickerProperties = child.props;\n\n warnIfTooLong('TimePicker action_id', actionId, 255);\n if (placeholder) {\n warnIfTooLong('TimePicker placeholder', placeholder, 150);\n }\n\n const res: TimePickerType = {\n type: 'timepicker',\n action_id: actionId,\n };\n\n if (placeholder) {\n res.placeholder = transform(<Text plainText>{placeholder}</Text>) as TextType;\n }\n\n if (initialTime) {\n if (!isValidTimeString(initialTime)) {\n throw new Error('Time must be valid and in format HH:MM.');\n }\n\n res.initial_time = initialTime;\n }\n\n if (confirm) {\n res.confirm = transform(confirm as Element) as ConfirmationType;\n }\n\n if (focusOnLoad !== undefined) {\n res.focus_on_load = focusOnLoad;\n }\n\n return res;\n};\n\nexport default transformTimePicker;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextSectionProperties} from '../../components/rich-text/section';\n\nimport {toInlineElements} from './utils';\n\nexport type RichTextSectionType = {\n type: 'rich_text_section';\n elements: Array<Record<string, unknown>>;\n};\n\nconst transformRichTextSection = (child: Element): RichTextSectionType => {\n const {children}: RichTextSectionProperties = child.props;\n\n return {\n type: 'rich_text_section',\n elements: toInlineElements(children),\n };\n};\n\nexport default transformRichTextSection;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextListProperties} from '../../components/rich-text/list';\nimport {type RichTextListStyle} from '../../components/rich-text/types';\n\nimport {toBlockElements} from './utils';\n\nexport type RichTextListType = {\n type: 'rich_text_list';\n style: RichTextListStyle;\n elements: Array<Record<string, unknown>>;\n indent?: number;\n border?: number;\n};\n\nconst transformRichTextList = (child: Element): RichTextListType => {\n const {style, children, indent, border}: RichTextListProperties = child.props;\n\n const res: RichTextListType = {\n type: 'rich_text_list',\n style,\n elements: toBlockElements(children),\n };\n\n if (indent !== undefined) {\n res.indent = indent;\n }\n\n if (border !== undefined) {\n res.border = border;\n }\n\n return res;\n};\n\nexport default transformRichTextList;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextQuoteProperties} from '../../components/rich-text/quote';\n\nimport {toInlineElements} from './utils';\n\nexport type RichTextQuoteType = {\n type: 'rich_text_quote';\n elements: Array<Record<string, unknown>>;\n};\n\nconst transformRichTextQuote = (child: Element): RichTextQuoteType => {\n const {children}: RichTextQuoteProperties = child.props;\n\n return {\n type: 'rich_text_quote',\n elements: toInlineElements(children),\n };\n};\n\nexport default transformRichTextQuote;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextPreformattedProperties} from '../../components/rich-text/preformatted';\n\nimport {toInlineElements} from './utils';\n\nexport type RichTextPreformattedType = {\n type: 'rich_text_preformatted';\n elements: Array<Record<string, unknown>>;\n};\n\nconst transformRichTextPreformatted = (child: Element): RichTextPreformattedType => {\n const {children}: RichTextPreformattedProperties = child.props;\n\n return {\n type: 'rich_text_preformatted',\n elements: toInlineElements(children),\n };\n};\n\nexport default transformRichTextPreformatted;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextTextProperties} from '../../components/rich-text/text';\nimport {type RichTextStyle} from '../../components/rich-text/types';\n\nexport type RichTextTextType = {\n type: 'text';\n text: string;\n style?: RichTextStyle;\n};\n\nconst transformRichTextText = (child: Element): RichTextTextType => {\n const {children, style}: RichTextTextProperties = child.props;\n\n const res: RichTextTextType = {\n type: 'text',\n text: children,\n };\n\n if (style) {\n res.style = style;\n }\n\n return res;\n};\n\nexport default transformRichTextText;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextLinkProperties} from '../../components/rich-text/link';\nimport {type RichTextStyle} from '../../components/rich-text/types';\n\nexport type RichTextLinkType = {\n type: 'link';\n url: string;\n text?: string;\n style?: RichTextStyle;\n};\n\nconst transformRichTextLink = (child: Element): RichTextLinkType => {\n const {url, children, style}: RichTextLinkProperties = child.props;\n\n const res: RichTextLinkType = {\n type: 'link',\n url,\n };\n\n if (children) {\n res.text = children;\n }\n\n if (style) {\n res.style = style;\n }\n\n return res;\n};\n\nexport default transformRichTextLink;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextUserProperties} from '../../components/rich-text/user';\n\nexport type RichTextUserType = {\n type: 'user';\n user_id: string;\n};\n\nconst transformRichTextUser = (child: Element): RichTextUserType => {\n const {userId}: RichTextUserProperties = child.props;\n\n return {\n type: 'user',\n user_id: userId,\n };\n};\n\nexport default transformRichTextUser;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextChannelProperties} from '../../components/rich-text/channel';\n\nexport type RichTextChannelType = {\n type: 'channel';\n channel_id: string;\n};\n\nconst transformRichTextChannel = (child: Element): RichTextChannelType => {\n const {channelId}: RichTextChannelProperties = child.props;\n\n return {\n type: 'channel',\n channel_id: channelId,\n };\n};\n\nexport default transformRichTextChannel;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextEmojiProperties} from '../../components/rich-text/emoji';\n\nexport type RichTextEmojiType = {\n type: 'emoji';\n name: string;\n};\n\nconst transformRichTextEmoji = (child: Element): RichTextEmojiType => {\n const {name}: RichTextEmojiProperties = child.props;\n\n return {\n type: 'emoji',\n name,\n };\n};\n\nexport default transformRichTextEmoji;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextDateProperties} from '../../components/rich-text/date';\n\nexport type RichTextDateType = {\n type: 'date';\n timestamp: number;\n format: string;\n fallback: string;\n link?: string;\n};\n\nconst transformRichTextDate = (child: Element): RichTextDateType => {\n const {timestamp, format, fallback, link}: RichTextDateProperties = child.props;\n\n const res: RichTextDateType = {\n type: 'date',\n timestamp,\n format,\n fallback,\n };\n\n if (link) {\n res.link = link;\n }\n\n return res;\n};\n\nexport default transformRichTextDate;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextBroadcastProperties} from '../../components/rich-text/broadcast';\nimport {type RichTextBroadcastRange} from '../../components/rich-text/types';\n\nexport type RichTextBroadcastType = {\n type: 'broadcast';\n range: RichTextBroadcastRange;\n};\n\nconst transformRichTextBroadcast = (child: Element): RichTextBroadcastType => {\n const {range}: RichTextBroadcastProperties = child.props;\n\n return {\n type: 'broadcast',\n range,\n };\n};\n\nexport default transformRichTextBroadcast;\n","import {type Element} from '../../constants/types';\nimport {type Props as RichTextUserGroupProperties} from '../../components/rich-text/user-group';\n\nexport type RichTextUserGroupType = {\n type: 'usergroup';\n usergroup_id: string;\n};\n\nconst transformRichTextUserGroup = (child: Element): RichTextUserGroupType => {\n const {usergroupId}: RichTextUserGroupProperties = child.props;\n\n return {\n type: 'usergroup',\n usergroup_id: usergroupId,\n };\n};\n\nexport default transformRichTextUserGroup;\n","import {type Child, type Element} from '../constants/types';\nimport getType from '../utils/get-type';\n\nimport Text from './block/text';\nimport Confirmation from './block/confirmation';\nimport Button from './block/button';\nimport Image from './block/image';\nimport Container from './layout/container';\nimport Section from './layout/section';\nimport Actions from './layout/actions';\nimport Context from './layout/context';\nimport Divider from './layout/divider';\nimport File from './layout/file';\nimport Header from './layout/header';\nimport ImageLayout from './layout/image';\nimport Input from './layout/input';\nimport RichText from './layout/rich-text';\nimport Video from './layout/video';\nimport TextInput from './input/text';\nimport DateTimePicker from './input/date-time-picker';\nimport DatePicker from './input/date-picker';\nimport Checkboxes from './input/checkboxes';\nimport Select from './input/select';\nimport Option from './input/option';\nimport OptionGroup from './input/option-group';\nimport Overflow from './input/overflow';\nimport RadioGroup from './input/radio-group';\nimport TimePicker from './input/time-picker';\nimport RichTextSection from './rich-text/section';\nimport RichTextList from './rich-text/list';\nimport RichTextQuote from './rich-text/quote';\nimport RichTextPreformatted from './rich-text/preformatted';\nimport RichTextText from './rich-text/text';\nimport RichTextLink from './rich-text/link';\nimport RichTextUser from './rich-text/user';\nimport RichTextChannel from './rich-text/channel';\nimport RichTextEmoji from './rich-text/emoji';\nimport RichTextDate from './rich-text/date';\nimport RichTextBroadcast from './rich-text/broadcast';\nimport RichTextUserGroup from './rich-text/user-group';\n\ntype TransformersType = Record<string, (child: Child) => unknown>;\n\nconst Transformers: TransformersType = {\n Container,\n Section,\n Actions,\n Context,\n Divider,\n File,\n Header,\n ImageLayout,\n Input,\n RichText,\n Video,\n\n Text,\n Confirmation,\n Button,\n Image,\n\n TextInput,\n DateTimePicker,\n DatePicker,\n Checkboxes,\n Select,\n Overflow,\n RadioGroup,\n TimePicker,\n\n Option,\n OptionGroup,\n\n RichTextSection,\n RichTextList,\n RichTextQuote,\n RichTextPreformatted,\n RichTextText,\n RichTextLink,\n RichTextUser,\n RichTextChannel,\n RichTextEmoji,\n RichTextDate,\n RichTextBroadcast,\n RichTextUserGroup,\n};\n\nexport default Transformers;\n\nexport const transform = (element: Element): Record<string, any> => {\n const type = getType(element);\n\n if (!Transformers[type]) {\n throw new Error(`No transformer exists for type '${type}'`);\n }\n\n return Transformers[type](element);\n};\n","import {type Child, type Block, type SlackMessage} from '../constants/types';\nimport transformers from '../transformers';\nimport getType from '../utils/get-type';\n\nconst normalizeChildren = (children: Child): Child[] => {\n const result: Child[] = [];\n const stack = Array.isArray(children) ? [...children] : [children];\n\n while (stack.length > 0) {\n const child = stack.shift();\n\n if (child === null || child === undefined || typeof child === 'boolean') {\n continue;\n }\n\n if (Array.isArray(child)) {\n stack.unshift(...child);\n continue;\n }\n\n result.push(child);\n }\n\n return result;\n};\n\nconst appendTransformed = (value: unknown, blocks: Block[]): void => {\n if (value === null || value === undefined || typeof value === 'boolean') {\n return;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n appendTransformed(item, blocks);\n }\n\n return;\n }\n\n blocks.push(value as Block);\n};\n\nconst parseChildren = (children: Child): SlackMessage => {\n if (typeof children === 'string') {\n return {text: children};\n }\n\n const normalizedChildren = normalizeChildren(children);\n\n const transformedBlocks: Block[] = [];\n for (const child of normalizedChildren) {\n const type = getType(child);\n const transformer = transformers[type];\n\n if (transformer) {\n appendTransformed(transformer(child), transformedBlocks);\n } else if (type !== 'null') {\n console.warn(`No transformer for child type '${type}' exists and will be ignored.`);\n }\n }\n\n if (transformedBlocks.length === 0) {\n return {};\n }\n\n return {blocks: transformedBlocks};\n};\n\nexport default parseChildren;\n","import {type SlackMessage, type Element} from '../constants/types';\nimport parser from '../parser';\nimport getType from '../utils/get-type';\nimport {warnIfTooMany} from '../utils/validation';\n\nconst render = (element: Element): SlackMessage => {\n const {props: properties = {}} = element || {};\n\n const typeName = getType(element);\n if (typeName !== 'Message') {\n throw new TypeError('Provided top-level element must be a Message type.');\n }\n\n if (!properties.children) {\n throw new Error('Cannot render a Message with no children.');\n }\n\n const json = {...parser(properties.children)};\n\n if (properties.replyTo) {\n json.thread_ts = properties.replyTo;\n }\n\n if (properties.markdown !== undefined) {\n json.mrkdwn = properties.markdown;\n }\n\n json.text = properties.text || '';\n\n if (properties.iconEmoji) {\n json.icon_emoji = properties.iconEmoji;\n }\n\n if (properties.iconUrl) {\n json.icon_url = properties.iconUrl;\n }\n\n if (properties.parse) {\n json.parse = properties.parse;\n }\n\n if (properties.username) {\n json.username = properties.username;\n }\n\n if (properties.asUser) {\n json.as_user = properties.asUser;\n }\n\n if (properties.replyBroadcast) {\n json.reply_broadcast = properties.replyBroadcast;\n }\n\n if (properties.unfurlLinks) {\n json.unfurl_links = properties.unfurlLinks;\n }\n\n if (properties.unfurlMedia !== undefined) {\n json.unfurl_media = properties.unfurlMedia;\n }\n\n if (properties.color && json.blocks) {\n json.attachments = [\n {\n color: properties.color as string,\n blocks: json.blocks,\n },\n ];\n\n delete json.blocks;\n }\n\n if (json.blocks) {\n warnIfTooMany('Message blocks', json.blocks, 50);\n }\n\n return json;\n};\n\nexport default render;\n"],"mappings":";AAEA,IAAM,UAAU,CAAC,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MAAI,WAAW,SAAS;AACtB,SAAK,YAAY,WAAW;AAAA,EAC9B;AAEA,MAAI,WAAW,aAAa,QAAW;AACrC,SAAK,SAAS,WAAW;AAAA,EAC3B;AAEA,OAAK,OAAO,WAAW,QAAQ;AAE/B,MAAI,WAAW,WAAW;AACxB,SAAK,aAAa,WAAW;AAAA,EAC/B;AAEA,MAAI,WAAW,SAAS;AACtB,SAAK,WAAW,WAAW;AAAA,EAC7B;AAEA,MAAI,WAAW,OAAO;AACpB,SAAK,QAAQ,WAAW;AAAA,EAC1B;AAEA,MAAI,WAAW,UAAU;AACvB,SAAK,WAAW,WAAW;AAAA,EAC7B;AAEA,MAAI,WAAW,QAAQ;AACrB,SAAK,UAAU,WAAW;AAAA,EAC5B;AAEA,MAAI,WAAW,gBAAgB;AAC7B,SAAK,kBAAkB,WAAW;AAAA,EACpC;AAEA,MAAI,WAAW,aAAa;AAC1B,SAAK,eAAe,WAAW;AAAA,EACjC;AAEA,MAAI,WAAW,gBAAgB,QAAW;AACxC,SAAK,eAAe,WAAW;AAAA,EACjC;AAEA,MAAI,WAAW,SAAS,KAAK,QAAQ;AACnC,SAAK,cAAc;AAAA,MACjB;AAAA,QACE,OAAO,WAAW;AAAA,QAClB,QAAQ,KAAK;AAAA,MACf;AAAA,IACF;AAEA,WAAO,KAAK;AAAA,EACd;AAEA,MAAI,KAAK,QAAQ;AACf,kBAAc,kBAAkB,KAAK,QAAQ,EAAE;AAAA,EACjD;AAEA,SAAO;AACT;AAEA,IAAO,mBAAQ;","names":["React","React","React","React","React","React","React","React","image_default","React","React","React","React","React","React","text_default","React","React","React","React","React","React","React","React","React","React","React","section_default","text_default","image_default","text_default","section_default","normalizeChildren"]}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
type TextType$1 = {
|
|
4
|
+
type: 'plain_text' | 'mrkdwn';
|
|
5
|
+
text: string;
|
|
6
|
+
emoji?: boolean;
|
|
7
|
+
verbatim?: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type TextType = {
|
|
11
|
+
type: 'plain_text_input';
|
|
12
|
+
action_id: string;
|
|
13
|
+
placeholder?: TextType$1;
|
|
14
|
+
initial_value?: string;
|
|
15
|
+
multiline?: boolean;
|
|
16
|
+
min_length?: number;
|
|
17
|
+
max_length?: number;
|
|
18
|
+
focus_on_load?: boolean;
|
|
19
|
+
dispatch_action_config?: {
|
|
20
|
+
trigger_actions_on: Array<'on_enter_pressed' | 'on_character_entered'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type ConfirmationType = {
|
|
25
|
+
title: TextType$1;
|
|
26
|
+
text: TextType$1;
|
|
27
|
+
confirm: TextType$1;
|
|
28
|
+
deny: TextType$1;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type DatePickerType = {
|
|
32
|
+
type: 'datepicker';
|
|
33
|
+
action_id: string;
|
|
34
|
+
placeholder?: TextType$1;
|
|
35
|
+
initial_date?: string;
|
|
36
|
+
confirm?: ConfirmationType;
|
|
37
|
+
focus_on_load?: boolean;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type OptionType = {
|
|
41
|
+
text: TextType$1;
|
|
42
|
+
value: string;
|
|
43
|
+
description?: TextType$1;
|
|
44
|
+
url?: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type OptionGroupType = {
|
|
48
|
+
label: TextType$1;
|
|
49
|
+
options: OptionType[];
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
type ValidSelectType = 'static_select' | 'multi_static_select' | 'external_select' | 'multi_external_select' | 'users_select' | 'multi_users_select' | 'conversations_select' | 'multi_conversations_select' | 'channels_select' | 'multi_channels_select';
|
|
53
|
+
type SelectType = {
|
|
54
|
+
type: ValidSelectType;
|
|
55
|
+
placeholder: TextType$1;
|
|
56
|
+
action_id: string;
|
|
57
|
+
options?: OptionType[];
|
|
58
|
+
option_groups?: OptionGroupType[];
|
|
59
|
+
initial_option?: OptionType;
|
|
60
|
+
initial_options?: OptionType[];
|
|
61
|
+
confirm?: ConfirmationType;
|
|
62
|
+
max_selected_items?: number;
|
|
63
|
+
min_query_length?: number;
|
|
64
|
+
focus_on_load?: boolean;
|
|
65
|
+
initial_user?: string;
|
|
66
|
+
initial_users?: string[];
|
|
67
|
+
initial_conversation?: string;
|
|
68
|
+
initial_conversations?: string[];
|
|
69
|
+
initial_channel?: string;
|
|
70
|
+
initial_channels?: string[];
|
|
71
|
+
default_to_current_conversation?: boolean;
|
|
72
|
+
response_url_enabled?: boolean;
|
|
73
|
+
filter?: {
|
|
74
|
+
include?: Array<'im' | 'mpim' | 'private' | 'public'>;
|
|
75
|
+
exclude_external_shared_channels?: boolean;
|
|
76
|
+
exclude_bot_users?: boolean;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
type CheckboxesType = {
|
|
81
|
+
type: 'checkboxes';
|
|
82
|
+
action_id: string;
|
|
83
|
+
options: OptionType[];
|
|
84
|
+
initial_options?: OptionType[];
|
|
85
|
+
confirm?: ConfirmationType;
|
|
86
|
+
focus_on_load?: boolean;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
type TimePickerType = {
|
|
90
|
+
type: 'timepicker';
|
|
91
|
+
action_id: string;
|
|
92
|
+
placeholder?: TextType$1;
|
|
93
|
+
initial_time?: string;
|
|
94
|
+
confirm?: ConfirmationType;
|
|
95
|
+
focus_on_load?: boolean;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
type DateTimePickerType = {
|
|
99
|
+
type: 'datetimepicker';
|
|
100
|
+
action_id: string;
|
|
101
|
+
initial_date_time?: number;
|
|
102
|
+
confirm?: ConfirmationType;
|
|
103
|
+
focus_on_load?: boolean;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
type OverflowType = {
|
|
107
|
+
type: 'overflow';
|
|
108
|
+
action_id: string;
|
|
109
|
+
options: OptionType[];
|
|
110
|
+
confirm?: ConfirmationType;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
type RadioGroupType = {
|
|
114
|
+
type: 'radio_buttons';
|
|
115
|
+
action_id: string;
|
|
116
|
+
options: OptionType[];
|
|
117
|
+
initial_option?: OptionType;
|
|
118
|
+
confirm?: ConfirmationType;
|
|
119
|
+
focus_on_load?: boolean;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
type ImageType$1 = {
|
|
123
|
+
type: 'image';
|
|
124
|
+
image_url: string;
|
|
125
|
+
alt_text: string;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
type ButtonType = {
|
|
129
|
+
type: 'button';
|
|
130
|
+
text: TextType$1;
|
|
131
|
+
action_id: string;
|
|
132
|
+
url?: string;
|
|
133
|
+
value?: string;
|
|
134
|
+
style?: 'primary' | 'danger';
|
|
135
|
+
confirm?: ConfirmationType;
|
|
136
|
+
accessibility_label?: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
type ActionType = {
|
|
140
|
+
type: 'actions';
|
|
141
|
+
elements: SerializedInteractiveBlockElement[];
|
|
142
|
+
block_id?: string;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
type ImageOrText = ImageType$1 | TextType$1;
|
|
146
|
+
type ContextType = {
|
|
147
|
+
type: 'context';
|
|
148
|
+
elements: ImageOrText | ImageOrText[];
|
|
149
|
+
block_id?: string;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
type DividerType = {
|
|
153
|
+
type: 'divider';
|
|
154
|
+
block_id?: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type FileType = {
|
|
158
|
+
type: 'file';
|
|
159
|
+
source: 'remote';
|
|
160
|
+
external_id: string;
|
|
161
|
+
block_id?: string;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
type HeaderType = {
|
|
165
|
+
type: 'header';
|
|
166
|
+
text: TextType$1;
|
|
167
|
+
block_id?: string;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
type ImageType = {
|
|
171
|
+
type: 'image';
|
|
172
|
+
image_url: string;
|
|
173
|
+
alt_text: string;
|
|
174
|
+
title?: TextType$1;
|
|
175
|
+
block_id?: string;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
type InputType = {
|
|
179
|
+
type: 'input';
|
|
180
|
+
label: TextType$1;
|
|
181
|
+
element: SerializedInputBlockElement;
|
|
182
|
+
hint?: TextType$1;
|
|
183
|
+
optional?: boolean;
|
|
184
|
+
block_id?: string;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
type RichTextType = {
|
|
188
|
+
type: 'rich_text';
|
|
189
|
+
elements: Array<Record<string, unknown>>;
|
|
190
|
+
block_id?: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
type SectionType = {
|
|
194
|
+
type: 'section';
|
|
195
|
+
text: TextType$1;
|
|
196
|
+
block_id?: string;
|
|
197
|
+
fields?: TextType$1[];
|
|
198
|
+
accessory?: SerializedBlockElement;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
type VideoType = {
|
|
202
|
+
type: 'video';
|
|
203
|
+
title: TextType$1;
|
|
204
|
+
video_url: string;
|
|
205
|
+
thumbnail_url: string;
|
|
206
|
+
alt_text: string;
|
|
207
|
+
title_url?: string;
|
|
208
|
+
description?: TextType$1;
|
|
209
|
+
author_name?: string;
|
|
210
|
+
provider_name?: string;
|
|
211
|
+
provider_icon_url?: string;
|
|
212
|
+
block_id?: string;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
type ImageBlockType = ImageType$1 | ImageType;
|
|
216
|
+
|
|
217
|
+
type SerializedInputBlockElement =
|
|
218
|
+
| TextType
|
|
219
|
+
| DatePickerType
|
|
220
|
+
| DateTimePickerType
|
|
221
|
+
| TimePickerType
|
|
222
|
+
| CheckboxesType
|
|
223
|
+
| SelectType
|
|
224
|
+
| OverflowType
|
|
225
|
+
| RadioGroupType;
|
|
226
|
+
|
|
227
|
+
type SerializedInteractiveBlockElement =
|
|
228
|
+
| ButtonType
|
|
229
|
+
| SerializedInputBlockElement;
|
|
230
|
+
|
|
231
|
+
type SerializedBlockElement =
|
|
232
|
+
| TextType$1
|
|
233
|
+
| ImageBlockType
|
|
234
|
+
| ConfirmationType
|
|
235
|
+
| SerializedInteractiveBlockElement;
|
|
236
|
+
|
|
237
|
+
type SerializedBlock =
|
|
238
|
+
| SectionType
|
|
239
|
+
| ActionType
|
|
240
|
+
| ContextType
|
|
241
|
+
| DividerType
|
|
242
|
+
| FileType
|
|
243
|
+
| HeaderType
|
|
244
|
+
| ImageBlockType
|
|
245
|
+
| InputType
|
|
246
|
+
| RichTextType
|
|
247
|
+
| VideoType;
|
|
248
|
+
|
|
249
|
+
type Block = SerializedBlock;
|
|
250
|
+
type Attachment = {
|
|
251
|
+
color: string;
|
|
252
|
+
blocks: Block[];
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
type InteractiveBlockElement = ReactElement<any, any>;
|
|
256
|
+
type StandardBlockElement = ReactElement<any, any>;
|
|
257
|
+
|
|
258
|
+
type InputBlockElement = ReactElement<any, any>;
|
|
259
|
+
type BlockElement = InteractiveBlockElement | StandardBlockElement | InputBlockElement;
|
|
260
|
+
|
|
261
|
+
type SlackMessage = {
|
|
262
|
+
text?: string;
|
|
263
|
+
as_user?: boolean;
|
|
264
|
+
blocks?: Block[];
|
|
265
|
+
attachments?: Attachment[];
|
|
266
|
+
icon_emoji?: string;
|
|
267
|
+
icon_url?: string;
|
|
268
|
+
link_names?: boolean;
|
|
269
|
+
mrkdwn?: boolean;
|
|
270
|
+
parse?: 'full' | 'none';
|
|
271
|
+
reply_broadcast?: boolean;
|
|
272
|
+
thread_ts?: string;
|
|
273
|
+
unfurl_links?: boolean;
|
|
274
|
+
unfurl_media?: boolean;
|
|
275
|
+
username?: string;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
type AnyFunction = (...parameters: any[]) => any;
|
|
279
|
+
|
|
280
|
+
type AnyConstructor = new (...parameters: any[]) => any;
|
|
281
|
+
|
|
282
|
+
type WithType = {
|
|
283
|
+
type?: string | AnyFunction | AnyConstructor;
|
|
284
|
+
};
|
|
285
|
+
type BElement = ReactElement<any, any> & WithType;
|
|
286
|
+
type Element = BElement;
|
|
287
|
+
type Child =
|
|
288
|
+
| string
|
|
289
|
+
| Element
|
|
290
|
+
| Child[]
|
|
291
|
+
| boolean
|
|
292
|
+
| undefined
|
|
293
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types -- React children can be null.
|
|
294
|
+
| null;
|
|
295
|
+
|
|
296
|
+
export type { BlockElement as B, Child as C, Element as E, InteractiveBlockElement as I, SlackMessage as S, InputBlockElement as a };
|