@tightknitai/block-kitchen 0.8.6 → 0.8.8
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/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +650 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +651 -4
- package/dist/index.js.map +1 -1
- package/dist/{palette-DToUE_3J.d.cts → palette-5_Tx97Gk.d.cts} +117 -3
- package/dist/{palette-DToUE_3J.d.ts → palette-5_Tx97Gk.d.ts} +117 -3
- package/dist/palette.cjs +180 -0
- package/dist/palette.cjs.map +1 -1
- package/dist/palette.d.cts +1 -1
- package/dist/palette.d.ts +1 -1
- package/dist/palette.js +181 -1
- package/dist/palette.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -5
|
@@ -151,7 +151,7 @@ declare function buildVariantById(sections: readonly PaletteSection[]): Readonly
|
|
|
151
151
|
/**
|
|
152
152
|
* The Slack Block Kit block types supported by the builder in v1.
|
|
153
153
|
*/
|
|
154
|
-
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card';
|
|
154
|
+
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card' | 'data_visualization' | 'container';
|
|
155
155
|
/**
|
|
156
156
|
* Slack `markdown` block payload. Renders standard markdown (GFM)
|
|
157
157
|
* via `slack-blocks-to-jsx`'s react-markdown integration.
|
|
@@ -399,6 +399,120 @@ interface PlanBlock {
|
|
|
399
399
|
tasks?: TaskCardBlock[];
|
|
400
400
|
block_id?: string;
|
|
401
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* One `{ label, value }` data point inside a {@link ChartSeries}. `label`
|
|
404
|
+
* is the x-axis category the point belongs to; `value` is the numeric
|
|
405
|
+
* measurement and may be negative.
|
|
406
|
+
*/
|
|
407
|
+
interface ChartDataPoint {
|
|
408
|
+
label: string;
|
|
409
|
+
value: number;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* A named series of {@link ChartDataPoint}s. Line / bar / area charts may
|
|
413
|
+
* carry one or more series; each renders as its own line, set of bars, or
|
|
414
|
+
* filled region with a matching legend entry.
|
|
415
|
+
*/
|
|
416
|
+
interface ChartSeries {
|
|
417
|
+
name: string;
|
|
418
|
+
data: ChartDataPoint[];
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Axis configuration shared by the cartesian chart types (line / bar /
|
|
422
|
+
* area). `categories` is the ordered set of x-axis tick labels; `x_label`
|
|
423
|
+
* and `y_label` title the axes.
|
|
424
|
+
*/
|
|
425
|
+
interface ChartAxisConfig {
|
|
426
|
+
categories: string[];
|
|
427
|
+
x_label?: string;
|
|
428
|
+
y_label?: string;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* One `{ label, value }` slice of a {@link PieChart}.
|
|
432
|
+
*/
|
|
433
|
+
interface PieChartSegment {
|
|
434
|
+
label: string;
|
|
435
|
+
value: number;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Cartesian chart spec (line / bar / area) used by a
|
|
439
|
+
* {@link DataVisualizationBlock}: one or more named series plotted against
|
|
440
|
+
* a shared category axis.
|
|
441
|
+
*/
|
|
442
|
+
interface CartesianChart {
|
|
443
|
+
type: 'line' | 'bar' | 'area';
|
|
444
|
+
series: ChartSeries[];
|
|
445
|
+
axis_config?: ChartAxisConfig;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Pie chart spec used by a {@link DataVisualizationBlock}. Unlike the
|
|
449
|
+
* cartesian charts it has no axes — just a flat list of labeled segments.
|
|
450
|
+
*/
|
|
451
|
+
interface PieChart {
|
|
452
|
+
type: 'pie';
|
|
453
|
+
segments: PieChartSegment[];
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* The `chart` payload of a {@link DataVisualizationBlock}: either a
|
|
457
|
+
* cartesian chart (line / bar / area) or a pie chart.
|
|
458
|
+
*/
|
|
459
|
+
type Chart = CartesianChart | PieChart;
|
|
460
|
+
/**
|
|
461
|
+
* The chart shape rendered by a {@link DataVisualizationBlock}.
|
|
462
|
+
*/
|
|
463
|
+
type ChartType = Chart['type'];
|
|
464
|
+
/**
|
|
465
|
+
* Slack `data_visualization` block payload. Renders a line, bar, area, or
|
|
466
|
+
* pie chart from inline data. Valid on the message surface only.
|
|
467
|
+
* `slack-web-api-client` doesn't ship this type yet, so we declare it.
|
|
468
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
|
|
469
|
+
*/
|
|
470
|
+
interface DataVisualizationBlock {
|
|
471
|
+
type: 'data_visualization';
|
|
472
|
+
title: string;
|
|
473
|
+
chart: Chart;
|
|
474
|
+
block_id?: string;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* A block allowed inside a {@link ContainerBlock}'s `child_blocks` array.
|
|
478
|
+
* Slack permits actions, context, divider, file, header, image, input,
|
|
479
|
+
* rich_text, section, table, and video — notably not `container` itself
|
|
480
|
+
* (no nesting) nor message-only chrome like card / carousel / markdown.
|
|
481
|
+
* This mirrors that set across the block types the builder models (`file`
|
|
482
|
+
* is omitted because the builder has no file block).
|
|
483
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/container-block
|
|
484
|
+
*/
|
|
485
|
+
type ContainerChildBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | RichTextBlock | TableBlock | InputBlock | VideoBlock;
|
|
486
|
+
/**
|
|
487
|
+
* Slack `container` block payload. A general-purpose wrapper that groups
|
|
488
|
+
* 1-10 child blocks into a single, optionally collapsible unit with a
|
|
489
|
+
* configurable width. Valid on the message surface only.
|
|
490
|
+
* `default_collapsed` only takes effect when `is_collapsible` is true.
|
|
491
|
+
*
|
|
492
|
+
* Note: despite what the API reference says, `title` and `subtitle` are
|
|
493
|
+
* `plain_text` text objects, not plain strings. `slack-web-api-client`
|
|
494
|
+
* doesn't ship this type yet, so we declare it.
|
|
495
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/container-block
|
|
496
|
+
*/
|
|
497
|
+
interface ContainerBlock {
|
|
498
|
+
type: 'container';
|
|
499
|
+
title: {
|
|
500
|
+
type: 'plain_text';
|
|
501
|
+
text: string;
|
|
502
|
+
emoji?: boolean;
|
|
503
|
+
};
|
|
504
|
+
child_blocks: ContainerChildBlock[];
|
|
505
|
+
subtitle?: {
|
|
506
|
+
type: 'plain_text';
|
|
507
|
+
text: string;
|
|
508
|
+
emoji?: boolean;
|
|
509
|
+
};
|
|
510
|
+
icon?: ImageElement;
|
|
511
|
+
width?: 'narrow' | 'standard' | 'wide' | 'full';
|
|
512
|
+
is_collapsible?: boolean;
|
|
513
|
+
default_collapsed?: boolean;
|
|
514
|
+
block_id?: string;
|
|
515
|
+
}
|
|
402
516
|
/**
|
|
403
517
|
* Header heading level shown in the preview. Slack's API has no
|
|
404
518
|
* `level` field on header blocks, so this is a builder-only extension
|
|
@@ -417,7 +531,7 @@ type SupportedHeaderBlock = HeaderBlock & {
|
|
|
417
531
|
* Subset of {@link AnyMessageBlock} from `slack-web-api-client`,
|
|
418
532
|
* plus a header `level` extension.
|
|
419
533
|
*/
|
|
420
|
-
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock;
|
|
534
|
+
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock | DataVisualizationBlock | ContainerBlock;
|
|
421
535
|
/**
|
|
422
536
|
* A block as represented inside the builder's working state.
|
|
423
537
|
* `id` is an ephemeral client-side identifier used by DnD and selection.
|
|
@@ -732,4 +846,4 @@ interface BlockKitchenProps {
|
|
|
732
846
|
theme?: BrandTheme | BrandPreset;
|
|
733
847
|
}
|
|
734
848
|
|
|
735
|
-
export { type AlertBlock as A, type BlockKitchenProps as B, type CardBlock as C, type
|
|
849
|
+
export { extraAlertVariant as $, type AlertBlock as A, type BlockKitchenProps as B, type CardBlock as C, type DataVisualizationBlock as D, type PreviewSurface as E, type FeedbackButtonSubobject as F, type PreviewTheme as G, type HeaderLevel as H, type IconButtonElement as I, type SendPayload as J, type SendResult as K, type SupportedBlock as L, type MarkdownBlock as M, type SupportedBlockType as N, type SupportedHeaderBlock as O, type PaletteSection as P, type TableCell as Q, type TableColumnSetting as R, type SendAsUserStatus as S, type TableBlock as T, type TaskCardBlock as U, type TaskCardStatus as V, type Template as W, type UrlSourceElement as X, type VideoBlock as Y, buildVariantById as Z, defaultPalette as _, type AlertLevel as a, legacyInputVariants as a0, type BrandPreset as b, type BrandTheme as c, type BrandTokens as d, type BuilderBlock as e, type CarouselBlock as f, type CartesianChart as g, type ChannelOption as h, type Chart as i, type ChartAxisConfig as j, type ChartDataPoint as k, type ChartSeries as l, type ChartType as m, type ContainerBlock as n, type ContainerChildBlock as o, type ContextActionsBlock as p, type ContextActionsElement as q, type CustomEmoji as r, type FeedbackButtonsElement as s, type IconButtonIcon as t, type InputBlock as u, type PaletteVariant as v, type PieChart as w, type PieChartSegment as x, type PlanBlock as y, type PreviewHooks as z };
|
|
@@ -151,7 +151,7 @@ declare function buildVariantById(sections: readonly PaletteSection[]): Readonly
|
|
|
151
151
|
/**
|
|
152
152
|
* The Slack Block Kit block types supported by the builder in v1.
|
|
153
153
|
*/
|
|
154
|
-
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card';
|
|
154
|
+
type SupportedBlockType = 'section' | 'header' | 'divider' | 'context' | 'actions' | 'image' | 'markdown' | 'rich_text' | 'table' | 'alert' | 'card' | 'carousel' | 'context_actions' | 'input' | 'video' | 'plan' | 'task_card' | 'data_visualization' | 'container';
|
|
155
155
|
/**
|
|
156
156
|
* Slack `markdown` block payload. Renders standard markdown (GFM)
|
|
157
157
|
* via `slack-blocks-to-jsx`'s react-markdown integration.
|
|
@@ -399,6 +399,120 @@ interface PlanBlock {
|
|
|
399
399
|
tasks?: TaskCardBlock[];
|
|
400
400
|
block_id?: string;
|
|
401
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* One `{ label, value }` data point inside a {@link ChartSeries}. `label`
|
|
404
|
+
* is the x-axis category the point belongs to; `value` is the numeric
|
|
405
|
+
* measurement and may be negative.
|
|
406
|
+
*/
|
|
407
|
+
interface ChartDataPoint {
|
|
408
|
+
label: string;
|
|
409
|
+
value: number;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* A named series of {@link ChartDataPoint}s. Line / bar / area charts may
|
|
413
|
+
* carry one or more series; each renders as its own line, set of bars, or
|
|
414
|
+
* filled region with a matching legend entry.
|
|
415
|
+
*/
|
|
416
|
+
interface ChartSeries {
|
|
417
|
+
name: string;
|
|
418
|
+
data: ChartDataPoint[];
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Axis configuration shared by the cartesian chart types (line / bar /
|
|
422
|
+
* area). `categories` is the ordered set of x-axis tick labels; `x_label`
|
|
423
|
+
* and `y_label` title the axes.
|
|
424
|
+
*/
|
|
425
|
+
interface ChartAxisConfig {
|
|
426
|
+
categories: string[];
|
|
427
|
+
x_label?: string;
|
|
428
|
+
y_label?: string;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* One `{ label, value }` slice of a {@link PieChart}.
|
|
432
|
+
*/
|
|
433
|
+
interface PieChartSegment {
|
|
434
|
+
label: string;
|
|
435
|
+
value: number;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Cartesian chart spec (line / bar / area) used by a
|
|
439
|
+
* {@link DataVisualizationBlock}: one or more named series plotted against
|
|
440
|
+
* a shared category axis.
|
|
441
|
+
*/
|
|
442
|
+
interface CartesianChart {
|
|
443
|
+
type: 'line' | 'bar' | 'area';
|
|
444
|
+
series: ChartSeries[];
|
|
445
|
+
axis_config?: ChartAxisConfig;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Pie chart spec used by a {@link DataVisualizationBlock}. Unlike the
|
|
449
|
+
* cartesian charts it has no axes — just a flat list of labeled segments.
|
|
450
|
+
*/
|
|
451
|
+
interface PieChart {
|
|
452
|
+
type: 'pie';
|
|
453
|
+
segments: PieChartSegment[];
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* The `chart` payload of a {@link DataVisualizationBlock}: either a
|
|
457
|
+
* cartesian chart (line / bar / area) or a pie chart.
|
|
458
|
+
*/
|
|
459
|
+
type Chart = CartesianChart | PieChart;
|
|
460
|
+
/**
|
|
461
|
+
* The chart shape rendered by a {@link DataVisualizationBlock}.
|
|
462
|
+
*/
|
|
463
|
+
type ChartType = Chart['type'];
|
|
464
|
+
/**
|
|
465
|
+
* Slack `data_visualization` block payload. Renders a line, bar, area, or
|
|
466
|
+
* pie chart from inline data. Valid on the message surface only.
|
|
467
|
+
* `slack-web-api-client` doesn't ship this type yet, so we declare it.
|
|
468
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
|
|
469
|
+
*/
|
|
470
|
+
interface DataVisualizationBlock {
|
|
471
|
+
type: 'data_visualization';
|
|
472
|
+
title: string;
|
|
473
|
+
chart: Chart;
|
|
474
|
+
block_id?: string;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* A block allowed inside a {@link ContainerBlock}'s `child_blocks` array.
|
|
478
|
+
* Slack permits actions, context, divider, file, header, image, input,
|
|
479
|
+
* rich_text, section, table, and video — notably not `container` itself
|
|
480
|
+
* (no nesting) nor message-only chrome like card / carousel / markdown.
|
|
481
|
+
* This mirrors that set across the block types the builder models (`file`
|
|
482
|
+
* is omitted because the builder has no file block).
|
|
483
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/container-block
|
|
484
|
+
*/
|
|
485
|
+
type ContainerChildBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | RichTextBlock | TableBlock | InputBlock | VideoBlock;
|
|
486
|
+
/**
|
|
487
|
+
* Slack `container` block payload. A general-purpose wrapper that groups
|
|
488
|
+
* 1-10 child blocks into a single, optionally collapsible unit with a
|
|
489
|
+
* configurable width. Valid on the message surface only.
|
|
490
|
+
* `default_collapsed` only takes effect when `is_collapsible` is true.
|
|
491
|
+
*
|
|
492
|
+
* Note: despite what the API reference says, `title` and `subtitle` are
|
|
493
|
+
* `plain_text` text objects, not plain strings. `slack-web-api-client`
|
|
494
|
+
* doesn't ship this type yet, so we declare it.
|
|
495
|
+
* @see https://docs.slack.dev/reference/block-kit/blocks/container-block
|
|
496
|
+
*/
|
|
497
|
+
interface ContainerBlock {
|
|
498
|
+
type: 'container';
|
|
499
|
+
title: {
|
|
500
|
+
type: 'plain_text';
|
|
501
|
+
text: string;
|
|
502
|
+
emoji?: boolean;
|
|
503
|
+
};
|
|
504
|
+
child_blocks: ContainerChildBlock[];
|
|
505
|
+
subtitle?: {
|
|
506
|
+
type: 'plain_text';
|
|
507
|
+
text: string;
|
|
508
|
+
emoji?: boolean;
|
|
509
|
+
};
|
|
510
|
+
icon?: ImageElement;
|
|
511
|
+
width?: 'narrow' | 'standard' | 'wide' | 'full';
|
|
512
|
+
is_collapsible?: boolean;
|
|
513
|
+
default_collapsed?: boolean;
|
|
514
|
+
block_id?: string;
|
|
515
|
+
}
|
|
402
516
|
/**
|
|
403
517
|
* Header heading level shown in the preview. Slack's API has no
|
|
404
518
|
* `level` field on header blocks, so this is a builder-only extension
|
|
@@ -417,7 +531,7 @@ type SupportedHeaderBlock = HeaderBlock & {
|
|
|
417
531
|
* Subset of {@link AnyMessageBlock} from `slack-web-api-client`,
|
|
418
532
|
* plus a header `level` extension.
|
|
419
533
|
*/
|
|
420
|
-
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock;
|
|
534
|
+
type SupportedBlock = SectionBlock | SupportedHeaderBlock | DividerBlock | ContextBlock | ActionsBlock | ImageBlock | MarkdownBlock | RichTextBlock | TableBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | InputBlock | VideoBlock | PlanBlock | TaskCardBlock | DataVisualizationBlock | ContainerBlock;
|
|
421
535
|
/**
|
|
422
536
|
* A block as represented inside the builder's working state.
|
|
423
537
|
* `id` is an ephemeral client-side identifier used by DnD and selection.
|
|
@@ -732,4 +846,4 @@ interface BlockKitchenProps {
|
|
|
732
846
|
theme?: BrandTheme | BrandPreset;
|
|
733
847
|
}
|
|
734
848
|
|
|
735
|
-
export { type AlertBlock as A, type BlockKitchenProps as B, type CardBlock as C, type
|
|
849
|
+
export { extraAlertVariant as $, type AlertBlock as A, type BlockKitchenProps as B, type CardBlock as C, type DataVisualizationBlock as D, type PreviewSurface as E, type FeedbackButtonSubobject as F, type PreviewTheme as G, type HeaderLevel as H, type IconButtonElement as I, type SendPayload as J, type SendResult as K, type SupportedBlock as L, type MarkdownBlock as M, type SupportedBlockType as N, type SupportedHeaderBlock as O, type PaletteSection as P, type TableCell as Q, type TableColumnSetting as R, type SendAsUserStatus as S, type TableBlock as T, type TaskCardBlock as U, type TaskCardStatus as V, type Template as W, type UrlSourceElement as X, type VideoBlock as Y, buildVariantById as Z, defaultPalette as _, type AlertLevel as a, legacyInputVariants as a0, type BrandPreset as b, type BrandTheme as c, type BrandTokens as d, type BuilderBlock as e, type CarouselBlock as f, type CartesianChart as g, type ChannelOption as h, type Chart as i, type ChartAxisConfig as j, type ChartDataPoint as k, type ChartSeries as l, type ChartType as m, type ContainerBlock as n, type ContainerChildBlock as o, type ContextActionsBlock as p, type ContextActionsElement as q, type CustomEmoji as r, type FeedbackButtonsElement as s, type IconButtonIcon as t, type InputBlock as u, type PaletteVariant as v, type PieChart as w, type PieChartSegment as x, type PlanBlock as y, type PreviewHooks as z };
|
package/dist/palette.cjs
CHANGED
|
@@ -935,6 +935,186 @@ var defaultPalette = [
|
|
|
935
935
|
})
|
|
936
936
|
}
|
|
937
937
|
]
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
name: "Data Visualization",
|
|
941
|
+
icon: lucideReact.ChartColumnBig,
|
|
942
|
+
variants: [
|
|
943
|
+
{
|
|
944
|
+
id: "dataviz_line",
|
|
945
|
+
label: "Line chart",
|
|
946
|
+
factory: () => ({
|
|
947
|
+
type: "data_visualization",
|
|
948
|
+
title: "Weekly active users by platform",
|
|
949
|
+
chart: {
|
|
950
|
+
type: "line",
|
|
951
|
+
series: [
|
|
952
|
+
{
|
|
953
|
+
name: "Desktop",
|
|
954
|
+
data: [
|
|
955
|
+
{ label: "Mon", value: 800 },
|
|
956
|
+
{ label: "Tue", value: 920 },
|
|
957
|
+
{ label: "Wed", value: 880 },
|
|
958
|
+
{ label: "Thu", value: 1010 },
|
|
959
|
+
{ label: "Fri", value: 1120 }
|
|
960
|
+
]
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: "Mobile",
|
|
964
|
+
data: [
|
|
965
|
+
{ label: "Mon", value: 400 },
|
|
966
|
+
{ label: "Tue", value: 530 },
|
|
967
|
+
{ label: "Wed", value: 500 },
|
|
968
|
+
{ label: "Thu", value: 590 },
|
|
969
|
+
{ label: "Fri", value: 600 }
|
|
970
|
+
]
|
|
971
|
+
}
|
|
972
|
+
],
|
|
973
|
+
axis_config: {
|
|
974
|
+
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
|
|
975
|
+
x_label: "Day",
|
|
976
|
+
y_label: "Users"
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
})
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
id: "dataviz_bar",
|
|
983
|
+
label: "Bar chart",
|
|
984
|
+
factory: () => ({
|
|
985
|
+
type: "data_visualization",
|
|
986
|
+
title: "Messages sent by platform",
|
|
987
|
+
chart: {
|
|
988
|
+
type: "bar",
|
|
989
|
+
series: [
|
|
990
|
+
{
|
|
991
|
+
name: "Desktop",
|
|
992
|
+
data: [
|
|
993
|
+
{ label: "Mon", value: 1500 },
|
|
994
|
+
{ label: "Tue", value: 1400 },
|
|
995
|
+
{ label: "Wed", value: 1700 },
|
|
996
|
+
{ label: "Thu", value: 1600 },
|
|
997
|
+
{ label: "Fri", value: 1280 }
|
|
998
|
+
]
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: "Mobile",
|
|
1002
|
+
data: [
|
|
1003
|
+
{ label: "Mon", value: 800 },
|
|
1004
|
+
{ label: "Tue", value: 750 },
|
|
1005
|
+
{ label: "Wed", value: 920 },
|
|
1006
|
+
{ label: "Thu", value: 880 },
|
|
1007
|
+
{ label: "Fri", value: 700 }
|
|
1008
|
+
]
|
|
1009
|
+
}
|
|
1010
|
+
],
|
|
1011
|
+
axis_config: {
|
|
1012
|
+
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
|
|
1013
|
+
x_label: "Day",
|
|
1014
|
+
y_label: "Messages"
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
})
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
id: "dataviz_area",
|
|
1021
|
+
label: "Area chart",
|
|
1022
|
+
factory: () => ({
|
|
1023
|
+
type: "data_visualization",
|
|
1024
|
+
title: "Concurrent users by platform",
|
|
1025
|
+
chart: {
|
|
1026
|
+
type: "area",
|
|
1027
|
+
series: [
|
|
1028
|
+
{
|
|
1029
|
+
name: "Desktop",
|
|
1030
|
+
data: [
|
|
1031
|
+
{ label: "Mon", value: 2800 },
|
|
1032
|
+
{ label: "Tue", value: 3e3 },
|
|
1033
|
+
{ label: "Wed", value: 3400 },
|
|
1034
|
+
{ label: "Thu", value: 3200 },
|
|
1035
|
+
{ label: "Fri", value: 3500 }
|
|
1036
|
+
]
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
name: "Mobile",
|
|
1040
|
+
data: [
|
|
1041
|
+
{ label: "Mon", value: 1400 },
|
|
1042
|
+
{ label: "Tue", value: 1500 },
|
|
1043
|
+
{ label: "Wed", value: 1700 },
|
|
1044
|
+
{ label: "Thu", value: 1600 },
|
|
1045
|
+
{ label: "Fri", value: 1800 }
|
|
1046
|
+
]
|
|
1047
|
+
}
|
|
1048
|
+
],
|
|
1049
|
+
axis_config: {
|
|
1050
|
+
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
|
|
1051
|
+
x_label: "Day",
|
|
1052
|
+
y_label: "Users"
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
})
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
id: "dataviz_pie",
|
|
1059
|
+
label: "Pie chart",
|
|
1060
|
+
factory: () => ({
|
|
1061
|
+
type: "data_visualization",
|
|
1062
|
+
title: "Plan distribution by tier",
|
|
1063
|
+
chart: {
|
|
1064
|
+
type: "pie",
|
|
1065
|
+
segments: [
|
|
1066
|
+
{ label: "Free", value: 4200 },
|
|
1067
|
+
{ label: "Pro", value: 2300 },
|
|
1068
|
+
{ label: "Business+", value: 1100 },
|
|
1069
|
+
{ label: "Enterprise", value: 480 }
|
|
1070
|
+
]
|
|
1071
|
+
}
|
|
1072
|
+
})
|
|
1073
|
+
}
|
|
1074
|
+
]
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
name: "Container",
|
|
1078
|
+
icon: lucideReact.Container,
|
|
1079
|
+
variants: [
|
|
1080
|
+
{
|
|
1081
|
+
id: "container_collapsible",
|
|
1082
|
+
label: "Collapsible container",
|
|
1083
|
+
factory: () => ({
|
|
1084
|
+
type: "container",
|
|
1085
|
+
title: { type: "plain_text", text: "Bulk update: 2 records selected" },
|
|
1086
|
+
subtitle: { type: "plain_text", text: "Review changes before confirming" },
|
|
1087
|
+
is_collapsible: true,
|
|
1088
|
+
child_blocks: [
|
|
1089
|
+
{
|
|
1090
|
+
type: "section",
|
|
1091
|
+
text: { type: "mrkdwn", text: "*DCW-1024*\nStatus: Open \u2192 Closed" }
|
|
1092
|
+
},
|
|
1093
|
+
{ type: "divider" },
|
|
1094
|
+
{
|
|
1095
|
+
type: "section",
|
|
1096
|
+
text: { type: "mrkdwn", text: "*DCW-1025*\nStatus: In Progress \u2192 Closed" }
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
type: "actions",
|
|
1100
|
+
elements: [
|
|
1101
|
+
{
|
|
1102
|
+
type: "button",
|
|
1103
|
+
text: { type: "plain_text", text: "Confirm All", emoji: true },
|
|
1104
|
+
style: "primary",
|
|
1105
|
+
action_id: "bulk_confirm"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
type: "button",
|
|
1109
|
+
text: { type: "plain_text", text: "Cancel", emoji: true },
|
|
1110
|
+
action_id: "bulk_cancel"
|
|
1111
|
+
}
|
|
1112
|
+
]
|
|
1113
|
+
}
|
|
1114
|
+
]
|
|
1115
|
+
})
|
|
1116
|
+
}
|
|
1117
|
+
]
|
|
938
1118
|
}
|
|
939
1119
|
];
|
|
940
1120
|
var legacyInputVariants = [
|