@flamingo-stack/openframe-frontend-core 0.0.735 → 0.0.736
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/{chunk-XKB7YGQM.cjs → chunk-77SD7RXY.cjs} +18 -6
- package/dist/{chunk-T323E2Y6.cjs → chunk-7V2KP2TB.cjs} +4 -4
- package/dist/{chunk-W6E7XCBI.cjs → chunk-BDF3FNOC.cjs} +31 -31
- package/dist/{chunk-EQ7OOK4B.cjs → chunk-BL5GOCHP.cjs} +14 -14
- package/dist/{chunk-RH3AKULV.cjs → chunk-EJOXXJJB.cjs} +56 -4
- package/dist/{chunk-SHQZN5LF.cjs → chunk-EX2GYIGW.cjs} +6 -6
- package/dist/{chunk-3JP2OVH3.cjs → chunk-FTGVG6FW.cjs} +30 -30
- package/dist/{chunk-3X4N3IT7.cjs → chunk-JGGSRCRD.cjs} +16 -16
- package/dist/{chunk-MRVZ56GT.cjs → chunk-JM54CNZZ.cjs} +81 -81
- package/dist/{chunk-HBUUCLQM.cjs → chunk-L535OD7V.cjs} +2 -2
- package/dist/{chunk-6TTAILSV.cjs → chunk-LIH5OQLY.cjs} +3 -3
- package/dist/{chunk-OXJ57643.cjs → chunk-MGW5DO6P.cjs} +76 -17
- package/dist/{chunk-4F7V2MAC.cjs → chunk-NONQUGRP.cjs} +14 -14
- package/dist/{chunk-36CCUJOE.cjs → chunk-OJUMVOMP.cjs} +313 -313
- package/dist/{chunk-JDXQ6T5P.cjs → chunk-OV6BGMEL.cjs} +130 -179
- package/dist/{chunk-TUMUT7CV.cjs → chunk-P6Z3EBPJ.cjs} +11 -11
- package/dist/{chunk-NVCSVGNI.cjs → chunk-SZFA2LQR.cjs} +33 -33
- package/dist/{chunk-F7STMHT7.cjs → chunk-T27CVQBO.cjs} +65 -65
- package/dist/{chunk-EQH7BUNS.cjs → chunk-UBQSOB3X.cjs} +4 -4
- package/dist/{chunk-SZRZBCWC.cjs → chunk-URX2YTCL.cjs} +68 -68
- package/dist/{chunk-HLBFTDUL.cjs → chunk-VRNNIV5Y.cjs} +2 -2
- package/dist/{chunk-3FZZPR76.cjs → chunk-XLSVQJBA.cjs} +44 -44
- package/dist/{chunk-7HT3VHLJ.cjs → chunk-ZEX5WU35.cjs} +15 -15
- package/dist/{cloud-tenants-H5D57P4U.cjs → cloud-tenants-M55HMW6F.cjs} +7 -7
- package/dist/components/case-studies/index.cjs +19 -19
- package/dist/components/chat/index.cjs +9 -9
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/docs/index.cjs +11 -11
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/faq/index.cjs +8 -8
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/help-center-pages/index.cjs +99 -99
- package/dist/components/index.cjs +60 -60
- package/dist/components/meeting-scheduler/index.cjs +29 -29
- package/dist/components/navigation/index.cjs +10 -10
- package/dist/components/onboarding-guides/index.cjs +10 -10
- package/dist/components/pagination.d.ts +9 -1
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +72 -17
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/tickets/index.cjs +12 -12
- package/dist/components/ui/index.cjs +11 -11
- package/dist/components/unified-pagination.d.ts.map +1 -1
- package/dist/components/unified-pagination.js +16 -4
- package/dist/{devices-SQTEXY2H.cjs → devices-WWJZFG6E.cjs} +8 -8
- package/dist/{embeddable-chat-S5ODWE3L.cjs → embeddable-chat-76IJ6TQZ.cjs} +72 -72
- package/dist/index.cjs +15 -15
- package/dist/{knowledge-FO3TPLFO.cjs → knowledge-F4YFQT3G.cjs} +8 -8
- package/dist/{logs-Y4WQB2YR.cjs → logs-GAYEGEZM.cjs} +15 -15
- package/dist/{policies-D6VY2ODF.cjs → policies-ZOVJCJWX.cjs} +11 -11
- package/dist/{software-update-7XN6U7HC.cjs → software-update-H4YE5GMJ.cjs} +10 -10
- package/package.json +1 -1
- package/src/components/pagination.tsx +117 -21
- package/src/components/unified-pagination.tsx +23 -7
|
@@ -8,7 +8,7 @@ var _chunkII4QMH26cjs = require('./chunk-II4QMH26.cjs');
|
|
|
8
8
|
var _chunkKHXZFLINcjs = require('./chunk-KHXZFLIN.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkOJUMVOMPcjs = require('./chunk-OJUMVOMP.cjs');
|
|
12
12
|
require('./chunk-ZJNYWNCB.cjs');
|
|
13
13
|
require('./chunk-3HPB4H4C.cjs');
|
|
14
14
|
require('./chunk-L4ZNR5V7.cjs');
|
|
@@ -19,12 +19,12 @@ require('./chunk-AAFW4STC.cjs');
|
|
|
19
19
|
require('./chunk-24I6RFVU.cjs');
|
|
20
20
|
require('./chunk-A6P6DHEZ.cjs');
|
|
21
21
|
require('./chunk-MZ4KBSH7.cjs');
|
|
22
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-MGW5DO6P.cjs');
|
|
23
23
|
require('./chunk-YUMFVQIN.cjs');
|
|
24
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-T27CVQBO.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkOV6BGMELcjs = require('./chunk-OV6BGMEL.cjs');
|
|
28
28
|
require('./chunk-ZRYKDN2J.cjs');
|
|
29
29
|
require('./chunk-HZJRERJW.cjs');
|
|
30
30
|
require('./chunk-DUXLZPMJ.cjs');
|
|
@@ -1825,8 +1825,8 @@ require('./chunk-7DNL734S.cjs');
|
|
|
1825
1825
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1826
1826
|
require('./chunk-SKI6NKOE.cjs');
|
|
1827
1827
|
require('./chunk-EWPR7662.cjs');
|
|
1828
|
-
require('./chunk-
|
|
1829
|
-
require('./chunk-
|
|
1828
|
+
require('./chunk-EX2GYIGW.cjs');
|
|
1829
|
+
require('./chunk-EJOXXJJB.cjs');
|
|
1830
1830
|
require('./chunk-FCGLSWKR.cjs');
|
|
1831
1831
|
require('./chunk-YADG5Q7C.cjs');
|
|
1832
1832
|
require('./chunk-MYBTNOS6.cjs');
|
|
@@ -1905,10 +1905,10 @@ function KnowledgeScreen(_props) {
|
|
|
1905
1905
|
const cast = _chunkII4QMH26cjs.useProductDemoCast.call(void 0, );
|
|
1906
1906
|
const fixture = _react.useMemo.call(void 0, () => buildKnowledgeFixture(cast), [cast]);
|
|
1907
1907
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1908
|
-
|
|
1908
|
+
_chunkOJUMVOMPcjs.KnowledgeBaseArticleView,
|
|
1909
1909
|
{
|
|
1910
1910
|
...fixture.article,
|
|
1911
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1911
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOV6BGMELcjs.SimpleMarkdownRenderer, { content: fixture.content, textSize: "compact" })
|
|
1912
1912
|
}
|
|
1913
1913
|
) });
|
|
1914
1914
|
}
|
|
@@ -16,7 +16,7 @@ var _chunkKHXZFLINcjs = require('./chunk-KHXZFLIN.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkOJUMVOMPcjs = require('./chunk-OJUMVOMP.cjs');
|
|
20
20
|
require('./chunk-ZJNYWNCB.cjs');
|
|
21
21
|
require('./chunk-3HPB4H4C.cjs');
|
|
22
22
|
require('./chunk-L4ZNR5V7.cjs');
|
|
@@ -27,12 +27,12 @@ require('./chunk-AAFW4STC.cjs');
|
|
|
27
27
|
require('./chunk-24I6RFVU.cjs');
|
|
28
28
|
require('./chunk-A6P6DHEZ.cjs');
|
|
29
29
|
require('./chunk-MZ4KBSH7.cjs');
|
|
30
|
-
require('./chunk-
|
|
30
|
+
require('./chunk-MGW5DO6P.cjs');
|
|
31
31
|
require('./chunk-YUMFVQIN.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
require('./chunk-
|
|
34
|
+
var _chunkT27CVQBOcjs = require('./chunk-T27CVQBO.cjs');
|
|
35
|
+
require('./chunk-OV6BGMEL.cjs');
|
|
36
36
|
require('./chunk-ZRYKDN2J.cjs');
|
|
37
37
|
require('./chunk-HZJRERJW.cjs');
|
|
38
38
|
require('./chunk-DUXLZPMJ.cjs');
|
|
@@ -1833,8 +1833,8 @@ require('./chunk-7DNL734S.cjs');
|
|
|
1833
1833
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1834
1834
|
require('./chunk-SKI6NKOE.cjs');
|
|
1835
1835
|
require('./chunk-EWPR7662.cjs');
|
|
1836
|
-
require('./chunk-
|
|
1837
|
-
require('./chunk-
|
|
1836
|
+
require('./chunk-EX2GYIGW.cjs');
|
|
1837
|
+
require('./chunk-EJOXXJJB.cjs');
|
|
1838
1838
|
require('./chunk-FCGLSWKR.cjs');
|
|
1839
1839
|
require('./chunk-YADG5Q7C.cjs');
|
|
1840
1840
|
require('./chunk-MYBTNOS6.cjs');
|
|
@@ -1886,7 +1886,7 @@ function entry(logId, minutesAgo, severity, toolType, device2, summary) {
|
|
|
1886
1886
|
id: logId,
|
|
1887
1887
|
logId,
|
|
1888
1888
|
timestamp: displayTime(_chunkKHXZFLINcjs.demoMinutesAgo.call(void 0, minutesAgo)),
|
|
1889
|
-
status: { label: severity, variant:
|
|
1889
|
+
status: { label: severity, variant: _chunkOJUMVOMPcjs.logSeverityVariant.call(void 0, severity) },
|
|
1890
1890
|
source: { name: toolType, toolType },
|
|
1891
1891
|
device: device2,
|
|
1892
1892
|
description: { title: summary }
|
|
@@ -1958,13 +1958,13 @@ var NO_FILTERS = {};
|
|
|
1958
1958
|
var ACTION_COLUMNS = ["copy", "quickView", "open"];
|
|
1959
1959
|
var BESIDE_DRAWER_HIDDEN = [...ACTION_COLUMNS, "tool", "source"];
|
|
1960
1960
|
var logHref = () => "#";
|
|
1961
|
-
var copyAction = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1961
|
+
var copyAction = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOJUMVOMPcjs.LogCopyIconButton, {});
|
|
1962
1962
|
function LogsScreen({ compact = false }) {
|
|
1963
1963
|
const [dock, setDock] = _react.useState.call(void 0, null);
|
|
1964
1964
|
const selected = LOGS_FIXTURE_SELECTED;
|
|
1965
1965
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full bg-ods-bg", children: [
|
|
1966
1966
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1 overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1967
|
-
|
|
1967
|
+
_chunkOJUMVOMPcjs.LogsPageView,
|
|
1968
1968
|
{
|
|
1969
1969
|
showHeader: false,
|
|
1970
1970
|
className: "p-[var(--spacing-system-l)]",
|
|
@@ -1972,7 +1972,7 @@ function LogsScreen({ compact = false }) {
|
|
|
1972
1972
|
onSearchChange: noop,
|
|
1973
1973
|
onOpenFilters: noop,
|
|
1974
1974
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1975
|
-
|
|
1975
|
+
_chunkOJUMVOMPcjs.LogsTableView,
|
|
1976
1976
|
{
|
|
1977
1977
|
logs: LOGS_FIXTURE_ENTRIES,
|
|
1978
1978
|
facets: LOGS_FIXTURE_FACETS,
|
|
@@ -1986,8 +1986,8 @@ function LogsScreen({ compact = false }) {
|
|
|
1986
1986
|
)
|
|
1987
1987
|
}
|
|
1988
1988
|
) }),
|
|
1989
|
-
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setDock, className: "relative w-[calc(400px+var(--spacing-system-m))] shrink-0", children: dock && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1990
|
-
|
|
1989
|
+
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setDock, className: "relative w-[calc(400px+var(--spacing-system-m))] shrink-0", children: dock && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOJUMVOMPcjs.AppLayoutDrawerContainerContext.Provider, { value: dock, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1990
|
+
_chunkOJUMVOMPcjs.LogDrawer,
|
|
1991
1991
|
{
|
|
1992
1992
|
docked: true,
|
|
1993
1993
|
isOpen: true,
|
|
@@ -1999,12 +1999,12 @@ function LogsScreen({ compact = false }) {
|
|
|
1999
1999
|
{ label: "Log ID", value: selected.logId },
|
|
2000
2000
|
{
|
|
2001
2001
|
label: "Source",
|
|
2002
|
-
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2002
|
+
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOJUMVOMPcjs.ToolBadge, { toolType: _chunkT27CVQBOcjs.normalizeToolTypeWithFallback.call(void 0, selected.source.toolType) })
|
|
2003
2003
|
},
|
|
2004
|
-
{ label: "Device", value:
|
|
2004
|
+
{ label: "Device", value: _chunkOJUMVOMPcjs.logSourceLabels.call(void 0, selected.device).deviceName }
|
|
2005
2005
|
],
|
|
2006
2006
|
deviceCard: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2007
|
-
|
|
2007
|
+
_chunkOJUMVOMPcjs.DeviceCard,
|
|
2008
2008
|
{
|
|
2009
2009
|
...LOGS_FIXTURE_DEVICE,
|
|
2010
2010
|
actions: {
|
|
@@ -10,7 +10,7 @@ var _chunkKHXZFLINcjs = require('./chunk-KHXZFLIN.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkOJUMVOMPcjs = require('./chunk-OJUMVOMP.cjs');
|
|
14
14
|
require('./chunk-ZJNYWNCB.cjs');
|
|
15
15
|
require('./chunk-3HPB4H4C.cjs');
|
|
16
16
|
require('./chunk-L4ZNR5V7.cjs');
|
|
@@ -21,10 +21,10 @@ require('./chunk-AAFW4STC.cjs');
|
|
|
21
21
|
require('./chunk-24I6RFVU.cjs');
|
|
22
22
|
require('./chunk-A6P6DHEZ.cjs');
|
|
23
23
|
require('./chunk-MZ4KBSH7.cjs');
|
|
24
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-MGW5DO6P.cjs');
|
|
25
25
|
require('./chunk-YUMFVQIN.cjs');
|
|
26
|
-
require('./chunk-
|
|
27
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-T27CVQBO.cjs');
|
|
27
|
+
require('./chunk-OV6BGMEL.cjs');
|
|
28
28
|
require('./chunk-ZRYKDN2J.cjs');
|
|
29
29
|
require('./chunk-HZJRERJW.cjs');
|
|
30
30
|
require('./chunk-DUXLZPMJ.cjs');
|
|
@@ -1825,8 +1825,8 @@ require('./chunk-7DNL734S.cjs');
|
|
|
1825
1825
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1826
1826
|
require('./chunk-SKI6NKOE.cjs');
|
|
1827
1827
|
require('./chunk-EWPR7662.cjs');
|
|
1828
|
-
require('./chunk-
|
|
1829
|
-
require('./chunk-
|
|
1828
|
+
require('./chunk-EX2GYIGW.cjs');
|
|
1829
|
+
require('./chunk-EJOXXJJB.cjs');
|
|
1830
1830
|
require('./chunk-FCGLSWKR.cjs');
|
|
1831
1831
|
require('./chunk-YADG5Q7C.cjs');
|
|
1832
1832
|
require('./chunk-MYBTNOS6.cjs');
|
|
@@ -1891,14 +1891,14 @@ var POLICIES = [
|
|
|
1891
1891
|
policy("policy-local-admins", "No local admins", "No everyday account is a local administrator.", false, 0)
|
|
1892
1892
|
];
|
|
1893
1893
|
var POLICIES_FIXTURE = {
|
|
1894
|
-
summary:
|
|
1894
|
+
summary: _chunkOJUMVOMPcjs.computePolicySummary.call(void 0, POLICIES),
|
|
1895
1895
|
rows: POLICIES.map((item) => ({
|
|
1896
1896
|
id: item.id,
|
|
1897
1897
|
name: item.name,
|
|
1898
1898
|
description: item.description,
|
|
1899
1899
|
critical: item.critical,
|
|
1900
1900
|
severityLabel: item.critical ? "Critical" : "Low",
|
|
1901
|
-
status:
|
|
1901
|
+
status: _chunkOJUMVOMPcjs.getPolicyTableStatus.call(void 0, item),
|
|
1902
1902
|
actions: [
|
|
1903
1903
|
{ label: "Policy Details", onClick: noop },
|
|
1904
1904
|
{ label: "Delete Policy", onClick: noop }
|
|
@@ -1912,16 +1912,16 @@ var POLICIES_FIXTURE = {
|
|
|
1912
1912
|
var _jsxruntime = require('react/jsx-runtime');
|
|
1913
1913
|
function PoliciesScreen({ compact = false }) {
|
|
1914
1914
|
const table = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1915
|
-
|
|
1915
|
+
_chunkOJUMVOMPcjs.PoliciesTable,
|
|
1916
1916
|
{
|
|
1917
1917
|
rows: POLICIES_FIXTURE.rows,
|
|
1918
1918
|
rowAsLink: true,
|
|
1919
|
-
rightSlot: compact ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1919
|
+
rightSlot: compact ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOJUMVOMPcjs.DataTable.RowCount, {}),
|
|
1920
1920
|
emptyMessage: "No policies found."
|
|
1921
1921
|
}
|
|
1922
1922
|
);
|
|
1923
1923
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full flex-col gap-[var(--spacing-system-l)] bg-ods-bg p-[var(--spacing-system-l)]", children: [
|
|
1924
|
-
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1924
|
+
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOJUMVOMPcjs.PolicySummaryCards, { summary: POLICIES_FIXTURE.summary, now: POLICIES_FIXTURE.now }),
|
|
1925
1925
|
table
|
|
1926
1926
|
] });
|
|
1927
1927
|
}
|
|
@@ -15,7 +15,7 @@ var _chunkKHXZFLINcjs = require('./chunk-KHXZFLIN.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkOJUMVOMPcjs = require('./chunk-OJUMVOMP.cjs');
|
|
19
19
|
require('./chunk-ZJNYWNCB.cjs');
|
|
20
20
|
require('./chunk-3HPB4H4C.cjs');
|
|
21
21
|
|
|
@@ -28,10 +28,10 @@ require('./chunk-AAFW4STC.cjs');
|
|
|
28
28
|
require('./chunk-24I6RFVU.cjs');
|
|
29
29
|
require('./chunk-A6P6DHEZ.cjs');
|
|
30
30
|
require('./chunk-MZ4KBSH7.cjs');
|
|
31
|
-
require('./chunk-
|
|
31
|
+
require('./chunk-MGW5DO6P.cjs');
|
|
32
32
|
require('./chunk-YUMFVQIN.cjs');
|
|
33
|
-
require('./chunk-
|
|
34
|
-
require('./chunk-
|
|
33
|
+
require('./chunk-T27CVQBO.cjs');
|
|
34
|
+
require('./chunk-OV6BGMEL.cjs');
|
|
35
35
|
require('./chunk-ZRYKDN2J.cjs');
|
|
36
36
|
require('./chunk-HZJRERJW.cjs');
|
|
37
37
|
require('./chunk-DUXLZPMJ.cjs');
|
|
@@ -1832,8 +1832,8 @@ require('./chunk-7DNL734S.cjs');
|
|
|
1832
1832
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1833
1833
|
require('./chunk-SKI6NKOE.cjs');
|
|
1834
1834
|
require('./chunk-EWPR7662.cjs');
|
|
1835
|
-
require('./chunk-
|
|
1836
|
-
require('./chunk-
|
|
1835
|
+
require('./chunk-EX2GYIGW.cjs');
|
|
1836
|
+
require('./chunk-EJOXXJJB.cjs');
|
|
1837
1837
|
require('./chunk-FCGLSWKR.cjs');
|
|
1838
1838
|
require('./chunk-YADG5Q7C.cjs');
|
|
1839
1839
|
require('./chunk-MYBTNOS6.cjs');
|
|
@@ -1926,12 +1926,12 @@ function StaticPackageField({ value }) {
|
|
|
1926
1926
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1927
1927
|
_chunkL4ZNR5V7cjs.Autocomplete,
|
|
1928
1928
|
{
|
|
1929
|
-
label:
|
|
1929
|
+
label: _chunkOJUMVOMPcjs.PACKAGE_SEARCH_LABEL,
|
|
1930
1930
|
labelVariant: "large",
|
|
1931
1931
|
options: value ? [{ value: value.id, label: value.name, description: _nullishCoalesce(value.description, () => ( void 0)) }] : [],
|
|
1932
1932
|
value: _nullishCoalesce(_optionalChain([value, 'optionalAccess', _ => _.id]), () => ( null)),
|
|
1933
1933
|
onChange: noop,
|
|
1934
|
-
placeholder:
|
|
1934
|
+
placeholder: _chunkOJUMVOMPcjs.PACKAGE_SEARCH_PLACEHOLDER
|
|
1935
1935
|
}
|
|
1936
1936
|
);
|
|
1937
1937
|
}
|
|
@@ -1945,7 +1945,7 @@ function SoftwareUpdateScreen({ compact = false }) {
|
|
|
1945
1945
|
[fixture.devices, fixture.selectedIds]
|
|
1946
1946
|
);
|
|
1947
1947
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1948
|
-
|
|
1948
|
+
_chunkOJUMVOMPcjs.SoftwareActionForm,
|
|
1949
1949
|
{
|
|
1950
1950
|
action: fixture.action,
|
|
1951
1951
|
showHeader: false,
|
|
@@ -1957,7 +1957,7 @@ function SoftwareUpdateScreen({ compact = false }) {
|
|
|
1957
1957
|
initialValues: fixture.initialValues,
|
|
1958
1958
|
renderPackageSearch,
|
|
1959
1959
|
renderDevicePicker: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1960
|
-
|
|
1960
|
+
_chunkOJUMVOMPcjs.DeviceSelector,
|
|
1961
1961
|
{
|
|
1962
1962
|
devices: selected,
|
|
1963
1963
|
loading: false,
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
4
|
-
import { type ButtonHTMLAttributes, type HTMLAttributes, forwardRef } from 'react';
|
|
4
|
+
import { type ButtonHTMLAttributes, type HTMLAttributes, type MouseEvent, type ReactNode, forwardRef } from 'react';
|
|
5
|
+
import Link from '../embed-shims/next-link';
|
|
5
6
|
import { cn } from '../utils/cn';
|
|
7
|
+
import { isModifierClick } from './chat/utils/chat-nav-resolution';
|
|
6
8
|
import { Button } from './ui/button';
|
|
7
9
|
|
|
8
10
|
interface PaginationProps {
|
|
@@ -10,9 +12,98 @@ interface PaginationProps {
|
|
|
10
12
|
totalPages: number;
|
|
11
13
|
onPageChange: (page: number) => void;
|
|
12
14
|
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The address of a page of this list. With it every enabled control is a real
|
|
17
|
+
* link (`<a href>`), so a crawler that runs no script can reach every page of
|
|
18
|
+
* the list, and a person can open a page in a new tab. A plain click still
|
|
19
|
+
* changes the page in place through `onPageChange`. Without it the controls
|
|
20
|
+
* are buttons.
|
|
21
|
+
*/
|
|
22
|
+
getPageHref?: (page: number) => string;
|
|
13
23
|
}
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
interface PaginationControlProps {
|
|
26
|
+
/** The page this control goes to. */
|
|
27
|
+
page: number;
|
|
28
|
+
/** The control's accessible name ("Page 3", "Go to next page"). */
|
|
29
|
+
label: string;
|
|
30
|
+
variant: 'accent' | 'outline';
|
|
31
|
+
className: string;
|
|
32
|
+
/** The control marks the page being shown. */
|
|
33
|
+
current?: boolean;
|
|
34
|
+
/** There is no such page (previous on the first page, next on the last). */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/** Which neighbour the control leads to, stated to crawlers and assistive technology as `rel`. */
|
|
37
|
+
rel?: 'prev' | 'next';
|
|
38
|
+
onPageChange: (page: number) => void;
|
|
39
|
+
getPageHref?: (page: number) => string;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* One control of the pager. With a page address it is a link: the href is the
|
|
45
|
+
* page's real URL, so it works with no script, in a new tab and for a crawler,
|
|
46
|
+
* and a plain click is taken over to change the page in place (the progressive
|
|
47
|
+
* enhancement every in-page link in this library uses). With no address, or
|
|
48
|
+
* when there is no such page, it is a button: a link must always lead somewhere.
|
|
49
|
+
*/
|
|
50
|
+
function PaginationControl({
|
|
51
|
+
page,
|
|
52
|
+
label,
|
|
53
|
+
variant,
|
|
54
|
+
className,
|
|
55
|
+
current,
|
|
56
|
+
disabled,
|
|
57
|
+
rel,
|
|
58
|
+
onPageChange,
|
|
59
|
+
getPageHref,
|
|
60
|
+
children,
|
|
61
|
+
}: PaginationControlProps) {
|
|
62
|
+
const ariaCurrent = current ? ('page' as const) : undefined;
|
|
63
|
+
|
|
64
|
+
if (!getPageHref || disabled) {
|
|
65
|
+
return (
|
|
66
|
+
<Button
|
|
67
|
+
variant={variant}
|
|
68
|
+
size="icon"
|
|
69
|
+
className={className}
|
|
70
|
+
disabled={disabled}
|
|
71
|
+
aria-label={label}
|
|
72
|
+
aria-current={ariaCurrent}
|
|
73
|
+
onClick={() => onPageChange(page)}
|
|
74
|
+
>
|
|
75
|
+
{children}
|
|
76
|
+
</Button>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {
|
|
81
|
+
// A new tab or window is the browser's to open, at the link's own address.
|
|
82
|
+
if (isModifierClick(event)) return;
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
onPageChange(page);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Button variant={variant} size="icon" className={className} asChild>
|
|
89
|
+
<Link
|
|
90
|
+
href={getPageHref(page)}
|
|
91
|
+
prefetch={false}
|
|
92
|
+
rel={rel}
|
|
93
|
+
aria-label={label}
|
|
94
|
+
aria-current={ariaCurrent}
|
|
95
|
+
onClick={handleClick}
|
|
96
|
+
>
|
|
97
|
+
{children}
|
|
98
|
+
</Link>
|
|
99
|
+
</Button>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const NEIGHBOUR_CLASS = '!h-10 !w-10 content-md:!h-10 content-md:!w-10';
|
|
104
|
+
const PAGE_CLASS = '!h-9 !w-9 content-md:!h-9 content-md:!w-9';
|
|
105
|
+
|
|
106
|
+
const Pagination = ({ currentPage, totalPages, onPageChange, className, getPageHref }: PaginationProps) => {
|
|
16
107
|
// Generate page numbers to display
|
|
17
108
|
const getPageNumbers = () => {
|
|
18
109
|
const pages = [];
|
|
@@ -68,16 +159,18 @@ const Pagination = ({ currentPage, totalPages, onPageChange, className }: Pagina
|
|
|
68
159
|
<nav role="navigation" aria-label="pagination" className={cn('mx-auto flex w-full justify-center', className)}>
|
|
69
160
|
<ul className="flex flex-row items-center gap-1">
|
|
70
161
|
<li>
|
|
71
|
-
<
|
|
162
|
+
<PaginationControl
|
|
163
|
+
page={currentPage - 1}
|
|
164
|
+
label="Go to previous page"
|
|
72
165
|
variant="outline"
|
|
73
|
-
|
|
74
|
-
onClick={() => onPageChange(currentPage - 1)}
|
|
166
|
+
className={NEIGHBOUR_CLASS}
|
|
75
167
|
disabled={currentPage === 1}
|
|
76
|
-
|
|
77
|
-
|
|
168
|
+
rel="prev"
|
|
169
|
+
onPageChange={onPageChange}
|
|
170
|
+
getPageHref={getPageHref}
|
|
78
171
|
>
|
|
79
172
|
<ChevronLeft className="h-4 w-4" />
|
|
80
|
-
</
|
|
173
|
+
</PaginationControl>
|
|
81
174
|
</li>
|
|
82
175
|
|
|
83
176
|
{pageNumbers.map((page, index) => {
|
|
@@ -95,32 +188,35 @@ const Pagination = ({ currentPage, totalPages, onPageChange, className }: Pagina
|
|
|
95
188
|
|
|
96
189
|
return (
|
|
97
190
|
<li key={page}>
|
|
98
|
-
<
|
|
191
|
+
<PaginationControl
|
|
192
|
+
page={page}
|
|
193
|
+
label={`Page ${page}`}
|
|
99
194
|
variant={currentPage === page ? 'accent' : 'outline'}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
aria-current={currentPage === page ? 'page' : undefined}
|
|
195
|
+
className={PAGE_CLASS}
|
|
196
|
+
current={currentPage === page}
|
|
197
|
+
onPageChange={onPageChange}
|
|
198
|
+
getPageHref={getPageHref}
|
|
105
199
|
>
|
|
106
200
|
{page}
|
|
107
|
-
</
|
|
201
|
+
</PaginationControl>
|
|
108
202
|
</li>
|
|
109
203
|
);
|
|
110
204
|
})}
|
|
111
205
|
|
|
112
206
|
<li>
|
|
113
|
-
<
|
|
207
|
+
<PaginationControl
|
|
208
|
+
page={currentPage + 1}
|
|
209
|
+
label="Go to next page"
|
|
114
210
|
variant="outline"
|
|
115
|
-
|
|
116
|
-
onClick={() => onPageChange(currentPage + 1)}
|
|
211
|
+
className={NEIGHBOUR_CLASS}
|
|
117
212
|
disabled={currentPage === totalPages}
|
|
118
|
-
|
|
119
|
-
|
|
213
|
+
rel="next"
|
|
214
|
+
onPageChange={onPageChange}
|
|
215
|
+
getPageHref={getPageHref}
|
|
120
216
|
>
|
|
121
217
|
<ChevronRight className="h-4 w-4" />
|
|
122
218
|
<span className="sr-only">Next page</span>
|
|
123
|
-
</
|
|
219
|
+
</PaginationControl>
|
|
124
220
|
</li>
|
|
125
221
|
</ul>
|
|
126
222
|
</nav>
|
|
@@ -33,6 +33,17 @@ export function UnifiedPagination({
|
|
|
33
33
|
const searchParams = useSearchParams();
|
|
34
34
|
const pathname = usePathname();
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* The address of a page of this list: the current URL with `page` set. Page 1
|
|
38
|
+
* is the list's own address (no `page`), so the first page has one URL.
|
|
39
|
+
*/
|
|
40
|
+
const pageHref = (page: number) => {
|
|
41
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
42
|
+
if (page <= 1) params.delete('page');
|
|
43
|
+
else params.set('page', page.toString());
|
|
44
|
+
return withQuery(pathname, params.toString());
|
|
45
|
+
};
|
|
46
|
+
|
|
36
47
|
const handlePageChange = (page: number) => {
|
|
37
48
|
// Preserve current scroll position
|
|
38
49
|
const currentScrollY = window.scrollY;
|
|
@@ -42,13 +53,12 @@ export function UnifiedPagination({
|
|
|
42
53
|
onPageChange(page);
|
|
43
54
|
}
|
|
44
55
|
|
|
45
|
-
// Update
|
|
46
|
-
// the URL (`syncUrl={false}`)
|
|
47
|
-
//
|
|
56
|
+
// Update the address bar in place (a bookmark, a shared link), unless the
|
|
57
|
+
// caller owns the URL (`syncUrl={false}`): a second writer here would race
|
|
58
|
+
// the caller's own param write. The address is the one the page's link
|
|
59
|
+
// carries (`pageHref`), so a click and a new-tab open land on the same URL.
|
|
48
60
|
if (syncUrl) {
|
|
49
|
-
|
|
50
|
-
params.set('page', page.toString());
|
|
51
|
-
window.history.replaceState(null, '', withQuery(pathname, params.toString()));
|
|
61
|
+
window.history.replaceState(null, '', pageHref(page));
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
// Restore scroll position after a brief delay to allow content to render
|
|
@@ -79,7 +89,13 @@ export function UnifiedPagination({
|
|
|
79
89
|
|
|
80
90
|
return (
|
|
81
91
|
<div className={className}>
|
|
82
|
-
|
|
92
|
+
{/* Real links only while this component owns `?page=`: a caller that owns the URL names its own parameter. */}
|
|
93
|
+
<Pagination
|
|
94
|
+
currentPage={currentPage}
|
|
95
|
+
totalPages={totalPages}
|
|
96
|
+
onPageChange={handlePageChange}
|
|
97
|
+
getPageHref={syncUrl ? pageHref : undefined}
|
|
98
|
+
/>
|
|
83
99
|
</div>
|
|
84
100
|
);
|
|
85
101
|
}
|