@slotted/react 0.1.0-beta.36 → 0.1.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar-D8FhdXWc.js +537 -0
- package/dist/calendar.js +1 -1
- package/dist/{cascader-DqrFX3Ob.js → cascader-CivJ76VR.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/{chart-BaNN4AQj.js → chart-DwXqQZjQ.js} +234 -233
- package/dist/chart.js +1 -1
- package/dist/{checkbox-ruvmi9cK.js → checkbox-D3E4gzMe.js} +3 -3
- package/dist/{checkbox-group-Ben6o9Ze.js → checkbox-group-Dg5YN3fx.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-D97FQrzs.js → collapsible-CT4_3aXm.js} +1 -0
- package/dist/collapsible.js +1 -1
- package/dist/{color-picker-DhKW6Uyc.js → color-picker-CaLcV-63.js} +2 -2
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-D2PXs80l.js → column-manager-BBGczWQe.js} +2 -2
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-BIi7grOR.js → combobox-C2qlkTw6.js} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{currency-field-CAO2ZolW.js → currency-field-BO2P6FPd.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{data-grid-DOMm7-ew.js → data-grid-C5YmAqdN.js} +15 -15
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-DgXGmRQx.js → data-list-DovwQEMt.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/{date-field-BEdt1xDF.js → date-field-CxubN_3u.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-CQDvE1nB.js → date-picker-DQbj3FON.js} +3 -3
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-B28tj1yV.js → date-range-picker-B16hMhJf.js} +3 -3
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-2tsqzWVH.js → datetime-field-GMIqBuTa.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-CXLvcFxV.js → datetime-picker-C9pxH7Xf.js} +3 -3
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-BAXiRa2S.js → datetime-range-picker-Cmn7o_Qv.js} +3 -3
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-DEZewVVV.js → detail-panel-DLgRhEFO.js} +3 -3
- package/dist/detail-panel.js +1 -1
- package/dist/docs/button.json +1 -1
- package/dist/docs/button.md +1 -1
- package/dist/docs/calendar.json +22 -0
- package/dist/docs/calendar.md +4 -1
- package/dist/docs/chart.json +1 -1
- package/dist/docs/chart.md +1 -1
- package/dist/docs/collapsible.json +2 -1
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/floating-panel.json +22 -4
- package/dist/docs/floating-panel.md +6 -4
- package/dist/docs/message.json +7 -0
- package/dist/docs/message.md +1 -0
- package/dist/docs/page.json +7 -0
- package/dist/docs/page.md +1 -0
- package/dist/docs/section.json +10 -2
- package/dist/docs/section.md +2 -1
- package/dist/docs/skills/theme-app/SKILL.md +1 -1
- package/dist/docs/table.json +16 -4
- package/dist/docs/table.md +5 -3
- package/dist/{entity-picker-D1MwJyvr.js → entity-picker-CwfA1wr_.js} +2 -2
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CM302ec0.js → event-calendar-biSTH0yK.js} +1 -1
- package/dist/event-calendar.js +1 -1
- package/dist/{field-group-DQI8pfDT.js → field-group-7zV68b3d.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/{field-BjF0c0U9.js → field-vOVzvq5t.js} +27 -27
- package/dist/field.js +1 -1
- package/dist/{filter-bar-CDEpYvq4.js → filter-bar-Cfwk-3Eu.js} +8 -8
- package/dist/filter-bar.js +1 -1
- package/dist/floating-panel-Dp6S4GgU.js +163 -0
- package/dist/floating-panel.js +1 -1
- package/dist/import-export-center-BH1bNw_E.js +867 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +94 -94
- package/dist/{listbox-BGJ2fEDO.js → listbox-CWU3DiEt.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{markdown-CfPMPahy.js → markdown-x59MHBAa.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/{message-j4-apGnW.js → message-CdcUyh3g.js} +6 -5
- package/dist/message.js +1 -1
- package/dist/{multi-select-DSSDlWVZ.js → multi-select-DEd_92BC.js} +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-DzOcs9uG.js → number-field-BJKoidAE.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-ult9fNdj.js → otp-input-Czz9Z6dQ.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{prompt-composer-CUuAuR4h.js → prompt-composer-Lsfcz_i9.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-doL7tde1.js → radio-group-_ZRUgcI5.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-BtrkTAi0.js → rating-C6AkIIUi.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-fg5PoMgv.js → saved-views-BvRFgSdg.js} +2 -2
- package/dist/saved-views.js +1 -1
- package/dist/{section-OdQoVBnl.js → section-CQPQf6RU.js} +15 -2
- package/dist/section.js +2 -2
- package/dist/{segmented-control-CuwEdrZS.js → segmented-control-D52GeOlS.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/{select-C85IKiKk.js → select-BkUuIVBK.js} +1 -1
- package/dist/select.js +1 -1
- package/dist/{slider-yhqotDtS.js → slider-DQqQ0skr.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/calendar.css +3 -1
- package/dist/styles/cascader.css +3 -3
- package/dist/styles/chart.css +2 -2
- package/dist/styles/checkbox-group.css +2 -2
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +2 -2
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/combobox.css +2 -2
- package/dist/styles/currency-field.css +2 -2
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +2 -2
- package/dist/styles/data-list.css +3 -3
- package/dist/styles/date-field.css +2 -2
- package/dist/styles/date-picker.css +3 -3
- package/dist/styles/date-range-picker.css +3 -3
- package/dist/styles/datetime-field.css +2 -2
- package/dist/styles/datetime-picker.css +3 -3
- package/dist/styles/datetime-range-picker.css +3 -3
- package/dist/styles/detail-panel.css +2 -2
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +2 -2
- package/dist/styles/field-group.css +2 -2
- package/dist/styles/field.css +2 -2
- package/dist/styles/filter-bar.css +4 -4
- package/dist/styles/floating-panel.css +1 -1
- package/dist/styles/import-export-center.css +3 -3
- package/dist/styles/index.css +13 -13
- package/dist/styles/listbox.css +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/message.css +1 -1
- package/dist/styles/multi-select.css +2 -2
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/number-field.css +2 -2
- package/dist/styles/otp-input.css +2 -2
- package/dist/styles/page-header.css +1 -1
- package/dist/styles/page.css +1 -1
- package/dist/styles/prompt-composer.css +2 -2
- package/dist/styles/radio-group.css +2 -2
- package/dist/styles/rating.css +2 -2
- package/dist/styles/saved-views.css +3 -3
- package/dist/styles/section.css +1 -1
- package/dist/styles/segmented-control.css +2 -2
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +2 -2
- package/dist/styles/table.css +3 -3
- package/dist/styles/tags-input.css +2 -2
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/textarea.css +2 -2
- package/dist/styles/time-field.css +2 -2
- package/dist/styles/time-picker.css +2 -2
- package/dist/styles/time-range-picker.css +2 -2
- package/dist/styles/toggle-group.css +2 -2
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/tour.css +1 -1
- package/dist/styles/transfer.css +3 -3
- package/dist/styles/upload.css +2 -2
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-C5WjteaS.js → switch-C2krbZHI.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-D8-WlkFz.js → table-CnXBp9j9.js} +357 -344
- package/dist/table.js +2 -2
- package/dist/{tags-input-_cYR2JSK.js → tags-input-O87zTh7h.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-DEm3MEe2.js → text-field-Cnjc7LB5.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-BRRn55L2.js → textarea-DcA7jwOM.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-C9dFaZOx.js → time-field-BanhrUvf.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-Cw9NezUE.js → time-picker-B4-GsO24.js} +2 -2
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-DmmUqGjV.js → time-range-picker-DVOWN8PF.js} +2 -2
- package/dist/time-range-picker.js +1 -1
- package/dist/{toggle-group-DiKxYOwh.js → toggle-group-D7GQyNQP.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{transfer-CuNCXEoR.js → transfer-CuLlF_nY.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/button/button.types.d.ts +2 -1
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/calendar/calendar-day-button.d.ts +12 -0
- package/dist/types/calendar/calendar-day-button.d.ts.map +1 -0
- package/dist/types/calendar/calendar-header.d.ts +20 -0
- package/dist/types/calendar/calendar-header.d.ts.map +1 -0
- package/dist/types/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +14 -0
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible-parts.d.ts +1 -1
- package/dist/types/collapsible/collapsible-parts.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible.types.d.ts +1 -0
- package/dist/types/collapsible/collapsible.types.d.ts.map +1 -1
- package/dist/types/floating-panel/floating-panel.d.ts +1 -1
- package/dist/types/floating-panel/floating-panel.d.ts.map +1 -1
- package/dist/types/floating-panel/floating-panel.types.d.ts +6 -2
- package/dist/types/floating-panel/floating-panel.types.d.ts.map +1 -1
- package/dist/types/message/message-parts.d.ts +4 -3
- package/dist/types/message/message-parts.d.ts.map +1 -1
- package/dist/types/message/message.types.d.ts +6 -0
- package/dist/types/message/message.types.d.ts.map +1 -1
- package/dist/types/section/index.d.ts +1 -1
- package/dist/types/section/index.d.ts.map +1 -1
- package/dist/types/section/section-parts.d.ts +6 -0
- package/dist/types/section/section-parts.d.ts.map +1 -1
- package/dist/types/table/index.d.ts +2 -2
- package/dist/types/table/index.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +7 -1
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/table/table.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +8 -3
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/{upload-Bpjlax3i.js → upload-DggJrkQ7.js} +1 -1
- package/dist/upload.js +1 -1
- package/package.json +6 -6
- package/dist/calendar-CjVx7amB.js +0 -511
- package/dist/floating-panel-84VLZdhL.js +0 -166
- package/dist/import-export-center-DdANj0_T.js +0 -867
|
@@ -0,0 +1,867 @@
|
|
|
1
|
+
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
|
+
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
|
+
import { t as i } from "./spinner-ring-DyfaYloA.js";
|
|
4
|
+
import { n as a } from "./progress-indicator-D0acshNn.js";
|
|
5
|
+
import { n as o } from "./icon-button-N8Madx6i.js";
|
|
6
|
+
import { r as s } from "./button-BMRInd-t.js";
|
|
7
|
+
import { a as c, i as l, n as u, r as d } from "./tooltip-DrFiRlH8.js";
|
|
8
|
+
import { i as f, t as p } from "./skeleton-DeEOmm1y.js";
|
|
9
|
+
import { i as m, n as h, o as g, r as _, t as v } from "./result-state-BMYhelu1.js";
|
|
10
|
+
import { a as ee, r as te, t as y } from "./tabs-C-Bc7WmQ.js";
|
|
11
|
+
import { c as b, f as x, j as S, k as C, l as w, u as T, v as ne, x as E } from "./table-CnXBp9j9.js";
|
|
12
|
+
import { v as re } from "./toast-DHDVXIew.js";
|
|
13
|
+
import { keyedProps as ie, selectorKeyProps as ae } from "@slotted/core/selector-key";
|
|
14
|
+
import { createControllable as oe } from "@slotted/core/state";
|
|
15
|
+
import { createContext as se, createElement as ce, useCallback as D, useContext as le, useEffect as O, useId as ue, useImperativeHandle as de, useLayoutEffect as fe, useMemo as pe, useRef as k, useState as A } from "react";
|
|
16
|
+
import { Fragment as me, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
17
|
+
import { importExportCenterMessages as he } from "@slotted/core/i18n";
|
|
18
|
+
import { fileKind as ge, formatBytes as N, splitName as _e } from "@slotted/core/upload";
|
|
19
|
+
import { getLiveAnnouncer as ve } from "@slotted/core/live-announcer";
|
|
20
|
+
import { activeJobCount as ye, fileAvailability as P, filterJobs as be, focusDestination as xe, hasDetails as Se, isFinishedJob as Ce, jobAnnouncement as we, jobControls as Te, jobGlyph as Ee, jobNotice as De, jobOutcome as Oe, jobProgressText as ke, jobStatusText as Ae, jobSummaryText as je, jobTransition as Me, remainingSeconds as Ne } from "@slotted/core/import-export-center";
|
|
21
|
+
import { formatTimestamp as F } from "@slotted/core/timeline";
|
|
22
|
+
//#region src/import-export-center/import-export-center-defaults.tsx
|
|
23
|
+
var I = se({
|
|
24
|
+
growing: "none",
|
|
25
|
+
level: "2",
|
|
26
|
+
size: "md",
|
|
27
|
+
timeFormat: "relative"
|
|
28
|
+
});
|
|
29
|
+
function Pe() {
|
|
30
|
+
return le(I);
|
|
31
|
+
}
|
|
32
|
+
function Fe({ children: e, ...t }) {
|
|
33
|
+
let n = Pe();
|
|
34
|
+
return /* @__PURE__ */ j(I.Provider, {
|
|
35
|
+
value: {
|
|
36
|
+
growing: t.growing ?? n.growing,
|
|
37
|
+
level: t.level ?? n.level,
|
|
38
|
+
size: t.size ?? n.size,
|
|
39
|
+
timeFormat: t.timeFormat ?? n.timeFormat,
|
|
40
|
+
timeZone: t.timeZone ?? n.timeZone
|
|
41
|
+
},
|
|
42
|
+
children: e
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/import-export-center/import-export-center.tsx
|
|
47
|
+
var L = {
|
|
48
|
+
pdf: "file-text",
|
|
49
|
+
document: "file-type",
|
|
50
|
+
spreadsheet: "file-spreadsheet",
|
|
51
|
+
presentation: "presentation",
|
|
52
|
+
image: "file-image",
|
|
53
|
+
video: "file-video",
|
|
54
|
+
audio: "file-audio",
|
|
55
|
+
archive: "file-archive",
|
|
56
|
+
other: "file"
|
|
57
|
+
}, Ie = [
|
|
58
|
+
"job-title",
|
|
59
|
+
"download",
|
|
60
|
+
"retry",
|
|
61
|
+
"cancel",
|
|
62
|
+
"toggle",
|
|
63
|
+
"remove"
|
|
64
|
+
], Le = 3, Re = 12, R = {
|
|
65
|
+
day: "numeric",
|
|
66
|
+
month: "short",
|
|
67
|
+
hour: "2-digit",
|
|
68
|
+
minute: "2-digit"
|
|
69
|
+
};
|
|
70
|
+
function z(e, t) {
|
|
71
|
+
let n = !1;
|
|
72
|
+
return {
|
|
73
|
+
reason: e,
|
|
74
|
+
source: t,
|
|
75
|
+
get cancelled() {
|
|
76
|
+
return n;
|
|
77
|
+
},
|
|
78
|
+
cancel() {
|
|
79
|
+
n = !0;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function B(e) {
|
|
84
|
+
return e.detail === 0 ? "keyboard" : "pointer";
|
|
85
|
+
}
|
|
86
|
+
function V(e) {
|
|
87
|
+
return e != null && e !== !1;
|
|
88
|
+
}
|
|
89
|
+
function ze(e) {
|
|
90
|
+
return e.replace(/[^\w-]/g, (e) => `-${e.charCodeAt(0).toString(16)}-`);
|
|
91
|
+
}
|
|
92
|
+
function Be(e, t) {
|
|
93
|
+
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
94
|
+
}
|
|
95
|
+
function H(e) {
|
|
96
|
+
let t = e.result ?? e.source;
|
|
97
|
+
return t === void 0 ? e.format === void 0 ? "other" : ge({
|
|
98
|
+
name: `job.${e.format.toLowerCase()}`,
|
|
99
|
+
type: ""
|
|
100
|
+
}) : ge({
|
|
101
|
+
name: t.name,
|
|
102
|
+
type: t.type ?? ""
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function U({ name: e }) {
|
|
106
|
+
let { stem: t, extension: n } = _e(e);
|
|
107
|
+
return /* @__PURE__ */ M("span", {
|
|
108
|
+
"data-part": "file-name",
|
|
109
|
+
"data-part-file-name": "",
|
|
110
|
+
dir: "auto",
|
|
111
|
+
children: [/* @__PURE__ */ j("span", {
|
|
112
|
+
"data-part": "name",
|
|
113
|
+
"data-part-name": "",
|
|
114
|
+
children: t
|
|
115
|
+
}), n === "" ? null : /* @__PURE__ */ j("span", {
|
|
116
|
+
"data-part": "extension",
|
|
117
|
+
"data-part-extension": "",
|
|
118
|
+
children: n
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function Ve({ label: e, describedBy: t, onPress: i }) {
|
|
123
|
+
return /* @__PURE__ */ M(c, {
|
|
124
|
+
openOn: "hover",
|
|
125
|
+
side: "bottom",
|
|
126
|
+
children: [/* @__PURE__ */ j(l, {
|
|
127
|
+
"aria-describedby": t,
|
|
128
|
+
"aria-label": e,
|
|
129
|
+
"data-part": "remove",
|
|
130
|
+
"data-part-remove": "",
|
|
131
|
+
onClick: i,
|
|
132
|
+
children: /* @__PURE__ */ j(r, { children: /* @__PURE__ */ j(n, { name: "x" }) })
|
|
133
|
+
}), /* @__PURE__ */ j(d, { children: /* @__PURE__ */ j(u, { children: e }) })]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function W({ context: e, file: t, job: n, role: r, label: i, id: a, labelledBy: c, describedBy: l, variant: u }) {
|
|
137
|
+
let d = (t) => {
|
|
138
|
+
let i = z(B(t), t);
|
|
139
|
+
e.onDownload?.({
|
|
140
|
+
key: n.key,
|
|
141
|
+
file: r
|
|
142
|
+
}, i), i.cancelled && t.preventDefault();
|
|
143
|
+
}, f = {
|
|
144
|
+
...a === void 0 ? {} : { id: a },
|
|
145
|
+
...c === void 0 ? {} : { "aria-labelledby": c },
|
|
146
|
+
...l === void 0 ? {} : { "aria-describedby": l }
|
|
147
|
+
};
|
|
148
|
+
return /* @__PURE__ */ j("span", {
|
|
149
|
+
"data-part": "download",
|
|
150
|
+
"data-part-download": "",
|
|
151
|
+
children: t.href === void 0 ? /* @__PURE__ */ j(o, {
|
|
152
|
+
...f,
|
|
153
|
+
onClick: d,
|
|
154
|
+
size: "sm",
|
|
155
|
+
tone: "secondary",
|
|
156
|
+
variant: u,
|
|
157
|
+
children: i
|
|
158
|
+
}) : /* @__PURE__ */ j(s, {
|
|
159
|
+
...f,
|
|
160
|
+
download: t.name,
|
|
161
|
+
href: t.href,
|
|
162
|
+
onClick: d,
|
|
163
|
+
size: "sm",
|
|
164
|
+
tone: "secondary",
|
|
165
|
+
variant: u,
|
|
166
|
+
children: i
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function G(e, t) {
|
|
171
|
+
return F(e, {
|
|
172
|
+
absolute: R,
|
|
173
|
+
format: "absolute",
|
|
174
|
+
locale: t.locale,
|
|
175
|
+
timeZone: t.timeZone
|
|
176
|
+
}).text;
|
|
177
|
+
}
|
|
178
|
+
function He(e, t) {
|
|
179
|
+
if (e.message !== void 0 && e.message !== "") return e.message;
|
|
180
|
+
let n = {
|
|
181
|
+
now: t.now,
|
|
182
|
+
timeZone: t.timeZone
|
|
183
|
+
}, r = e.result, i = P(r, n);
|
|
184
|
+
return r === void 0 ? null : i === "denied" ? r.denied ?? null : r.expiresAt === void 0 ? null : i === "expired" ? t.t("expired", { date: G(r.expiresAt, t) }) : i === "expires" ? t.t("expires", { date: G(r.expiresAt, t) }) : null;
|
|
185
|
+
}
|
|
186
|
+
function Ue({ context: e, job: t }) {
|
|
187
|
+
let { t: n, locale: r } = e, i = e.ids(t.key), a = new Intl.NumberFormat(r), o = {
|
|
188
|
+
now: e.now,
|
|
189
|
+
timeZone: e.timeZone
|
|
190
|
+
}, s = t.counts ?? {}, c = [
|
|
191
|
+
"total",
|
|
192
|
+
"processed",
|
|
193
|
+
"created",
|
|
194
|
+
"updated",
|
|
195
|
+
"skipped",
|
|
196
|
+
"failed"
|
|
197
|
+
].filter((e) => typeof s[e] == "number"), l = [
|
|
198
|
+
["source", t.source],
|
|
199
|
+
["result", t.result],
|
|
200
|
+
["errors", t.errorsFile]
|
|
201
|
+
].filter((e) => e[1] !== void 0), u = t.errors ?? [], d = Math.max(t.errorCount ?? 0, u.length);
|
|
202
|
+
return /* @__PURE__ */ M("div", {
|
|
203
|
+
"aria-labelledby": i.toggle,
|
|
204
|
+
"data-part": "details",
|
|
205
|
+
"data-part-details": "",
|
|
206
|
+
id: i.details,
|
|
207
|
+
role: "region",
|
|
208
|
+
children: [
|
|
209
|
+
c.length > 0 ? /* @__PURE__ */ j("dl", {
|
|
210
|
+
"data-part": "counts",
|
|
211
|
+
"data-part-counts": "",
|
|
212
|
+
children: c.map((e) => /* @__PURE__ */ M("div", {
|
|
213
|
+
"data-count": e,
|
|
214
|
+
children: [/* @__PURE__ */ j("dt", { children: n(`countLabels.${e}`) }), /* @__PURE__ */ j("dd", { children: a.format(s[e] ?? 0) })]
|
|
215
|
+
}, e))
|
|
216
|
+
}) : null,
|
|
217
|
+
l.length > 0 ? /* @__PURE__ */ j("ul", {
|
|
218
|
+
"data-part": "files",
|
|
219
|
+
"data-part-files": "",
|
|
220
|
+
children: l.map(([i, a]) => {
|
|
221
|
+
let s = P(a, o), c = s === "denied" ? a.denied : a.expiresAt === void 0 ? void 0 : n(s === "expired" ? "expired" : "expires", { date: G(a.expiresAt, e) }), l = s === "available" || s === "expires";
|
|
222
|
+
return /* @__PURE__ */ M("li", {
|
|
223
|
+
"data-part": "file",
|
|
224
|
+
"data-part-file": "",
|
|
225
|
+
"data-availability": s,
|
|
226
|
+
children: [/* @__PURE__ */ M("span", {
|
|
227
|
+
"data-part": "meta",
|
|
228
|
+
"data-part-meta": "",
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ j("strong", { children: n(`fileLabels.${i}`) }),
|
|
231
|
+
/* @__PURE__ */ j("span", { children: /* @__PURE__ */ j(U, { name: a.name }) }),
|
|
232
|
+
a.size === void 0 ? null : /* @__PURE__ */ j("span", { children: N(a.size, r) }),
|
|
233
|
+
c === void 0 ? null : /* @__PURE__ */ j("span", { children: c })
|
|
234
|
+
]
|
|
235
|
+
}), l ? /* @__PURE__ */ j(W, {
|
|
236
|
+
context: e,
|
|
237
|
+
file: a,
|
|
238
|
+
job: t,
|
|
239
|
+
label: n("download"),
|
|
240
|
+
role: i,
|
|
241
|
+
variant: "ghost"
|
|
242
|
+
}) : null]
|
|
243
|
+
}, i);
|
|
244
|
+
})
|
|
245
|
+
}) : null,
|
|
246
|
+
u.length > 0 ? /* @__PURE__ */ M("div", {
|
|
247
|
+
"data-part": "errors",
|
|
248
|
+
"data-part-errors": "",
|
|
249
|
+
children: [/* @__PURE__ */ j(S, {
|
|
250
|
+
columns: 4,
|
|
251
|
+
variant: "framed",
|
|
252
|
+
children: /* @__PURE__ */ M(C, { children: [
|
|
253
|
+
/* @__PURE__ */ j(w, { children: n("errorsCaption") }),
|
|
254
|
+
/* @__PURE__ */ j(ne, { children: /* @__PURE__ */ M(E, { children: [
|
|
255
|
+
/* @__PURE__ */ j(x, {
|
|
256
|
+
numeric: !0,
|
|
257
|
+
children: n("errorColumns.row")
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ j(x, { children: n("errorColumns.message") }),
|
|
260
|
+
/* @__PURE__ */ j(x, { children: n("errorColumns.column") }),
|
|
261
|
+
/* @__PURE__ */ j(x, { children: n("errorColumns.value") })
|
|
262
|
+
] }) }),
|
|
263
|
+
/* @__PURE__ */ j(b, { children: u.map((e, t) => /* @__PURE__ */ M(E, { children: [
|
|
264
|
+
/* @__PURE__ */ j(T, {
|
|
265
|
+
numeric: !0,
|
|
266
|
+
children: a.format(e.row)
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ j(T, { children: e.message }),
|
|
269
|
+
/* @__PURE__ */ j(T, { children: e.column ?? "" }),
|
|
270
|
+
/* @__PURE__ */ j(T, { children: e.value ?? "" })
|
|
271
|
+
] }, `${e.row}-${t}`)) })
|
|
272
|
+
] })
|
|
273
|
+
}), d > u.length ? /* @__PURE__ */ j("p", {
|
|
274
|
+
"data-part": "errors-note",
|
|
275
|
+
"data-part-errors-note": "",
|
|
276
|
+
children: /* @__PURE__ */ j("span", { children: n("sample", {
|
|
277
|
+
shown: u.length,
|
|
278
|
+
total: d
|
|
279
|
+
}) })
|
|
280
|
+
}) : null]
|
|
281
|
+
}) : null
|
|
282
|
+
]
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function We({ context: e, job: t }) {
|
|
286
|
+
let { t: s, locale: c } = e, l = e.ids(t.key), u = {
|
|
287
|
+
now: e.now,
|
|
288
|
+
timeZone: e.timeZone
|
|
289
|
+
}, d = Oe(t), f = Te(t, u), p = e.expanded.has(t.key) && f.controls.includes("toggle"), m = Ee(t), h = t.direction === "export" ? t.result ?? t.source : t.source ?? t.result, g = t.status === "succeeded" || t.status === "failed" ? t.finishedAt ?? t.createdAt : t.createdAt, _ = g === void 0 ? null : F(g, {
|
|
290
|
+
format: e.timeFormat,
|
|
291
|
+
locale: c,
|
|
292
|
+
now: e.now,
|
|
293
|
+
timeZone: e.timeZone
|
|
294
|
+
}), v = t.status === "running" ? ke(t, {
|
|
295
|
+
locale: c,
|
|
296
|
+
t: s,
|
|
297
|
+
remaining: e.remaining.get(t.key)
|
|
298
|
+
}) : [], ee = je(t, {
|
|
299
|
+
locale: c,
|
|
300
|
+
t: s
|
|
301
|
+
}), te = He(t, e), y = e.renderJobActions?.(t), b = (e) => `${l.control(e)} ${l.title}`, x = (n) => {
|
|
302
|
+
let r = z(B(n), n);
|
|
303
|
+
e.onOpen?.(t.key, r), r.cancelled && n.preventDefault();
|
|
304
|
+
}, S = (i) => {
|
|
305
|
+
switch (i) {
|
|
306
|
+
case "download": {
|
|
307
|
+
let n = f.download ?? "result", r = n === "errors" ? t.errorsFile : t.result;
|
|
308
|
+
return r === void 0 ? null : /* @__PURE__ */ j(W, {
|
|
309
|
+
context: e,
|
|
310
|
+
describedBy: l.status,
|
|
311
|
+
file: r,
|
|
312
|
+
id: l.control("download"),
|
|
313
|
+
job: t,
|
|
314
|
+
label: s(n === "errors" ? "downloadErrors" : "download"),
|
|
315
|
+
labelledBy: b("download"),
|
|
316
|
+
role: n,
|
|
317
|
+
variant: "outline"
|
|
318
|
+
}, i);
|
|
319
|
+
}
|
|
320
|
+
case "cancel":
|
|
321
|
+
case "retry": return /* @__PURE__ */ ce("span", {
|
|
322
|
+
"data-part": i,
|
|
323
|
+
...ae("part", i),
|
|
324
|
+
key: i
|
|
325
|
+
}, /* @__PURE__ */ j(o, {
|
|
326
|
+
"aria-describedby": l.status,
|
|
327
|
+
"aria-labelledby": b(i),
|
|
328
|
+
id: l.control(i),
|
|
329
|
+
onClick: (n) => (i === "cancel" ? e.onCancel : e.onRetry)?.(t.key, z(B(n), n)),
|
|
330
|
+
size: "sm",
|
|
331
|
+
tone: "secondary",
|
|
332
|
+
variant: "outline",
|
|
333
|
+
children: i === "cancel" ? s("cancel") : f.retry === "regenerate" ? s("regenerate") : s("retry")
|
|
334
|
+
}));
|
|
335
|
+
case "toggle": return /* @__PURE__ */ j("span", {
|
|
336
|
+
"data-part": "toggle",
|
|
337
|
+
"data-part-toggle": "",
|
|
338
|
+
...p ? { "data-expanded": "" } : {},
|
|
339
|
+
children: /* @__PURE__ */ j(o, {
|
|
340
|
+
"aria-controls": l.details,
|
|
341
|
+
"aria-expanded": p,
|
|
342
|
+
"aria-labelledby": `${l.toggle} ${l.title}`,
|
|
343
|
+
end: /* @__PURE__ */ j("span", {
|
|
344
|
+
"data-part": "chevron",
|
|
345
|
+
"data-part-chevron": "",
|
|
346
|
+
children: /* @__PURE__ */ j(r, { children: /* @__PURE__ */ j(n, { name: "chevron-down" }) })
|
|
347
|
+
}),
|
|
348
|
+
id: l.toggle,
|
|
349
|
+
onClick: (n) => e.onToggle(t.key, B(n), n),
|
|
350
|
+
size: "sm",
|
|
351
|
+
tone: "secondary",
|
|
352
|
+
variant: "ghost",
|
|
353
|
+
children: s("details")
|
|
354
|
+
})
|
|
355
|
+
}, i);
|
|
356
|
+
case "remove": return /* @__PURE__ */ j(Ve, {
|
|
357
|
+
describedBy: l.title,
|
|
358
|
+
label: s("remove"),
|
|
359
|
+
onPress: (n) => e.onRemove?.({ keys: [t.key] }, z(B(n), n))
|
|
360
|
+
}, i);
|
|
361
|
+
default: return null;
|
|
362
|
+
}
|
|
363
|
+
}, C = f.controls.filter((e) => e !== "remove");
|
|
364
|
+
return /* @__PURE__ */ M("li", {
|
|
365
|
+
"data-direction": t.direction,
|
|
366
|
+
"data-key": t.key,
|
|
367
|
+
"data-part": "job",
|
|
368
|
+
"data-part-job": "",
|
|
369
|
+
"data-status": t.status,
|
|
370
|
+
...d === null ? {} : { "data-outcome": d },
|
|
371
|
+
...f.expired ? { "data-expired": "" } : {},
|
|
372
|
+
...p ? { "data-expanded": "" } : {},
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ j("span", {
|
|
375
|
+
"aria-hidden": "true",
|
|
376
|
+
"data-kind": H(t),
|
|
377
|
+
"data-part": "visual",
|
|
378
|
+
"data-part-visual": "",
|
|
379
|
+
children: /* @__PURE__ */ j(r, { children: /* @__PURE__ */ j(n, { name: L[H(t)] }) })
|
|
380
|
+
}),
|
|
381
|
+
/* @__PURE__ */ M("div", {
|
|
382
|
+
"data-part": "body",
|
|
383
|
+
"data-part-body": "",
|
|
384
|
+
children: [
|
|
385
|
+
/* @__PURE__ */ M("div", {
|
|
386
|
+
"data-part": "heading",
|
|
387
|
+
"data-part-heading": "",
|
|
388
|
+
children: [t.href === void 0 ? /* @__PURE__ */ j("span", {
|
|
389
|
+
"data-part": "job-title",
|
|
390
|
+
"data-part-job-title": "",
|
|
391
|
+
id: l.title,
|
|
392
|
+
tabIndex: -1,
|
|
393
|
+
children: t.title
|
|
394
|
+
}) : /* @__PURE__ */ j("a", {
|
|
395
|
+
"data-part": "job-title",
|
|
396
|
+
"data-part-job-title": "",
|
|
397
|
+
href: t.href,
|
|
398
|
+
id: l.title,
|
|
399
|
+
onClick: x,
|
|
400
|
+
children: t.title
|
|
401
|
+
}), /* @__PURE__ */ M("p", {
|
|
402
|
+
"data-part": "meta",
|
|
403
|
+
"data-part-meta": "",
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ j("span", { children: s(t.direction) }),
|
|
406
|
+
t.format === void 0 ? null : /* @__PURE__ */ j("span", { children: t.format }),
|
|
407
|
+
h === void 0 ? null : /* @__PURE__ */ j("span", { children: /* @__PURE__ */ j(U, { name: h.name }) }),
|
|
408
|
+
h?.size === void 0 ? null : /* @__PURE__ */ j("span", { children: N(h.size, c) }),
|
|
409
|
+
t.actor === void 0 ? null : /* @__PURE__ */ j("span", { children: t.actor }),
|
|
410
|
+
_ === null ? null : /* @__PURE__ */ j("time", {
|
|
411
|
+
"data-part": "time",
|
|
412
|
+
"data-part-time": "",
|
|
413
|
+
dateTime: _.dateTime,
|
|
414
|
+
..._.title === null ? {} : { title: _.title },
|
|
415
|
+
children: _.text
|
|
416
|
+
})
|
|
417
|
+
]
|
|
418
|
+
})]
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ M("div", {
|
|
421
|
+
"data-part": "status",
|
|
422
|
+
"data-part-status": "",
|
|
423
|
+
id: l.status,
|
|
424
|
+
children: [/* @__PURE__ */ j("span", {
|
|
425
|
+
"aria-hidden": "true",
|
|
426
|
+
"data-part": "mark",
|
|
427
|
+
"data-part-mark": "",
|
|
428
|
+
children: m === "spinner" ? /* @__PURE__ */ j("span", {
|
|
429
|
+
"data-ui": "spinner",
|
|
430
|
+
"data-ui-spinner": "",
|
|
431
|
+
children: i
|
|
432
|
+
}) : /* @__PURE__ */ j(r, { children: /* @__PURE__ */ j(n, { name: m }) })
|
|
433
|
+
}), /* @__PURE__ */ M("span", {
|
|
434
|
+
"data-part": "status-label",
|
|
435
|
+
"data-part-status-label": "",
|
|
436
|
+
children: [/* @__PURE__ */ j("span", { children: Ae(t, s) }), t.stage === void 0 || t.stage === "" ? null : /* @__PURE__ */ j("span", {
|
|
437
|
+
"data-part": "stage",
|
|
438
|
+
"data-part-stage": "",
|
|
439
|
+
title: t.stage,
|
|
440
|
+
children: t.stage
|
|
441
|
+
})]
|
|
442
|
+
})]
|
|
443
|
+
}),
|
|
444
|
+
t.status === "running" ? /* @__PURE__ */ M("div", {
|
|
445
|
+
"data-part": "progress",
|
|
446
|
+
"data-part-progress": "",
|
|
447
|
+
children: [/* @__PURE__ */ j(a, {
|
|
448
|
+
"aria-labelledby": l.title,
|
|
449
|
+
delay: 0,
|
|
450
|
+
hideLabel: !0,
|
|
451
|
+
max: t.progress?.max ?? 100,
|
|
452
|
+
size: "sm",
|
|
453
|
+
tone: "accent",
|
|
454
|
+
value: t.progress?.value ?? null,
|
|
455
|
+
...v.length > 0 ? { valueText: v.join(", ") } : {}
|
|
456
|
+
}), v.length > 0 ? /* @__PURE__ */ j("span", {
|
|
457
|
+
"data-part": "progress-text",
|
|
458
|
+
"data-part-progress-text": "",
|
|
459
|
+
children: v.map((e) => /* @__PURE__ */ j("span", { children: e }, e))
|
|
460
|
+
}) : null]
|
|
461
|
+
}) : null,
|
|
462
|
+
ee.length > 0 ? /* @__PURE__ */ j("p", {
|
|
463
|
+
"data-part": "summary",
|
|
464
|
+
"data-part-summary": "",
|
|
465
|
+
children: ee.map((e) => /* @__PURE__ */ j("span", { children: e }, e))
|
|
466
|
+
}) : null,
|
|
467
|
+
te === null ? null : /* @__PURE__ */ j("p", {
|
|
468
|
+
"data-part": "message",
|
|
469
|
+
"data-part-message": "",
|
|
470
|
+
children: te
|
|
471
|
+
})
|
|
472
|
+
]
|
|
473
|
+
}),
|
|
474
|
+
C.length > 0 || V(y) || f.controls.includes("remove") ? /* @__PURE__ */ M("div", {
|
|
475
|
+
"data-part": "controls",
|
|
476
|
+
"data-part-controls": "",
|
|
477
|
+
children: [
|
|
478
|
+
C.map(S),
|
|
479
|
+
V(y) ? /* @__PURE__ */ j("span", {
|
|
480
|
+
"data-part": "job-actions",
|
|
481
|
+
"data-part-job-actions": "",
|
|
482
|
+
children: y
|
|
483
|
+
}) : null,
|
|
484
|
+
f.controls.includes("remove") ? S("remove") : null
|
|
485
|
+
]
|
|
486
|
+
}) : null,
|
|
487
|
+
p && Se(t) ? /* @__PURE__ */ j(Ue, {
|
|
488
|
+
context: e,
|
|
489
|
+
job: t
|
|
490
|
+
}) : null
|
|
491
|
+
]
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
function Ge({ actions: n, "aria-label": r, "aria-labelledby": i, className: a, defaultExpanded: s, defaultView: c, empty: l, expanded: u, footer: d, growing: b, hasMore: x = !1, jobs: S, level: C, loading: w = !1, locale: T, messages: ne, now: E, onCancel: re, onDownload: ae, onExpandedChange: se, onLoadMore: ce, onOpen: le, onReload: ge, onRemove: N, onRetry: _e, onViewChange: P, ref: Se, render: Te, renderJobActions: Ee, size: De, status: Oe = "ready", style: ke, timeFormat: Ae, timeZone: je, view: F, views: I, ...Fe }) {
|
|
495
|
+
let L = Pe(), R = `slotted-import-export-center-${ue().replace(/[^\w-]/g, "")}`, H = `${R}-title`, U = `${R}-list`, Ve = b ?? L.growing, W = C ?? L.level, G = e(), He = T ?? G, Ue = De ?? L.size, Ge = Ae ?? L.timeFormat, K = je ?? L.timeZone, q = t(he, ne), [Ke, qe] = A(null), J = k(null), Je = pe(() => I ?? [
|
|
496
|
+
{
|
|
497
|
+
label: q("all"),
|
|
498
|
+
value: "all"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
label: q("imports"),
|
|
502
|
+
value: "import"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
label: q("exports"),
|
|
506
|
+
value: "export"
|
|
507
|
+
}
|
|
508
|
+
], [I, q]), [Ye, Xe] = A(c), Y = F ?? Ye ?? Je[0]?.value ?? "all", [X, Ze] = A(s ?? []), Qe = u ?? X, Z = k({
|
|
509
|
+
currentExpanded: Qe,
|
|
510
|
+
currentView: Y,
|
|
511
|
+
expanded: u,
|
|
512
|
+
onExpandedChange: se,
|
|
513
|
+
onViewChange: P,
|
|
514
|
+
view: F
|
|
515
|
+
});
|
|
516
|
+
Z.current = {
|
|
517
|
+
currentExpanded: Qe,
|
|
518
|
+
currentView: Y,
|
|
519
|
+
expanded: u,
|
|
520
|
+
onExpandedChange: se,
|
|
521
|
+
onViewChange: P,
|
|
522
|
+
view: F
|
|
523
|
+
};
|
|
524
|
+
let $e = D((e, t, n) => {
|
|
525
|
+
if (e === Z.current.currentView) return;
|
|
526
|
+
let r = !1, i = oe({
|
|
527
|
+
controlled: Z.current.view,
|
|
528
|
+
initial: Z.current.currentView,
|
|
529
|
+
onRequest: (e) => {
|
|
530
|
+
Z.current.onViewChange?.(e.value, e), r = e.cancelled;
|
|
531
|
+
}
|
|
532
|
+
}).request(e, t, n);
|
|
533
|
+
!r && i && Xe(e);
|
|
534
|
+
}, []), Q = D((e, t, n) => {
|
|
535
|
+
if (Be(e, Z.current.currentExpanded)) return !0;
|
|
536
|
+
let r = !1, i = oe({
|
|
537
|
+
controlled: Z.current.expanded,
|
|
538
|
+
equals: Be,
|
|
539
|
+
initial: Z.current.currentExpanded,
|
|
540
|
+
onRequest: (e) => {
|
|
541
|
+
Z.current.onExpandedChange?.(e.value, e), r = e.cancelled;
|
|
542
|
+
}
|
|
543
|
+
}).request(e, t, n);
|
|
544
|
+
return !r && i && Ze(e), !r;
|
|
545
|
+
}, []), et = D((e, t, n) => {
|
|
546
|
+
let r = Z.current.currentExpanded;
|
|
547
|
+
Q(r.includes(e) ? r.filter((t) => t !== e) : [...r, e], t, n);
|
|
548
|
+
}, [Q]);
|
|
549
|
+
O(() => {
|
|
550
|
+
if (u !== void 0) return;
|
|
551
|
+
let e = new Set(S.map((e) => e.key)), t = X.filter((t) => e.has(t));
|
|
552
|
+
t.length !== X.length && Ze(t);
|
|
553
|
+
}, [
|
|
554
|
+
S,
|
|
555
|
+
u,
|
|
556
|
+
X
|
|
557
|
+
]);
|
|
558
|
+
let tt = k(null);
|
|
559
|
+
O(() => {
|
|
560
|
+
let e = tt.current;
|
|
561
|
+
if (tt.current = new Map(S.map((e) => [e.key, e])), e !== null) for (let t of S) {
|
|
562
|
+
let n = Me(e.get(t.key), t);
|
|
563
|
+
n !== null && ve().announce(we(n, t, q));
|
|
564
|
+
}
|
|
565
|
+
}, [S]);
|
|
566
|
+
let nt = k(/* @__PURE__ */ new Map()), [rt, it] = A(/* @__PURE__ */ new Map());
|
|
567
|
+
O(() => {
|
|
568
|
+
let e = E ?? Date.now(), t = /* @__PURE__ */ new Map();
|
|
569
|
+
for (let n of S) {
|
|
570
|
+
if (n.status !== "running") {
|
|
571
|
+
nt.current.delete(n.key);
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
let r = n.progress?.value, i = n.progress?.max, a = nt.current.get(n.key) ?? [];
|
|
575
|
+
r !== void 0 && i !== void 0 && a.at(-1)?.value !== r && (a.push({
|
|
576
|
+
at: Date.now(),
|
|
577
|
+
max: i,
|
|
578
|
+
value: r
|
|
579
|
+
}), a.length > Re && a.shift(), nt.current.set(n.key, a)), t.set(n.key, Ne(n, a, {
|
|
580
|
+
now: e,
|
|
581
|
+
timeZone: K
|
|
582
|
+
}));
|
|
583
|
+
}
|
|
584
|
+
it(t);
|
|
585
|
+
}, [
|
|
586
|
+
S,
|
|
587
|
+
E,
|
|
588
|
+
K
|
|
589
|
+
]);
|
|
590
|
+
let at = k(null), ot = (e) => {
|
|
591
|
+
let t = e.target, n = t.closest("[data-part=\"job\"]");
|
|
592
|
+
if (n === null || !J.current?.contains(n)) {
|
|
593
|
+
at.current = null;
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
let r = [...J.current?.querySelectorAll(":scope > [data-part=\"job\"]") ?? []], i = "job-title";
|
|
597
|
+
for (let e = t; e !== null && e !== n; e = e.parentElement) {
|
|
598
|
+
let t = e.dataset.part;
|
|
599
|
+
if (t !== void 0 && Ie.includes(t)) {
|
|
600
|
+
i = t;
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
at.current = {
|
|
605
|
+
element: t,
|
|
606
|
+
index: r.indexOf(n),
|
|
607
|
+
key: n.dataset.key ?? "",
|
|
608
|
+
part: i
|
|
609
|
+
};
|
|
610
|
+
}, st = (e, t) => {
|
|
611
|
+
let n = (J.current?.querySelector(`:scope > [data-part="job"][data-key="${CSS.escape(e)}"]`))?.querySelector(`[data-part="${t}"]`), r = n == null ? null : n.matches("button, a, [tabindex]") ? n : n.querySelector("button, a");
|
|
612
|
+
return r !== null && (r.focus(), !0);
|
|
613
|
+
};
|
|
614
|
+
fe(() => {
|
|
615
|
+
let e = at.current, t = J.current;
|
|
616
|
+
if (e === null || t === null || e.element.isConnected) return;
|
|
617
|
+
let n = t.ownerDocument.activeElement;
|
|
618
|
+
if (n !== null && n !== t.ownerDocument.body) return;
|
|
619
|
+
let r = [...t.querySelectorAll(":scope > [data-part=\"job\"][data-key]")].map((e) => ({
|
|
620
|
+
key: e.dataset.key ?? "",
|
|
621
|
+
parts: Ie.filter((t) => t !== "job-title" && e.querySelector(`[data-part="${t}"]`) !== null)
|
|
622
|
+
})), i = xe(e, r);
|
|
623
|
+
if (at.current = null, "list" in i) {
|
|
624
|
+
t.focus();
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
st(i.key, i.part);
|
|
628
|
+
});
|
|
629
|
+
let ct = k(null), lt = D((e) => {
|
|
630
|
+
if (!S.some((t) => t.key === e)) return;
|
|
631
|
+
let t = Z.current.currentExpanded;
|
|
632
|
+
t.includes(e) || Q([...t, e], "programmatic", void 0), ct.current = e;
|
|
633
|
+
let n = S.find((t) => t.key === e);
|
|
634
|
+
n !== void 0 && be([n], Z.current.currentView).length === 0 && $e("all", "programmatic", void 0);
|
|
635
|
+
}, [
|
|
636
|
+
S,
|
|
637
|
+
Q,
|
|
638
|
+
$e
|
|
639
|
+
]);
|
|
640
|
+
fe(() => {
|
|
641
|
+
let e = ct.current;
|
|
642
|
+
if (e === null) return;
|
|
643
|
+
ct.current = null;
|
|
644
|
+
let t = J.current?.querySelector(`:scope > [data-part="job"][data-key="${CSS.escape(e)}"]`);
|
|
645
|
+
t != null && (t.scrollIntoView?.({ block: "nearest" }), t.querySelector("[data-part=\"job-title\"]")?.focus({ preventScroll: !0 }));
|
|
646
|
+
});
|
|
647
|
+
let ut = pe(() => be(S, Y), [S, Y]), dt = D(() => {
|
|
648
|
+
(J.current?.querySelector(":scope > [data-part=\"job\"] :is(a[data-part=\"job-title\"], [data-part=\"controls\"] button, [data-part=\"controls\"] a)") ?? J.current)?.focus();
|
|
649
|
+
}, []);
|
|
650
|
+
de(Se, () => ({
|
|
651
|
+
get element() {
|
|
652
|
+
return Ke;
|
|
653
|
+
},
|
|
654
|
+
focus: dt,
|
|
655
|
+
reveal: lt
|
|
656
|
+
}), [
|
|
657
|
+
Ke,
|
|
658
|
+
dt,
|
|
659
|
+
lt
|
|
660
|
+
]);
|
|
661
|
+
let ft = D((e) => {
|
|
662
|
+
let t = `${R}-${ze(e)}`;
|
|
663
|
+
return {
|
|
664
|
+
control: (e) => `${t}-${e}`,
|
|
665
|
+
details: `${t}-details`,
|
|
666
|
+
status: `${t}-status`,
|
|
667
|
+
title: `${t}-title`,
|
|
668
|
+
toggle: `${t}-toggle`
|
|
669
|
+
};
|
|
670
|
+
}, [R]), pt = {
|
|
671
|
+
expanded: new Set(Qe),
|
|
672
|
+
ids: ft,
|
|
673
|
+
locale: He,
|
|
674
|
+
now: E,
|
|
675
|
+
onCancel: re,
|
|
676
|
+
onDownload: ae,
|
|
677
|
+
onOpen: le,
|
|
678
|
+
onRemove: N,
|
|
679
|
+
onRetry: _e,
|
|
680
|
+
onToggle: et,
|
|
681
|
+
remaining: rt,
|
|
682
|
+
renderJobActions: Ee,
|
|
683
|
+
t: q,
|
|
684
|
+
timeFormat: Ge,
|
|
685
|
+
timeZone: K
|
|
686
|
+
}, mt = `h${W}`, ht = ye(S), gt = ut.filter((e) => Ce(e) && e.removable !== !1), _t = w && ut.length === 0, $ = Oe === "error", vt = !$ && !_t && ut.length === 0, yt = q(Y === "import" ? "emptyImports" : Y === "export" ? "emptyExports" : "empty"), bt = ie({
|
|
687
|
+
...Fe,
|
|
688
|
+
...r === void 0 ? { "aria-labelledby": i ?? H } : { "aria-label": r },
|
|
689
|
+
children: /* @__PURE__ */ M(me, { children: [
|
|
690
|
+
/* @__PURE__ */ M("div", {
|
|
691
|
+
"data-part": "header",
|
|
692
|
+
"data-part-header": "",
|
|
693
|
+
children: [/* @__PURE__ */ M(mt, {
|
|
694
|
+
"data-part": "title",
|
|
695
|
+
"data-part-title": "",
|
|
696
|
+
id: H,
|
|
697
|
+
children: [q("title"), ht > 0 ? /* @__PURE__ */ M(me, { children: [" ", /* @__PURE__ */ j("span", {
|
|
698
|
+
"data-part": "count",
|
|
699
|
+
"data-part-count": "",
|
|
700
|
+
children: q("active", { count: ht })
|
|
701
|
+
})] }) : null]
|
|
702
|
+
}), gt.length > 0 || V(n) ? /* @__PURE__ */ M("div", {
|
|
703
|
+
"data-part": "tools",
|
|
704
|
+
"data-part-tools": "",
|
|
705
|
+
children: [gt.length > 0 ? /* @__PURE__ */ j("span", {
|
|
706
|
+
"data-part": "clear",
|
|
707
|
+
"data-part-clear": "",
|
|
708
|
+
children: /* @__PURE__ */ j(o, {
|
|
709
|
+
onClick: (e) => N?.({ keys: gt.map((e) => e.key) }, z("clear", e)),
|
|
710
|
+
size: "sm",
|
|
711
|
+
tone: "secondary",
|
|
712
|
+
variant: "ghost",
|
|
713
|
+
children: q("clear")
|
|
714
|
+
})
|
|
715
|
+
}) : null, V(n) ? /* @__PURE__ */ j("div", {
|
|
716
|
+
"data-part": "actions",
|
|
717
|
+
"data-part-actions": "",
|
|
718
|
+
children: n
|
|
719
|
+
}) : null]
|
|
720
|
+
}) : null]
|
|
721
|
+
}),
|
|
722
|
+
Je.length > 1 ? /* @__PURE__ */ j("div", {
|
|
723
|
+
"data-part": "views",
|
|
724
|
+
"data-part-views": "",
|
|
725
|
+
children: /* @__PURE__ */ j(ee, {
|
|
726
|
+
onValueChange: (e, t) => $e(e, t.reason, t.source),
|
|
727
|
+
size: Ue,
|
|
728
|
+
track: "none",
|
|
729
|
+
value: Y,
|
|
730
|
+
children: /* @__PURE__ */ j(te, {
|
|
731
|
+
"aria-label": q("views"),
|
|
732
|
+
children: Je.map((e) => /* @__PURE__ */ j(y, {
|
|
733
|
+
controls: U,
|
|
734
|
+
value: e.value,
|
|
735
|
+
children: e.label
|
|
736
|
+
}, e.value))
|
|
737
|
+
})
|
|
738
|
+
})
|
|
739
|
+
}) : null,
|
|
740
|
+
$ ? /* @__PURE__ */ j("div", {
|
|
741
|
+
"data-part": "error",
|
|
742
|
+
"data-part-error": "",
|
|
743
|
+
children: /* @__PURE__ */ M(v, {
|
|
744
|
+
live: "off",
|
|
745
|
+
reach: "section",
|
|
746
|
+
status: "error",
|
|
747
|
+
children: [/* @__PURE__ */ M(_, { children: [/* @__PURE__ */ j(g, { children: q("loadError") }), /* @__PURE__ */ j(m, { children: q("loadErrorDescription") })] }), /* @__PURE__ */ j(h, { children: /* @__PURE__ */ j(o, {
|
|
748
|
+
onClick: (e) => ge?.(z(B(e), e)),
|
|
749
|
+
size: "sm",
|
|
750
|
+
tone: "secondary",
|
|
751
|
+
variant: "outline",
|
|
752
|
+
children: q("reload")
|
|
753
|
+
}) })]
|
|
754
|
+
})
|
|
755
|
+
}) : vt ? /* @__PURE__ */ j("div", {
|
|
756
|
+
"data-part": "empty",
|
|
757
|
+
"data-part-empty": "",
|
|
758
|
+
children: l ?? /* @__PURE__ */ j(v, {
|
|
759
|
+
live: "off",
|
|
760
|
+
reach: "section",
|
|
761
|
+
status: "empty",
|
|
762
|
+
children: /* @__PURE__ */ M(_, { children: [/* @__PURE__ */ j(g, { children: yt }), /* @__PURE__ */ j(m, { children: q("emptyDescription") })] })
|
|
763
|
+
})
|
|
764
|
+
}) : /* @__PURE__ */ j("ul", {
|
|
765
|
+
"aria-busy": w ? !0 : void 0,
|
|
766
|
+
"aria-labelledby": H,
|
|
767
|
+
"data-part": "list",
|
|
768
|
+
"data-part-list": "",
|
|
769
|
+
id: U,
|
|
770
|
+
onFocus: ot,
|
|
771
|
+
ref: J,
|
|
772
|
+
tabIndex: -1,
|
|
773
|
+
children: _t ? Array.from({ length: Le }, (e, t) => /* @__PURE__ */ M("li", {
|
|
774
|
+
"aria-hidden": "true",
|
|
775
|
+
"data-part": "job",
|
|
776
|
+
"data-part-job": "",
|
|
777
|
+
children: [/* @__PURE__ */ j("span", {
|
|
778
|
+
"data-part": "visual",
|
|
779
|
+
"data-part-visual": "",
|
|
780
|
+
children: /* @__PURE__ */ j(f, { shape: "block" })
|
|
781
|
+
}), /* @__PURE__ */ M("div", {
|
|
782
|
+
"data-part": "body",
|
|
783
|
+
"data-part-body": "",
|
|
784
|
+
children: [/* @__PURE__ */ j(p, { lines: 2 }), /* @__PURE__ */ j(p, { lines: 1 })]
|
|
785
|
+
})]
|
|
786
|
+
}, t)) : ut.map((e) => /* @__PURE__ */ j(We, {
|
|
787
|
+
context: pt,
|
|
788
|
+
job: e
|
|
789
|
+
}, e.key))
|
|
790
|
+
}),
|
|
791
|
+
!$ && Ve === "button" && x && !_t ? /* @__PURE__ */ j("button", {
|
|
792
|
+
"aria-disabled": w ? !0 : void 0,
|
|
793
|
+
"data-part": "more",
|
|
794
|
+
"data-part-more": "",
|
|
795
|
+
...w ? { "data-loading": "" } : {},
|
|
796
|
+
onClick: (e) => {
|
|
797
|
+
w || ce?.(z(B(e), e));
|
|
798
|
+
},
|
|
799
|
+
type: "button",
|
|
800
|
+
children: q(w ? "loading" : "loadMore")
|
|
801
|
+
}) : null,
|
|
802
|
+
V(d) ? /* @__PURE__ */ j("div", {
|
|
803
|
+
"data-part": "footer",
|
|
804
|
+
"data-part-footer": "",
|
|
805
|
+
children: d
|
|
806
|
+
}) : null
|
|
807
|
+
] }),
|
|
808
|
+
className: a,
|
|
809
|
+
"data-growing": Ve,
|
|
810
|
+
"data-level": W,
|
|
811
|
+
...w ? { "data-loading": "" } : {},
|
|
812
|
+
"data-part": "root",
|
|
813
|
+
"data-size": Ue,
|
|
814
|
+
...$ ? { "data-status": "error" } : {},
|
|
815
|
+
"data-time-format": Ge,
|
|
816
|
+
"data-ui": "import-export-center",
|
|
817
|
+
"data-view": Y,
|
|
818
|
+
style: ke
|
|
819
|
+
});
|
|
820
|
+
return Te === void 0 ? /* @__PURE__ */ j("section", {
|
|
821
|
+
...bt,
|
|
822
|
+
ref: qe
|
|
823
|
+
}) : Te({
|
|
824
|
+
...bt,
|
|
825
|
+
ref: qe
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
//#endregion
|
|
829
|
+
//#region src/import-export-center/use-job-toasts.tsx
|
|
830
|
+
function K(e, { messages: n, onView: r, toaster: i } = {}) {
|
|
831
|
+
let a = re(), s = i ?? a, c = k(null), l = t(he, n), u = k({
|
|
832
|
+
onView: r,
|
|
833
|
+
t: l,
|
|
834
|
+
target: s
|
|
835
|
+
});
|
|
836
|
+
u.current = {
|
|
837
|
+
onView: r,
|
|
838
|
+
t: l,
|
|
839
|
+
target: s
|
|
840
|
+
}, O(() => {
|
|
841
|
+
let t = c.current;
|
|
842
|
+
if (c.current = new Map(e.map((e) => [e.key, e])), t === null) return;
|
|
843
|
+
let { onView: n, t: r, target: i } = u.current;
|
|
844
|
+
for (let a of e) {
|
|
845
|
+
let e = De(t.get(a.key), a, r);
|
|
846
|
+
e !== null && i.show({
|
|
847
|
+
actions: n === void 0 ? void 0 : /* @__PURE__ */ j(o, {
|
|
848
|
+
onClick: () => {
|
|
849
|
+
i.dismiss(e.id, "pointer"), n(e.key);
|
|
850
|
+
},
|
|
851
|
+
size: "sm",
|
|
852
|
+
tone: "secondary",
|
|
853
|
+
variant: "outline",
|
|
854
|
+
children: r("view")
|
|
855
|
+
}),
|
|
856
|
+
announcement: e.title,
|
|
857
|
+
description: e.description,
|
|
858
|
+
id: e.id,
|
|
859
|
+
loading: e.loading,
|
|
860
|
+
title: e.title,
|
|
861
|
+
tone: e.tone
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
}, [e]);
|
|
865
|
+
}
|
|
866
|
+
//#endregion
|
|
867
|
+
export { Pe as i, Ge as n, Fe as r, K as t };
|