@panneau/lists 5.0.0-alpha.20 → 5.0.0-alpha.22

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.
Files changed (36) hide show
  1. package/dist/ListView.d.ts +6 -1
  2. package/dist/ListView.d.ts.map +1 -1
  3. package/dist/ListView.js +281 -248
  4. package/dist/ListView.js.map +1 -1
  5. package/dist/displays/displays.js +1 -1
  6. package/dist/filters/controls.d.ts.map +1 -1
  7. package/dist/filters/controls.js +4 -2
  8. package/dist/filters/controls.js.map +1 -1
  9. package/dist/images.d.ts +1 -6
  10. package/dist/images.d.ts.map +1 -1
  11. package/dist/images.js +1 -39
  12. package/dist/index.js +1 -1
  13. package/dist/inline/InlineCell.js +1 -1
  14. package/dist/layouts/CalendarLayout.d.ts +1 -1
  15. package/dist/layouts/CalendarLayout.d.ts.map +1 -1
  16. package/dist/layouts/CalendarLayout.js +75 -71
  17. package/dist/layouts/CalendarLayout.js.map +1 -1
  18. package/dist/layouts/CardsLayout.d.ts +1 -1
  19. package/dist/layouts/CardsLayout.d.ts.map +1 -1
  20. package/dist/layouts/CardsLayout.js +6 -2
  21. package/dist/layouts/CardsLayout.js.map +1 -1
  22. package/dist/layouts/GalleryLayout.d.ts +1 -1
  23. package/dist/layouts/GalleryLayout.d.ts.map +1 -1
  24. package/dist/layouts/GalleryLayout.js +49 -43
  25. package/dist/layouts/GalleryLayout.js.map +1 -1
  26. package/dist/layouts/TableLayout.d.ts +1 -1
  27. package/dist/layouts/TableLayout.d.ts.map +1 -1
  28. package/dist/layouts/TableLayout.js +53 -47
  29. package/dist/layouts/TableLayout.js.map +1 -1
  30. package/dist/layouts/highlight.css +28 -0
  31. package/dist/layouts/highlight.module.js +12 -0
  32. package/dist/layouts/highlight.module.js.map +1 -0
  33. package/dist/types.d.ts +5 -0
  34. package/dist/types.d.ts.map +1 -1
  35. package/package.json +7 -7
  36. package/dist/images.js.map +0 -1
@@ -2,6 +2,7 @@ import { messages } from "../messages.js";
2
2
  import CalendarLayout_module_default from "./CalendarLayout.module.js";
3
3
  import { ItemTitle } from "./ItemTitle.js";
4
4
  import { getItemDays } from "./calendarDays.js";
5
+ import highlight_module_default from "./highlight.module.js";
5
6
  import { currentMonth, isMonth, shiftMonth } from "@panneau/core";
6
7
  import { c } from "react/compiler-runtime";
7
8
  import { Button, IconButton, usePanneauIntl } from "@panneau/ui";
@@ -47,8 +48,8 @@ function getWeeks(month, firstDay) {
47
48
  * month. On narrow lists, the days that have items, one under the other.
48
49
  */
49
50
  function CalendarLayout(t0) {
50
- const $ = c(45);
51
- const { items, columns, renderValue, getItemLabel, getItemHref, isCurrent, label, calendar } = t0;
51
+ const $ = c(46);
52
+ const { items, columns, renderValue, getItemLabel, getItemHref, isCurrent, isHighlighted, label, calendar } = t0;
52
53
  const intl = usePanneauIntl();
53
54
  let t1;
54
55
  let t2;
@@ -57,7 +58,7 @@ function CalendarLayout(t0) {
57
58
  let t5;
58
59
  let t6;
59
60
  let t7;
60
- if ($[0] !== calendar || $[1] !== columns || $[2] !== getItemHref || $[3] !== getItemLabel || $[4] !== intl || $[5] !== isCurrent || $[6] !== items || $[7] !== label || $[8] !== renderValue) {
61
+ if ($[0] !== calendar || $[1] !== columns || $[2] !== getItemHref || $[3] !== getItemLabel || $[4] !== intl || $[5] !== isCurrent || $[6] !== isHighlighted || $[7] !== items || $[8] !== label || $[9] !== renderValue) {
61
62
  const today = currentMonth();
62
63
  const month = calendar !== void 0 && isMonth(calendar.month) ? calendar.month : today;
63
64
  const [t8, t9] = month.split("-").map(Number);
@@ -77,30 +78,30 @@ function CalendarLayout(t0) {
77
78
  timeZone: "UTC"
78
79
  });
79
80
  let t10;
80
- if ($[16] !== intl.locale) {
81
+ if ($[17] !== intl.locale) {
81
82
  t10 = (format) => new Intl.DateTimeFormat(intl.locale, {
82
83
  weekday: format,
83
84
  timeZone: "UTC"
84
85
  });
85
- $[16] = intl.locale;
86
- $[17] = t10;
87
- } else t10 = $[17];
86
+ $[17] = intl.locale;
87
+ $[18] = t10;
88
+ } else t10 = $[18];
88
89
  const weekday = t10;
89
90
  let t11;
90
91
  let t12;
91
92
  let t13;
92
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
93
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
93
94
  const now = /* @__PURE__ */ new Date();
94
95
  t11 = pad(now.getFullYear(), 4);
95
96
  t12 = pad(now.getMonth() + 1);
96
97
  t13 = pad(now.getDate());
97
- $[18] = t11;
98
- $[19] = t12;
99
- $[20] = t13;
98
+ $[19] = t11;
99
+ $[20] = t12;
100
+ $[21] = t13;
100
101
  } else {
101
- t11 = $[18];
102
- t12 = $[19];
103
- t13 = $[20];
102
+ t11 = $[19];
103
+ t12 = $[20];
104
+ t13 = $[21];
104
105
  }
105
106
  const todayDay = `${t11}-${t12}-${t13}`;
106
107
  const byDay = /* @__PURE__ */ new Map();
@@ -122,23 +123,23 @@ function CalendarLayout(t0) {
122
123
  const more = calendar?.more ?? null;
123
124
  t5 = CalendarLayout_module_default.calendar;
124
125
  let t14;
125
- if ($[21] !== intl) {
126
+ if ($[22] !== intl) {
126
127
  t14 = intl.formatMessage(messages.previousMonth);
127
- $[21] = intl;
128
- $[22] = t14;
129
- } else t14 = $[22];
128
+ $[22] = intl;
129
+ $[23] = t14;
130
+ } else t14 = $[23];
130
131
  let t15;
131
- if ($[23] !== intl) {
132
+ if ($[24] !== intl) {
132
133
  t15 = intl.formatMessage(messages.thisMonth);
133
- $[23] = intl;
134
- $[24] = t15;
135
- } else t15 = $[24];
134
+ $[24] = intl;
135
+ $[25] = t15;
136
+ } else t15 = $[25];
136
137
  let t16;
137
- if ($[25] !== intl) {
138
+ if ($[26] !== intl) {
138
139
  t16 = intl.formatMessage(messages.nextMonth);
139
- $[25] = intl;
140
- $[26] = t16;
141
- } else t16 = $[26];
140
+ $[26] = intl;
141
+ $[27] = t16;
142
+ } else t16 = $[27];
142
143
  t6 = /* @__PURE__ */ jsxs("div", {
143
144
  className: CalendarLayout_module_default.header,
144
145
  children: [/* @__PURE__ */ jsx("p", {
@@ -167,7 +168,7 @@ function CalendarLayout(t0) {
167
168
  ]
168
169
  })]
169
170
  });
170
- if ($[27] !== intl || $[28] !== items || $[29] !== more) {
171
+ if ($[28] !== intl || $[29] !== items || $[30] !== more) {
171
172
  t7 = more !== null ? /* @__PURE__ */ jsx("p", {
172
173
  className: CalendarLayout_module_default.more,
173
174
  role: "status",
@@ -176,15 +177,15 @@ function CalendarLayout(t0) {
176
177
  total: more.total
177
178
  }) : intl.formatMessage(messages.calendarMoreUnknown, { shown: items.length })
178
179
  }) : null;
179
- $[27] = intl;
180
- $[28] = items;
181
- $[29] = more;
182
- $[30] = t7;
183
- } else t7 = $[30];
180
+ $[28] = intl;
181
+ $[29] = items;
182
+ $[30] = more;
183
+ $[31] = t7;
184
+ } else t7 = $[31];
184
185
  t2 = CalendarLayout_module_default.grid;
185
186
  t3 = `${label}, ${monthLabel}`;
186
187
  let t17;
187
- if ($[31] !== weekday) {
188
+ if ($[32] !== weekday) {
188
189
  t17 = (day_0) => {
189
190
  const date = /* @__PURE__ */ new Date(`${day_0}T00:00:00Z`);
190
191
  return /* @__PURE__ */ jsx("th", {
@@ -195,9 +196,9 @@ function CalendarLayout(t0) {
195
196
  })
196
197
  }, day_0);
197
198
  };
198
- $[31] = weekday;
199
- $[32] = t17;
200
- } else t17 = $[32];
199
+ $[32] = weekday;
200
+ $[33] = t17;
201
+ } else t17 = $[33];
201
202
  t4 = /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: (weeks[0] ?? []).map(t17) }) });
202
203
  t1 = weeks.map((week) => /* @__PURE__ */ jsx("tr", { children: week.map((day_1) => {
203
204
  const entries = [...byDay.get(day_1) ?? []].sort(_temp);
@@ -221,7 +222,9 @@ function CalendarLayout(t0) {
221
222
  children: entries.map((t18) => {
222
223
  const { item: item_0 } = t18;
223
224
  return /* @__PURE__ */ jsx("li", {
225
+ className: isHighlighted?.(item_0) === true ? highlight_module_default.highlighted : void 0,
224
226
  "data-current": isCurrent?.(item_0) === true || void 0,
227
+ "data-highlighted": isHighlighted?.(item_0) === true || void 0,
225
228
  children: /* @__PURE__ */ jsx(ItemTitle, {
226
229
  href: getItemHref?.(item_0) ?? null,
227
230
  current: isCurrent?.(item_0) ?? false,
@@ -238,46 +241,47 @@ function CalendarLayout(t0) {
238
241
  $[3] = getItemLabel;
239
242
  $[4] = intl;
240
243
  $[5] = isCurrent;
241
- $[6] = items;
242
- $[7] = label;
243
- $[8] = renderValue;
244
- $[9] = t1;
245
- $[10] = t2;
246
- $[11] = t3;
247
- $[12] = t4;
248
- $[13] = t5;
249
- $[14] = t6;
250
- $[15] = t7;
244
+ $[6] = isHighlighted;
245
+ $[7] = items;
246
+ $[8] = label;
247
+ $[9] = renderValue;
248
+ $[10] = t1;
249
+ $[11] = t2;
250
+ $[12] = t3;
251
+ $[13] = t4;
252
+ $[14] = t5;
253
+ $[15] = t6;
254
+ $[16] = t7;
251
255
  } else {
252
- t1 = $[9];
253
- t2 = $[10];
254
- t3 = $[11];
255
- t4 = $[12];
256
- t5 = $[13];
257
- t6 = $[14];
258
- t7 = $[15];
256
+ t1 = $[10];
257
+ t2 = $[11];
258
+ t3 = $[12];
259
+ t4 = $[13];
260
+ t5 = $[14];
261
+ t6 = $[15];
262
+ t7 = $[16];
259
263
  }
260
264
  let t8;
261
- if ($[33] !== t1) {
265
+ if ($[34] !== t1) {
262
266
  t8 = /* @__PURE__ */ jsx("tbody", { children: t1 });
263
- $[33] = t1;
264
- $[34] = t8;
265
- } else t8 = $[34];
267
+ $[34] = t1;
268
+ $[35] = t8;
269
+ } else t8 = $[35];
266
270
  let t9;
267
- if ($[35] !== t2 || $[36] !== t3 || $[37] !== t4 || $[38] !== t8) {
271
+ if ($[36] !== t2 || $[37] !== t3 || $[38] !== t4 || $[39] !== t8) {
268
272
  t9 = /* @__PURE__ */ jsxs("table", {
269
273
  className: t2,
270
274
  "aria-label": t3,
271
275
  children: [t4, t8]
272
276
  });
273
- $[35] = t2;
274
- $[36] = t3;
275
- $[37] = t4;
276
- $[38] = t8;
277
- $[39] = t9;
278
- } else t9 = $[39];
277
+ $[36] = t2;
278
+ $[37] = t3;
279
+ $[38] = t4;
280
+ $[39] = t8;
281
+ $[40] = t9;
282
+ } else t9 = $[40];
279
283
  let t10;
280
- if ($[40] !== t5 || $[41] !== t6 || $[42] !== t7 || $[43] !== t9) {
284
+ if ($[41] !== t5 || $[42] !== t6 || $[43] !== t7 || $[44] !== t9) {
281
285
  t10 = /* @__PURE__ */ jsxs("div", {
282
286
  className: t5,
283
287
  children: [
@@ -286,12 +290,12 @@ function CalendarLayout(t0) {
286
290
  t9
287
291
  ]
288
292
  });
289
- $[40] = t5;
290
- $[41] = t6;
291
- $[42] = t7;
292
- $[43] = t9;
293
- $[44] = t10;
294
- } else t10 = $[44];
293
+ $[41] = t5;
294
+ $[42] = t6;
295
+ $[43] = t7;
296
+ $[44] = t9;
297
+ $[45] = t10;
298
+ } else t10 = $[45];
295
299
  return t10;
296
300
  }
297
301
  function _temp(a, b) {
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarLayout.js","names":["ChevronLeft","ChevronRight","currentMonth","isMonth","shiftMonth","isDateRangeValue","Button","IconButton","usePanneauIntl","messages","ListItem","ListLayoutProps","styles","ItemTitle","getItemDays","pad","value","length","String","padStart","dayOf","date","Date","getUTCFullYear","getUTCMonth","getUTCDate","sortKey","start","end","getFirstDay","locale","info","Intl","Locale","getWeekInfo","firstDay","weekInfo","getWeeks","month","year","index","split","map","Number","first","UTC","last","offset","getUTCDay","days","time","getTime","push","Array","from","_","week","slice","CalendarLayout","t0","$","_c","items","columns","renderValue","getItemLabel","getItemHref","isCurrent","label","calendar","intl","t1","t2","t3","t4","t5","t6","t7","today","undefined","t8","t9","title","weeks","monthLabel","DateTimeFormat","timeZone","format","dayLabel","weekday","day","t10","t11","t12","t13","Symbol","for","now","getFullYear","getMonth","getDate","todayDay","byDay","Map","shown","at","forEach","item","field","set","get","more","t14","formatMessage","previousMonth","t15","thisMonth","t16","nextMonth","header","navigation","onMonthChange","total","calendarMore","calendarMoreUnknown","grid","t17","day_0","day_1","entries","sort","_temp","startsWith","dayNumber","t18","item_0","id","a","b","localeCompare","_c","styles"],"sources":["../../src/layouts/CalendarLayout.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from 'lucide-react';\n\nimport { currentMonth, isMonth, shiftMonth } from '@panneau/core';\nimport { isDateRangeValue } from '@panneau/fields/daterange';\nimport { Button, IconButton, usePanneauIntl } from '@panneau/ui';\n\nimport { messages } from '../messages';\nimport type { ListItem, ListLayoutProps } from '../types';\nimport styles from './CalendarLayout.module.css';\nimport { ItemTitle } from './ItemTitle';\nimport { getItemDays } from './calendarDays';\n\nfunction pad(value: number, length = 2): string {\n return String(value).padStart(length, '0');\n}\n\nfunction dayOf(date: Date): string {\n return `${pad(date.getUTCFullYear(), 4)}-${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`;\n}\n\n/** What orders the items of a day: a date-time, or the start of a range. */\nfunction sortKey(value: unknown): string {\n if (isDateRangeValue(value)) {\n return value.start ?? value.end ?? '';\n }\n return typeof value === 'string' ? value : '';\n}\n\n/** The first day of the week in a locale: 1 for Monday to 7 for Sunday. */\nfunction getFirstDay(locale: string): number {\n try {\n const info = new Intl.Locale(locale) as Intl.Locale & {\n getWeekInfo?: () => { firstDay: number };\n weekInfo?: { firstDay: number };\n };\n return info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay ?? 1;\n } catch {\n return 1;\n }\n}\n\n/** The weeks that show a month, as days (`2026-11-02`), from the first day of the week. */\nfunction getWeeks(month: string, firstDay: number): string[][] {\n const [year = 1970, index = 1] = month.split('-').map(Number);\n const first = new Date(Date.UTC(year, index - 1, 1));\n const last = new Date(Date.UTC(year, index, 0));\n // getUTCDay(): 0 for Sunday; firstDay: 7 for Sunday.\n const offset = (first.getUTCDay() - (firstDay % 7) + 7) % 7;\n const start = Date.UTC(year, index - 1, 1 - offset);\n const days: string[] = [];\n for (let time = start; days.length % 7 !== 0 || time <= last.getTime(); time += 86_400_000) {\n days.push(dayOf(new Date(time)));\n }\n return Array.from({ length: days.length / 7 }, (_, week) => days.slice(week * 7, week * 7 + 7));\n}\n\n/**\n * Items on the days of a month (decision 0044), and a range on each day it covers (decision 0053):\n * the weeks of the month, from the first day of the week of the locale, with the title of each item\n * as its link, in the order of their dates, and buttons to the previous, the next and the current\n * month. On narrow lists, the days that have items, one under the other.\n */\nexport function CalendarLayout({\n items,\n columns,\n renderValue,\n getItemLabel,\n getItemHref,\n isCurrent,\n label,\n calendar,\n}: ListLayoutProps) {\n const intl = usePanneauIntl();\n const today = currentMonth();\n const month = calendar !== undefined && isMonth(calendar.month) ? calendar.month : today;\n const [year = 1970, index = 1] = month.split('-').map(Number);\n const [title] = columns;\n const weeks = getWeeks(month, getFirstDay(intl.locale));\n const monthLabel = new Intl.DateTimeFormat(intl.locale, {\n month: 'long',\n year: 'numeric',\n timeZone: 'UTC',\n }).format(new Date(Date.UTC(year, index - 1, 1)));\n const dayLabel = new Intl.DateTimeFormat(intl.locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n timeZone: 'UTC',\n });\n const weekday = (format: 'short' | 'long') =>\n new Intl.DateTimeFormat(intl.locale, { weekday: format, timeZone: 'UTC' });\n const now = new Date();\n const todayDay = `${pad(now.getFullYear(), 4)}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;\n\n const byDay = new Map<string, { item: ListItem; value: string }[]>();\n if (calendar !== undefined) {\n const shown = { first: weeks[0]?.[0] ?? '', last: weeks.at(-1)?.at(-1) ?? '' };\n items.forEach((item) => {\n const value = item[calendar.field];\n getItemDays(value, shown, calendar.timeZone).forEach((day) => {\n byDay.set(day, [...(byDay.get(day) ?? []), { item, value: sortKey(value) }]);\n });\n });\n }\n const more = calendar?.more ?? null;\n\n return (\n <div className={styles.calendar}>\n <div className={styles.header}>\n <p className={styles.month} aria-live=\"polite\">\n {monthLabel}\n </p>\n <div className={styles.navigation}>\n <IconButton\n icon={ChevronLeft}\n label={intl.formatMessage(messages.previousMonth)}\n onPress={() => calendar?.onMonthChange(shiftMonth(month, -1))}\n />\n <Button\n size=\"sm\"\n isDisabled={month === today}\n onPress={() => calendar?.onMonthChange(today)}\n >\n {intl.formatMessage(messages.thisMonth)}\n </Button>\n <IconButton\n icon={ChevronRight}\n label={intl.formatMessage(messages.nextMonth)}\n onPress={() => calendar?.onMonthChange(shiftMonth(month, 1))}\n />\n </div>\n </div>\n {more !== null ? (\n <p className={styles.more} role=\"status\">\n {more.total !== null\n ? intl.formatMessage(messages.calendarMore, {\n shown: items.length,\n total: more.total,\n })\n : intl.formatMessage(messages.calendarMoreUnknown, {\n shown: items.length,\n })}\n </p>\n ) : null}\n <table className={styles.grid} aria-label={`${label}, ${monthLabel}`}>\n <thead>\n <tr>\n {(weeks[0] ?? []).map((day) => {\n const date = new Date(`${day}T00:00:00Z`);\n return (\n <th key={day} scope=\"col\">\n <abbr title={weekday('long').format(date)}>\n {weekday('short').format(date)}\n </abbr>\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {weeks.map((week) => (\n <tr key={week[0]}>\n {week.map((day) => {\n const entries = [...(byDay.get(day) ?? [])].sort((a, b) =>\n a.value.localeCompare(b.value),\n );\n return (\n <td\n key={day}\n data-outside={!day.startsWith(month) || undefined}\n data-empty={entries.length === 0 || undefined}\n aria-current={day === todayDay ? 'date' : undefined}\n >\n <time dateTime={day} className={styles.day}>\n <span aria-hidden=\"true\" className={styles.dayNumber}>\n {Number(day.slice(8))}\n </span>\n <span className={styles.dayLabel}>\n {dayLabel.format(new Date(`${day}T00:00:00Z`))}\n </span>\n </time>\n {entries.length > 0 ? (\n <ul className={styles.items}>\n {entries.map(({ item }) => (\n <li\n key={item.id}\n data-current={\n isCurrent?.(item) === true || undefined\n }\n >\n <ItemTitle\n href={getItemHref?.(item) ?? null}\n current={isCurrent?.(item) ?? false}\n >\n {title !== undefined\n ? renderValue(item, title)\n : getItemLabel(item)}\n </ItemTitle>\n </li>\n ))}\n </ul>\n ) : null}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAYA,SAASe,IAAIC,OAAeC,SAAS,GAAW;CAC5C,OAAOC,OAAOF,KAAK,CAAC,CAACG,SAASF,QAAQ,GAAG;AAC7C;AAEA,SAASG,MAAMC,MAAoB;CAC/B,OAAO,GAAGN,IAAIM,KAAKE,eAAe,GAAG,CAAC,EAAC,GAAIR,IAAIM,KAAKG,YAAY,IAAI,CAAC,EAAC,GAAIT,IAAIM,KAAKI,WAAW,CAAC;AACnG;;AAGA,SAASC,QAAQV,OAAwB;CACrC,IAAIX,iBAAiBW,KAAK,GACtB,OAAOA,MAAMW,SAASX,MAAMY,OAAO;CAEvC,OAAO,OAAOZ,UAAU,WAAWA,QAAQ;AAC/C;;AAGA,SAASa,YAAYC,QAAwB;CACzC,IAAI;EACA,MAAMC,OAAO,IAAIC,KAAKC,OAAOH,MAAM;EAInC,OAAOC,KAAKG,cAAc,CAAC,CAACC,YAAYJ,KAAKK,UAAUD,YAAY;CACvE,QAAQ;EACJ,OAAO;CACX;AACJ;;AAGA,SAASE,SAASC,OAAeH,UAA8B;CAC3D,MAAM,CAACI,OAAO,MAAMC,QAAQ,KAAKF,MAAMG,MAAM,GAAG,CAAC,CAACC,IAAIC,MAAM;CAC5D,MAAMC,QAAQ,IAAItB,KAAKA,KAAKuB,IAAIN,MAAMC,QAAQ,GAAG,CAAC,CAAC;CACnD,MAAMM,OAAO,IAAIxB,KAAKA,KAAKuB,IAAIN,MAAMC,OAAO,CAAC,CAAC;CAE9C,MAAMO,UAAUH,MAAMI,UAAU,IAAKb,WAAW,IAAK,KAAK;CAC1D,MAAMR,QAAQL,KAAKuB,IAAIN,MAAMC,QAAQ,GAAG,IAAIO,MAAM;CAClD,MAAME,OAAiB,CAAA;CACvB,KAAK,IAAI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BAAA,OAAA;GAAgB,WAAAhB;GAAhB,UAAA;IACIC;IAwBCC;IAYDI;GAiEE;;EAAArB,EAAA,MAAAe;EAAAf,EAAA,MAAAgB;EAAAhB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAqB;EAAArB,EAAA,MAAA+B;CAAA,OAAAA,MAAA/B,EAAA;CAAA,OAtGN+B;AAsGM;AAnJP,SAAAwC,MAAAM,GAAAC,GAAA;CAAA,OAsG6BD,EAACzH,MAAM2H,cAAeD,EAAC1H,KAAM;AAAC"}
1
+ {"version":3,"file":"CalendarLayout.js","names":["ChevronLeft","ChevronRight","currentMonth","isMonth","shiftMonth","isDateRangeValue","Button","IconButton","usePanneauIntl","messages","ListItem","ListLayoutProps","styles","ItemTitle","getItemDays","highlight","pad","value","length","String","padStart","dayOf","date","Date","getUTCFullYear","getUTCMonth","getUTCDate","sortKey","start","end","getFirstDay","locale","info","Intl","Locale","getWeekInfo","firstDay","weekInfo","getWeeks","month","year","index","split","map","Number","first","UTC","last","offset","getUTCDay","days","time","getTime","push","Array","from","_","week","slice","CalendarLayout","t0","$","_c","items","columns","renderValue","getItemLabel","getItemHref","isCurrent","isHighlighted","label","calendar","intl","t1","t2","t3","t4","t5","t6","t7","today","undefined","t8","t9","title","weeks","monthLabel","DateTimeFormat","timeZone","format","dayLabel","weekday","day","t10","t11","t12","t13","Symbol","for","now","getFullYear","getMonth","getDate","todayDay","byDay","Map","shown","at","forEach","item","field","set","get","more","t14","formatMessage","previousMonth","t15","thisMonth","t16","nextMonth","header","navigation","onMonthChange","total","calendarMore","calendarMoreUnknown","grid","t17","day_0","day_1","entries","sort","_temp","startsWith","dayNumber","t18","item_0","id","highlighted","a","b","localeCompare","_c","styles","highlight"],"sources":["../../src/layouts/CalendarLayout.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from 'lucide-react';\n\nimport { currentMonth, isMonth, shiftMonth } from '@panneau/core';\nimport { isDateRangeValue } from '@panneau/fields/daterange';\nimport { Button, IconButton, usePanneauIntl } from '@panneau/ui';\n\nimport { messages } from '../messages';\nimport type { ListItem, ListLayoutProps } from '../types';\nimport styles from './CalendarLayout.module.css';\nimport { ItemTitle } from './ItemTitle';\nimport { getItemDays } from './calendarDays';\nimport highlight from './highlight.module.css';\n\nfunction pad(value: number, length = 2): string {\n return String(value).padStart(length, '0');\n}\n\nfunction dayOf(date: Date): string {\n return `${pad(date.getUTCFullYear(), 4)}-${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`;\n}\n\n/** What orders the items of a day: a date-time, or the start of a range. */\nfunction sortKey(value: unknown): string {\n if (isDateRangeValue(value)) {\n return value.start ?? value.end ?? '';\n }\n return typeof value === 'string' ? value : '';\n}\n\n/** The first day of the week in a locale: 1 for Monday to 7 for Sunday. */\nfunction getFirstDay(locale: string): number {\n try {\n const info = new Intl.Locale(locale) as Intl.Locale & {\n getWeekInfo?: () => { firstDay: number };\n weekInfo?: { firstDay: number };\n };\n return info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay ?? 1;\n } catch {\n return 1;\n }\n}\n\n/** The weeks that show a month, as days (`2026-11-02`), from the first day of the week. */\nfunction getWeeks(month: string, firstDay: number): string[][] {\n const [year = 1970, index = 1] = month.split('-').map(Number);\n const first = new Date(Date.UTC(year, index - 1, 1));\n const last = new Date(Date.UTC(year, index, 0));\n // getUTCDay(): 0 for Sunday; firstDay: 7 for Sunday.\n const offset = (first.getUTCDay() - (firstDay % 7) + 7) % 7;\n const start = Date.UTC(year, index - 1, 1 - offset);\n const days: string[] = [];\n for (let time = start; days.length % 7 !== 0 || time <= last.getTime(); time += 86_400_000) {\n days.push(dayOf(new Date(time)));\n }\n return Array.from({ length: days.length / 7 }, (_, week) => days.slice(week * 7, week * 7 + 7));\n}\n\n/**\n * Items on the days of a month (decision 0044), and a range on each day it covers (decision 0053):\n * the weeks of the month, from the first day of the week of the locale, with the title of each item\n * as its link, in the order of their dates, and buttons to the previous, the next and the current\n * month. On narrow lists, the days that have items, one under the other.\n */\nexport function CalendarLayout({\n items,\n columns,\n renderValue,\n getItemLabel,\n getItemHref,\n isCurrent,\n isHighlighted,\n label,\n calendar,\n}: ListLayoutProps) {\n const intl = usePanneauIntl();\n const today = currentMonth();\n const month = calendar !== undefined && isMonth(calendar.month) ? calendar.month : today;\n const [year = 1970, index = 1] = month.split('-').map(Number);\n const [title] = columns;\n const weeks = getWeeks(month, getFirstDay(intl.locale));\n const monthLabel = new Intl.DateTimeFormat(intl.locale, {\n month: 'long',\n year: 'numeric',\n timeZone: 'UTC',\n }).format(new Date(Date.UTC(year, index - 1, 1)));\n const dayLabel = new Intl.DateTimeFormat(intl.locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n timeZone: 'UTC',\n });\n const weekday = (format: 'short' | 'long') =>\n new Intl.DateTimeFormat(intl.locale, { weekday: format, timeZone: 'UTC' });\n const now = new Date();\n const todayDay = `${pad(now.getFullYear(), 4)}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;\n\n const byDay = new Map<string, { item: ListItem; value: string }[]>();\n if (calendar !== undefined) {\n const shown = { first: weeks[0]?.[0] ?? '', last: weeks.at(-1)?.at(-1) ?? '' };\n items.forEach((item) => {\n const value = item[calendar.field];\n getItemDays(value, shown, calendar.timeZone).forEach((day) => {\n byDay.set(day, [...(byDay.get(day) ?? []), { item, value: sortKey(value) }]);\n });\n });\n }\n const more = calendar?.more ?? null;\n\n return (\n <div className={styles.calendar}>\n <div className={styles.header}>\n <p className={styles.month} aria-live=\"polite\">\n {monthLabel}\n </p>\n <div className={styles.navigation}>\n <IconButton\n icon={ChevronLeft}\n label={intl.formatMessage(messages.previousMonth)}\n onPress={() => calendar?.onMonthChange(shiftMonth(month, -1))}\n />\n <Button\n size=\"sm\"\n isDisabled={month === today}\n onPress={() => calendar?.onMonthChange(today)}\n >\n {intl.formatMessage(messages.thisMonth)}\n </Button>\n <IconButton\n icon={ChevronRight}\n label={intl.formatMessage(messages.nextMonth)}\n onPress={() => calendar?.onMonthChange(shiftMonth(month, 1))}\n />\n </div>\n </div>\n {more !== null ? (\n <p className={styles.more} role=\"status\">\n {more.total !== null\n ? intl.formatMessage(messages.calendarMore, {\n shown: items.length,\n total: more.total,\n })\n : intl.formatMessage(messages.calendarMoreUnknown, {\n shown: items.length,\n })}\n </p>\n ) : null}\n <table className={styles.grid} aria-label={`${label}, ${monthLabel}`}>\n <thead>\n <tr>\n {(weeks[0] ?? []).map((day) => {\n const date = new Date(`${day}T00:00:00Z`);\n return (\n <th key={day} scope=\"col\">\n <abbr title={weekday('long').format(date)}>\n {weekday('short').format(date)}\n </abbr>\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {weeks.map((week) => (\n <tr key={week[0]}>\n {week.map((day) => {\n const entries = [...(byDay.get(day) ?? [])].sort((a, b) =>\n a.value.localeCompare(b.value),\n );\n return (\n <td\n key={day}\n data-outside={!day.startsWith(month) || undefined}\n data-empty={entries.length === 0 || undefined}\n aria-current={day === todayDay ? 'date' : undefined}\n >\n <time dateTime={day} className={styles.day}>\n <span aria-hidden=\"true\" className={styles.dayNumber}>\n {Number(day.slice(8))}\n </span>\n <span className={styles.dayLabel}>\n {dayLabel.format(new Date(`${day}T00:00:00Z`))}\n </span>\n </time>\n {entries.length > 0 ? (\n <ul className={styles.items}>\n {entries.map(({ item }) => (\n <li\n key={item.id}\n className={\n isHighlighted?.(item) === true\n ? highlight.highlighted\n : undefined\n }\n data-current={\n isCurrent?.(item) === true || undefined\n }\n data-highlighted={\n isHighlighted?.(item) === true ||\n undefined\n }\n >\n <ItemTitle\n href={getItemHref?.(item) ?? null}\n current={isCurrent?.(item) ?? false}\n >\n {title !== undefined\n ? renderValue(item, title)\n : getItemLabel(item)}\n </ItemTitle>\n </li>\n ))}\n </ul>\n ) : null}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAaA,SAASgB,IAAIC,OAAeC,SAAS,GAAW;CAC5C,OAAOC,OAA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UAAA;IACIC;IAwBCC;IAYDI;GA0EE;;EAAAtB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAgC;CAAA,OAAAA,MAAAhC,EAAA;CAAA,OA/GNgC;AA+GM;AA7JP,SAAAwC,MAAAO,GAAAC,GAAA;CAAA,OAuG6BD,EAAC3H,MAAM6H,cAAeD,EAAC5H,KAAM;AAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { ListLayoutProps } from '../types.js';
2
2
  /** Items as cards: the first column is the title, the others are listed under it. */
3
- export declare function CardsLayout({ items, columns, renderValue, getItemLabel, getItemHref, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
3
+ export declare function CardsLayout({ items, columns, renderValue, getItemLabel, getItemHref, isCurrent, isHighlighted, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
4
4
  //# sourceMappingURL=CardsLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardsLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/CardsLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BA6DjB"}
1
+ {"version":3,"file":"CardsLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/CardsLayout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BA+DjB"}
@@ -1,6 +1,8 @@
1
1
  import { messages } from "../messages.js";
2
2
  import { ItemTitle } from "./ItemTitle.js";
3
+ import highlight_module_default from "./highlight.module.js";
3
4
  import { RowActionsFit, fitContent, useRowActionsFit } from "../actions/fit.js";
5
+ import { cx } from "../cx.js";
4
6
  import CardsLayout_module_default from "./CardsLayout.module.js";
5
7
  import { c } from "react/compiler-runtime";
6
8
  import { Checkbox, usePanneauIntl } from "@panneau/ui";
@@ -9,7 +11,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
9
11
  /** Items as cards: the first column is the title, the others are listed under it. */
10
12
  function CardsLayout(t0) {
11
13
  const $ = c(18);
12
- const { items, columns, renderValue, getItemLabel, getItemHref, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection } = t0;
14
+ const { items, columns, renderValue, getItemLabel, getItemHref, isCurrent, isHighlighted, selectable, isSelected, onToggle, renderActions, label, pageSelection } = t0;
13
15
  const intl = usePanneauIntl();
14
16
  const [title, ...others] = columns;
15
17
  let t1;
@@ -36,10 +38,12 @@ function CardsLayout(t0) {
36
38
  const selected = selectable && isSelected(item);
37
39
  const actions = renderActions(item);
38
40
  const current = isCurrent?.(item) ?? false;
41
+ const highlighted = isHighlighted?.(item) ?? false;
39
42
  return /* @__PURE__ */ jsxs("li", {
40
- className: CardsLayout_module_default.card,
43
+ className: cx(CardsLayout_module_default.card, highlighted && highlight_module_default.highlighted),
41
44
  "data-selected": selected || void 0,
42
45
  "data-current": current || void 0,
46
+ "data-highlighted": highlighted || void 0,
43
47
  children: [
44
48
  /* @__PURE__ */ jsxs("div", {
45
49
  className: CardsLayout_module_default.header,
@@ -1 +1 @@
1
- {"version":3,"file":"CardsLayout.js","names":["Checkbox","usePanneauIntl","RowActionsFit","fitContent","useRowActionsFit","messages","ListLayoutProps","styles","ItemTitle","CardsLayout","t0","$","_c","items","columns","renderValue","getItemLabel","getItemHref","isCurrent","selectable","isSelected","onToggle","renderActions","label","pageSelection","intl","title","others","t1","fitLevel","measureList","T0","t2","t4","map","item","selected","actions","current","id","card","undefined","header","formatMessage","selectItem","length","values","column","value","t5","t3","cards","t6","t7","_c","styles"],"sources":["../../src/layouts/CardsLayout.tsx"],"sourcesContent":["import { Checkbox, usePanneauIntl } from '@panneau/ui';\n\nimport { RowActionsFit, fitContent, useRowActionsFit } from '../actions/fit';\nimport { messages } from '../messages';\nimport type { ListLayoutProps } from '../types';\nimport styles from './CardsLayout.module.css';\nimport { ItemTitle } from './ItemTitle';\n\n/** Items as cards: the first column is the title, the others are listed under it. */\nexport function CardsLayout({\n items,\n columns,\n renderValue,\n getItemLabel,\n getItemHref,\n isCurrent,\n selectable,\n isSelected,\n onToggle,\n renderActions,\n label,\n pageSelection,\n}: ListLayoutProps) {\n const intl = usePanneauIntl();\n const [title, ...others] = columns;\n const [fitLevel, measureList] = useRowActionsFit(fitContent(items, columns));\n return (\n <RowActionsFit value={fitLevel}>\n <div ref={measureList}>\n {selectable ? <div className={styles.pageSelection}>{pageSelection}</div> : null}\n <ul className={styles.cards} aria-label={label}>\n {items.map((item) => {\n const selected = selectable && isSelected(item);\n const actions = renderActions(item);\n const current = isCurrent?.(item) ?? false;\n return (\n <li\n key={item.id}\n className={styles.card}\n data-selected={selected || undefined}\n data-current={current || undefined}\n >\n <div className={styles.header}>\n <div className={styles.title}>\n <ItemTitle\n href={getItemHref?.(item) ?? null}\n current={current}\n >\n {title !== undefined\n ? renderValue(item, title)\n : getItemLabel(item)}\n </ItemTitle>\n </div>\n {selectable ? (\n <Checkbox\n aria-label={intl.formatMessage(messages.selectItem, {\n item: getItemLabel(item),\n })}\n isSelected={selected}\n onChange={() => onToggle(item)}\n />\n ) : null}\n </div>\n {others.length > 0 ? (\n <dl className={styles.values}>\n {others.map((column) => (\n <div key={column.id} className={styles.value}>\n <dt>{column.label ?? column.id}</dt>\n <dd>{renderValue(item, column)}</dd>\n </div>\n ))}\n </dl>\n ) : null}\n {actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </li>\n );\n })}\n </ul>\n </div>\n </RowActionsFit>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAOS,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqB,MAAA,EAAAC,OAAAC,SAAAC,aAAAC,cAAAC,aAAAC,WAAAC,YAAAC,YAAAC,UAAAC,eAAAC,OAAAC,kBAAAd;CAcxB,MAAAe,OAAaxB,eAAe;CAC5B,MAAA,CAAAyB,OAAA,GAAAC,UAA2Bb;CAAQ,IAAAc;CAAA,IAAAjB,EAAA,OAAAG,WAAAH,EAAA,OAAAE,OAAA;EACce,KAAAzB,WAAWU,OAAOC,OAAO;EAACH,EAAA,KAAAG;EAAAH,EAAA,KAAAE;EAAAF,EAAA,KAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAA3E,MAAA,CAAAkB,UAAAC,eAAgC1B,iBAAiBwB,EAA0B;CAEtE,MAAAG,KAAA7B;CAAa,IAAA8B;CAAA,IAAArB,EAAA,OAAAa,iBAAAb,EAAA,OAAAQ,YAAA;EAELa,KAAAb,aAAa,oBAAA,OAAA;GAAgB,WAAAZ,2BAAMiB;GAAiBA,UAAAA;EAAoB,CAAA,IAAxE;EAA+Eb,EAAA,KAAAa;EAAAb,EAAA,KAAAQ;EAAAR,EAAA,KAAAqB;CAAA,OAAAA,KAAArB,EAAA;CACjEJ,MAAAA,KAAAA;CACV,MAAA0B,KAAApB,MAAKqB,KAAKC,SAAA;EACP,MAAAC,WAAiBjB,cAAcC,WAAWe,IAAI;EAC9C,MAAAE,UAAgBf,cAAca,IAAI;EAClC,MAAAG,UAAgBpB,YAAYiB,IAAa,KAAzB;EAA2B,OAEvC,qBAAA,MAAA;GAEe,WAAA5B,2BAAMiC;GACF,iBAAAJ,YAAAK,KAAAA;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AtB,EAAA,KAAAsC;CAAA,OAAAA,KAAAtC,EAAA;CAAA,IAAAyC;CAAA,IAAAzC,EAAA,QAAAmB,eAAAnB,EAAA,QAAAqB,MAAArB,EAAA,QAAAsC,IAAA;EAnDTG,KAAA,qBAAA,OAAA;GAAUtB,KAAAA;GAAV,UAAA,CACKE,IACDiB,EAkDE;;EAAAtC,EAAA,MAAAmB;EAAAnB,EAAA,MAAAqB;EAAArB,EAAA,MAAAsC;EAAAtC,EAAA,MAAAyC;CAAA,OAAAA,KAAAzC,EAAA;CAAA,IAAA0C;CAAA,IAAA1C,EAAA,QAAAoB,MAAApB,EAAA,QAAAkB,YAAAlB,EAAA,QAAAyC,IAAA;EArDVC,KAAA,oBAAC,IAAD;GAAsBxB,OAAAA;GAClBuB,UAAAA;EADU,CAAA;EAsDEzC,EAAA,MAAAoB;EAAApB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAyC;EAAAzC,EAAA,MAAA0C;CAAA,OAAAA,KAAA1C,EAAA;CAAA,OAtDhB0C;AAsDgB"}
1
+ {"version":3,"file":"CardsLayout.js","names":["Checkbox","usePanneauIntl","RowActionsFit","fitContent","useRowActionsFit","cx","messages","ListLayoutProps","styles","ItemTitle","highlight","CardsLayout","t0","$","_c","items","columns","renderValue","getItemLabel","getItemHref","isCurrent","isHighlighted","selectable","isSelected","onToggle","renderActions","label","pageSelection","intl","title","others","t1","fitLevel","measureList","T0","t2","t4","map","item","selected","actions","current","highlighted","id","card","undefined","header","formatMessage","selectItem","length","values","column","value","t5","t3","cards","t6","t7","_c","styles","highlight"],"sources":["../../src/layouts/CardsLayout.tsx"],"sourcesContent":["import { Checkbox, usePanneauIntl } from '@panneau/ui';\n\nimport { RowActionsFit, fitContent, useRowActionsFit } from '../actions/fit';\nimport { cx } from '../cx';\nimport { messages } from '../messages';\nimport type { ListLayoutProps } from '../types';\nimport styles from './CardsLayout.module.css';\nimport { ItemTitle } from './ItemTitle';\nimport highlight from './highlight.module.css';\n\n/** Items as cards: the first column is the title, the others are listed under it. */\nexport function CardsLayout({\n items,\n columns,\n renderValue,\n getItemLabel,\n getItemHref,\n isCurrent,\n isHighlighted,\n selectable,\n isSelected,\n onToggle,\n renderActions,\n label,\n pageSelection,\n}: ListLayoutProps) {\n const intl = usePanneauIntl();\n const [title, ...others] = columns;\n const [fitLevel, measureList] = useRowActionsFit(fitContent(items, columns));\n return (\n <RowActionsFit value={fitLevel}>\n <div ref={measureList}>\n {selectable ? <div className={styles.pageSelection}>{pageSelection}</div> : null}\n <ul className={styles.cards} aria-label={label}>\n {items.map((item) => {\n const selected = selectable && isSelected(item);\n const actions = renderActions(item);\n const current = isCurrent?.(item) ?? false;\n const highlighted = isHighlighted?.(item) ?? false;\n return (\n <li\n key={item.id}\n className={cx(styles.card, highlighted && highlight.highlighted)}\n data-selected={selected || undefined}\n data-current={current || undefined}\n data-highlighted={highlighted || undefined}\n >\n <div className={styles.header}>\n <div className={styles.title}>\n <ItemTitle\n href={getItemHref?.(item) ?? null}\n current={current}\n >\n {title !== undefined\n ? renderValue(item, title)\n : getItemLabel(item)}\n </ItemTitle>\n </div>\n {selectable ? (\n <Checkbox\n aria-label={intl.formatMessage(messages.selectItem, {\n item: getItemLabel(item),\n })}\n isSelected={selected}\n onChange={() => onToggle(item)}\n />\n ) : null}\n </div>\n {others.length > 0 ? (\n <dl className={styles.values}>\n {others.map((column) => (\n <div key={column.id} className={styles.value}>\n <dt>{column.label ?? column.id}</dt>\n <dd>{renderValue(item, column)}</dd>\n </div>\n ))}\n </dl>\n ) : null}\n {actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </li>\n );\n })}\n </ul>\n </div>\n </RowActionsFit>\n );\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAOW,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqB,MAAA,EAAAC,OAAAC,SAAAC,aAAAC,cAAAC,aAAAC,WAAAC,eAAAC,YAAAC,YAAAC,UAAAC,eAAAC,OAA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EAAApB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAwC;EAAAxC,EAAA,MAAA2C;CAAA,OAAAA,KAAA3C,EAAA;CAAA,IAAA4C;CAAA,IAAA5C,EAAA,QAAAqB,MAAArB,EAAA,QAAAmB,YAAAnB,EAAA,QAAA2C,IAAA;EAvDVC,KAAA,oBAAC,IAAD;GAAsBzB,OAAAA;GAClBwB,UAAAA;EADU,CAAA;EAwDE3C,EAAA,MAAAqB;EAAArB,EAAA,MAAAmB;EAAAnB,EAAA,MAAA2C;EAAA3C,EAAA,MAAA4C;CAAA,OAAAA,KAAA5C,EAAA;CAAA,OAxDhB4C;AAwDgB"}
@@ -4,5 +4,5 @@ import type { ListLayoutProps } from '../types.js';
4
4
  * resource), its title under it, its checkbox and its actions. An item without an image shows a
5
5
  * placeholder.
6
6
  */
7
- export declare function GalleryLayout({ items, columns, renderValue, getItemLabel, getItemHref, getItemImage, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
7
+ export declare function GalleryLayout({ items, columns, renderValue, getItemLabel, getItemHref, getItemImage, isCurrent, isHighlighted, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
8
8
  //# sourceMappingURL=GalleryLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GalleryLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/GalleryLayout.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BAkEjB"}
1
+ {"version":3,"file":"GalleryLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/GalleryLayout.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BAoEjB"}
@@ -1,6 +1,8 @@
1
1
  import { messages } from "../messages.js";
2
2
  import { ItemTitle } from "./ItemTitle.js";
3
+ import highlight_module_default from "./highlight.module.js";
3
4
  import { RowActionsFit, fitContent, useRowActionsFit } from "../actions/fit.js";
5
+ import { cx } from "../cx.js";
4
6
  import GalleryLayout_module_default from "./GalleryLayout.module.js";
5
7
  import { c } from "react/compiler-runtime";
6
8
  import { Checkbox, Icon, usePanneauIntl } from "@panneau/ui";
@@ -13,8 +15,8 @@ import { ImageOff } from "lucide-react";
13
15
  * placeholder.
14
16
  */
15
17
  function GalleryLayout(t0) {
16
- const $ = c(41);
17
- const { items, columns, renderValue, getItemLabel, getItemHref, getItemImage, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection } = t0;
18
+ const $ = c(43);
19
+ const { items, columns, renderValue, getItemLabel, getItemHref, getItemImage, isCurrent, isHighlighted, selectable, isSelected, onToggle, renderActions, label, pageSelection } = t0;
18
20
  const intl = usePanneauIntl();
19
21
  const [title] = columns;
20
22
  let t1;
@@ -36,18 +38,20 @@ function GalleryLayout(t0) {
36
38
  $[5] = t2;
37
39
  } else t2 = $[5];
38
40
  let t3;
39
- if ($[6] !== getItemHref || $[7] !== getItemImage || $[8] !== getItemLabel || $[9] !== intl || $[10] !== isCurrent || $[11] !== isSelected || $[12] !== items || $[13] !== onToggle || $[14] !== renderActions || $[15] !== renderValue || $[16] !== selectable || $[17] !== title) {
41
+ if ($[6] !== getItemHref || $[7] !== getItemImage || $[8] !== getItemLabel || $[9] !== intl || $[10] !== isCurrent || $[11] !== isHighlighted || $[12] !== isSelected || $[13] !== items || $[14] !== onToggle || $[15] !== renderActions || $[16] !== renderValue || $[17] !== selectable || $[18] !== title) {
40
42
  let t4;
41
- if ($[19] !== getItemHref || $[20] !== getItemImage || $[21] !== getItemLabel || $[22] !== intl || $[23] !== isCurrent || $[24] !== isSelected || $[25] !== onToggle || $[26] !== renderActions || $[27] !== renderValue || $[28] !== selectable || $[29] !== title) {
43
+ if ($[20] !== getItemHref || $[21] !== getItemImage || $[22] !== getItemLabel || $[23] !== intl || $[24] !== isCurrent || $[25] !== isHighlighted || $[26] !== isSelected || $[27] !== onToggle || $[28] !== renderActions || $[29] !== renderValue || $[30] !== selectable || $[31] !== title) {
42
44
  t4 = (item) => {
43
45
  const selected = selectable && isSelected(item);
44
46
  const actions = renderActions(item);
45
47
  const current = isCurrent?.(item) ?? false;
48
+ const highlighted = isHighlighted?.(item) ?? false;
46
49
  const image = getItemImage?.(item) ?? null;
47
50
  return /* @__PURE__ */ jsxs("li", {
48
- className: GalleryLayout_module_default.tile,
51
+ className: cx(GalleryLayout_module_default.tile, highlighted && highlight_module_default.highlighted),
49
52
  "data-selected": selected || void 0,
50
53
  "data-current": current || void 0,
54
+ "data-highlighted": highlighted || void 0,
51
55
  children: [/* @__PURE__ */ jsxs("div", {
52
56
  className: GalleryLayout_module_default.media,
53
57
  children: [image !== null ? /* @__PURE__ */ jsx("img", {
@@ -84,66 +88,68 @@ function GalleryLayout(t0) {
84
88
  })]
85
89
  }, item.id);
86
90
  };
87
- $[19] = getItemHref;
88
- $[20] = getItemImage;
89
- $[21] = getItemLabel;
90
- $[22] = intl;
91
- $[23] = isCurrent;
92
- $[24] = isSelected;
93
- $[25] = onToggle;
94
- $[26] = renderActions;
95
- $[27] = renderValue;
96
- $[28] = selectable;
97
- $[29] = title;
98
- $[30] = t4;
99
- } else t4 = $[30];
91
+ $[20] = getItemHref;
92
+ $[21] = getItemImage;
93
+ $[22] = getItemLabel;
94
+ $[23] = intl;
95
+ $[24] = isCurrent;
96
+ $[25] = isHighlighted;
97
+ $[26] = isSelected;
98
+ $[27] = onToggle;
99
+ $[28] = renderActions;
100
+ $[29] = renderValue;
101
+ $[30] = selectable;
102
+ $[31] = title;
103
+ $[32] = t4;
104
+ } else t4 = $[32];
100
105
  t3 = items.map(t4);
101
106
  $[6] = getItemHref;
102
107
  $[7] = getItemImage;
103
108
  $[8] = getItemLabel;
104
109
  $[9] = intl;
105
110
  $[10] = isCurrent;
106
- $[11] = isSelected;
107
- $[12] = items;
108
- $[13] = onToggle;
109
- $[14] = renderActions;
110
- $[15] = renderValue;
111
- $[16] = selectable;
112
- $[17] = title;
113
- $[18] = t3;
114
- } else t3 = $[18];
111
+ $[11] = isHighlighted;
112
+ $[12] = isSelected;
113
+ $[13] = items;
114
+ $[14] = onToggle;
115
+ $[15] = renderActions;
116
+ $[16] = renderValue;
117
+ $[17] = selectable;
118
+ $[18] = title;
119
+ $[19] = t3;
120
+ } else t3 = $[19];
115
121
  let t4;
116
- if ($[31] !== label || $[32] !== t3) {
122
+ if ($[33] !== label || $[34] !== t3) {
117
123
  t4 = /* @__PURE__ */ jsx("ul", {
118
124
  className: GalleryLayout_module_default.gallery,
119
125
  "aria-label": label,
120
126
  children: t3
121
127
  });
122
- $[31] = label;
123
- $[32] = t3;
124
- $[33] = t4;
125
- } else t4 = $[33];
128
+ $[33] = label;
129
+ $[34] = t3;
130
+ $[35] = t4;
131
+ } else t4 = $[35];
126
132
  let t5;
127
- if ($[34] !== measureList || $[35] !== t2 || $[36] !== t4) {
133
+ if ($[36] !== measureList || $[37] !== t2 || $[38] !== t4) {
128
134
  t5 = /* @__PURE__ */ jsxs("div", {
129
135
  ref: measureList,
130
136
  children: [t2, t4]
131
137
  });
132
- $[34] = measureList;
133
- $[35] = t2;
134
- $[36] = t4;
135
- $[37] = t5;
136
- } else t5 = $[37];
138
+ $[36] = measureList;
139
+ $[37] = t2;
140
+ $[38] = t4;
141
+ $[39] = t5;
142
+ } else t5 = $[39];
137
143
  let t6;
138
- if ($[38] !== fitLevel || $[39] !== t5) {
144
+ if ($[40] !== fitLevel || $[41] !== t5) {
139
145
  t6 = /* @__PURE__ */ jsx(RowActionsFit, {
140
146
  value: fitLevel,
141
147
  children: t5
142
148
  });
143
- $[38] = fitLevel;
144
- $[39] = t5;
145
- $[40] = t6;
146
- } else t6 = $[40];
149
+ $[40] = fitLevel;
150
+ $[41] = t5;
151
+ $[42] = t6;
152
+ } else t6 = $[42];
147
153
  return t6;
148
154
  }
149
155
  //#endregion