@wirecore/wirelayer-vue 0.1.1 → 0.3.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/README.md +2 -0
- package/dist/{Button-B387XkrN.js → Button-DZ_ZGl7X.js} +1 -1
- package/dist/{Checkbox-Dyr5o6oP.js → Checkbox-D9f77jtl.js} +1 -1
- package/dist/{ContextMenu-dbn6-cy6.js → ContextMenu-DaBQXlQb.js} +4 -4
- package/dist/{CopyButton-DgBx4S3K.js → CopyButton-GmqpUNLf.js} +1 -1
- package/dist/{Field-vXBiiUPp.js → Field-BdIPugFP.js} +1 -1
- package/dist/{Highlight-D9NePuM4.js → Highlight-DvGcm2QR.js} +1 -1
- package/dist/{Input-CL58Z06T.js → Input-C59NJK4m.js} +1 -1
- package/dist/{Select-CORKKGPY.js → Select-BlEjQWBP.js} +2 -2
- package/dist/{Slider-CM1x_dlq.js → Slider-CyoZc5A8.js} +1 -1
- package/dist/{Tree-Cwh7NNf3.js → Tree-B39xwNbU.js} +2 -2
- package/dist/chart/Chart.vue.d.ts.map +1 -1
- package/dist/chart/ChartCanvas.vue.d.ts.map +1 -1
- package/dist/chart/Sparkline.vue.d.ts.map +1 -1
- package/dist/chart.js +30 -30
- package/dist/code.js +3 -3
- package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +11 -2
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table/ValueInput.vue.d.ts.map +1 -1
- package/dist/data-table/features.d.ts +4 -0
- package/dist/data-table/features.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +4 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/inputs.d.ts +6 -0
- package/dist/data-table/inputs.d.ts.map +1 -0
- package/dist/data-table/types.d.ts +39 -1
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1576 -1546
- package/dist/editor.js +3 -3
- package/dist/form/bind.d.ts +1 -1
- package/dist/form/bind.d.ts.map +1 -1
- package/dist/form.js +6 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/locale.d.ts +1 -1
- package/dist/locale.d.ts.map +1 -1
- package/dist/locales/de.d.ts +2 -0
- package/dist/locales/de.d.ts.map +1 -0
- package/dist/locales/de.js +1 -0
- package/dist/pdf.js +5 -5
- package/dist/recipes-BlM9aKyt.js +39 -0
- package/dist/recipes.d.ts.map +1 -1
- package/dist/sources/Accordion.css +2 -0
- package/dist/sources/AccordionItem.css +2 -0
- package/dist/sources/ActionBar.css +5 -0
- package/dist/sources/Affix.css +2 -0
- package/dist/sources/AiLabel.css +3 -0
- package/dist/sources/Alert.css +2 -0
- package/dist/sources/AngleSlider.css +2 -0
- package/dist/sources/AppShell.css +5 -0
- package/dist/sources/AspectRatio.css +2 -0
- package/dist/sources/Autocomplete.css +3 -0
- package/dist/sources/Avatar.css +2 -0
- package/dist/sources/AvatarGroup.css +2 -0
- package/dist/sources/Badge.css +2 -0
- package/dist/sources/Banner.css +2 -0
- package/dist/sources/BarChart.css +4 -0
- package/dist/sources/BarsList.css +2 -0
- package/dist/sources/BlockUi.css +3 -0
- package/dist/sources/BottomNavigation.css +2 -0
- package/dist/sources/Breadcrumb.css +3 -0
- package/dist/sources/BreadcrumbItem.css +2 -0
- package/dist/sources/BulletChart.css +2 -0
- package/dist/sources/Button.css +3 -0
- package/dist/sources/ButtonGroup.css +2 -0
- package/dist/sources/Calendar.css +2 -0
- package/dist/sources/Card.css +3 -0
- package/dist/sources/Carousel.css +3 -0
- package/dist/sources/CascadeSelect.css +3 -0
- package/dist/sources/Center.css +2 -0
- package/dist/sources/Chart.css +2 -0
- package/dist/sources/ChatMessage.css +4 -0
- package/dist/sources/ChatMessages.css +7 -0
- package/dist/sources/ChatPrompt.css +5 -0
- package/dist/sources/ChatSources.css +2 -0
- package/dist/sources/ChatThinking.css +2 -0
- package/dist/sources/ChatToolCall.css +2 -0
- package/dist/sources/Checkbox.css +2 -0
- package/dist/sources/CheckboxCard.css +2 -0
- package/dist/sources/CheckboxGroup.css +3 -0
- package/dist/sources/Chip.css +3 -0
- package/dist/sources/ChipGroup.css +2 -0
- package/dist/sources/CodeHighlight.css +7 -0
- package/dist/sources/CodeHighlightTabs.css +8 -0
- package/dist/sources/Collapse.css +2 -0
- package/dist/sources/ColorInput.css +2 -0
- package/dist/sources/ColorPicker.css +2 -0
- package/dist/sources/ColorSwatchPicker.css +2 -0
- package/dist/sources/Combobox.css +2 -0
- package/dist/sources/CommandPalette.css +5 -0
- package/dist/sources/Compare.css +2 -0
- package/dist/sources/CompositeChart.css +4 -0
- package/dist/sources/ConfigProvider.css +2 -0
- package/dist/sources/ConfirmDialog.css +7 -0
- package/dist/sources/ConfirmPopup.css +4 -0
- package/dist/sources/Container.css +2 -0
- package/dist/sources/ContextMenu.css +2 -0
- package/dist/sources/CopyButton.css +3 -0
- package/dist/sources/Countdown.css +2 -0
- package/dist/sources/DataList.css +2 -0
- package/dist/sources/DataListItem.css +2 -0
- package/dist/sources/DataTable.css +16 -0
- package/dist/sources/DataView.css +9 -0
- package/dist/sources/DatePicker.css +2 -0
- package/dist/sources/DateRangePicker.css +2 -0
- package/dist/sources/Descriptions.css +2 -0
- package/dist/sources/Dialog.css +2 -0
- package/dist/sources/DialogClose.css +2 -0
- package/dist/sources/DialogContent.css +2 -0
- package/dist/sources/DialogHost.css +2 -0
- package/dist/sources/DialogTrigger.css +2 -0
- package/dist/sources/Divider.css +2 -0
- package/dist/sources/DownloadTrigger.css +3 -0
- package/dist/sources/Drawer.css +2 -0
- package/dist/sources/DrawerClose.css +2 -0
- package/dist/sources/DrawerContent.css +2 -0
- package/dist/sources/DrawerTrigger.css +2 -0
- package/dist/sources/DurationInput.css +2 -0
- package/dist/sources/Editor.css +7 -0
- package/dist/sources/EmojiPicker.css +3 -0
- package/dist/sources/EmptyState.css +2 -0
- package/dist/sources/Field.css +3 -0
- package/dist/sources/FieldArray.css +6 -0
- package/dist/sources/Fieldset.css +2 -0
- package/dist/sources/FileTypes.css +2 -0
- package/dist/sources/FileUpload.css +5 -0
- package/dist/sources/FilterChips.css +4 -0
- package/dist/sources/FilterPanel.css +8 -0
- package/dist/sources/FloatingPanel.css +2 -0
- package/dist/sources/FormErrorSummary.css +2 -0
- package/dist/sources/FormField.css +3 -0
- package/dist/sources/FormList.css +6 -0
- package/dist/sources/FormatBytes.css +2 -0
- package/dist/sources/FormatDate.css +2 -0
- package/dist/sources/FormatDateTime.css +2 -0
- package/dist/sources/FormatList.css +2 -0
- package/dist/sources/FormatNumber.css +2 -0
- package/dist/sources/FormatRelativeTime.css +2 -0
- package/dist/sources/Funnel.css +3 -0
- package/dist/sources/Gallery.css +5 -0
- package/dist/sources/Gantt.css +9 -0
- package/dist/sources/Gauge.css +2 -0
- package/dist/sources/Group.css +2 -0
- package/dist/sources/Heatmap.css +2 -0
- package/dist/sources/Highlight.css +2 -0
- package/dist/sources/HotkeysDialog.css +5 -0
- package/dist/sources/HoverCard.css +2 -0
- package/dist/sources/IconButton.css +2 -0
- package/dist/sources/Image.css +4 -0
- package/dist/sources/ImageCropper.css +3 -0
- package/dist/sources/InlineCode.css +2 -0
- package/dist/sources/InlineEdit.css +5 -0
- package/dist/sources/Inplace.css +2 -0
- package/dist/sources/Input.css +2 -0
- package/dist/sources/InputGroup.css +2 -0
- package/dist/sources/InputGroupAddon.css +2 -0
- package/dist/sources/JsonInput.css +6 -0
- package/dist/sources/JsonViewer.css +4 -0
- package/dist/sources/Kanban.css +5 -0
- package/dist/sources/Kbd.css +3 -0
- package/dist/sources/KeyValueEditor.css +8 -0
- package/dist/sources/Knob.css +2 -0
- package/dist/sources/LandmarkNavigation.css +2 -0
- package/dist/sources/LineChart.css +4 -0
- package/dist/sources/Listbox.css +2 -0
- package/dist/sources/LiveAnnouncer.css +2 -0
- package/dist/sources/LocaleProvider.css +2 -0
- package/dist/sources/LogViewer.css +7 -0
- package/dist/sources/Markdown.css +2 -0
- package/dist/sources/Marquee.css +3 -0
- package/dist/sources/MaskInput.css +2 -0
- package/dist/sources/Masonry.css +2 -0
- package/dist/sources/MegaMenu.css +6 -0
- package/dist/sources/Mentions.css +2 -0
- package/dist/sources/Menu.css +2 -0
- package/dist/sources/Menubar.css +4 -0
- package/dist/sources/MeterGroup.css +2 -0
- package/dist/sources/MiniCalendar.css +2 -0
- package/dist/sources/MonthPicker.css +2 -0
- package/dist/sources/MultiSelect.css +2 -0
- package/dist/sources/NativeSelect.css +2 -0
- package/dist/sources/NavigationMenu.css +2 -0
- package/dist/sources/NavigationProgress.css +2 -0
- package/dist/sources/NotificationCenter.css +7 -0
- package/dist/sources/NumberFormatter.css +2 -0
- package/dist/sources/NumberInput.css +2 -0
- package/dist/sources/OrderList.css +4 -0
- package/dist/sources/OrgChart.css +2 -0
- package/dist/sources/OverflowList.css +4 -0
- package/dist/sources/OverlayBadge.css +2 -0
- package/dist/sources/PageHeader.css +3 -0
- package/dist/sources/Pagination.css +4 -0
- package/dist/sources/Panel.css +2 -0
- package/dist/sources/PasswordInput.css +2 -0
- package/dist/sources/PdfViewer.css +13 -0
- package/dist/sources/Persona.css +4 -0
- package/dist/sources/PhoneInput.css +4 -0
- package/dist/sources/PickList.css +4 -0
- package/dist/sources/PieChart.css +3 -0
- package/dist/sources/PinInput.css +2 -0
- package/dist/sources/Popover.css +2 -0
- package/dist/sources/PopoverClose.css +2 -0
- package/dist/sources/PopoverContent.css +2 -0
- package/dist/sources/PopoverTrigger.css +2 -0
- package/dist/sources/Progress.css +2 -0
- package/dist/sources/ProgressCircle.css +2 -0
- package/dist/sources/QrCode.css +4 -0
- package/dist/sources/QuarterPicker.css +2 -0
- package/dist/sources/RadialBar.css +2 -0
- package/dist/sources/RadioCard.css +2 -0
- package/dist/sources/RadioGroup.css +2 -0
- package/dist/sources/RadioGroupItem.css +2 -0
- package/dist/sources/Rating.css +2 -0
- package/dist/sources/RecipesProvider.css +2 -0
- package/dist/sources/Result.css +2 -0
- package/dist/sources/RingProgress.css +2 -0
- package/dist/sources/SCHEDULER_DRAG_TYPE.css +2 -0
- package/dist/sources/Sankey.css +3 -0
- package/dist/sources/SaveStatus.css +2 -0
- package/dist/sources/Scheduler.css +10 -0
- package/dist/sources/ScrollPanel.css +2 -0
- package/dist/sources/ScrollTop.css +3 -0
- package/dist/sources/Scroller.css +2 -0
- package/dist/sources/SearchField.css +6 -0
- package/dist/sources/SegmentedControl.css +2 -0
- package/dist/sources/SegmentedControlItem.css +2 -0
- package/dist/sources/Select.css +2 -0
- package/dist/sources/SessionTimeout.css +5 -0
- package/dist/sources/SidebarNav.css +3 -0
- package/dist/sources/SignaturePad.css +5 -0
- package/dist/sources/SimpleGrid.css +2 -0
- package/dist/sources/Skeleton.css +2 -0
- package/dist/sources/SkipLinks.css +2 -0
- package/dist/sources/Slider.css +2 -0
- package/dist/sources/Sortable.css +2 -0
- package/dist/sources/Sparkline.css +2 -0
- package/dist/sources/SpeedDial.css +2 -0
- package/dist/sources/Spinner.css +2 -0
- package/dist/sources/SplitButton.css +4 -0
- package/dist/sources/Splitter.css +2 -0
- package/dist/sources/Spoiler.css +2 -0
- package/dist/sources/Stack.css +2 -0
- package/dist/sources/Statistic.css +3 -0
- package/dist/sources/StatusDot.css +2 -0
- package/dist/sources/Stepper.css +4 -0
- package/dist/sources/Steps.css +2 -0
- package/dist/sources/Sticky.css +2 -0
- package/dist/sources/Switch.css +2 -0
- package/dist/sources/SwitchGroup.css +3 -0
- package/dist/sources/TableOfContents.css +2 -0
- package/dist/sources/Tabs.css +2 -0
- package/dist/sources/TabsContent.css +2 -0
- package/dist/sources/TabsList.css +2 -0
- package/dist/sources/TabsTrigger.css +2 -0
- package/dist/sources/TagsInput.css +2 -0
- package/dist/sources/Textarea.css +3 -0
- package/dist/sources/TimeGrid.css +2 -0
- package/dist/sources/TimePicker.css +3 -0
- package/dist/sources/TimeRangePicker.css +2 -0
- package/dist/sources/Timeline.css +4 -0
- package/dist/sources/Toaster.css +2 -0
- package/dist/sources/ToggleButton.css +3 -0
- package/dist/sources/Toggletip.css +2 -0
- package/dist/sources/Toolbar.css +3 -0
- package/dist/sources/Tooltip.css +2 -0
- package/dist/sources/TooltipGroup.css +2 -0
- package/dist/sources/Tour.css +5 -0
- package/dist/sources/Tree.css +5 -0
- package/dist/sources/TreeSelect.css +6 -0
- package/dist/sources/Treemap.css +2 -0
- package/dist/sources/Truncate.css +3 -0
- package/dist/sources/VirtualList.css +2 -0
- package/dist/sources/VirtualSelect.css +3 -0
- package/dist/sources/VirtualTree.css +5 -0
- package/dist/sources/VisuallyHidden.css +2 -0
- package/dist/sources/WaterfallChart.css +2 -0
- package/dist/sources/Watermark.css +2 -0
- package/dist/sources/Wizard.css +5 -0
- package/dist/sources/YearPicker.css +2 -0
- package/dist/sources/dateInput.css +3 -0
- package/dist/sources/numberInput.css +3 -0
- package/dist/{useTree-DO_-mY9G.js → useTree-Dt7NO7cp.js} +3 -3
- package/dist/virtual/index.d.ts +3 -0
- package/dist/virtual/index.d.ts.map +1 -1
- package/dist/virtual/virtual-rows.d.ts +4 -0
- package/dist/virtual/virtual-rows.d.ts.map +1 -0
- package/dist/virtual.js +282 -282
- package/package.json +9 -6
- package/styles-core.css +15 -0
- package/dist/recipes-CcZk3fPU.js +0 -39
package/dist/data-table.js
CHANGED
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import { a as e, i as t, n } from "./recipes-
|
|
2
|
-
import { _ as r, g as i, i as a, n as o, r as s, t as c, v as l, y as u } from "./ContextMenu-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
6
|
-
import { i as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { ArrowDown as
|
|
11
|
-
import { EditHistory as Ge, aggregateValues as Ke, applyPending as qe, autoRowSpans as Je, changesByRow as Ye, clearTableState as Xe, collectErrors as Ze, conditionFieldsFromColumns as Qe, createDataController as
|
|
12
|
-
import { Menu as
|
|
13
|
-
import { Popover as
|
|
14
|
-
import { columnFilteringFeature as
|
|
15
|
-
import { useVirtualizer as An } from "@tanstack/vue-virtual";
|
|
1
|
+
import { a as e, i as t, n } from "./recipes-BlM9aKyt.js";
|
|
2
|
+
import { _ as r, g as i, i as a, n as o, r as s, t as c, v as l, y as u } from "./ContextMenu-DaBQXlQb.js";
|
|
3
|
+
import { t as d } from "./Button-DZ_ZGl7X.js";
|
|
4
|
+
import { t as ee } from "./Checkbox-D9f77jtl.js";
|
|
5
|
+
import { n as f, t as p } from "./Input-C59NJK4m.js";
|
|
6
|
+
import { i as te, t as ne } from "./Select-BlEjQWBP.js";
|
|
7
|
+
import { t as re } from "./Highlight-DvGcm2QR.js";
|
|
8
|
+
import { t as ie } from "./CopyButton-GmqpUNLf.js";
|
|
9
|
+
import { Fragment as m, Teleport as ae, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as oe, createTextVNode as b, createVNode as x, defineComponent as S, h as se, inject as C, mergeProps as ce, nextTick as w, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as le, onMounted as ue, onUpdated as de, openBlock as D, provide as fe, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as pe, shallowRef as me, toDisplayString as j, unref as M, useAttrs as he, useId as ge, useSlots as _e, useTemplateRef as ve, watch as N, withCtx as P, withModifiers as ye } from "vue";
|
|
10
|
+
import { ArrowDown as be, ArrowUp as xe, ArrowUpDown as Se, Check as Ce, ChevronDown as we, ChevronRight as Te, ChevronUp as Ee, ChevronsDownUp as De, ChevronsUpDown as Oe, Columns3 as ke, Download as Ae, EllipsisVertical as je, Filter as Me, GripVertical as Ne, ListFilter as Pe, Maximize2 as Fe, Minimize2 as Ie, Pencil as Le, Plus as Re, Redo2 as ze, Rows3 as Be, Search as Ve, TextSearch as He, Trash2 as F, Undo2 as Ue, X as We } from "@lucide/vue";
|
|
11
|
+
import { EditHistory as Ge, aggregateValues as Ke, applyPending as qe, autoRowSpans as Je, changesByRow as Ye, clearTableState as Xe, collectErrors as Ze, conditionFieldsFromColumns as Qe, createDataController as $e, createDataController as et, createXlsx as tt, csvSeparator as nt, dataAnnouncement as rt, dataSourceToRows as I, dataTable as it, dataTableMatchModes as at, defineMatchMode as ot, downloadBytes as st, downloadText as ct, emptyConditionGroup as lt, emptyFilterRule as L, extendRange as ut, findMatches as dt, fitColumnWidth as ft, gridFocusIn as pt, gridKeydown as mt, groupedRowMove as ht, historyKey as gt, idRange as _t, inlineArrowStep as vt, isActiveCondition as yt, isActiveFilter as bt, isRangeMatchMode as xt, listValueKey as St, loadTableState as Ct, locateTreeNode as wt, matchModeDefinition as Tt, matchModeLabel as Et, matchModesFor as Dt, matchesColumnFilter as Ot, matchesCondition as kt, matchesSearch as At, menu as jt, moveColumnBlock as Mt, moveItem as Nt, moveTreeRow as Pt, nextSorting as Ft, numberSummary as It, parseCellText as Lt, parseTsv as Rt, pasteTargets as zt, pendingValue as Bt, pivotTable as Vt, pivotView as Ht, printHtml as Ut, printTableHtml as Wt, queryKey as Gt, rangeAround as Kt, rangeBounds as qt, rowColumnSpans as Jt, rowsToDataSource as Yt, rowsToDataSource as Xt, sameCellValue as Zt, saveTableState as Qt, syncGrid as $t, toCsv as en, toFilterRule as tn, toTsv as nn, treeDropMove as rn, treeGridKeyAction as an, treeKeyboardMove as on, warnInDevelopment as sn } from "@wirecore/wirelayer-recipes";
|
|
12
|
+
import { Menu as R } from "@ark-ui/vue/menu";
|
|
13
|
+
import { Popover as cn } from "@ark-ui/vue/popover";
|
|
14
|
+
import { columnFilteringFeature as ln, columnGroupingFeature as un, columnOrderingFeature as dn, columnPinningFeature as fn, columnResizingFeature as pn, columnSizingFeature as mn, columnVisibilityFeature as hn, createExpandedRowModel as gn, createFilteredRowModel as _n, createGroupedRowModel as vn, createPaginatedRowModel as yn, createSortedRowModel as bn, filterFn_equalsString as xn, filterFn_includesString as Sn, globalFilteringFeature as Cn, rowExpandingFeature as wn, rowPaginationFeature as Tn, rowPinningFeature as En, rowSelectionFeature as Dn, rowSortingFeature as On, sortFn_alphanumeric as kn, tableFeatures as An, useTable as jn } from "@tanstack/vue-table";
|
|
16
15
|
//#region src/data-table/features.ts
|
|
17
|
-
var
|
|
18
|
-
rowSortingFeature:
|
|
19
|
-
sortedRowModel:
|
|
20
|
-
sortFns: { alphanumeric:
|
|
21
|
-
rowPaginationFeature:
|
|
22
|
-
paginatedRowModel:
|
|
23
|
-
rowSelectionFeature:
|
|
24
|
-
rowPinningFeature:
|
|
25
|
-
rowExpandingFeature:
|
|
26
|
-
expandedRowModel:
|
|
27
|
-
columnGroupingFeature:
|
|
28
|
-
groupedRowModel:
|
|
29
|
-
columnFilteringFeature:
|
|
30
|
-
globalFilteringFeature:
|
|
31
|
-
filteredRowModel:
|
|
16
|
+
var Mn = An({
|
|
17
|
+
rowSortingFeature: On,
|
|
18
|
+
sortedRowModel: bn(),
|
|
19
|
+
sortFns: { alphanumeric: kn },
|
|
20
|
+
rowPaginationFeature: Tn,
|
|
21
|
+
paginatedRowModel: yn(),
|
|
22
|
+
rowSelectionFeature: Dn,
|
|
23
|
+
rowPinningFeature: En,
|
|
24
|
+
rowExpandingFeature: wn,
|
|
25
|
+
expandedRowModel: gn(),
|
|
26
|
+
columnGroupingFeature: un,
|
|
27
|
+
groupedRowModel: vn(),
|
|
28
|
+
columnFilteringFeature: ln,
|
|
29
|
+
globalFilteringFeature: Cn,
|
|
30
|
+
filteredRowModel: _n(),
|
|
32
31
|
filterFns: {
|
|
33
|
-
includesString:
|
|
34
|
-
equalsString:
|
|
32
|
+
includesString: Sn,
|
|
33
|
+
equalsString: xn
|
|
35
34
|
},
|
|
36
|
-
columnVisibilityFeature:
|
|
37
|
-
columnOrderingFeature:
|
|
38
|
-
columnPinningFeature:
|
|
39
|
-
columnSizingFeature:
|
|
40
|
-
columnResizingFeature:
|
|
41
|
-
}),
|
|
35
|
+
columnVisibilityFeature: hn,
|
|
36
|
+
columnOrderingFeature: dn,
|
|
37
|
+
columnPinningFeature: fn,
|
|
38
|
+
columnSizingFeature: mn,
|
|
39
|
+
columnResizingFeature: pn
|
|
40
|
+
}), Nn = Symbol("wirecore-data-table-features"), Pn = /* @__PURE__ */ S({
|
|
42
41
|
__name: "ValueInput",
|
|
43
42
|
props: {
|
|
44
43
|
type: {},
|
|
@@ -50,43 +49,43 @@ var jn = On({
|
|
|
50
49
|
},
|
|
51
50
|
emits: ["update:modelValue"],
|
|
52
51
|
setup(t, { emit: n }) {
|
|
53
|
-
let r = t, i = n,
|
|
52
|
+
let r = t, i = n, a = e().dataTable, o = e(), c = C(Nn, {}), u = h(() => (r.options ?? []).some((e) => typeof e != "string")), d = h(() => [...r.any ? [{
|
|
54
53
|
value: "",
|
|
55
|
-
label:
|
|
54
|
+
label: a.filterAll
|
|
56
55
|
}] : [], ...r.type === "boolean" ? [{
|
|
57
56
|
value: "true",
|
|
58
|
-
label:
|
|
57
|
+
label: a.yes
|
|
59
58
|
}, {
|
|
60
59
|
value: "false",
|
|
61
|
-
label:
|
|
60
|
+
label: a.no
|
|
62
61
|
}] : (r.options ?? []).map((e) => typeof e == "string" ? {
|
|
63
62
|
value: e,
|
|
64
63
|
label: e
|
|
65
|
-
} : e)]),
|
|
66
|
-
return (e, n) => t.type === "text" ? (
|
|
64
|
+
} : e)]), f = h(() => r.modelValue === null || r.modelValue === void 0 ? "" : String(r.modelValue)), te = (e) => e && Number.isFinite(Number(e)) ? Number(e) : null, re = h(() => u.value ? r.modelValue ?? (r.any ? "" : null) : f.value);
|
|
65
|
+
return (e, n) => t.type === "text" ? (D(), g(p, {
|
|
67
66
|
key: 0,
|
|
68
67
|
size: "sm",
|
|
69
68
|
"aria-label": t.label,
|
|
70
69
|
invalid: t.invalid,
|
|
71
|
-
"model-value":
|
|
70
|
+
"model-value": f.value,
|
|
72
71
|
"onUpdate:modelValue": n[0] ||= (e) => i("update:modelValue", e ?? "")
|
|
73
72
|
}, null, 8, [
|
|
74
73
|
"aria-label",
|
|
75
74
|
"invalid",
|
|
76
75
|
"model-value"
|
|
77
|
-
])) : t.type === "textarea" ? (
|
|
76
|
+
])) : t.type === "textarea" ? (D(), g(l, {
|
|
78
77
|
key: 1,
|
|
79
78
|
size: "sm",
|
|
80
79
|
"auto-resize": "",
|
|
81
80
|
"aria-label": t.label,
|
|
82
81
|
invalid: t.invalid,
|
|
83
|
-
"model-value":
|
|
82
|
+
"model-value": f.value,
|
|
84
83
|
"onUpdate:modelValue": n[1] ||= (e) => i("update:modelValue", e ?? "")
|
|
85
84
|
}, null, 8, [
|
|
86
85
|
"aria-label",
|
|
87
86
|
"invalid",
|
|
88
87
|
"model-value"
|
|
89
|
-
])) : t.type === "number" ? (
|
|
88
|
+
])) : t.type === "number" && M(c).numberInput ? (D(), g(pe(M(c).numberInput), {
|
|
90
89
|
key: 2,
|
|
91
90
|
size: "sm",
|
|
92
91
|
"aria-label": t.label,
|
|
@@ -97,50 +96,75 @@ var jn = On({
|
|
|
97
96
|
"aria-label",
|
|
98
97
|
"invalid",
|
|
99
98
|
"model-value"
|
|
100
|
-
])) : t.type === "
|
|
99
|
+
])) : t.type === "number" ? (D(), g(p, {
|
|
101
100
|
key: 3,
|
|
101
|
+
type: "number",
|
|
102
|
+
size: "sm",
|
|
103
|
+
"aria-label": t.label,
|
|
104
|
+
invalid: t.invalid,
|
|
105
|
+
"model-value": typeof t.modelValue == "number" ? String(t.modelValue) : "",
|
|
106
|
+
"onUpdate:modelValue": n[3] ||= (e) => i("update:modelValue", te(e))
|
|
107
|
+
}, null, 8, [
|
|
108
|
+
"aria-label",
|
|
109
|
+
"invalid",
|
|
110
|
+
"model-value"
|
|
111
|
+
])) : (t.type === "date" || t.type === "datetime") && M(c).dateInput ? (D(), g(pe(M(c).dateInput), {
|
|
112
|
+
key: 4,
|
|
102
113
|
"aria-label": t.label,
|
|
103
114
|
invalid: t.invalid,
|
|
104
115
|
"with-time": t.type === "datetime",
|
|
105
|
-
"model-value":
|
|
106
|
-
"onUpdate:modelValue": n[
|
|
116
|
+
"model-value": f.value || null,
|
|
117
|
+
"onUpdate:modelValue": n[4] ||= (e) => i("update:modelValue", e)
|
|
107
118
|
}, null, 8, [
|
|
108
119
|
"aria-label",
|
|
109
120
|
"invalid",
|
|
110
121
|
"with-time",
|
|
111
122
|
"model-value"
|
|
112
|
-
])) : t.type === "
|
|
113
|
-
key:
|
|
123
|
+
])) : t.type === "date" || t.type === "datetime" ? (D(), g(p, {
|
|
124
|
+
key: 5,
|
|
125
|
+
type: t.type === "date" ? "date" : "datetime-local",
|
|
126
|
+
size: "sm",
|
|
127
|
+
"aria-label": t.label,
|
|
128
|
+
invalid: t.invalid,
|
|
129
|
+
"model-value": f.value.slice(0, t.type === "date" ? 10 : 16),
|
|
130
|
+
"onUpdate:modelValue": n[5] ||= (e) => i("update:modelValue", e || null)
|
|
131
|
+
}, null, 8, [
|
|
132
|
+
"type",
|
|
133
|
+
"aria-label",
|
|
134
|
+
"invalid",
|
|
135
|
+
"model-value"
|
|
136
|
+
])) : t.type === "multiSelect" ? (D(), g(s, {
|
|
137
|
+
key: 6,
|
|
114
138
|
"aria-label": t.label,
|
|
115
139
|
items: d.value,
|
|
116
140
|
invalid: t.invalid,
|
|
117
|
-
placeholder:
|
|
141
|
+
placeholder: M(a).filterAll,
|
|
118
142
|
"model-value": Array.isArray(t.modelValue) ? t.modelValue : [],
|
|
119
|
-
"onUpdate:modelValue": n[
|
|
143
|
+
"onUpdate:modelValue": n[6] ||= (e) => i("update:modelValue", e)
|
|
120
144
|
}, null, 8, [
|
|
121
145
|
"aria-label",
|
|
122
146
|
"items",
|
|
123
147
|
"invalid",
|
|
124
148
|
"placeholder",
|
|
125
149
|
"model-value"
|
|
126
|
-
])) : t.type === "checkbox" ? (
|
|
127
|
-
key:
|
|
150
|
+
])) : t.type === "checkbox" ? (D(), g(ee, {
|
|
151
|
+
key: 7,
|
|
128
152
|
"aria-label": t.label,
|
|
129
153
|
invalid: t.invalid,
|
|
130
154
|
checked: t.modelValue === !0,
|
|
131
|
-
"onUpdate:checked": n[
|
|
155
|
+
"onUpdate:checked": n[7] ||= (e) => i("update:modelValue", e === !0)
|
|
132
156
|
}, null, 8, [
|
|
133
157
|
"aria-label",
|
|
134
158
|
"invalid",
|
|
135
159
|
"checked"
|
|
136
|
-
])) : (
|
|
137
|
-
key:
|
|
160
|
+
])) : (D(), g(ne, {
|
|
161
|
+
key: 8,
|
|
138
162
|
"aria-label": t.label,
|
|
139
163
|
items: d.value,
|
|
140
164
|
invalid: t.invalid,
|
|
141
|
-
placeholder:
|
|
142
|
-
"model-value":
|
|
143
|
-
"onUpdate:modelValue": n[
|
|
165
|
+
placeholder: M(o).common.placeholder,
|
|
166
|
+
"model-value": re.value,
|
|
167
|
+
"onUpdate:modelValue": n[8] ||= (e) => i("update:modelValue", e ?? "")
|
|
144
168
|
}, null, 8, [
|
|
145
169
|
"aria-label",
|
|
146
170
|
"items",
|
|
@@ -149,7 +173,7 @@ var jn = On({
|
|
|
149
173
|
"model-value"
|
|
150
174
|
]));
|
|
151
175
|
}
|
|
152
|
-
}),
|
|
176
|
+
}), Fn = /* @__PURE__ */ S({
|
|
153
177
|
__name: "FilterMenu",
|
|
154
178
|
props: {
|
|
155
179
|
header: {},
|
|
@@ -161,45 +185,45 @@ var jn = On({
|
|
|
161
185
|
},
|
|
162
186
|
emits: ["update:modelValue"],
|
|
163
187
|
setup(r, { emit: i }) {
|
|
164
|
-
let a = r, o = n("dataTable",
|
|
188
|
+
let a = r, o = n("dataTable", it), s = i, c = e().dataTable, l = t(), u = o(), ee = O(!1), p = O(L(a.type)), te = h(() => bt(a.modelValue)), re = h(() => Dt(a.type, a.matchModes)), ie = h(() => re.value.map((e) => ({
|
|
165
189
|
value: e,
|
|
166
|
-
label:
|
|
167
|
-
}))),
|
|
168
|
-
function
|
|
169
|
-
e && (
|
|
190
|
+
label: Et(e, c.matchModes, l.value.locale)
|
|
191
|
+
}))), oe = (e) => Tt(e)?.input ?? a.type, S = (e) => JSON.parse(JSON.stringify(e));
|
|
192
|
+
function se(e) {
|
|
193
|
+
e && (p.value = S(tn(a.modelValue ?? L(a.type), a.type))), ee.value = e;
|
|
170
194
|
}
|
|
171
|
-
function
|
|
172
|
-
let n =
|
|
173
|
-
|
|
195
|
+
function C(e, t) {
|
|
196
|
+
let n = p.value.constraints[e];
|
|
197
|
+
xt(t) !== xt(n.matchMode) && (n.value = xt(t) ? [null, null] : null), n.matchMode = t;
|
|
174
198
|
}
|
|
175
199
|
function w(e, t, n) {
|
|
176
|
-
let r =
|
|
200
|
+
let r = p.value.constraints[e], i = Array.isArray(r.value) ? [...r.value] : [null, null];
|
|
177
201
|
i[t] = n, r.value = i;
|
|
178
202
|
}
|
|
179
|
-
function
|
|
180
|
-
s("update:modelValue",
|
|
203
|
+
function E() {
|
|
204
|
+
s("update:modelValue", bt(p.value) ? S(p.value) : void 0), ee.value = !1;
|
|
181
205
|
}
|
|
182
|
-
function
|
|
183
|
-
s("update:modelValue", void 0),
|
|
206
|
+
function le() {
|
|
207
|
+
s("update:modelValue", void 0), ee.value = !1;
|
|
184
208
|
}
|
|
185
|
-
let
|
|
209
|
+
let ue = {
|
|
186
210
|
placement: "bottom-end",
|
|
187
211
|
gutter: 4
|
|
188
212
|
};
|
|
189
|
-
return (e, t) => (
|
|
190
|
-
open:
|
|
191
|
-
positioning:
|
|
213
|
+
return (e, t) => (D(), g(M(cn).Root, {
|
|
214
|
+
open: ee.value,
|
|
215
|
+
positioning: ue,
|
|
192
216
|
"lazy-mount": "",
|
|
193
217
|
"unmount-on-exit": "",
|
|
194
|
-
onOpenChange: t[2] ||= (e) =>
|
|
218
|
+
onOpenChange: t[2] ||= (e) => se(e.open)
|
|
195
219
|
}, {
|
|
196
|
-
default:
|
|
197
|
-
class:
|
|
198
|
-
"aria-label":
|
|
199
|
-
"data-active":
|
|
220
|
+
default: P(() => [x(M(cn).Trigger, {
|
|
221
|
+
class: T(M(u).headButton()),
|
|
222
|
+
"aria-label": M(c).filterMenu(r.header, te.value),
|
|
223
|
+
"data-active": te.value || void 0
|
|
200
224
|
}, {
|
|
201
|
-
default:
|
|
202
|
-
class:
|
|
225
|
+
default: P(() => [x(M(Me), {
|
|
226
|
+
class: T(M(u).headButtonIcon()),
|
|
203
227
|
"aria-hidden": "true"
|
|
204
228
|
}, null, 8, ["class"])]),
|
|
205
229
|
_: 1
|
|
@@ -207,68 +231,68 @@ var jn = On({
|
|
|
207
231
|
"class",
|
|
208
232
|
"aria-label",
|
|
209
233
|
"data-active"
|
|
210
|
-
]), (
|
|
211
|
-
default:
|
|
212
|
-
class:
|
|
213
|
-
"aria-label":
|
|
234
|
+
]), (D(), g(ae, { to: "body" }, [x(M(cn).Positioner, null, {
|
|
235
|
+
default: P(() => [x(M(cn).Content, {
|
|
236
|
+
class: T(M(u).filterPanel()),
|
|
237
|
+
"aria-label": M(c).filterMenu(r.header, !1)
|
|
214
238
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
class:
|
|
217
|
-
onSubmit:
|
|
239
|
+
default: P(() => [y("form", {
|
|
240
|
+
class: T(M(u).filterForm()),
|
|
241
|
+
onSubmit: ye(E, ["prevent"])
|
|
218
242
|
}, [
|
|
219
|
-
|
|
243
|
+
p.value.constraints.length > 1 ? (D(), g(ne, {
|
|
220
244
|
key: 0,
|
|
221
|
-
"aria-label":
|
|
245
|
+
"aria-label": M(c).operator,
|
|
222
246
|
items: [{
|
|
223
247
|
value: "and",
|
|
224
|
-
label:
|
|
248
|
+
label: M(c).matchAll
|
|
225
249
|
}, {
|
|
226
250
|
value: "or",
|
|
227
|
-
label:
|
|
251
|
+
label: M(c).matchAny
|
|
228
252
|
}],
|
|
229
|
-
"model-value":
|
|
230
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
253
|
+
"model-value": p.value.operator,
|
|
254
|
+
"onUpdate:modelValue": t[0] ||= (e) => p.value.operator = e === "or" ? "or" : "and"
|
|
231
255
|
}, null, 8, [
|
|
232
256
|
"aria-label",
|
|
233
257
|
"items",
|
|
234
258
|
"model-value"
|
|
235
|
-
])) :
|
|
236
|
-
(
|
|
259
|
+
])) : _("", !0),
|
|
260
|
+
(D(!0), v(m, null, k(p.value.constraints, (t, n) => (D(), v("div", {
|
|
237
261
|
key: n,
|
|
238
|
-
class:
|
|
239
|
-
}, [
|
|
262
|
+
class: T(M(u).filterRule())
|
|
263
|
+
}, [y("div", { class: T(M(u).filterRuleHead()) }, [re.value.length > 1 ? (D(), g(ne, {
|
|
240
264
|
key: 0,
|
|
241
|
-
class:
|
|
242
|
-
"aria-label":
|
|
243
|
-
items:
|
|
265
|
+
class: T(M(u).filterMode()),
|
|
266
|
+
"aria-label": M(c).matchMode(n),
|
|
267
|
+
items: ie.value,
|
|
244
268
|
"model-value": t.matchMode,
|
|
245
|
-
"onUpdate:modelValue": (e) =>
|
|
269
|
+
"onUpdate:modelValue": (e) => C(n, e ?? re.value[0])
|
|
246
270
|
}, null, 8, [
|
|
247
271
|
"class",
|
|
248
272
|
"aria-label",
|
|
249
273
|
"items",
|
|
250
274
|
"model-value",
|
|
251
275
|
"onUpdate:modelValue"
|
|
252
|
-
])) :
|
|
276
|
+
])) : _("", !0), p.value.constraints.length > 1 ? (D(), g(f, {
|
|
253
277
|
key: 1,
|
|
254
|
-
icon:
|
|
255
|
-
label:
|
|
278
|
+
icon: M(F),
|
|
279
|
+
label: M(c).removeRule(n),
|
|
256
280
|
variant: "text",
|
|
257
281
|
size: "sm",
|
|
258
|
-
onClick: (e) =>
|
|
282
|
+
onClick: (e) => p.value.constraints.splice(n, 1)
|
|
259
283
|
}, null, 8, [
|
|
260
284
|
"icon",
|
|
261
285
|
"label",
|
|
262
286
|
"onClick"
|
|
263
|
-
])) :
|
|
287
|
+
])) : _("", !0)], 2), e.$slots.value ? A(e.$slots, "value", ce({ ref_for: !0 }, {
|
|
264
288
|
value: t.value,
|
|
265
289
|
setValue: (e) => t.value = e
|
|
266
|
-
}), void 0, void 0, 0) :
|
|
290
|
+
}), void 0, void 0, 0) : M(xt)(t.matchMode) ? (D(), v("div", {
|
|
267
291
|
key: 1,
|
|
268
|
-
class:
|
|
269
|
-
}, [
|
|
270
|
-
type:
|
|
271
|
-
label: `${
|
|
292
|
+
class: T(M(u).filterRange())
|
|
293
|
+
}, [x(Pn, {
|
|
294
|
+
type: oe(t.matchMode),
|
|
295
|
+
label: `${M(c).value(n)}, ${M(c).from}`,
|
|
272
296
|
options: r.options,
|
|
273
297
|
"model-value": Array.isArray(t.value) ? t.value[0] : null,
|
|
274
298
|
"onUpdate:modelValue": (e) => w(n, 0, e)
|
|
@@ -278,9 +302,9 @@ var jn = On({
|
|
|
278
302
|
"options",
|
|
279
303
|
"model-value",
|
|
280
304
|
"onUpdate:modelValue"
|
|
281
|
-
]),
|
|
282
|
-
type:
|
|
283
|
-
label: `${
|
|
305
|
+
]), x(Pn, {
|
|
306
|
+
type: oe(t.matchMode),
|
|
307
|
+
label: `${M(c).value(n)}, ${M(c).to}`,
|
|
284
308
|
options: r.options,
|
|
285
309
|
"model-value": Array.isArray(t.value) ? t.value[1] : null,
|
|
286
310
|
"onUpdate:modelValue": (e) => w(n, 1, e)
|
|
@@ -290,10 +314,10 @@ var jn = On({
|
|
|
290
314
|
"options",
|
|
291
315
|
"model-value",
|
|
292
316
|
"onUpdate:modelValue"
|
|
293
|
-
])], 2)) : (
|
|
317
|
+
])], 2)) : (D(), g(Pn, {
|
|
294
318
|
key: 2,
|
|
295
|
-
type:
|
|
296
|
-
label:
|
|
319
|
+
type: oe(t.matchMode),
|
|
320
|
+
label: M(c).value(n),
|
|
297
321
|
options: r.options,
|
|
298
322
|
"model-value": t.value,
|
|
299
323
|
"onUpdate:modelValue": (e) => t.value = e
|
|
@@ -304,32 +328,32 @@ var jn = On({
|
|
|
304
328
|
"model-value",
|
|
305
329
|
"onUpdate:modelValue"
|
|
306
330
|
]))], 2))), 128)),
|
|
307
|
-
|
|
331
|
+
p.value.constraints.length < r.maxConstraints ? (D(), g(d, {
|
|
308
332
|
key: 1,
|
|
309
333
|
variant: "text",
|
|
310
334
|
size: "sm",
|
|
311
|
-
class:
|
|
312
|
-
"leading-icon":
|
|
313
|
-
onClick: t[1] ||= (e) =>
|
|
314
|
-
matchMode:
|
|
335
|
+
class: T(M(u).filterAdd()),
|
|
336
|
+
"leading-icon": M(Re),
|
|
337
|
+
onClick: t[1] ||= (e) => p.value.constraints.push({
|
|
338
|
+
matchMode: re.value[0],
|
|
315
339
|
value: null
|
|
316
340
|
})
|
|
317
341
|
}, {
|
|
318
|
-
default:
|
|
342
|
+
default: P(() => [b(j(M(c).addRule), 1)]),
|
|
319
343
|
_: 1
|
|
320
|
-
}, 8, ["class", "leading-icon"])) :
|
|
321
|
-
|
|
344
|
+
}, 8, ["class", "leading-icon"])) : _("", !0),
|
|
345
|
+
y("div", { class: T(M(u).filterActions()) }, [x(d, {
|
|
322
346
|
variant: "outline",
|
|
323
347
|
size: "sm",
|
|
324
|
-
onClick:
|
|
348
|
+
onClick: le
|
|
325
349
|
}, {
|
|
326
|
-
default:
|
|
350
|
+
default: P(() => [b(j(M(c).clear), 1)]),
|
|
327
351
|
_: 1
|
|
328
|
-
}),
|
|
352
|
+
}), x(d, {
|
|
329
353
|
type: "submit",
|
|
330
354
|
size: "sm"
|
|
331
355
|
}, {
|
|
332
|
-
default:
|
|
356
|
+
default: P(() => [b(j(M(c).apply), 1)]),
|
|
333
357
|
_: 1
|
|
334
358
|
})], 2)
|
|
335
359
|
], 34)]),
|
|
@@ -340,17 +364,17 @@ var jn = On({
|
|
|
340
364
|
_: 3
|
|
341
365
|
}, 8, ["open"]));
|
|
342
366
|
}
|
|
343
|
-
}),
|
|
367
|
+
}), In = [
|
|
344
368
|
"role",
|
|
345
369
|
"aria-modal",
|
|
346
370
|
"aria-label"
|
|
347
|
-
],
|
|
371
|
+
], Ln = ["id"], Rn = ["aria-label"], zn = { "aria-hidden": "true" }, Bn = [
|
|
348
372
|
"aria-busy",
|
|
349
373
|
"aria-rowcount",
|
|
350
374
|
"role",
|
|
351
375
|
"aria-multiselectable",
|
|
352
376
|
"tabindex"
|
|
353
|
-
],
|
|
377
|
+
], Vn = ["rowspan"], Hn = ["aria-label"], Un = ["colspan", "rowspan"], Wn = [
|
|
354
378
|
"id",
|
|
355
379
|
"rowspan",
|
|
356
380
|
"aria-sort",
|
|
@@ -359,7 +383,7 @@ var jn = On({
|
|
|
359
383
|
"data-dragging",
|
|
360
384
|
"onDragstart",
|
|
361
385
|
"onDragover"
|
|
362
|
-
],
|
|
386
|
+
], Gn = ["onClick"], Kn = ["data-column-menu", "aria-label"], qn = [
|
|
363
387
|
"aria-label",
|
|
364
388
|
"aria-valuenow",
|
|
365
389
|
"data-resizing",
|
|
@@ -367,32 +391,32 @@ var jn = On({
|
|
|
367
391
|
"onTouchstart",
|
|
368
392
|
"onKeydown",
|
|
369
393
|
"onDblclick"
|
|
370
|
-
],
|
|
394
|
+
], Jn = ["rowspan"], Yn = [
|
|
371
395
|
"data-state",
|
|
372
396
|
"aria-selected",
|
|
373
397
|
"data-row-id"
|
|
374
|
-
],
|
|
398
|
+
], Xn = [
|
|
375
399
|
"aria-busy",
|
|
376
400
|
"onKeydown",
|
|
377
401
|
"onFocusout"
|
|
378
|
-
],
|
|
402
|
+
], Zn = ["id"], Qn = [
|
|
379
403
|
"data-edit",
|
|
380
404
|
"aria-label",
|
|
381
405
|
"onClick"
|
|
382
|
-
],
|
|
406
|
+
], $n = { key: 0 }, er = ["colspan"], tr = { role: "alert" }, nr = ["colspan"], rr = [
|
|
383
407
|
"data-index",
|
|
384
408
|
"aria-rowindex",
|
|
385
409
|
"data-drop",
|
|
386
410
|
"onDragover"
|
|
387
|
-
],
|
|
411
|
+
], ir = ["colspan"], ar = [
|
|
388
412
|
"aria-expanded",
|
|
389
413
|
"aria-label",
|
|
390
414
|
"onClick"
|
|
391
|
-
],
|
|
415
|
+
], or = [
|
|
392
416
|
"id",
|
|
393
417
|
"data-index",
|
|
394
418
|
"aria-rowindex"
|
|
395
|
-
],
|
|
419
|
+
], sr = ["colspan"], cr = [
|
|
396
420
|
"data-state",
|
|
397
421
|
"aria-selected",
|
|
398
422
|
"data-row-id",
|
|
@@ -407,35 +431,35 @@ var jn = On({
|
|
|
407
431
|
"onAuxclick",
|
|
408
432
|
"onDragstart",
|
|
409
433
|
"onDragover"
|
|
410
|
-
],
|
|
434
|
+
], lr = [
|
|
411
435
|
"data-drag-handle",
|
|
412
436
|
"aria-label",
|
|
413
437
|
"aria-keyshortcuts",
|
|
414
438
|
"onKeydown",
|
|
415
439
|
"onPointerdown"
|
|
416
|
-
],
|
|
440
|
+
], ur = [
|
|
417
441
|
"checked",
|
|
418
442
|
"disabled",
|
|
419
443
|
"aria-label",
|
|
420
444
|
"onChange"
|
|
421
|
-
],
|
|
445
|
+
], dr = [
|
|
422
446
|
"aria-expanded",
|
|
423
447
|
"aria-controls",
|
|
424
448
|
"aria-label",
|
|
425
449
|
"onClick"
|
|
426
|
-
],
|
|
450
|
+
], fr = [
|
|
427
451
|
"aria-expanded",
|
|
428
452
|
"aria-label",
|
|
429
453
|
"onClick"
|
|
430
|
-
],
|
|
454
|
+
], pr = [
|
|
431
455
|
"aria-busy",
|
|
432
456
|
"onKeydown",
|
|
433
457
|
"onFocusout"
|
|
434
|
-
],
|
|
458
|
+
], mr = ["id"], hr = [
|
|
435
459
|
"data-edit",
|
|
436
460
|
"aria-label",
|
|
437
461
|
"onClick"
|
|
438
|
-
],
|
|
462
|
+
], gr = ["colspan"], _r = { key: 0 }, vr = { key: 1 }, yr = { "aria-hidden": "true" }, br = 60, xr = 16, Sr = "input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], [data-editor]", Cr = "button, a, input, select, textarea, label, [role=checkbox], [role=combobox], [contenteditable]", wr = /* @__PURE__ */ S({
|
|
439
463
|
inheritAttrs: !1,
|
|
440
464
|
__name: "DataTable",
|
|
441
465
|
props: {
|
|
@@ -506,6 +530,7 @@ var jn = On({
|
|
|
506
530
|
columnOrder: { default: void 0 },
|
|
507
531
|
pinnedColumns: { default: void 0 },
|
|
508
532
|
exportFilename: { default: void 0 },
|
|
533
|
+
csvSeparator: { default: void 0 },
|
|
509
534
|
exportFormats: { default: void 0 },
|
|
510
535
|
groupBy: { default: void 0 },
|
|
511
536
|
frozenRows: { default: void 0 },
|
|
@@ -537,6 +562,7 @@ var jn = On({
|
|
|
537
562
|
striped: { type: Boolean },
|
|
538
563
|
fullscreenToggle: { type: Boolean },
|
|
539
564
|
scrollHeight: {},
|
|
565
|
+
features: {},
|
|
540
566
|
virtual: { type: Boolean },
|
|
541
567
|
rowHeight: { default: 41 },
|
|
542
568
|
stateKey: {},
|
|
@@ -545,294 +571,296 @@ var jn = On({
|
|
|
545
571
|
},
|
|
546
572
|
emits: /* @__PURE__ */ "update:page.update:first.update:showFilters.update:allSelection.selectedRowsChange.rowClick.update:pageSize.update:sorting.update:selection.update:expanded.update:globalFilter.update:advancedFilterValue.update:filters.update:hiddenColumns.update:columnOrder.update:pinnedColumns.update:groupBy.update:size.cellEdit.rowEdit.rowReorder.rowAction.loadMore.scrollEnd.cellSelectionChange.cellPaste.save".split("."),
|
|
547
573
|
setup(a, { expose: o, emit: s }) {
|
|
548
|
-
let l = e(),
|
|
574
|
+
let l = e(), S = t(), C = a, ye = n("dataTable", it, () => C.classes), Re = n("menu", jt), F = s, $e = he(), I = _e(), ot = ge(), L = l.dataTable, Et = Object.assign({}, ...C.features ?? []);
|
|
575
|
+
fe(Nn, Et);
|
|
576
|
+
let Dt = (e, t) => typeof e == "function" ? e(t) : e, Nt = (e) => e == null ? "" : String(e), Pt = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Yt = (e) => e ? Array.isArray(e) ? e : [e] : [], tn = (e) => Object.fromEntries(e.filter((e) => bt(e.value)).map((e) => [e.id, e.value])), cn = (e) => Object.entries(e).filter(([, e]) => bt(e)).map(([e, t]) => ({
|
|
549
577
|
id: e,
|
|
550
578
|
value: t
|
|
551
|
-
})),
|
|
579
|
+
})), ln = (e, t = !0) => Object.fromEntries(e.map((e) => [e, t])), un = (e) => Object.fromEntries(e.map((e) => [e, !0])), dn = (e, t, n) => {
|
|
552
580
|
let r = { ...e };
|
|
553
581
|
for (let e of t) n ? r[e] = !0 : delete r[e];
|
|
554
582
|
return r;
|
|
555
|
-
},
|
|
583
|
+
}, fn = {
|
|
556
584
|
drag: 40,
|
|
557
585
|
select: 48,
|
|
558
586
|
expand: 40,
|
|
559
587
|
number: 56,
|
|
560
588
|
actions: 88
|
|
561
|
-
},
|
|
589
|
+
}, pn = [], mn = (e) => "getRows" in e ? Xt(e.getRows) : e, hn = me({
|
|
562
590
|
status: "idle",
|
|
563
591
|
items: []
|
|
564
|
-
}),
|
|
565
|
-
source: { getItems: (e) =>
|
|
566
|
-
onChange: (e) =>
|
|
567
|
-
}),
|
|
568
|
-
ttl:
|
|
569
|
-
debounce:
|
|
570
|
-
}),
|
|
571
|
-
|
|
572
|
-
let
|
|
573
|
-
let e =
|
|
592
|
+
}), gn = null, _n = () => C.dataSource ? (gn ??= et({
|
|
593
|
+
source: { getItems: (e) => mn(C.dataSource).getItems(e) },
|
|
594
|
+
onChange: (e) => hn.value = e
|
|
595
|
+
}), gn.configure({
|
|
596
|
+
ttl: C.cacheTime,
|
|
597
|
+
debounce: C.searchDebounce
|
|
598
|
+
}), gn) : null;
|
|
599
|
+
le(() => gn?.dispose());
|
|
600
|
+
let vn = h(() => {
|
|
601
|
+
let e = C.pivot;
|
|
574
602
|
if (!e) return null;
|
|
575
603
|
let t = /* @__PURE__ */ new Map(), n = (e) => e.forEach((e) => e.columns ? n(e.columns) : t.set(e.id, e));
|
|
576
|
-
n(
|
|
604
|
+
n(C.columns);
|
|
577
605
|
let r = (e, n) => {
|
|
578
606
|
let r = t.get(n);
|
|
579
|
-
return r ?
|
|
580
|
-
}, i = new Intl.NumberFormat(
|
|
581
|
-
return
|
|
607
|
+
return r ? Tr(r, e) : e[n];
|
|
608
|
+
}, i = new Intl.NumberFormat(S.value.locale, { maximumFractionDigits: 2 });
|
|
609
|
+
return Ht(Vt(C.data ?? pn, e, r, (e, n, r) => {
|
|
582
610
|
let i = t.get(n)?.format;
|
|
583
|
-
return i ? i(r, e) :
|
|
611
|
+
return i ? i(r, e) : Nt(r);
|
|
584
612
|
}), e, {
|
|
585
613
|
header: (e) => t.get(e)?.header ?? e,
|
|
586
|
-
totalLabel:
|
|
587
|
-
format: (e) => typeof e == "number" ? i.format(e) :
|
|
614
|
+
totalLabel: L.total,
|
|
615
|
+
format: (e) => typeof e == "number" ? i.format(e) : Nt(e)
|
|
588
616
|
});
|
|
589
|
-
}),
|
|
590
|
-
|
|
591
|
-
let
|
|
592
|
-
function
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
let
|
|
596
|
-
|
|
597
|
-
|
|
617
|
+
}), yn = O(C.advancedFilterValue ?? lt("and", "root"));
|
|
618
|
+
N(() => C.advancedFilterValue, (e) => e && (yn.value = e));
|
|
619
|
+
let bn = O(!1), xn = h(() => Array.isArray(C.advancedFilter) ? C.advancedFilter : C.advancedFilter ? Qe(C.columns, C.data ?? pn) : []), Sn = h(() => !!C.advancedFilter && yt(yn.value, xn.value));
|
|
620
|
+
function Cn(e) {
|
|
621
|
+
yn.value = e, F("update:advancedFilterValue", e);
|
|
622
|
+
}
|
|
623
|
+
let wn = h(() => !!C.advancedFilter && !!I.advancedFilter);
|
|
624
|
+
ue(() => {
|
|
625
|
+
C.advancedFilter && !I.advancedFilter && sn("DataTable: `advancedFilter` has no editor, so the toolbar button is hidden – fill the `#advancedFilter` slot with ConditionBuilder from @wirecore/wirelayer-blocks-vue");
|
|
598
626
|
});
|
|
599
|
-
let
|
|
627
|
+
let Tn = h(() => vn.value ? vn.value.rows : C.dataSource ? hn.value.items : Sn.value && !C.manual ? (C.data ?? pn).filter((e) => kt(e, yn.value, xn.value, S.value.locale)) : C.data ?? pn), En = h(() => vn.value ? vn.value.columns : C.columns), Dn = h(() => !!C.manual || !!C.dataSource), On = h(() => C.dataSource ? hn.value.totalCount ?? hn.value.items.length : C.rowCount), kn = h(() => !!C.dataSource && hn.value.status === "error"), An = h(() => !!C.loading || !!C.dataSource && hn.value.status === "loading"), wr = h(() => {
|
|
600
628
|
let e = (t) => t.flatMap((t) => t.columns ? e(t.columns) : [t]);
|
|
601
|
-
return e(
|
|
602
|
-
}),
|
|
629
|
+
return e(En.value);
|
|
630
|
+
}), z = h(() => {
|
|
603
631
|
let e = /* @__PURE__ */ new Map(), t = (n) => n.forEach((n) => {
|
|
604
632
|
e.set(n.id, n), n.columns && t(n.columns);
|
|
605
633
|
});
|
|
606
|
-
return t(
|
|
607
|
-
}),
|
|
608
|
-
|
|
609
|
-
let
|
|
610
|
-
pageIndex:
|
|
611
|
-
pageSize:
|
|
634
|
+
return t(En.value), e;
|
|
635
|
+
}), Tr = (e, t) => typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor ?? e.id], B = (e, t, n) => e?.format ? e.format(t, n) : Nt(t), Er = (e) => (e.filterOptions ?? []).some((e) => typeof e != "string"), Dr = (e) => !e.filter || e.filter === "text" || e.filter === "select" || e.filter === "multiSelect", V = O(Yt(C.sorting === void 0 ? C.defaultSorting : C.sorting));
|
|
636
|
+
N(() => C.sorting, (e) => e !== void 0 && (V.value = Yt(e)));
|
|
637
|
+
let Or = (e, t, n) => t === void 0 ? e ? e - 1 : void 0 : Math.floor(t / n), H = O({
|
|
638
|
+
pageIndex: Or(C.page, C.first, C.pageSize ?? 10) ?? 0,
|
|
639
|
+
pageSize: C.pageSize ?? 10
|
|
612
640
|
});
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
641
|
+
N(() => [
|
|
642
|
+
C.page,
|
|
643
|
+
C.pageSize,
|
|
644
|
+
C.first
|
|
617
645
|
], ([e, t, n]) => {
|
|
618
|
-
let r = t ??
|
|
619
|
-
|
|
620
|
-
pageIndex:
|
|
646
|
+
let r = t ?? H.value.pageSize;
|
|
647
|
+
H.value = {
|
|
648
|
+
pageIndex: Or(e, n, r) ?? H.value.pageIndex,
|
|
621
649
|
pageSize: r
|
|
622
650
|
};
|
|
623
651
|
});
|
|
624
|
-
let
|
|
625
|
-
|
|
626
|
-
let
|
|
627
|
-
|
|
628
|
-
let
|
|
629
|
-
|
|
630
|
-
let
|
|
631
|
-
|
|
632
|
-
let
|
|
633
|
-
|
|
634
|
-
let
|
|
635
|
-
|
|
636
|
-
let
|
|
637
|
-
|
|
638
|
-
let
|
|
639
|
-
|
|
640
|
-
let
|
|
641
|
-
|
|
642
|
-
let
|
|
643
|
-
start:
|
|
644
|
-
end:
|
|
652
|
+
let kr = O(un(C.selection ?? []));
|
|
653
|
+
N(() => C.selection, (e) => e && (kr.value = un(e)));
|
|
654
|
+
let Ar = O(C.allSelection ?? null);
|
|
655
|
+
N(() => C.allSelection, (e) => e !== void 0 && (Ar.value = e));
|
|
656
|
+
let jr = O(C.showFilters ?? !0);
|
|
657
|
+
N(() => C.showFilters, (e) => e !== void 0 && (jr.value = e));
|
|
658
|
+
let U = O(Pt(C.groupBy));
|
|
659
|
+
N(() => C.groupBy, (e) => U.value = Pt(e));
|
|
660
|
+
let Mr = O(C.expanded || C.defaultExpanded ? ln(C.expanded ?? C.defaultExpanded) : U.value.length && !I.expansion ? !0 : {});
|
|
661
|
+
N(() => C.expanded, (e) => e && (Mr.value = ln(e)));
|
|
662
|
+
let W = O(C.globalFilter ?? "");
|
|
663
|
+
N(() => C.globalFilter, (e) => e !== void 0 && (W.value = e));
|
|
664
|
+
let Nr = O(cn(C.filters ?? {}));
|
|
665
|
+
N(() => C.filters, (e) => e && (Nr.value = cn(e)));
|
|
666
|
+
let Pr = O(ln(C.hiddenColumns ?? [], !1));
|
|
667
|
+
N(() => C.hiddenColumns, (e) => e && (Pr.value = ln(e, !1)));
|
|
668
|
+
let Fr = O(C.columnOrder ?? []);
|
|
669
|
+
N(() => C.columnOrder, (e) => e && (Fr.value = e));
|
|
670
|
+
let Ir = O(C.pinnedColumns ?? {
|
|
671
|
+
start: wr.value.filter((e) => e.pinned === "start").map((e) => e.id),
|
|
672
|
+
end: wr.value.filter((e) => e.pinned === "end").map((e) => e.id)
|
|
645
673
|
});
|
|
646
|
-
|
|
647
|
-
let
|
|
648
|
-
|
|
649
|
-
let
|
|
650
|
-
top:
|
|
674
|
+
N(() => C.pinnedColumns, (e) => e && (Ir.value = e));
|
|
675
|
+
let Lr = O({}), Rr = O(C.size ?? "md");
|
|
676
|
+
N(() => C.size, (e) => e && (Rr.value = e));
|
|
677
|
+
let zr = h(() => ({
|
|
678
|
+
top: C.frozenRows ?? [],
|
|
651
679
|
bottom: []
|
|
652
|
-
})),
|
|
653
|
-
function
|
|
680
|
+
})), G = (e, t) => C.rowLabel?.(e, t) ?? L.row(t), Br = (e, t) => C.expandLabel?.(e, t) ?? L.subRows(G(e, t));
|
|
681
|
+
function Vr(e) {
|
|
654
682
|
return e.columns ? {
|
|
655
683
|
id: e.id,
|
|
656
684
|
header: e.header,
|
|
657
|
-
columns: e.columns.map(
|
|
685
|
+
columns: e.columns.map(Vr)
|
|
658
686
|
} : {
|
|
659
687
|
id: e.id,
|
|
660
688
|
header: e.header,
|
|
661
|
-
accessorFn: (t) =>
|
|
689
|
+
accessorFn: (t) => Tr(e, t),
|
|
662
690
|
enableSorting: !!e.sortable,
|
|
663
691
|
sortDescFirst: !1,
|
|
664
692
|
sortUndefined: "last",
|
|
665
693
|
...e.sortFn ? { sortFn: (t, n) => e.sortFn(t.original, n.original) } : {},
|
|
666
|
-
filterFn: (t, n, r) =>
|
|
694
|
+
filterFn: (t, n, r) => Ot({
|
|
667
695
|
value: t.getValue(n),
|
|
668
|
-
text:
|
|
696
|
+
text: Dr(e) ? B(e, t.getValue(n), t.original) : "",
|
|
669
697
|
row: t.original,
|
|
670
698
|
type: e.filter,
|
|
671
|
-
locale:
|
|
699
|
+
locale: S.value.locale,
|
|
672
700
|
filterFn: e.filterFn,
|
|
673
|
-
byValue:
|
|
701
|
+
byValue: Er(e)
|
|
674
702
|
}, r),
|
|
675
703
|
enableGlobalFilter: e.searchable !== !1,
|
|
676
704
|
enableHiding: e.hideable !== !1,
|
|
677
705
|
enableGrouping: !0,
|
|
678
706
|
...e.width ? { size: e.width } : {},
|
|
679
|
-
minSize:
|
|
707
|
+
minSize: br
|
|
680
708
|
};
|
|
681
709
|
}
|
|
682
|
-
let
|
|
683
|
-
features:
|
|
684
|
-
columns:
|
|
685
|
-
data:
|
|
686
|
-
getRowId: (e, t) =>
|
|
687
|
-
state:
|
|
688
|
-
sorting:
|
|
689
|
-
pagination:
|
|
690
|
-
rowSelection:
|
|
691
|
-
expanded:
|
|
692
|
-
globalFilter:
|
|
693
|
-
columnFilters:
|
|
694
|
-
columnVisibility:
|
|
695
|
-
columnOrder:
|
|
696
|
-
columnPinning:
|
|
697
|
-
columnSizing:
|
|
698
|
-
grouping:
|
|
699
|
-
rowPinning:
|
|
710
|
+
let Hr = h(() => En.value.map(Vr)), K = jn({
|
|
711
|
+
features: Mn,
|
|
712
|
+
columns: Hr,
|
|
713
|
+
data: Tn,
|
|
714
|
+
getRowId: (e, t) => vn.value ? e.id : C.getRowId?.(e, t) ?? String(t),
|
|
715
|
+
state: h(() => ({
|
|
716
|
+
sorting: V.value,
|
|
717
|
+
pagination: H.value,
|
|
718
|
+
rowSelection: kr.value,
|
|
719
|
+
expanded: Mr.value,
|
|
720
|
+
globalFilter: W.value,
|
|
721
|
+
columnFilters: Nr.value,
|
|
722
|
+
columnVisibility: Pr.value,
|
|
723
|
+
columnOrder: Fr.value,
|
|
724
|
+
columnPinning: Ir.value,
|
|
725
|
+
columnSizing: Lr.value,
|
|
726
|
+
grouping: U.value,
|
|
727
|
+
rowPinning: zr.value
|
|
700
728
|
})),
|
|
701
|
-
getSubRows:
|
|
702
|
-
filterFromLeafRows:
|
|
703
|
-
getRowCanExpand: (e) => !!
|
|
704
|
-
autoResetExpanded:
|
|
705
|
-
onExpandedChange: (e) =>
|
|
706
|
-
onSortingChange: (e) =>
|
|
707
|
-
onPaginationChange: (e) =>
|
|
708
|
-
onRowSelectionChange: (e) =>
|
|
729
|
+
getSubRows: C.getSubRows,
|
|
730
|
+
filterFromLeafRows: h(() => C.treeFilterMode === "lenient"),
|
|
731
|
+
getRowCanExpand: (e) => !!I.expansion || !!e.subRows?.length,
|
|
732
|
+
autoResetExpanded: h(() => C.reorderableRows || C.cellSelection ? !1 : void 0),
|
|
733
|
+
onExpandedChange: (e) => Yr(Dt(e, Mr.value)),
|
|
734
|
+
onSortingChange: (e) => Ur(Dt(e, V.value)),
|
|
735
|
+
onPaginationChange: (e) => Wr(Dt(e, H.value)),
|
|
736
|
+
onRowSelectionChange: (e) => Kr(Dt(e, kr.value)),
|
|
709
737
|
onGlobalFilterChange: (e) => {
|
|
710
|
-
|
|
738
|
+
W.value = Dt(e, W.value) ?? "", F("update:globalFilter", W.value);
|
|
711
739
|
},
|
|
712
740
|
onColumnFiltersChange: (e) => {
|
|
713
|
-
|
|
741
|
+
Nr.value = Dt(e, Nr.value), F("update:filters", tn(Nr.value));
|
|
714
742
|
},
|
|
715
743
|
onColumnVisibilityChange: (e) => {
|
|
716
|
-
|
|
744
|
+
Pr.value = Dt(e, Pr.value), F("update:hiddenColumns", Object.keys(Pr.value).filter((e) => Pr.value[e] === !1));
|
|
717
745
|
},
|
|
718
746
|
onColumnOrderChange: (e) => {
|
|
719
|
-
|
|
747
|
+
Fr.value = Dt(e, Fr.value), F("update:columnOrder", Fr.value);
|
|
720
748
|
},
|
|
721
749
|
onColumnPinningChange: (e) => {
|
|
722
|
-
|
|
723
|
-
start: [...
|
|
724
|
-
end: [...
|
|
750
|
+
Ir.value = Dt(e, Ir.value), F("update:pinnedColumns", {
|
|
751
|
+
start: [...Ir.value.start],
|
|
752
|
+
end: [...Ir.value.end]
|
|
725
753
|
});
|
|
726
754
|
},
|
|
727
755
|
onColumnSizingChange: (e) => {
|
|
728
|
-
|
|
756
|
+
Lr.value = Dt(e, Lr.value);
|
|
729
757
|
},
|
|
730
758
|
onGroupingChange: (e) => {
|
|
731
|
-
|
|
759
|
+
U.value = Dt(e, U.value), F("update:groupBy", U.value);
|
|
732
760
|
},
|
|
733
761
|
globalFilterFn: (e, t, n) => {
|
|
734
|
-
let r =
|
|
735
|
-
return
|
|
762
|
+
let r = z.value.get(t);
|
|
763
|
+
return At([B(r, e.getValue(t), e.original)], n, S.value.locale);
|
|
736
764
|
},
|
|
737
|
-
getColumnCanGlobalFilter: (e) =>
|
|
738
|
-
enableColumnResizing:
|
|
765
|
+
getColumnCanGlobalFilter: (e) => z.value.get(e.id)?.searchable !== !1,
|
|
766
|
+
enableColumnResizing: h(() => !!C.resizable),
|
|
739
767
|
columnResizeMode: "onChange",
|
|
740
768
|
groupedColumnMode: !1,
|
|
741
769
|
keepPinnedRows: !0,
|
|
742
|
-
enableRowSelection: (e) => !!
|
|
743
|
-
enableMultiRowSelection:
|
|
744
|
-
manualSorting:
|
|
745
|
-
manualFiltering:
|
|
746
|
-
manualPagination:
|
|
747
|
-
rowCount:
|
|
770
|
+
enableRowSelection: (e) => !!C.selectable && !e.getIsGrouped() && (C.isRowSelectable?.(e.original) ?? !0),
|
|
771
|
+
enableMultiRowSelection: h(() => C.selectionMode !== "single"),
|
|
772
|
+
manualSorting: Dn,
|
|
773
|
+
manualFiltering: Dn,
|
|
774
|
+
manualPagination: h(() => Dn.value || !C.pageSize),
|
|
775
|
+
rowCount: h(() => Dn.value ? On.value : void 0)
|
|
748
776
|
});
|
|
749
|
-
function
|
|
750
|
-
|
|
751
|
-
}
|
|
752
|
-
function Hr(e) {
|
|
753
|
-
let t = e.pageSize !== V.value.pageSize;
|
|
754
|
-
V.value = e, t && P("update:pageSize", e.pageSize), P("update:page", e.pageIndex + 1), P("update:first", e.pageIndex * e.pageSize);
|
|
777
|
+
function Ur(e) {
|
|
778
|
+
V.value = e, F("update:sorting", C.sortMode === "multiple" ? [...e] : e[0] ?? null);
|
|
755
779
|
}
|
|
756
|
-
let Ur = /* @__PURE__ */ new Map();
|
|
757
780
|
function Wr(e) {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
P("update:selection", t);
|
|
761
|
-
let n = G.getCoreRowModel().rowsById;
|
|
762
|
-
for (let t of [...Ur.keys()]) e[t] || Ur.delete(t);
|
|
763
|
-
for (let e of t) n[e] && Ur.set(e, n[e].original);
|
|
764
|
-
P("selectedRowsChange", t.flatMap((e) => Ur.has(e) ? [Ur.get(e)] : []));
|
|
765
|
-
}
|
|
766
|
-
function Gr(e) {
|
|
767
|
-
Or.value = e, P("update:allSelection", e);
|
|
781
|
+
let t = e.pageSize !== H.value.pageSize;
|
|
782
|
+
H.value = e, t && F("update:pageSize", e.pageSize), F("update:page", e.pageIndex + 1), F("update:first", e.pageIndex * e.pageSize);
|
|
768
783
|
}
|
|
769
|
-
|
|
770
|
-
|
|
784
|
+
let Gr = /* @__PURE__ */ new Map();
|
|
785
|
+
function Kr(e) {
|
|
786
|
+
kr.value = e;
|
|
787
|
+
let t = Object.keys(e).filter((t) => e[t]);
|
|
788
|
+
F("update:selection", t);
|
|
789
|
+
let n = K.getCoreRowModel().rowsById;
|
|
790
|
+
for (let t of [...Gr.keys()]) e[t] || Gr.delete(t);
|
|
791
|
+
for (let e of t) n[e] && Gr.set(e, n[e].original);
|
|
792
|
+
F("selectedRowsChange", t.flatMap((e) => Gr.has(e) ? [Gr.get(e)] : []));
|
|
771
793
|
}
|
|
772
794
|
function qr(e) {
|
|
773
|
-
Ar.value = e,
|
|
774
|
-
}
|
|
775
|
-
function Jr(
|
|
776
|
-
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
795
|
+
Ar.value = e, F("update:allSelection", e);
|
|
796
|
+
}
|
|
797
|
+
function Jr() {
|
|
798
|
+
jr.value = !jr.value, F("update:showFilters", jr.value);
|
|
799
|
+
}
|
|
800
|
+
function Yr(e) {
|
|
801
|
+
Mr.value = e, F("update:expanded", e === !0 ? [] : Object.keys(e).filter((t) => e[t]));
|
|
802
|
+
}
|
|
803
|
+
function Xr(e) {
|
|
804
|
+
Rr.value = e, F("update:size", e);
|
|
805
|
+
}
|
|
806
|
+
let Zr = h(() => ({
|
|
807
|
+
size: Rr.value,
|
|
808
|
+
gridlines: !!C.gridlines,
|
|
809
|
+
striped: !!C.striped,
|
|
810
|
+
scrollable: !!C.scrollHeight,
|
|
811
|
+
wrapHeaders: !!C.wrapHeaders,
|
|
812
|
+
verticalHeaders: !!C.verticalHeaders
|
|
813
|
+
})), Qr = O(!1), q = h(() => C.navigation === "grid"), $r = h(() => q.value && !!C.getSubRows), J = h(() => ye({
|
|
814
|
+
...Zr.value,
|
|
815
|
+
fullscreen: Qr.value,
|
|
816
|
+
grid: q.value
|
|
817
|
+
})), ei = Re(), ti = (e) => {
|
|
818
|
+
let t = z.value.get(e);
|
|
819
|
+
return ye({
|
|
820
|
+
...Zr.value,
|
|
793
821
|
align: t?.align,
|
|
794
822
|
hideBelow: t?.hideBelow ? `hide-${t.hideBelow}` : void 0
|
|
795
823
|
});
|
|
796
|
-
},
|
|
824
|
+
}, ni = h(() => wr.value.some((e) => e.editable)), ri = h(() => C.editMode !== "row"), ii = h(() => !!C.rowActions || C.editMode === "row" && ni.value), ai = h(() => {
|
|
797
825
|
let e = [];
|
|
798
|
-
return
|
|
799
|
-
}),
|
|
800
|
-
function
|
|
801
|
-
let n =
|
|
826
|
+
return C.reorderableRows && e.push("drag"), C.selectable && e.push("select"), I.expansion && e.push("expand"), C.rowNumbers && e.push("number"), e;
|
|
827
|
+
}), oi = h(() => ii.value ? ["actions"] : []), Y = h(() => K.getVisibleLeafColumns()), si = h(() => Y.value.length + ai.value.length + oi.value.length), ci = h(() => !!C.resizable || wr.value.some((e) => e.width) || Ir.value.start.length > 0 || Ir.value.end.length > 0), li = h(() => Ir.value.start.length > 0), ui = h(() => Ir.value.end.length > 0), di = h(() => ai.value.reduce((e, t) => e + fn[t], 0)), fi = h(() => oi.value.reduce((e, t) => e + fn[t], 0));
|
|
828
|
+
function pi(e, t) {
|
|
829
|
+
let n = K.getColumn(e), r = n?.getIsPinned();
|
|
802
830
|
if (!n || !r) return "";
|
|
803
|
-
let i = r === "start" ?
|
|
804
|
-
return [t ?
|
|
831
|
+
let i = r === "start" ? K.getStartVisibleLeafColumns().at(-1)?.id === e && J.value.pinnedStartEdge() : K.getEndVisibleLeafColumns()[0]?.id === e && J.value.pinnedEndEdge();
|
|
832
|
+
return [t ? J.value.pinnedHead() : J.value.pinned(), i].filter(Boolean).join(" ");
|
|
805
833
|
}
|
|
806
|
-
function
|
|
807
|
-
let n =
|
|
808
|
-
if (!n || !
|
|
834
|
+
function mi(e, t) {
|
|
835
|
+
let n = K.getColumn(e);
|
|
836
|
+
if (!n || !ci.value) return;
|
|
809
837
|
let r = n.getIsPinned();
|
|
810
838
|
return {
|
|
811
839
|
...t ? { width: `${n.getSize()}px` } : {},
|
|
812
|
-
...r === "start" ? { insetInlineStart: `${
|
|
813
|
-
...r === "end" ? { insetInlineEnd: `${
|
|
840
|
+
...r === "start" ? { insetInlineStart: `${di.value + n.getStart("start")}px` } : {},
|
|
841
|
+
...r === "end" ? { insetInlineEnd: `${fi.value + n.getAfter("end")}px` } : {}
|
|
814
842
|
};
|
|
815
843
|
}
|
|
816
|
-
let
|
|
817
|
-
function
|
|
818
|
-
return [e === "select" ?
|
|
844
|
+
let hi = (e) => oi.value.includes(e) ? ui.value : li.value;
|
|
845
|
+
function gi(e, t) {
|
|
846
|
+
return [e === "select" ? J.value.selectCell() : J.value.utilityCell(), hi(e) ? t ? J.value.pinnedHead() : J.value.pinned() : ""].filter(Boolean).join(" ");
|
|
819
847
|
}
|
|
820
|
-
function
|
|
821
|
-
if (!
|
|
822
|
-
let t = { width: `${
|
|
823
|
-
if (!
|
|
824
|
-
if (
|
|
848
|
+
function _i(e) {
|
|
849
|
+
if (!ci.value) return;
|
|
850
|
+
let t = { width: `${fn[e]}px` };
|
|
851
|
+
if (!hi(e)) return t;
|
|
852
|
+
if (oi.value.includes(e)) return {
|
|
825
853
|
...t,
|
|
826
854
|
insetInlineEnd: "0px"
|
|
827
855
|
};
|
|
828
|
-
let n =
|
|
856
|
+
let n = ai.value.slice(0, ai.value.indexOf(e));
|
|
829
857
|
return {
|
|
830
858
|
...t,
|
|
831
|
-
insetInlineStart: `${n.reduce((e, t) => e +
|
|
859
|
+
insetInlineStart: `${n.reduce((e, t) => e + fn[t], 0)}px`
|
|
832
860
|
};
|
|
833
861
|
}
|
|
834
|
-
let
|
|
835
|
-
let e =
|
|
862
|
+
let vi = h(() => {
|
|
863
|
+
let e = K.getHeaderGroups(), t = /* @__PURE__ */ new Map();
|
|
836
864
|
e.forEach((e, n) => e.headers.forEach((e) => {
|
|
837
865
|
e.isPlaceholder || t.set(e.column.id, n);
|
|
838
866
|
}));
|
|
@@ -850,82 +878,82 @@ var jn = On({
|
|
|
850
878
|
group: o.subHeaders.length > 0
|
|
851
879
|
}];
|
|
852
880
|
}));
|
|
853
|
-
}), X = (e) =>
|
|
854
|
-
let t =
|
|
855
|
-
return t?.id === e ? t.desc ? "descending" : "ascending" :
|
|
856
|
-
},
|
|
857
|
-
function
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
-
let
|
|
861
|
-
|
|
862
|
-
},
|
|
863
|
-
function
|
|
864
|
-
return !!
|
|
865
|
-
}
|
|
866
|
-
function
|
|
867
|
-
let t =
|
|
881
|
+
}), X = (e) => z.value.get(e.id)?.header ?? e.id, yi = (e) => {
|
|
882
|
+
let t = V.value[0];
|
|
883
|
+
return t?.id === e ? t.desc ? "descending" : "ascending" : K.getColumn(e)?.getCanSort() ? "none" : void 0;
|
|
884
|
+
}, bi = (e) => V.value.findIndex((t) => t.id === e) + 1;
|
|
885
|
+
function xi(e, t) {
|
|
886
|
+
Ur(Ft(V.value, e, C.sortMode === "multiple" && t.shiftKey));
|
|
887
|
+
}
|
|
888
|
+
let Si = h(() => !!C.columnMenu || !!C.reorderableColumns), Ci = O(""), wi = (e) => {
|
|
889
|
+
Ci.value = "", w(() => Ci.value = e);
|
|
890
|
+
}, Ti = () => K.getAllLeafColumns().map((e) => e.id);
|
|
891
|
+
function Ei(e) {
|
|
892
|
+
return !!C.reorderableColumns && z.value.get(e)?.reorderable !== !1;
|
|
893
|
+
}
|
|
894
|
+
function Di(e) {
|
|
895
|
+
let t = z.value.get(e.id), n = e.getIsSorted(), r = e.getIsPinned(), i = Y.value.map((e) => e.id), a = i.indexOf(e.id);
|
|
868
896
|
return [
|
|
869
897
|
e.getCanSort() ? [
|
|
870
898
|
{
|
|
871
899
|
value: "sort-asc",
|
|
872
|
-
label:
|
|
873
|
-
icon:
|
|
900
|
+
label: L.sortAscending,
|
|
901
|
+
icon: xe,
|
|
874
902
|
disabled: n === "asc"
|
|
875
903
|
},
|
|
876
904
|
{
|
|
877
905
|
value: "sort-desc",
|
|
878
|
-
label:
|
|
879
|
-
icon:
|
|
906
|
+
label: L.sortDescending,
|
|
907
|
+
icon: be,
|
|
880
908
|
disabled: n === "desc"
|
|
881
909
|
},
|
|
882
910
|
...n ? [{
|
|
883
911
|
value: "sort-clear",
|
|
884
|
-
label:
|
|
912
|
+
label: L.clearSort
|
|
885
913
|
}] : []
|
|
886
914
|
] : [],
|
|
887
915
|
[
|
|
888
916
|
...r === "start" ? [] : [{
|
|
889
917
|
value: "pin-start",
|
|
890
|
-
label:
|
|
918
|
+
label: L.pinStart
|
|
891
919
|
}],
|
|
892
920
|
...r === "end" ? [] : [{
|
|
893
921
|
value: "pin-end",
|
|
894
|
-
label:
|
|
922
|
+
label: L.pinEnd
|
|
895
923
|
}],
|
|
896
924
|
...r ? [{
|
|
897
925
|
value: "unpin",
|
|
898
|
-
label:
|
|
926
|
+
label: L.unpin
|
|
899
927
|
}] : []
|
|
900
928
|
],
|
|
901
|
-
|
|
929
|
+
Ei(e.id) ? [{
|
|
902
930
|
value: "move-earlier",
|
|
903
|
-
label:
|
|
931
|
+
label: L.moveEarlier,
|
|
904
932
|
disabled: a <= 0
|
|
905
933
|
}, {
|
|
906
934
|
value: "move-later",
|
|
907
|
-
label:
|
|
935
|
+
label: L.moveLater,
|
|
908
936
|
disabled: a >= i.length - 1
|
|
909
937
|
}] : [],
|
|
910
|
-
[...t?.groupable ? [
|
|
938
|
+
[...t?.groupable ? [U.value.includes(e.id) ? {
|
|
911
939
|
value: "ungroup",
|
|
912
|
-
label:
|
|
940
|
+
label: L.ungroup
|
|
913
941
|
} : {
|
|
914
942
|
value: "group",
|
|
915
|
-
label:
|
|
943
|
+
label: L.groupBy
|
|
916
944
|
}] : [], ...e.getCanHide() ? [{
|
|
917
945
|
value: "hide",
|
|
918
|
-
label:
|
|
946
|
+
label: L.hideColumn
|
|
919
947
|
}] : []]
|
|
920
948
|
].filter((e) => e.length).flatMap((e, t) => t ? [{ type: "separator" }, ...e] : e);
|
|
921
949
|
}
|
|
922
|
-
function
|
|
923
|
-
let r =
|
|
924
|
-
r.splice(r.indexOf(t) + +!!n, 0, e),
|
|
950
|
+
function Oi(e, t, n) {
|
|
951
|
+
let r = Ti().filter((t) => t !== e);
|
|
952
|
+
r.splice(r.indexOf(t) + +!!n, 0, e), K.setColumnOrder(r);
|
|
925
953
|
let i = Y.value.map((e) => e.id).filter((t) => t !== e);
|
|
926
|
-
i.splice(i.indexOf(t) + +!!n, 0, e),
|
|
954
|
+
i.splice(i.indexOf(t) + +!!n, 0, e), wi(L.columnMoved(z.value.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
|
|
927
955
|
}
|
|
928
|
-
async function
|
|
956
|
+
async function ki(e, t) {
|
|
929
957
|
let n = Y.value.map((e) => e.id), r = n.indexOf(e.id);
|
|
930
958
|
switch (t) {
|
|
931
959
|
case "sort-asc":
|
|
@@ -934,11 +962,11 @@ var jn = On({
|
|
|
934
962
|
id: e.id,
|
|
935
963
|
desc: t === "sort-desc"
|
|
936
964
|
};
|
|
937
|
-
|
|
965
|
+
C.sortMode === "multiple" ? bi(e.id) ? Ur(V.value.map((t) => t.id === e.id ? n : t)) : Ur([...V.value, n]) : Ur([n]);
|
|
938
966
|
break;
|
|
939
967
|
}
|
|
940
968
|
case "sort-clear":
|
|
941
|
-
|
|
969
|
+
Ur(V.value.filter((t) => t.id !== e.id));
|
|
942
970
|
break;
|
|
943
971
|
case "pin-start":
|
|
944
972
|
case "pin-end":
|
|
@@ -946,123 +974,123 @@ var jn = On({
|
|
|
946
974
|
e.pin(t === "unpin" ? !1 : t === "pin-start" ? "start" : "end");
|
|
947
975
|
break;
|
|
948
976
|
case "move-earlier":
|
|
949
|
-
|
|
977
|
+
Oi(e.id, n[r - 1], !1);
|
|
950
978
|
break;
|
|
951
979
|
case "move-later":
|
|
952
|
-
|
|
980
|
+
Oi(e.id, n[r + 1], !0);
|
|
953
981
|
break;
|
|
954
982
|
case "group":
|
|
955
|
-
|
|
983
|
+
K.setGrouping([...U.value, e.id]);
|
|
956
984
|
break;
|
|
957
985
|
case "ungroup":
|
|
958
|
-
|
|
986
|
+
K.setGrouping(U.value.filter((t) => t !== e.id));
|
|
959
987
|
break;
|
|
960
988
|
case "hide": {
|
|
961
|
-
e.toggleVisibility(!1), await
|
|
962
|
-
let t =
|
|
989
|
+
e.toggleVisibility(!1), await w();
|
|
990
|
+
let t = ho.value?.querySelectorAll("[data-column-menu]");
|
|
963
991
|
t?.[Math.min(r, t.length - 1)]?.focus();
|
|
964
992
|
return;
|
|
965
993
|
}
|
|
966
994
|
}
|
|
967
|
-
await
|
|
995
|
+
await w(), ho.value?.querySelector(`[data-column-menu="${e.id}"]`)?.focus();
|
|
968
996
|
}
|
|
969
|
-
let
|
|
970
|
-
function
|
|
971
|
-
|
|
997
|
+
let Ai = O(null), ji = O(null);
|
|
998
|
+
function Mi(e, t) {
|
|
999
|
+
Ai.value = e, t.dataTransfer?.setData("text/plain", e), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
972
1000
|
}
|
|
973
|
-
function
|
|
974
|
-
if (!
|
|
1001
|
+
function Ni(e, t) {
|
|
1002
|
+
if (!Ai.value || Ai.value === e || !Ei(e)) return;
|
|
975
1003
|
t.preventDefault();
|
|
976
1004
|
let n = t.currentTarget, r = n.getBoundingClientRect(), i = getComputedStyle(n).direction === "rtl", a = t.clientX > r.left + r.width / 2;
|
|
977
|
-
|
|
1005
|
+
ji.value = {
|
|
978
1006
|
id: e,
|
|
979
1007
|
after: i ? !a : a
|
|
980
1008
|
};
|
|
981
1009
|
}
|
|
982
|
-
function
|
|
983
|
-
e.preventDefault(),
|
|
1010
|
+
function Pi(e) {
|
|
1011
|
+
e.preventDefault(), Ai.value && ji.value && Oi(Ai.value, ji.value.id, ji.value.after), Fi();
|
|
984
1012
|
}
|
|
985
|
-
function
|
|
986
|
-
|
|
1013
|
+
function Fi() {
|
|
1014
|
+
Ai.value = null, ji.value = null;
|
|
987
1015
|
}
|
|
988
|
-
let
|
|
989
|
-
function
|
|
1016
|
+
let Ii = (e) => ji.value?.id === e ? ji.value.after ? "after" : "before" : void 0;
|
|
1017
|
+
function Li(e, t) {
|
|
990
1018
|
let n = t.currentTarget.closest("th"), r = n?.closest("table");
|
|
991
1019
|
if (!n || !r) return;
|
|
992
|
-
let i =
|
|
993
|
-
o &&
|
|
1020
|
+
let i = z.value.get(e), a = $.value && i ? K.getRowModel().rows.map((t) => B(i, t.getValue(e), t.original)) : void 0, o = ft(r, n, a);
|
|
1021
|
+
o && K.setColumnSizing((t) => ({
|
|
994
1022
|
...t,
|
|
995
|
-
[e]: Math.min(1200, Math.max(
|
|
1023
|
+
[e]: Math.min(1200, Math.max(br, o))
|
|
996
1024
|
}));
|
|
997
1025
|
}
|
|
998
|
-
function
|
|
999
|
-
if (t.key === "Enter") return t.preventDefault(),
|
|
1000
|
-
let n =
|
|
1026
|
+
function Ri(e, t) {
|
|
1027
|
+
if (t.key === "Enter") return t.preventDefault(), Li(e, t);
|
|
1028
|
+
let n = vt(t.key, t.currentTarget) * xr;
|
|
1001
1029
|
if (!n) return;
|
|
1002
1030
|
t.preventDefault();
|
|
1003
|
-
let r =
|
|
1004
|
-
|
|
1031
|
+
let r = K.getColumn(e);
|
|
1032
|
+
K.setColumnSizing((t) => ({
|
|
1005
1033
|
...t,
|
|
1006
|
-
[e]: Math.max(
|
|
1034
|
+
[e]: Math.max(br, r.getSize() + n)
|
|
1007
1035
|
}));
|
|
1008
1036
|
}
|
|
1009
|
-
let
|
|
1010
|
-
function
|
|
1011
|
-
return e.filterOptions ?? [...new Set(
|
|
1037
|
+
let zi = (e) => !!I[`filter-${e}`], Bi = (e) => !!e && (!!e.filter || zi(e.id)), Vi = h(() => C.filterDisplay === "row" && jr.value && wr.value.some((e) => Bi(e))), Hi = h(() => C.filterDisplay === "menu" && jr.value), Ui = h(() => !!W.value || Nr.value.length > 0 || Sn.value), Wi = (e) => Nr.value.find((t) => t.id === e)?.value;
|
|
1038
|
+
function Gi(e) {
|
|
1039
|
+
return e.filterOptions ?? [...new Set(Tn.value.map((t) => B(e, Tr(e, t), t)))].filter(Boolean).sort();
|
|
1012
1040
|
}
|
|
1013
|
-
function
|
|
1014
|
-
let t =
|
|
1041
|
+
function Ki(e) {
|
|
1042
|
+
let t = Wi(e.id);
|
|
1015
1043
|
return t === void 0 ? e.filter === "multiSelect" ? [] : null : typeof t == "string" ? t : t.constraints[0]?.value ?? null;
|
|
1016
1044
|
}
|
|
1017
|
-
function Wi(e, t) {
|
|
1018
|
-
G.getColumn(e)?.setFilterValue(t !== void 0 && yt(t) ? t : void 0);
|
|
1019
|
-
}
|
|
1020
|
-
let Gi = (e) => e.filterMatchMode ?? (wr(e) && e.filter === "multiSelect" ? "in" : it[e.filter ?? "text"][0]), Ki = (e) => wt(Gi(e))?.input ?? e.filter ?? "text";
|
|
1021
1045
|
function qi(e, t) {
|
|
1046
|
+
K.getColumn(e)?.setFilterValue(t !== void 0 && bt(t) ? t : void 0);
|
|
1047
|
+
}
|
|
1048
|
+
let Ji = (e) => e.filterMatchMode ?? (Er(e) && e.filter === "multiSelect" ? "in" : at[e.filter ?? "text"][0]), Yi = (e) => Tt(Ji(e))?.input ?? e.filter ?? "text";
|
|
1049
|
+
function Xi(e, t) {
|
|
1022
1050
|
let n = e.filter ?? "text";
|
|
1023
|
-
if ((n === "text" || n === "select") && !e.filterMatchMode && !
|
|
1024
|
-
|
|
1051
|
+
if ((n === "text" || n === "select") && !e.filterMatchMode && !Er(e) && !zi(e.id)) return qi(e.id, Nt(t));
|
|
1052
|
+
qi(e.id, {
|
|
1025
1053
|
operator: "and",
|
|
1026
1054
|
constraints: [{
|
|
1027
|
-
matchMode:
|
|
1055
|
+
matchMode: Ji(e),
|
|
1028
1056
|
value: t
|
|
1029
1057
|
}]
|
|
1030
1058
|
});
|
|
1031
1059
|
}
|
|
1032
|
-
function
|
|
1033
|
-
let r =
|
|
1034
|
-
i[t] = n,
|
|
1060
|
+
function Zi(e, t, n) {
|
|
1061
|
+
let r = Ki(e), i = Array.isArray(r) ? [...r] : [null, null];
|
|
1062
|
+
i[t] = n, Xi(e, i);
|
|
1035
1063
|
}
|
|
1036
|
-
let
|
|
1037
|
-
let n =
|
|
1064
|
+
let Qi = (e, t) => {
|
|
1065
|
+
let n = Ki(e);
|
|
1038
1066
|
return Array.isArray(n) ? n[t] : null;
|
|
1039
|
-
},
|
|
1040
|
-
function
|
|
1041
|
-
|
|
1067
|
+
}, $i = h(() => C.selectionMode !== "single"), ea = h(() => C.selectAllMode === "all" && Dn.value), ta = (e) => ea.value && Ar.value ? e.getCanSelect() && !Ar.value.except.includes(e.id) : e.getIsSelected(), na = h(() => ea.value ? Ar.value ? !Ar.value.except.length || "indeterminate" : Js.value ? "indeterminate" : !1 : K.getIsAllPageRowsSelected() ? !0 : K.getIsSomePageRowsSelected() ? "indeterminate" : !1);
|
|
1068
|
+
function ra(e) {
|
|
1069
|
+
ea.value ? (Kr({}), qr(Ar.value || !e ? null : {
|
|
1042
1070
|
mode: "all",
|
|
1043
1071
|
except: []
|
|
1044
|
-
})) :
|
|
1045
|
-
}
|
|
1046
|
-
let
|
|
1047
|
-
function
|
|
1048
|
-
if (
|
|
1049
|
-
let r = new Set(
|
|
1050
|
-
for (let i of n &&
|
|
1051
|
-
|
|
1072
|
+
})) : C.selectAllMode === "all" ? K.toggleAllRowsSelected(e) : K.toggleAllPageRowsSelected(e);
|
|
1073
|
+
}
|
|
1074
|
+
let ia = `${ot}-select`, aa = null, oa = !1, sa = () => K.getRowModel().rows.filter((e) => e.getCanSelect()).map((e) => e.id);
|
|
1075
|
+
function ca(e, t, n = !1) {
|
|
1076
|
+
if (ea.value && Ar.value) {
|
|
1077
|
+
let r = new Set(Ar.value.except);
|
|
1078
|
+
for (let i of n && aa ? _t(sa(), aa, e.id) : [e.id]) t ? r.delete(i) : r.add(i);
|
|
1079
|
+
qr({
|
|
1052
1080
|
mode: "all",
|
|
1053
1081
|
except: [...r]
|
|
1054
1082
|
});
|
|
1055
|
-
} else
|
|
1056
|
-
|
|
1083
|
+
} else $i.value ? Kr(dn(kr.value, n && aa ? _t(sa(), aa, e.id) : [e.id], t)) : Kr(t ? un([e.id]) : {});
|
|
1084
|
+
aa = e.id;
|
|
1057
1085
|
}
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1086
|
+
function la(e) {
|
|
1087
|
+
oa = e.shiftKey;
|
|
1060
1088
|
}
|
|
1061
|
-
function
|
|
1089
|
+
function ua(e, t) {
|
|
1062
1090
|
let n = t.target, r = !!n.closest("[data-row-link]");
|
|
1063
|
-
if (!r && n.closest(
|
|
1064
|
-
let i =
|
|
1065
|
-
if (
|
|
1091
|
+
if (!r && n.closest(Cr)) return;
|
|
1092
|
+
let i = C.rowHref?.(e.original);
|
|
1093
|
+
if (F("rowClick", {
|
|
1066
1094
|
row: e.original,
|
|
1067
1095
|
rowId: e.id,
|
|
1068
1096
|
href: i,
|
|
@@ -1070,16 +1098,16 @@ var jn = On({
|
|
|
1070
1098
|
}), i) {
|
|
1071
1099
|
if (r || t.defaultPrevented) return;
|
|
1072
1100
|
t.ctrlKey || t.metaKey || t.shiftKey ? window.open(i, "_blank", "noopener") : window.location.assign(i);
|
|
1073
|
-
} else
|
|
1101
|
+
} else C.selectOnRowClick && e.getCanSelect() && ca(e, !$i.value || !ta(e), $i.value && t.shiftKey);
|
|
1074
1102
|
}
|
|
1075
|
-
function
|
|
1076
|
-
let n =
|
|
1077
|
-
t.button === 1 && n && !r.closest(
|
|
1103
|
+
function da(e, t) {
|
|
1104
|
+
let n = C.rowHref?.(e.original), r = t.target;
|
|
1105
|
+
t.button === 1 && n && !r.closest(Cr) && window.open(n, "_blank", "noopener");
|
|
1078
1106
|
}
|
|
1079
|
-
let
|
|
1080
|
-
let t =
|
|
1081
|
-
return !t?.copyable && !(
|
|
1082
|
-
})?.id : void 0),
|
|
1107
|
+
let fa = h(() => C.rowHref ? Y.value.find((e) => {
|
|
1108
|
+
let t = z.value.get(e.id);
|
|
1109
|
+
return !t?.copyable && !(ri.value && t?.editable);
|
|
1110
|
+
})?.id : void 0), pa = (e, t) => t === fa.value ? C.rowHref?.(e.original) : void 0, ma = h(() => C.frozenRows?.length ? K.getCenterRows() : K.getRowModel().rows), ha = h(() => C.frozenRows?.length ? K.getTopRows() : []), Z = h(() => (kn.value ? pn : ma.value).flatMap((e) => e.getIsGrouped() ? [{
|
|
1083
1111
|
kind: "group",
|
|
1084
1112
|
row: e,
|
|
1085
1113
|
key: e.id
|
|
@@ -1087,188 +1115,188 @@ var jn = On({
|
|
|
1087
1115
|
kind: "row",
|
|
1088
1116
|
row: e,
|
|
1089
1117
|
key: e.id
|
|
1090
|
-
}, ...
|
|
1118
|
+
}, ...I.expansion && e.getIsExpanded() ? [{
|
|
1091
1119
|
kind: "expansion",
|
|
1092
1120
|
row: e,
|
|
1093
1121
|
key: `${e.id}:details`
|
|
1094
|
-
}] : []])),
|
|
1122
|
+
}] : []])), ga = h(() => C.pageSize && !Dn.value ? H.value.pageIndex * H.value.pageSize : 0), _a = h(() => {
|
|
1095
1123
|
let e = /* @__PURE__ */ new Map();
|
|
1096
|
-
return Z.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id,
|
|
1097
|
-
}),
|
|
1098
|
-
function
|
|
1099
|
-
return t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(
|
|
1124
|
+
return Z.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id, ga.value + n + 1)), e;
|
|
1125
|
+
}), va = (e) => `${ot}-details-${e.id}`, ya = h(() => K.getIsAllRowsExpanded()), ba = h(() => wr.value.some((e) => e.aggregate)), xa = h(() => wr.value.some((e) => e.aggregate || e.footer));
|
|
1126
|
+
function Sa(e, t, n) {
|
|
1127
|
+
return t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(S.value.locale, { maximumFractionDigits: 2 }).format(t) : Nt(t);
|
|
1100
1128
|
}
|
|
1101
|
-
function
|
|
1129
|
+
function Ca(e, t) {
|
|
1102
1130
|
if (!e.aggregate) return "";
|
|
1103
1131
|
let n = t.filter((e) => !e.getIsGrouped());
|
|
1104
|
-
return
|
|
1132
|
+
return Sa(e, Ke(n.map((t) => Tr(e, t.original)), e.aggregate), e.aggregate === "count" ? void 0 : n[0]?.original);
|
|
1105
1133
|
}
|
|
1106
|
-
function
|
|
1134
|
+
function wa(e) {
|
|
1107
1135
|
if (e.footer !== void 0) return e.footer;
|
|
1108
1136
|
if (!e.aggregate) return "";
|
|
1109
|
-
let t =
|
|
1110
|
-
return typeof e.aggregate == "string" ?
|
|
1137
|
+
let t = Ca(e, K.getFilteredRowModel().flatRows);
|
|
1138
|
+
return typeof e.aggregate == "string" ? L.aggregates[e.aggregate]?.(t) ?? t : t;
|
|
1111
1139
|
}
|
|
1112
|
-
let
|
|
1113
|
-
function
|
|
1140
|
+
let Ta = (e) => typeof C.rowActions == "function" ? C.rowActions(e.original) : C.rowActions ?? [], Ea = me(null);
|
|
1141
|
+
function Da(e) {
|
|
1114
1142
|
let t = e.target.closest("[data-row-id]");
|
|
1115
|
-
|
|
1143
|
+
Ea.value = t ? K.getRow(t.dataset.rowId, !0) ?? null : null;
|
|
1116
1144
|
}
|
|
1117
|
-
function
|
|
1118
|
-
e &&
|
|
1145
|
+
function Oa(e, t) {
|
|
1146
|
+
e && F("rowAction", {
|
|
1119
1147
|
value: t,
|
|
1120
1148
|
row: e.original,
|
|
1121
1149
|
rowId: e.id
|
|
1122
1150
|
});
|
|
1123
1151
|
}
|
|
1124
|
-
let
|
|
1152
|
+
let ka = (e, { slots: t, emit: n }) => e.enabled ? se(c, {
|
|
1125
1153
|
items: e.items,
|
|
1126
1154
|
label: e.label,
|
|
1127
1155
|
onSelect: (e) => n("select", e)
|
|
1128
1156
|
}, t) : t.default?.();
|
|
1129
|
-
|
|
1157
|
+
ka.props = [
|
|
1130
1158
|
"enabled",
|
|
1131
1159
|
"items",
|
|
1132
1160
|
"label"
|
|
1133
|
-
],
|
|
1134
|
-
let
|
|
1135
|
-
function
|
|
1161
|
+
], ka.emits = ["select"];
|
|
1162
|
+
let Aa = (e, { slots: t }) => t.default?.();
|
|
1163
|
+
function ja(e) {
|
|
1136
1164
|
try {
|
|
1137
|
-
return
|
|
1165
|
+
return K.getRow(e, !0) ?? void 0;
|
|
1138
1166
|
} catch {
|
|
1139
1167
|
return;
|
|
1140
1168
|
}
|
|
1141
1169
|
}
|
|
1142
|
-
let
|
|
1143
|
-
let n =
|
|
1144
|
-
return `${n?.header ?? t}: ${
|
|
1145
|
-
}).join(", "),
|
|
1146
|
-
function
|
|
1170
|
+
let Ma = O(null), Na = O(null), Pa = O(null), Fa = null, Ia = h(() => !!C.getSubRows), La = h(() => U.value.length > 0), Ra = (e) => U.value.map((t) => St(e.getValue(t))).join("\0"), za = (e) => U.value.map((t) => {
|
|
1171
|
+
let n = z.value.get(t);
|
|
1172
|
+
return `${n?.header ?? t}: ${B(n, e.getValue(t), e.original)}`;
|
|
1173
|
+
}).join(", "), Ba = () => Z.value.filter((e) => e.kind === "row" && (La.value || e.row.depth === 0)).map((e) => e.row);
|
|
1174
|
+
function Va() {
|
|
1147
1175
|
let e = (t) => t.map((t) => ({
|
|
1148
1176
|
id: t.id,
|
|
1149
|
-
...
|
|
1177
|
+
...C.getSubRows?.(t.original) ? { children: e(t.subRows) } : {}
|
|
1150
1178
|
}));
|
|
1151
|
-
return e(
|
|
1179
|
+
return e(K.getCoreRowModel().rows);
|
|
1152
1180
|
}
|
|
1153
|
-
function
|
|
1154
|
-
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o =
|
|
1181
|
+
function Ha(e, t, n) {
|
|
1182
|
+
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o = La.value && Ra(e) !== Ra(t);
|
|
1155
1183
|
if (i === a && !o) return;
|
|
1156
|
-
let s = o ? Object.fromEntries(
|
|
1157
|
-
|
|
1184
|
+
let s = o ? Object.fromEntries(U.value.map((e) => [e, t.getValue(e)])) : void 0;
|
|
1185
|
+
F("rowReorder", {
|
|
1158
1186
|
row: e.original,
|
|
1159
1187
|
rowId: e.id,
|
|
1160
1188
|
from: i,
|
|
1161
1189
|
to: a,
|
|
1162
1190
|
...s ? { group: s } : {}
|
|
1163
1191
|
});
|
|
1164
|
-
let c =
|
|
1165
|
-
|
|
1192
|
+
let c = Ba().filter((n) => n.id !== e.id && (!La.value || Ra(n) === Ra(t))).map((e) => e.id), l = c.indexOf(t.id) + +!!n + 1, u = G(e.original, e.index);
|
|
1193
|
+
wi(o ? L.rowMovedToGroup(u, za(t), l, c.length + 1) : L.rowMoved(u, l, c.length + 1));
|
|
1166
1194
|
}
|
|
1167
|
-
function
|
|
1195
|
+
function Ua(e, t) {
|
|
1168
1196
|
if (!t) return;
|
|
1169
|
-
let n =
|
|
1170
|
-
|
|
1197
|
+
let n = Va(), r = t.parentId ? ja(t.parentId) : void 0, i = t.parentId ? wt(n, t.parentId)?.node.children ?? [] : n;
|
|
1198
|
+
F("rowReorder", {
|
|
1171
1199
|
row: e.original,
|
|
1172
1200
|
rowId: e.id,
|
|
1173
1201
|
from: e.index,
|
|
1174
1202
|
to: t.index,
|
|
1175
1203
|
parentId: t.parentId,
|
|
1176
1204
|
index: t.index
|
|
1177
|
-
}), r && !r.getIsExpanded() && r.toggleExpanded(!0),
|
|
1205
|
+
}), r && !r.getIsExpanded() && r.toggleExpanded(!0), wi(L.rowMovedInTree(G(e.original, e.index), r ? G(r.original, r.index) : null, t.index + 1, i.filter((t) => t.id !== e.id).length + 1));
|
|
1178
1206
|
}
|
|
1179
|
-
function
|
|
1180
|
-
if (
|
|
1207
|
+
function Wa(e, t) {
|
|
1208
|
+
if (Ia.value) {
|
|
1181
1209
|
let n = getComputedStyle(t.currentTarget).direction === "rtl", r = t.key === "ArrowUp" ? "up" : t.key === "ArrowDown" ? "down" : t.key === "ArrowRight" ? n ? "out" : "in" : t.key === "ArrowLeft" ? n ? "in" : "out" : void 0;
|
|
1182
1210
|
if (!r) return;
|
|
1183
|
-
t.preventDefault(),
|
|
1211
|
+
t.preventDefault(), Fa = e.id, Ua(e, on(Va(), e.id, r));
|
|
1184
1212
|
return;
|
|
1185
1213
|
}
|
|
1186
1214
|
if (t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
|
|
1187
1215
|
t.preventDefault();
|
|
1188
|
-
let n =
|
|
1189
|
-
if (
|
|
1190
|
-
let r =
|
|
1216
|
+
let n = Ba();
|
|
1217
|
+
if (La.value) {
|
|
1218
|
+
let r = ht(n.map((e) => ({
|
|
1191
1219
|
id: e.id,
|
|
1192
|
-
group:
|
|
1193
|
-
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r &&
|
|
1220
|
+
group: Ra(e)
|
|
1221
|
+
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r && ja(r.targetId);
|
|
1194
1222
|
if (!r || !i) return;
|
|
1195
|
-
|
|
1223
|
+
Fa = e.id, Ha(e, i, r.after);
|
|
1196
1224
|
return;
|
|
1197
1225
|
}
|
|
1198
1226
|
let r = n[n.indexOf(e) + (t.key === "ArrowUp" ? -1 : 1)];
|
|
1199
|
-
r && (
|
|
1227
|
+
r && (Fa = e.id, Ha(e, r, t.key === "ArrowDown"));
|
|
1200
1228
|
}
|
|
1201
|
-
|
|
1202
|
-
if (!
|
|
1203
|
-
let e =
|
|
1204
|
-
|
|
1229
|
+
N(Tn, async () => {
|
|
1230
|
+
if (!Fa) return;
|
|
1231
|
+
let e = Fa;
|
|
1232
|
+
Fa = null, await w(), ho.value?.querySelector(`[data-drag-handle="${CSS.escape(e)}"]`)?.focus();
|
|
1205
1233
|
});
|
|
1206
|
-
function
|
|
1207
|
-
if (
|
|
1208
|
-
|
|
1234
|
+
function Ga(e, t) {
|
|
1235
|
+
if (Na.value !== e.id) return t.preventDefault();
|
|
1236
|
+
Ma.value = e.id, t.dataTransfer?.setData("text/plain", e.id), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1209
1237
|
}
|
|
1210
|
-
function
|
|
1211
|
-
if (!
|
|
1238
|
+
function Ka(e, t) {
|
|
1239
|
+
if (!Ma.value || Ma.value === e.id) return;
|
|
1212
1240
|
let n = t.currentTarget.getBoundingClientRect(), r = (t.clientY - n.top) / n.height;
|
|
1213
|
-
if (
|
|
1214
|
-
let n =
|
|
1215
|
-
if (!
|
|
1216
|
-
|
|
1241
|
+
if (Ia.value) {
|
|
1242
|
+
let n = C.getSubRows?.(e.original) ? r < .25 ? "before" : r > .75 ? "after" : "inside" : r < .5 ? "before" : "after";
|
|
1243
|
+
if (!rn(Va(), Ma.value, e.id, n)) {
|
|
1244
|
+
Pa.value = null;
|
|
1217
1245
|
return;
|
|
1218
1246
|
}
|
|
1219
|
-
t.preventDefault(),
|
|
1247
|
+
t.preventDefault(), Pa.value = {
|
|
1220
1248
|
id: e.id,
|
|
1221
1249
|
position: n
|
|
1222
1250
|
};
|
|
1223
|
-
} else t.preventDefault(),
|
|
1251
|
+
} else t.preventDefault(), Pa.value = {
|
|
1224
1252
|
id: e.id,
|
|
1225
1253
|
position: r > .5 ? "after" : "before"
|
|
1226
1254
|
};
|
|
1227
1255
|
}
|
|
1228
|
-
function
|
|
1229
|
-
|
|
1256
|
+
function qa(e, t) {
|
|
1257
|
+
Ma.value && (t.preventDefault(), Pa.value = {
|
|
1230
1258
|
id: e.id,
|
|
1231
1259
|
position: "inside"
|
|
1232
1260
|
});
|
|
1233
1261
|
}
|
|
1234
|
-
function
|
|
1262
|
+
function Ja(e) {
|
|
1235
1263
|
e.preventDefault();
|
|
1236
|
-
let t =
|
|
1264
|
+
let t = Ma.value ? ja(Ma.value) : void 0, n = Pa.value ? ja(Pa.value.id) : void 0, r = Pa.value?.position;
|
|
1237
1265
|
if (t && n && r) {
|
|
1238
|
-
if (
|
|
1266
|
+
if (Ia.value) Ua(t, rn(Va(), t.id, n.id, r));
|
|
1239
1267
|
else if (n.getIsGrouped()) {
|
|
1240
1268
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped() && e.id !== t.id).at(-1);
|
|
1241
|
-
e &&
|
|
1242
|
-
} else
|
|
1269
|
+
e && Ha(t, e, !0);
|
|
1270
|
+
} else Ha(t, n, r === "after");
|
|
1243
1271
|
}
|
|
1244
|
-
|
|
1272
|
+
Ya();
|
|
1245
1273
|
}
|
|
1246
|
-
function
|
|
1247
|
-
|
|
1274
|
+
function Ya() {
|
|
1275
|
+
Ma.value = null, Pa.value = null, Na.value = null;
|
|
1248
1276
|
}
|
|
1249
|
-
let
|
|
1277
|
+
let Xa = (e) => Pa.value?.id === e ? Pa.value.position : void 0, Za = me({});
|
|
1250
1278
|
function Q(e, t) {
|
|
1251
|
-
let n =
|
|
1279
|
+
let n = Bt(Za.value, e.id, t);
|
|
1252
1280
|
return n ? n.value : e.getValue(t);
|
|
1253
1281
|
}
|
|
1254
|
-
let
|
|
1255
|
-
function
|
|
1282
|
+
let Qa = h(() => !!C.cellSelection || C.editMode === "batch"), $a = new Ge(), eo = O(0), to = h(() => eo.value >= 0 && $a.canUndo), no = h(() => eo.value >= 0 && $a.canRedo);
|
|
1283
|
+
function ro(e, t = !0, n = !1) {
|
|
1256
1284
|
if (e.length) {
|
|
1257
|
-
if (
|
|
1285
|
+
if (C.editMode === "batch") Za.value = qe(Za.value, e, n);
|
|
1258
1286
|
else for (let t of n ? [...e].reverse() : e) {
|
|
1259
|
-
let e =
|
|
1260
|
-
e &&
|
|
1287
|
+
let e = ja(t.rowId);
|
|
1288
|
+
e && F("cellEdit", {
|
|
1261
1289
|
row: e.original,
|
|
1262
1290
|
rowId: e.id,
|
|
1263
1291
|
columnId: t.columnId,
|
|
1264
1292
|
value: n ? t.before : t.after
|
|
1265
1293
|
});
|
|
1266
1294
|
}
|
|
1267
|
-
if (
|
|
1268
|
-
let e =
|
|
1295
|
+
if (C.editMode === "row") for (let { rowId: t, values: r } of Ye(e, n)) {
|
|
1296
|
+
let e = ja(t);
|
|
1269
1297
|
if (!e) continue;
|
|
1270
|
-
let n =
|
|
1271
|
-
|
|
1298
|
+
let n = wr.value.filter((e) => e.editable).map((t) => [t.id, Q(e, t.id)]);
|
|
1299
|
+
F("rowEdit", {
|
|
1272
1300
|
row: e.original,
|
|
1273
1301
|
rowId: t,
|
|
1274
1302
|
values: {
|
|
@@ -1277,29 +1305,29 @@ var jn = On({
|
|
|
1277
1305
|
}
|
|
1278
1306
|
});
|
|
1279
1307
|
}
|
|
1280
|
-
t &&
|
|
1308
|
+
t && Qa.value && ($a.push(e), eo.value++);
|
|
1281
1309
|
}
|
|
1282
1310
|
}
|
|
1283
|
-
function
|
|
1284
|
-
let e =
|
|
1285
|
-
e && (
|
|
1311
|
+
function io() {
|
|
1312
|
+
let e = $a.undo();
|
|
1313
|
+
e && (ro(e, !1, !0), eo.value++, wi(L.undone(e.length)));
|
|
1286
1314
|
}
|
|
1287
|
-
function
|
|
1288
|
-
let e =
|
|
1289
|
-
e && (
|
|
1315
|
+
function ao() {
|
|
1316
|
+
let e = $a.redo();
|
|
1317
|
+
e && (ro(e, !1), eo.value++, wi(L.redone(e.length)));
|
|
1290
1318
|
}
|
|
1291
|
-
let
|
|
1292
|
-
async function
|
|
1293
|
-
await
|
|
1294
|
-
let e =
|
|
1319
|
+
let oo = h(() => Object.keys(Za.value).length);
|
|
1320
|
+
async function so() {
|
|
1321
|
+
await w();
|
|
1322
|
+
let e = uc.value;
|
|
1295
1323
|
(e?.querySelector("[tabindex=\"0\"]") ?? e)?.focus();
|
|
1296
1324
|
}
|
|
1297
|
-
function
|
|
1298
|
-
let e = Object.values(
|
|
1325
|
+
function co() {
|
|
1326
|
+
let e = Object.values(Za.value);
|
|
1299
1327
|
if (!e.length) return;
|
|
1300
1328
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
1301
1329
|
for (let r of e) {
|
|
1302
|
-
let e =
|
|
1330
|
+
let e = ja(r.rowId);
|
|
1303
1331
|
if (!e) continue;
|
|
1304
1332
|
t.push({
|
|
1305
1333
|
row: e.original,
|
|
@@ -1315,123 +1343,123 @@ var jn = On({
|
|
|
1315
1343
|
};
|
|
1316
1344
|
i.values[r.columnId] = r.after, n.set(e.id, i);
|
|
1317
1345
|
}
|
|
1318
|
-
|
|
1346
|
+
F("save", {
|
|
1319
1347
|
changes: t,
|
|
1320
1348
|
rows: [...n.values()]
|
|
1321
|
-
}),
|
|
1349
|
+
}), Za.value = {}, $a.clear(), eo.value++, wi(L.changesSaved(t.length)), so();
|
|
1322
1350
|
}
|
|
1323
|
-
function
|
|
1324
|
-
Object.keys(
|
|
1351
|
+
function lo() {
|
|
1352
|
+
Object.keys(Za.value).length && (Za.value = {}, $a.clear(), eo.value++, wi(L.changesDiscarded), so());
|
|
1325
1353
|
}
|
|
1326
|
-
let
|
|
1354
|
+
let uo = O(null), fo = O(null), po = O({}), mo = O({}), ho = ve("root"), go = (e) => e.editor ?? "text", _o = (e, t) => `${e}:${t}`, vo = (e, t) => `${ot}-error-${e}-${t}`, yo = () => Z.value.filter((e) => e.kind === "row").flatMap((e) => Y.value.filter((e) => z.value.get(e.id)?.editable).map((t) => ({
|
|
1327
1355
|
rowId: e.row.id,
|
|
1328
1356
|
columnId: t.id
|
|
1329
1357
|
})));
|
|
1330
|
-
function
|
|
1331
|
-
let t =
|
|
1332
|
-
(
|
|
1358
|
+
function bo(e) {
|
|
1359
|
+
let t = ho.value?.querySelector(e);
|
|
1360
|
+
(q.value ? t?.closest("td") ?? t : t)?.focus();
|
|
1333
1361
|
}
|
|
1334
|
-
async function
|
|
1335
|
-
await
|
|
1362
|
+
async function xo() {
|
|
1363
|
+
await w(), ho.value?.querySelector("[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])")?.focus();
|
|
1336
1364
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1365
|
+
function So(e, t) {
|
|
1366
|
+
uo.value = {
|
|
1339
1367
|
rowId: e.id,
|
|
1340
1368
|
columnId: t
|
|
1341
|
-
},
|
|
1369
|
+
}, po.value = { [t]: Q(e, t) }, mo.value = {}, xo();
|
|
1342
1370
|
}
|
|
1343
|
-
let
|
|
1344
|
-
function
|
|
1345
|
-
let n = Ze(t.map((t) => [t, () =>
|
|
1346
|
-
return n instanceof Promise ? (
|
|
1371
|
+
let Co = O(!1);
|
|
1372
|
+
function wo(e, t) {
|
|
1373
|
+
let n = Ze(t.map((t) => [t, () => z.value.get(t)?.validate?.(po.value[t], e.original)])), r = (e) => (mo.value = e, Object.keys(e).length === 0);
|
|
1374
|
+
return n instanceof Promise ? (Co.value = !0, n.then(r).finally(() => Co.value = !1)) : r(n);
|
|
1347
1375
|
}
|
|
1348
|
-
function
|
|
1349
|
-
if (!
|
|
1350
|
-
let r =
|
|
1376
|
+
function To(e, t, n) {
|
|
1377
|
+
if (!uo.value || Co.value) return;
|
|
1378
|
+
let r = wo(e, [t]);
|
|
1351
1379
|
return r instanceof Promise ? r.then((r) => {
|
|
1352
|
-
if (
|
|
1353
|
-
}) : r ?
|
|
1380
|
+
if (uo.value?.rowId === e.id && uo.value.columnId === t) return r ? Eo(e, t, n) : xo();
|
|
1381
|
+
}) : r ? Eo(e, t, n) : xo();
|
|
1354
1382
|
}
|
|
1355
|
-
async function
|
|
1356
|
-
let r =
|
|
1357
|
-
|
|
1383
|
+
async function Eo(e, t, n) {
|
|
1384
|
+
let r = po.value[t];
|
|
1385
|
+
uo.value = null;
|
|
1358
1386
|
let i = Q(e, t);
|
|
1359
|
-
if ((
|
|
1387
|
+
if ((C.editMode === "batch" ? !Zt(r, i) : r !== e.getValue(t)) && ro([{
|
|
1360
1388
|
rowId: e.id,
|
|
1361
1389
|
columnId: t,
|
|
1362
1390
|
before: i,
|
|
1363
1391
|
after: r
|
|
1364
1392
|
}]), n) {
|
|
1365
|
-
let r =
|
|
1366
|
-
if (i && a) return
|
|
1393
|
+
let r = yo(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && K.getRow(i.rowId, !0);
|
|
1394
|
+
if (i && a) return So(a, i.columnId);
|
|
1367
1395
|
}
|
|
1368
|
-
await
|
|
1396
|
+
await w(), bo(`[data-edit="${CSS.escape(_o(e.id, t))}"]`);
|
|
1369
1397
|
}
|
|
1370
|
-
async function
|
|
1371
|
-
|
|
1398
|
+
async function Do(e, t) {
|
|
1399
|
+
uo.value = null, mo.value = {}, await w(), bo(`[data-edit="${CSS.escape(_o(e.id, t))}"]`);
|
|
1372
1400
|
}
|
|
1373
|
-
function
|
|
1374
|
-
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(),
|
|
1401
|
+
function Oo(e, t, n) {
|
|
1402
|
+
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), Do(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), To(e, t)) : n.key === "Tab" && (n.preventDefault(), To(e, t, n.shiftKey ? -1 : 1)));
|
|
1375
1403
|
}
|
|
1376
|
-
function
|
|
1404
|
+
function ko(e, t, n) {
|
|
1377
1405
|
let r = n.relatedTarget, i = n.currentTarget;
|
|
1378
|
-
r && (i.contains(r) || !
|
|
1406
|
+
r && (i.contains(r) || !ho.value?.contains(r) && r.closest("[data-scope]")) || To(e, t);
|
|
1379
1407
|
}
|
|
1380
|
-
let
|
|
1408
|
+
let Ao = /* @__PURE__ */ new Set([
|
|
1381
1409
|
"select",
|
|
1382
1410
|
"date",
|
|
1383
1411
|
"checkbox"
|
|
1384
1412
|
]);
|
|
1385
|
-
function
|
|
1386
|
-
|
|
1387
|
-
...
|
|
1413
|
+
function jo(e, t, n) {
|
|
1414
|
+
po.value = {
|
|
1415
|
+
...po.value,
|
|
1388
1416
|
[t.id]: n
|
|
1389
|
-
},
|
|
1417
|
+
}, ri.value && Ao.has(go(t)) && !I[`editor-${t.id}`] && To(e, t.id);
|
|
1390
1418
|
}
|
|
1391
|
-
function
|
|
1419
|
+
function Mo(e, t) {
|
|
1392
1420
|
return {
|
|
1393
|
-
value:
|
|
1394
|
-
setValue: (e) =>
|
|
1395
|
-
...
|
|
1421
|
+
value: po.value[t.id],
|
|
1422
|
+
setValue: (e) => po.value = {
|
|
1423
|
+
...po.value,
|
|
1396
1424
|
[t.id]: e
|
|
1397
1425
|
},
|
|
1398
1426
|
row: e.original,
|
|
1399
|
-
commit: () => void (
|
|
1400
|
-
cancel: () => void (
|
|
1401
|
-
invalid: !!
|
|
1427
|
+
commit: () => void (ri.value ? To(e, t.id) : Po(e, !0)),
|
|
1428
|
+
cancel: () => void (ri.value ? Do(e, t.id) : Po(e, !1)),
|
|
1429
|
+
invalid: !!mo.value[t.id]
|
|
1402
1430
|
};
|
|
1403
1431
|
}
|
|
1404
|
-
function
|
|
1405
|
-
|
|
1432
|
+
function No(e) {
|
|
1433
|
+
fo.value = e.id, mo.value = {}, po.value = Object.fromEntries(wr.value.filter((e) => e.editable).map((t) => [t.id, e.getValue(t.id)])), xo();
|
|
1406
1434
|
}
|
|
1407
|
-
async function
|
|
1408
|
-
if (!
|
|
1435
|
+
async function Po(e, t) {
|
|
1436
|
+
if (!Co.value) {
|
|
1409
1437
|
if (t) {
|
|
1410
|
-
if (!await
|
|
1411
|
-
if (
|
|
1412
|
-
|
|
1438
|
+
if (!await wo(e, wr.value.filter((e) => e.editable).map((e) => e.id))) return xo();
|
|
1439
|
+
if (fo.value !== e.id) return;
|
|
1440
|
+
F("rowEdit", {
|
|
1413
1441
|
row: e.original,
|
|
1414
1442
|
rowId: e.id,
|
|
1415
|
-
values: { ...
|
|
1443
|
+
values: { ...po.value }
|
|
1416
1444
|
});
|
|
1417
1445
|
}
|
|
1418
|
-
|
|
1446
|
+
fo.value = null, mo.value = {}, await w(), bo(`[data-row-edit="${CSS.escape(e.id)}"]`);
|
|
1419
1447
|
}
|
|
1420
1448
|
}
|
|
1421
|
-
function
|
|
1422
|
-
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(),
|
|
1449
|
+
function Fo(e, t) {
|
|
1450
|
+
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), Po(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), Po(e, !0)));
|
|
1423
1451
|
}
|
|
1424
|
-
let
|
|
1425
|
-
function
|
|
1426
|
-
let n =
|
|
1452
|
+
let Io = me(null), Lo = h(() => Z.value.filter((e) => e.kind === "row").map((e) => e.row.id)), Ro = h(() => Y.value.map((e) => e.id)), zo = h(() => C.cellSelection ? qt(Io.value, Lo.value, Ro.value) : null), Bo = h(() => new Map(Lo.value.map((e, t) => [e, t]))), Vo = h(() => new Map(Ro.value.map((e, t) => [e, t])));
|
|
1453
|
+
function Ho(e, t) {
|
|
1454
|
+
let n = zo.value;
|
|
1427
1455
|
if (!n) return !1;
|
|
1428
|
-
let r =
|
|
1456
|
+
let r = Bo.value.get(e) ?? -1, i = Vo.value.get(t) ?? -1;
|
|
1429
1457
|
return r >= n.top && r <= n.bottom && i >= n.left && i <= n.right;
|
|
1430
1458
|
}
|
|
1431
|
-
function
|
|
1432
|
-
let t =
|
|
1459
|
+
function Uo(e) {
|
|
1460
|
+
let t = qt(e, Lo.value, Ro.value);
|
|
1433
1461
|
if (!t) return null;
|
|
1434
|
-
let n =
|
|
1462
|
+
let n = Lo.value.slice(t.top, t.bottom + 1), r = Ro.value.slice(t.left, t.right + 1), i = n.flatMap((e) => ja(e) ?? []);
|
|
1435
1463
|
return {
|
|
1436
1464
|
rowIds: n,
|
|
1437
1465
|
columnIds: r,
|
|
@@ -1439,42 +1467,42 @@ var jn = On({
|
|
|
1439
1467
|
values: i.map((e) => r.map((t) => Q(e, t)))
|
|
1440
1468
|
};
|
|
1441
1469
|
}
|
|
1442
|
-
function
|
|
1443
|
-
let t =
|
|
1444
|
-
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (
|
|
1470
|
+
function Wo(e) {
|
|
1471
|
+
let t = Io.value;
|
|
1472
|
+
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (Io.value = e, F("cellSelectionChange", Uo(e)));
|
|
1445
1473
|
}
|
|
1446
|
-
let
|
|
1447
|
-
|
|
1448
|
-
function
|
|
1449
|
-
if (!
|
|
1474
|
+
let Go = !1, Ko = !1, qo = !1, Jo = () => Go = !1;
|
|
1475
|
+
ue(() => window.addEventListener("pointerup", Jo)), le(() => window.removeEventListener("pointerup", Jo));
|
|
1476
|
+
function Yo(e, t, n) {
|
|
1477
|
+
if (!C.cellSelection || n.button !== 0 || n.target.closest("[data-editor]")) return;
|
|
1450
1478
|
let r = {
|
|
1451
1479
|
rowId: e,
|
|
1452
1480
|
columnId: t
|
|
1453
|
-
}, i =
|
|
1454
|
-
|
|
1481
|
+
}, i = Io.value, a = n.shiftKey && i;
|
|
1482
|
+
Wo(a ? {
|
|
1455
1483
|
anchor: i.anchor,
|
|
1456
1484
|
focus: r
|
|
1457
1485
|
} : {
|
|
1458
1486
|
anchor: r,
|
|
1459
1487
|
focus: r
|
|
1460
|
-
}),
|
|
1488
|
+
}), Go = !0, qo = !!a, a && window.getSelection()?.removeAllRanges();
|
|
1461
1489
|
}
|
|
1462
|
-
function
|
|
1463
|
-
|
|
1464
|
-
anchor:
|
|
1490
|
+
function Xo(e, t, n) {
|
|
1491
|
+
Go && Io.value && n.buttons & 1 && (Wo({
|
|
1492
|
+
anchor: Io.value.anchor,
|
|
1465
1493
|
focus: {
|
|
1466
1494
|
rowId: e,
|
|
1467
1495
|
columnId: t
|
|
1468
1496
|
}
|
|
1469
1497
|
}), window.getSelection()?.removeAllRanges());
|
|
1470
1498
|
}
|
|
1471
|
-
function
|
|
1472
|
-
|
|
1499
|
+
function Zo(e) {
|
|
1500
|
+
qo && (qo = !1, e.preventDefault(), e.stopPropagation());
|
|
1473
1501
|
}
|
|
1474
|
-
let
|
|
1475
|
-
function
|
|
1502
|
+
let Qo = (e, t) => uc.value?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null;
|
|
1503
|
+
function $o(e) {
|
|
1476
1504
|
let t = e.target, n = e.key;
|
|
1477
|
-
if (!
|
|
1505
|
+
if (!C.cellSelection || !q.value || !e.shiftKey || e.altKey || ![
|
|
1478
1506
|
"ArrowUp",
|
|
1479
1507
|
"ArrowDown",
|
|
1480
1508
|
"ArrowLeft",
|
|
@@ -1484,7 +1512,7 @@ var jn = On({
|
|
|
1484
1512
|
].includes(n)) return !1;
|
|
1485
1513
|
let r = t.closest("tr")?.dataset.rowId, i = t.dataset.columnId;
|
|
1486
1514
|
if (!r || !i || !t.matches("td")) return !1;
|
|
1487
|
-
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s =
|
|
1515
|
+
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s = Io.value && Ho(r, i) ? Io.value : {
|
|
1488
1516
|
anchor: {
|
|
1489
1517
|
rowId: r,
|
|
1490
1518
|
columnId: i
|
|
@@ -1493,74 +1521,74 @@ var jn = On({
|
|
|
1493
1521
|
rowId: r,
|
|
1494
1522
|
columnId: i
|
|
1495
1523
|
}
|
|
1496
|
-
}, c =
|
|
1497
|
-
e.preventDefault(),
|
|
1524
|
+
}, c = ut(s, Lo.value, Ro.value, o, e.ctrlKey || e.metaKey);
|
|
1525
|
+
e.preventDefault(), Wo(c);
|
|
1498
1526
|
let l = () => {
|
|
1499
|
-
let e =
|
|
1500
|
-
return e ? (
|
|
1527
|
+
let e = Qo(c.focus.rowId, c.focus.columnId);
|
|
1528
|
+
return e ? (Ko = !0, e.focus(), Ko = !1, e.scrollIntoView?.({
|
|
1501
1529
|
block: "nearest",
|
|
1502
1530
|
inline: "nearest"
|
|
1503
1531
|
}), !0) : !1;
|
|
1504
1532
|
};
|
|
1505
|
-
return
|
|
1506
|
-
!l() && $.value && (
|
|
1533
|
+
return w(() => {
|
|
1534
|
+
!l() && $.value && ($s?.value.scrollToIndex(Z.value.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void l())));
|
|
1507
1535
|
}), !0;
|
|
1508
1536
|
}
|
|
1509
|
-
let
|
|
1510
|
-
function
|
|
1511
|
-
let e =
|
|
1537
|
+
let es = (e, t) => B(z.value.get(t), Q(e, t), e.original);
|
|
1538
|
+
function ts() {
|
|
1539
|
+
let e = Uo(Io.value);
|
|
1512
1540
|
if (e) {
|
|
1513
|
-
let t = e.rowIds.flatMap((e) =>
|
|
1541
|
+
let t = e.rowIds.flatMap((e) => ja(e) ?? []);
|
|
1514
1542
|
return {
|
|
1515
|
-
text:
|
|
1543
|
+
text: nn(t.map((t) => e.columnIds.map((e) => es(t, e)))),
|
|
1516
1544
|
count: t.length * e.columnIds.length
|
|
1517
1545
|
};
|
|
1518
1546
|
}
|
|
1519
|
-
let t = Z.value.filter((e) => e.kind === "row" &&
|
|
1547
|
+
let t = Z.value.filter((e) => e.kind === "row" && ta(e.row)).map((e) => e.row);
|
|
1520
1548
|
return t.length ? {
|
|
1521
|
-
text:
|
|
1522
|
-
count: t.length *
|
|
1549
|
+
text: nn(t.map((e) => Ro.value.map((t) => es(e, t)))),
|
|
1550
|
+
count: t.length * Ro.value.length
|
|
1523
1551
|
} : null;
|
|
1524
1552
|
}
|
|
1525
|
-
function
|
|
1553
|
+
function ns() {
|
|
1526
1554
|
let e = document.activeElement;
|
|
1527
|
-
return !!
|
|
1555
|
+
return !!C.cellSelection && !!e && !!uc.value?.contains(e) && !e.closest(Sr);
|
|
1528
1556
|
}
|
|
1529
|
-
function
|
|
1530
|
-
if (
|
|
1531
|
-
let t =
|
|
1532
|
-
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(),
|
|
1557
|
+
function rs(e) {
|
|
1558
|
+
if (!ns() || window.getSelection()?.toString()) return;
|
|
1559
|
+
let t = ts();
|
|
1560
|
+
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), wi(L.cellsCopied(t.count)));
|
|
1533
1561
|
}
|
|
1534
|
-
async function
|
|
1535
|
-
let t =
|
|
1562
|
+
async function is(e) {
|
|
1563
|
+
let t = Rt(e), n = qt(Io.value, Lo.value, Ro.value);
|
|
1536
1564
|
if (!t.length || !n) return;
|
|
1537
|
-
let r =
|
|
1565
|
+
let r = zt(t, {
|
|
1538
1566
|
row: n.top,
|
|
1539
1567
|
column: n.left
|
|
1540
|
-
},
|
|
1568
|
+
}, Lo.value, Ro.value, n), i = [], a = [];
|
|
1541
1569
|
for (let e of r) {
|
|
1542
|
-
let t =
|
|
1570
|
+
let t = z.value.get(e.columnId), n = ja(e.rowId);
|
|
1543
1571
|
if (!t || !n) continue;
|
|
1544
1572
|
if (!t.editable) {
|
|
1545
1573
|
i.push({
|
|
1546
1574
|
...e,
|
|
1547
|
-
message:
|
|
1575
|
+
message: L.pasteErrors.readonly
|
|
1548
1576
|
});
|
|
1549
1577
|
continue;
|
|
1550
1578
|
}
|
|
1551
|
-
let r =
|
|
1552
|
-
locale:
|
|
1579
|
+
let r = Lt(e.text, go(t), {
|
|
1580
|
+
locale: S.value.locale,
|
|
1553
1581
|
choices: t.editOptions
|
|
1554
1582
|
});
|
|
1555
1583
|
if ("error" in r) {
|
|
1556
1584
|
i.push({
|
|
1557
1585
|
...e,
|
|
1558
|
-
message:
|
|
1586
|
+
message: L.pasteErrors[r.error] ?? r.error
|
|
1559
1587
|
});
|
|
1560
1588
|
continue;
|
|
1561
1589
|
}
|
|
1562
1590
|
let o = Q(n, e.columnId);
|
|
1563
|
-
|
|
1591
|
+
Zt(r.value, o) || a.push({
|
|
1564
1592
|
change: {
|
|
1565
1593
|
rowId: n.id,
|
|
1566
1594
|
columnId: t.id,
|
|
@@ -1594,118 +1622,118 @@ var jn = On({
|
|
|
1594
1622
|
c.defaultPrevented = !0;
|
|
1595
1623
|
}
|
|
1596
1624
|
};
|
|
1597
|
-
|
|
1625
|
+
F("cellPaste", c), !c.defaultPrevented && (ro(s.map(({ change: e }) => e)), Wo(Kt(r, Lo.value, Ro.value)), wi(L.cellsPasted(s.length, i.length)));
|
|
1598
1626
|
}
|
|
1599
|
-
function
|
|
1600
|
-
if (
|
|
1627
|
+
function as(e) {
|
|
1628
|
+
if (!ns()) return;
|
|
1601
1629
|
let t = e.clipboardData?.getData("text/plain");
|
|
1602
|
-
t && (e.preventDefault(),
|
|
1630
|
+
t && (e.preventDefault(), is(t));
|
|
1603
1631
|
}
|
|
1604
|
-
|
|
1605
|
-
document.addEventListener("copy",
|
|
1606
|
-
}),
|
|
1607
|
-
document.removeEventListener("copy",
|
|
1632
|
+
ue(() => {
|
|
1633
|
+
document.addEventListener("copy", rs), document.addEventListener("paste", as);
|
|
1634
|
+
}), le(() => {
|
|
1635
|
+
document.removeEventListener("copy", rs), document.removeEventListener("paste", as);
|
|
1608
1636
|
});
|
|
1609
|
-
function
|
|
1610
|
-
if (!
|
|
1611
|
-
let t =
|
|
1612
|
-
return t ? (e.preventDefault(), t === "undo" ?
|
|
1637
|
+
function os(e) {
|
|
1638
|
+
if (!Qa.value || e.target.closest(Sr)) return !1;
|
|
1639
|
+
let t = gt(e);
|
|
1640
|
+
return t ? (e.preventDefault(), t === "undo" ? io() : ao(), !0) : !1;
|
|
1613
1641
|
}
|
|
1614
|
-
let
|
|
1642
|
+
let ss = O(!1), cs = O(""), ls = O(0), us = h(() => !!C.find && ss.value && !!cs.value.trim()), ds = h(() => us.value ? (vc.value && !Dn.value ? K.getPrePaginatedRowModel().rows : K.getRowModel().rows).filter((e) => !e.getIsGrouped()) : []), fs = h(() => us.value ? dt(ds.value.map((e) => ({
|
|
1615
1643
|
id: e.id,
|
|
1616
1644
|
cells: Y.value.map((t) => ({
|
|
1617
1645
|
columnId: t.id,
|
|
1618
|
-
text:
|
|
1646
|
+
text: es(e, t.id)
|
|
1619
1647
|
}))
|
|
1620
|
-
})),
|
|
1621
|
-
function
|
|
1622
|
-
return
|
|
1648
|
+
})), cs.value, S.value.locale) : []), ps = h(() => fs.value.length ? fs.value[Math.min(ls.value, fs.value.length - 1)] : void 0), ms = h(() => new Set(fs.value.map((e) => `${e.rowId}\u0000${e.columnId}`)));
|
|
1649
|
+
function hs(e, t) {
|
|
1650
|
+
return us.value ? ps.value?.rowId === e && ps.value.columnId === t ? J.value.findCurrent() : ms.value.has(`${e}\u0000${t}`) ? J.value.findMatch() : "" : "";
|
|
1623
1651
|
}
|
|
1624
|
-
async function
|
|
1625
|
-
await
|
|
1626
|
-
let e =
|
|
1652
|
+
async function gs() {
|
|
1653
|
+
await w();
|
|
1654
|
+
let e = ps.value;
|
|
1627
1655
|
if (!e) return;
|
|
1628
|
-
let t = () =>
|
|
1656
|
+
let t = () => Qo(e.rowId, e.columnId)?.scrollIntoView?.({
|
|
1629
1657
|
block: "nearest",
|
|
1630
1658
|
inline: "nearest"
|
|
1631
1659
|
}), n = Z.value.findIndex((t) => t.kind === "row" && t.row.id === e.rowId);
|
|
1632
|
-
$.value && n >= 0 ? (
|
|
1660
|
+
$.value && n >= 0 ? ($s?.value.scrollToIndex(n, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(t))) : t();
|
|
1633
1661
|
}
|
|
1634
|
-
function
|
|
1635
|
-
let t =
|
|
1662
|
+
function _s(e) {
|
|
1663
|
+
let t = fs.value;
|
|
1636
1664
|
if (!t.length) return;
|
|
1637
1665
|
let n = (e + t.length) % t.length;
|
|
1638
|
-
|
|
1666
|
+
ls.value = n;
|
|
1639
1667
|
let r = t[n];
|
|
1640
|
-
if (
|
|
1641
|
-
let e =
|
|
1642
|
-
e >= 0 && t !==
|
|
1668
|
+
if (vc.value && !Dn.value) {
|
|
1669
|
+
let e = ds.value.findIndex((e) => e.id === r.rowId), t = Math.floor(e / H.value.pageSize);
|
|
1670
|
+
e >= 0 && t !== H.value.pageIndex && K.setPageIndex(t);
|
|
1643
1671
|
}
|
|
1644
|
-
|
|
1672
|
+
gs();
|
|
1645
1673
|
}
|
|
1646
|
-
async function
|
|
1647
|
-
|
|
1674
|
+
async function vs() {
|
|
1675
|
+
ss.value = !ss.value, await w(), ho.value?.querySelector(ss.value ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]")?.focus();
|
|
1648
1676
|
}
|
|
1649
|
-
function
|
|
1650
|
-
e.key === "Enter" ? (e.preventDefault(),
|
|
1677
|
+
function ys(e) {
|
|
1678
|
+
e.key === "Enter" ? (e.preventDefault(), _s(ls.value + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), vs());
|
|
1651
1679
|
}
|
|
1652
|
-
function
|
|
1653
|
-
|
|
1680
|
+
function bs(e) {
|
|
1681
|
+
cs.value = e, ls.value = 0, gs();
|
|
1654
1682
|
}
|
|
1655
|
-
let
|
|
1656
|
-
if (!
|
|
1657
|
-
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ?
|
|
1683
|
+
let xs = h(() => !$.value && wr.value.some((e) => e.rowSpan === "auto" || e.colSpan)), Ss = (e) => `${ot}-head-${e}`, Cs = h(() => {
|
|
1684
|
+
if (!xs.value) return;
|
|
1685
|
+
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ? Jt(t.map((t) => z.value.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : t.map(() => 1)), r = e.map((t, n) => t.kind !== "row" || e[n - 1]?.kind !== "row"), i = t.map((e) => z.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ? es(e.row, t) : null), o = Je(t.flatMap((e, t) => i[t] ? [a(e.id, t)] : []), r), s = 0;
|
|
1658
1686
|
return {
|
|
1659
1687
|
columnSpans: n,
|
|
1660
1688
|
rowSpans: i.map((e) => e ? o[s++] : void 0)
|
|
1661
1689
|
};
|
|
1662
|
-
}),
|
|
1663
|
-
rowSpan:
|
|
1664
|
-
colSpan:
|
|
1665
|
-
}),
|
|
1666
|
-
if (!
|
|
1667
|
-
let n =
|
|
1690
|
+
}), ws = (e, t) => ({
|
|
1691
|
+
rowSpan: Cs.value?.rowSpans[t]?.[e] ?? 1,
|
|
1692
|
+
colSpan: Cs.value?.columnSpans[e]?.[t] ?? 1
|
|
1693
|
+
}), Ts = (e, t) => {
|
|
1694
|
+
if (!xs.value) return !0;
|
|
1695
|
+
let n = ws(e, t);
|
|
1668
1696
|
return n.rowSpan > 0 && n.colSpan > 0;
|
|
1669
1697
|
};
|
|
1670
|
-
function
|
|
1671
|
-
let i = !!
|
|
1698
|
+
function Es(e, t, n, r) {
|
|
1699
|
+
let i = !!C.cellSelection && Ho(e.id, t), a = C.editMode === "batch" && !!Bt(Za.value, e.id, t), o = xs.value ? ws(n, r) : {
|
|
1672
1700
|
rowSpan: 1,
|
|
1673
1701
|
colSpan: 1
|
|
1674
1702
|
};
|
|
1675
1703
|
return {
|
|
1676
1704
|
className: [
|
|
1677
|
-
i ?
|
|
1678
|
-
a ?
|
|
1679
|
-
|
|
1705
|
+
i ? J.value.cellSelected() : "",
|
|
1706
|
+
a ? J.value.cellChanged() : "",
|
|
1707
|
+
hs(e.id, t)
|
|
1680
1708
|
],
|
|
1681
1709
|
attributes: {
|
|
1682
|
-
...
|
|
1683
|
-
...
|
|
1710
|
+
...C.cellSelection || C.find ? { "data-column-id": t } : {},
|
|
1711
|
+
...C.cellSelection && q.value ? { "aria-selected": i } : {},
|
|
1684
1712
|
...a ? { "data-changed": "" } : {},
|
|
1685
|
-
...
|
|
1713
|
+
...xs.value ? {
|
|
1686
1714
|
...o.rowSpan > 1 ? { rowspan: o.rowSpan } : {},
|
|
1687
1715
|
...o.colSpan > 1 ? { colspan: o.colSpan } : {},
|
|
1688
|
-
headers: Y.value.slice(r, r + o.colSpan).map((e) =>
|
|
1716
|
+
headers: Y.value.slice(r, r + o.colSpan).map((e) => Ss(e.id)).join(" ")
|
|
1689
1717
|
} : {},
|
|
1690
|
-
...
|
|
1691
|
-
onPointerdown: (n) =>
|
|
1692
|
-
onPointerenter: (n) =>
|
|
1693
|
-
onClickCapture:
|
|
1718
|
+
...C.cellSelection ? {
|
|
1719
|
+
onPointerdown: (n) => Yo(e.id, t, n),
|
|
1720
|
+
onPointerenter: (n) => Xo(e.id, t, n),
|
|
1721
|
+
onClickCapture: Zo
|
|
1694
1722
|
} : {}
|
|
1695
1723
|
}
|
|
1696
1724
|
};
|
|
1697
1725
|
}
|
|
1698
|
-
let
|
|
1699
|
-
function
|
|
1700
|
-
let t =
|
|
1701
|
-
return e.bom === !1 ?
|
|
1726
|
+
let Ds = (e, t) => C.editMode === "batch" && !!Bt(Za.value, e.id, t);
|
|
1727
|
+
function Os(e = {}) {
|
|
1728
|
+
let t = K.getVisibleLeafColumns().map((e) => z.value.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? K.getSelectedRowModel().flatRows : K.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => t.map((t) => t.exportValue ? t.exportValue(e.original) : B(t, e.getValue(t.id), e.original))), r = e.separator ?? C.csvSeparator ?? nt(S.value.locale), i = en([t.map((e) => e.exportHeader ?? e.header), ...n], r);
|
|
1729
|
+
return e.bom === !1 ? i.slice(1) : i;
|
|
1702
1730
|
}
|
|
1703
|
-
function
|
|
1731
|
+
function ks(e = !1) {
|
|
1704
1732
|
let t = typeof e == "boolean" ? { selectionOnly: e } : e;
|
|
1705
|
-
|
|
1733
|
+
ct(`${t.filename ?? C.exportFilename ?? "export"}.csv`, Os(t));
|
|
1706
1734
|
}
|
|
1707
|
-
function
|
|
1708
|
-
if (e) return
|
|
1735
|
+
function As(e = !1) {
|
|
1736
|
+
if (e) return K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
|
|
1709
1737
|
row: e,
|
|
1710
1738
|
group: !1,
|
|
1711
1739
|
depth: 0
|
|
@@ -1715,38 +1743,38 @@ var jn = On({
|
|
|
1715
1743
|
group: e.getIsGrouped(),
|
|
1716
1744
|
depth: e.depth
|
|
1717
1745
|
}, ...e.subRows.flatMap(t)];
|
|
1718
|
-
return
|
|
1746
|
+
return K.getSortedRowModel().rows.flatMap(t);
|
|
1719
1747
|
}
|
|
1720
|
-
function
|
|
1721
|
-
let t =
|
|
1722
|
-
return `${t?.header ?? ""}: ${
|
|
1748
|
+
function js(e) {
|
|
1749
|
+
let t = z.value.get(e.groupingColumnId), n = e.getLeafRows().filter((e) => !e.getIsGrouped()).length;
|
|
1750
|
+
return `${t?.header ?? ""}: ${B(t, e.groupingValue, e.original)} (${n})`;
|
|
1723
1751
|
}
|
|
1724
|
-
let
|
|
1725
|
-
function
|
|
1752
|
+
let Ms = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0;
|
|
1753
|
+
function Ns(e, t, n) {
|
|
1726
1754
|
if (e == null || e === "") return null;
|
|
1727
1755
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
1728
1756
|
if (e instanceof Date) return {
|
|
1729
1757
|
date: e,
|
|
1730
|
-
time:
|
|
1758
|
+
time: Ms(t) === "datetime"
|
|
1731
1759
|
};
|
|
1732
|
-
let r =
|
|
1760
|
+
let r = Ms(t);
|
|
1733
1761
|
return r && typeof e == "string" ? {
|
|
1734
1762
|
date: e,
|
|
1735
1763
|
time: r === "datetime"
|
|
1736
|
-
} : typeof e == "boolean" && !t.format ? e : n ?
|
|
1764
|
+
} : typeof e == "boolean" && !t.format ? e : n ? B(t, e, n) : Nt(e);
|
|
1737
1765
|
}
|
|
1738
|
-
function
|
|
1739
|
-
let t =
|
|
1766
|
+
function Ps(e = {}) {
|
|
1767
|
+
let t = K.getVisibleLeafColumns().map((e) => z.value.get(e.id)).filter((e) => e.exportable !== !1), n = As(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: n, group: r, depth: i }) => {
|
|
1740
1768
|
if (r) {
|
|
1741
1769
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped());
|
|
1742
1770
|
return {
|
|
1743
1771
|
kind: "group",
|
|
1744
1772
|
level: i,
|
|
1745
1773
|
cells: t.map((t, r) => {
|
|
1746
|
-
if (r === 0) return
|
|
1774
|
+
if (r === 0) return js(n);
|
|
1747
1775
|
if (!t.aggregate) return null;
|
|
1748
|
-
let i = Ke(e.map((e) =>
|
|
1749
|
-
return typeof i == "number" ? i :
|
|
1776
|
+
let i = Ke(e.map((e) => Tr(t, e.original)), t.aggregate);
|
|
1777
|
+
return typeof i == "number" ? i : Nt(i);
|
|
1750
1778
|
})
|
|
1751
1779
|
};
|
|
1752
1780
|
}
|
|
@@ -1755,191 +1783,193 @@ var jn = On({
|
|
|
1755
1783
|
cells: t.map((e) => {
|
|
1756
1784
|
if (e.exportValue) {
|
|
1757
1785
|
let t = e.exportValue(n.original);
|
|
1758
|
-
return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } :
|
|
1786
|
+
return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } : Nt(t);
|
|
1759
1787
|
}
|
|
1760
|
-
return
|
|
1788
|
+
return Ns(n.getValue(e.id), e, n.original);
|
|
1761
1789
|
})
|
|
1762
1790
|
};
|
|
1763
1791
|
});
|
|
1764
1792
|
if (e.totals !== !1 && t.some((e) => e.aggregate || e.footer)) {
|
|
1765
|
-
let e =
|
|
1793
|
+
let e = K.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()), r = t.map((t) => {
|
|
1766
1794
|
if (t.footer !== void 0) return t.footer;
|
|
1767
1795
|
if (!t.aggregate) return null;
|
|
1768
|
-
let n = Ke(e.map((e) =>
|
|
1769
|
-
return typeof n == "number" ? n :
|
|
1796
|
+
let n = Ke(e.map((e) => Tr(t, e.original)), t.aggregate);
|
|
1797
|
+
return typeof n == "number" ? n : Nt(n);
|
|
1770
1798
|
});
|
|
1771
|
-
r[0] === null && (r[0] =
|
|
1799
|
+
r[0] === null && (r[0] = L.total), n.push({
|
|
1772
1800
|
kind: "total",
|
|
1773
1801
|
cells: r
|
|
1774
1802
|
});
|
|
1775
1803
|
}
|
|
1776
|
-
return
|
|
1777
|
-
name: e.sheetName ??
|
|
1804
|
+
return tt({
|
|
1805
|
+
name: e.sheetName ?? C.caption,
|
|
1778
1806
|
columns: t.map((e) => ({ header: e.exportHeader ?? e.header })),
|
|
1779
1807
|
rows: n
|
|
1780
1808
|
});
|
|
1781
1809
|
}
|
|
1782
|
-
function
|
|
1783
|
-
|
|
1810
|
+
function Fs(e = {}) {
|
|
1811
|
+
st(`${e.filename ?? C.exportFilename ?? "export"}.xlsx`, Ps(e));
|
|
1784
1812
|
}
|
|
1785
|
-
function
|
|
1786
|
-
e === "xlsx" ?
|
|
1813
|
+
function Is(e, t) {
|
|
1814
|
+
e === "xlsx" ? Fs({ selectionOnly: t }) : ks(t);
|
|
1787
1815
|
}
|
|
1788
|
-
function
|
|
1789
|
-
let t = Y.value.map((e) =>
|
|
1816
|
+
function Ls(e = {}) {
|
|
1817
|
+
let t = Y.value.map((e) => z.value.get(e.id)), n = vi.value.map((e) => e.map((e) => ({
|
|
1790
1818
|
text: X(e.header.column),
|
|
1791
1819
|
colSpan: e.group ? e.header.colSpan : 1,
|
|
1792
1820
|
rowSpan: e.rowSpan,
|
|
1793
|
-
align: e.group ? void 0 :
|
|
1794
|
-
}))), r =
|
|
1821
|
+
align: e.group ? void 0 : z.value.get(e.header.column.id)?.align
|
|
1822
|
+
}))), r = As(e.selectionOnly).map(({ row: e, group: n }) => n ? {
|
|
1795
1823
|
kind: "group",
|
|
1796
1824
|
cells: [{
|
|
1797
|
-
text:
|
|
1825
|
+
text: js(e),
|
|
1798
1826
|
colSpan: t.length
|
|
1799
1827
|
}]
|
|
1800
1828
|
} : { cells: t.map((t) => ({
|
|
1801
|
-
text:
|
|
1829
|
+
text: es(e, t.id),
|
|
1802
1830
|
align: t.align
|
|
1803
|
-
})) }), i =
|
|
1804
|
-
text:
|
|
1831
|
+
})) }), i = xa.value ? t.map((e) => ({
|
|
1832
|
+
text: wa(e),
|
|
1805
1833
|
align: e.align
|
|
1806
1834
|
})) : void 0;
|
|
1807
|
-
|
|
1808
|
-
title: e.title ??
|
|
1809
|
-
caption:
|
|
1810
|
-
lang:
|
|
1811
|
-
dir: getComputedStyle(
|
|
1835
|
+
Ut(Wt({
|
|
1836
|
+
title: e.title ?? C.caption,
|
|
1837
|
+
caption: C.caption,
|
|
1838
|
+
lang: S.value.locale,
|
|
1839
|
+
dir: getComputedStyle(ho.value ?? document.body).direction === "rtl" ? "rtl" : "ltr",
|
|
1812
1840
|
head: n,
|
|
1813
1841
|
body: r,
|
|
1814
1842
|
foot: i
|
|
1815
1843
|
}));
|
|
1816
1844
|
}
|
|
1817
|
-
async function
|
|
1818
|
-
await
|
|
1845
|
+
async function Rs() {
|
|
1846
|
+
await gn?.refresh();
|
|
1819
1847
|
}
|
|
1820
|
-
let
|
|
1821
|
-
let e = !!
|
|
1848
|
+
let zs = h(() => C.exportFormats?.length ? C.exportFormats : ["csv"]), Bs = h(() => {
|
|
1849
|
+
let e = !!C.selectable && Js.value > 0, t = zs.value;
|
|
1822
1850
|
return t.length === 1 && t[0] === "csv" ? e ? [{
|
|
1823
1851
|
value: "all",
|
|
1824
|
-
label:
|
|
1852
|
+
label: L.exportAll
|
|
1825
1853
|
}, {
|
|
1826
1854
|
value: "selection",
|
|
1827
|
-
label:
|
|
1855
|
+
label: L.exportSelection
|
|
1828
1856
|
}] : [] : t.flatMap((n) => e ? [{
|
|
1829
1857
|
value: `${n}:all`,
|
|
1830
|
-
label:
|
|
1858
|
+
label: L.exportAs(n, !1)
|
|
1831
1859
|
}, {
|
|
1832
1860
|
value: `${n}:selection`,
|
|
1833
|
-
label:
|
|
1861
|
+
label: L.exportAs(n, !0)
|
|
1834
1862
|
}] : t.length > 1 ? [{
|
|
1835
1863
|
value: `${n}:all`,
|
|
1836
|
-
label:
|
|
1864
|
+
label: L.exportAs(n, !1)
|
|
1837
1865
|
}] : []);
|
|
1838
|
-
}),
|
|
1839
|
-
function
|
|
1866
|
+
}), Vs = h(() => zs.value.length > 1 ? L.exportMenu : zs.value[0] === "xlsx" ? L.exportXlsx : L.export);
|
|
1867
|
+
function Hs(e) {
|
|
1840
1868
|
let [t, n] = e.includes(":") ? e.split(":") : ["csv", e];
|
|
1841
|
-
|
|
1869
|
+
Is(t, n === "selection");
|
|
1842
1870
|
}
|
|
1843
|
-
let
|
|
1844
|
-
if (!
|
|
1845
|
-
let e =
|
|
1846
|
-
return
|
|
1871
|
+
let Us = (e) => e.columns ? e.columns.flatMap(Us) : [e.id], Ws = h(() => {
|
|
1872
|
+
if (!En.value.some((e) => e.columns)) return;
|
|
1873
|
+
let e = K.getAllLeafColumns(), t = (t) => e.findIndex((e) => e.id === t);
|
|
1874
|
+
return En.value.map((n) => ({
|
|
1847
1875
|
def: n,
|
|
1848
|
-
leaves:
|
|
1876
|
+
leaves: Us(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
|
|
1849
1877
|
})).sort((e, n) => t(e.leaves[0]?.id ?? "") - t(n.leaves[0]?.id ?? ""));
|
|
1850
|
-
}),
|
|
1878
|
+
}), Gs = h(() => Ws.value ?? [{
|
|
1851
1879
|
def: void 0,
|
|
1852
|
-
leaves:
|
|
1880
|
+
leaves: K.getAllLeafColumns()
|
|
1853
1881
|
}]);
|
|
1854
|
-
function
|
|
1855
|
-
|
|
1856
|
-
...
|
|
1882
|
+
function Ks(e, t) {
|
|
1883
|
+
K.setColumnVisibility({
|
|
1884
|
+
...Pr.value,
|
|
1857
1885
|
...Object.fromEntries(e.filter((e) => e.getCanHide()).map((e) => [e.id, t]))
|
|
1858
1886
|
});
|
|
1859
1887
|
}
|
|
1860
|
-
function
|
|
1861
|
-
let n =
|
|
1888
|
+
function qs(e, t) {
|
|
1889
|
+
let n = En.value.map((e) => ({
|
|
1862
1890
|
id: e.id,
|
|
1863
|
-
leaves:
|
|
1864
|
-
})), r =
|
|
1891
|
+
leaves: Us(e)
|
|
1892
|
+
})), r = Mt(K.getAllLeafColumns().map((e) => e.id), n, e, t);
|
|
1865
1893
|
if (!r) return;
|
|
1866
|
-
|
|
1894
|
+
K.setColumnOrder(r);
|
|
1867
1895
|
let i = (e) => r.indexOf(n.find((t) => t.id === e).leaves[0]), a = n.map((e) => e.id).sort((e, t) => i(e) - i(t));
|
|
1868
|
-
|
|
1869
|
-
}
|
|
1870
|
-
let
|
|
1871
|
-
async function
|
|
1872
|
-
if (
|
|
1873
|
-
else
|
|
1874
|
-
|
|
1875
|
-
}
|
|
1876
|
-
function
|
|
1877
|
-
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
let
|
|
1881
|
-
count:
|
|
1882
|
-
getScrollElement: () =>
|
|
1883
|
-
estimateSize: () =>
|
|
1896
|
+
wi(L.columnMoved(z.value.get(e)?.header ?? e, a.indexOf(e) + 1, a.length));
|
|
1897
|
+
}
|
|
1898
|
+
let Js = h(() => ea.value && Ar.value ? Math.max(0, (On.value ?? Tn.value.length) - Ar.value.except.length) : Object.values(kr.value).filter(Boolean).length), Ys = [];
|
|
1899
|
+
async function Xs() {
|
|
1900
|
+
if (Qr.value = !Qr.value, await w(), Qr.value) for (let e of document.body.children) e !== ho.value && e instanceof HTMLElement && !e.inert && (e.inert = !0, Ys.push(e));
|
|
1901
|
+
else Ys.splice(0).forEach((e) => e.inert = !1);
|
|
1902
|
+
ho.value?.querySelector("[data-fullscreen-toggle]")?.focus();
|
|
1903
|
+
}
|
|
1904
|
+
function Zs(e) {
|
|
1905
|
+
Qr.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), Xs());
|
|
1906
|
+
}
|
|
1907
|
+
le(() => Ys.splice(0).forEach((e) => e.inert = !1));
|
|
1908
|
+
let Qs = ve("scroll"), $s = Et.useVirtualizer?.(h(() => ({
|
|
1909
|
+
count: C.virtual && C.scrollHeight ? Z.value.length : 0,
|
|
1910
|
+
getScrollElement: () => Qs.value,
|
|
1911
|
+
estimateSize: () => C.rowHeight,
|
|
1884
1912
|
overscan: 8,
|
|
1885
1913
|
getItemKey: (e) => Z.value[e]?.key ?? e,
|
|
1886
1914
|
initialRect: {
|
|
1887
1915
|
width: 0,
|
|
1888
|
-
height: Number.parseInt(
|
|
1916
|
+
height: Number.parseInt(C.scrollHeight ?? "", 10) || 400
|
|
1889
1917
|
}
|
|
1890
|
-
})))
|
|
1918
|
+
})));
|
|
1919
|
+
C.virtual && !$s && sn("DataTable: `virtual` needs the feature virtualRows from @wirecore/wirelayer-vue/virtual (`:features=\"[virtualRows]\"`) – all rows are rendered");
|
|
1920
|
+
let $ = h(() => !!C.virtual && !!C.scrollHeight && !!$s), ec = h(() => $.value ? $s?.value.getVirtualItems() ?? [] : []), tc = h(() => $.value ? ec.value.map((e) => ({
|
|
1891
1921
|
...Z.value[e.index],
|
|
1892
1922
|
index: e.index
|
|
1893
1923
|
})) : Z.value.map((e, t) => ({
|
|
1894
1924
|
...e,
|
|
1895
1925
|
index: t
|
|
1896
|
-
}))),
|
|
1897
|
-
$.value && e instanceof Element &&
|
|
1898
|
-
},
|
|
1899
|
-
|
|
1900
|
-
function
|
|
1926
|
+
}))), nc = h(() => $.value ? ec.value[0]?.start ?? 0 : 0), rc = h(() => $.value ? ($s?.value.getTotalSize() ?? 0) - (ec.value.at(-1)?.end ?? 0) : 0), ic = (e) => {
|
|
1927
|
+
$.value && e instanceof Element && $s?.value.measureElement(e);
|
|
1928
|
+
}, ac = !1;
|
|
1929
|
+
N(() => Tn.value.length, () => ac = !1);
|
|
1930
|
+
function oc(e) {
|
|
1901
1931
|
let t = e.currentTarget;
|
|
1902
|
-
|
|
1903
|
-
}
|
|
1904
|
-
let
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
}),
|
|
1908
|
-
let
|
|
1909
|
-
|
|
1910
|
-
function
|
|
1932
|
+
ac || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (ac = !0, F("loadMore"), F("scrollEnd"));
|
|
1933
|
+
}
|
|
1934
|
+
let sc = O(0), cc, lc = ve("head");
|
|
1935
|
+
ue(() => {
|
|
1936
|
+
lc.value && typeof ResizeObserver < "u" && (cc = new ResizeObserver(() => sc.value = lc.value?.offsetHeight ?? 0), cc.observe(lc.value));
|
|
1937
|
+
}), le(() => cc?.disconnect());
|
|
1938
|
+
let uc = ve("tableElement"), dc = () => q.value && uc.value && $t(uc.value);
|
|
1939
|
+
ue(dc), de(dc);
|
|
1940
|
+
function fc(e) {
|
|
1911
1941
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return !1;
|
|
1912
1942
|
let t = e.target, n = t.closest("td"), r = n?.parentElement?.dataset.rowId;
|
|
1913
|
-
if (!n || !r || n.cellIndex !==
|
|
1914
|
-
let i =
|
|
1943
|
+
if (!n || !r || n.cellIndex !== ai.value.length || t.closest(Sr)) return !1;
|
|
1944
|
+
let i = K.getRow(r, !0);
|
|
1915
1945
|
if (!i) return !1;
|
|
1916
|
-
let a = getComputedStyle(
|
|
1946
|
+
let a = getComputedStyle(uc.value).direction === "rtl", o = {
|
|
1917
1947
|
expandable: i.getCanExpand(),
|
|
1918
1948
|
expanded: i.getIsExpanded(),
|
|
1919
1949
|
level: i.depth + 1
|
|
1920
|
-
}, s =
|
|
1950
|
+
}, s = an(e.key, o, a);
|
|
1921
1951
|
if (!s) return !1;
|
|
1922
1952
|
if (e.preventDefault(), s === "parent") {
|
|
1923
1953
|
let e = i.getParentRow();
|
|
1924
|
-
|
|
1954
|
+
uc.value?.querySelector(`tr[data-row-id="${CSS.escape(e?.id ?? "")}"] > td:nth-child(${ai.value.length + 1})`)?.focus();
|
|
1925
1955
|
} else i.toggleExpanded(s === "expand");
|
|
1926
1956
|
return !0;
|
|
1927
1957
|
}
|
|
1928
|
-
function
|
|
1929
|
-
|
|
1958
|
+
function pc(e) {
|
|
1959
|
+
q.value && uc.value && ($r.value && fc(e) || mt(e, uc.value, {
|
|
1930
1960
|
itemCount: Z.value.length,
|
|
1931
|
-
scrollToItem: $.value ? (e) =>
|
|
1932
|
-
pageRows:
|
|
1961
|
+
scrollToItem: $.value ? (e) => $s?.value.scrollToIndex(e) : void 0,
|
|
1962
|
+
pageRows: Qs.value && C.scrollHeight ? Math.max(1, Math.floor(Qs.value.clientHeight / C.rowHeight) - 1) : 10,
|
|
1933
1963
|
onSelectRow: (e) => {
|
|
1934
|
-
let t =
|
|
1935
|
-
t?.getCanSelect() &&
|
|
1964
|
+
let t = K.getRow(e, !0);
|
|
1965
|
+
t?.getCanSelect() && ca(t, !$i.value || !ta(t));
|
|
1936
1966
|
}
|
|
1937
1967
|
}));
|
|
1938
1968
|
}
|
|
1939
|
-
function
|
|
1940
|
-
|
|
1969
|
+
function mc(e) {
|
|
1970
|
+
q.value && uc.value && pt(uc.value, e.target);
|
|
1941
1971
|
let t = e.target, n = t.closest("tr")?.dataset.rowId, r = t.dataset.columnId;
|
|
1942
|
-
|
|
1972
|
+
C.cellSelection && q.value && !Go && !Ko && n && r && t.matches("td") && Wo({
|
|
1943
1973
|
anchor: {
|
|
1944
1974
|
rowId: n,
|
|
1945
1975
|
columnId: r
|
|
@@ -1950,217 +1980,217 @@ var jn = On({
|
|
|
1950
1980
|
}
|
|
1951
1981
|
});
|
|
1952
1982
|
}
|
|
1953
|
-
function
|
|
1954
|
-
|
|
1955
|
-
}
|
|
1956
|
-
let
|
|
1957
|
-
sorting:
|
|
1958
|
-
filters:
|
|
1959
|
-
globalFilter:
|
|
1960
|
-
page:
|
|
1961
|
-
pageSize:
|
|
1962
|
-
columnSizing:
|
|
1963
|
-
columnOrder:
|
|
1964
|
-
hiddenColumns: Object.keys(
|
|
1965
|
-
pinnedColumns:
|
|
1966
|
-
expanded:
|
|
1967
|
-
selection: Object.keys(
|
|
1968
|
-
density:
|
|
1983
|
+
function hc(e) {
|
|
1984
|
+
os(e) || $o(e) || pc(e);
|
|
1985
|
+
}
|
|
1986
|
+
let gc = h(() => ({
|
|
1987
|
+
sorting: V.value,
|
|
1988
|
+
filters: tn(Nr.value),
|
|
1989
|
+
globalFilter: W.value,
|
|
1990
|
+
page: H.value.pageIndex + 1,
|
|
1991
|
+
pageSize: H.value.pageSize,
|
|
1992
|
+
columnSizing: Lr.value,
|
|
1993
|
+
columnOrder: Fr.value,
|
|
1994
|
+
hiddenColumns: Object.keys(Pr.value).filter((e) => Pr.value[e] === !1),
|
|
1995
|
+
pinnedColumns: Ir.value,
|
|
1996
|
+
expanded: Mr.value === !0 ? [] : Object.keys(Mr.value).filter((e) => Mr.value[e]),
|
|
1997
|
+
selection: Object.keys(kr.value).filter((e) => kr.value[e]),
|
|
1998
|
+
density: Rr.value
|
|
1969
1999
|
}));
|
|
1970
|
-
|
|
1971
|
-
if (!
|
|
1972
|
-
let e =
|
|
1973
|
-
e && (e.sorting &&
|
|
2000
|
+
ue(() => {
|
|
2001
|
+
if (!C.stateKey) return;
|
|
2002
|
+
let e = Ct(C.stateKey, C.stateStorage);
|
|
2003
|
+
e && (e.sorting && Ur(e.sorting), e.filters && K.setColumnFilters(cn(e.filters)), e.globalFilter !== void 0 && K.setGlobalFilter(e.globalFilter), e.columnSizing && (Lr.value = e.columnSizing), e.columnOrder && K.setColumnOrder(e.columnOrder), e.hiddenColumns && K.setColumnVisibility(ln(e.hiddenColumns, !1)), e.pinnedColumns && K.setColumnPinning(e.pinnedColumns), e.expanded && e.expanded.length && Yr(ln(e.expanded)), e.selection && Kr(un(e.selection)), e.density && Xr(e.density), (e.page || e.pageSize) && Wr({
|
|
1974
2004
|
pageIndex: (e.page ?? 1) - 1,
|
|
1975
|
-
pageSize: e.pageSize ??
|
|
1976
|
-
})),
|
|
2005
|
+
pageSize: e.pageSize ?? H.value.pageSize
|
|
2006
|
+
})), N(gc, (e) => Qt(C.stateKey, e, C.stateStorage), { deep: !0 });
|
|
1977
2007
|
});
|
|
1978
|
-
function
|
|
1979
|
-
|
|
2008
|
+
function _c() {
|
|
2009
|
+
C.stateKey && Xe(C.stateKey, C.stateStorage);
|
|
1980
2010
|
}
|
|
1981
|
-
let
|
|
2011
|
+
let vc = h(() => !!C.pageSize), yc = h(() => Dn.value ? On.value ?? Tn.value.length : K.getPrePaginatedRowModel().rows.length), bc = h(() => (C.pageSizeOptions ?? []).map((e) => ({
|
|
1982
2012
|
value: String(e),
|
|
1983
2013
|
label: String(e)
|
|
1984
|
-
}))),
|
|
1985
|
-
if (!
|
|
1986
|
-
let e =
|
|
2014
|
+
}))), xc = h(() => !!C.find || !!C.search || !!C.columnToggle || !!C.exportFilename || !!C.densityToggle || !!C.fullscreenToggle || !!C.filterToggle || wn.value || !!I.toolbar || !!I.toolbarStart || !!I.toolbarEnd), Sc = h(() => C.highlightSearch ? W.value : ""), Cc = h(() => us.value ? cs.value.trim() : Sc.value), wc = h(() => Ci.value ? Ci.value : C.dataSource ? kn.value ? "" : rt(hn.value, l, S.value.locale) : Ui.value ? L.results(K.getFilteredRowModel().rows.length) : ""), Tc = h(() => An.value && C.loadingVariant === "skeleton"), Ec = h(() => Math.min(Z.value.length || C.pageSize || 5, 50)), Dc = h(() => Ui.value && (Dn.value || Tn.value.length > 0) && (!!I.noResults || C.noResultsText !== void 0)), Oc = h(() => {
|
|
2015
|
+
if (!C.statusBar) return [];
|
|
2016
|
+
let e = K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
1987
2017
|
return e.length ? Y.value.flatMap((t) => {
|
|
1988
|
-
let n =
|
|
2018
|
+
let n = z.value.get(t.id), r = It(e.map((e) => Tr(n, e.original)));
|
|
1989
2019
|
if (!r) return [];
|
|
1990
2020
|
let i = e[0].original;
|
|
1991
2021
|
return [{
|
|
1992
2022
|
id: t.id,
|
|
1993
|
-
text: `${n.header}: ${
|
|
2023
|
+
text: `${n.header}: ${L.aggregates.sum(Sa(n, r.sum, i))} · ${L.aggregates.avg(Sa(n, r.avg, i))}`
|
|
1994
2024
|
}];
|
|
1995
2025
|
}) : [];
|
|
1996
|
-
}),
|
|
1997
|
-
page:
|
|
1998
|
-
pageSize:
|
|
1999
|
-
sorting:
|
|
2026
|
+
}), kc = h(() => Dn.value ? On.value ?? Tn.value.length : K.getCoreRowModel().rows.length), Ac = h(() => ({
|
|
2027
|
+
page: H.value.pageIndex + 1,
|
|
2028
|
+
pageSize: C.pageSize ? H.value.pageSize : 0,
|
|
2029
|
+
sorting: V.value.map((e) => ({
|
|
2000
2030
|
id: e.id,
|
|
2001
2031
|
desc: e.desc
|
|
2002
2032
|
})),
|
|
2003
|
-
filters:
|
|
2004
|
-
search:
|
|
2005
|
-
groupBy:
|
|
2006
|
-
...
|
|
2007
|
-
})),
|
|
2008
|
-
...
|
|
2033
|
+
filters: tn(Nr.value),
|
|
2034
|
+
search: W.value,
|
|
2035
|
+
groupBy: U.value,
|
|
2036
|
+
...Sn.value ? { condition: yn.value } : {}
|
|
2037
|
+
})), jc = h(() => Gt(Ac.value)), Mc = h(() => Gt({
|
|
2038
|
+
...Ac.value,
|
|
2009
2039
|
page: void 0,
|
|
2010
2040
|
pageSize: void 0
|
|
2011
|
-
})),
|
|
2012
|
-
function
|
|
2013
|
-
let r =
|
|
2041
|
+
})), Nc = W.value;
|
|
2042
|
+
function Pc(e, t, n) {
|
|
2043
|
+
let r = _n();
|
|
2014
2044
|
if (!r) return;
|
|
2015
|
-
if (n !== void 0 && n !== t &&
|
|
2016
|
-
|
|
2017
|
-
...
|
|
2045
|
+
if (n !== void 0 && n !== t && H.value.pageIndex !== 0) {
|
|
2046
|
+
Wr({
|
|
2047
|
+
...H.value,
|
|
2018
2048
|
pageIndex: 0
|
|
2019
2049
|
});
|
|
2020
2050
|
return;
|
|
2021
2051
|
}
|
|
2022
|
-
let i =
|
|
2023
|
-
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
() => !!
|
|
2029
|
-
], ([e, t], [, n]) =>
|
|
2030
|
-
exportCsv:
|
|
2031
|
-
generateCsv:
|
|
2032
|
-
clearState:
|
|
2033
|
-
exportXlsx:
|
|
2034
|
-
generateXlsx:
|
|
2035
|
-
print:
|
|
2036
|
-
refresh:
|
|
2037
|
-
undo:
|
|
2038
|
-
redo:
|
|
2052
|
+
let i = Nc !== W.value;
|
|
2053
|
+
Nc = W.value, r.load(JSON.parse(e), { debounce: i });
|
|
2054
|
+
}
|
|
2055
|
+
ue(() => Pc(jc.value, Mc.value, void 0)), N([
|
|
2056
|
+
jc,
|
|
2057
|
+
Mc,
|
|
2058
|
+
() => !!C.dataSource
|
|
2059
|
+
], ([e, t], [, n]) => Pc(e, t, n)), o({
|
|
2060
|
+
exportCsv: ks,
|
|
2061
|
+
generateCsv: Os,
|
|
2062
|
+
clearState: _c,
|
|
2063
|
+
exportXlsx: Fs,
|
|
2064
|
+
generateXlsx: Ps,
|
|
2065
|
+
print: Ls,
|
|
2066
|
+
refresh: Rs,
|
|
2067
|
+
undo: io,
|
|
2068
|
+
redo: ao
|
|
2039
2069
|
});
|
|
2040
|
-
let
|
|
2070
|
+
let Fc = {
|
|
2041
2071
|
placement: "bottom-end",
|
|
2042
2072
|
gutter: 4
|
|
2043
2073
|
};
|
|
2044
|
-
return (e, t) => (
|
|
2074
|
+
return (e, t) => (D(), g(ae, {
|
|
2045
2075
|
to: "body",
|
|
2046
|
-
disabled: !
|
|
2047
|
-
}, [
|
|
2076
|
+
disabled: !Qr.value
|
|
2077
|
+
}, [y("div", ce({
|
|
2048
2078
|
ref_key: "root",
|
|
2049
|
-
ref:
|
|
2079
|
+
ref: ho
|
|
2050
2080
|
}, {
|
|
2051
|
-
...
|
|
2052
|
-
class:
|
|
2081
|
+
...M($e),
|
|
2082
|
+
class: J.value.base({ class: T(M($e).class) })
|
|
2053
2083
|
}, {
|
|
2054
|
-
role:
|
|
2055
|
-
"aria-modal":
|
|
2056
|
-
"aria-label":
|
|
2057
|
-
onKeydown:
|
|
2084
|
+
role: Qr.value ? "dialog" : void 0,
|
|
2085
|
+
"aria-modal": Qr.value || void 0,
|
|
2086
|
+
"aria-label": Qr.value ? a.caption : void 0,
|
|
2087
|
+
onKeydown: Zs
|
|
2058
2088
|
}), [
|
|
2059
|
-
|
|
2089
|
+
xc.value ? (D(), v("div", {
|
|
2060
2090
|
key: 0,
|
|
2061
|
-
class:
|
|
2091
|
+
class: T(J.value.toolbar())
|
|
2062
2092
|
}, [
|
|
2063
|
-
|
|
2064
|
-
a.search ? (
|
|
2093
|
+
A(e.$slots, "toolbarStart"),
|
|
2094
|
+
a.search ? (D(), g(p, {
|
|
2065
2095
|
key: 0,
|
|
2066
2096
|
type: "search",
|
|
2067
2097
|
size: "sm",
|
|
2068
|
-
"leading-icon":
|
|
2069
|
-
class:
|
|
2070
|
-
placeholder:
|
|
2071
|
-
"aria-label":
|
|
2072
|
-
"model-value":
|
|
2073
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
2098
|
+
"leading-icon": M(Ve),
|
|
2099
|
+
class: T(J.value.search()),
|
|
2100
|
+
placeholder: M(L).searchPlaceholder,
|
|
2101
|
+
"aria-label": M(L).search(a.caption),
|
|
2102
|
+
"model-value": W.value,
|
|
2103
|
+
"onUpdate:modelValue": t[0] ||= (e) => M(K).setGlobalFilter(e ?? "")
|
|
2074
2104
|
}, null, 8, [
|
|
2075
2105
|
"leading-icon",
|
|
2076
2106
|
"class",
|
|
2077
2107
|
"placeholder",
|
|
2078
2108
|
"aria-label",
|
|
2079
2109
|
"model-value"
|
|
2080
|
-
])) :
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
a.find ? (
|
|
2110
|
+
])) : _("", !0),
|
|
2111
|
+
A(e.$slots, "toolbar"),
|
|
2112
|
+
y("div", { class: T(J.value.toolbarEnd()) }, [
|
|
2113
|
+
A(e.$slots, "toolbarEnd"),
|
|
2114
|
+
a.find ? (D(), g(f, {
|
|
2085
2115
|
key: 0,
|
|
2086
2116
|
"data-find-toggle": "",
|
|
2087
|
-
icon:
|
|
2088
|
-
label:
|
|
2117
|
+
icon: M(He),
|
|
2118
|
+
label: M(L).find,
|
|
2089
2119
|
variant: "outline",
|
|
2090
2120
|
size: "sm",
|
|
2091
|
-
"aria-expanded":
|
|
2092
|
-
onClick:
|
|
2121
|
+
"aria-expanded": ss.value,
|
|
2122
|
+
onClick: vs
|
|
2093
2123
|
}, null, 8, [
|
|
2094
2124
|
"icon",
|
|
2095
2125
|
"label",
|
|
2096
2126
|
"aria-expanded"
|
|
2097
|
-
])) :
|
|
2098
|
-
|
|
2127
|
+
])) : _("", !0),
|
|
2128
|
+
wn.value ? (D(), g(d, {
|
|
2099
2129
|
key: 1,
|
|
2100
2130
|
variant: "outline",
|
|
2101
2131
|
size: "sm",
|
|
2102
|
-
"leading-icon":
|
|
2103
|
-
"aria-expanded":
|
|
2104
|
-
"aria-controls": `${
|
|
2105
|
-
onClick: t[1] ||= (e) =>
|
|
2132
|
+
"leading-icon": M(Pe),
|
|
2133
|
+
"aria-expanded": bn.value,
|
|
2134
|
+
"aria-controls": `${M(ot)}-advanced`,
|
|
2135
|
+
onClick: t[1] ||= (e) => bn.value = !bn.value
|
|
2106
2136
|
}, {
|
|
2107
|
-
default:
|
|
2137
|
+
default: P(() => [b(j(M(l).conditionBuilder.advanced), 1)]),
|
|
2108
2138
|
_: 1
|
|
2109
2139
|
}, 8, [
|
|
2110
2140
|
"leading-icon",
|
|
2111
2141
|
"aria-expanded",
|
|
2112
2142
|
"aria-controls"
|
|
2113
|
-
])) :
|
|
2114
|
-
a.filterToggle ? (
|
|
2143
|
+
])) : _("", !0),
|
|
2144
|
+
a.filterToggle ? (D(), g(f, {
|
|
2115
2145
|
key: 2,
|
|
2116
|
-
icon:
|
|
2117
|
-
label:
|
|
2146
|
+
icon: M(Me),
|
|
2147
|
+
label: M(L).filterToggle,
|
|
2118
2148
|
variant: "outline",
|
|
2119
2149
|
size: "sm",
|
|
2120
|
-
"aria-pressed":
|
|
2121
|
-
onClick:
|
|
2150
|
+
"aria-pressed": jr.value,
|
|
2151
|
+
onClick: Jr
|
|
2122
2152
|
}, null, 8, [
|
|
2123
2153
|
"icon",
|
|
2124
2154
|
"label",
|
|
2125
2155
|
"aria-pressed"
|
|
2126
|
-
])) :
|
|
2127
|
-
a.densityToggle ? (
|
|
2156
|
+
])) : _("", !0),
|
|
2157
|
+
a.densityToggle ? (D(), g(M(R).Root, {
|
|
2128
2158
|
key: 3,
|
|
2129
|
-
positioning:
|
|
2159
|
+
positioning: Fc,
|
|
2130
2160
|
"lazy-mount": "",
|
|
2131
2161
|
"unmount-on-exit": ""
|
|
2132
2162
|
}, {
|
|
2133
|
-
default:
|
|
2134
|
-
default:
|
|
2135
|
-
icon:
|
|
2136
|
-
label:
|
|
2163
|
+
default: P(() => [x(M(R).Trigger, { "as-child": "" }, {
|
|
2164
|
+
default: P(() => [x(f, {
|
|
2165
|
+
icon: M(Be),
|
|
2166
|
+
label: M(L).density,
|
|
2137
2167
|
variant: "outline",
|
|
2138
2168
|
size: "sm"
|
|
2139
2169
|
}, null, 8, ["icon", "label"])]),
|
|
2140
2170
|
_: 1
|
|
2141
|
-
}), (
|
|
2142
|
-
default:
|
|
2143
|
-
default:
|
|
2144
|
-
"model-value":
|
|
2145
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
2171
|
+
}), (D(), g(ae, { to: "body" }, [x(M(R).Positioner, null, {
|
|
2172
|
+
default: P(() => [x(M(R).Content, { class: T(M(ei).content()) }, {
|
|
2173
|
+
default: P(() => [x(M(R).RadioItemGroup, {
|
|
2174
|
+
"model-value": Rr.value,
|
|
2175
|
+
"onUpdate:modelValue": t[2] ||= (e) => Xr(e)
|
|
2146
2176
|
}, {
|
|
2147
|
-
default:
|
|
2177
|
+
default: P(() => [(D(), v(m, null, k([
|
|
2148
2178
|
"sm",
|
|
2149
2179
|
"md",
|
|
2150
2180
|
"lg"
|
|
2151
|
-
], (e) =>
|
|
2181
|
+
], (e) => x(M(R).RadioItem, {
|
|
2152
2182
|
key: e,
|
|
2153
2183
|
value: e,
|
|
2154
|
-
class:
|
|
2184
|
+
class: T(M(ei).item())
|
|
2155
2185
|
}, {
|
|
2156
|
-
default:
|
|
2157
|
-
default:
|
|
2158
|
-
class:
|
|
2186
|
+
default: P(() => [x(M(R).ItemIndicator, null, {
|
|
2187
|
+
default: P(() => [x(M(Ce), {
|
|
2188
|
+
class: T(J.value.menuCheck()),
|
|
2159
2189
|
"aria-hidden": "true"
|
|
2160
2190
|
}, null, 8, ["class"])]),
|
|
2161
2191
|
_: 1
|
|
2162
|
-
}),
|
|
2163
|
-
default:
|
|
2192
|
+
}), x(M(R).ItemText, { class: T(M(ei).label()) }, {
|
|
2193
|
+
default: P(() => [b(j(M(L).densities[e]), 1)]),
|
|
2164
2194
|
_: 2
|
|
2165
2195
|
}, 1032, ["class"])]),
|
|
2166
2196
|
_: 2
|
|
@@ -2172,43 +2202,43 @@ var jn = On({
|
|
|
2172
2202
|
_: 1
|
|
2173
2203
|
})]))]),
|
|
2174
2204
|
_: 1
|
|
2175
|
-
})) :
|
|
2176
|
-
a.columnToggle ? (
|
|
2205
|
+
})) : _("", !0),
|
|
2206
|
+
a.columnToggle ? (D(), g(M(R).Root, {
|
|
2177
2207
|
key: 4,
|
|
2178
|
-
positioning:
|
|
2208
|
+
positioning: Fc,
|
|
2179
2209
|
"lazy-mount": "",
|
|
2180
2210
|
"unmount-on-exit": ""
|
|
2181
2211
|
}, {
|
|
2182
|
-
default:
|
|
2183
|
-
default:
|
|
2212
|
+
default: P(() => [x(M(R).Trigger, { "as-child": "" }, {
|
|
2213
|
+
default: P(() => [x(d, {
|
|
2184
2214
|
variant: "outline",
|
|
2185
2215
|
size: "sm",
|
|
2186
|
-
"leading-icon":
|
|
2216
|
+
"leading-icon": M(ke)
|
|
2187
2217
|
}, {
|
|
2188
|
-
default:
|
|
2218
|
+
default: P(() => [b(j(M(L).columns), 1)]),
|
|
2189
2219
|
_: 1
|
|
2190
2220
|
}, 8, ["leading-icon"])]),
|
|
2191
2221
|
_: 1
|
|
2192
|
-
}), (
|
|
2193
|
-
default:
|
|
2194
|
-
default:
|
|
2195
|
-
e.def?.columns ? (
|
|
2222
|
+
}), (D(), g(ae, { to: "body" }, [x(M(R).Positioner, null, {
|
|
2223
|
+
default: P(() => [x(M(R).Content, { class: T(M(ei).content()) }, {
|
|
2224
|
+
default: P(() => [(D(!0), v(m, null, k(Gs.value, (e, t) => (D(), v(m, { key: e.def ? `group:${e.def.id}` : "columns" }, [
|
|
2225
|
+
e.def?.columns ? (D(), g(M(R).CheckboxItem, {
|
|
2196
2226
|
key: 0,
|
|
2197
2227
|
value: `group:${e.def.id}`,
|
|
2198
2228
|
checked: e.leaves.filter((e) => e.getCanHide()).every((e) => e.getIsVisible()),
|
|
2199
2229
|
disabled: !e.leaves.some((e) => e.getCanHide()),
|
|
2200
2230
|
"close-on-select": !1,
|
|
2201
|
-
class:
|
|
2202
|
-
"onUpdate:checked": (t) =>
|
|
2231
|
+
class: T(M(ei).item()),
|
|
2232
|
+
"onUpdate:checked": (t) => Ks(e.leaves, t)
|
|
2203
2233
|
}, {
|
|
2204
|
-
default:
|
|
2205
|
-
default:
|
|
2206
|
-
class:
|
|
2234
|
+
default: P(() => [x(M(R).ItemIndicator, null, {
|
|
2235
|
+
default: P(() => [x(M(Ce), {
|
|
2236
|
+
class: T(J.value.menuCheck()),
|
|
2207
2237
|
"aria-hidden": "true"
|
|
2208
2238
|
}, null, 8, ["class"])]),
|
|
2209
2239
|
_: 1
|
|
2210
|
-
}),
|
|
2211
|
-
default:
|
|
2240
|
+
}), x(M(R).ItemText, { class: T(M(ei).label()) }, {
|
|
2241
|
+
default: P(() => [b(j(e.def.header), 1)]),
|
|
2212
2242
|
_: 2
|
|
2213
2243
|
}, 1032, ["class"])]),
|
|
2214
2244
|
_: 2
|
|
@@ -2218,23 +2248,23 @@ var jn = On({
|
|
|
2218
2248
|
"disabled",
|
|
2219
2249
|
"class",
|
|
2220
2250
|
"onUpdate:checked"
|
|
2221
|
-
])) :
|
|
2222
|
-
(
|
|
2251
|
+
])) : _("", !0),
|
|
2252
|
+
(D(!0), v(m, null, k(e.leaves.filter((e) => e.getCanHide()), (t) => (D(), g(M(R).CheckboxItem, {
|
|
2223
2253
|
key: t.id,
|
|
2224
2254
|
value: t.id,
|
|
2225
2255
|
checked: t.getIsVisible(),
|
|
2226
2256
|
"close-on-select": !1,
|
|
2227
|
-
class:
|
|
2257
|
+
class: T(M(ei).item(e.def?.columns ? { class: J.value.columnGroupItem() } : {})),
|
|
2228
2258
|
"onUpdate:checked": (e) => t.toggleVisibility(e)
|
|
2229
2259
|
}, {
|
|
2230
|
-
default:
|
|
2231
|
-
default:
|
|
2232
|
-
class:
|
|
2260
|
+
default: P(() => [x(M(R).ItemIndicator, null, {
|
|
2261
|
+
default: P(() => [x(M(Ce), {
|
|
2262
|
+
class: T(J.value.menuCheck()),
|
|
2233
2263
|
"aria-hidden": "true"
|
|
2234
2264
|
}, null, 8, ["class"])]),
|
|
2235
2265
|
_: 1
|
|
2236
|
-
}),
|
|
2237
|
-
default:
|
|
2266
|
+
}), x(M(R).ItemText, { class: T(M(ei).label()) }, {
|
|
2267
|
+
default: P(() => [b(j(X(t)), 1)]),
|
|
2238
2268
|
_: 2
|
|
2239
2269
|
}, 1032, ["class"])]),
|
|
2240
2270
|
_: 2
|
|
@@ -2244,16 +2274,16 @@ var jn = On({
|
|
|
2244
2274
|
"class",
|
|
2245
2275
|
"onUpdate:checked"
|
|
2246
2276
|
]))), 128)),
|
|
2247
|
-
e.def?.columns && a.reorderableColumns ? (
|
|
2277
|
+
e.def?.columns && a.reorderableColumns ? (D(), v(m, { key: 1 }, k([-1, 1], (n) => x(M(R).Item, {
|
|
2248
2278
|
key: n,
|
|
2249
2279
|
value: `group-${n < 0 ? "earlier" : "later"}:${e.def.id}`,
|
|
2250
|
-
disabled: n < 0 ? t === 0 : t ===
|
|
2280
|
+
disabled: n < 0 ? t === 0 : t === Gs.value.length - 1,
|
|
2251
2281
|
"close-on-select": !1,
|
|
2252
|
-
class:
|
|
2253
|
-
onSelect: (t) =>
|
|
2282
|
+
class: T(M(ei).item({ class: J.value.columnGroupItem() })),
|
|
2283
|
+
onSelect: (t) => qs(e.def.id, n)
|
|
2254
2284
|
}, {
|
|
2255
|
-
default:
|
|
2256
|
-
default:
|
|
2285
|
+
default: P(() => [x(M(R).ItemText, { class: T(M(ei).label()) }, {
|
|
2286
|
+
default: P(() => [b(j(n < 0 ? M(L).columnGroupEarlier(e.def.header) : M(L).columnGroupLater(e.def.header)), 1)]),
|
|
2257
2287
|
_: 2
|
|
2258
2288
|
}, 1032, ["class"])]),
|
|
2259
2289
|
_: 2
|
|
@@ -2262,76 +2292,76 @@ var jn = On({
|
|
|
2262
2292
|
"disabled",
|
|
2263
2293
|
"class",
|
|
2264
2294
|
"onSelect"
|
|
2265
|
-
])), 64)) :
|
|
2295
|
+
])), 64)) : _("", !0)
|
|
2266
2296
|
], 64))), 128))]),
|
|
2267
2297
|
_: 1
|
|
2268
2298
|
}, 8, ["class"])]),
|
|
2269
2299
|
_: 1
|
|
2270
2300
|
})]))]),
|
|
2271
2301
|
_: 1
|
|
2272
|
-
})) :
|
|
2273
|
-
a.exportFilename ? (
|
|
2302
|
+
})) : _("", !0),
|
|
2303
|
+
a.exportFilename ? (D(), v(m, { key: 5 }, [Bs.value.length > 1 ? (D(), g(u, {
|
|
2274
2304
|
key: 0,
|
|
2275
|
-
items:
|
|
2276
|
-
onSelect:
|
|
2305
|
+
items: Bs.value,
|
|
2306
|
+
onSelect: Hs
|
|
2277
2307
|
}, {
|
|
2278
|
-
default:
|
|
2308
|
+
default: P(() => [x(d, {
|
|
2279
2309
|
variant: "outline",
|
|
2280
2310
|
size: "sm",
|
|
2281
|
-
"leading-icon":
|
|
2311
|
+
"leading-icon": M(Ae)
|
|
2282
2312
|
}, {
|
|
2283
|
-
default:
|
|
2313
|
+
default: P(() => [b(j(Vs.value), 1)]),
|
|
2284
2314
|
_: 1
|
|
2285
2315
|
}, 8, ["leading-icon"])]),
|
|
2286
2316
|
_: 1
|
|
2287
|
-
}, 8, ["items"])) : (
|
|
2317
|
+
}, 8, ["items"])) : (D(), g(d, {
|
|
2288
2318
|
key: 1,
|
|
2289
2319
|
variant: "outline",
|
|
2290
2320
|
size: "sm",
|
|
2291
|
-
"leading-icon":
|
|
2292
|
-
onClick: t[3] ||= (e) =>
|
|
2321
|
+
"leading-icon": M(Ae),
|
|
2322
|
+
onClick: t[3] ||= (e) => Is(zs.value[0], !1)
|
|
2293
2323
|
}, {
|
|
2294
|
-
default:
|
|
2324
|
+
default: P(() => [b(j(Vs.value), 1)]),
|
|
2295
2325
|
_: 1
|
|
2296
|
-
}, 8, ["leading-icon"]))], 64)) :
|
|
2297
|
-
a.fullscreenToggle ? (
|
|
2326
|
+
}, 8, ["leading-icon"]))], 64)) : _("", !0),
|
|
2327
|
+
a.fullscreenToggle ? (D(), g(f, {
|
|
2298
2328
|
key: 6,
|
|
2299
2329
|
"data-fullscreen-toggle": "",
|
|
2300
|
-
icon:
|
|
2301
|
-
label:
|
|
2330
|
+
icon: Qr.value ? M(Ie) : M(Fe),
|
|
2331
|
+
label: Qr.value ? M(L).exitFullscreen : M(L).fullscreen,
|
|
2302
2332
|
variant: "outline",
|
|
2303
2333
|
size: "sm",
|
|
2304
|
-
onClick:
|
|
2305
|
-
}, null, 8, ["icon", "label"])) :
|
|
2334
|
+
onClick: Xs
|
|
2335
|
+
}, null, 8, ["icon", "label"])) : _("", !0)
|
|
2306
2336
|
], 2)
|
|
2307
|
-
], 2)) :
|
|
2308
|
-
|
|
2337
|
+
], 2)) : _("", !0),
|
|
2338
|
+
wn.value && bn.value ? (D(), v("div", {
|
|
2309
2339
|
key: 1,
|
|
2310
|
-
id: `${
|
|
2311
|
-
class:
|
|
2312
|
-
}, [
|
|
2313
|
-
fields:
|
|
2314
|
-
value:
|
|
2315
|
-
setValue:
|
|
2316
|
-
label:
|
|
2317
|
-
})], 10,
|
|
2318
|
-
a.find &&
|
|
2340
|
+
id: `${M(ot)}-advanced`,
|
|
2341
|
+
class: T(J.value.advancedFilter())
|
|
2342
|
+
}, [A(e.$slots, "advancedFilter", {
|
|
2343
|
+
fields: xn.value,
|
|
2344
|
+
value: yn.value,
|
|
2345
|
+
setValue: Cn,
|
|
2346
|
+
label: M(l).conditionBuilder.advanced
|
|
2347
|
+
})], 10, Ln)) : _("", !0),
|
|
2348
|
+
a.find && ss.value ? (D(), v("div", {
|
|
2319
2349
|
key: 2,
|
|
2320
|
-
class:
|
|
2350
|
+
class: T(J.value.findBar()),
|
|
2321
2351
|
role: "search",
|
|
2322
|
-
"aria-label":
|
|
2352
|
+
"aria-label": M(L).find
|
|
2323
2353
|
}, [
|
|
2324
|
-
|
|
2354
|
+
x(p, {
|
|
2325
2355
|
type: "search",
|
|
2326
2356
|
size: "sm",
|
|
2327
2357
|
"data-find-input": "",
|
|
2328
|
-
"leading-icon":
|
|
2329
|
-
class:
|
|
2330
|
-
placeholder:
|
|
2331
|
-
"aria-label":
|
|
2332
|
-
"model-value":
|
|
2333
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
2334
|
-
onKeydown:
|
|
2358
|
+
"leading-icon": M(He),
|
|
2359
|
+
class: T(J.value.findInput()),
|
|
2360
|
+
placeholder: M(L).searchPlaceholder,
|
|
2361
|
+
"aria-label": M(L).find,
|
|
2362
|
+
"model-value": cs.value,
|
|
2363
|
+
"onUpdate:modelValue": t[4] ||= (e) => bs(e ?? ""),
|
|
2364
|
+
onKeydown: ys
|
|
2335
2365
|
}, null, 8, [
|
|
2336
2366
|
"leading-icon",
|
|
2337
2367
|
"class",
|
|
@@ -2339,242 +2369,242 @@ var jn = On({
|
|
|
2339
2369
|
"aria-label",
|
|
2340
2370
|
"model-value"
|
|
2341
2371
|
]),
|
|
2342
|
-
|
|
2343
|
-
class:
|
|
2372
|
+
y("span", {
|
|
2373
|
+
class: T(J.value.findCount()),
|
|
2344
2374
|
"aria-live": "polite"
|
|
2345
|
-
},
|
|
2346
|
-
|
|
2347
|
-
icon:
|
|
2348
|
-
label:
|
|
2375
|
+
}, j(cs.value.trim() ? M(L).findMatches(fs.value.length ? Math.min(ls.value, fs.value.length - 1) + 1 : 0, fs.value.length) : ""), 3),
|
|
2376
|
+
x(f, {
|
|
2377
|
+
icon: M(Ee),
|
|
2378
|
+
label: M(L).findPrevious,
|
|
2349
2379
|
variant: "text",
|
|
2350
2380
|
size: "sm",
|
|
2351
|
-
disabled: !
|
|
2352
|
-
onClick: t[5] ||= (e) =>
|
|
2381
|
+
disabled: !fs.value.length,
|
|
2382
|
+
onClick: t[5] ||= (e) => _s(ls.value - 1)
|
|
2353
2383
|
}, null, 8, [
|
|
2354
2384
|
"icon",
|
|
2355
2385
|
"label",
|
|
2356
2386
|
"disabled"
|
|
2357
2387
|
]),
|
|
2358
|
-
|
|
2359
|
-
icon:
|
|
2360
|
-
label:
|
|
2388
|
+
x(f, {
|
|
2389
|
+
icon: M(we),
|
|
2390
|
+
label: M(L).findNext,
|
|
2361
2391
|
variant: "text",
|
|
2362
2392
|
size: "sm",
|
|
2363
|
-
disabled: !
|
|
2364
|
-
onClick: t[6] ||= (e) =>
|
|
2393
|
+
disabled: !fs.value.length,
|
|
2394
|
+
onClick: t[6] ||= (e) => _s(ls.value + 1)
|
|
2365
2395
|
}, null, 8, [
|
|
2366
2396
|
"icon",
|
|
2367
2397
|
"label",
|
|
2368
2398
|
"disabled"
|
|
2369
2399
|
]),
|
|
2370
|
-
|
|
2371
|
-
icon:
|
|
2372
|
-
label:
|
|
2400
|
+
x(f, {
|
|
2401
|
+
icon: M(We),
|
|
2402
|
+
label: M(L).findClose,
|
|
2373
2403
|
variant: "text",
|
|
2374
2404
|
size: "sm",
|
|
2375
|
-
onClick:
|
|
2405
|
+
onClick: vs
|
|
2376
2406
|
}, null, 8, ["icon", "label"])
|
|
2377
|
-
], 10,
|
|
2378
|
-
a.editMode === "batch" ? (
|
|
2407
|
+
], 10, Rn)) : _("", !0),
|
|
2408
|
+
a.editMode === "batch" ? (D(), v("div", {
|
|
2379
2409
|
key: 3,
|
|
2380
|
-
class:
|
|
2410
|
+
class: T(J.value.batchBar())
|
|
2381
2411
|
}, [
|
|
2382
|
-
|
|
2383
|
-
|
|
2412
|
+
y("span", { class: T(J.value.batchCount()) }, j(M(L).changes(oo.value)), 3),
|
|
2413
|
+
x(d, {
|
|
2384
2414
|
variant: "text",
|
|
2385
2415
|
size: "sm",
|
|
2386
|
-
"leading-icon":
|
|
2387
|
-
disabled: !
|
|
2388
|
-
onClick:
|
|
2416
|
+
"leading-icon": M(Ue),
|
|
2417
|
+
disabled: !to.value,
|
|
2418
|
+
onClick: io
|
|
2389
2419
|
}, {
|
|
2390
|
-
default:
|
|
2420
|
+
default: P(() => [b(j(M(L).undo), 1)]),
|
|
2391
2421
|
_: 1
|
|
2392
2422
|
}, 8, ["leading-icon", "disabled"]),
|
|
2393
|
-
|
|
2423
|
+
x(d, {
|
|
2394
2424
|
variant: "text",
|
|
2395
2425
|
size: "sm",
|
|
2396
|
-
"leading-icon":
|
|
2397
|
-
disabled:
|
|
2398
|
-
onClick:
|
|
2426
|
+
"leading-icon": M(ze),
|
|
2427
|
+
disabled: !no.value,
|
|
2428
|
+
onClick: ao
|
|
2399
2429
|
}, {
|
|
2400
|
-
default:
|
|
2430
|
+
default: P(() => [b(j(M(L).redo), 1)]),
|
|
2401
2431
|
_: 1
|
|
2402
2432
|
}, 8, ["leading-icon", "disabled"]),
|
|
2403
|
-
|
|
2433
|
+
x(d, {
|
|
2404
2434
|
variant: "outline",
|
|
2405
2435
|
size: "sm",
|
|
2406
|
-
disabled: !
|
|
2407
|
-
onClick:
|
|
2436
|
+
disabled: !oo.value,
|
|
2437
|
+
onClick: lo
|
|
2408
2438
|
}, {
|
|
2409
|
-
default:
|
|
2439
|
+
default: P(() => [b(j(M(L).discardChanges), 1)]),
|
|
2410
2440
|
_: 1
|
|
2411
2441
|
}, 8, ["disabled"]),
|
|
2412
|
-
|
|
2442
|
+
x(d, {
|
|
2413
2443
|
size: "sm",
|
|
2414
|
-
disabled: !
|
|
2415
|
-
onClick:
|
|
2444
|
+
disabled: !oo.value,
|
|
2445
|
+
onClick: co
|
|
2416
2446
|
}, {
|
|
2417
|
-
default:
|
|
2447
|
+
default: P(() => [b(j(M(L).saveChanges), 1)]),
|
|
2418
2448
|
_: 1
|
|
2419
2449
|
}, 8, ["disabled"])
|
|
2420
|
-
], 2)) :
|
|
2421
|
-
|
|
2450
|
+
], 2)) : _("", !0),
|
|
2451
|
+
y("p", {
|
|
2422
2452
|
role: "status",
|
|
2423
|
-
class:
|
|
2424
|
-
},
|
|
2425
|
-
|
|
2453
|
+
class: T(J.value.status())
|
|
2454
|
+
}, j(wc.value), 3),
|
|
2455
|
+
vc.value && a.paginatorPosition === "top" ? (D(), v("div", {
|
|
2426
2456
|
key: 4,
|
|
2427
|
-
class:
|
|
2428
|
-
}, [
|
|
2457
|
+
class: T(J.value.footer())
|
|
2458
|
+
}, [bc.value.length ? (D(), v("div", {
|
|
2429
2459
|
key: 0,
|
|
2430
|
-
class:
|
|
2431
|
-
}, [
|
|
2432
|
-
class:
|
|
2433
|
-
"aria-label":
|
|
2434
|
-
items:
|
|
2435
|
-
"model-value": String(
|
|
2436
|
-
"onUpdate:modelValue": t[7] ||= (e) =>
|
|
2460
|
+
class: T(J.value.pageSize())
|
|
2461
|
+
}, [y("span", zn, j(M(L).rowsPerPage), 1), x(ne, {
|
|
2462
|
+
class: T(J.value.pageSizeSelect()),
|
|
2463
|
+
"aria-label": M(L).rowsPerPage,
|
|
2464
|
+
items: bc.value,
|
|
2465
|
+
"model-value": String(H.value.pageSize),
|
|
2466
|
+
"onUpdate:modelValue": t[7] ||= (e) => M(K).setPageSize(Number(e))
|
|
2437
2467
|
}, null, 8, [
|
|
2438
2468
|
"class",
|
|
2439
2469
|
"aria-label",
|
|
2440
2470
|
"items",
|
|
2441
2471
|
"model-value"
|
|
2442
|
-
])], 2)) :
|
|
2443
|
-
count:
|
|
2444
|
-
"page-size":
|
|
2445
|
-
page:
|
|
2446
|
-
translations: { rootLabel: `${a.caption}: ${
|
|
2447
|
-
"onUpdate:page": t[8] ||= (e) =>
|
|
2472
|
+
])], 2)) : _("", !0), x(r, {
|
|
2473
|
+
count: yc.value,
|
|
2474
|
+
"page-size": H.value.pageSize,
|
|
2475
|
+
page: H.value.pageIndex + 1,
|
|
2476
|
+
translations: { rootLabel: `${a.caption}: ${M(l).pagination.rootLabel}` },
|
|
2477
|
+
"onUpdate:page": t[8] ||= (e) => M(K).setPageIndex(e - 1)
|
|
2448
2478
|
}, null, 8, [
|
|
2449
2479
|
"count",
|
|
2450
2480
|
"page-size",
|
|
2451
2481
|
"page",
|
|
2452
2482
|
"translations"
|
|
2453
|
-
])], 2)) :
|
|
2454
|
-
|
|
2483
|
+
])], 2)) : _("", !0),
|
|
2484
|
+
y("div", {
|
|
2455
2485
|
ref: "scroll",
|
|
2456
|
-
class:
|
|
2457
|
-
style:
|
|
2458
|
-
onScroll: t[17] ||= (e) => a.scrollHeight ?
|
|
2459
|
-
}, [
|
|
2486
|
+
class: T(J.value.scroll()),
|
|
2487
|
+
style: E(a.scrollHeight ? { maxHeight: a.scrollHeight } : void 0),
|
|
2488
|
+
onScroll: t[17] ||= (e) => a.scrollHeight ? oc(e) : void 0
|
|
2489
|
+
}, [y("table", {
|
|
2460
2490
|
ref_key: "tableElement",
|
|
2461
|
-
ref:
|
|
2462
|
-
class:
|
|
2463
|
-
style:
|
|
2464
|
-
"aria-busy":
|
|
2465
|
-
"aria-rowcount": $.value ? Z.value.length +
|
|
2466
|
-
role:
|
|
2467
|
-
"aria-multiselectable":
|
|
2468
|
-
tabindex: (a.cellSelection || a.editMode === "batch") && !
|
|
2469
|
-
onKeydown:
|
|
2470
|
-
onFocusin:
|
|
2491
|
+
ref: uc,
|
|
2492
|
+
class: T(J.value.table({ class: ci.value ? J.value.fixedLayout() : void 0 })),
|
|
2493
|
+
style: E(ci.value ? { minWidth: `${M(K).getTotalSize() + di.value + fi.value}px` } : void 0),
|
|
2494
|
+
"aria-busy": An.value || void 0,
|
|
2495
|
+
"aria-rowcount": $.value ? Z.value.length + vi.value.length : void 0,
|
|
2496
|
+
role: q.value ? $r.value ? "treegrid" : "grid" : void 0,
|
|
2497
|
+
"aria-multiselectable": q.value && (a.selectable && $i.value || a.cellSelection) ? "true" : void 0,
|
|
2498
|
+
tabindex: (a.cellSelection || a.editMode === "batch") && !q.value ? -1 : void 0,
|
|
2499
|
+
onKeydown: hc,
|
|
2500
|
+
onFocusin: mc
|
|
2471
2501
|
}, [
|
|
2472
|
-
|
|
2473
|
-
|
|
2502
|
+
y("caption", { class: T(J.value.caption()) }, j(a.caption), 3),
|
|
2503
|
+
y("thead", {
|
|
2474
2504
|
ref_key: "head",
|
|
2475
|
-
ref:
|
|
2476
|
-
class:
|
|
2477
|
-
}, [(
|
|
2505
|
+
ref: lc,
|
|
2506
|
+
class: T(J.value.head())
|
|
2507
|
+
}, [(D(!0), v(m, null, k(vi.value, (n, r) => (D(), v("tr", {
|
|
2478
2508
|
key: r,
|
|
2479
|
-
class:
|
|
2509
|
+
class: T(J.value.headRow())
|
|
2480
2510
|
}, [
|
|
2481
|
-
r === 0 ? (
|
|
2511
|
+
r === 0 ? (D(!0), v(m, { key: 0 }, k(ai.value, (e) => (D(), v("th", {
|
|
2482
2512
|
key: e,
|
|
2483
2513
|
scope: "col",
|
|
2484
|
-
rowspan:
|
|
2485
|
-
class:
|
|
2486
|
-
style:
|
|
2487
|
-
}, [e === "select" &&
|
|
2514
|
+
rowspan: vi.value.length,
|
|
2515
|
+
class: T(J.value.th({ class: gi(e, !0) })),
|
|
2516
|
+
style: E(_i(e))
|
|
2517
|
+
}, [e === "select" && $i.value ? (D(), g(ee, {
|
|
2488
2518
|
key: 0,
|
|
2489
|
-
checked:
|
|
2490
|
-
"aria-label": a.selectAllLabel ?? (a.selectAllMode === "all" ?
|
|
2491
|
-
"onUpdate:checked": t[9] ||= (e) =>
|
|
2492
|
-
}, null, 8, ["checked", "aria-label"])) : e === "select" ? (
|
|
2519
|
+
checked: na.value,
|
|
2520
|
+
"aria-label": a.selectAllLabel ?? (a.selectAllMode === "all" ? M(L).selectAllRows : M(L).selectAll),
|
|
2521
|
+
"onUpdate:checked": t[9] ||= (e) => ra(e === !0)
|
|
2522
|
+
}, null, 8, ["checked", "aria-label"])) : e === "select" ? (D(), v("span", {
|
|
2493
2523
|
key: 1,
|
|
2494
|
-
class:
|
|
2495
|
-
},
|
|
2524
|
+
class: T(J.value.srOnly())
|
|
2525
|
+
}, j(M(L).select), 3)) : e === "expand" ? (D(), v("button", {
|
|
2496
2526
|
key: 2,
|
|
2497
2527
|
type: "button",
|
|
2498
|
-
class:
|
|
2499
|
-
"aria-label":
|
|
2500
|
-
onClick: t[10] ||= (e) =>
|
|
2501
|
-
}, [
|
|
2528
|
+
class: T(J.value.expander()),
|
|
2529
|
+
"aria-label": ya.value ? M(L).collapseAll : M(L).expandAll,
|
|
2530
|
+
onClick: t[10] ||= (e) => M(K).toggleAllRowsExpanded(!ya.value)
|
|
2531
|
+
}, [ya.value ? (D(), g(M(De), {
|
|
2502
2532
|
key: 0,
|
|
2503
|
-
class:
|
|
2533
|
+
class: T(J.value.expanderIcon()),
|
|
2504
2534
|
"aria-hidden": "true"
|
|
2505
|
-
}, null, 8, ["class"])) : (
|
|
2535
|
+
}, null, 8, ["class"])) : (D(), g(M(Oe), {
|
|
2506
2536
|
key: 1,
|
|
2507
|
-
class:
|
|
2537
|
+
class: T(J.value.expanderIcon()),
|
|
2508
2538
|
"aria-hidden": "true"
|
|
2509
|
-
}, null, 8, ["class"]))], 10,
|
|
2539
|
+
}, null, 8, ["class"]))], 10, Hn)) : e === "number" ? (D(), v(m, { key: 3 }, [b(j(M(L).rowNumber), 1)], 64)) : (D(), v("span", {
|
|
2510
2540
|
key: 4,
|
|
2511
|
-
class:
|
|
2512
|
-
},
|
|
2513
|
-
(
|
|
2541
|
+
class: T(J.value.srOnly())
|
|
2542
|
+
}, j(M(L).reorder), 3))], 14, Vn))), 128)) : _("", !0),
|
|
2543
|
+
(D(!0), v(m, null, k(n, (n) => (D(), v(m, { key: n.header.id }, [n.group ? (D(), v("th", {
|
|
2514
2544
|
key: 0,
|
|
2515
2545
|
scope: "colgroup",
|
|
2516
2546
|
colspan: n.header.colSpan,
|
|
2517
2547
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2518
|
-
class:
|
|
2519
|
-
},
|
|
2548
|
+
class: T(J.value.th({ class: J.value.groupTh() }))
|
|
2549
|
+
}, j(X(n.header.column)), 11, Un)) : (D(), v("th", {
|
|
2520
2550
|
key: 1,
|
|
2521
|
-
id:
|
|
2551
|
+
id: xs.value ? Ss(n.header.column.id) : void 0,
|
|
2522
2552
|
scope: "col",
|
|
2523
2553
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2524
|
-
class:
|
|
2525
|
-
style:
|
|
2526
|
-
"aria-sort":
|
|
2527
|
-
draggable:
|
|
2528
|
-
"data-drop":
|
|
2529
|
-
"data-dragging":
|
|
2530
|
-
onDragstart: (e) =>
|
|
2531
|
-
onDragover: (e) =>
|
|
2532
|
-
onDragleave: t[11] ||= (e) =>
|
|
2533
|
-
onDrop:
|
|
2534
|
-
onDragend:
|
|
2535
|
-
}, [
|
|
2536
|
-
n.header.column.getCanSort() ? (
|
|
2554
|
+
class: T(ti(n.header.column.id).th({ class: [pi(n.header.column.id, !0), a.reorderableColumns ? J.value.dropTargetColumn() : ""] })),
|
|
2555
|
+
style: E(mi(n.header.column.id, !0)),
|
|
2556
|
+
"aria-sort": yi(n.header.column.id),
|
|
2557
|
+
draggable: Ei(n.header.column.id) && !n.header.column.getIsPinned() ? "true" : void 0,
|
|
2558
|
+
"data-drop": Ii(n.header.column.id),
|
|
2559
|
+
"data-dragging": Ai.value === n.header.column.id || void 0,
|
|
2560
|
+
onDragstart: (e) => Mi(n.header.column.id, e),
|
|
2561
|
+
onDragover: (e) => Ni(n.header.column.id, e),
|
|
2562
|
+
onDragleave: t[11] ||= (e) => ji.value = null,
|
|
2563
|
+
onDrop: Pi,
|
|
2564
|
+
onDragend: Fi
|
|
2565
|
+
}, [y("div", { class: T(ti(n.header.column.id).headContent()) }, [
|
|
2566
|
+
n.header.column.getCanSort() ? (D(), v("button", {
|
|
2537
2567
|
key: 0,
|
|
2538
2568
|
type: "button",
|
|
2539
|
-
class:
|
|
2540
|
-
onClick: (e) =>
|
|
2569
|
+
class: T(J.value.sortButton()),
|
|
2570
|
+
onClick: (e) => xi(n.header.column.id, e)
|
|
2541
2571
|
}, [
|
|
2542
|
-
|
|
2543
|
-
n.header.column.getIsSorted() === "asc" ? (
|
|
2572
|
+
y("span", { class: T(J.value.headLabel()) }, j(X(n.header.column)), 3),
|
|
2573
|
+
n.header.column.getIsSorted() === "asc" ? (D(), g(M(xe), {
|
|
2544
2574
|
key: 0,
|
|
2545
|
-
class:
|
|
2575
|
+
class: T(J.value.sortIcon()),
|
|
2546
2576
|
"aria-hidden": "true"
|
|
2547
|
-
}, null, 8, ["class"])) : n.header.column.getIsSorted() === "desc" ? (
|
|
2577
|
+
}, null, 8, ["class"])) : n.header.column.getIsSorted() === "desc" ? (D(), g(M(be), {
|
|
2548
2578
|
key: 1,
|
|
2549
|
-
class:
|
|
2579
|
+
class: T(J.value.sortIcon()),
|
|
2550
2580
|
"aria-hidden": "true"
|
|
2551
|
-
}, null, 8, ["class"])) : (
|
|
2581
|
+
}, null, 8, ["class"])) : (D(), g(M(Se), {
|
|
2552
2582
|
key: 2,
|
|
2553
|
-
class:
|
|
2583
|
+
class: T(J.value.sortIcon()),
|
|
2554
2584
|
"aria-hidden": "true"
|
|
2555
2585
|
}, null, 8, ["class"])),
|
|
2556
|
-
|
|
2557
|
-
class:
|
|
2586
|
+
V.value.length > 1 && bi(n.header.column.id) ? (D(), v(m, { key: 3 }, [y("span", {
|
|
2587
|
+
class: T(J.value.sortBadge()),
|
|
2558
2588
|
"aria-hidden": "true"
|
|
2559
|
-
},
|
|
2560
|
-
], 10,
|
|
2589
|
+
}, j(bi(n.header.column.id)), 3), y("span", { class: T(J.value.srOnly()) }, j(M(L).sortPriority(bi(n.header.column.id), n.header.column.getIsSorted() === "desc")), 3)], 64)) : _("", !0)
|
|
2590
|
+
], 10, Gn)) : (D(), v("span", {
|
|
2561
2591
|
key: 1,
|
|
2562
|
-
class:
|
|
2563
|
-
},
|
|
2564
|
-
|
|
2592
|
+
class: T(J.value.headLabel())
|
|
2593
|
+
}, j(X(n.header.column)), 3)),
|
|
2594
|
+
Hi.value && Bi(z.value.get(n.header.column.id)) ? (D(), g(Fn, {
|
|
2565
2595
|
key: 2,
|
|
2566
2596
|
header: X(n.header.column),
|
|
2567
|
-
type:
|
|
2568
|
-
"model-value":
|
|
2569
|
-
options:
|
|
2570
|
-
"match-modes":
|
|
2597
|
+
type: z.value.get(n.header.column.id).filter ?? "text",
|
|
2598
|
+
"model-value": Wi(n.header.column.id),
|
|
2599
|
+
options: Gi(z.value.get(n.header.column.id)),
|
|
2600
|
+
"match-modes": z.value.get(n.header.column.id).matchModes,
|
|
2571
2601
|
"max-constraints": a.maxConstraints,
|
|
2572
|
-
"onUpdate:modelValue": (e) =>
|
|
2573
|
-
},
|
|
2602
|
+
"onUpdate:modelValue": (e) => qi(n.header.column.id, e)
|
|
2603
|
+
}, oe({ _: 2 }, [zi(n.header.column.id) ? {
|
|
2574
2604
|
name: "value",
|
|
2575
|
-
fn:
|
|
2605
|
+
fn: P((t) => [A(e.$slots, `filter-${n.header.column.id}`, ce({ ref_for: !0 }, {
|
|
2576
2606
|
...t,
|
|
2577
|
-
column:
|
|
2607
|
+
column: z.value.get(n.header.column.id)
|
|
2578
2608
|
}))]),
|
|
2579
2609
|
key: "0"
|
|
2580
2610
|
} : void 0]), 1032, [
|
|
@@ -2585,135 +2615,135 @@ var jn = On({
|
|
|
2585
2615
|
"match-modes",
|
|
2586
2616
|
"max-constraints",
|
|
2587
2617
|
"onUpdate:modelValue"
|
|
2588
|
-
])) :
|
|
2589
|
-
|
|
2618
|
+
])) : _("", !0),
|
|
2619
|
+
Si.value ? (D(), g(u, {
|
|
2590
2620
|
key: 3,
|
|
2591
|
-
items:
|
|
2592
|
-
onSelect: (e) =>
|
|
2621
|
+
items: Di(n.header.column),
|
|
2622
|
+
onSelect: (e) => ki(n.header.column, e)
|
|
2593
2623
|
}, {
|
|
2594
|
-
default:
|
|
2624
|
+
default: P(() => [y("button", {
|
|
2595
2625
|
type: "button",
|
|
2596
|
-
class:
|
|
2626
|
+
class: T(J.value.headButton()),
|
|
2597
2627
|
"data-column-menu": n.header.column.id,
|
|
2598
|
-
"aria-label":
|
|
2599
|
-
}, [
|
|
2600
|
-
class:
|
|
2628
|
+
"aria-label": M(L).columnMenu(X(n.header.column))
|
|
2629
|
+
}, [x(M(je), {
|
|
2630
|
+
class: T(J.value.headButtonIcon()),
|
|
2601
2631
|
"aria-hidden": "true"
|
|
2602
|
-
}, null, 8, ["class"])], 10,
|
|
2632
|
+
}, null, 8, ["class"])], 10, Kn)]),
|
|
2603
2633
|
_: 2
|
|
2604
|
-
}, 1032, ["items", "onSelect"])) :
|
|
2605
|
-
], 2), a.resizable ? (
|
|
2634
|
+
}, 1032, ["items", "onSelect"])) : _("", !0)
|
|
2635
|
+
], 2), a.resizable ? (D(), v("div", {
|
|
2606
2636
|
key: 0,
|
|
2607
2637
|
role: "separator",
|
|
2608
2638
|
"aria-orientation": "vertical",
|
|
2609
|
-
"aria-label":
|
|
2639
|
+
"aria-label": M(L).resize(X(n.header.column)),
|
|
2610
2640
|
"aria-valuenow": n.header.column.getSize(),
|
|
2611
|
-
"aria-valuemin":
|
|
2641
|
+
"aria-valuemin": br,
|
|
2612
2642
|
"aria-valuemax": 1200,
|
|
2613
2643
|
tabindex: "0",
|
|
2614
|
-
class:
|
|
2644
|
+
class: T(J.value.resizer()),
|
|
2615
2645
|
"data-resizing": n.header.column.getIsResizing() || void 0,
|
|
2616
2646
|
onMousedown: (e) => n.header.getResizeHandler()(e),
|
|
2617
2647
|
onTouchstart: (e) => n.header.getResizeHandler()(e),
|
|
2618
|
-
onKeydown: (e) =>
|
|
2619
|
-
onDblclick: (e) =>
|
|
2620
|
-
}, null, 42,
|
|
2621
|
-
r === 0 &&
|
|
2648
|
+
onKeydown: (e) => Ri(n.header.column.id, e),
|
|
2649
|
+
onDblclick: (e) => Li(n.header.column.id, e)
|
|
2650
|
+
}, null, 42, qn)) : _("", !0)], 46, Wn))], 64))), 128)),
|
|
2651
|
+
r === 0 && oi.value.length ? (D(), v("th", {
|
|
2622
2652
|
key: 1,
|
|
2623
2653
|
scope: "col",
|
|
2624
|
-
rowspan:
|
|
2625
|
-
class:
|
|
2626
|
-
style:
|
|
2627
|
-
}, [
|
|
2628
|
-
], 2))), 128)),
|
|
2654
|
+
rowspan: vi.value.length,
|
|
2655
|
+
class: T(J.value.th({ class: gi("actions", !0) })),
|
|
2656
|
+
style: E(_i("actions"))
|
|
2657
|
+
}, [y("span", { class: T(J.value.srOnly()) }, j(M(L).actions), 3)], 14, Jn)) : _("", !0)
|
|
2658
|
+
], 2))), 128)), Vi.value ? (D(), v("tr", {
|
|
2629
2659
|
key: 0,
|
|
2630
|
-
class:
|
|
2660
|
+
class: T(J.value.filterRow())
|
|
2631
2661
|
}, [
|
|
2632
|
-
(
|
|
2662
|
+
(D(!0), v(m, null, k(ai.value, (e) => (D(), v("td", {
|
|
2633
2663
|
key: e,
|
|
2634
|
-
class:
|
|
2635
|
-
style:
|
|
2664
|
+
class: T(gi(e, !0)),
|
|
2665
|
+
style: E(_i(e))
|
|
2636
2666
|
}, null, 6))), 128)),
|
|
2637
|
-
(
|
|
2667
|
+
(D(!0), v(m, null, k(Y.value, (t) => (D(), v("td", {
|
|
2638
2668
|
key: t.id,
|
|
2639
|
-
class:
|
|
2640
|
-
style:
|
|
2641
|
-
}, [
|
|
2642
|
-
value:
|
|
2643
|
-
setValue: (e) =>
|
|
2644
|
-
column:
|
|
2645
|
-
}), void 0, void 0, 0) :
|
|
2669
|
+
class: T(ti(t.id).filterCell({ class: pi(t.id, !0) })),
|
|
2670
|
+
style: E(mi(t.id, !0))
|
|
2671
|
+
}, [Bi(z.value.get(t.id)) ? (D(), v(m, { key: 0 }, [zi(t.id) ? A(e.$slots, `filter-${t.id}`, ce({ ref_for: !0 }, {
|
|
2672
|
+
value: Ki(z.value.get(t.id)),
|
|
2673
|
+
setValue: (e) => Xi(z.value.get(t.id), e),
|
|
2674
|
+
column: z.value.get(t.id)
|
|
2675
|
+
}), void 0, void 0, 0) : M(xt)(Ji(z.value.get(t.id))) ? (D(), v("div", {
|
|
2646
2676
|
key: 1,
|
|
2647
|
-
class:
|
|
2648
|
-
}, [(
|
|
2677
|
+
class: T(J.value.filterRowRange())
|
|
2678
|
+
}, [(D(), v(m, null, k([0, 1], (e) => x(Pn, {
|
|
2649
2679
|
key: e,
|
|
2650
|
-
type:
|
|
2651
|
-
label: `${
|
|
2652
|
-
options:
|
|
2653
|
-
"model-value":
|
|
2654
|
-
"onUpdate:modelValue": (n) =>
|
|
2680
|
+
type: Yi(z.value.get(t.id)),
|
|
2681
|
+
label: `${M(L).filter(X(t))}, ${e ? M(L).to : M(L).from}`,
|
|
2682
|
+
options: Gi(z.value.get(t.id)),
|
|
2683
|
+
"model-value": Qi(z.value.get(t.id), e),
|
|
2684
|
+
"onUpdate:modelValue": (n) => Zi(z.value.get(t.id), e, n)
|
|
2655
2685
|
}, null, 8, [
|
|
2656
2686
|
"type",
|
|
2657
2687
|
"label",
|
|
2658
2688
|
"options",
|
|
2659
2689
|
"model-value",
|
|
2660
2690
|
"onUpdate:modelValue"
|
|
2661
|
-
])), 64))], 2)) : (
|
|
2691
|
+
])), 64))], 2)) : (D(), g(Pn, {
|
|
2662
2692
|
key: 2,
|
|
2663
|
-
type:
|
|
2664
|
-
label:
|
|
2665
|
-
options:
|
|
2693
|
+
type: Yi(z.value.get(t.id)),
|
|
2694
|
+
label: M(L).filter(X(t)),
|
|
2695
|
+
options: Gi(z.value.get(t.id)),
|
|
2666
2696
|
any: "",
|
|
2667
|
-
"model-value":
|
|
2668
|
-
"onUpdate:modelValue": (e) =>
|
|
2697
|
+
"model-value": Ki(z.value.get(t.id)),
|
|
2698
|
+
"onUpdate:modelValue": (e) => Xi(z.value.get(t.id), e)
|
|
2669
2699
|
}, null, 8, [
|
|
2670
2700
|
"type",
|
|
2671
2701
|
"label",
|
|
2672
2702
|
"options",
|
|
2673
2703
|
"model-value",
|
|
2674
2704
|
"onUpdate:modelValue"
|
|
2675
|
-
]))], 64)) :
|
|
2676
|
-
|
|
2705
|
+
]))], 64)) : _("", !0)], 6))), 128)),
|
|
2706
|
+
oi.value.length ? (D(), v("td", {
|
|
2677
2707
|
key: 0,
|
|
2678
|
-
class:
|
|
2679
|
-
style:
|
|
2680
|
-
}, null, 6)) :
|
|
2681
|
-
], 2)) :
|
|
2682
|
-
|
|
2708
|
+
class: T(gi("actions", !0)),
|
|
2709
|
+
style: E(_i("actions"))
|
|
2710
|
+
}, null, 6)) : _("", !0)
|
|
2711
|
+
], 2)) : _("", !0)], 2),
|
|
2712
|
+
ha.value.length ? (D(), v("tbody", {
|
|
2683
2713
|
key: 0,
|
|
2684
|
-
class:
|
|
2685
|
-
style:
|
|
2686
|
-
}, [(
|
|
2714
|
+
class: T(J.value.frozenBody()),
|
|
2715
|
+
style: E(a.scrollHeight ? { top: `${sc.value}px` } : void 0)
|
|
2716
|
+
}, [(D(!0), v(m, null, k(ha.value, (t) => (D(), v("tr", {
|
|
2687
2717
|
key: t.id,
|
|
2688
|
-
class:
|
|
2689
|
-
"data-state":
|
|
2690
|
-
"aria-selected":
|
|
2718
|
+
class: T(J.value.row({ class: a.rowClass?.(t.original) })),
|
|
2719
|
+
"data-state": ta(t) ? "selected" : void 0,
|
|
2720
|
+
"aria-selected": q.value && a.selectable ? ta(t) : void 0,
|
|
2691
2721
|
"data-row-id": t.id
|
|
2692
2722
|
}, [
|
|
2693
|
-
(
|
|
2723
|
+
(D(!0), v(m, null, k(ai.value, (e) => (D(), v("td", {
|
|
2694
2724
|
key: e,
|
|
2695
|
-
class:
|
|
2696
|
-
style:
|
|
2725
|
+
class: T(J.value.td({ class: gi(e, !1) })),
|
|
2726
|
+
style: E(_i(e))
|
|
2697
2727
|
}, null, 6))), 128)),
|
|
2698
|
-
(
|
|
2728
|
+
(D(!0), v(m, null, k(t.getVisibleCells(), (n) => (D(), v("td", {
|
|
2699
2729
|
key: n.id,
|
|
2700
|
-
class:
|
|
2701
|
-
style:
|
|
2702
|
-
}, [
|
|
2730
|
+
class: T(ti(n.column.id).td({ class: pi(n.column.id, !1) })),
|
|
2731
|
+
style: E(mi(n.column.id, !1))
|
|
2732
|
+
}, [z.value.get(n.column.id)?.editable && (ri.value && uo.value?.rowId === t.id && uo.value.columnId === n.column.id || a.editMode === "row" && fo.value === t.id) ? (D(), v("div", {
|
|
2703
2733
|
key: 0,
|
|
2704
2734
|
"data-editor": "",
|
|
2705
|
-
class:
|
|
2706
|
-
"aria-busy":
|
|
2707
|
-
onKeydown: (e) =>
|
|
2708
|
-
onFocusout: (e) =>
|
|
2709
|
-
}, [
|
|
2735
|
+
class: T(J.value.editor()),
|
|
2736
|
+
"aria-busy": Co.value || void 0,
|
|
2737
|
+
onKeydown: (e) => ri.value ? Oo(t, n.column.id, e) : Fo(t, e),
|
|
2738
|
+
onFocusout: (e) => ri.value ? ko(t, n.column.id, e) : void 0
|
|
2739
|
+
}, [M(I)[`editor-${n.column.id}`] ? A(e.$slots, `editor-${n.column.id}`, ce({ ref_for: !0 }, Mo(t, z.value.get(n.column.id))), void 0, void 0, 0) : (D(), g(Pn, {
|
|
2710
2740
|
key: 1,
|
|
2711
|
-
type:
|
|
2741
|
+
type: go(z.value.get(n.column.id)),
|
|
2712
2742
|
label: X(n.column),
|
|
2713
|
-
options:
|
|
2714
|
-
invalid: !!
|
|
2715
|
-
"model-value":
|
|
2716
|
-
"onUpdate:modelValue": (e) =>
|
|
2743
|
+
options: z.value.get(n.column.id).editOptions,
|
|
2744
|
+
invalid: !!mo.value[n.column.id],
|
|
2745
|
+
"model-value": po.value[n.column.id],
|
|
2746
|
+
"onUpdate:modelValue": (e) => jo(t, z.value.get(n.column.id), e)
|
|
2717
2747
|
}, null, 8, [
|
|
2718
2748
|
"type",
|
|
2719
2749
|
"label",
|
|
@@ -2721,301 +2751,301 @@ var jn = On({
|
|
|
2721
2751
|
"invalid",
|
|
2722
2752
|
"model-value",
|
|
2723
2753
|
"onUpdate:modelValue"
|
|
2724
|
-
])),
|
|
2754
|
+
])), mo.value[n.column.id] ? (D(), v("span", {
|
|
2725
2755
|
key: 2,
|
|
2726
|
-
id:
|
|
2756
|
+
id: vo(t.id, n.column.id),
|
|
2727
2757
|
role: "alert",
|
|
2728
|
-
class:
|
|
2729
|
-
},
|
|
2758
|
+
class: T(J.value.editError())
|
|
2759
|
+
}, j(mo.value[n.column.id]), 11, Zn)) : _("", !0)], 42, Xn)) : ri.value && z.value.get(n.column.id)?.editable ? (D(), v("button", {
|
|
2730
2760
|
key: 1,
|
|
2731
2761
|
type: "button",
|
|
2732
|
-
class:
|
|
2733
|
-
"data-edit":
|
|
2734
|
-
"aria-label": `${
|
|
2735
|
-
onClick: (e) =>
|
|
2736
|
-
}, [
|
|
2762
|
+
class: T(ti(n.column.id).editButton()),
|
|
2763
|
+
"data-edit": _o(t.id, n.column.id),
|
|
2764
|
+
"aria-label": `${M(L).edit(X(n.column), B(z.value.get(n.column.id), Q(t, n.column.id), t.original))}${Ds(t, n.column.id) ? `, ${M(L).changed}` : ""}`,
|
|
2765
|
+
onClick: (e) => So(t, n.column.id)
|
|
2766
|
+
}, [A(e.$slots, `cell-${n.column.id}`, {
|
|
2737
2767
|
row: t.original,
|
|
2738
2768
|
value: Q(t, n.column.id)
|
|
2739
|
-
}, () => [
|
|
2769
|
+
}, () => [b(j(B(z.value.get(n.column.id), Q(t, n.column.id), t.original)), 1)])], 10, Qn)) : z.value.get(n.column.id)?.copyable ? (D(), v("span", {
|
|
2740
2770
|
key: 2,
|
|
2741
|
-
class:
|
|
2742
|
-
}, [
|
|
2771
|
+
class: T(J.value.copyCell())
|
|
2772
|
+
}, [A(e.$slots, `cell-${n.column.id}`, {
|
|
2743
2773
|
row: t.original,
|
|
2744
2774
|
value: n.getValue()
|
|
2745
|
-
}, () => [
|
|
2746
|
-
value: z
|
|
2747
|
-
label:
|
|
2748
|
-
}, null, 8, ["value", "label"])], 2)) :
|
|
2775
|
+
}, () => [b(j(B(z.value.get(n.column.id), n.getValue(), t.original)), 1)]), x(ie, {
|
|
2776
|
+
value: B(z.value.get(n.column.id), n.getValue(), t.original),
|
|
2777
|
+
label: M(L).copy(X(n.column), B(z.value.get(n.column.id), n.getValue(), t.original))
|
|
2778
|
+
}, null, 8, ["value", "label"])], 2)) : A(e.$slots, `cell-${n.column.id}`, {
|
|
2749
2779
|
row: t.original,
|
|
2750
2780
|
value: n.getValue()
|
|
2751
|
-
}, () => [
|
|
2752
|
-
|
|
2781
|
+
}, () => [b(j(B(z.value.get(n.column.id), n.getValue(), t.original)), 1)], void 0, 3)], 6))), 128)),
|
|
2782
|
+
oi.value.length ? (D(), v("td", {
|
|
2753
2783
|
key: 0,
|
|
2754
|
-
class:
|
|
2755
|
-
style:
|
|
2756
|
-
}, [a.editMode === "row" &&
|
|
2784
|
+
class: T(J.value.td({ class: gi("actions", !1) })),
|
|
2785
|
+
style: E(_i("actions"))
|
|
2786
|
+
}, [a.editMode === "row" && ni.value ? (D(), v("div", {
|
|
2757
2787
|
key: 0,
|
|
2758
|
-
class:
|
|
2759
|
-
}, [
|
|
2760
|
-
icon:
|
|
2761
|
-
label:
|
|
2788
|
+
class: T(J.value.editActions())
|
|
2789
|
+
}, [fo.value === t.id ? (D(), v(m, { key: 0 }, [x(f, {
|
|
2790
|
+
icon: M(Ce),
|
|
2791
|
+
label: M(L).saveRow(G(t.original, t.index)),
|
|
2762
2792
|
variant: "text",
|
|
2763
2793
|
size: "sm",
|
|
2764
|
-
onClick: (e) =>
|
|
2794
|
+
onClick: (e) => Po(t, !0)
|
|
2765
2795
|
}, null, 8, [
|
|
2766
2796
|
"icon",
|
|
2767
2797
|
"label",
|
|
2768
2798
|
"onClick"
|
|
2769
|
-
]),
|
|
2770
|
-
icon:
|
|
2771
|
-
label:
|
|
2799
|
+
]), x(f, {
|
|
2800
|
+
icon: M(We),
|
|
2801
|
+
label: M(L).cancelEdit(G(t.original, t.index)),
|
|
2772
2802
|
variant: "text",
|
|
2773
2803
|
size: "sm",
|
|
2774
|
-
onClick: (e) =>
|
|
2804
|
+
onClick: (e) => Po(t, !1)
|
|
2775
2805
|
}, null, 8, [
|
|
2776
2806
|
"icon",
|
|
2777
2807
|
"label",
|
|
2778
2808
|
"onClick"
|
|
2779
|
-
])], 64)) : (
|
|
2809
|
+
])], 64)) : (D(), g(f, {
|
|
2780
2810
|
key: 1,
|
|
2781
2811
|
"data-row-edit": t.id,
|
|
2782
|
-
icon:
|
|
2783
|
-
label:
|
|
2812
|
+
icon: M(Le),
|
|
2813
|
+
label: M(L).editRow(G(t.original, t.index)),
|
|
2784
2814
|
variant: "text",
|
|
2785
2815
|
size: "sm",
|
|
2786
|
-
onClick: (e) =>
|
|
2816
|
+
onClick: (e) => No(t)
|
|
2787
2817
|
}, null, 8, [
|
|
2788
2818
|
"data-row-edit",
|
|
2789
2819
|
"icon",
|
|
2790
2820
|
"label",
|
|
2791
2821
|
"onClick"
|
|
2792
|
-
]))], 2)) :
|
|
2793
|
-
], 10,
|
|
2794
|
-
|
|
2822
|
+
]))], 2)) : _("", !0)], 6)) : _("", !0)
|
|
2823
|
+
], 10, Yn))), 128))], 6)) : _("", !0),
|
|
2824
|
+
x(ka, {
|
|
2795
2825
|
enabled: !!a.contextMenu && !!a.rowActions,
|
|
2796
|
-
items:
|
|
2797
|
-
label:
|
|
2798
|
-
onSelect: t[16] ||= (e) =>
|
|
2826
|
+
items: Ea.value ? Ta(Ea.value) : [],
|
|
2827
|
+
label: Ea.value ? M(L).rowActions(G(Ea.value.original, Ea.value.index)) : void 0,
|
|
2828
|
+
onSelect: t[16] ||= (e) => Oa(Ea.value, e)
|
|
2799
2829
|
}, {
|
|
2800
|
-
default:
|
|
2801
|
-
Z.value.length === 0 && !
|
|
2802
|
-
colspan:
|
|
2803
|
-
class:
|
|
2804
|
-
}, [
|
|
2830
|
+
default: P(() => [y("tbody", { onContextmenuCapture: Da }, [
|
|
2831
|
+
Z.value.length === 0 && !Tc.value ? (D(), v("tr", $n, [y("td", {
|
|
2832
|
+
colspan: si.value,
|
|
2833
|
+
class: T(J.value.message())
|
|
2834
|
+
}, [kn.value ? (D(), v("span", {
|
|
2805
2835
|
key: 0,
|
|
2806
|
-
class:
|
|
2807
|
-
}, [
|
|
2836
|
+
class: T(J.value.errorContent())
|
|
2837
|
+
}, [y("span", tr, j(M(l).dataSource.error), 1), x(d, {
|
|
2808
2838
|
variant: "outline",
|
|
2809
2839
|
size: "sm",
|
|
2810
|
-
onClick:
|
|
2840
|
+
onClick: Rs
|
|
2811
2841
|
}, {
|
|
2812
|
-
default:
|
|
2842
|
+
default: P(() => [b(j(M(l).dataSource.retry), 1)]),
|
|
2813
2843
|
_: 1
|
|
2814
|
-
})], 2)) :
|
|
2844
|
+
})], 2)) : An.value ? A(e.$slots, "loadingContent", {}, () => [y("span", { class: T(J.value.messageContent()) }, [x(te, {
|
|
2815
2845
|
size: "sm",
|
|
2816
|
-
label: a.loadingText ??
|
|
2817
|
-
}, null, 8, ["label"]),
|
|
2818
|
-
|
|
2846
|
+
label: a.loadingText ?? M(l).common.loading
|
|
2847
|
+
}, null, 8, ["label"]), b(j(a.loadingText ?? M(l).common.loading), 1)], 2)], void 0, 1) : Dc.value ? A(e.$slots, "noResults", {}, () => [b(j(a.noResultsText ?? a.emptyText ?? M(l).common.empty), 1)], void 0, 2) : A(e.$slots, "empty", {}, () => [b(j(a.emptyText ?? M(l).common.empty), 1)], void 0, 3)], 10, er)])) : _("", !0),
|
|
2848
|
+
Tc.value ? (D(!0), v(m, { key: 1 }, k(Ec.value, (e) => (D(), v("tr", {
|
|
2819
2849
|
key: `skeleton-${e}`,
|
|
2820
|
-
class:
|
|
2850
|
+
class: T(J.value.row())
|
|
2821
2851
|
}, [
|
|
2822
|
-
(
|
|
2852
|
+
(D(!0), v(m, null, k(ai.value, (e) => (D(), v("td", {
|
|
2823
2853
|
key: e,
|
|
2824
|
-
class:
|
|
2825
|
-
style:
|
|
2854
|
+
class: T(J.value.td({ class: gi(e, !1) })),
|
|
2855
|
+
style: E(_i(e))
|
|
2826
2856
|
}, null, 6))), 128)),
|
|
2827
|
-
(
|
|
2857
|
+
(D(!0), v(m, null, k(Y.value, (e) => (D(), v("td", {
|
|
2828
2858
|
key: e.id,
|
|
2829
|
-
class:
|
|
2830
|
-
style:
|
|
2831
|
-
}, [
|
|
2832
|
-
|
|
2859
|
+
class: T(ti(e.id).td({ class: pi(e.id, !1) })),
|
|
2860
|
+
style: E(mi(e.id, !1))
|
|
2861
|
+
}, [x(i)], 6))), 128)),
|
|
2862
|
+
oi.value.length ? (D(), v("td", {
|
|
2833
2863
|
key: 0,
|
|
2834
|
-
class:
|
|
2835
|
-
style:
|
|
2836
|
-
}, null, 6)) :
|
|
2837
|
-
], 2))), 128)) :
|
|
2838
|
-
|
|
2864
|
+
class: T(J.value.td({ class: gi("actions", !1) })),
|
|
2865
|
+
style: E(_i("actions"))
|
|
2866
|
+
}, null, 6)) : _("", !0)
|
|
2867
|
+
], 2))), 128)) : _("", !0),
|
|
2868
|
+
nc.value > 0 && !Tc.value ? (D(), v("tr", {
|
|
2839
2869
|
key: 2,
|
|
2840
|
-
class:
|
|
2870
|
+
class: T(J.value.spacer()),
|
|
2841
2871
|
"aria-hidden": "true"
|
|
2842
|
-
}, [
|
|
2843
|
-
colspan:
|
|
2844
|
-
class:
|
|
2845
|
-
style:
|
|
2846
|
-
}, null, 14,
|
|
2847
|
-
(
|
|
2872
|
+
}, [y("td", {
|
|
2873
|
+
colspan: si.value,
|
|
2874
|
+
class: T(J.value.spacerCell()),
|
|
2875
|
+
style: E({ height: `${nc.value}px` })
|
|
2876
|
+
}, null, 14, nr)], 2)) : _("", !0),
|
|
2877
|
+
(D(!0), v(m, null, k(Tc.value ? [] : tc.value, (n) => (D(), v(m, { key: n.key }, [n.kind === "group" ? (D(), v("tr", {
|
|
2848
2878
|
key: 0,
|
|
2849
2879
|
ref_for: !0,
|
|
2850
|
-
ref:
|
|
2851
|
-
class:
|
|
2880
|
+
ref: ic,
|
|
2881
|
+
class: T(J.value.groupRow(Ma.value ? { class: [J.value.dropTarget(), J.value.dropInside()] } : {})),
|
|
2852
2882
|
"data-index": n.index,
|
|
2853
|
-
"aria-rowindex": $.value ? n.index +
|
|
2854
|
-
"data-drop":
|
|
2855
|
-
onDragover: (e) => a.reorderableRows ?
|
|
2856
|
-
onDragleave: t[12] ||= (e) => a.reorderableRows ?
|
|
2857
|
-
onDrop: t[13] ||= (e) => a.reorderableRows ?
|
|
2858
|
-
}, [
|
|
2859
|
-
colspan:
|
|
2860
|
-
class:
|
|
2861
|
-
}, [
|
|
2862
|
-
class:
|
|
2863
|
-
style:
|
|
2883
|
+
"aria-rowindex": $.value ? n.index + vi.value.length + 1 : void 0,
|
|
2884
|
+
"data-drop": Ma.value ? Xa(n.row.id) : void 0,
|
|
2885
|
+
onDragover: (e) => a.reorderableRows ? qa(n.row, e) : void 0,
|
|
2886
|
+
onDragleave: t[12] ||= (e) => a.reorderableRows ? Pa.value = null : void 0,
|
|
2887
|
+
onDrop: t[13] ||= (e) => a.reorderableRows ? Ja(e) : void 0
|
|
2888
|
+
}, [y("td", {
|
|
2889
|
+
colspan: ba.value ? ai.value.length + 1 : si.value,
|
|
2890
|
+
class: T(J.value.groupCell())
|
|
2891
|
+
}, [y("div", {
|
|
2892
|
+
class: T(J.value.treeCell()),
|
|
2893
|
+
style: E({ paddingInlineStart: `${n.row.depth * 20}px` })
|
|
2864
2894
|
}, [
|
|
2865
|
-
|
|
2895
|
+
y("button", {
|
|
2866
2896
|
type: "button",
|
|
2867
|
-
class:
|
|
2897
|
+
class: T(J.value.expander()),
|
|
2868
2898
|
"aria-expanded": n.row.getIsExpanded(),
|
|
2869
|
-
"aria-label":
|
|
2899
|
+
"aria-label": M(L).group(z.value.get(n.row.groupingColumnId)?.header ?? "", B(z.value.get(n.row.groupingColumnId), n.row.groupingValue, n.row.original), n.row.getLeafRows().length),
|
|
2870
2900
|
onClick: (e) => n.row.getToggleExpandedHandler()()
|
|
2871
|
-
}, [
|
|
2872
|
-
class:
|
|
2901
|
+
}, [x(M(Te), {
|
|
2902
|
+
class: T(J.value.expanderIcon()),
|
|
2873
2903
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
2874
2904
|
"aria-hidden": "true"
|
|
2875
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
], 6)], 10,
|
|
2905
|
+
}, null, 8, ["class", "data-state"])], 10, ar),
|
|
2906
|
+
y("span", { class: T(J.value.groupLabel()) }, j(B(z.value.get(n.row.groupingColumnId), n.row.groupingValue, n.row.original)), 3),
|
|
2907
|
+
y("span", { class: T(J.value.groupCount()) }, "(" + j(n.row.getLeafRows().length) + ")", 3)
|
|
2908
|
+
], 6)], 10, ir), ba.value ? (D(), v(m, { key: 0 }, [(D(!0), v(m, null, k(Y.value.slice(1), (e) => (D(), v("td", {
|
|
2879
2909
|
key: e.id,
|
|
2880
|
-
class:
|
|
2881
|
-
},
|
|
2910
|
+
class: T(ti(e.id).groupAggregate())
|
|
2911
|
+
}, j(Ca(z.value.get(e.id), n.row.getLeafRows())), 3))), 128)), oi.value.length ? (D(), v("td", {
|
|
2882
2912
|
key: 0,
|
|
2883
|
-
class:
|
|
2884
|
-
}, null, 2)) :
|
|
2913
|
+
class: T(J.value.groupAggregate())
|
|
2914
|
+
}, null, 2)) : _("", !0)], 64)) : _("", !0)], 42, rr)) : n.kind === "expansion" ? (D(), v("tr", {
|
|
2885
2915
|
key: 1,
|
|
2886
|
-
id:
|
|
2916
|
+
id: va(n.row),
|
|
2887
2917
|
ref_for: !0,
|
|
2888
|
-
ref:
|
|
2889
|
-
class:
|
|
2918
|
+
ref: ic,
|
|
2919
|
+
class: T(J.value.expansionRow()),
|
|
2890
2920
|
"data-index": n.index,
|
|
2891
|
-
"aria-rowindex": $.value ? n.index +
|
|
2892
|
-
}, [
|
|
2893
|
-
colspan:
|
|
2894
|
-
class:
|
|
2895
|
-
}, [
|
|
2921
|
+
"aria-rowindex": $.value ? n.index + vi.value.length + 1 : void 0
|
|
2922
|
+
}, [y("td", {
|
|
2923
|
+
colspan: si.value,
|
|
2924
|
+
class: T(J.value.expansionCell())
|
|
2925
|
+
}, [A(e.$slots, "expansion", {
|
|
2896
2926
|
row: n.row.original,
|
|
2897
2927
|
rowId: n.row.id
|
|
2898
|
-
})], 10,
|
|
2928
|
+
})], 10, sr)], 10, or)) : (D(), v("tr", {
|
|
2899
2929
|
key: 2,
|
|
2900
2930
|
ref_for: !0,
|
|
2901
|
-
ref:
|
|
2902
|
-
class:
|
|
2903
|
-
a.reorderableRows ?
|
|
2904
|
-
a.reorderableRows &&
|
|
2905
|
-
a.rowHref?.(n.row.original) ?
|
|
2931
|
+
ref: ic,
|
|
2932
|
+
class: T(J.value.row({ class: [
|
|
2933
|
+
a.reorderableRows ? J.value.dropTarget() : "",
|
|
2934
|
+
a.reorderableRows && Ia.value && Ma.value ? J.value.dropInside() : "",
|
|
2935
|
+
a.rowHref?.(n.row.original) ? J.value.linkRow() : "",
|
|
2906
2936
|
a.rowClass?.(n.row.original)
|
|
2907
2937
|
] })),
|
|
2908
|
-
"data-state":
|
|
2909
|
-
"aria-selected":
|
|
2938
|
+
"data-state": ta(n.row) ? "selected" : void 0,
|
|
2939
|
+
"aria-selected": q.value && a.selectable ? ta(n.row) : void 0,
|
|
2910
2940
|
"data-row-id": n.row.id,
|
|
2911
2941
|
"data-index": n.index,
|
|
2912
|
-
"aria-rowindex": $.value ? n.index +
|
|
2913
|
-
"aria-level":
|
|
2914
|
-
"aria-expanded":
|
|
2915
|
-
draggable:
|
|
2916
|
-
"data-drop":
|
|
2917
|
-
"data-dragging":
|
|
2918
|
-
onClick: (e) =>
|
|
2919
|
-
onAuxclick: (e) =>
|
|
2920
|
-
onDragstart: (e) =>
|
|
2921
|
-
onDragover: (e) =>
|
|
2922
|
-
onDragleave: t[15] ||= (e) =>
|
|
2923
|
-
onDrop:
|
|
2924
|
-
onDragend:
|
|
2942
|
+
"aria-rowindex": $.value ? n.index + vi.value.length + 1 : void 0,
|
|
2943
|
+
"aria-level": $r.value ? n.row.depth + 1 : void 0,
|
|
2944
|
+
"aria-expanded": $r.value && n.row.getCanExpand() ? n.row.getIsExpanded() : void 0,
|
|
2945
|
+
draggable: Na.value === n.row.id ? "true" : void 0,
|
|
2946
|
+
"data-drop": Xa(n.row.id),
|
|
2947
|
+
"data-dragging": Ma.value === n.row.id || void 0,
|
|
2948
|
+
onClick: (e) => ua(n.row, e),
|
|
2949
|
+
onAuxclick: (e) => da(n.row, e),
|
|
2950
|
+
onDragstart: (e) => Ga(n.row, e),
|
|
2951
|
+
onDragover: (e) => Ka(n.row, e),
|
|
2952
|
+
onDragleave: t[15] ||= (e) => Pa.value = null,
|
|
2953
|
+
onDrop: Ja,
|
|
2954
|
+
onDragend: Ya
|
|
2925
2955
|
}, [
|
|
2926
|
-
(
|
|
2956
|
+
(D(!0), v(m, null, k(ai.value, (e) => (D(), v("td", {
|
|
2927
2957
|
key: e,
|
|
2928
|
-
class:
|
|
2929
|
-
style:
|
|
2930
|
-
}, [e === "drag" ? (
|
|
2958
|
+
class: T(J.value.td({ class: gi(e, !1) })),
|
|
2959
|
+
style: E(_i(e))
|
|
2960
|
+
}, [e === "drag" ? (D(), v("button", {
|
|
2931
2961
|
key: 0,
|
|
2932
2962
|
type: "button",
|
|
2933
|
-
class:
|
|
2963
|
+
class: T(J.value.dragHandle()),
|
|
2934
2964
|
"data-drag-handle": n.row.id,
|
|
2935
|
-
"aria-label":
|
|
2936
|
-
"aria-keyshortcuts":
|
|
2937
|
-
onKeydown: (e) =>
|
|
2938
|
-
onPointerdown: (e) =>
|
|
2939
|
-
onPointerup: t[14] ||= (e) =>
|
|
2940
|
-
}, [
|
|
2941
|
-
class:
|
|
2965
|
+
"aria-label": M(L).moveRow(G(n.row.original, n.row.index)),
|
|
2966
|
+
"aria-keyshortcuts": Ia.value ? "ArrowUp ArrowDown ArrowLeft ArrowRight" : "ArrowUp ArrowDown",
|
|
2967
|
+
onKeydown: (e) => Wa(n.row, e),
|
|
2968
|
+
onPointerdown: (e) => Na.value = n.row.id,
|
|
2969
|
+
onPointerup: t[14] ||= (e) => Na.value = Ma.value ? Na.value : null
|
|
2970
|
+
}, [x(M(Ne), {
|
|
2971
|
+
class: T(J.value.dragIcon()),
|
|
2942
2972
|
"aria-hidden": "true"
|
|
2943
|
-
}, null, 8, ["class"])], 42,
|
|
2973
|
+
}, null, 8, ["class"])], 42, lr)) : e === "select" && $i.value ? (D(), v("span", {
|
|
2944
2974
|
key: 1,
|
|
2945
|
-
onClickCapture:
|
|
2946
|
-
onKeydownCapture:
|
|
2947
|
-
}, [
|
|
2948
|
-
checked:
|
|
2975
|
+
onClickCapture: la,
|
|
2976
|
+
onKeydownCapture: la
|
|
2977
|
+
}, [x(ee, {
|
|
2978
|
+
checked: ta(n.row),
|
|
2949
2979
|
disabled: !n.row.getCanSelect(),
|
|
2950
|
-
"aria-label":
|
|
2951
|
-
"onUpdate:checked": (e) =>
|
|
2980
|
+
"aria-label": M(L).selectRow(G(n.row.original, n.row.index)),
|
|
2981
|
+
"onUpdate:checked": (e) => ca(n.row, e === !0, M(oa))
|
|
2952
2982
|
}, null, 8, [
|
|
2953
2983
|
"checked",
|
|
2954
2984
|
"disabled",
|
|
2955
2985
|
"aria-label",
|
|
2956
2986
|
"onUpdate:checked"
|
|
2957
|
-
])], 32)) : e === "select" ? (
|
|
2987
|
+
])], 32)) : e === "select" ? (D(), v("input", {
|
|
2958
2988
|
key: 2,
|
|
2959
2989
|
type: "radio",
|
|
2960
|
-
name:
|
|
2961
|
-
class:
|
|
2962
|
-
checked:
|
|
2990
|
+
name: ia,
|
|
2991
|
+
class: T(J.value.radio()),
|
|
2992
|
+
checked: ta(n.row),
|
|
2963
2993
|
disabled: !n.row.getCanSelect(),
|
|
2964
|
-
"aria-label":
|
|
2965
|
-
onChange: (e) =>
|
|
2966
|
-
}, null, 42,
|
|
2994
|
+
"aria-label": M(L).selectRow(G(n.row.original, n.row.index)),
|
|
2995
|
+
onChange: (e) => ca(n.row, !0)
|
|
2996
|
+
}, null, 42, ur)) : e === "expand" ? (D(), v("button", {
|
|
2967
2997
|
key: 3,
|
|
2968
2998
|
type: "button",
|
|
2969
|
-
class:
|
|
2999
|
+
class: T(J.value.expander()),
|
|
2970
3000
|
"aria-expanded": n.row.getIsExpanded(),
|
|
2971
|
-
"aria-controls": n.row.getIsExpanded() ?
|
|
2972
|
-
"aria-label":
|
|
3001
|
+
"aria-controls": n.row.getIsExpanded() ? va(n.row) : void 0,
|
|
3002
|
+
"aria-label": M(L).details(G(n.row.original, n.row.index)),
|
|
2973
3003
|
onClick: (e) => n.row.toggleExpanded()
|
|
2974
|
-
}, [
|
|
2975
|
-
class:
|
|
3004
|
+
}, [x(M(Te), {
|
|
3005
|
+
class: T(J.value.expanderIcon()),
|
|
2976
3006
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
2977
3007
|
"aria-hidden": "true"
|
|
2978
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3008
|
+
}, null, 8, ["class", "data-state"])], 10, dr)) : (D(), v("span", {
|
|
2979
3009
|
key: 4,
|
|
2980
|
-
class:
|
|
2981
|
-
},
|
|
2982
|
-
(
|
|
3010
|
+
class: T(J.value.rowNumber())
|
|
3011
|
+
}, j(_a.value.get(n.row.id)), 3))], 6))), 128)),
|
|
3012
|
+
(D(!0), v(m, null, k(n.row.getVisibleCells(), (t, r) => (D(), v(m, { key: t.id }, [Ts(n.index, r) ? (D(), v("td", ce({
|
|
2983
3013
|
key: 0,
|
|
2984
|
-
class:
|
|
2985
|
-
style:
|
|
2986
|
-
}, { ref_for: !0 },
|
|
2987
|
-
class:
|
|
3014
|
+
class: ti(t.column.id).td({ class: [pi(t.column.id, !1), ...Es(n.row, t.column.id, n.index, r).className] }),
|
|
3015
|
+
style: mi(t.column.id, !1)
|
|
3016
|
+
}, { ref_for: !0 }, Es(n.row, t.column.id, n.index, r).attributes), [(D(), g(pe((a.getSubRows || U.value.length) && r === 0 ? "div" : Aa), ce({ ref_for: !0 }, (a.getSubRows || U.value.length) && r === 0 ? {
|
|
3017
|
+
class: J.value.treeCell(),
|
|
2988
3018
|
style: { paddingInlineStart: `${n.row.depth * 20}px` }
|
|
2989
3019
|
} : {}), {
|
|
2990
|
-
default:
|
|
3020
|
+
default: P(() => [(a.getSubRows || U.value.length) && r === 0 ? (D(), v(m, { key: 0 }, [a.getSubRows && n.row.getCanExpand() ? (D(), v("button", {
|
|
2991
3021
|
key: 0,
|
|
2992
3022
|
type: "button",
|
|
2993
|
-
class:
|
|
3023
|
+
class: T(J.value.expander()),
|
|
2994
3024
|
"aria-expanded": n.row.getIsExpanded(),
|
|
2995
|
-
"aria-label":
|
|
3025
|
+
"aria-label": Br(n.row.original, n.row.index),
|
|
2996
3026
|
onClick: (e) => n.row.getToggleExpandedHandler()()
|
|
2997
|
-
}, [
|
|
2998
|
-
class:
|
|
3027
|
+
}, [x(M(Te), {
|
|
3028
|
+
class: T(J.value.expanderIcon()),
|
|
2999
3029
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
3000
3030
|
"aria-hidden": "true"
|
|
3001
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3031
|
+
}, null, 8, ["class", "data-state"])], 10, fr)) : (D(), v("span", {
|
|
3002
3032
|
key: 1,
|
|
3003
|
-
class:
|
|
3004
|
-
}, null, 2))], 64)) :
|
|
3033
|
+
class: T(J.value.expanderSpacer())
|
|
3034
|
+
}, null, 2))], 64)) : _("", !0), z.value.get(t.column.id)?.editable && (ri.value && uo.value?.rowId === n.row.id && uo.value.columnId === t.column.id || a.editMode === "row" && fo.value === n.row.id) ? (D(), v("div", {
|
|
3005
3035
|
key: 1,
|
|
3006
3036
|
"data-editor": "",
|
|
3007
|
-
class:
|
|
3008
|
-
"aria-busy":
|
|
3009
|
-
onKeydown: (e) =>
|
|
3010
|
-
onFocusout: (e) =>
|
|
3011
|
-
}, [
|
|
3037
|
+
class: T(J.value.editor()),
|
|
3038
|
+
"aria-busy": Co.value || void 0,
|
|
3039
|
+
onKeydown: (e) => ri.value ? Oo(n.row, t.column.id, e) : Fo(n.row, e),
|
|
3040
|
+
onFocusout: (e) => ri.value ? ko(n.row, t.column.id, e) : void 0
|
|
3041
|
+
}, [M(I)[`editor-${t.column.id}`] ? A(e.$slots, `editor-${t.column.id}`, ce({ ref_for: !0 }, Mo(n.row, z.value.get(t.column.id))), void 0, void 0, 0) : (D(), g(Pn, {
|
|
3012
3042
|
key: 1,
|
|
3013
|
-
type:
|
|
3043
|
+
type: go(z.value.get(t.column.id)),
|
|
3014
3044
|
label: X(t.column),
|
|
3015
|
-
options:
|
|
3016
|
-
invalid: !!
|
|
3017
|
-
"model-value":
|
|
3018
|
-
"onUpdate:modelValue": (e) =>
|
|
3045
|
+
options: z.value.get(t.column.id).editOptions,
|
|
3046
|
+
invalid: !!mo.value[t.column.id],
|
|
3047
|
+
"model-value": po.value[t.column.id],
|
|
3048
|
+
"onUpdate:modelValue": (e) => jo(n.row, z.value.get(t.column.id), e)
|
|
3019
3049
|
}, null, 8, [
|
|
3020
3050
|
"type",
|
|
3021
3051
|
"label",
|
|
@@ -3023,110 +3053,110 @@ var jn = On({
|
|
|
3023
3053
|
"invalid",
|
|
3024
3054
|
"model-value",
|
|
3025
3055
|
"onUpdate:modelValue"
|
|
3026
|
-
])),
|
|
3056
|
+
])), mo.value[t.column.id] ? (D(), v("span", {
|
|
3027
3057
|
key: 2,
|
|
3028
|
-
id:
|
|
3058
|
+
id: vo(n.row.id, t.column.id),
|
|
3029
3059
|
role: "alert",
|
|
3030
|
-
class:
|
|
3031
|
-
},
|
|
3060
|
+
class: T(J.value.editError())
|
|
3061
|
+
}, j(mo.value[t.column.id]), 11, mr)) : _("", !0)], 42, pr)) : ri.value && z.value.get(t.column.id)?.editable ? (D(), v("button", {
|
|
3032
3062
|
key: 2,
|
|
3033
3063
|
type: "button",
|
|
3034
|
-
class:
|
|
3035
|
-
"data-edit":
|
|
3036
|
-
"aria-label": `${
|
|
3037
|
-
onClick: (e) =>
|
|
3038
|
-
}, [
|
|
3064
|
+
class: T(ti(t.column.id).editButton()),
|
|
3065
|
+
"data-edit": _o(n.row.id, t.column.id),
|
|
3066
|
+
"aria-label": `${M(L).edit(X(t.column), B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))}${Ds(n.row, t.column.id) ? `, ${M(L).changed}` : ""}`,
|
|
3067
|
+
onClick: (e) => So(n.row, t.column.id)
|
|
3068
|
+
}, [A(e.$slots, `cell-${t.column.id}`, {
|
|
3039
3069
|
row: n.row.original,
|
|
3040
3070
|
value: Q(n.row, t.column.id)
|
|
3041
|
-
}, () => [
|
|
3071
|
+
}, () => [b(j(B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)])], 10, hr)) : z.value.get(t.column.id)?.copyable ? (D(), v("span", {
|
|
3042
3072
|
key: 3,
|
|
3043
|
-
class:
|
|
3044
|
-
}, [
|
|
3073
|
+
class: T(J.value.copyCell())
|
|
3074
|
+
}, [A(e.$slots, `cell-${t.column.id}`, {
|
|
3045
3075
|
row: n.row.original,
|
|
3046
3076
|
value: Q(n.row, t.column.id)
|
|
3047
|
-
}, () => [
|
|
3048
|
-
value: z
|
|
3049
|
-
label:
|
|
3050
|
-
}, null, 8, ["value", "label"])], 2)) : (
|
|
3077
|
+
}, () => [b(j(B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)]), x(ie, {
|
|
3078
|
+
value: B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3079
|
+
label: M(L).copy(X(t.column), B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))
|
|
3080
|
+
}, null, 8, ["value", "label"])], 2)) : (D(), g(pe(pa(n.row, t.column.id) ? "a" : Aa), ce({
|
|
3051
3081
|
key: 4,
|
|
3052
3082
|
ref_for: !0
|
|
3053
|
-
},
|
|
3054
|
-
href:
|
|
3055
|
-
class:
|
|
3083
|
+
}, pa(n.row, t.column.id) ? {
|
|
3084
|
+
href: pa(n.row, t.column.id),
|
|
3085
|
+
class: J.value.rowLink(),
|
|
3056
3086
|
"data-row-link": ""
|
|
3057
3087
|
} : {}), {
|
|
3058
|
-
default:
|
|
3088
|
+
default: P(() => [A(e.$slots, `cell-${t.column.id}`, {
|
|
3059
3089
|
row: n.row.original,
|
|
3060
3090
|
value: Q(n.row, t.column.id)
|
|
3061
|
-
}, () => [
|
|
3091
|
+
}, () => [Cc.value ? (D(), g(re, {
|
|
3062
3092
|
key: 0,
|
|
3063
|
-
text: z
|
|
3064
|
-
query:
|
|
3065
|
-
}, null, 8, ["text", "query"])) : (
|
|
3093
|
+
text: B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3094
|
+
query: Cc.value
|
|
3095
|
+
}, null, 8, ["text", "query"])) : (D(), v(m, { key: 1 }, [b(j(B(z.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)], 64))])]),
|
|
3066
3096
|
_: 2
|
|
3067
3097
|
}, 1040))]),
|
|
3068
3098
|
_: 2
|
|
3069
|
-
}, 1040))], 16)) :
|
|
3070
|
-
|
|
3099
|
+
}, 1040))], 16)) : _("", !0)], 64))), 128)),
|
|
3100
|
+
oi.value.length ? (D(), v("td", {
|
|
3071
3101
|
key: 0,
|
|
3072
|
-
class:
|
|
3073
|
-
style:
|
|
3074
|
-
}, [
|
|
3075
|
-
icon:
|
|
3076
|
-
label:
|
|
3102
|
+
class: T(J.value.td({ class: gi("actions", !1) })),
|
|
3103
|
+
style: E(_i("actions"))
|
|
3104
|
+
}, [y("div", { class: T(J.value.editActions()) }, [a.editMode === "row" && ni.value ? (D(), v(m, { key: 0 }, [fo.value === n.row.id ? (D(), v(m, { key: 0 }, [x(f, {
|
|
3105
|
+
icon: M(Ce),
|
|
3106
|
+
label: M(L).saveRow(G(n.row.original, n.row.index)),
|
|
3077
3107
|
variant: "text",
|
|
3078
3108
|
size: "sm",
|
|
3079
|
-
onClick: (e) =>
|
|
3109
|
+
onClick: (e) => Po(n.row, !0)
|
|
3080
3110
|
}, null, 8, [
|
|
3081
3111
|
"icon",
|
|
3082
3112
|
"label",
|
|
3083
3113
|
"onClick"
|
|
3084
|
-
]),
|
|
3085
|
-
icon:
|
|
3086
|
-
label:
|
|
3114
|
+
]), x(f, {
|
|
3115
|
+
icon: M(We),
|
|
3116
|
+
label: M(L).cancelEdit(G(n.row.original, n.row.index)),
|
|
3087
3117
|
variant: "text",
|
|
3088
3118
|
size: "sm",
|
|
3089
|
-
onClick: (e) =>
|
|
3119
|
+
onClick: (e) => Po(n.row, !1)
|
|
3090
3120
|
}, null, 8, [
|
|
3091
3121
|
"icon",
|
|
3092
3122
|
"label",
|
|
3093
3123
|
"onClick"
|
|
3094
|
-
])], 64)) : (
|
|
3124
|
+
])], 64)) : (D(), g(f, {
|
|
3095
3125
|
key: 1,
|
|
3096
3126
|
"data-row-edit": n.row.id,
|
|
3097
|
-
icon:
|
|
3098
|
-
label:
|
|
3127
|
+
icon: M(Le),
|
|
3128
|
+
label: M(L).editRow(G(n.row.original, n.row.index)),
|
|
3099
3129
|
variant: "text",
|
|
3100
3130
|
size: "sm",
|
|
3101
|
-
onClick: (e) =>
|
|
3131
|
+
onClick: (e) => No(n.row)
|
|
3102
3132
|
}, null, 8, [
|
|
3103
3133
|
"data-row-edit",
|
|
3104
3134
|
"icon",
|
|
3105
3135
|
"label",
|
|
3106
3136
|
"onClick"
|
|
3107
|
-
]))], 64)) :
|
|
3137
|
+
]))], 64)) : _("", !0), a.rowActions && fo.value !== n.row.id ? (D(), g(u, {
|
|
3108
3138
|
key: 1,
|
|
3109
|
-
items:
|
|
3110
|
-
onSelect: (e) =>
|
|
3139
|
+
items: Ta(n.row),
|
|
3140
|
+
onSelect: (e) => Oa(n.row, e)
|
|
3111
3141
|
}, {
|
|
3112
|
-
default:
|
|
3113
|
-
icon:
|
|
3114
|
-
label:
|
|
3142
|
+
default: P(() => [x(f, {
|
|
3143
|
+
icon: M(je),
|
|
3144
|
+
label: M(L).rowActions(G(n.row.original, n.row.index)),
|
|
3115
3145
|
variant: "text",
|
|
3116
3146
|
size: "sm"
|
|
3117
3147
|
}, null, 8, ["icon", "label"])]),
|
|
3118
3148
|
_: 2
|
|
3119
|
-
}, 1032, ["items", "onSelect"])) :
|
|
3120
|
-
], 42,
|
|
3121
|
-
|
|
3149
|
+
}, 1032, ["items", "onSelect"])) : _("", !0)], 2)], 6)) : _("", !0)
|
|
3150
|
+
], 42, cr))], 64))), 128)),
|
|
3151
|
+
rc.value > 0 ? (D(), v("tr", {
|
|
3122
3152
|
key: 3,
|
|
3123
|
-
class:
|
|
3153
|
+
class: T(J.value.spacer()),
|
|
3124
3154
|
"aria-hidden": "true"
|
|
3125
|
-
}, [
|
|
3126
|
-
colspan:
|
|
3127
|
-
class:
|
|
3128
|
-
style:
|
|
3129
|
-
}, null, 14,
|
|
3155
|
+
}, [y("td", {
|
|
3156
|
+
colspan: si.value,
|
|
3157
|
+
class: T(J.value.spacerCell()),
|
|
3158
|
+
style: E({ height: `${rc.value}px` })
|
|
3159
|
+
}, null, 14, gr)], 2)) : _("", !0)
|
|
3130
3160
|
], 32)]),
|
|
3131
3161
|
_: 3
|
|
3132
3162
|
}, 8, [
|
|
@@ -3134,67 +3164,67 @@ var jn = On({
|
|
|
3134
3164
|
"items",
|
|
3135
3165
|
"label"
|
|
3136
3166
|
]),
|
|
3137
|
-
|
|
3167
|
+
xa.value ? (D(), v("tfoot", {
|
|
3138
3168
|
key: 1,
|
|
3139
|
-
class:
|
|
3140
|
-
}, [
|
|
3141
|
-
(
|
|
3169
|
+
class: T(J.value.foot())
|
|
3170
|
+
}, [y("tr", null, [
|
|
3171
|
+
(D(!0), v(m, null, k(ai.value, (e) => (D(), v("td", {
|
|
3142
3172
|
key: e,
|
|
3143
|
-
class:
|
|
3144
|
-
style:
|
|
3173
|
+
class: T(J.value.footCell({ class: gi(e, !1) })),
|
|
3174
|
+
style: E(_i(e))
|
|
3145
3175
|
}, null, 6))), 128)),
|
|
3146
|
-
(
|
|
3176
|
+
(D(!0), v(m, null, k(Y.value, (e) => (D(), v("td", {
|
|
3147
3177
|
key: e.id,
|
|
3148
|
-
class:
|
|
3149
|
-
style:
|
|
3150
|
-
},
|
|
3151
|
-
|
|
3178
|
+
class: T(ti(e.id).footCell({ class: pi(e.id, !1) })),
|
|
3179
|
+
style: E(mi(e.id, !1))
|
|
3180
|
+
}, j(wa(z.value.get(e.id))), 7))), 128)),
|
|
3181
|
+
oi.value.length ? (D(), v("td", {
|
|
3152
3182
|
key: 0,
|
|
3153
|
-
class:
|
|
3154
|
-
style:
|
|
3155
|
-
}, null, 6)) :
|
|
3156
|
-
])], 2)) :
|
|
3157
|
-
], 46,
|
|
3158
|
-
a.statusBar ? (
|
|
3183
|
+
class: T(J.value.footCell({ class: gi("actions", !1) })),
|
|
3184
|
+
style: E(_i("actions"))
|
|
3185
|
+
}, null, 6)) : _("", !0)
|
|
3186
|
+
])], 2)) : _("", !0)
|
|
3187
|
+
], 46, Bn)], 38),
|
|
3188
|
+
a.statusBar ? (D(), v("div", {
|
|
3159
3189
|
key: 5,
|
|
3160
|
-
class:
|
|
3190
|
+
class: T(J.value.statusBar())
|
|
3161
3191
|
}, [
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
a.selectable ? (
|
|
3165
|
-
(
|
|
3166
|
-
], 2)) :
|
|
3167
|
-
|
|
3192
|
+
y("span", null, j(M(L).rowCount(kc.value)), 1),
|
|
3193
|
+
Ui.value ? (D(), v("span", _r, j(M(L).filteredCount(M(K).getFilteredRowModel().rows.length)), 1)) : _("", !0),
|
|
3194
|
+
a.selectable ? (D(), v("span", vr, j(M(l).common.selectedCount(Js.value)), 1)) : _("", !0),
|
|
3195
|
+
(D(!0), v(m, null, k(Oc.value, (e) => (D(), v("span", { key: e.id }, j(e.text), 1))), 128))
|
|
3196
|
+
], 2)) : _("", !0),
|
|
3197
|
+
vc.value && a.paginatorPosition === "bottom" ? (D(), v("div", {
|
|
3168
3198
|
key: 6,
|
|
3169
|
-
class:
|
|
3170
|
-
}, [
|
|
3199
|
+
class: T(J.value.footer())
|
|
3200
|
+
}, [bc.value.length ? (D(), v("div", {
|
|
3171
3201
|
key: 0,
|
|
3172
|
-
class:
|
|
3173
|
-
}, [
|
|
3174
|
-
class:
|
|
3175
|
-
"aria-label":
|
|
3176
|
-
items:
|
|
3177
|
-
"model-value": String(
|
|
3178
|
-
"onUpdate:modelValue": t[18] ||= (e) =>
|
|
3202
|
+
class: T(J.value.pageSize())
|
|
3203
|
+
}, [y("span", yr, j(M(L).rowsPerPage), 1), x(ne, {
|
|
3204
|
+
class: T(J.value.pageSizeSelect()),
|
|
3205
|
+
"aria-label": M(L).rowsPerPage,
|
|
3206
|
+
items: bc.value,
|
|
3207
|
+
"model-value": String(H.value.pageSize),
|
|
3208
|
+
"onUpdate:modelValue": t[18] ||= (e) => M(K).setPageSize(Number(e))
|
|
3179
3209
|
}, null, 8, [
|
|
3180
3210
|
"class",
|
|
3181
3211
|
"aria-label",
|
|
3182
3212
|
"items",
|
|
3183
3213
|
"model-value"
|
|
3184
|
-
])], 2)) :
|
|
3185
|
-
count:
|
|
3186
|
-
"page-size":
|
|
3187
|
-
page:
|
|
3188
|
-
translations: { rootLabel: `${a.caption}: ${
|
|
3189
|
-
"onUpdate:page": t[19] ||= (e) =>
|
|
3214
|
+
])], 2)) : _("", !0), x(r, {
|
|
3215
|
+
count: yc.value,
|
|
3216
|
+
"page-size": H.value.pageSize,
|
|
3217
|
+
page: H.value.pageIndex + 1,
|
|
3218
|
+
translations: { rootLabel: `${a.caption}: ${M(l).pagination.rootLabel}` },
|
|
3219
|
+
"onUpdate:page": t[19] ||= (e) => M(K).setPageIndex(e - 1)
|
|
3190
3220
|
}, null, 8, [
|
|
3191
3221
|
"count",
|
|
3192
3222
|
"page-size",
|
|
3193
3223
|
"page",
|
|
3194
3224
|
"translations"
|
|
3195
|
-
])], 2)) :
|
|
3196
|
-
], 16,
|
|
3225
|
+
])], 2)) : _("", !0)
|
|
3226
|
+
], 16, In)], 8, ["disabled"]));
|
|
3197
3227
|
}
|
|
3198
|
-
});
|
|
3228
|
+
}), z = { dateInput: a }, Tr = { numberInput: o };
|
|
3199
3229
|
//#endregion
|
|
3200
|
-
export {
|
|
3230
|
+
export { wr as DataTable, $e as createDataController, I as dataSourceToRows, z as dateInput, ot as defineMatchMode, Nt as moveItem, Pt as moveTreeRow, Tr as numberInput, Yt as rowsToDataSource };
|