@igne-agency/react-web-ui 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Button } from "../components/button/button.js";
|
|
2
2
|
import { Checkbox } from "../components/checkbox-field/checkbox.js";
|
|
3
3
|
import { usePresence } from "../lib/hooks/use-presence.js";
|
|
4
|
+
import { useRequiredContext } from "../lib/use-required-context.js";
|
|
4
5
|
import { useDataTable } from "./data-table-context.js";
|
|
5
6
|
import data_table_module_default from "./data-table.module.js";
|
|
6
7
|
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
9
|
import { clsx } from "clsx";
|
|
8
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { useRef } from "react";
|
|
11
|
+
import { createContext, useRef } from "react";
|
|
10
12
|
// src/data-table/data-table-selection.tsx
|
|
11
13
|
var useSelection = () => {
|
|
12
14
|
const { selection } = useDataTable();
|
|
@@ -151,173 +153,680 @@ var selectionColumn = ({ sticky, selectPageLabel, selectRowLabel, checkIcon, ind
|
|
|
151
153
|
checkIcon
|
|
152
154
|
})
|
|
153
155
|
});
|
|
156
|
+
var SelectionBarContext = createContext(null);
|
|
157
|
+
var useSelectionBar = () => {
|
|
158
|
+
return useRequiredContext(SelectionBarContext, "DataTable.SelectionBar.* must be rendered inside <DataTable.SelectionBar.Root>.");
|
|
159
|
+
};
|
|
154
160
|
/**
|
|
155
|
-
* The bar above a selectable table
|
|
156
|
-
*
|
|
157
|
-
*
|
|
161
|
+
* The bar above a selectable table, holding the selection for the parts inside
|
|
162
|
+
* it and marked `data-selected` while any row is. It sits in a container that
|
|
163
|
+
* lets it wrap where it is narrow.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* <DataTable.SelectionBar.Root totalRows={30}>…</DataTable.SelectionBar.Root>
|
|
158
167
|
*/
|
|
159
|
-
var
|
|
160
|
-
const $ = c(
|
|
161
|
-
|
|
168
|
+
var SelectionBarRoot = (t0) => {
|
|
169
|
+
const $ = c(28);
|
|
170
|
+
let className;
|
|
171
|
+
let props;
|
|
172
|
+
let ref;
|
|
173
|
+
let render;
|
|
174
|
+
let totalRows;
|
|
175
|
+
if ($[0] !== t0) {
|
|
176
|
+
({totalRows, render, className, ref, ...props} = t0);
|
|
177
|
+
$[0] = t0;
|
|
178
|
+
$[1] = className;
|
|
179
|
+
$[2] = props;
|
|
180
|
+
$[3] = ref;
|
|
181
|
+
$[4] = render;
|
|
182
|
+
$[5] = totalRows;
|
|
183
|
+
} else {
|
|
184
|
+
className = $[1];
|
|
185
|
+
props = $[2];
|
|
186
|
+
ref = $[3];
|
|
187
|
+
render = $[4];
|
|
188
|
+
totalRows = $[5];
|
|
189
|
+
}
|
|
162
190
|
const selection = useSelection();
|
|
163
191
|
const selected = selection.count(totalRows);
|
|
164
|
-
const empty = selected === 0;
|
|
165
192
|
const barRef = useRef(null);
|
|
166
193
|
const clearRef = useRef(null);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
194
|
+
let t1;
|
|
195
|
+
if ($[6] !== ref) {
|
|
196
|
+
t1 = ref === void 0 ? barRef : [barRef, ref];
|
|
197
|
+
$[6] = ref;
|
|
198
|
+
$[7] = t1;
|
|
199
|
+
} else t1 = $[7];
|
|
200
|
+
const t2 = selected > 0 || void 0;
|
|
172
201
|
let t3;
|
|
173
|
-
if ($[
|
|
202
|
+
if ($[8] !== className) {
|
|
174
203
|
t3 = clsx(data_table_module_default.selectionBar, className);
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
} else t3 = $[
|
|
178
|
-
|
|
204
|
+
$[8] = className;
|
|
205
|
+
$[9] = t3;
|
|
206
|
+
} else t3 = $[9];
|
|
207
|
+
let t4;
|
|
208
|
+
if ($[10] !== props || $[11] !== t2 || $[12] !== t3) {
|
|
209
|
+
t4 = {
|
|
210
|
+
tabIndex: -1,
|
|
211
|
+
...props,
|
|
212
|
+
"data-selected": t2,
|
|
213
|
+
className: t3
|
|
214
|
+
};
|
|
215
|
+
$[10] = props;
|
|
216
|
+
$[11] = t2;
|
|
217
|
+
$[12] = t3;
|
|
218
|
+
$[13] = t4;
|
|
219
|
+
} else t4 = $[13];
|
|
179
220
|
let t5;
|
|
180
|
-
if ($[
|
|
181
|
-
t5 =
|
|
221
|
+
if ($[14] !== render || $[15] !== t1 || $[16] !== t4) {
|
|
222
|
+
t5 = {
|
|
223
|
+
defaultTagName: "div",
|
|
224
|
+
render,
|
|
225
|
+
ref: t1,
|
|
226
|
+
props: t4
|
|
227
|
+
};
|
|
228
|
+
$[14] = render;
|
|
229
|
+
$[15] = t1;
|
|
230
|
+
$[16] = t4;
|
|
231
|
+
$[17] = t5;
|
|
232
|
+
} else t5 = $[17];
|
|
233
|
+
const element = useRender(t5);
|
|
234
|
+
let t6;
|
|
235
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
236
|
+
t6 = () => barRef.current?.focus();
|
|
237
|
+
$[18] = t6;
|
|
238
|
+
} else t6 = $[18];
|
|
239
|
+
let t7;
|
|
240
|
+
if ($[19] !== selected || $[20] !== selection || $[21] !== totalRows) {
|
|
241
|
+
t7 = {
|
|
242
|
+
selection,
|
|
243
|
+
totalRows,
|
|
244
|
+
selected,
|
|
245
|
+
focusBar: t6,
|
|
246
|
+
clearRef
|
|
247
|
+
};
|
|
248
|
+
$[19] = selected;
|
|
249
|
+
$[20] = selection;
|
|
250
|
+
$[21] = totalRows;
|
|
251
|
+
$[22] = t7;
|
|
252
|
+
} else t7 = $[22];
|
|
253
|
+
let t8;
|
|
254
|
+
if ($[23] !== element) {
|
|
255
|
+
t8 = /* @__PURE__ */ jsx("div", {
|
|
256
|
+
className: data_table_module_default.selectionContainer,
|
|
257
|
+
children: element
|
|
258
|
+
});
|
|
259
|
+
$[23] = element;
|
|
260
|
+
$[24] = t8;
|
|
261
|
+
} else t8 = $[24];
|
|
262
|
+
let t9;
|
|
263
|
+
if ($[25] !== t7 || $[26] !== t8) {
|
|
264
|
+
t9 = /* @__PURE__ */ jsx(SelectionBarContext, {
|
|
265
|
+
value: t7,
|
|
266
|
+
children: t8
|
|
267
|
+
});
|
|
268
|
+
$[25] = t7;
|
|
269
|
+
$[26] = t8;
|
|
270
|
+
$[27] = t9;
|
|
271
|
+
} else t9 = $[27];
|
|
272
|
+
return t9;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* What the bar shows, hidden from assistive tech: the total while nothing is
|
|
276
|
+
* selected, crossing over to the selected count, at the width of the longest
|
|
277
|
+
* count.
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* <DataTable.SelectionBar.Summary total="30 invoices" countLabel={(n, total) => `${n} of ${total} selected`} />
|
|
281
|
+
*/
|
|
282
|
+
var SelectionBarSummary = (t0) => {
|
|
283
|
+
const $ = c(26);
|
|
284
|
+
let className;
|
|
285
|
+
let countLabel;
|
|
286
|
+
let props;
|
|
287
|
+
let ref;
|
|
288
|
+
let render;
|
|
289
|
+
let total;
|
|
290
|
+
if ($[0] !== t0) {
|
|
291
|
+
({total, countLabel, render, className, ref, ...props} = t0);
|
|
292
|
+
$[0] = t0;
|
|
293
|
+
$[1] = className;
|
|
294
|
+
$[2] = countLabel;
|
|
295
|
+
$[3] = props;
|
|
296
|
+
$[4] = ref;
|
|
297
|
+
$[5] = render;
|
|
298
|
+
$[6] = total;
|
|
299
|
+
} else {
|
|
300
|
+
className = $[1];
|
|
301
|
+
countLabel = $[2];
|
|
302
|
+
props = $[3];
|
|
303
|
+
ref = $[4];
|
|
304
|
+
render = $[5];
|
|
305
|
+
total = $[6];
|
|
306
|
+
}
|
|
307
|
+
const { totalRows, selected } = useSelectionBar();
|
|
308
|
+
let t1;
|
|
309
|
+
if ($[7] !== className) {
|
|
310
|
+
t1 = clsx(data_table_module_default.selectionSummary, className);
|
|
311
|
+
$[7] = className;
|
|
312
|
+
$[8] = t1;
|
|
313
|
+
} else t1 = $[8];
|
|
314
|
+
let t2;
|
|
315
|
+
if ($[9] !== total) {
|
|
316
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
182
317
|
className: data_table_module_default.selectionTotal,
|
|
183
318
|
children: total
|
|
184
319
|
});
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
} else
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
children:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
320
|
+
$[9] = total;
|
|
321
|
+
$[10] = t2;
|
|
322
|
+
} else t2 = $[10];
|
|
323
|
+
let t3;
|
|
324
|
+
if ($[11] !== countLabel || $[12] !== selected || $[13] !== totalRows) {
|
|
325
|
+
t3 = totalRows > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
326
|
+
className: data_table_module_default.selectionCount,
|
|
327
|
+
children: countLabel(selected, totalRows)
|
|
328
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
329
|
+
className: data_table_module_default.selectionMeasure,
|
|
330
|
+
children: countLabel(totalRows, totalRows)
|
|
331
|
+
})] });
|
|
332
|
+
$[11] = countLabel;
|
|
333
|
+
$[12] = selected;
|
|
334
|
+
$[13] = totalRows;
|
|
335
|
+
$[14] = t3;
|
|
336
|
+
} else t3 = $[14];
|
|
337
|
+
let t4;
|
|
338
|
+
if ($[15] !== t2 || $[16] !== t3) {
|
|
339
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
340
|
+
$[15] = t2;
|
|
341
|
+
$[16] = t3;
|
|
342
|
+
$[17] = t4;
|
|
343
|
+
} else t4 = $[17];
|
|
344
|
+
let t5;
|
|
345
|
+
if ($[18] !== props || $[19] !== t1 || $[20] !== t4) {
|
|
346
|
+
t5 = {
|
|
199
347
|
"aria-hidden": true,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
$[
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
let
|
|
210
|
-
if ($[
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
348
|
+
...props,
|
|
349
|
+
className: t1,
|
|
350
|
+
children: t4
|
|
351
|
+
};
|
|
352
|
+
$[18] = props;
|
|
353
|
+
$[19] = t1;
|
|
354
|
+
$[20] = t4;
|
|
355
|
+
$[21] = t5;
|
|
356
|
+
} else t5 = $[21];
|
|
357
|
+
let t6;
|
|
358
|
+
if ($[22] !== ref || $[23] !== render || $[24] !== t5) {
|
|
359
|
+
t6 = {
|
|
360
|
+
defaultTagName: "span",
|
|
361
|
+
render,
|
|
362
|
+
ref,
|
|
363
|
+
props: t5
|
|
364
|
+
};
|
|
365
|
+
$[22] = ref;
|
|
366
|
+
$[23] = render;
|
|
367
|
+
$[24] = t5;
|
|
368
|
+
$[25] = t6;
|
|
369
|
+
} else t6 = $[25];
|
|
370
|
+
return useRender(t6);
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* The hidden live region that announces the total while nothing is selected,
|
|
374
|
+
* and the selected count once something is.
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* <DataTable.SelectionBar.Status total="30 invoices" countLabel={(n, total) => `${n} of ${total} selected`} />
|
|
378
|
+
*/
|
|
379
|
+
var SelectionBarStatus = (t0) => {
|
|
380
|
+
const $ = c(22);
|
|
381
|
+
let className;
|
|
382
|
+
let countLabel;
|
|
383
|
+
let props;
|
|
384
|
+
let ref;
|
|
385
|
+
let render;
|
|
386
|
+
let total;
|
|
387
|
+
if ($[0] !== t0) {
|
|
388
|
+
({total, countLabel, render, className, ref, ...props} = t0);
|
|
389
|
+
$[0] = t0;
|
|
390
|
+
$[1] = className;
|
|
391
|
+
$[2] = countLabel;
|
|
392
|
+
$[3] = props;
|
|
393
|
+
$[4] = ref;
|
|
394
|
+
$[5] = render;
|
|
395
|
+
$[6] = total;
|
|
396
|
+
} else {
|
|
397
|
+
className = $[1];
|
|
398
|
+
countLabel = $[2];
|
|
399
|
+
props = $[3];
|
|
400
|
+
ref = $[4];
|
|
401
|
+
render = $[5];
|
|
402
|
+
total = $[6];
|
|
403
|
+
}
|
|
404
|
+
const { totalRows, selected } = useSelectionBar();
|
|
405
|
+
let t1;
|
|
406
|
+
if ($[7] !== className) {
|
|
407
|
+
t1 = clsx(data_table_module_default.selectionStatus, className);
|
|
408
|
+
$[7] = className;
|
|
409
|
+
$[8] = t1;
|
|
410
|
+
} else t1 = $[8];
|
|
411
|
+
let t2;
|
|
412
|
+
if ($[9] !== countLabel || $[10] !== selected || $[11] !== total || $[12] !== totalRows) {
|
|
413
|
+
t2 = selected === 0 ? total : countLabel(selected, totalRows);
|
|
414
|
+
$[9] = countLabel;
|
|
415
|
+
$[10] = selected;
|
|
416
|
+
$[11] = total;
|
|
417
|
+
$[12] = totalRows;
|
|
418
|
+
$[13] = t2;
|
|
419
|
+
} else t2 = $[13];
|
|
420
|
+
let t3;
|
|
421
|
+
if ($[14] !== props || $[15] !== t1 || $[16] !== t2) {
|
|
422
|
+
t3 = {
|
|
423
|
+
role: "status",
|
|
424
|
+
...props,
|
|
425
|
+
className: t1,
|
|
426
|
+
children: t2
|
|
427
|
+
};
|
|
428
|
+
$[14] = props;
|
|
429
|
+
$[15] = t1;
|
|
430
|
+
$[16] = t2;
|
|
431
|
+
$[17] = t3;
|
|
432
|
+
} else t3 = $[17];
|
|
433
|
+
let t4;
|
|
434
|
+
if ($[18] !== ref || $[19] !== render || $[20] !== t3) {
|
|
435
|
+
t4 = {
|
|
436
|
+
defaultTagName: "span",
|
|
437
|
+
render,
|
|
438
|
+
ref,
|
|
439
|
+
props: t3
|
|
440
|
+
};
|
|
441
|
+
$[18] = ref;
|
|
442
|
+
$[19] = render;
|
|
443
|
+
$[20] = t3;
|
|
444
|
+
$[21] = t4;
|
|
445
|
+
} else t4 = $[21];
|
|
446
|
+
return useRender(t4);
|
|
447
|
+
};
|
|
448
|
+
/**
|
|
449
|
+
* The row of actions on the selection, `Clear`, `SelectAll` and `Bulk`, out of
|
|
450
|
+
* reach while nothing is selected.
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* <DataTable.SelectionBar.Actions>
|
|
454
|
+
* <DataTable.SelectionBar.Clear render={<Button variant="tertiary">Clear selection</Button>} />
|
|
455
|
+
* </DataTable.SelectionBar.Actions>
|
|
456
|
+
*/
|
|
457
|
+
var SelectionBarActions = (t0) => {
|
|
458
|
+
const $ = c(15);
|
|
459
|
+
let className;
|
|
460
|
+
let props;
|
|
461
|
+
let ref;
|
|
462
|
+
let render;
|
|
463
|
+
if ($[0] !== t0) {
|
|
464
|
+
({render, className, ref, ...props} = t0);
|
|
465
|
+
$[0] = t0;
|
|
466
|
+
$[1] = className;
|
|
467
|
+
$[2] = props;
|
|
468
|
+
$[3] = ref;
|
|
469
|
+
$[4] = render;
|
|
470
|
+
} else {
|
|
471
|
+
className = $[1];
|
|
472
|
+
props = $[2];
|
|
473
|
+
ref = $[3];
|
|
474
|
+
render = $[4];
|
|
475
|
+
}
|
|
476
|
+
const { selected } = useSelectionBar();
|
|
477
|
+
const t1 = selected === 0;
|
|
478
|
+
let t2;
|
|
479
|
+
if ($[5] !== className) {
|
|
480
|
+
t2 = clsx(data_table_module_default.selectionActions, className);
|
|
481
|
+
$[5] = className;
|
|
482
|
+
$[6] = t2;
|
|
483
|
+
} else t2 = $[6];
|
|
484
|
+
let t3;
|
|
485
|
+
if ($[7] !== props || $[8] !== t1 || $[9] !== t2) {
|
|
486
|
+
t3 = {
|
|
487
|
+
...props,
|
|
488
|
+
inert: t1,
|
|
489
|
+
className: t2
|
|
490
|
+
};
|
|
491
|
+
$[7] = props;
|
|
492
|
+
$[8] = t1;
|
|
493
|
+
$[9] = t2;
|
|
494
|
+
$[10] = t3;
|
|
495
|
+
} else t3 = $[10];
|
|
496
|
+
let t4;
|
|
497
|
+
if ($[11] !== ref || $[12] !== render || $[13] !== t3) {
|
|
498
|
+
t4 = {
|
|
499
|
+
defaultTagName: "div",
|
|
500
|
+
render,
|
|
501
|
+
ref,
|
|
502
|
+
props: t3
|
|
503
|
+
};
|
|
504
|
+
$[11] = ref;
|
|
505
|
+
$[12] = render;
|
|
506
|
+
$[13] = t3;
|
|
507
|
+
$[14] = t4;
|
|
508
|
+
} else t4 = $[14];
|
|
509
|
+
return useRender(t4);
|
|
510
|
+
};
|
|
511
|
+
/**
|
|
512
|
+
* The button that clears the selection and returns focus to the bar. It
|
|
513
|
+
* renders whichever button it is given.
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
* <DataTable.SelectionBar.Clear render={<Button variant="tertiary">Clear selection</Button>} />
|
|
517
|
+
*/
|
|
518
|
+
var SelectionBarClear = (t0) => {
|
|
519
|
+
const $ = c(17);
|
|
520
|
+
let props;
|
|
521
|
+
let ref;
|
|
522
|
+
let render;
|
|
523
|
+
if ($[0] !== t0) {
|
|
524
|
+
({render, ref, ...props} = t0);
|
|
525
|
+
$[0] = t0;
|
|
526
|
+
$[1] = props;
|
|
527
|
+
$[2] = ref;
|
|
528
|
+
$[3] = render;
|
|
529
|
+
} else {
|
|
530
|
+
props = $[1];
|
|
531
|
+
ref = $[2];
|
|
532
|
+
render = $[3];
|
|
533
|
+
}
|
|
534
|
+
const { selection, focusBar, clearRef } = useSelectionBar();
|
|
535
|
+
let t1;
|
|
536
|
+
if ($[4] !== clearRef || $[5] !== ref) {
|
|
537
|
+
t1 = ref === void 0 ? clearRef : [clearRef, ref];
|
|
538
|
+
$[4] = clearRef;
|
|
539
|
+
$[5] = ref;
|
|
540
|
+
$[6] = t1;
|
|
541
|
+
} else t1 = $[6];
|
|
542
|
+
let t2;
|
|
543
|
+
if ($[7] !== focusBar || $[8] !== selection) {
|
|
544
|
+
t2 = () => {
|
|
223
545
|
selection.clear();
|
|
224
|
-
|
|
546
|
+
focusBar();
|
|
225
547
|
};
|
|
548
|
+
$[7] = focusBar;
|
|
549
|
+
$[8] = selection;
|
|
550
|
+
$[9] = t2;
|
|
551
|
+
} else t2 = $[9];
|
|
552
|
+
let t3;
|
|
553
|
+
if ($[10] !== props || $[11] !== t2) {
|
|
554
|
+
t3 = {
|
|
555
|
+
...props,
|
|
556
|
+
type: "button",
|
|
557
|
+
onClick: t2
|
|
558
|
+
};
|
|
559
|
+
$[10] = props;
|
|
560
|
+
$[11] = t2;
|
|
561
|
+
$[12] = t3;
|
|
562
|
+
} else t3 = $[12];
|
|
563
|
+
let t4;
|
|
564
|
+
if ($[13] !== render || $[14] !== t1 || $[15] !== t3) {
|
|
565
|
+
t4 = {
|
|
566
|
+
render,
|
|
567
|
+
ref: t1,
|
|
568
|
+
props: t3
|
|
569
|
+
};
|
|
570
|
+
$[13] = render;
|
|
571
|
+
$[14] = t1;
|
|
572
|
+
$[15] = t3;
|
|
573
|
+
$[16] = t4;
|
|
574
|
+
} else t4 = $[16];
|
|
575
|
+
return useRender(t4);
|
|
576
|
+
};
|
|
577
|
+
/**
|
|
578
|
+
* The offer to select every matching row, fading in while some but not all are
|
|
579
|
+
* selected, then handing focus to `Clear`. It renders whichever button it is
|
|
580
|
+
* given.
|
|
581
|
+
*
|
|
582
|
+
* @example
|
|
583
|
+
* <DataTable.SelectionBar.SelectAll render={<Button variant="tertiary">Select all 30</Button>} />
|
|
584
|
+
*/
|
|
585
|
+
var SelectionBarSelectAll = (t0) => {
|
|
586
|
+
const $ = c(23);
|
|
587
|
+
let className;
|
|
588
|
+
let props;
|
|
589
|
+
let ref;
|
|
590
|
+
let render;
|
|
591
|
+
if ($[0] !== t0) {
|
|
592
|
+
({render, className, ref, ...props} = t0);
|
|
593
|
+
$[0] = t0;
|
|
594
|
+
$[1] = className;
|
|
595
|
+
$[2] = props;
|
|
596
|
+
$[3] = ref;
|
|
597
|
+
$[4] = render;
|
|
598
|
+
} else {
|
|
599
|
+
className = $[1];
|
|
600
|
+
props = $[2];
|
|
601
|
+
ref = $[3];
|
|
602
|
+
render = $[4];
|
|
603
|
+
}
|
|
604
|
+
const { selection, totalRows, selected, clearRef } = useSelectionBar();
|
|
605
|
+
const canSelectAll = selected > 0 && selected < totalRows;
|
|
606
|
+
const selectAllRef = useRef(null);
|
|
607
|
+
const presence = usePresence(canSelectAll, selectAllRef);
|
|
608
|
+
let t1;
|
|
609
|
+
if ($[5] !== ref) {
|
|
610
|
+
t1 = ref === void 0 ? selectAllRef : [selectAllRef, ref];
|
|
611
|
+
$[5] = ref;
|
|
612
|
+
$[6] = t1;
|
|
613
|
+
} else t1 = $[6];
|
|
614
|
+
const t2 = presence.mounted;
|
|
615
|
+
const t3 = presence.props;
|
|
616
|
+
const t4 = !canSelectAll;
|
|
617
|
+
let t5;
|
|
618
|
+
if ($[7] !== className) {
|
|
619
|
+
t5 = clsx(data_table_module_default.selectionSelectAll, className);
|
|
620
|
+
$[7] = className;
|
|
621
|
+
$[8] = t5;
|
|
622
|
+
} else t5 = $[8];
|
|
623
|
+
let t6;
|
|
624
|
+
if ($[9] !== clearRef || $[10] !== selection) {
|
|
625
|
+
t6 = () => {
|
|
626
|
+
selection.selectAllMatching();
|
|
627
|
+
clearRef.current?.focus();
|
|
628
|
+
};
|
|
629
|
+
$[9] = clearRef;
|
|
226
630
|
$[10] = selection;
|
|
227
|
-
$[11] =
|
|
228
|
-
} else
|
|
229
|
-
let
|
|
230
|
-
if ($[12] !==
|
|
231
|
-
|
|
232
|
-
|
|
631
|
+
$[11] = t6;
|
|
632
|
+
} else t6 = $[11];
|
|
633
|
+
let t7;
|
|
634
|
+
if ($[12] !== presence.props || $[13] !== props || $[14] !== t4 || $[15] !== t5 || $[16] !== t6) {
|
|
635
|
+
t7 = {
|
|
636
|
+
...props,
|
|
637
|
+
...t3,
|
|
638
|
+
type: "button",
|
|
639
|
+
inert: t4,
|
|
640
|
+
className: t5,
|
|
641
|
+
onClick: t6
|
|
642
|
+
};
|
|
643
|
+
$[12] = presence.props;
|
|
644
|
+
$[13] = props;
|
|
645
|
+
$[14] = t4;
|
|
646
|
+
$[15] = t5;
|
|
647
|
+
$[16] = t6;
|
|
648
|
+
$[17] = t7;
|
|
649
|
+
} else t7 = $[17];
|
|
650
|
+
let t8;
|
|
651
|
+
if ($[18] !== presence.mounted || $[19] !== render || $[20] !== t1 || $[21] !== t7) {
|
|
652
|
+
t8 = {
|
|
653
|
+
render,
|
|
654
|
+
ref: t1,
|
|
655
|
+
enabled: t2,
|
|
656
|
+
props: t7
|
|
657
|
+
};
|
|
658
|
+
$[18] = presence.mounted;
|
|
659
|
+
$[19] = render;
|
|
660
|
+
$[20] = t1;
|
|
661
|
+
$[21] = t7;
|
|
662
|
+
$[22] = t8;
|
|
663
|
+
} else t8 = $[22];
|
|
664
|
+
return useRender(t8);
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* The caller's bulk actions for the selection, at the end of the `Actions`.
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* <DataTable.SelectionBar.Bulk><Button>Export</Button></DataTable.SelectionBar.Bulk>
|
|
671
|
+
*/
|
|
672
|
+
var SelectionBarBulk = (t0) => {
|
|
673
|
+
const $ = c(14);
|
|
674
|
+
let className;
|
|
675
|
+
let props;
|
|
676
|
+
let ref;
|
|
677
|
+
let render;
|
|
678
|
+
if ($[0] !== t0) {
|
|
679
|
+
({render, className, ref, ...props} = t0);
|
|
680
|
+
$[0] = t0;
|
|
681
|
+
$[1] = className;
|
|
682
|
+
$[2] = props;
|
|
683
|
+
$[3] = ref;
|
|
684
|
+
$[4] = render;
|
|
685
|
+
} else {
|
|
686
|
+
className = $[1];
|
|
687
|
+
props = $[2];
|
|
688
|
+
ref = $[3];
|
|
689
|
+
render = $[4];
|
|
690
|
+
}
|
|
691
|
+
let t1;
|
|
692
|
+
if ($[5] !== className) {
|
|
693
|
+
t1 = clsx(data_table_module_default.selectionBulk, className);
|
|
694
|
+
$[5] = className;
|
|
695
|
+
$[6] = t1;
|
|
696
|
+
} else t1 = $[6];
|
|
697
|
+
let t2;
|
|
698
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
699
|
+
t2 = {
|
|
700
|
+
...props,
|
|
701
|
+
className: t1
|
|
702
|
+
};
|
|
703
|
+
$[7] = props;
|
|
704
|
+
$[8] = t1;
|
|
705
|
+
$[9] = t2;
|
|
706
|
+
} else t2 = $[9];
|
|
707
|
+
let t3;
|
|
708
|
+
if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
|
|
709
|
+
t3 = {
|
|
710
|
+
defaultTagName: "div",
|
|
711
|
+
render,
|
|
712
|
+
ref,
|
|
713
|
+
props: t2
|
|
714
|
+
};
|
|
715
|
+
$[10] = ref;
|
|
716
|
+
$[11] = render;
|
|
717
|
+
$[12] = t2;
|
|
718
|
+
$[13] = t3;
|
|
719
|
+
} else t3 = $[13];
|
|
720
|
+
return useRender(t3);
|
|
721
|
+
};
|
|
722
|
+
var SelectionBarPrefab = (t0) => {
|
|
723
|
+
const $ = c(23);
|
|
724
|
+
const { total, totalRows, countLabel, clearLabel, selectAllLabel, children, className } = t0;
|
|
725
|
+
let t1;
|
|
726
|
+
let t2;
|
|
727
|
+
if ($[0] !== countLabel || $[1] !== total) {
|
|
728
|
+
t1 = /* @__PURE__ */ jsx(SelectionBarSummary, {
|
|
729
|
+
total,
|
|
730
|
+
countLabel
|
|
731
|
+
});
|
|
732
|
+
t2 = /* @__PURE__ */ jsx(SelectionBarStatus, {
|
|
733
|
+
total,
|
|
734
|
+
countLabel
|
|
735
|
+
});
|
|
736
|
+
$[0] = countLabel;
|
|
737
|
+
$[1] = total;
|
|
738
|
+
$[2] = t1;
|
|
739
|
+
$[3] = t2;
|
|
740
|
+
} else {
|
|
741
|
+
t1 = $[2];
|
|
742
|
+
t2 = $[3];
|
|
743
|
+
}
|
|
744
|
+
let t3;
|
|
745
|
+
if ($[4] !== clearLabel) {
|
|
746
|
+
t3 = /* @__PURE__ */ jsx(SelectionBarClear, { render: /* @__PURE__ */ jsx(Button, {
|
|
233
747
|
variant: "tertiary",
|
|
234
|
-
onClick: t12,
|
|
235
748
|
children: clearLabel
|
|
236
|
-
});
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
749
|
+
}) });
|
|
750
|
+
$[4] = clearLabel;
|
|
751
|
+
$[5] = t3;
|
|
752
|
+
} else t3 = $[5];
|
|
753
|
+
let t4;
|
|
754
|
+
if ($[6] !== selectAllLabel || $[7] !== totalRows) {
|
|
755
|
+
t4 = selectAllLabel(totalRows);
|
|
756
|
+
$[6] = selectAllLabel;
|
|
757
|
+
$[7] = totalRows;
|
|
758
|
+
$[8] = t4;
|
|
759
|
+
} else t4 = $[8];
|
|
760
|
+
let t5;
|
|
761
|
+
if ($[9] !== t4) {
|
|
762
|
+
t5 = /* @__PURE__ */ jsx(SelectionBarSelectAll, { render: /* @__PURE__ */ jsx(Button, {
|
|
246
763
|
variant: "tertiary",
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
});
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
className: data_table_module_default.selectionActions,
|
|
276
|
-
inert: empty,
|
|
277
|
-
children: [
|
|
278
|
-
t13,
|
|
279
|
-
t14,
|
|
280
|
-
t15
|
|
281
|
-
]
|
|
282
|
-
});
|
|
283
|
-
$[24] = empty;
|
|
284
|
-
$[25] = t13;
|
|
285
|
-
$[26] = t14;
|
|
286
|
-
$[27] = t15;
|
|
287
|
-
$[28] = t16;
|
|
288
|
-
} else t16 = $[28];
|
|
289
|
-
let t17;
|
|
290
|
-
if ($[29] !== t11 || $[30] !== t16 || $[31] !== t3 || $[32] !== t4 || $[33] !== t7) {
|
|
291
|
-
t17 = /* @__PURE__ */ jsxs("div", {
|
|
292
|
-
ref: barRef,
|
|
293
|
-
tabIndex: t2,
|
|
294
|
-
className: t3,
|
|
295
|
-
"data-selected": t4,
|
|
764
|
+
children: t4
|
|
765
|
+
}) });
|
|
766
|
+
$[9] = t4;
|
|
767
|
+
$[10] = t5;
|
|
768
|
+
} else t5 = $[10];
|
|
769
|
+
let t6;
|
|
770
|
+
if ($[11] !== children) {
|
|
771
|
+
t6 = /* @__PURE__ */ jsx(SelectionBarBulk, { children });
|
|
772
|
+
$[11] = children;
|
|
773
|
+
$[12] = t6;
|
|
774
|
+
} else t6 = $[12];
|
|
775
|
+
let t7;
|
|
776
|
+
if ($[13] !== t3 || $[14] !== t5 || $[15] !== t6) {
|
|
777
|
+
t7 = /* @__PURE__ */ jsxs(SelectionBarActions, { children: [
|
|
778
|
+
t3,
|
|
779
|
+
t5,
|
|
780
|
+
t6
|
|
781
|
+
] });
|
|
782
|
+
$[13] = t3;
|
|
783
|
+
$[14] = t5;
|
|
784
|
+
$[15] = t6;
|
|
785
|
+
$[16] = t7;
|
|
786
|
+
} else t7 = $[16];
|
|
787
|
+
let t8;
|
|
788
|
+
if ($[17] !== className || $[18] !== t1 || $[19] !== t2 || $[20] !== t7 || $[21] !== totalRows) {
|
|
789
|
+
t8 = /* @__PURE__ */ jsxs(SelectionBarRoot, {
|
|
790
|
+
totalRows,
|
|
791
|
+
className,
|
|
296
792
|
children: [
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
793
|
+
t1,
|
|
794
|
+
t2,
|
|
795
|
+
t7
|
|
300
796
|
]
|
|
301
797
|
});
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
} else
|
|
309
|
-
|
|
310
|
-
if ($[35] !== t1.selectionContainer || $[36] !== t17) {
|
|
311
|
-
t18 = /* @__PURE__ */ jsx("div", {
|
|
312
|
-
className: t1.selectionContainer,
|
|
313
|
-
children: t17
|
|
314
|
-
});
|
|
315
|
-
$[35] = t1.selectionContainer;
|
|
316
|
-
$[36] = t17;
|
|
317
|
-
$[37] = t18;
|
|
318
|
-
} else t18 = $[37];
|
|
319
|
-
return t18;
|
|
798
|
+
$[17] = className;
|
|
799
|
+
$[18] = t1;
|
|
800
|
+
$[19] = t2;
|
|
801
|
+
$[20] = t7;
|
|
802
|
+
$[21] = totalRows;
|
|
803
|
+
$[22] = t8;
|
|
804
|
+
} else t8 = $[22];
|
|
805
|
+
return t8;
|
|
320
806
|
};
|
|
807
|
+
/**
|
|
808
|
+
* The bar above a selectable table: the total while nothing is selected, then
|
|
809
|
+
* the selected count, a clear button, the offer to select every matching row,
|
|
810
|
+
* and the caller's bulk actions. Its parts compose another bar.
|
|
811
|
+
*
|
|
812
|
+
* @example
|
|
813
|
+
* <DataTable.SelectionBar
|
|
814
|
+
* totalRows={30}
|
|
815
|
+
* total="30 invoices"
|
|
816
|
+
* countLabel={(n, total) => `${n} of ${total} selected`}
|
|
817
|
+
* clearLabel="Clear selection"
|
|
818
|
+
* selectAllLabel={total => `Select all ${total}`}
|
|
819
|
+
* />
|
|
820
|
+
*/
|
|
821
|
+
var DataTableSelectionBar = Object.assign(SelectionBarPrefab, {
|
|
822
|
+
Root: SelectionBarRoot,
|
|
823
|
+
Summary: SelectionBarSummary,
|
|
824
|
+
Status: SelectionBarStatus,
|
|
825
|
+
Actions: SelectionBarActions,
|
|
826
|
+
Clear: SelectionBarClear,
|
|
827
|
+
SelectAll: SelectionBarSelectAll,
|
|
828
|
+
Bulk: SelectionBarBulk
|
|
829
|
+
});
|
|
321
830
|
function _temp(row) {
|
|
322
831
|
return row.id;
|
|
323
832
|
}
|