@burdenoff/microfe-bigconsole 2026.1110.7 → 2026.1111.1

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.
@@ -1,8 +1,9 @@
1
- import { memo as e, useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
2
- import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
1
+ import { resolveDefaultSort as e } from "./tableSort.js";
2
+ import { memo as t, useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
3
+ import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
5
  // src/bigconsole/components/widgets/table/TableConfig.tsx
5
- var c = [
6
+ var l = [
6
7
  {
7
8
  value: "gt",
8
9
  labelKey: "bigconsole.widget.config.table.operator.gt",
@@ -48,7 +49,7 @@ var c = [
48
49
  labelKey: "bigconsole.widget.config.table.operator.contains",
49
50
  labelDefault: "contains"
50
51
  }
51
- ], l = [
52
+ ], u = [
52
53
  {
53
54
  value: "danger",
54
55
  labelKey: "bigconsole.widget.config.table.intent.danger",
@@ -74,46 +75,46 @@ var c = [
74
75
  labelKey: "bigconsole.widget.config.table.intent.neutral",
75
76
  labelDefault: "Neutral"
76
77
  }
77
- ], u = "px-2 py-1 text-xs text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg", d = e(function({ config: e, onChange: d }) {
78
- let { t: f } = a(), p = r(() => (e.columns || []).map((e) => typeof e == "string" ? {
78
+ ], d = "px-2 py-1 text-xs text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg", f = t(function({ config: t, onChange: f }) {
79
+ let { t: p } = o(), m = i(() => (t.columns || []).map((e) => typeof e == "string" ? {
79
80
  field: e,
80
81
  header: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " ")
81
- } : e), []), [m, h] = i(p);
82
- n(() => {
83
- JSON.stringify(e.columns) !== JSON.stringify(m) && m.length > 0 && d({
84
- ...e,
85
- columns: m
82
+ } : e), []), [h, g] = a(m);
83
+ r(() => {
84
+ JSON.stringify(t.columns) !== JSON.stringify(h) && h.length > 0 && f({
85
+ ...t,
86
+ columns: h
86
87
  });
87
- }, [m]), n(() => {
88
- let t = (e.columns || []).map((e) => typeof e == "string" ? {
88
+ }, [h]), r(() => {
89
+ let e = (t.columns || []).map((e) => typeof e == "string" ? {
89
90
  field: e,
90
91
  header: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " ")
91
92
  } : e);
92
- h(t);
93
- }, [e.columns]);
94
- let g = t((t, n) => {
95
- d({
96
- ...e,
97
- [t]: n
93
+ g(e);
94
+ }, [t.columns]);
95
+ let _ = n((e, n) => {
96
+ f({
97
+ ...t,
98
+ [e]: n
98
99
  });
99
- }, [e, d]), _ = t((e, t, n) => {
100
- h((r) => {
100
+ }, [t, f]), v = n((e, t, n) => {
101
+ g((r) => {
101
102
  let i = [...r];
102
103
  return i[e] = {
103
104
  ...i[e],
104
105
  [t]: n
105
106
  }, i;
106
107
  });
107
- }, []), v = t((e, t) => {
108
- h((n) => {
108
+ }, []), y = n((e, t) => {
109
+ g((n) => {
109
110
  let r = [...n];
110
111
  return r[e] = {
111
112
  ...r[e],
112
113
  conditionalRules: t
113
114
  }, r;
114
115
  });
115
- }, []), y = t((e) => {
116
- let t = m[e]?.conditionalRules ?? [], n = {
116
+ }, []), b = n((e) => {
117
+ let t = h[e]?.conditionalRules ?? [], n = {
117
118
  operator: "gt",
118
119
  value: 0,
119
120
  style: {
@@ -122,15 +123,15 @@ var c = [
122
123
  bold: !0
123
124
  }
124
125
  };
125
- v(e, [...t, n]);
126
- }, [m, v]), b = t((e, t, n) => {
127
- let r = (m[e]?.conditionalRules ?? []).map((e, r) => r === t ? {
126
+ y(e, [...t, n]);
127
+ }, [h, y]), x = n((e, t, n) => {
128
+ let r = (h[e]?.conditionalRules ?? []).map((e, r) => r === t ? {
128
129
  ...e,
129
130
  ...n
130
131
  } : e);
131
- v(e, r);
132
- }, [m, v]), x = t((e, t, n) => {
133
- let r = (m[e]?.conditionalRules ?? []).map((e, r) => r === t ? {
132
+ y(e, r);
133
+ }, [h, y]), S = n((e, t, n) => {
134
+ let r = (h[e]?.conditionalRules ?? []).map((e, r) => r === t ? {
134
135
  ...e,
135
136
  style: {
136
137
  ...e.style,
@@ -138,84 +139,146 @@ var c = [
138
139
  textColor: n
139
140
  }
140
141
  } : e);
141
- v(e, r);
142
- }, [m, v]), S = t((e, t) => {
143
- let n = m[e]?.conditionalRules ?? [];
144
- v(e, n.filter((e, n) => n !== t));
145
- }, [m, v]), C = t(() => {
146
- h((e) => [...e, {
142
+ y(e, r);
143
+ }, [h, y]), C = n((e, t) => {
144
+ let n = h[e]?.conditionalRules ?? [];
145
+ y(e, n.filter((e, n) => n !== t));
146
+ }, [h, y]), w = i(() => h.map((e) => ({
147
+ field: (e.key || e.field || "").trim(),
148
+ header: e.label || e.header || ""
149
+ })).filter((e) => e.field), [h]), T = e(t), E = T.column !== null && !w.some((e) => e.field === T.column), D = n((e) => {
150
+ f({
151
+ ...t,
152
+ defaultSortColumn: e || void 0,
153
+ defaultSortDirection: e ? t.defaultSortDirection === "desc" ? "desc" : "asc" : void 0
154
+ });
155
+ }, [t, f]), O = n(() => {
156
+ g((e) => [...e, {
147
157
  field: "",
148
158
  header: ""
149
159
  }]);
150
- }, []), w = t((e) => {
151
- h((t) => t.filter((t, n) => n !== e));
160
+ }, []), k = n((e) => {
161
+ g((t) => t.filter((t, n) => n !== e));
152
162
  }, []);
153
- return /* @__PURE__ */ s("div", {
163
+ return /* @__PURE__ */ c("div", {
154
164
  className: "min-w-0 space-y-form-gap",
155
165
  children: [
156
- /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("label", {
166
+ /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
157
167
  className: "block text-sm font-medium text-text-primary mb-1",
158
- children: f("bigconsole.widget.config.table.pageSize.label", "Page Size")
159
- }), /* @__PURE__ */ s("select", {
160
- value: e.pageSize || 10,
161
- onChange: (e) => g("pageSize", Number(e.target.value)),
168
+ children: p("bigconsole.widget.config.table.pageSize.label", "Page Size")
169
+ }), /* @__PURE__ */ c("select", {
170
+ value: t.pageSize || 10,
171
+ onChange: (e) => _("pageSize", Number(e.target.value)),
162
172
  className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
163
173
  children: [
164
- /* @__PURE__ */ o("option", {
174
+ /* @__PURE__ */ s("option", {
165
175
  value: 10,
166
- children: f("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 10 })
176
+ children: p("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 10 })
167
177
  }),
168
- /* @__PURE__ */ o("option", {
178
+ /* @__PURE__ */ s("option", {
169
179
  value: 25,
170
- children: f("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 25 })
180
+ children: p("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 25 })
171
181
  }),
172
- /* @__PURE__ */ o("option", {
182
+ /* @__PURE__ */ s("option", {
173
183
  value: 50,
174
- children: f("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 50 })
184
+ children: p("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 50 })
175
185
  }),
176
- /* @__PURE__ */ o("option", {
186
+ /* @__PURE__ */ s("option", {
177
187
  value: 100,
178
- children: f("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 100 })
188
+ children: p("bigconsole.widget.config.table.pageSize.rows", "{{count}} rows", { count: 100 })
179
189
  })
180
190
  ]
181
191
  })] }),
182
- /* @__PURE__ */ s("div", { children: [
183
- /* @__PURE__ */ s("div", {
192
+ /* @__PURE__ */ c("div", { children: [
193
+ /* @__PURE__ */ s("label", {
194
+ htmlFor: "table-default-sort-column",
195
+ className: "block text-sm font-medium text-text-primary mb-1",
196
+ children: p("bigconsole.widget.config.table.defaultSort.label", "Default sort")
197
+ }),
198
+ /* @__PURE__ */ s("p", {
199
+ className: "text-sm text-text-secondary mb-2",
200
+ children: p("bigconsole.widget.config.table.defaultSort.help", "The table starts sorted like this every time it opens. Viewers can still click a column title to sort differently.")
201
+ }),
202
+ /* @__PURE__ */ c("div", {
203
+ className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
204
+ children: [/* @__PURE__ */ c("select", {
205
+ id: "table-default-sort-column",
206
+ value: T.column ?? "",
207
+ onChange: (e) => D(e.target.value),
208
+ disabled: w.length === 0 && !E,
209
+ "aria-label": p("bigconsole.widget.config.table.defaultSort.column", "Sort by"),
210
+ className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n disabled:opacity-60\n ",
211
+ children: [
212
+ /* @__PURE__ */ s("option", {
213
+ value: "",
214
+ children: p("bigconsole.widget.config.table.defaultSort.none", "No default sort")
215
+ }),
216
+ E && T.column && /* @__PURE__ */ s("option", {
217
+ value: T.column,
218
+ children: T.column
219
+ }),
220
+ w.map((e) => /* @__PURE__ */ s("option", {
221
+ value: e.field,
222
+ children: e.header && e.header !== e.field ? `${e.header} (${e.field})` : e.field
223
+ }, e.field))
224
+ ]
225
+ }), /* @__PURE__ */ c("select", {
226
+ value: T.direction ?? "asc",
227
+ onChange: (e) => _("defaultSortDirection", e.target.value === "desc" ? "desc" : "asc"),
228
+ disabled: T.column === null,
229
+ "aria-label": p("bigconsole.widget.config.table.defaultSort.direction", "Direction"),
230
+ className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n disabled:opacity-60\n ",
231
+ children: [/* @__PURE__ */ s("option", {
232
+ value: "asc",
233
+ children: p("bigconsole.widget.config.table.defaultSort.asc", "Ascending (A to Z, low to high)")
234
+ }), /* @__PURE__ */ s("option", {
235
+ value: "desc",
236
+ children: p("bigconsole.widget.config.table.defaultSort.desc", "Descending (Z to A, high to low)")
237
+ })]
238
+ })]
239
+ }),
240
+ w.length === 0 && !E && /* @__PURE__ */ s("p", {
241
+ className: "text-sm text-text-secondary mt-2",
242
+ children: p("bigconsole.widget.config.table.defaultSort.needColumns", "Add columns below to choose the column to sort by.")
243
+ })
244
+ ] }),
245
+ /* @__PURE__ */ c("div", { children: [
246
+ /* @__PURE__ */ c("div", {
184
247
  className: "flex items-center justify-between mb-2",
185
- children: [/* @__PURE__ */ o("label", {
248
+ children: [/* @__PURE__ */ s("label", {
186
249
  className: "text-sm font-medium text-text-primary",
187
- children: f("bigconsole.widget.config.table.columns.label", "Columns")
188
- }), /* @__PURE__ */ o("button", {
250
+ children: p("bigconsole.widget.config.table.columns.label", "Columns")
251
+ }), /* @__PURE__ */ s("button", {
189
252
  type: "button",
190
- onClick: C,
253
+ onClick: O,
191
254
  className: "\n text-sm text-action-primary-bg\n hover:text-action-primary-bgHover\n ",
192
- children: f("bigconsole.widget.config.table.columns.add", "+ Add Column")
255
+ children: p("bigconsole.widget.config.table.columns.add", "+ Add Column")
193
256
  })]
194
257
  }),
195
- /* @__PURE__ */ o("p", {
258
+ /* @__PURE__ */ s("p", {
196
259
  className: "text-sm text-text-secondary mb-3",
197
- children: f("bigconsole.widget.config.table.columns.replacementHelp", "Adding columns here replaces auto-generated columns. Only configured columns will be shown, in this order. In edit mode, drag table headers to reorder.")
260
+ children: p("bigconsole.widget.config.table.columns.replacementHelp", "Adding columns here replaces auto-generated columns. Only configured columns will be shown, in this order. In edit mode, drag table headers to reorder.")
198
261
  }),
199
- /* @__PURE__ */ s("div", {
262
+ /* @__PURE__ */ c("div", {
200
263
  className: "space-y-3",
201
- children: [m.map((e, t) => /* @__PURE__ */ s("div", {
264
+ children: [h.map((e, t) => /* @__PURE__ */ c("div", {
202
265
  className: "\n p-3\n bg-bg-sunken\n rounded-md\n space-y-2\n ",
203
266
  children: [
204
- /* @__PURE__ */ s("div", {
267
+ /* @__PURE__ */ c("div", {
205
268
  className: "flex items-center justify-between",
206
- children: [/* @__PURE__ */ o("span", {
269
+ children: [/* @__PURE__ */ s("span", {
207
270
  className: "text-xs text-text-secondary",
208
- children: f("bigconsole.widget.config.table.columns.columnN", "Column {{index}}", { index: t + 1 })
209
- }), /* @__PURE__ */ o("button", {
271
+ children: p("bigconsole.widget.config.table.columns.columnN", "Column {{index}}", { index: t + 1 })
272
+ }), /* @__PURE__ */ s("button", {
210
273
  type: "button",
211
- onClick: () => w(t),
274
+ onClick: () => k(t),
212
275
  className: "text-status-error-text hover:text-status-error-text/80",
213
- children: /* @__PURE__ */ o("svg", {
276
+ children: /* @__PURE__ */ s("svg", {
214
277
  className: "w-4 h-4",
215
278
  fill: "none",
216
279
  stroke: "currentColor",
217
280
  viewBox: "0 0 24 24",
218
- children: /* @__PURE__ */ o("path", {
281
+ children: /* @__PURE__ */ s("path", {
219
282
  strokeLinecap: "round",
220
283
  strokeLinejoin: "round",
221
284
  strokeWidth: 2,
@@ -224,166 +287,166 @@ var c = [
224
287
  })
225
288
  })]
226
289
  }),
227
- /* @__PURE__ */ s("div", {
290
+ /* @__PURE__ */ c("div", {
228
291
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
229
- children: [/* @__PURE__ */ o("input", {
292
+ children: [/* @__PURE__ */ s("input", {
230
293
  type: "text",
231
294
  value: e.field || "",
232
- onChange: (e) => _(t, "field", e.target.value),
233
- placeholder: f("bigconsole.widget.config.table.column.fieldPlaceholder", "Field name"),
295
+ onChange: (e) => v(t, "field", e.target.value),
296
+ placeholder: p("bigconsole.widget.config.table.column.fieldPlaceholder", "Field name"),
234
297
  className: "\n px-2 py-1\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
235
- }), /* @__PURE__ */ o("input", {
298
+ }), /* @__PURE__ */ s("input", {
236
299
  type: "text",
237
300
  value: e.header || "",
238
- onChange: (e) => _(t, "header", e.target.value),
239
- placeholder: f("bigconsole.widget.config.table.column.headerPlaceholder", "Header label"),
301
+ onChange: (e) => v(t, "header", e.target.value),
302
+ placeholder: p("bigconsole.widget.config.table.column.headerPlaceholder", "Header label"),
240
303
  className: "\n px-2 py-1\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
241
304
  })]
242
305
  }),
243
- /* @__PURE__ */ s("div", {
306
+ /* @__PURE__ */ c("div", {
244
307
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
245
- children: [/* @__PURE__ */ s("select", {
308
+ children: [/* @__PURE__ */ c("select", {
246
309
  value: e.format || "text",
247
- onChange: (e) => _(t, "format", e.target.value),
310
+ onChange: (e) => v(t, "format", e.target.value),
248
311
  className: "\n px-2 py-1\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
249
312
  children: [
250
- /* @__PURE__ */ o("option", {
313
+ /* @__PURE__ */ s("option", {
251
314
  value: "text",
252
- children: f("bigconsole.widget.config.table.format.text", "Text")
315
+ children: p("bigconsole.widget.config.table.format.text", "Text")
253
316
  }),
254
- /* @__PURE__ */ o("option", {
317
+ /* @__PURE__ */ s("option", {
255
318
  value: "number",
256
- children: f("bigconsole.widget.config.table.format.number", "Number")
319
+ children: p("bigconsole.widget.config.table.format.number", "Number")
257
320
  }),
258
- /* @__PURE__ */ o("option", {
321
+ /* @__PURE__ */ s("option", {
259
322
  value: "currency",
260
- children: f("bigconsole.widget.config.table.format.currency", "Currency")
323
+ children: p("bigconsole.widget.config.table.format.currency", "Currency")
261
324
  }),
262
- /* @__PURE__ */ o("option", {
325
+ /* @__PURE__ */ s("option", {
263
326
  value: "percentage",
264
- children: f("bigconsole.widget.config.table.format.percentage", "Percentage")
327
+ children: p("bigconsole.widget.config.table.format.percentage", "Percentage")
265
328
  }),
266
- /* @__PURE__ */ o("option", {
329
+ /* @__PURE__ */ s("option", {
267
330
  value: "date",
268
- children: f("bigconsole.widget.config.table.format.date", "Date")
331
+ children: p("bigconsole.widget.config.table.format.date", "Date")
269
332
  }),
270
- /* @__PURE__ */ o("option", {
333
+ /* @__PURE__ */ s("option", {
271
334
  value: "badge",
272
- children: f("bigconsole.widget.config.table.format.badge", "Badge")
335
+ children: p("bigconsole.widget.config.table.format.badge", "Badge")
273
336
  })
274
337
  ]
275
- }), /* @__PURE__ */ s("select", {
338
+ }), /* @__PURE__ */ c("select", {
276
339
  value: e.align || "left",
277
- onChange: (e) => _(t, "align", e.target.value),
340
+ onChange: (e) => v(t, "align", e.target.value),
278
341
  className: "\n px-2 py-1\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
279
342
  children: [
280
- /* @__PURE__ */ o("option", {
343
+ /* @__PURE__ */ s("option", {
281
344
  value: "left",
282
- children: f("bigconsole.widget.config.table.align.left", "Left")
345
+ children: p("bigconsole.widget.config.table.align.left", "Left")
283
346
  }),
284
- /* @__PURE__ */ o("option", {
347
+ /* @__PURE__ */ s("option", {
285
348
  value: "center",
286
- children: f("bigconsole.widget.config.table.align.center", "Center")
349
+ children: p("bigconsole.widget.config.table.align.center", "Center")
287
350
  }),
288
- /* @__PURE__ */ o("option", {
351
+ /* @__PURE__ */ s("option", {
289
352
  value: "right",
290
- children: f("bigconsole.widget.config.table.align.right", "Right")
353
+ children: p("bigconsole.widget.config.table.align.right", "Right")
291
354
  })
292
355
  ]
293
356
  })]
294
357
  }),
295
- /* @__PURE__ */ s("div", {
358
+ /* @__PURE__ */ c("div", {
296
359
  className: "pt-2 border-t border-border-default/60",
297
360
  children: [
298
- /* @__PURE__ */ s("div", {
361
+ /* @__PURE__ */ c("div", {
299
362
  className: "flex items-center justify-between mb-1",
300
- children: [/* @__PURE__ */ o("span", {
363
+ children: [/* @__PURE__ */ s("span", {
301
364
  className: "text-xs font-medium text-text-secondary",
302
- children: f("bigconsole.widget.config.table.conditionalFormatting.title", "Conditional formatting")
303
- }), /* @__PURE__ */ o("button", {
365
+ children: p("bigconsole.widget.config.table.conditionalFormatting.title", "Conditional formatting")
366
+ }), /* @__PURE__ */ s("button", {
304
367
  type: "button",
305
- onClick: () => y(t),
368
+ onClick: () => b(t),
306
369
  className: "text-xs text-action-primary-bg hover:text-action-primary-bgHover",
307
- children: f("bigconsole.widget.config.table.conditionalFormatting.addRule", "+ Add rule")
370
+ children: p("bigconsole.widget.config.table.conditionalFormatting.addRule", "+ Add rule")
308
371
  })]
309
372
  }),
310
- (e.conditionalRules?.length ?? 0) === 0 && /* @__PURE__ */ o("p", {
373
+ (e.conditionalRules?.length ?? 0) === 0 && /* @__PURE__ */ s("p", {
311
374
  className: "text-xs text-text-secondary",
312
- children: f("bigconsole.widget.config.table.conditionalFormatting.noRules", "No rules — cell shows its plain value.")
375
+ children: p("bigconsole.widget.config.table.conditionalFormatting.noRules", "No rules — cell shows its plain value.")
313
376
  }),
314
- /* @__PURE__ */ o("div", {
377
+ /* @__PURE__ */ s("div", {
315
378
  className: "space-y-2",
316
379
  children: (e.conditionalRules ?? []).map((n, r) => {
317
- let i = n.operator !== "isEmpty" && n.operator !== "isNotEmpty", a = i && n.valueType === "field", d = n.operator === "between" || n.operator === "outside", p = n.style?.bgColor ?? n.style?.textColor ?? "danger";
318
- return /* @__PURE__ */ s("div", {
380
+ let i = n.operator !== "isEmpty" && n.operator !== "isNotEmpty", a = i && n.valueType === "field", o = n.operator === "between" || n.operator === "outside", f = n.style?.bgColor ?? n.style?.textColor ?? "danger";
381
+ return /* @__PURE__ */ c("div", {
319
382
  className: "p-2 bg-bg-surface rounded-md border border-border-default space-y-2",
320
- children: [/* @__PURE__ */ s("div", {
383
+ children: [/* @__PURE__ */ c("div", {
321
384
  className: "flex items-center gap-2",
322
385
  children: [
323
- /* @__PURE__ */ o("select", {
386
+ /* @__PURE__ */ s("select", {
324
387
  value: n.operator,
325
- onChange: (e) => b(t, r, { operator: e.target.value }),
326
- className: `${u} flex-1`,
327
- children: c.map((e) => /* @__PURE__ */ o("option", {
388
+ onChange: (e) => x(t, r, { operator: e.target.value }),
389
+ className: `${d} flex-1`,
390
+ children: l.map((e) => /* @__PURE__ */ s("option", {
328
391
  value: e.value,
329
- children: f(e.labelKey, e.labelDefault)
392
+ children: p(e.labelKey, e.labelDefault)
330
393
  }, e.value))
331
394
  }),
332
- i && /* @__PURE__ */ s("select", {
395
+ i && /* @__PURE__ */ c("select", {
333
396
  value: a ? "field" : "constant",
334
- onChange: (e) => b(t, r, e.target.value === "field" ? { valueType: "field" } : {
397
+ onChange: (e) => x(t, r, e.target.value === "field" ? { valueType: "field" } : {
335
398
  valueType: "constant",
336
399
  fieldRef: void 0
337
400
  }),
338
- "aria-label": f("bigconsole.widget.config.table.rule.valueTypeLabel", "Compare to"),
339
- className: `${u} w-20`,
340
- children: [/* @__PURE__ */ o("option", {
401
+ "aria-label": p("bigconsole.widget.config.table.rule.valueTypeLabel", "Compare to"),
402
+ className: `${d} w-20`,
403
+ children: [/* @__PURE__ */ s("option", {
341
404
  value: "constant",
342
- children: f("bigconsole.widget.config.table.rule.valueTypeConstant", "Value")
343
- }), /* @__PURE__ */ o("option", {
405
+ children: p("bigconsole.widget.config.table.rule.valueTypeConstant", "Value")
406
+ }), /* @__PURE__ */ s("option", {
344
407
  value: "field",
345
- children: f("bigconsole.widget.config.table.rule.valueTypeField", "Field")
408
+ children: p("bigconsole.widget.config.table.rule.valueTypeField", "Field")
346
409
  })]
347
410
  }),
348
- a ? /* @__PURE__ */ s("select", {
411
+ a ? /* @__PURE__ */ c("select", {
349
412
  value: n.fieldRef ?? "",
350
- onChange: (e) => b(t, r, {
413
+ onChange: (e) => x(t, r, {
351
414
  valueType: "field",
352
415
  fieldRef: e.target.value
353
416
  }),
354
- className: `${u} w-28`,
355
- children: [/* @__PURE__ */ o("option", {
417
+ className: `${d} w-28`,
418
+ children: [/* @__PURE__ */ s("option", {
356
419
  value: "",
357
- children: f("bigconsole.widget.config.table.rule.fieldRefPlaceholder", "Select field")
358
- }), m.filter((t) => t.key !== e.key).map((e) => /* @__PURE__ */ o("option", {
420
+ children: p("bigconsole.widget.config.table.rule.fieldRefPlaceholder", "Select field")
421
+ }), h.filter((t) => t.key !== e.key).map((e) => /* @__PURE__ */ s("option", {
359
422
  value: e.key,
360
423
  children: e.key
361
424
  }, e.key))]
362
- }) : /* @__PURE__ */ o("input", {
425
+ }) : /* @__PURE__ */ s("input", {
363
426
  type: "text",
364
427
  value: n.value ?? "",
365
- onChange: (e) => b(t, r, { value: e.target.value }),
366
- placeholder: f("bigconsole.widget.config.table.rule.valuePlaceholder", "value"),
367
- className: `${u} w-20`
428
+ onChange: (e) => x(t, r, { value: e.target.value }),
429
+ placeholder: p("bigconsole.widget.config.table.rule.valuePlaceholder", "value"),
430
+ className: `${d} w-20`
368
431
  }),
369
- d && /* @__PURE__ */ o("input", {
432
+ o && /* @__PURE__ */ s("input", {
370
433
  type: "text",
371
434
  value: n.value2 ?? "",
372
- onChange: (e) => b(t, r, { value2: e.target.value }),
373
- placeholder: f("bigconsole.widget.config.table.rule.value2Placeholder", "and"),
374
- className: `${u} w-20`
435
+ onChange: (e) => x(t, r, { value2: e.target.value }),
436
+ placeholder: p("bigconsole.widget.config.table.rule.value2Placeholder", "and"),
437
+ className: `${d} w-20`
375
438
  }),
376
- /* @__PURE__ */ o("button", {
439
+ /* @__PURE__ */ s("button", {
377
440
  type: "button",
378
- onClick: () => S(t, r),
441
+ onClick: () => C(t, r),
379
442
  className: "text-status-error-text hover:text-status-error-text/80",
380
- "aria-label": f("bigconsole.widget.config.table.rule.remove", "Remove rule"),
381
- children: /* @__PURE__ */ o("svg", {
443
+ "aria-label": p("bigconsole.widget.config.table.rule.remove", "Remove rule"),
444
+ children: /* @__PURE__ */ s("svg", {
382
445
  className: "w-3.5 h-3.5",
383
446
  fill: "none",
384
447
  stroke: "currentColor",
385
448
  viewBox: "0 0 24 24",
386
- children: /* @__PURE__ */ o("path", {
449
+ children: /* @__PURE__ */ s("path", {
387
450
  strokeLinecap: "round",
388
451
  strokeLinejoin: "round",
389
452
  strokeWidth: 2,
@@ -392,27 +455,27 @@ var c = [
392
455
  })
393
456
  })
394
457
  ]
395
- }), /* @__PURE__ */ s("div", {
458
+ }), /* @__PURE__ */ c("div", {
396
459
  className: "flex items-center gap-2",
397
- children: [/* @__PURE__ */ o("select", {
398
- value: p,
399
- onChange: (e) => x(t, r, e.target.value),
400
- className: `${u} flex-1`,
401
- children: l.map((e) => /* @__PURE__ */ o("option", {
460
+ children: [/* @__PURE__ */ s("select", {
461
+ value: f,
462
+ onChange: (e) => S(t, r, e.target.value),
463
+ className: `${d} flex-1`,
464
+ children: u.map((e) => /* @__PURE__ */ s("option", {
402
465
  value: e.value,
403
- children: f(e.labelKey, e.labelDefault)
466
+ children: p(e.labelKey, e.labelDefault)
404
467
  }, e.value))
405
- }), /* @__PURE__ */ s("label", {
468
+ }), /* @__PURE__ */ c("label", {
406
469
  className: "flex items-center gap-1 text-xs text-text-primary",
407
- children: [/* @__PURE__ */ o("input", {
470
+ children: [/* @__PURE__ */ s("input", {
408
471
  type: "checkbox",
409
472
  checked: n.style?.bold === !0,
410
- onChange: (e) => b(t, r, { style: {
473
+ onChange: (e) => x(t, r, { style: {
411
474
  ...n.style,
412
475
  bold: e.target.checked
413
476
  } }),
414
477
  className: "w-3.5 h-3.5 text-action-primary-bg bg-bg-surface border-border-default rounded focus:ring-action-primary-bg"
415
- }), f("bigconsole.widget.config.table.rule.bold", "Bold")]
478
+ }), p("bigconsole.widget.config.table.rule.bold", "Bold")]
416
479
  })]
417
480
  })]
418
481
  }, r);
@@ -421,79 +484,79 @@ var c = [
421
484
  ]
422
485
  })
423
486
  ]
424
- }, t)), m.length === 0 && /* @__PURE__ */ o("p", {
487
+ }, t)), h.length === 0 && /* @__PURE__ */ s("p", {
425
488
  className: "text-sm text-text-secondary text-center py-4",
426
- children: f("bigconsole.widget.config.table.columns.empty", "No columns configured. Columns will be auto-generated from data.")
489
+ children: p("bigconsole.widget.config.table.columns.empty", "No columns configured. Columns will be auto-generated from data.")
427
490
  })]
428
491
  })
429
492
  ] }),
430
- /* @__PURE__ */ s("div", {
493
+ /* @__PURE__ */ c("div", {
431
494
  role: "group",
432
495
  "aria-label": "Display options",
433
496
  className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
434
497
  children: [
435
- /* @__PURE__ */ o("p", {
498
+ /* @__PURE__ */ s("p", {
436
499
  className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
437
500
  children: "Display options"
438
501
  }),
439
- /* @__PURE__ */ s("label", {
502
+ /* @__PURE__ */ c("label", {
440
503
  className: "flex items-center gap-3",
441
- children: [/* @__PURE__ */ o("input", {
504
+ children: [/* @__PURE__ */ s("input", {
442
505
  type: "checkbox",
443
- checked: e.showSearch !== !1,
444
- onChange: (e) => g("showSearch", e.target.checked),
506
+ checked: t.showSearch !== !1,
507
+ onChange: (e) => _("showSearch", e.target.checked),
445
508
  className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
446
- }), /* @__PURE__ */ o("span", {
509
+ }), /* @__PURE__ */ s("span", {
447
510
  className: "text-sm text-text-primary",
448
- children: f("bigconsole.widget.config.table.showSearch", "Show search box")
511
+ children: p("bigconsole.widget.config.table.showSearch", "Show search box")
449
512
  })]
450
513
  }),
451
- /* @__PURE__ */ s("label", {
514
+ /* @__PURE__ */ c("label", {
452
515
  className: "flex items-center gap-3",
453
- children: [/* @__PURE__ */ o("input", {
516
+ children: [/* @__PURE__ */ s("input", {
454
517
  type: "checkbox",
455
- checked: e.showPagination !== !1,
456
- onChange: (e) => g("showPagination", e.target.checked),
518
+ checked: t.showPagination !== !1,
519
+ onChange: (e) => _("showPagination", e.target.checked),
457
520
  className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
458
- }), /* @__PURE__ */ o("span", {
521
+ }), /* @__PURE__ */ s("span", {
459
522
  className: "text-sm text-text-primary",
460
- children: f("bigconsole.widget.config.table.showPagination", "Show pagination")
523
+ children: p("bigconsole.widget.config.table.showPagination", "Show pagination")
461
524
  })]
462
525
  }),
463
- /* @__PURE__ */ s("label", {
526
+ /* @__PURE__ */ c("label", {
464
527
  className: "flex items-center gap-3",
465
- children: [/* @__PURE__ */ o("input", {
528
+ children: [/* @__PURE__ */ s("input", {
466
529
  type: "checkbox",
467
- checked: e.showExport !== !1,
468
- onChange: (e) => g("showExport", e.target.checked),
530
+ checked: t.showExport !== !1,
531
+ onChange: (e) => _("showExport", e.target.checked),
469
532
  className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
470
- }), /* @__PURE__ */ o("span", {
533
+ }), /* @__PURE__ */ s("span", {
471
534
  className: "text-sm text-text-primary",
472
- children: f("bigconsole.widget.config.table.showExport", "Show export button")
535
+ children: p("bigconsole.widget.config.table.showExport", "Show export button")
473
536
  })]
474
537
  }),
475
- /* @__PURE__ */ s("label", {
538
+ /* @__PURE__ */ c("label", {
476
539
  className: "flex items-center gap-3",
477
- children: [/* @__PURE__ */ o("input", {
540
+ children: [/* @__PURE__ */ s("input", {
478
541
  type: "checkbox",
479
- checked: e.stickyHeader === !0,
480
- onChange: (e) => g("stickyHeader", e.target.checked),
542
+ checked: t.stickyHeader === !0,
543
+ onChange: (e) => _("stickyHeader", e.target.checked),
481
544
  className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
482
- }), /* @__PURE__ */ o("span", {
545
+ }), /* @__PURE__ */ s("span", {
483
546
  className: "text-sm text-text-primary",
484
- children: f("bigconsole.widget.config.table.stickyHeader", "Sticky header")
547
+ children: p("bigconsole.widget.config.table.stickyHeader", "Sticky header")
485
548
  })]
486
549
  }),
487
- /* @__PURE__ */ s("label", {
550
+ /* @__PURE__ */ c("label", {
488
551
  className: "flex items-center gap-3",
489
- children: [/* @__PURE__ */ o("input", {
552
+ children: [/* @__PURE__ */ s("input", {
490
553
  type: "checkbox",
491
- checked: e.stripedRows === !0,
492
- onChange: (e) => g("stripedRows", e.target.checked),
554
+ checked: t.stripedRows === !0,
555
+ onChange: (e) => _("stripedRows", e.target.checked),
493
556
  className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
494
- }), /* @__PURE__ */ o("span", {
557
+ }), /* @__PURE__ */ s("span", {
495
558
  className: "text-sm text-text-primary",
496
- children: f("bigconsole.widget.config.table.stripedRows", "Striped rows")
559
+ children: p("bigconsole.widget.config.table.stripedRows", "Striped rows")
497
560
  })]
498
561
  })
499
562
  ]
@@ -501,4 +564,4 @@ var c = [
501
564
  ]
502
565
  });
503
566
  });
504
- export { d as TableConfig, d as default };
567
+ export { f as TableConfig, f as default };