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,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import {
|
|
4
|
-
import n from "
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { useMergedRef as t } from "../../../hooks/useMergedRef.js";
|
|
4
|
+
import { VisuallyHidden as n } from "../../layout/VisuallyHidden/VisuallyHidden.js";
|
|
5
|
+
import { componentsNs as r } from "../../../i18n/generated/components.js";
|
|
6
|
+
import i from "../../../icon/chevron-right.js";
|
|
7
|
+
import { Icon as a } from "../../media/Icon/Icon.js";
|
|
8
|
+
import { Table as o } from "../Table/Table.js";
|
|
9
|
+
import { layoutPivotColumns as s, layoutPivotRows as ee, pivotRowWindow as te } from "./layoutPivot.js";
|
|
9
10
|
import c from "./pivot-table.module.js";
|
|
10
|
-
import l, { useCallback as
|
|
11
|
-
import
|
|
12
|
-
import { jsx as
|
|
11
|
+
import l, { useCallback as ne, useMemo as u, useState as d } from "react";
|
|
12
|
+
import f from "classnames";
|
|
13
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
14
|
//#region src/components/data-display/PivotTable/PivotTable.tsx
|
|
14
|
-
var
|
|
15
|
-
for (let n of e) n.children?.length && (t.push(n.key),
|
|
15
|
+
var h = 40, re = 8, ie = 30, g = "corner", _ = (e, t = []) => {
|
|
16
|
+
for (let n of e) n.children?.length && (t.push(n.key), _(n.children, t));
|
|
16
17
|
return t;
|
|
17
|
-
},
|
|
18
|
-
let [i, a] =
|
|
19
|
-
return [s,
|
|
18
|
+
}, ae = (e, t, n, r) => {
|
|
19
|
+
let [i, a] = d(() => n ?? _(e)), o = t ?? i, s = u(() => new Set(o), [o]);
|
|
20
|
+
return [s, ne((e) => {
|
|
20
21
|
let n = s.has(e) ? o.filter((t) => t !== e) : [...o, e];
|
|
21
22
|
t === void 0 && a(n), r?.(n);
|
|
22
23
|
}, [
|
|
@@ -25,261 +26,261 @@ var g = 40, te = 8, ne = 30, _ = "corner", v = (e, t = []) => {
|
|
|
25
26
|
t,
|
|
26
27
|
r
|
|
27
28
|
])];
|
|
28
|
-
},
|
|
29
|
-
let { t:
|
|
30
|
-
subtotals:
|
|
31
|
-
total:
|
|
32
|
-
isExpanded: (e) =>
|
|
29
|
+
}, v = l.forwardRef(({ rows: v, columns: y, getValue: b, rowAxisLabel: x, caption: S, expandedRowValues: oe, defaultExpandedRowValues: se, onExpandedRowChange: ce, expandedColumnValues: le, defaultExpandedColumnValues: ue, onExpandedColumnChange: de, maxHeight: fe, stickyHeader: C = !1, stickyRowHeaders: pe = !1, virtualized: w = !1, columnSubtotals: me = !1, totalRow: he = !1, totalColumn: ge = !1, labels: _e, className: ve, ...T }, ye) => {
|
|
30
|
+
let { t: be } = e(r), E = l.useId(), D = _e?.total ?? be("pivottable.total"), [O, xe] = ae(v, oe, se, ce), [k, Se] = ae(y, le, ue, de), A = u(() => s(y, {
|
|
31
|
+
subtotals: me,
|
|
32
|
+
total: ge,
|
|
33
|
+
isExpanded: (e) => k.has(e)
|
|
33
34
|
}), [
|
|
34
|
-
|
|
35
|
-
fe,
|
|
35
|
+
y,
|
|
36
36
|
me,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
ge,
|
|
38
|
+
k
|
|
39
|
+
]), j = u(() => ee(v, (e) => O.has(e)), [v, O]), M = u(() => _(v).length > 0, [v]), N = u(() => _(y).length > 0, [y]), P = x != null && x !== !1, F = `${E}corner`, Ce = (e) => `${E}c${e}`, I = (e) => `${E}r${e}`, L = `${E}total`, R = u(() => A.columns.map((e) => e.headerIds.map((e) => `${E}c${e}`).join(" ")), [A, E]), z = l.useRef(null), B = l.useRef(null), [V, we] = l.useState(!1), [Te, Ee] = l.useState(!0);
|
|
39
40
|
l.useLayoutEffect(() => {
|
|
40
|
-
let e =
|
|
41
|
+
let e = z.current, t = B.current;
|
|
41
42
|
if (!e || !t || typeof ResizeObserver > "u") return;
|
|
42
43
|
let n = () => {
|
|
43
|
-
|
|
44
|
+
we(e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight);
|
|
44
45
|
let n = t.rows[0]?.cells[0];
|
|
45
|
-
|
|
46
|
+
Ee(!n || n.offsetWidth <= e.clientWidth / 2);
|
|
46
47
|
};
|
|
47
48
|
n();
|
|
48
49
|
let r = new ResizeObserver(n);
|
|
49
50
|
return r.observe(e), r.observe(t), () => r.disconnect();
|
|
50
51
|
}, []);
|
|
51
|
-
let
|
|
52
|
+
let De = t(ye, B), H = pe && Te, Oe = l.useRef([]), [ke, Ae] = d([]), U = A.depth;
|
|
52
53
|
l.useLayoutEffect(() => {
|
|
53
|
-
if (!
|
|
54
|
-
let e =
|
|
54
|
+
if (!C) return;
|
|
55
|
+
let e = Oe.current.slice(0, U), t = () => {
|
|
55
56
|
let t = 0, n = e.map((e) => {
|
|
56
57
|
let n = t;
|
|
57
58
|
return t += e?.getBoundingClientRect().height ?? 0, n;
|
|
58
59
|
});
|
|
59
|
-
|
|
60
|
+
Ae((e) => e.length === n.length && e.every((e, t) => e === n[t]) ? e : n);
|
|
60
61
|
};
|
|
61
62
|
if (t(), typeof ResizeObserver > "u") return;
|
|
62
63
|
let n = new ResizeObserver(t);
|
|
63
64
|
return e.forEach((e) => e && n.observe(e)), () => n.disconnect();
|
|
64
|
-
}, [
|
|
65
|
-
let
|
|
66
|
-
let e =
|
|
65
|
+
}, [C, U]);
|
|
66
|
+
let je = l.useRef(null), [W, Me] = d(0), [G, Ne] = d(null), [K, Pe] = d(null), [Fe, Ie] = d({}), q = l.useRef(0), J = ne(() => {
|
|
67
|
+
let e = z.current, t = je.current, n = B.current;
|
|
67
68
|
if (!e || !t || !n) return;
|
|
68
69
|
let r = t.querySelector("tr[data-row-index]")?.getBoundingClientRect().height ?? 0;
|
|
69
|
-
r > 0 &&
|
|
70
|
+
r > 0 && Me((e) => Math.abs(e - r) < .01 ? e : r);
|
|
70
71
|
let i = {
|
|
71
72
|
scrollTop: e.scrollTop,
|
|
72
73
|
height: e.clientHeight,
|
|
73
74
|
bodyOffset: t.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
-
let a = Array.from(n.querySelectorAll("thead [data-column-key]")).map((e) => [e.dataset.columnKey, e.getBoundingClientRect().width]), o =
|
|
77
|
-
|
|
76
|
+
Ne((e) => e && e.scrollTop === i.scrollTop && e.height === i.height && e.bodyOffset === i.bodyOffset ? e : i);
|
|
77
|
+
let a = Array.from(n.querySelectorAll("thead [data-column-key]")).map((e) => [e.dataset.columnKey, e.getBoundingClientRect().width]), o = q.current !== e.clientWidth;
|
|
78
|
+
q.current = e.clientWidth, Ie((e) => {
|
|
78
79
|
let t = o ? {} : { ...e };
|
|
79
80
|
for (let [e, n] of a) (n || 0) > (t[e] ?? 0) + .01 && (t[e] = n);
|
|
80
81
|
let n = Object.keys(t);
|
|
81
82
|
return n.length === Object.keys(e).length && n.every((n) => t[n] === e[n]) ? e : t;
|
|
82
83
|
});
|
|
83
|
-
}, []),
|
|
84
|
+
}, []), Y = j.length, Le = A.columns.length, X = u(() => A.columns.map((e) => `${e.kind}:${e.key ?? ""}`), [A]), Re = X.join("|");
|
|
84
85
|
l.useLayoutEffect(() => {
|
|
85
|
-
if (!
|
|
86
|
-
let e = new ResizeObserver(
|
|
87
|
-
return
|
|
86
|
+
if (!w || (J(), typeof ResizeObserver > "u")) return;
|
|
87
|
+
let e = new ResizeObserver(J);
|
|
88
|
+
return z.current && e.observe(z.current), () => e.disconnect();
|
|
88
89
|
}, [
|
|
89
|
-
|
|
90
|
-
q,
|
|
90
|
+
w,
|
|
91
91
|
J,
|
|
92
|
+
Y,
|
|
92
93
|
Re
|
|
93
94
|
]);
|
|
94
|
-
let ze =
|
|
95
|
-
rowCount:
|
|
96
|
-
rowHeight: W ||
|
|
95
|
+
let ze = u(() => new Map(j.map((e, t) => [e.key, t])), [j]), Be = u(() => w ? te(G ? {
|
|
96
|
+
rowCount: Y,
|
|
97
|
+
rowHeight: W || h,
|
|
97
98
|
scrollTop: G.scrollTop,
|
|
98
99
|
viewportHeight: G.height,
|
|
99
100
|
bodyOffset: G.bodyOffset,
|
|
100
|
-
overscan:
|
|
101
|
+
overscan: re,
|
|
101
102
|
keep: K === null ? null : ze.get(K) ?? null
|
|
102
103
|
} : {
|
|
103
|
-
rowCount:
|
|
104
|
-
rowHeight:
|
|
104
|
+
rowCount: Y,
|
|
105
|
+
rowHeight: h,
|
|
105
106
|
scrollTop: 0,
|
|
106
|
-
viewportHeight: Math.min(
|
|
107
|
+
viewportHeight: Math.min(Y, ie) * h,
|
|
107
108
|
bodyOffset: 0,
|
|
108
109
|
overscan: 0
|
|
109
110
|
}) : null, [
|
|
110
|
-
|
|
111
|
+
w,
|
|
111
112
|
G,
|
|
112
|
-
|
|
113
|
+
Y,
|
|
113
114
|
W,
|
|
114
115
|
K,
|
|
115
116
|
ze
|
|
116
|
-
]),
|
|
117
|
+
]), Ve = u(() => new Map(A.columns.map((e, t) => [e.headerIds[e.headerIds.length - 1], X[t]])), [A, X]), Z = (e) => w && e !== void 0 ? {
|
|
117
118
|
"data-column-key": e,
|
|
118
|
-
style:
|
|
119
|
-
} : null, Q = (e, t = !1) =>
|
|
120
|
-
top: Math.floor(
|
|
119
|
+
style: Fe[e] ? { minWidth: Fe[e] } : void 0
|
|
120
|
+
} : null, Q = (e, t = !1) => C ? {
|
|
121
|
+
top: Math.floor(ke[e] ?? 0),
|
|
121
122
|
zIndex: 10 + U - e + +!!t
|
|
122
|
-
} : void 0,
|
|
123
|
-
let
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
className:
|
|
126
|
-
"data-row-index":
|
|
127
|
-
"data-row-key":
|
|
128
|
-
"aria-rowindex":
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
-
id:
|
|
123
|
+
} : void 0, He = `${E}caption`, $ = S ? { "aria-labelledby": He } : T["aria-label"] ? { "aria-label": T["aria-label"] } : T["aria-labelledby"] ? { "aria-labelledby": T["aria-labelledby"] } : null, Ue = (e, t) => {
|
|
124
|
+
let r = w ? I(t) : [...e.ancestors.map(I), I(t)].join(" "), s = [...P ? [F] : [], ...w ? [] : e.ancestors.map(I)].join(" ");
|
|
125
|
+
return /* @__PURE__ */ m(o.Row, {
|
|
126
|
+
className: f(e.hasChildren && c.groupRow),
|
|
127
|
+
"data-row-index": w ? t : void 0,
|
|
128
|
+
"data-row-key": w ? e.key : void 0,
|
|
129
|
+
"aria-rowindex": w ? U + t + 1 : void 0,
|
|
130
|
+
children: [/* @__PURE__ */ m("th", {
|
|
131
|
+
id: I(t),
|
|
131
132
|
scope: "row",
|
|
132
133
|
headers: s || void 0,
|
|
133
|
-
className:
|
|
134
|
+
className: f(c.rowHeader, H && c.stickyLeft),
|
|
134
135
|
style: { "--wim-pivot-table-depth": e.depth },
|
|
135
|
-
children: [
|
|
136
|
+
children: [w && e.ancestors.length > 0 && /* @__PURE__ */ p(n, { children: e.ancestors.map((e) => /* @__PURE__ */ m(l.Fragment, { children: [j[e].node.label, ", "] }, e)) }), e.hasChildren ? /* @__PURE__ */ m("button", {
|
|
136
137
|
type: "button",
|
|
137
138
|
className: c.toggle,
|
|
138
139
|
"aria-expanded": e.expanded,
|
|
139
|
-
onClick: () =>
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
-
className:
|
|
140
|
+
onClick: () => xe(e.key),
|
|
141
|
+
children: [/* @__PURE__ */ p("span", {
|
|
142
|
+
className: f(c.chevron, e.expanded && c.open),
|
|
142
143
|
"aria-hidden": "true",
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
component:
|
|
144
|
+
children: /* @__PURE__ */ p(a, {
|
|
145
|
+
component: i,
|
|
145
146
|
size: "sm"
|
|
146
147
|
})
|
|
147
148
|
}), e.node.label]
|
|
148
|
-
}) : /* @__PURE__ */
|
|
149
|
-
className:
|
|
149
|
+
}) : /* @__PURE__ */ p("span", {
|
|
150
|
+
className: f(M && c.leafLabel),
|
|
150
151
|
children: e.node.label
|
|
151
152
|
})]
|
|
152
|
-
}),
|
|
153
|
-
headers: `${
|
|
154
|
-
className:
|
|
155
|
-
children:
|
|
153
|
+
}), A.columns.map((t, n) => /* @__PURE__ */ p(o.Cell, {
|
|
154
|
+
headers: `${r} ${R[n]}`,
|
|
155
|
+
className: f(c.value, t.kind !== "leaf" && c.aggregate, t.startsGroup && !(H && n === 0) && c.groupStart),
|
|
156
|
+
children: b(e.key, t.key)
|
|
156
157
|
}, n))]
|
|
157
158
|
}, e.key);
|
|
158
159
|
};
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
ref:
|
|
160
|
+
return /* @__PURE__ */ p("div", {
|
|
161
|
+
ref: z,
|
|
161
162
|
className: c.scroller,
|
|
162
|
-
style:
|
|
163
|
-
tabIndex:
|
|
164
|
-
onScroll:
|
|
165
|
-
...
|
|
163
|
+
style: fe === void 0 ? void 0 : { maxHeight: fe },
|
|
164
|
+
tabIndex: V ? 0 : void 0,
|
|
165
|
+
onScroll: w ? J : void 0,
|
|
166
|
+
...V && $ ? {
|
|
166
167
|
role: "region",
|
|
167
168
|
...$
|
|
168
169
|
} : null,
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
ref:
|
|
171
|
-
className:
|
|
172
|
-
"aria-rowcount":
|
|
173
|
-
...
|
|
170
|
+
children: /* @__PURE__ */ m("table", {
|
|
171
|
+
ref: De,
|
|
172
|
+
className: f("wim-pivot-table", c.root, ve),
|
|
173
|
+
"aria-rowcount": w ? U + Y + +!!he : void 0,
|
|
174
|
+
...T,
|
|
174
175
|
children: [
|
|
175
|
-
|
|
176
|
-
id:
|
|
176
|
+
S && /* @__PURE__ */ p("caption", {
|
|
177
|
+
id: He,
|
|
177
178
|
className: c.caption,
|
|
178
|
-
children:
|
|
179
|
+
children: S
|
|
179
180
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
"aria-rowindex":
|
|
181
|
+
/* @__PURE__ */ p("colgroup", {}),
|
|
182
|
+
A.groupSpans.map((e, t) => /* @__PURE__ */ p("colgroup", { span: e }, t)),
|
|
183
|
+
/* @__PURE__ */ p(o.Header, { children: A.headerRows.map((e, t) => /* @__PURE__ */ m("tr", {
|
|
184
|
+
"aria-rowindex": w ? t + 1 : void 0,
|
|
184
185
|
ref: (e) => {
|
|
185
|
-
|
|
186
|
+
Oe.current[t] = e;
|
|
186
187
|
},
|
|
187
|
-
children: [t === 0 && (
|
|
188
|
-
id:
|
|
188
|
+
children: [t === 0 && (P ? /* @__PURE__ */ p("th", {
|
|
189
|
+
id: F,
|
|
189
190
|
scope: "col",
|
|
190
|
-
rowSpan:
|
|
191
|
-
className:
|
|
192
|
-
...Z(
|
|
191
|
+
rowSpan: A.depth,
|
|
192
|
+
className: f(c.columnHeader, c.corner, c.bottom, C && c.stickyTop, H && c.stickyLeft),
|
|
193
|
+
...Z(g),
|
|
193
194
|
style: {
|
|
194
195
|
...Q(0, !0),
|
|
195
|
-
...Z(
|
|
196
|
+
...Z(g)?.style
|
|
196
197
|
},
|
|
197
|
-
children: /* @__PURE__ */
|
|
198
|
-
className:
|
|
199
|
-
children:
|
|
198
|
+
children: /* @__PURE__ */ p("span", {
|
|
199
|
+
className: f(N && c.columnLeafLabel),
|
|
200
|
+
children: x
|
|
200
201
|
})
|
|
201
|
-
}) : /* @__PURE__ */
|
|
202
|
-
rowSpan:
|
|
203
|
-
className:
|
|
204
|
-
...Z(
|
|
202
|
+
}) : /* @__PURE__ */ p("td", {
|
|
203
|
+
rowSpan: A.depth,
|
|
204
|
+
className: f(c.columnHeader, c.bottom, C && c.stickyTop, H && c.stickyLeft),
|
|
205
|
+
...Z(g),
|
|
205
206
|
style: {
|
|
206
207
|
...Q(0, !0),
|
|
207
|
-
...Z(
|
|
208
|
+
...Z(g)?.style
|
|
208
209
|
}
|
|
209
|
-
})), e.map((e,
|
|
210
|
-
id:
|
|
210
|
+
})), e.map((e, n) => /* @__PURE__ */ p("th", {
|
|
211
|
+
id: Ce(e.id),
|
|
211
212
|
scope: e.kind === "group" && e.topLevel ? "colgroup" : "col",
|
|
212
213
|
colSpan: e.colSpan > 1 ? e.colSpan : void 0,
|
|
213
214
|
rowSpan: e.rowSpan > 1 ? e.rowSpan : void 0,
|
|
214
|
-
className:
|
|
215
|
-
...e.reachesBottom ? Z(
|
|
215
|
+
className: f(c.columnHeader, e.kind === "group" && e.expanded && c.group, e.reachesBottom && c.bottom, e.startsGroup && !(H && n === 0) && c.groupStart, C && c.stickyTop),
|
|
216
|
+
...e.reachesBottom ? Z(Ve.get(e.id)) : null,
|
|
216
217
|
style: {
|
|
217
218
|
...Q(t),
|
|
218
|
-
...e.reachesBottom ? Z(
|
|
219
|
+
...e.reachesBottom ? Z(Ve.get(e.id))?.style : null
|
|
219
220
|
},
|
|
220
|
-
children: e.kind === "group" ? /* @__PURE__ */
|
|
221
|
+
children: e.kind === "group" ? /* @__PURE__ */ m("button", {
|
|
221
222
|
type: "button",
|
|
222
|
-
className:
|
|
223
|
+
className: f(c.toggle, c.columnToggle),
|
|
223
224
|
"aria-expanded": e.expanded,
|
|
224
|
-
onClick: () =>
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
-
className:
|
|
225
|
+
onClick: () => Se(e.key),
|
|
226
|
+
children: [/* @__PURE__ */ p("span", {
|
|
227
|
+
className: f(c.chevron, e.expanded && c.open),
|
|
227
228
|
"aria-hidden": "true",
|
|
228
|
-
children: /* @__PURE__ */
|
|
229
|
-
component:
|
|
229
|
+
children: /* @__PURE__ */ p(a, {
|
|
230
|
+
component: i,
|
|
230
231
|
size: "sm"
|
|
231
232
|
})
|
|
232
233
|
}), e.node?.label]
|
|
233
|
-
}) : /* @__PURE__ */
|
|
234
|
-
className:
|
|
235
|
-
children: e.kind === "leaf" ? e.node?.label :
|
|
234
|
+
}) : /* @__PURE__ */ p("span", {
|
|
235
|
+
className: f(N && c.columnLeafLabel),
|
|
236
|
+
children: e.kind === "leaf" ? e.node?.label : D
|
|
236
237
|
})
|
|
237
238
|
}, `${e.kind}:${e.key ?? ""}`))]
|
|
238
239
|
}, t)) }),
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
ref:
|
|
241
|
-
onFocus:
|
|
240
|
+
/* @__PURE__ */ p(o.Body, {
|
|
241
|
+
ref: je,
|
|
242
|
+
onFocus: w ? (e) => {
|
|
242
243
|
let t = e.target.closest("tr")?.dataset.rowKey;
|
|
243
|
-
t !== void 0 &&
|
|
244
|
+
t !== void 0 && Pe(t);
|
|
244
245
|
} : void 0,
|
|
245
|
-
onBlur:
|
|
246
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
246
|
+
onBlur: w ? (e) => {
|
|
247
|
+
e.currentTarget.contains(e.relatedTarget) || Pe(null);
|
|
247
248
|
} : void 0,
|
|
248
249
|
children: (Be ?? [{
|
|
249
250
|
kind: "rows",
|
|
250
251
|
from: 0,
|
|
251
|
-
to:
|
|
252
|
-
}]).map((e, t) => e.kind === "gap" ? /* @__PURE__ */
|
|
252
|
+
to: Y
|
|
253
|
+
}]).map((e, t) => e.kind === "gap" ? /* @__PURE__ */ p("tr", {
|
|
253
254
|
"aria-hidden": "true",
|
|
254
255
|
className: c.gap,
|
|
255
|
-
children: /* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ p("td", {
|
|
256
257
|
colSpan: Le + 1,
|
|
257
|
-
style: { height: e.count * (W ||
|
|
258
|
+
style: { height: e.count * (W || h) }
|
|
258
259
|
})
|
|
259
|
-
}, `gap-${t}`) :
|
|
260
|
+
}, `gap-${t}`) : j.slice(e.from, e.to).map((t, n) => Ue(t, e.from + n)))
|
|
260
261
|
}),
|
|
261
|
-
|
|
262
|
+
he && /* @__PURE__ */ p(o.Footer, { children: /* @__PURE__ */ m(o.Row, {
|
|
262
263
|
className: c.totalRow,
|
|
263
|
-
"aria-rowindex":
|
|
264
|
-
children: [/* @__PURE__ */
|
|
265
|
-
id:
|
|
264
|
+
"aria-rowindex": w ? U + Y + 1 : void 0,
|
|
265
|
+
children: [/* @__PURE__ */ p("th", {
|
|
266
|
+
id: L,
|
|
266
267
|
scope: "row",
|
|
267
|
-
headers:
|
|
268
|
-
className:
|
|
269
|
-
children: /* @__PURE__ */
|
|
270
|
-
className:
|
|
271
|
-
children:
|
|
268
|
+
headers: P ? F : void 0,
|
|
269
|
+
className: f(c.rowHeader, H && c.stickyLeft),
|
|
270
|
+
children: /* @__PURE__ */ p("span", {
|
|
271
|
+
className: f(M && c.leafLabel),
|
|
272
|
+
children: D
|
|
272
273
|
})
|
|
273
|
-
}),
|
|
274
|
-
headers: `${
|
|
275
|
-
className:
|
|
276
|
-
children:
|
|
274
|
+
}), A.columns.map((e, t) => /* @__PURE__ */ p(o.Cell, {
|
|
275
|
+
headers: `${L} ${R[t]}`,
|
|
276
|
+
className: f(c.value, e.startsGroup && !(H && t === 0) && c.groupStart),
|
|
277
|
+
children: b(null, e.key)
|
|
277
278
|
}, t))]
|
|
278
279
|
}) })
|
|
279
280
|
]
|
|
280
281
|
})
|
|
281
282
|
});
|
|
282
283
|
});
|
|
283
|
-
|
|
284
|
+
v.displayName = "PivotTable";
|
|
284
285
|
//#endregion
|
|
285
|
-
export {
|
|
286
|
+
export { v as PivotTable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_scroller_1ajlt_7`,t=`_root_1ajlt_22`,n=`_caption_1ajlt_34`,r=`_columnHeader_1ajlt_41`,i=`_group_1ajlt_55`,a=`_bottom_1ajlt_62`,o=`_corner_1ajlt_65`,s=`_rowHeader_1ajlt_68`,c=`_toggle_1ajlt_83`,l=`_chevron_1ajlt_102`,u=`_open_1ajlt_121`,d=`_columnToggle_1ajlt_126`,f=`_columnLeafLabel_1ajlt_135`,p=`_leafLabel_1ajlt_145`,m=`_value_1ajlt_152`,h=`_groupRow_1ajlt_158`,g=`_aggregate_1ajlt_163`,_=`_groupStart_1ajlt_167`,v=`_totalRow_1ajlt_170`,y=`_gap_1ajlt_175`,b=`_stickyTop_1ajlt_184`,x=`_stickyLeft_1ajlt_189`,S={scroller:e,root:t,caption:n,columnHeader:r,group:i,bottom:a,corner:o,rowHeader:s,toggle:c,chevron:l,open:u,columnToggle:d,columnLeafLabel:f,leafLabel:p,value:m,groupRow:h,aggregate:g,groupStart:_,totalRow:v,gap:y,stickyTop:b,stickyLeft:x};exports.aggregate=g,exports.bottom=a,exports.caption=n,exports.chevron=l,exports.columnHeader=r,exports.columnLeafLabel=f,exports.columnToggle=d,exports.corner=o,exports.default=S,exports.gap=y,exports.group=i,exports.groupRow=h,exports.groupStart=_,exports.leafLabel=p,exports.open=u,exports.root=t,exports.rowHeader=s,exports.scroller=e,exports.stickyLeft=x,exports.stickyTop=b,exports.toggle=c,exports.totalRow=v,exports.value=m;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/PivotTable/pivot-table.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_scroller_1ajlt_7", t = "_root_1ajlt_22", n = "_caption_1ajlt_34", r = "_columnHeader_1ajlt_41", i = "_group_1ajlt_55", a = "_bottom_1ajlt_62", o = "_corner_1ajlt_65", s = "_rowHeader_1ajlt_68", c = "_toggle_1ajlt_83", l = "_chevron_1ajlt_102", u = "_open_1ajlt_121", d = "_columnToggle_1ajlt_126", f = "_columnLeafLabel_1ajlt_135", p = "_leafLabel_1ajlt_145", m = "_value_1ajlt_152", h = "_groupRow_1ajlt_158", g = "_aggregate_1ajlt_163", _ = "_groupStart_1ajlt_167", v = "_totalRow_1ajlt_170", y = "_gap_1ajlt_175", b = "_stickyTop_1ajlt_184", x = "_stickyLeft_1ajlt_189", S = {
|
|
4
4
|
scroller: e,
|
|
5
5
|
root: t,
|
|
6
6
|
caption: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),i=require("../../feedback/Indicator/Indicator.cjs"),a=require("./presence.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l={online:`success`,away:`warning`,busy:`danger`,offline:`neutral`},u=o.default.forwardRef(({status:e,label:o,showLabel:u=!1,size:d=`md`,position:f=`bottom-right`,children:p,className:m,...h},g)=>{let{t:_}=t.useWimTranslation(n.commonNs),v=o??_(`presence.${e}`);return(0,c.jsxs)(`span`,{ref:g,className:(0,s.default)(`wim-presence`,a.default.root,m),...h,children:[p?(0,c.jsx)(i.Indicator,{color:l[e],size:d,position:f,children:p}):(0,c.jsx)(i.Indicator,{color:l[e],size:d,inline:!0}),u?(0,c.jsx)(`span`,{className:a.default.label,children:v}):(0,c.jsx)(r.VisuallyHidden,{children:v})]})});u.displayName=`Presence`,exports.Presence=u;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import r from "
|
|
6
|
-
import i from "
|
|
7
|
-
import a from "
|
|
8
|
-
import
|
|
3
|
+
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
|
+
import { VisuallyHidden as n } from "../../layout/VisuallyHidden/VisuallyHidden.js";
|
|
5
|
+
import { Indicator as r } from "../../feedback/Indicator/Indicator.js";
|
|
6
|
+
import i from "./presence.module.js";
|
|
7
|
+
import a from "react";
|
|
8
|
+
import o from "classnames";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/data-display/Presence/Presence.tsx
|
|
10
|
-
var
|
|
11
|
+
var l = {
|
|
11
12
|
online: "success",
|
|
12
13
|
away: "warning",
|
|
13
14
|
busy: "danger",
|
|
14
15
|
offline: "neutral"
|
|
15
|
-
},
|
|
16
|
-
let { t:
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
ref:
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
21
|
-
children: [
|
|
22
|
-
color:
|
|
23
|
-
size:
|
|
24
|
-
position:
|
|
25
|
-
children:
|
|
26
|
-
}) : /* @__PURE__ */
|
|
27
|
-
color:
|
|
28
|
-
size:
|
|
16
|
+
}, u = a.forwardRef(({ status: a, label: u, showLabel: d = !1, size: f = "md", position: p = "bottom-right", children: m, className: h, ...g }, _) => {
|
|
17
|
+
let { t: v } = e(t), y = u ?? v(`presence.${a}`);
|
|
18
|
+
return /* @__PURE__ */ c("span", {
|
|
19
|
+
ref: _,
|
|
20
|
+
className: o("wim-presence", i.root, h),
|
|
21
|
+
...g,
|
|
22
|
+
children: [m ? /* @__PURE__ */ s(r, {
|
|
23
|
+
color: l[a],
|
|
24
|
+
size: f,
|
|
25
|
+
position: p,
|
|
26
|
+
children: m
|
|
27
|
+
}) : /* @__PURE__ */ s(r, {
|
|
28
|
+
color: l[a],
|
|
29
|
+
size: f,
|
|
29
30
|
inline: !0
|
|
30
|
-
}),
|
|
31
|
-
className:
|
|
32
|
-
children:
|
|
33
|
-
}) : /* @__PURE__ */
|
|
31
|
+
}), d ? /* @__PURE__ */ s("span", {
|
|
32
|
+
className: i.label,
|
|
33
|
+
children: y
|
|
34
|
+
}) : /* @__PURE__ */ s(n, { children: y })]
|
|
34
35
|
});
|
|
35
36
|
});
|
|
36
|
-
|
|
37
|
+
u.displayName = "Presence";
|
|
37
38
|
//#endregion
|
|
38
|
-
export {
|
|
39
|
+
export { u as Presence };
|
|
@@ -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("../../../icon/chevron-down.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("../../../icon/chevron-down.cjs"),a=require("../../../icon/loading.cjs"),o=require("../../media/Icon/Icon.cjs"),s=require("./pull-to-refresh.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=c.default.forwardRef(({onRefresh:e,refreshing:d,threshold:f=60,maxDistance:p=120,children:m,asChild:h=!1,className:g,..._},v)=>{let{t:y}=n.useWimTranslation(r.commonNs),[b,x]=(0,c.useState)(0),[S,C]=(0,c.useState)(!1),[w,T]=(0,c.useState)(!1),[E,D]=(0,c.useState)(`idle`),O=(0,c.useRef)(0),k=(0,c.useRef)(!1),A=(0,c.useRef)(!1),j=(0,c.useRef)(void 0);(0,c.useEffect)(()=>()=>clearTimeout(j.current),[]);let M=d??S;(0,c.useEffect)(()=>{M?(D(`refreshing`),x(f)):(D(`idle`),x(0))},[M,f]);let N=(0,c.useCallback)(e=>{if(!k.current||M)return;let t=(`touches`in e?e.touches[0].clientY:e.clientY)-O.current;if(t>0){e.cancelable&&e.preventDefault();let n=Math.min(t*.4,p);x(n),D(n>f?`releasing`:`pulling`)}else t<-10&&(k.current=!1,A.current=!1,T(!1),x(0),D(`idle`))},[p,f,M]),P=(0,c.useCallback)(async()=>{if(!k.current)return;let t=b>=f;if(k.current=!1,A.current=!1,T(!1),t&&!M){C(!0),D(`refreshing`),x(f);try{await e()}finally{clearTimeout(j.current),j.current=setTimeout(()=>{C(!1),d===void 0&&(D(`idle`),x(0))},50)}}else M||(x(0),D(`idle`))},[b,f,M,e,d]),F=e=>{e.currentTarget.scrollTop>0||M||(O.current=`touches`in e?e.touches[0].clientY:e.clientY,k.current=!0,A.current=!0,T(!0))};(0,c.useEffect)(()=>{if(!w)return;let e=e=>N(e),t=()=>P();return window.addEventListener(`mousemove`,e,{passive:!1}),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!1}),window.addEventListener(`touchend`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[w,N,P]);let I=h?t.Root:`div`;return(0,u.jsxs)(`div`,{className:(0,l.default)(`wim-pull-to-refresh`,s.default.container,g),role:`none`,onTouchStart:F,onMouseDown:F,..._,children:[(0,u.jsx)(`div`,{className:(0,l.default)(s.default.indicator,s.default[E]),style:{height:b,opacity:+(b>0),transition:w?`none`:`all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`},children:(0,u.jsxs)(`div`,{className:s.default.indicatorContent,children:[E===`refreshing`?(0,u.jsx)(o.Icon,{component:a.default,spin:!0,className:s.default.spinner}):(0,u.jsx)(o.Icon,{component:i.default,className:(0,l.default)(s.default.arrow,E===`releasing`&&s.default.rotate)}),(0,u.jsx)(`span`,{className:s.default.text,children:y(E===`refreshing`?`pullToRefresh.loading`:E===`releasing`?`pullToRefresh.release`:`pullToRefresh.pull`)})]})}),(0,u.jsx)(I,{ref:v,className:s.default.content,children:m})]})});d.displayName=`PullToRefresh`,exports.PullToRefresh=d;
|