wimui 0.51.2 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/_internal/FeedbackCloseButton.cjs +1 -1
- package/dist/components/_internal/FeedbackCloseButton.js +14 -13
- package/dist/components/_internal/FieldLabelContent.cjs +1 -1
- package/dist/components/_internal/FieldLabelContent.js +18 -17
- package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.js +46 -45
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.js +1 -1
- package/dist/components/ai/AgentStatus/AgentStatus.cjs +1 -1
- package/dist/components/ai/AgentStatus/AgentStatus.js +24 -23
- package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.cjs +1 -1
- package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.js +47 -45
- package/dist/components/ai/ChatUI/ChatUI.cjs +1 -1
- package/dist/components/ai/ChatUI/ChatUI.js +82 -81
- package/dist/components/ai/CodeBlock/CodeBlock.cjs +3 -3
- package/dist/components/ai/CodeBlock/CodeBlock.js +53 -52
- package/dist/components/ai/CodeBlock/code-block.module.cjs +1 -1
- package/dist/components/ai/CodeBlock/code-block.module.js +1 -1
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.cjs +2 -2
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.js +105 -104
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.cjs +1 -1
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.js +2 -2
- package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.cjs +1 -1
- package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.js +60 -59
- package/dist/components/ai/ModelSelector/ModelSelector.cjs +1 -1
- package/dist/components/ai/ModelSelector/ModelSelector.js +83 -82
- package/dist/components/ai/ModelSelector/model-selector.module.cjs +1 -1
- package/dist/components/ai/ModelSelector/model-selector.module.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.cjs +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +76 -75
- package/dist/components/ai/SourceCitation/SourceCitation.cjs +1 -1
- package/dist/components/ai/SourceCitation/SourceCitation.js +39 -38
- package/dist/components/ai/Terminal/Terminal.cjs +2 -2
- package/dist/components/ai/Terminal/Terminal.js +65 -64
- package/dist/components/ai/Terminal/terminal.module.cjs +1 -1
- package/dist/components/ai/Terminal/terminal.module.js +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.cjs +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.js +4 -4
- package/dist/components/ai/ThreadList/ThreadList.cjs +1 -1
- package/dist/components/ai/ThreadList/ThreadList.js +58 -57
- package/dist/components/ai/ThreadList/thread-list.module.cjs +1 -1
- package/dist/components/ai/ThreadList/thread-list.module.js +1 -1
- package/dist/components/data-display/Accordion/accordion.module.cjs +1 -1
- package/dist/components/data-display/Accordion/accordion.module.js +1 -1
- package/dist/components/data-display/Barcode/Barcode.cjs +1 -1
- package/dist/components/data-display/Barcode/Barcode.js +76 -75
- package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +75 -74
- package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
- package/dist/components/data-display/Calendar/calendar.module.js +1 -1
- package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.cjs +1 -1
- package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.js +54 -52
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.js +62 -61
- package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +1 -1
- package/dist/components/data-display/Chip/Chip.cjs +1 -1
- package/dist/components/data-display/Chip/Chip.js +36 -35
- package/dist/components/data-display/Comment/Comment.cjs +1 -1
- package/dist/components/data-display/Comment/Comment.js +58 -57
- package/dist/components/data-display/Comment/comment.module.cjs +1 -1
- package/dist/components/data-display/Comment/comment.module.js +1 -1
- package/dist/components/data-display/Countdown/Countdown.cjs +1 -1
- package/dist/components/data-display/Countdown/Countdown.js +56 -55
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +128 -127
- package/dist/components/data-display/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/data-display/JsonViewer/JsonViewer.js +153 -152
- package/dist/components/data-display/JsonViewer/json-viewer.module.cjs +1 -1
- package/dist/components/data-display/JsonViewer/json-viewer.module.js +3 -3
- package/dist/components/data-display/Kanban/Kanban.cjs +1 -1
- package/dist/components/data-display/Kanban/Kanban.js +95 -94
- package/dist/components/data-display/NodeGraph/NodeGraph.cjs +1 -1
- package/dist/components/data-display/NodeGraph/NodeGraph.js +62 -61
- package/dist/components/data-display/NodeGraph/node-graph.module.cjs +1 -1
- package/dist/components/data-display/NodeGraph/node-graph.module.js +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.cjs +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.js +153 -152
- package/dist/components/data-display/PivotTable/pivot-table.module.cjs +1 -1
- package/dist/components/data-display/PivotTable/pivot-table.module.js +1 -1
- package/dist/components/data-display/Presence/Presence.cjs +1 -1
- package/dist/components/data-display/Presence/Presence.js +28 -27
- package/dist/components/data-display/PullToRefresh/PullToRefresh.cjs +1 -1
- package/dist/components/data-display/PullToRefresh/PullToRefresh.js +73 -72
- package/dist/components/data-display/Reaction/Reaction.cjs +1 -1
- package/dist/components/data-display/Reaction/Reaction.js +31 -30
- package/dist/components/data-display/ScheduleView/ScheduleView.cjs +1 -1
- package/dist/components/data-display/ScheduleView/ScheduleView.js +49 -48
- package/dist/components/data-display/SortableList/SortableList.cjs +1 -1
- package/dist/components/data-display/SortableList/SortableList.js +44 -43
- package/dist/components/data-display/Tag/Tag.cjs +1 -1
- package/dist/components/data-display/Tag/Tag.js +29 -28
- package/dist/components/data-display/Tag/tag.module.cjs +1 -1
- package/dist/components/data-display/Tag/tag.module.js +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.js +85 -84
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.js +1 -1
- package/dist/components/data-display/TreeView/TreeView.cjs +1 -1
- package/dist/components/data-display/TreeView/TreeView.js +123 -122
- package/dist/components/feedback/Autosave/Autosave.cjs +1 -1
- package/dist/components/feedback/Autosave/Autosave.js +32 -31
- package/dist/components/feedback/Banner/banner.module.cjs +1 -1
- package/dist/components/feedback/Banner/banner.module.js +2 -2
- package/dist/components/feedback/ErrorBoundary/ErrorBoundary.cjs +1 -1
- package/dist/components/feedback/ErrorBoundary/ErrorBoundary.js +35 -34
- package/dist/components/feedback/Notification/notification.module.cjs +1 -1
- package/dist/components/feedback/Notification/notification.module.js +2 -2
- package/dist/components/feedback/ScrollProgress/ScrollProgress.cjs +1 -1
- package/dist/components/feedback/ScrollProgress/ScrollProgress.js +21 -20
- package/dist/components/feedback/Tour/Tour.cjs +1 -1
- package/dist/components/feedback/Tour/Tour.js +98 -97
- package/dist/components/form/Button/Button.cjs +1 -1
- package/dist/components/form/Button/Button.js +55 -54
- package/dist/components/form/ColorInput/ColorInput.cjs +1 -1
- package/dist/components/form/ColorInput/ColorInput.js +30 -29
- package/dist/components/form/ColorPicker/color-picker.module.cjs +1 -1
- package/dist/components/form/ColorPicker/color-picker.module.js +1 -1
- package/dist/components/form/Combobox/combobox.module.cjs +1 -1
- package/dist/components/form/Combobox/combobox.module.js +1 -1
- package/dist/components/form/CopyButton/CopyButton.cjs +1 -1
- package/dist/components/form/CopyButton/CopyButton.js +27 -26
- package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/form/DatePicker/DatePicker.js +47 -46
- package/dist/components/form/DatePicker/date-picker.module.cjs +1 -1
- package/dist/components/form/DatePicker/date-picker.module.js +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.js +36 -35
- package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
- package/dist/components/form/Dropzone/Dropzone.js +56 -55
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.js +47 -46
- package/dist/components/form/FloatButton/FloatButton.cjs +1 -1
- package/dist/components/form/FloatButton/FloatButton.d.ts +4 -1
- package/dist/components/form/FloatButton/FloatButton.js +6 -6
- package/dist/components/form/ImageCropper/ImageCropper.cjs +1 -1
- package/dist/components/form/ImageCropper/ImageCropper.js +101 -99
- package/dist/components/form/InlineEdit/InlineEdit.cjs +1 -1
- package/dist/components/form/InlineEdit/InlineEdit.js +66 -65
- package/dist/components/form/InlineEdit/inline-edit.module.cjs +1 -1
- package/dist/components/form/InlineEdit/inline-edit.module.js +1 -1
- package/dist/components/form/Input/Input.cjs +1 -1
- package/dist/components/form/Input/Input.js +45 -44
- package/dist/components/form/InputBase/InputBase.cjs +1 -1
- package/dist/components/form/InputBase/InputBase.js +51 -50
- package/dist/components/form/InputBase/input-base.module.cjs +1 -1
- package/dist/components/form/InputBase/input-base.module.js +1 -1
- package/dist/components/form/Mentions/mentions.module.cjs +1 -1
- package/dist/components/form/Mentions/mentions.module.js +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.cjs +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.js +1 -1
- package/dist/components/form/PasswordStrength/PasswordStrength.cjs +1 -1
- package/dist/components/form/PasswordStrength/PasswordStrength.js +27 -26
- package/dist/components/form/PhoneInput/PhoneInput.cjs +1 -1
- package/dist/components/form/PhoneInput/PhoneInput.js +10 -10
- package/dist/components/form/PhoneInput/phone-input.module.cjs +1 -1
- package/dist/components/form/PhoneInput/phone-input.module.js +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.cjs +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.js +90 -89
- package/dist/components/form/RangeSlider/RangeSlider.cjs +1 -1
- package/dist/components/form/RangeSlider/RangeSlider.js +30 -29
- package/dist/components/form/Rating/rating.module.cjs +1 -1
- package/dist/components/form/Rating/rating.module.js +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.cjs +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.js +223 -222
- package/dist/components/form/RichTextEditor/rich-text-editor.module.cjs +1 -1
- package/dist/components/form/RichTextEditor/rich-text-editor.module.js +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.js +7 -7
- package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
- package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
- package/dist/components/form/Select/Select.cjs +1 -1
- package/dist/components/form/Select/Select.js +112 -111
- package/dist/components/form/Select/select.module.cjs +1 -1
- package/dist/components/form/Select/select.module.js +1 -1
- package/dist/components/form/SignaturePad/SignaturePad.cjs +1 -1
- package/dist/components/form/SignaturePad/SignaturePad.js +86 -79
- package/dist/components/form/SmartSearchInput/SmartSearchInput.cjs +1 -1
- package/dist/components/form/SmartSearchInput/SmartSearchInput.js +63 -62
- package/dist/components/form/TagInput/TagInput.cjs +1 -1
- package/dist/components/form/TagInput/TagInput.js +68 -67
- package/dist/components/form/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/form/ThemeToggle/ThemeToggle.js +68 -67
- package/dist/components/form/ThemeToggle/theme-toggle.module.cjs +1 -1
- package/dist/components/form/ThemeToggle/theme-toggle.module.js +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.js +6 -6
- package/dist/components/form/ToggleGroup/toggle-group.module.cjs +1 -1
- package/dist/components/form/ToggleGroup/toggle-group.module.js +1 -1
- package/dist/components/form/Transfer/Transfer.cjs +1 -1
- package/dist/components/form/Transfer/Transfer.js +127 -126
- package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.js +6 -6
- package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
- package/dist/components/layout/Dashboard/Dashboard.js +90 -89
- package/dist/components/layout/Navbar/Navbar.cjs +1 -1
- package/dist/components/layout/Navbar/Navbar.d.ts +1 -1
- package/dist/components/layout/Navbar/Navbar.js +1 -1
- package/dist/components/layout/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/layout/Splitter/Splitter.cjs +1 -1
- package/dist/components/layout/Splitter/Splitter.js +40 -39
- package/dist/components/layout/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/layout/Toolbar/Toolbar.js +66 -39
- package/dist/components/media/Audio/Audio.cjs +1 -1
- package/dist/components/media/Audio/Audio.js +90 -89
- package/dist/components/media/Audio/components/AudioCustomControls.cjs +1 -1
- package/dist/components/media/Audio/components/AudioCustomControls.js +115 -114
- package/dist/components/media/Gallery/Gallery.cjs +1 -1
- package/dist/components/media/Gallery/Gallery.js +132 -131
- package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
- package/dist/components/media/ImageCompare/ImageCompare.js +72 -71
- package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.js +128 -127
- package/dist/components/media/Video/Video.cjs +1 -1
- package/dist/components/media/Video/Video.js +56 -55
- package/dist/components/media/Video/components/VideoAdvancedMenu.cjs +1 -1
- package/dist/components/media/Video/components/VideoAdvancedMenu.js +136 -135
- package/dist/components/media/Video/components/VideoControls.cjs +1 -1
- package/dist/components/media/Video/components/VideoControls.js +103 -102
- package/dist/components/navigation/BackTop/BackTop.cjs +1 -1
- package/dist/components/navigation/BackTop/BackTop.js +37 -36
- package/dist/components/navigation/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/navigation/Breadcrumb/Breadcrumb.js +41 -40
- package/dist/components/navigation/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/navigation/CommandPalette/CommandPalette.js +100 -99
- package/dist/components/navigation/CommandPalette/command-palette.module.cjs +1 -1
- package/dist/components/navigation/CommandPalette/command-palette.module.js +1 -1
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.d.ts +6 -0
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.js +32 -22
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.js +1 -1
- package/dist/components/navigation/Menubar/menubar.module.cjs +1 -1
- package/dist/components/navigation/Menubar/menubar.module.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +39 -38
- package/dist/components/navigation/SpeedDial/SpeedDial.cjs +1 -1
- package/dist/components/navigation/SpeedDial/SpeedDial.js +50 -47
- package/dist/components/navigation/TabBar/tab-bar.module.cjs +1 -1
- package/dist/components/navigation/TabBar/tab-bar.module.js +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.cjs +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.js +1 -1
- package/dist/components/navigation/Tabs/tabs.module.cjs +1 -1
- package/dist/components/navigation/Tabs/tabs.module.js +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/overlay/Popover/Popover.cjs +1 -1
- package/dist/components/overlay/Popover/Popover.js +63 -62
- package/dist/components/typography/Spoiler/Spoiler.cjs +1 -1
- package/dist/components/typography/Spoiler/Spoiler.js +38 -37
- package/dist/components/typography/Spoiler/spoiler.module.cjs +1 -1
- package/dist/components/typography/Spoiler/spoiler.module.js +1 -1
- package/dist/i18n/generated/common.cjs +2 -0
- package/dist/i18n/generated/common.d.ts +3 -0
- package/dist/i18n/generated/common.js +570 -0
- package/dist/i18n/generated/components.cjs +2 -0
- package/dist/i18n/generated/components.d.ts +3 -0
- package/dist/i18n/generated/components.js +399 -0
- package/dist/i18n/generated/data-display.cjs +2 -0
- package/dist/i18n/generated/data-display.d.ts +3 -0
- package/dist/i18n/generated/data-display.js +12 -0
- package/dist/i18n/generated/form.cjs +2 -0
- package/dist/i18n/generated/form.d.ts +3 -0
- package/dist/i18n/generated/form.js +321 -0
- package/dist/i18n/generated/keys.d.ts +5 -1
- package/dist/i18n/generated/locales.cjs +2 -0
- package/dist/i18n/generated/locales.d.ts +1 -0
- package/dist/i18n/generated/locales.js +9 -0
- package/dist/i18n/instance.cjs +1 -1
- package/dist/i18n/instance.d.ts +18 -3
- package/dist/i18n/instance.js +24 -26
- package/dist/i18n/useWimTranslation.cjs +1 -1
- package/dist/i18n/useWimTranslation.d.ts +7 -8
- package/dist/i18n/useWimTranslation.js +6 -5
- package/dist/llms-full.txt +7 -3
- package/dist/llms.txt +1 -1
- package/dist/locales/en/common.json +1 -1
- package/dist/locales/ja/common.json +1 -1
- package/dist/locales/pt/common.json +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +10 -10
- package/dist/i18n/generated/resources.cjs +0 -2
- package/dist/i18n/generated/resources.d.ts +0 -4
- package/dist/i18n/generated/resources.js +0 -1283
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import t from "../../../
|
|
4
|
-
import n from "../../../icon/chevron-
|
|
5
|
-
import r from "../../../icon/
|
|
6
|
-
import i from "../../../icon/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import s from "
|
|
10
|
-
import c
|
|
11
|
-
import f from "
|
|
12
|
-
import
|
|
3
|
+
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
|
+
import n from "../../../icon/chevron-down.js";
|
|
5
|
+
import r from "../../../icon/chevron-right.js";
|
|
6
|
+
import i from "../../../icon/plus.js";
|
|
7
|
+
import a from "../../../icon/trash.js";
|
|
8
|
+
import { Icon as o } from "../../media/Icon/Icon.js";
|
|
9
|
+
import { IconButton as s } from "../../form/IconButton/IconButton.js";
|
|
10
|
+
import c from "./json-viewer.module.js";
|
|
11
|
+
import l, { useCallback as u, useId as d, useState as f } from "react";
|
|
12
|
+
import p from "classnames";
|
|
13
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
13
14
|
//#region src/components/data-display/JsonViewer/JsonViewer.tsx
|
|
14
|
-
var
|
|
15
|
+
var g = (e, t, n) => {
|
|
15
16
|
if (t.length === 0) return n;
|
|
16
17
|
let [r, ...i] = t;
|
|
17
18
|
if (Array.isArray(e)) {
|
|
18
19
|
let t = [...e];
|
|
19
|
-
return t[r] =
|
|
20
|
+
return t[r] = g(e[r], i, n), t;
|
|
20
21
|
}
|
|
21
22
|
return typeof e == "object" && e ? {
|
|
22
23
|
...e,
|
|
23
|
-
[r]:
|
|
24
|
+
[r]: g(e[r], i, n)
|
|
24
25
|
} : e;
|
|
25
|
-
},
|
|
26
|
+
}, _ = (e, t) => {
|
|
26
27
|
if (t.length === 0) return e;
|
|
27
28
|
let [n, ...r] = t;
|
|
28
29
|
if (t.length === 1) {
|
|
@@ -35,13 +36,13 @@ var h = (e, t, n) => {
|
|
|
35
36
|
}
|
|
36
37
|
if (Array.isArray(e)) {
|
|
37
38
|
let t = [...e];
|
|
38
|
-
return t[n] =
|
|
39
|
+
return t[n] = _(e[n], r), t;
|
|
39
40
|
}
|
|
40
41
|
return typeof e == "object" && e ? {
|
|
41
42
|
...e,
|
|
42
|
-
[n]:
|
|
43
|
+
[n]: _(e[n], r)
|
|
43
44
|
} : e;
|
|
44
|
-
},
|
|
45
|
+
}, v = (e, t, n) => {
|
|
45
46
|
if (t.length === 0) return Array.isArray(e) ? [...e, ""] : typeof e == "object" && e ? {
|
|
46
47
|
...e,
|
|
47
48
|
[n || "new_key"]: ""
|
|
@@ -49,218 +50,218 @@ var h = (e, t, n) => {
|
|
|
49
50
|
let [r, ...i] = t;
|
|
50
51
|
if (Array.isArray(e)) {
|
|
51
52
|
let t = [...e];
|
|
52
|
-
return t[r] =
|
|
53
|
+
return t[r] = v(e[r], i, n), t;
|
|
53
54
|
}
|
|
54
55
|
return typeof e == "object" && e ? {
|
|
55
56
|
...e,
|
|
56
|
-
[r]:
|
|
57
|
+
[r]: v(e[r], i, n)
|
|
57
58
|
} : e;
|
|
58
|
-
},
|
|
59
|
-
let [r, i] =
|
|
60
|
-
|
|
61
|
-
r &&
|
|
59
|
+
}, y = ({ value: e, onSave: t, className: n }) => {
|
|
60
|
+
let [r, i] = f(!1), [a, o] = f(String(e)), s = l.useRef(null);
|
|
61
|
+
l.useEffect(() => {
|
|
62
|
+
r && s.current && s.current.focus();
|
|
62
63
|
}, [r]);
|
|
63
64
|
let u = () => {
|
|
64
65
|
i(!1);
|
|
65
66
|
let n = a;
|
|
66
67
|
typeof e == "number" && (n = Number(a)), typeof e == "boolean" && (n = a === "true"), a === "null" && (n = null), t(n);
|
|
67
68
|
};
|
|
68
|
-
return r ? /* @__PURE__ */
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
69
|
+
return r ? /* @__PURE__ */ m("input", {
|
|
70
|
+
ref: s,
|
|
71
|
+
className: c.input,
|
|
71
72
|
value: a,
|
|
72
73
|
onChange: (e) => o(e.target.value),
|
|
73
74
|
onBlur: u,
|
|
74
75
|
onKeyDown: (e) => {
|
|
75
76
|
e.key === "Enter" && u(), e.key === "Escape" && i(!1);
|
|
76
77
|
}
|
|
77
|
-
}) : /* @__PURE__ */
|
|
78
|
+
}) : /* @__PURE__ */ m("span", {
|
|
78
79
|
role: "button",
|
|
79
80
|
tabIndex: 0,
|
|
80
|
-
className:
|
|
81
|
+
className: p(c.value, n, c.editable),
|
|
81
82
|
onClick: () => i(!0),
|
|
82
83
|
onKeyDown: (e) => {
|
|
83
84
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i(!0));
|
|
84
85
|
},
|
|
85
86
|
children: typeof e == "string" ? `"${e}"` : String(e)
|
|
86
87
|
});
|
|
87
|
-
},
|
|
88
|
-
let { t:
|
|
89
|
-
className:
|
|
90
|
-
children: [
|
|
88
|
+
}, b = ({ label: s, value: l, depth: u, currentDepth: d, path: g, editable: _, onUpdate: v, onDelete: x, onAdd: S }) => {
|
|
89
|
+
let { t: C } = e(t), [w, T] = f(d < u), E = typeof l == "object" && !!l, D = Array.isArray(l), O = () => T(!w), k = () => _ ? /* @__PURE__ */ h("div", {
|
|
90
|
+
className: c.actions,
|
|
91
|
+
children: [E && /* @__PURE__ */ m("button", {
|
|
91
92
|
type: "button",
|
|
92
|
-
className:
|
|
93
|
+
className: c.nodeAction,
|
|
93
94
|
onClick: (e) => {
|
|
94
|
-
e.stopPropagation(),
|
|
95
|
+
e.stopPropagation(), S(g);
|
|
95
96
|
},
|
|
96
|
-
title:
|
|
97
|
-
"aria-label":
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
component:
|
|
97
|
+
title: C("jsonViewer.addItem"),
|
|
98
|
+
"aria-label": C("jsonViewer.addItem"),
|
|
99
|
+
children: /* @__PURE__ */ m(o, {
|
|
100
|
+
component: i,
|
|
100
101
|
size: "xs"
|
|
101
102
|
})
|
|
102
|
-
}),
|
|
103
|
+
}), d > 0 && /* @__PURE__ */ m("button", {
|
|
103
104
|
type: "button",
|
|
104
|
-
className:
|
|
105
|
+
className: p(c.nodeAction, c.delete),
|
|
105
106
|
onClick: (e) => {
|
|
106
|
-
e.stopPropagation(),
|
|
107
|
+
e.stopPropagation(), x(g);
|
|
107
108
|
},
|
|
108
|
-
title:
|
|
109
|
-
"aria-label":
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
-
component:
|
|
109
|
+
title: C("jsonViewer.deleteItem"),
|
|
110
|
+
"aria-label": C("jsonViewer.deleteItem"),
|
|
111
|
+
children: /* @__PURE__ */ m(o, {
|
|
112
|
+
component: a,
|
|
112
113
|
size: "xs"
|
|
113
114
|
})
|
|
114
115
|
})]
|
|
115
116
|
}) : null;
|
|
116
|
-
if (!
|
|
117
|
-
className:
|
|
117
|
+
if (!E) return /* @__PURE__ */ h("div", {
|
|
118
|
+
className: c.node,
|
|
118
119
|
children: [
|
|
119
|
-
|
|
120
|
-
className:
|
|
121
|
-
children: [
|
|
120
|
+
s && /* @__PURE__ */ h("span", {
|
|
121
|
+
className: c.key,
|
|
122
|
+
children: [s, ":"]
|
|
122
123
|
}),
|
|
123
|
-
|
|
124
|
-
value:
|
|
125
|
-
onSave: (e) =>
|
|
126
|
-
className:
|
|
127
|
-
}) : /* @__PURE__ */
|
|
128
|
-
className:
|
|
129
|
-
children: typeof
|
|
124
|
+
_ ? /* @__PURE__ */ m(y, {
|
|
125
|
+
value: l,
|
|
126
|
+
onSave: (e) => v(g, e),
|
|
127
|
+
className: c[l === null ? "null" : typeof l]
|
|
128
|
+
}) : /* @__PURE__ */ m("span", {
|
|
129
|
+
className: p(c.value, c[l === null ? "null" : typeof l]),
|
|
130
|
+
children: typeof l == "string" ? `"${l}"` : String(l)
|
|
130
131
|
}),
|
|
131
|
-
|
|
132
|
+
k()
|
|
132
133
|
]
|
|
133
134
|
});
|
|
134
|
-
let
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
className:
|
|
135
|
+
let A = D ? l.length === 0 : Object.keys(l).length === 0;
|
|
136
|
+
return /* @__PURE__ */ h("div", {
|
|
137
|
+
className: c.node,
|
|
137
138
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
className:
|
|
140
|
-
children: [/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ h("div", {
|
|
140
|
+
className: c.headerRow,
|
|
141
|
+
children: [/* @__PURE__ */ h("div", {
|
|
141
142
|
role: "button",
|
|
142
|
-
tabIndex:
|
|
143
|
-
className:
|
|
144
|
-
onClick:
|
|
143
|
+
tabIndex: A ? -1 : 0,
|
|
144
|
+
className: p(c.header, !A && c.collapsible),
|
|
145
|
+
onClick: A ? void 0 : O,
|
|
145
146
|
onKeyDown: (e) => {
|
|
146
|
-
!
|
|
147
|
+
!A && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
|
|
147
148
|
},
|
|
148
149
|
children: [
|
|
149
|
-
!
|
|
150
|
-
component:
|
|
150
|
+
!A && /* @__PURE__ */ m(o, {
|
|
151
|
+
component: w ? n : r,
|
|
151
152
|
size: "sm",
|
|
152
|
-
className:
|
|
153
|
+
className: c.toggle
|
|
153
154
|
}),
|
|
154
|
-
|
|
155
|
-
className:
|
|
156
|
-
children: [
|
|
155
|
+
s && /* @__PURE__ */ h("span", {
|
|
156
|
+
className: c.key,
|
|
157
|
+
children: [s, ":"]
|
|
157
158
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
className:
|
|
160
|
-
children:
|
|
159
|
+
/* @__PURE__ */ m("span", {
|
|
160
|
+
className: c.bracket,
|
|
161
|
+
children: D ? "[" : "{"
|
|
161
162
|
}),
|
|
162
|
-
!
|
|
163
|
-
className:
|
|
163
|
+
!w && !A && /* @__PURE__ */ m("span", {
|
|
164
|
+
className: c.ellipsis,
|
|
164
165
|
children: "..."
|
|
165
166
|
}),
|
|
166
|
-
!
|
|
167
|
-
className:
|
|
168
|
-
children:
|
|
167
|
+
!w && /* @__PURE__ */ m("span", {
|
|
168
|
+
className: c.bracket,
|
|
169
|
+
children: D ? "]" : "}"
|
|
169
170
|
}),
|
|
170
|
-
|
|
171
|
-
className:
|
|
172
|
-
children:
|
|
171
|
+
w && /* @__PURE__ */ m("span", {
|
|
172
|
+
className: c.count,
|
|
173
|
+
children: D ? `${l.length} items` : `${Object.keys(l).length} keys`
|
|
173
174
|
})
|
|
174
175
|
]
|
|
175
|
-
}),
|
|
176
|
+
}), k()]
|
|
176
177
|
}),
|
|
177
|
-
|
|
178
|
-
className:
|
|
179
|
-
children:
|
|
178
|
+
w && !A && /* @__PURE__ */ m("div", {
|
|
179
|
+
className: c.children,
|
|
180
|
+
children: D ? l.map((e, t) => /* @__PURE__ */ m(b, {
|
|
180
181
|
value: e,
|
|
181
|
-
depth:
|
|
182
|
-
currentDepth:
|
|
183
|
-
path: [...
|
|
184
|
-
editable:
|
|
185
|
-
onUpdate:
|
|
186
|
-
onDelete:
|
|
187
|
-
onAdd:
|
|
188
|
-
}, t)) : Object.entries(
|
|
182
|
+
depth: u,
|
|
183
|
+
currentDepth: d + 1,
|
|
184
|
+
path: [...g, t],
|
|
185
|
+
editable: _,
|
|
186
|
+
onUpdate: v,
|
|
187
|
+
onDelete: x,
|
|
188
|
+
onAdd: S
|
|
189
|
+
}, t)) : Object.entries(l).map(([e, t]) => /* @__PURE__ */ m(b, {
|
|
189
190
|
label: e,
|
|
190
191
|
value: t,
|
|
191
|
-
depth:
|
|
192
|
-
currentDepth:
|
|
193
|
-
path: [...
|
|
194
|
-
editable:
|
|
195
|
-
onUpdate:
|
|
196
|
-
onDelete:
|
|
197
|
-
onAdd:
|
|
192
|
+
depth: u,
|
|
193
|
+
currentDepth: d + 1,
|
|
194
|
+
path: [...g, e],
|
|
195
|
+
editable: _,
|
|
196
|
+
onUpdate: v,
|
|
197
|
+
onDelete: x,
|
|
198
|
+
onAdd: S
|
|
198
199
|
}, e))
|
|
199
200
|
}),
|
|
200
|
-
|
|
201
|
-
className:
|
|
202
|
-
children: /* @__PURE__ */
|
|
203
|
-
className:
|
|
204
|
-
children:
|
|
201
|
+
w && /* @__PURE__ */ m("div", {
|
|
202
|
+
className: c.footer,
|
|
203
|
+
children: /* @__PURE__ */ m("span", {
|
|
204
|
+
className: c.bracket,
|
|
205
|
+
children: D ? "]" : "}"
|
|
205
206
|
})
|
|
206
207
|
})
|
|
207
208
|
]
|
|
208
209
|
});
|
|
209
|
-
},
|
|
210
|
-
let { t:
|
|
211
|
-
|
|
212
|
-
let
|
|
213
|
-
|
|
214
|
-
let r =
|
|
215
|
-
return
|
|
210
|
+
}, x = l.forwardRef(({ data: n, expandDepth: r = 1, showCopy: i = !0, showToolbar: a = !0, editable: o = !1, onChange: l, className: y, ...x }, S) => {
|
|
211
|
+
let { t: C } = e(t), [w, T] = f(n), [E, D] = f(n), O = d();
|
|
212
|
+
n !== E && (T(n), D(n));
|
|
213
|
+
let k = u((e, t) => {
|
|
214
|
+
T((n) => {
|
|
215
|
+
let r = g(n, e, t);
|
|
216
|
+
return l?.(r), r;
|
|
216
217
|
});
|
|
217
|
-
}, [
|
|
218
|
-
|
|
219
|
-
let n = g(t, e);
|
|
220
|
-
return c?.(n), n;
|
|
221
|
-
});
|
|
222
|
-
}, [c]), A = l((e) => {
|
|
223
|
-
w((t) => {
|
|
218
|
+
}, [l]), A = u((e) => {
|
|
219
|
+
T((t) => {
|
|
224
220
|
let n = _(t, e);
|
|
225
|
-
return
|
|
221
|
+
return l?.(n), n;
|
|
222
|
+
});
|
|
223
|
+
}, [l]), j = u((e) => {
|
|
224
|
+
T((t) => {
|
|
225
|
+
let n = v(t, e);
|
|
226
|
+
return l?.(n), n;
|
|
226
227
|
});
|
|
227
|
-
}, [
|
|
228
|
-
navigator.clipboard.writeText(JSON.stringify(
|
|
228
|
+
}, [l]), M = () => {
|
|
229
|
+
navigator.clipboard.writeText(JSON.stringify(w, null, 2));
|
|
229
230
|
};
|
|
230
|
-
return /* @__PURE__ */
|
|
231
|
-
ref:
|
|
232
|
-
className:
|
|
233
|
-
role:
|
|
234
|
-
"aria-labelledby":
|
|
235
|
-
...
|
|
236
|
-
children: [
|
|
237
|
-
className:
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
-
id:
|
|
240
|
-
className:
|
|
241
|
-
children:
|
|
242
|
-
}),
|
|
231
|
+
return /* @__PURE__ */ h("div", {
|
|
232
|
+
ref: S,
|
|
233
|
+
className: p("wim-json-viewer", c.root, y),
|
|
234
|
+
role: a ? "group" : void 0,
|
|
235
|
+
"aria-labelledby": a ? O : void 0,
|
|
236
|
+
...x,
|
|
237
|
+
children: [a && /* @__PURE__ */ h("div", {
|
|
238
|
+
className: c.toolbar,
|
|
239
|
+
children: [/* @__PURE__ */ m("span", {
|
|
240
|
+
id: O,
|
|
241
|
+
className: c.title,
|
|
242
|
+
children: C(o ? "jsonViewer.edit" : "jsonViewer.title")
|
|
243
|
+
}), i && /* @__PURE__ */ m(s, {
|
|
243
244
|
iconName: "CopyIcon",
|
|
244
245
|
variant: "ghost",
|
|
245
246
|
size: "sm",
|
|
246
|
-
onClick:
|
|
247
|
-
"aria-label":
|
|
247
|
+
onClick: M,
|
|
248
|
+
"aria-label": C("jsonViewer.copy")
|
|
248
249
|
})]
|
|
249
|
-
}), /* @__PURE__ */
|
|
250
|
-
className:
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
-
value:
|
|
253
|
-
depth:
|
|
250
|
+
}), /* @__PURE__ */ m("div", {
|
|
251
|
+
className: c.tree,
|
|
252
|
+
children: /* @__PURE__ */ m(b, {
|
|
253
|
+
value: w,
|
|
254
|
+
depth: r,
|
|
254
255
|
currentDepth: 0,
|
|
255
256
|
path: [],
|
|
256
|
-
editable:
|
|
257
|
-
onUpdate:
|
|
258
|
-
onDelete:
|
|
259
|
-
onAdd:
|
|
257
|
+
editable: o,
|
|
258
|
+
onUpdate: k,
|
|
259
|
+
onDelete: A,
|
|
260
|
+
onAdd: j
|
|
260
261
|
})
|
|
261
262
|
})]
|
|
262
263
|
});
|
|
263
264
|
});
|
|
264
|
-
|
|
265
|
+
x.displayName = "JsonViewer";
|
|
265
266
|
//#endregion
|
|
266
|
-
export {
|
|
267
|
+
export { x as JsonViewer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_2byyv_29`,t=`_toolbar_2byyv_43`,n=`_title_2byyv_51`,r=`_tree_2byyv_58`,i=`_node_2byyv_63`,a=`_actions_2byyv_69`,o=`_headerRow_2byyv_69`,s=`_header_2byyv_69`,c=`_collapsible_2byyv_87`,l=`_toggle_2byyv_90`,u=`_nodeAction_2byyv_104`,d=`_input_2byyv_127`,f=`_keyInput_2byyv_138`,p=`_children_2byyv_145`,m=`_footer_2byyv_149`,h=`_key_2byyv_138`,g=`_value_2byyv_156`,_=`_string_2byyv_156`,v=`_number_2byyv_159`,y=`_boolean_2byyv_162`,b=`_editable_2byyv_169`,x=`_bracket_2byyv_186`,S=`_count_2byyv_190`,C=`_ellipsis_2byyv_195`,w={root:e,toolbar:t,title:n,tree:r,node:i,actions:a,headerRow:o,header:s,collapsible:c,toggle:l,nodeAction:u,delete:`_delete_2byyv_123`,input:d,keyInput:f,children:p,footer:m,key:h,value:g,string:_,number:v,boolean:y,null:`_null_2byyv_165`,editable:b,bracket:x,count:S,ellipsis:C};exports.actions=a,exports.boolean=y,exports.bracket=x,exports.children=p,exports.collapsible=c,exports.count=S,exports.default=w,exports.editable=b,exports.ellipsis=C,exports.footer=m,exports.header=s,exports.headerRow=o,exports.input=d,exports.key=h,exports.keyInput=f,exports.node=i,exports.nodeAction=u,exports.number=v,exports.root=e,exports.string=_,exports.title=n,exports.toggle=l,exports.toolbar=t,exports.tree=r,exports.value=g;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/JsonViewer/json-viewer.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_2byyv_29", t = "_toolbar_2byyv_43", n = "_title_2byyv_51", r = "_tree_2byyv_58", i = "_node_2byyv_63", a = "_actions_2byyv_69", o = "_headerRow_2byyv_69", s = "_header_2byyv_69", c = "_collapsible_2byyv_87", l = "_toggle_2byyv_90", u = "_nodeAction_2byyv_104", d = "_input_2byyv_127", f = "_keyInput_2byyv_138", p = "_children_2byyv_145", m = "_footer_2byyv_149", h = "_key_2byyv_138", g = "_value_2byyv_156", _ = "_string_2byyv_156", v = "_number_2byyv_159", y = "_boolean_2byyv_162", b = "_editable_2byyv_169", x = "_bracket_2byyv_186", S = "_count_2byyv_190", C = "_ellipsis_2byyv_195", w = {
|
|
4
4
|
root: e,
|
|
5
5
|
toolbar: t,
|
|
6
6
|
title: n,
|
|
@@ -12,7 +12,7 @@ var e = "_root_y7rax_29", t = "_toolbar_y7rax_43", n = "_title_y7rax_51", r = "_
|
|
|
12
12
|
collapsible: c,
|
|
13
13
|
toggle: l,
|
|
14
14
|
nodeAction: u,
|
|
15
|
-
delete: "
|
|
15
|
+
delete: "_delete_2byyv_123",
|
|
16
16
|
input: d,
|
|
17
17
|
keyInput: f,
|
|
18
18
|
children: p,
|
|
@@ -22,7 +22,7 @@ var e = "_root_y7rax_29", t = "_toolbar_y7rax_43", n = "_title_y7rax_51", r = "_
|
|
|
22
22
|
string: _,
|
|
23
23
|
number: v,
|
|
24
24
|
boolean: y,
|
|
25
|
-
null: "
|
|
25
|
+
null: "_null_2byyv_165",
|
|
26
26
|
editable: b,
|
|
27
27
|
bracket: x,
|
|
28
28
|
count: S,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../i18n/generated/common.cjs"),i=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),a=require("../../../icon/more-horizontal.cjs"),o=require("../../media/Icon/Icon.cjs"),s=require("./kanban.module.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=(0,c.forwardRef)(({columns:e,onMove:i,onCardMove:a,className:o,forceMobileUI:d=!1,children:p,asChild:m=!1,...g},v)=>{let{t:y}=n.useWimTranslation(r.commonNs),[b,x]=(0,c.useState)(null),[S,C]=(0,c.useState)(null),[w,T]=(0,c.useState)(null),E=i||a,D=(e,t,n)=>{x({itemId:t,columnId:n}),e.dataTransfer.setData(`text/plain`,`${n}:${t}`),e.dataTransfer.effectAllowed=`move`},O=(e,t)=>{e.preventDefault(),C(t)},k=(e,t)=>{e.preventDefault(),C(null);let[n,r]=e.dataTransfer.getData(`text/plain`).split(`:`);E?.(r,n,t),x(null)},A=(e,t,n)=>{E?.(e,t,n),T(null)},j=c.default.useMemo(()=>{if(e)return e;let t=[];return c.default.Children.forEach(p,e=>{if(c.default.isValidElement(e)){let n=e.props;typeof n.id==`string`&&typeof n.title==`string`&&t.push({id:n.id,title:n.title,items:[]})}}),t},[p,e]),M=()=>p||(e?e.map(e=>(0,u.jsx)(_,{id:e.id,title:e.title,cardCount:e.items.length,children:e.items.map(e=>(0,u.jsx)(h,{id:e.id,children:e.content},e.id))},e.id)):null),N=m?t.Root:`div`;return(0,u.jsx)(f.Provider,{value:{draggedItem:b,dragOverColumn:S,setDragOverColumn:C,handleDragStart:D,handleDragOver:O,handleDrop:k,handleMobileMove:A,activeMobileMenu:w,setActiveMobileMenu:T,columns:j},children:(0,u.jsx)(N,{...g,ref:v,className:(0,l.default)(`wim-kanban`,s.default.root,d&&s.default.touch,o),role:`region`,"aria-label":y(`a11y.kanban_board`),tabIndex:0,children:(0,u.jsx)(t.Slottable,{children:M()})})})}),f=c.default.createContext(null),p=()=>{let e=c.default.useContext(f);if(!e)throw Error(`Kanban compound components must be used within Kanban`);return e},m=({id:e,title:t,cardCount:a,children:o,className:d})=>{let{dragOverColumn:f,handleDragOver:m,handleDrop:h,setDragOverColumn:g}=p(),{t:_}=n.useWimTranslation(r.commonNs),v=c.default.useId();return(0,u.jsxs)(`div`,{className:(0,l.default)(s.default.column,{[s.default.dragOver]:f===e},d),role:`group`,"aria-labelledby":t?v:void 0,onDragOver:t=>m(t,e),onDrop:t=>h(t,e),onDragLeave:()=>g(null),children:[(0,u.jsxs)(`div`,{className:s.default.columnHeader,children:[(0,u.jsx)(`div`,{id:v,className:s.default.columnTitle,"aria-hidden":`true`,children:t}),a!==void 0&&(0,u.jsxs)(`div`,{className:s.default.columnCount,children:[(0,u.jsx)(`span`,{"aria-hidden":`true`,children:a}),(0,u.jsx)(i.VisuallyHidden,{children:_(`a11y.kanban_column_count`,{count:a})})]})]}),(0,u.jsx)(`div`,{className:s.default.columnBody,children:o})]})},h=({id:e,children:t,disabled:i,className:d})=>{let{t:f}=n.useWimTranslation(r.commonNs),{draggedItem:m,handleDragStart:h,handleMobileMove:_,activeMobileMenu:v,setActiveMobileMenu:y,columns:b}=p(),x=c.default.useContext(g);return(0,u.jsxs)(`div`,{className:(0,l.default)(s.default.card,{[s.default.dragging]:m?.itemId===e,[s.default.disabled]:i},d),draggable:!i,onDragStart:t=>x&&h(t,e,x),children:[(0,u.jsx)(`div`,{className:s.default.cardContent,children:t}),(0,u.jsxs)(`div`,{className:s.default.cardMove,children:[(0,u.jsx)(`button`,{type:`button`,className:s.default.cardMoveBtn,onClick:()=>y(v===e?null:e),"aria-label":f(`a11y.move_card`),disabled:i,children:(0,u.jsx)(o.Icon,{component:a.default,size:`sm`})}),v===e&&(0,u.jsx)(`div`,{className:s.default.cardMoveMenu,role:`listbox`,"aria-label":f(`a11y.move_to_column`),children:b.filter(e=>e.id!==x).map(t=>(0,u.jsx)(`button`,{type:`button`,className:s.default.cardMoveOption,onClick:()=>x&&_(e,x,t.id),role:`option`,"aria-selected":!1,children:t.title},t.id))})]})]})},g=c.default.createContext(null),_=e=>(0,u.jsx)(g.Provider,{value:e.id,children:(0,u.jsx)(m,{...e})}),v=d;v.Column=_,v.Card=h,d.displayName=`Kanban`,v.displayName=`KanbanBoard`,m.displayName=`KanbanColumn`,h.displayName=`KanbanCard`,_.displayName=`KanbanColumnWrapper`,exports.Kanban=d,exports.KanbanBoard=v,exports.default=v,exports.KanbanCard=h,exports.KanbanColumn=m;
|